@tagit/ai-client-react 1.1.0 → 1.2.0-beta.26.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.
Files changed (39) hide show
  1. package/README.md +43 -1
  2. package/dist/chat-agent-avatar.d.ts +9 -0
  3. package/dist/chat-agent-avatar.d.ts.map +1 -0
  4. package/dist/chat-agent-avatar.js +10 -0
  5. package/dist/chat-agent-avatar.js.map +1 -0
  6. package/dist/chat-agent-picker.d.ts +5 -0
  7. package/dist/chat-agent-picker.d.ts.map +1 -0
  8. package/dist/chat-agent-picker.js +29 -0
  9. package/dist/chat-agent-picker.js.map +1 -0
  10. package/dist/chat-conversation.d.ts.map +1 -1
  11. package/dist/chat-conversation.js +23 -2
  12. package/dist/chat-conversation.js.map +1 -1
  13. package/dist/chat-history.d.ts.map +1 -1
  14. package/dist/chat-history.js +16 -5
  15. package/dist/chat-history.js.map +1 -1
  16. package/dist/chat-overlay-panel.d.ts +11 -0
  17. package/dist/chat-overlay-panel.d.ts.map +1 -0
  18. package/dist/chat-overlay-panel.js +5 -0
  19. package/dist/chat-overlay-panel.js.map +1 -0
  20. package/dist/chat-widget.d.ts.map +1 -1
  21. package/dist/chat-widget.js +25 -3
  22. package/dist/chat-widget.js.map +1 -1
  23. package/dist/conversation-boundary.d.ts +38 -0
  24. package/dist/conversation-boundary.d.ts.map +1 -0
  25. package/dist/conversation-boundary.js +139 -0
  26. package/dist/conversation-boundary.js.map +1 -0
  27. package/dist/index.d.ts +4 -1
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +4 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/provider.d.ts +10 -1
  32. package/dist/provider.d.ts.map +1 -1
  33. package/dist/provider.js +30 -1
  34. package/dist/provider.js.map +1 -1
  35. package/dist/renderers/ContentBlockRenderer.d.ts.map +1 -1
  36. package/dist/renderers/ContentBlockRenderer.js +1 -4
  37. package/dist/renderers/ContentBlockRenderer.js.map +1 -1
  38. package/package.json +3 -3
  39. package/src/chat-widget.css +238 -10
@@ -265,6 +265,35 @@
265
265
  gap: 8px;
266
266
  }
267
267
 
268
+ .tagIt-chat-agent-identity {
269
+ max-width: min(62%, 280px);
270
+ padding: 5px 7px;
271
+ margin-left: -7px;
272
+ border: 0;
273
+ border-radius: 7px;
274
+ background: transparent;
275
+ color: inherit;
276
+ cursor: pointer;
277
+ text-align: left;
278
+ transition: background 120ms ease, box-shadow 120ms ease;
279
+ }
280
+
281
+ .tagIt-chat-agent-identity:hover {
282
+ background: color-mix(in srgb, var(--tagIt-chat-border) 42%, transparent);
283
+ }
284
+
285
+ .tagIt-chat-agent-identity:focus-visible {
286
+ outline: 0;
287
+ background: color-mix(in srgb, var(--tagIt-chat-primary) 10%, transparent);
288
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--tagIt-chat-primary) 65%, transparent);
289
+ }
290
+
291
+ .tagIt-chat-agent-identity h2 {
292
+ overflow: hidden;
293
+ text-overflow: ellipsis;
294
+ white-space: nowrap;
295
+ }
296
+
268
297
  .tagIt-chat-panel-title-icon {
269
298
  width: 22px;
270
299
  height: 22px;
@@ -273,6 +302,25 @@
273
302
  flex-shrink: 0;
274
303
  }
275
304
 
