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