@tagit/ai-client-react 0.7.0 → 0.8.0-beta.11.1

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.
@@ -10,6 +10,7 @@
10
10
  --tagIt-chat-tab-text: #ffffff;
11
11
  --tagIt-chat-panel-header-bg: #ffffff;
12
12
  --tagIt-chat-panel-body-bg: #f3f6fb;
13
+ --tagIt-chat-history-bg: #ffffff;
13
14
  --tagIt-chat-panel-footer-bg: #f8fbff;
14
15
  --tagIt-chat-panel-footer-prompt-bg: #ffffff;
15
16
  --tagIt-chat-panel-footer-send-bg: #1d4ed8;
@@ -25,6 +26,71 @@
25
26
  box-sizing: border-box;
26
27
  }
27
28
 
29
+ .tagIt-chat-tooltip-wrap {
30
+ position: relative;
31
+ display: inline-flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ }
35
+
36
+ .tagIt-chat-tooltip,
37
+ .tagIt-chat-tab::after {
38
+ position: absolute;
39
+ top: 50%;
40
+ z-index: 120;
41
+ max-width: min(220px, calc(100vw - 32px));
42
+ padding: 7px 9px;
43
+ border: 1px solid color-mix(in srgb, var(--tagIt-chat-border) 72%, var(--tagIt-chat-text));
44
+ border-radius: 8px;
45
+ background: color-mix(in srgb, var(--tagIt-chat-text) 94%, var(--tagIt-chat-surface));
46
+ color: var(--tagIt-chat-surface);
47
+ box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
48
+ font-size: 12px;
49
+ font-weight: 700;
50
+ line-height: 1.2;
51
+ white-space: nowrap;
52
+ opacity: 0;
53
+ pointer-events: none;
54
+ transition: opacity 120ms ease, transform 120ms ease;
55
+ }
56
+
57
+ .tagIt-chat-tooltip-wrap[data-side='left'] .tagIt-chat-tooltip,
58
+ .tagIt-chat-tab[data-tooltip-side='left']::after {
59
+ right: calc(100% + 10px);
60
+ transform: translate(4px, -50%);
61
+ }
62
+
63
+ .tagIt-chat-tooltip-wrap[data-side='right'] .tagIt-chat-tooltip,
64
+ .tagIt-chat-tab[data-tooltip-side='right']::after {
65
+ left: calc(100% + 10px);
66
+ transform: translate(-4px, -50%);
67
+ }
68
+
69
+ .tagIt-chat-tooltip-wrap:hover .tagIt-chat-tooltip,
70
+ .tagIt-chat-tooltip-wrap:focus-within .tagIt-chat-tooltip,
71
+ .tagIt-chat-tab:hover::after,
72
+ .tagIt-chat-tab:focus-visible::after {
73
+ opacity: 1;
74
+ }
75
+
76
+ .tagIt-chat-tooltip-wrap[data-side='left']:hover .tagIt-chat-tooltip,
77
+ .tagIt-chat-tooltip-wrap[data-side='left']:focus-within .tagIt-chat-tooltip,
78
+ .tagIt-chat-tab[data-tooltip-side='left']:hover::after,
79
+ .tagIt-chat-tab[data-tooltip-side='left']:focus-visible::after {
80
+ transform: translate(0, -50%);
81
+ }
82
+
83
+ .tagIt-chat-tooltip-wrap[data-side='right']:hover .tagIt-chat-tooltip,
84
+ .tagIt-chat-tooltip-wrap[data-side='right']:focus-within .tagIt-chat-tooltip,
85
+ .tagIt-chat-tab[data-tooltip-side='right']:hover::after,
86
+ .tagIt-chat-tab[data-tooltip-side='right']:focus-visible::after {
87
+ transform: translate(0, -50%);
88
+ }
89
+
90
+ .tagIt-chat-tab::after {
91
+ content: attr(data-tooltip);
92
+ }
93
+
28
94
  .tagIt-chat-widget-overlay .tagIt-chat-scrim {
29
95
  position: fixed;
30
96
  inset: 0;
@@ -266,6 +332,8 @@
266
332
  background: var(--tagIt-chat-panel-body-bg);
267
333
  display: flex;
268
334
  flex-direction: column;
335
+ position: relative;
336
+ isolation: isolate;
269
337
  }
270
338
 