305
+ .tagIt-chat-panel-title-avatar {
306
+ width: 22px;
307
+ height: 22px;
308
+ border-radius: 6px;
309
+ display: inline-flex;
310
+ align-items: center;
311
+ justify-content: center;
312
+ overflow: hidden;
313
+ background: color-mix(in srgb, var(--tagIt-chat-primary) 14%, var(--tagIt-chat-surface));
314
+ color: var(--tagIt-chat-primary);
315
+ flex-shrink: 0;
316
+ }
317
+
318
+ .tagIt-chat-panel-title-avatar img {
319
+ width: 100%;
320
+ height: 100%;
321
+ object-fit: cover;
322
+ }
323
+
276
324
  .tagIt-chat-close {
277
325
  display: flex;
278
326
  align-items: center;
@@ -472,6 +520,12 @@
472
520
  overflow: visible;
473
521
  }
474
522
 
523
+ .tagIt-chat-widget-mobile-fullscreen.tagIt-chat-widget-closed .tagIt-chat-panel {
524
+ visibility: hidden;
525
+ pointer-events: none;
526
+ transform: translateY(100dvh) !important;
527
+ }
528
+
475
529
  .tagIt-chat-widget-mobile-fullscreen .tagIt-chat-panel {
476
530
  position: fixed;
477
531
  inset: 0;
@@ -496,10 +550,10 @@
496
550
  .tagIt-chat-widget-mobile-fullscreen.tagIt-chat-side-right .tagIt-chat-tab,
497
551
  .tagIt-chat-widget-mobile-fullscreen.tagIt-chat-side-left .tagIt-chat-tab {
498
552
  position: fixed;
499
- right: 12px;
553
+ right: max(12px, env(safe-area-inset-right, 0px));
500
554
  left: auto;
501
555
  top: auto;
502
- bottom: 18px;
556
+ bottom: max(18px, env(safe-area-inset-bottom, 0px));
503
557
  transform: none;
504
558
  border-radius: 999px;
505
559
  pointer-events: auto;
@@ -507,7 +561,7 @@
507
561
 
508
562
  .tagIt-chat-widget-mobile-fullscreen.tagIt-chat-side-right .tagIt-chat-tab-open,
509
563
  .tagIt-chat-widget-mobile-fullscreen.tagIt-chat-side-left .tagIt-chat-tab-open {
510
- right: 12px;
564
+ right: max(12px, env(safe-area-inset-right, 0px));
511
565
  left: auto;
512
566
  }
513
567
 
@@ -727,7 +781,7 @@
727
781
  }
728
782
  }
729
783
 
