@cuekit-ai/react 1.5.0 → 1.6.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.
@@ -23614,11 +23614,12 @@ function setWebRTCCallbacks(newCallbacks) {
23614
23614
  function getCurrentCallbacks() {
23615
23615
  return callbacks;
23616
23616
  }
23617
- async function authenticate(userIdentity, apiKey, appId) {
23617
+ async function authenticate(userIdentity, apiKey, appId, language) {
23618
23618
  try {
23619
23619
  const authPayload = {
23620
23620
  user_identity: userIdentity,
23621
- app_id: appId || _appId
23621
+ app_id: appId || _appId,
23622
+ ...language && { language: language.code }
23622
23623
  };
23623
23624
  const response = await fetch(`${serverUrl}/auth/login`, {
23624
23625
  method: "POST",
package/dist/cuekit.css CHANGED
@@ -368,3 +368,537 @@ input::placeholder {
368
368
  .cuekit-voice-intensity-bar[data-lk-muted='true'] {
369
369
  background-color: hsl(var(--voice-text-muted));
370
370
  }
371
+
372
+ /* Draggable/Resizable Styles */
373
+ .draggable-resizable-container {
374
+ user-select: none;
375
+ transition: box-shadow 0.2s ease;
376
+ }
377
+
378
+ .draggable-resizable-container.is-dragging {
379
+ box-shadow: 0 20px 40px -10px hsl(0 0% 0% / 0.2);
380
+ cursor: move;
381
+ }
382
+
383
+ .draggable-resizable-container.is-resizing {
384
+ box-shadow: 0 20px 40px -10px hsl(0 0% 0% / 0.2);
385
+ }
386
+
387
+ .draggable-resizable-container .drag-handle {
388
+ background: transparent;
389
+ cursor: move;
390
+ }
391
+
392
+ .draggable-resizable-container .drag-handle:hover {
393
+ background: transparent;
394
+ }
395
+
396
+ .draggable-resizable-container .drag-handle:active {
397
+ background: transparent;
398
+ }
399
+
400
+ /* Resize handles */
401
+ .resize-handle {
402
+ background: transparent;
403
+ }
404
+
405
+ .resize-handle:hover {
406
+ background: transparent;
407
+ }
408
+
409
+ .resize-handle:active {
410
+ background: transparent;
411
+ }
412
+
413
+ /* Corner resize handles */
414
+ .resize-handle-nw,
415
+ .resize-handle-ne,
416
+ .resize-handle-sw,
417
+ .resize-handle-se {
418
+ border-radius: 50%;
419
+ }
420
+
421
+ /* Edge resize handles */
422
+ .resize-handle-n,
423
+ .resize-handle-s {
424
+ border-radius: 4px;
425
+ }
426
+
427
+ .resize-handle-e,
428
+ .resize-handle-w {
429
+ border-radius: 4px;
430
+ }
431
+
432
+ /* Cursor styles for different resize directions */
433
+ .resize-handle-n {
434
+ cursor: n-resize;
435
+ }
436
+ .resize-handle-s {
437
+ cursor: s-resize;
438
+ }
439
+ .resize-handle-e {
440
+ cursor: e-resize;
441
+ }
442
+ .resize-handle-w {
443
+ cursor: w-resize;
444
+ }
445
+ .resize-handle-ne {
446
+ cursor: ne-resize;
447
+ }
448
+ .resize-handle-nw {
449
+ cursor: nw-resize;
450
+ }
451
+ .resize-handle-se {
452
+ cursor: se-resize;
453
+ }
454
+ .resize-handle-sw {
455
+ cursor: sw-resize;
456
+ }
457
+
458
+ /* Disabled state */
459
+ .draggable-resizable-container[data-disabled='true'] .drag-handle,
460
+ .draggable-resizable-container[data-disabled='true'] .resize-handle {
461
+ cursor: default;
462
+ pointer-events: none;
463
+ }
464
+
465
+ /* Content area should not interfere with drag/resize */
466
+ .draggable-content {
467
+ pointer-events: auto;
468
+ }
469
+
470
+ /* Ensure proper z-index stacking */
471
+ .draggable-resizable-container .resize-handle {
472
+ z-index: 1001;
473
+ }
474
+
475
+ .draggable-resizable-container .drag-handle {
476
+ z-index: 1000;
477
+ }
478
+
479
+ /* Language Selector Styles */
480
+ .language-selector-container {
481
+ position: relative;
482
+ display: inline-block;
483
+ }
484
+
485
+ .language-selector-button {
486
+ display: flex;
487
+ align-items: center;
488
+ justify-content: center;
489
+ background: hsl(var(--voice-surface));
490
+ border: 1px solid hsl(var(--voice-border));
491
+ border-radius: 24px;
492
+ padding: 8px 16px;
493
+ cursor: pointer;
494
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
495
+ box-shadow: 0 2px 8px -2px hsl(var(--voice-accent) / 0.1);
496
+ min-width: 80px;
497
+ height: 40px;
498
+ }
499
+
500
+ .language-selector-button:hover:not(.disabled) {
501
+ background: hsl(var(--voice-accent-light));
502
+ border-color: hsl(var(--voice-accent));
503
+ box-shadow: 0 4px 12px -2px hsl(var(--voice-accent) / 0.2);
504
+ transform: translateY(-1px);
505
+ }
506
+
507
+ .language-selector-button:active:not(.disabled) {
508
+ transform: translateY(0);
509
+ box-shadow: 0 2px 8px -2px hsl(var(--voice-accent) / 0.3);
510
+ }
511
+
512
+ .language-selector-button.open {
513
+ background: hsl(var(--voice-accent-light));
514
+ border-color: hsl(var(--voice-accent));
515
+ box-shadow: 0 4px 12px -2px hsl(var(--voice-accent) / 0.2);
516
+ }
517
+
518
+ .language-selector-button.disabled {
519
+ opacity: 0.5;
520
+ cursor: not-allowed;
521
+ pointer-events: auto;
522
+ position: relative;
523
+ }
524
+
525
+ /* Custom Tooltip */
526
+ .language-tooltip {
527
+ position: absolute;
528
+ bottom: calc(100% + 8px);
529
+ left: 50%;
530
+ transform: translateX(-50%) translateY(4px);
531
+ z-index: 10001;
532
+ opacity: 0;
533
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
534
+ pointer-events: none;
535
+ visibility: hidden;
536
+ }
537
+
538
+ .language-tooltip.show {
539
+ opacity: 1 !important;
540
+ transform: translateX(-50%) translateY(0);
541
+ visibility: visible !important;
542
+ }
543
+
544
+ .language-tooltip-content {
545
+ background: oklch(0.23 0.08 252.75);
546
+ color: hsl(0 0% 98%);
547
+ padding: 8px 12px;
548
+ border-radius: 8px;
549
+ font-size: 12px;
550
+ font-weight: 500;
551
+ white-space: normal;
552
+ box-shadow: 0 4px 16px -4px hsl(0 0% 0% / 0.4), 0 2px 8px -2px hsl(0 0% 0% / 0.2);
553
+ max-width: 400px;
554
+ min-width: 150px;
555
+ word-wrap: break-word;
556
+ text-align: center;
557
+ line-height: 1.4;
558
+ }
559
+
560
+ .language-tooltip-arrow {
561
+ position: absolute;
562
+ top: 100%;
563
+ left: 50%;
564
+ transform: translateX(-50%);
565
+ width: 0;
566
+ height: 0;
567
+ border: 4px solid transparent;
568
+ border-top-color: oklch(0.23 0.08 252.75);
569
+ }
570
+
571
+ .language-selector-content {
572
+ display: flex;
573
+ align-items: center;
574
+ gap: 8px;
575
+ width: 100%;
576
+ justify-content: center;
577
+ }
578
+
579
+ .language-flag {
580
+ font-size: 16px;
581
+ line-height: 1;
582
+ filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
583
+ }
584
+
585
+ .language-code {
586
+ font-size: 12px;
587
+ font-weight: 600;
588
+ color: hsl(var(--voice-text));
589
+ letter-spacing: 0.025em;
590
+ text-transform: uppercase;
591
+ }
592
+
593
+ .language-chevron {
594
+ color: hsl(var(--voice-text-muted));
595
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
596
+ flex-shrink: 0;
597
+ }
598
+
599
+ .language-chevron.rotated {
600
+ transform: rotate(180deg);
601
+ }
602
+
603
+ .language-chevron.rotated-up {
604
+ transform: rotate(0deg);
605
+ }
606
+
607
+ .language-dropdown {
608
+ position: absolute;
609
+ top: calc(100% + 8px);
610
+ left: 0;
611
+ right: 0;
612
+ z-index: 10000;
613
+ background: hsl(var(--voice-surface));
614
+ border: 1px solid hsl(var(--voice-border));
615
+ border-radius: 12px;
616
+ box-shadow: 0 10px 40px -10px hsl(0 0% 0% / 0.1), 0 4px 20px -2px hsl(var(--voice-accent) / 0.1);
617
+ overflow: hidden;
618
+ animation: languageDropdownEnter 0.2s cubic-bezier(0.4, 0, 0.2, 1);
619
+ min-width: 200px;
620
+ width: max-content;
621
+ }
622
+
623
+ /* Dropdown opens upwards when mic is at bottom of screen */
624
+ .language-dropdown.dropdown-up {
625
+ top: auto;
626
+ bottom: calc(100% + 8px);
627
+ animation: languageDropdownEnterUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
628
+ }
629
+
630
+ @keyframes languageDropdownEnter {
631
+ 0% {
632
+ opacity: 0;
633
+ transform: translateY(-8px) scale(0.95);
634
+ }
635
+ 100% {
636
+ opacity: 1;
637
+ transform: translateY(0) scale(1);
638
+ }
639
+ }
640
+
641
+ @keyframes languageDropdownEnterUp {
642
+ 0% {
643
+ opacity: 0;
644
+ transform: translateY(8px) scale(0.95);
645
+ }
646
+ 100% {
647
+ opacity: 1;
648
+ transform: translateY(0) scale(1);
649
+ }
650
+ }
651
+
652
+ .language-dropdown-content {
653
+ padding: 4px;
654
+ max-height: 200px;
655
+ overflow-y: auto;
656
+ display: flex;
657
+ flex-direction: column;
658
+ gap: 4px;
659
+ }
660
+
661
+ .language-option {
662
+ display: flex;
663
+ align-items: center;
664
+ gap: 12px;
665
+ width: 100%;
666
+ padding: 10px 12px;
667
+ background: transparent;
668
+ border: none;
669
+ border-radius: 8px;
670
+ cursor: pointer;
671
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
672
+ text-align: left;
673
+ }
674
+
675
+ .language-option:hover {
676
+ background: hsl(var(--voice-accent-light));
677
+ }
678
+
679
+ .language-option.selected {
680
+ background: hsl(var(--voice-accent-light));
681
+ color: hsl(var(--voice-accent));
682
+ }
683
+
684
+ .language-info {
685
+ display: flex;
686
+ flex-direction: column;
687
+ gap: 2px;
688
+ flex: 1;
689
+ min-width: 0;
690
+ }
691
+
692
+ .language-name {
693
+ font-size: 14px;
694
+ font-weight: 500;
695
+ color: hsl(var(--voice-text));
696
+ white-space: nowrap;
697
+ overflow: hidden;
698
+ text-overflow: ellipsis;
699
+ }
700
+
701
+ .language-option.selected .language-name {
702
+ color: hsl(var(--voice-accent));
703
+ font-weight: 600;
704
+ }
705
+
706
+ .language-check {
707
+ color: hsl(var(--voice-accent));
708
+ font-weight: 600;
709
+ font-size: 14px;
710
+ flex-shrink: 0;
711
+ }
712
+
713
+ /* Dark theme adjustments for language selector */
714
+ @media (prefers-color-scheme: dark) {
715
+ .language-selector-button {
716
+ background: hsl(var(--voice-surface));
717
+ border-color: hsl(var(--voice-border));
718
+ }
719
+
720
+ .language-selector-button:hover:not(.disabled) {
721
+ background: hsl(var(--voice-accent-light));
722
+ }
723
+
724
+ .language-dropdown {
725
+ background: hsl(var(--voice-surface));
726
+ border-color: hsl(var(--voice-border));
727
+ }
728
+ }
729
+
730
+ .cuekit-voice-popup.cuekit-dark .language-selector-button {
731
+ background: hsl(var(--voice-surface));
732
+ border-color: hsl(var(--voice-border));
733
+ }
734
+
735
+ .cuekit-voice-popup.cuekit-dark .language-selector-button:hover:not(.disabled) {
736
+ background: hsl(var(--voice-accent-light));
737
+ }
738
+
739
+ .cuekit-voice-popup.cuekit-dark .language-dropdown {
740
+ background: hsl(var(--voice-surface));
741
+ border-color: hsl(var(--voice-border));
742
+ }
743
+
744
+ /* Voice Chat Button Container Styles */
745
+ .voice-chat-container {
746
+ position: relative;
747
+ display: flex;
748
+ flex-direction: column;
749
+ align-items: center;
750
+ gap: 12px;
751
+ }
752
+
753
+ .voice-chat-main-button {
754
+ display: flex;
755
+ align-items: center;
756
+ gap: 12px;
757
+ padding: 8px;
758
+ background: hsl(var(--voice-surface));
759
+ border: 1px solid hsl(var(--voice-border));
760
+ border-radius: 32px;
761
+ box-shadow: 0 8px 32px -8px hsl(var(--voice-accent) / 0.1), 0 4px 16px -4px hsl(0 0% 0% / 0.1);
762
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
763
+ }
764
+
765
+ .voice-chat-main-button:hover {
766
+ border-color: hsl(var(--voice-border));
767
+ box-shadow: 0 12px 40px -8px hsl(var(--voice-accent) / 0.15), 0 6px 20px -4px hsl(0 0% 0% / 0.15);
768
+ transform: translateY(-2px);
769
+ }
770
+
771
+ .voice-chat-language-preview {
772
+ opacity: 0.8;
773
+ transition: opacity 0.2s ease;
774
+ }
775
+
776
+ .voice-chat-language-preview:hover {
777
+ opacity: 1;
778
+ }
779
+
780
+ .voice-chat-language-selection {
781
+ display: flex;
782
+ flex-direction: column;
783
+ align-items: center;
784
+ gap: 16px;
785
+ padding: 20px;
786
+ background: hsl(var(--voice-surface));
787
+ border: 1px solid hsl(var(--voice-border));
788
+ border-radius: 16px;
789
+ box-shadow: 0 20px 60px -12px hsl(0 0% 0% / 0.15), 0 8px 32px -8px hsl(var(--voice-accent) / 0.1);
790
+ backdrop-filter: blur(16px);
791
+ min-width: 280px;
792
+ animation: voiceChatLanguageEnter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
793
+ }
794
+
795
+ @keyframes voiceChatLanguageEnter {
796
+ 0% {
797
+ opacity: 0;
798
+ transform: translateY(20px) scale(0.95);
799
+ }
800
+ 100% {
801
+ opacity: 1;
802
+ transform: translateY(0) scale(1);
803
+ }
804
+ }
805
+
806
+ .voice-chat-language-header {
807
+ display: flex;
808
+ align-items: center;
809
+ gap: 12px;
810
+ margin-bottom: 8px;
811
+ }
812
+
813
+ .voice-chat-language-icon {
814
+ display: flex;
815
+ align-items: center;
816
+ justify-content: center;
817
+ width: 40px;
818
+ height: 40px;
819
+ background: hsl(var(--voice-accent));
820
+ border-radius: 50%;
821
+ color: white;
822
+ box-shadow: 0 4px 12px -2px hsl(var(--voice-accent) / 0.3);
823
+ }
824
+
825
+ .voice-chat-language-title {
826
+ font-size: 16px;
827
+ font-weight: 600;
828
+ color: hsl(var(--voice-text));
829
+ }
830
+
831
+ .voice-chat-language-selector {
832
+ width: 100%;
833
+ }
834
+
835
+ .voice-chat-language-actions {
836
+ display: flex;
837
+ gap: 12px;
838
+ width: 100%;
839
+ margin-top: 8px;
840
+ }
841
+
842
+ .voice-chat-cancel-button,
843
+ .voice-chat-confirm-button {
844
+ flex: 1;
845
+ padding: 12px 20px;
846
+ border-radius: 8px;
847
+ font-size: 14px;
848
+ font-weight: 600;
849
+ cursor: pointer;
850
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
851
+ border: none;
852
+ }
853
+
854
+ .voice-chat-cancel-button {
855
+ background: hsl(var(--voice-surface));
856
+ color: hsl(var(--voice-text-muted));
857
+ border: 1px solid hsl(var(--voice-border));
858
+ }
859
+
860
+ .voice-chat-cancel-button:hover {
861
+ background: hsl(var(--voice-accent-light));
862
+ color: hsl(var(--voice-text));
863
+ border-color: hsl(var(--voice-accent));
864
+ }
865
+
866
+ .voice-chat-confirm-button {
867
+ background: hsl(var(--voice-accent));
868
+ color: white;
869
+ box-shadow: 0 4px 12px -2px hsl(var(--voice-accent) / 0.3);
870
+ }
871
+
872
+ .voice-chat-confirm-button:hover {
873
+ background: hsl(var(--voice-accent) / 0.9);
874
+ box-shadow: 0 6px 16px -2px hsl(var(--voice-accent) / 0.4);
875
+ transform: translateY(-1px);
876
+ }
877
+
878
+ .voice-chat-confirm-button:active {
879
+ transform: translateY(0);
880
+ box-shadow: 0 4px 12px -2px hsl(var(--voice-accent) / 0.3);
881
+ }
882
+
883
+ /* Dark theme adjustments for voice chat button */
884
+ @media (prefers-color-scheme: dark) {
885
+ .voice-chat-main-button {
886
+ background: hsl(var(--voice-surface) / 0.8);
887
+ border-color: hsl(var(--voice-border) / 0.5);
888
+ }
889
+
890
+ .voice-chat-language-selection {
891
+ background: hsl(var(--voice-surface));
892
+ border-color: hsl(var(--voice-border));
893
+ }
894
+ }
895
+
896
+ .cuekit-voice-popup.cuekit-dark .voice-chat-main-button {
897
+ background: hsl(var(--voice-surface) / 0.8);
898
+ border-color: hsl(var(--voice-border) / 0.5);
899
+ }
900
+
901
+ .cuekit-voice-popup.cuekit-dark .voice-chat-language-selection {
902
+ background: hsl(var(--voice-surface));
903
+ border-color: hsl(var(--voice-border));
904
+ }