271
339
  .tagIt-chat-theme-dark {
@@ -280,6 +348,7 @@
280
348
  --tagIt-chat-tab-text: #eaf2ff;
281
349
  --tagIt-chat-panel-header-bg: #111b30;
282
350
  --tagIt-chat-panel-body-bg: #0b1220;
351
+ --tagIt-chat-history-bg: #0b1220;
283
352
  --tagIt-chat-panel-footer-bg: #111b30;
284
353
  --tagIt-chat-panel-footer-prompt-bg: #0f172a;
285
354
  --tagIt-chat-panel-footer-send-bg: #60a5fa;
@@ -512,6 +581,341 @@
512
581
  color: var(--tagIt-chat-muted);
513
582
  }
514
583
 
584
+ .tagIt-chat-recent-list {
585
+ width: min(100%, 420px);
586
+ margin-top: 22px;
587
+ display: flex;
588
+ flex-direction: column;
589
+ gap: 8px;
590
+ }
591
+
592
+ .tagIt-chat-recent-heading {
593
+ color: var(--tagIt-chat-muted);
594
+ font-size: 12px;
595
+ font-weight: 800;
596
+ letter-spacing: 0.08em;
597
+ text-align: left;
598
+ text-transform: uppercase;
599
+ }
600
+
601
+ .tagIt-chat-recent-conversation {
602
+ width: 100%;
603
+ border: 1px solid color-mix(in srgb, var(--tagIt-chat-border) 88%, transparent);
604
+ border-radius: 12px;
605
+ padding: 10px 12px;
606
+ background: color-mix(in srgb, var(--tagIt-chat-surface) 88%, transparent);
607
+ color: var(--tagIt-chat-text);
608
+ display: grid;
609
+ grid-template-columns: auto 1fr auto;
610
+ gap: 10px;
611
+ align-items: center;
612
+ text-align: left;
613
+ cursor: pointer;
614
+ transition: border-color 0.15s, background 0.15s, transform 0.15s;
615
+ }
616
+
617
+ .tagIt-chat-recent-conversation:hover,
618
+ .tagIt-chat-recent-conversation:focus-visible {
619
+ border-color: color-mix(in srgb, var(--tagIt-chat-primary) 58%, var(--tagIt-chat-border));
620
+ background: color-mix(in srgb, var(--tagIt-chat-surface) 72%, var(--tagIt-chat-primary));
621
+ transform: translateY(-1px);
622
+ }
623
+
624
+ .tagIt-chat-recent-icon {
625
+ width: 28px;
626
+ height: 28px;
627
+ border-radius: 999px;
628
+ display: inline-flex;
629
+ align-items: center;
630
+ justify-content: center;
631
+ background: color-mix(in srgb, var(--tagIt-chat-primary) 14%, transparent);
632
+ color: var(--tagIt-chat-primary);
633
+ }
634
+
635
+ .tagIt-chat-recent-main {
636
+ min-width: 0;
637
+ display: flex;
638
+ flex-direction: column;
639
+ gap: 2px;
640
+ }
641
+
642
+ .tagIt-chat-recent-title,
643
+ .tagIt-chat-history-row-title {
644
+ color: var(--tagIt-chat-text);
645
+ font-size: 13px;
646
+ font-weight: 700;
647
+ white-space: nowrap;
648
+ overflow: hidden;
649
+ text-overflow: ellipsis;
650
+ }
651
+
652
+ .tagIt-chat-recent-preview,
653
+ .tagIt-chat-history-row-preview,
654
+ .tagIt-chat-history-row-meta {
655
+ color: var(--tagIt-chat-muted);
656
+ font-size: 12px;
657
+ line-height: 1.35;
658
+ }
659
+
660
+ .tagIt-chat-recent-preview {
661
+ white-space: nowrap;
662
+ overflow: hidden;
663
+ text-overflow: ellipsis;
664
+ }
665
+
666
+ .tagIt-chat-recent-time {
667
+ color: var(--tagIt-chat-muted);
668
+ font-size: 11px;
669
+ white-space: nowrap;
670
+ }
671
+
672
+ .tagIt-chat-loading-inline {
673
+ border: 1px solid color-mix(in srgb, var(--tagIt-chat-primary) 28%, var(--tagIt-chat-border));
674
+ border-radius: 12px;
675
+ padding: 10px 12px;
676
+ background: color-mix(in srgb, var(--tagIt-chat-primary) 9%, var(--tagIt-chat-surface));
677
+ color: var(--tagIt-chat-text);
678
+ display: grid;
679
+ grid-template-columns: auto minmax(0, 1fr) auto;
680
+ gap: 10px;
681
+ align-items: center;
682
+ text-align: left;
683
+ font-size: 12px;
684
+ }
685
+
686
+ .tagIt-chat-loading-inline button,
687
+ .tagIt-chat-loading-card button {
688
+ border: 1px solid color-mix(in srgb, var(--tagIt-chat-primary) 46%, var(--tagIt-chat-border));
689
+ border-radius: 999px;
690
+ padding: 6px 10px;
691
+ background: color-mix(in srgb, var(--tagIt-chat-surface) 86%, transparent);
692
+ color: var(--tagIt-chat-text);
693
+ cursor: pointer;
694
+ font-size: 12px;
695
+ font-weight: 800;
696
+ }
697
+
698
+ .tagIt-chat-loading-inline button:hover,
699
+ .tagIt-chat-loading-card button:hover {
700
+ background: color-mix(in srgb, var(--tagIt-chat-primary) 16%, var(--tagIt-chat-surface));
701
+ }
702
+
703
+ .tagIt-chat-loading-spinner {
704
+ width: 16px;
705
+ height: 16px;
706
+ border-radius: 999px;
707
+ border: 2px solid color-mix(in srgb, var(--tagIt-chat-primary) 24%, var(--tagIt-chat-border));
708
+ border-top-color: var(--tagIt-chat-primary);
709
+ animation: tagIt-chat-spin 800ms linear infinite;
710
+ }
711
+
712
+ @keyframes tagIt-chat-spin {
713
+ to {
714
+ transform: rotate(360deg);
715
+ }
716
+ }
717
+
718
+ .tagIt-chat-history-panel {
719
+ position: absolute;
720
+ inset: 0;
721
+ z-index: 20;
722
+ display: flex;
723
+ flex-direction: column;
724
+ width: 100%;
725
+ height: 100%;
726
+ min-height: 0;
727
+ overflow: hidden;
728
+ background: var(--tagIt-chat-history-bg, var(--tagIt-chat-surface));
729
+ color: var(--tagIt-chat-text);
730
+ }
731
+
732
+ .tagIt-chat-history-header {
733
+ min-height: 68px;
734
+ padding: 12px 14px;
735
+ border-bottom: 1px solid var(--tagIt-chat-border);
736
+ display: flex;
737
+ align-items: center;
738
+ justify-content: space-between;
739
+ gap: 12px;
740
+ background: var(--tagIt-chat-panel-header-bg);
741
+ }
742
+
743
+ .tagIt-chat-loading-overlay {
744
+ position: absolute;
745
+ inset: 68px 0 0;
746
+ z-index: 2;
747
+ display: flex;
748
+ align-items: flex-start;
749
+ justify-content: center;
750
+ padding: 14px;
751
+ background: linear-gradient(
752
+ to bottom,
753
+ color-mix(in srgb, var(--tagIt-chat-history-bg, var(--tagIt-chat-surface)) 88%, transparent),
754
+ color-mix(in srgb, var(--tagIt-chat-history-bg, var(--tagIt-chat-surface)) 56%, transparent)
755
+ );
756
+ backdrop-filter: blur(2px);
757
+ }
758
+
759
+ .tagIt-chat-loading-card {
760
+ width: min(100%, 360px);
761
+ border: 1px solid color-mix(in srgb, var(--tagIt-chat-primary) 30%, var(--tagIt-chat-border));
762
+ border-radius: 14px;
763
+ padding: 12px;
764
+ background: color-mix(in srgb, var(--tagIt-chat-panel-header-bg) 92%, transparent);
765
+ box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
766
+ color: var(--tagIt-chat-text);
767
+ display: grid;
768
+ grid-template-columns: auto minmax(0, 1fr) auto;
769
+ gap: 10px;
770
+ align-items: center;
771
+ }
772
+
773
+ .tagIt-chat-loading-card strong,
774
+ .tagIt-chat-loading-card span {
775
+ display: block;
776
+ }
777
+
778
+ .tagIt-chat-loading-card strong {
779
+ font-size: 13px;
780
+ }
781
+
782
+ .tagIt-chat-loading-card span {
783
+ color: var(--tagIt-chat-muted);
784
+ font-size: 12px;
785
+ overflow: hidden;
786
+ text-overflow: ellipsis;
787
+ white-space: nowrap;
788
+ }
789
+
790
+ .tagIt-chat-history-header h3 {
791
+ margin: 2px 0 0;
792
+ font-size: 18px;
793
+ line-height: 1.2;
794
+ }
795
+
796
+ .tagIt-chat-history-eyebrow {
797
+ display: inline-flex;
798
+ align-items: center;
799
+ gap: 6px;
800
+ color: var(--tagIt-chat-muted);
801
+ font-size: 12px;
802
+ font-weight: 700;
803
+ letter-spacing: 0.04em;
804
+ text-transform: uppercase;
805
+ }
806
+
807
+ .tagIt-chat-history-header-actions,
808
+ .tagIt-chat-history-row-actions,
809
+ .tagIt-chat-history-rename {
810
+ display: inline-flex;
811
+ align-items: center;
812
+ gap: 6px;
813
+ }
814
+
815
+ .tagIt-chat-history-header-actions button,
816
+ .tagIt-chat-history-row-actions button,
817
+ .tagIt-chat-history-rename button {
818
+ width: 32px;
819
+ height: 32px;
820
+ border-radius: 8px;
821
+ border: 1px solid var(--tagIt-chat-border);
822
+ background: color-mix(in srgb, var(--tagIt-chat-surface) 72%, transparent);
823
+ color: var(--tagIt-chat-muted);
824
+ display: inline-flex;
825
+ align-items: center;
826
+ justify-content: center;
827
+ padding: 0;
828
+ cursor: pointer;
829
+ }
830
+
831
+ .tagIt-chat-history-header-actions button:hover,
832
+ .tagIt-chat-history-row-actions button:hover,
833
+ .tagIt-chat-history-rename button:hover {
834
+ color: var(--tagIt-chat-text);
835
+ background: color-mix(in srgb, var(--tagIt-chat-border) 48%, transparent);
836
+ }
837
+
838
+ .tagIt-chat-history-list {
839
+ flex: 1;
840
+ min-height: 0;
841
+ overflow-y: auto;
842
+ padding: 12px;
843
+ display: flex;
844
+ flex-direction: column;
845
+ gap: 8px;
846
+ }
847
+
848
+ .tagIt-chat-history-row {
849
+ border: 1px solid color-mix(in srgb, var(--tagIt-chat-border) 84%, transparent);
850
+ border-radius: 12px;
851
+ background: color-mix(in srgb, var(--tagIt-chat-surface) 82%, transparent);
852
+ display: grid;
853
+ grid-template-columns: minmax(0, 1fr) auto;
854
+ gap: 8px;
855
+ align-items: center;
856
+ padding: 10px;
857
+ }
858
+
859
+ .tagIt-chat-history-row[data-active] {
860
+ border-color: color-mix(in srgb, var(--tagIt-chat-primary) 52%, var(--tagIt-chat-border));
861
+ background: color-mix(in srgb, var(--tagIt-chat-primary) 12%, var(--tagIt-chat-surface));
862
+ }
863
+
864
+ .tagIt-chat-history-row-main {
865
+ min-width: 0;
866
+ border: 0;
867
+ padding: 0;
868
+ background: transparent;
869
+ color: inherit;
870
+ display: flex;
871
+ flex-direction: column;
872
+ gap: 3px;
873
+ text-align: left;
874
+ cursor: pointer;
875
+ }
876
+
877
+ .tagIt-chat-history-row-main:disabled {
878
+ cursor: default;
879
+ }
880
+
881
+ .tagIt-chat-history-row-preview {
882
+ display: -webkit-box;
883
+ -webkit-line-clamp: 2;
884
+ -webkit-box-orient: vertical;
885
+ overflow: hidden;
886
+ }
887
+
888
+ .tagIt-chat-history-error,
889
+ .tagIt-chat-history-empty {
890
+ margin: 12px;
891
+ padding: 12px;
892
+ border-radius: 10px;
893
+ border: 1px solid var(--tagIt-chat-border);
894
+ color: var(--tagIt-chat-muted);
895
+ background: color-mix(in srgb, var(--tagIt-chat-surface) 70%, transparent);
896
+ font-size: 13px;
897
+ }
898
+
899
+ .tagIt-chat-history-error {
900
+ border-color: color-mix(in srgb, #ef4444 35%, var(--tagIt-chat-border));
901
+ color: color-mix(in srgb, #ef4444 88%, var(--tagIt-chat-text));
902
+ }
903
+
904
+ .tagIt-chat-history-rename {
905
+ grid-column: 1 / -1;
906
+ }
907
+
908
+ .tagIt-chat-history-rename input {
909
+ min-width: 0;
910
+ flex: 1;
911
+ height: 34px;
912
+ border-radius: 8px;
913
+ border: 1px solid var(--tagIt-chat-border);
914
+ padding: 0 10px;
915
+ background: var(--tagIt-chat-panel-footer-prompt-bg);
916
+ color: var(--tagIt-chat-text);
917
+ }
918
+
515
919
  .tagIt-chat-message {
516
920
  display: flex;
517
921
  flex-direction: column;