730
- .tagIt-chat-history-panel {
784
+ .tagIt-chat-overlay-panel {
731
785
  position: absolute;
732
786
  inset: 0;
733
787
  z-index: 20;
@@ -741,7 +795,78 @@
741
795
  color: var(--tagIt-chat-text);
742
796
  }
743
797
 
744
- .tagIt-chat-history-header {
798
+ .tagIt-chat-transition-backdrop {
799
+ position: absolute;
800
+ inset: 0;
801
+ z-index: 40;
802
+ display: flex;
803
+ align-items: center;
804
+ justify-content: center;
805
+ padding: 18px;
806
+ background: color-mix(in srgb, var(--tagIt-chat-bg) 72%, transparent);
807
+ backdrop-filter: blur(3px);
808
+ }
809
+
810
+ .tagIt-chat-transition-dialog {
811
+ width: min(100%, 360px);
812
+ padding: 18px;
813
+ border: 1px solid var(--tagIt-chat-border);
814
+ border-radius: 12px;
815
+ background: var(--tagIt-chat-surface);
816
+ color: var(--tagIt-chat-text);
817
+ box-shadow: 0 18px 48px rgba(15, 23, 42, 0.26);
818
+ }
819
+
820
+ .tagIt-chat-transition-dialog h3 {
821
+ margin: 0;
822
+ font-size: 17px;
823
+ line-height: 1.3;
824
+ }
825
+
826
+ .tagIt-chat-transition-dialog p {
827
+ margin: 10px 0 0;
828
+ color: var(--tagIt-chat-muted);
829
+ font-size: 13px;
830
+ line-height: 1.5;
831
+ }
832
+
833
+ .tagIt-chat-transition-actions {
834
+ display: flex;
835
+ justify-content: flex-end;
836
+ gap: 8px;
837
+ margin-top: 18px;
838
+ }
839
+
840
+ .tagIt-chat-transition-actions button {
841
+ min-height: 36px;
842
+ padding: 7px 12px;
843
+ border: 1px solid var(--tagIt-chat-border);
844
+ border-radius: 8px;
845
+ background: var(--tagIt-chat-surface);
846
+ color: var(--tagIt-chat-text);
847
+ cursor: pointer;
848
+ font: inherit;
849
+ font-size: 13px;
850
+ font-weight: 700;
851
+ }
852
+
853
+ .tagIt-chat-transition-actions button[data-primary] {
854
+ border-color: var(--tagIt-chat-primary);
855
+ background: var(--tagIt-chat-primary);
856
+ color: var(--tagIt-chat-primary-contrast);
857
+ }
858
+
859
+ .tagIt-chat-transition-actions button:focus-visible {
860
+ outline: 2px solid var(--tagIt-chat-primary);
861
+ outline-offset: 2px;
862
+ }
863
+
864
+ .tagIt-chat-transition-actions button:disabled {
865
+ cursor: wait;
866
+ opacity: 0.65;
867
+ }
868
+
869
+ .tagIt-chat-overlay-header {
745
870
  min-height: 68px;
746
871
  padding: 12px 14px;
747
872
  border-bottom: 1px solid var(--tagIt-chat-border);
@@ -811,13 +936,13 @@
811
936
  white-space: nowrap;
812
937
  }
813
938
 
814
- .tagIt-chat-history-header h3 {
939
+ .tagIt-chat-overlay-header h3 {
815
940
  margin: 2px 0 0;
816
941
  font-size: 18px;
817
942
  line-height: 1.2;
818
943
  }
819
944
 
820
- .tagIt-chat-history-eyebrow {
945
+ .tagIt-chat-overlay-eyebrow {
821
946
  display: inline-flex;
822
947
  align-items: center;
823
948
  gap: 6px;
@@ -828,7 +953,7 @@
828
953
  text-transform: uppercase;
829
954
  }
830
955
 
831
- .tagIt-chat-history-header-actions,
956
+ .tagIt-chat-overlay-header-actions,
832
957
  .tagIt-chat-history-row-actions,
833
958
  .tagIt-chat-history-rename {
834
959
  display: inline-flex;
@@ -836,7 +961,7 @@
836
961
  gap: 6px;
837
962
  }
838
963
 
839
- .tagIt-chat-history-header-actions button,
964
+ .tagIt-chat-overlay-header-actions button,
840
965
  .tagIt-chat-history-row-actions button,
841
966
  .tagIt-chat-history-rename button {
842
967
  width: 32px;
@@ -852,7 +977,7 @@
852
977
  cursor: pointer;
853
978
  }
854
979
 
855
- .tagIt-chat-history-header-actions button:hover,
980
+ .tagIt-chat-overlay-header-actions button:hover,
856
981
  .tagIt-chat-history-row-actions button:hover,
857
982
  .tagIt-chat-history-rename button:hover {
858
983
  color: var(--tagIt-chat-text);
@@ -869,6 +994,109 @@
869
994
  gap: 8px;
870
995
  }
871
996
 
997
+ .tagIt-chat-agent-list {
998
+ flex: 1;
999
+ min-height: 0;
1000
+ overflow-y: auto;
1001
+ padding: 12px;
1002
+ display: flex;
1003
+ flex-direction: column;
1004
+ gap: 8px;
1005
+ }
1006
+
1007
+ .tagIt-chat-agent-row {
1008
+ width: 100%;
1009
+ min-height: 64px;
1010
+ display: grid;
1011
+ grid-template-columns: auto minmax(0, 1fr) auto auto;
1012
+ align-items: center;
1013
+ gap: 10px;
1014
+ padding: 10px 12px;
1015
+ border: 1px solid color-mix(in srgb, var(--tagIt-chat-border) 84%, transparent);
1016
+ border-radius: 10px;
1017
+ background: color-mix(in srgb, var(--tagIt-chat-surface) 82%, transparent);
1018
+ color: var(--tagIt-chat-text);
1019
+ cursor: pointer;
1020
+ text-align: left;
1021
+ }
1022
+
1023
+ .tagIt-chat-agent-row:hover:not(:disabled) {
1024
+ border-color: color-mix(in srgb, var(--tagIt-chat-primary) 38%, var(--tagIt-chat-border));
1025
+ background: color-mix(in srgb, var(--tagIt-chat-primary) 7%, var(--tagIt-chat-surface));
1026
+ }
1027
+
1028
+ .tagIt-chat-agent-row:focus-visible {
1029
+ outline: 2px solid var(--tagIt-chat-primary);
1030
+ outline-offset: 2px;
1031
+ }
1032
+
1033
+ .tagIt-chat-agent-row[aria-current='true'] {
1034
+ border-color: color-mix(in srgb, var(--tagIt-chat-primary) 52%, var(--tagIt-chat-border));
1035
+ background: color-mix(in srgb, var(--tagIt-chat-primary) 12%, var(--tagIt-chat-surface));
1036
+ cursor: default;
1037
+ opacity: 1;
1038
+ }
1039
+
1040
+ .tagIt-chat-agent-avatar {
1041
+ width: 36px;
1042
+ height: 36px;
1043
+ border-radius: 50%;
1044
+ display: inline-flex;
1045
+ align-items: center;
1046
+ justify-content: center;
1047
+ overflow: hidden;
1048
+ background: color-mix(in srgb, var(--tagIt-chat-primary) 14%, var(--tagIt-chat-surface));
1049
+ color: var(--tagIt-chat-primary);
1050
+ flex-shrink: 0;
1051
+ }
1052
+
1053
+ .tagIt-chat-agent-avatar img {
1054
+ width: 100%;
1055
+ height: 100%;
1056
+ object-fit: cover;
1057
+ }
1058
+
1059
+ .tagIt-chat-agent-main {
1060
+ min-width: 0;
1061
+ display: flex;
1062
+ flex-direction: column;
1063
+ gap: 3px;
1064
+ }
1065
+
1066
+ .tagIt-chat-agent-name {
1067
+ overflow: hidden;
1068
+ color: var(--tagIt-chat-text);
1069
+ font-size: 14px;
1070
+ font-weight: 750;
1071
+ text-overflow: ellipsis;
1072
+ white-space: nowrap;
1073
+ }
1074
+
1075
+ .tagIt-chat-agent-status {
1076
+ color: var(--tagIt-chat-muted);
1077
+ font-size: 12px;
1078
+ }
1079
+
1080
+ .tagIt-chat-agent-info {
1081
+ width: 28px;
1082
+ height: 28px;
1083
+ display: inline-flex;
1084
+ align-items: center;
1085
+ justify-content: center;
1086
+ border-radius: 7px;
1087
+ color: var(--tagIt-chat-muted);
1088
+ }
1089
+
1090
+ .tagIt-chat-agent-row .tagIt-chat-tooltip {
1091
+ width: max-content;
1092
+ max-width: min(240px, calc(100vw - 48px));
1093
+ white-space: normal;
1094
+ }
1095
+
1096
+ .tagIt-chat-agent-check {
1097
+ color: var(--tagIt-chat-primary);
1098
+ }
1099
+
872
1100
  .tagIt-chat-history-row {
873
1101
  border: 1px solid color-mix(in srgb, var(--tagIt-chat-border) 84%, transparent);
874
1102
  border-radius: 12px;