yt-chat-components 0.1.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.
Files changed (89) hide show
  1. package/.idea/langflow-embedded-chat.iml +12 -0
  2. package/.idea/modules.xml +8 -0
  3. package/.idea/sonarlint/issuestore/0/f/0f8c0c92cf798431ebb931ff6e997b1af86ecee5 +0 -0
  4. package/.idea/sonarlint/issuestore/3/9/39129446b425a1d640160c068e4194e96639eedf +0 -0
  5. package/.idea/sonarlint/issuestore/4/a/4a2f33951ce07c1ff7184f91877aa13db05d3785 +0 -0
  6. package/.idea/sonarlint/issuestore/4/a/4a7b99bdbee5792679d347b6474463bf5e14b66d +0 -0
  7. package/.idea/sonarlint/issuestore/4/b/4b6989b8ccae808ebc45d02230d336ea53800365 +0 -0
  8. package/.idea/sonarlint/issuestore/6/c/6c024c1d0ad64656b9d4b0695ec3c49c0454addf +0 -0
  9. package/.idea/sonarlint/issuestore/8/d/8d6123af13a140f93e06299fff7ea23c547e9ec8 +0 -0
  10. package/.idea/sonarlint/issuestore/8/e/8ec9a00bfd09b3190ac6b22251dbb1aa95a0579d +0 -0
  11. package/.idea/sonarlint/issuestore/d/9/d938938695d447dadda115e28781c6541f53fc4f +0 -0
  12. package/.idea/sonarlint/issuestore/index.pb +19 -0
  13. package/.idea/vcs.xml +6 -0
  14. package/README.md +274 -0
  15. package/build/asset-manifest.json +16 -0
  16. package/build/index.html +1 -0
  17. package/build/static/css/main.6f7c593d.css +2 -0
  18. package/build/static/css/main.6f7c593d.css.map +1 -0
  19. package/build/static/js/bundle.min.js +2 -0
  20. package/build/static/js/bundle.min.js.LICENSE.txt +124 -0
  21. package/build/static/js/main.cb252095.js +3 -0
  22. package/build/static/js/main.cb252095.js.LICENSE.txt +134 -0
  23. package/build/static/js/main.cb252095.js.map +1 -0
  24. package/build/static/media/aiavatar.74bafa995cce4c01b804.png +0 -0
  25. package/build/static/media/history-list-empty.1eb65b1550aef4e8c8a4.png +0 -0
  26. package/build/static/media/moreBg.9fc998472925cecd89f2.png +0 -0
  27. package/package.json +75 -0
  28. package/public/index.html +47 -0
  29. package/src/YtChatView/chatWidget/chatWindow/chatMessage/index.module.css +86 -0
  30. package/src/YtChatView/chatWidget/chatWindow/chatMessage/index.tsx +211 -0
  31. package/src/YtChatView/chatWidget/chatWindow/chatPlaceholder/index.module.css +9 -0
  32. package/src/YtChatView/chatWidget/chatWindow/chatPlaceholder/index.tsx +23 -0
  33. package/src/YtChatView/chatWidget/chatWindow/controllers/index.ts +236 -0
  34. package/src/YtChatView/chatWidget/chatWindow/index.module.css +197 -0
  35. package/src/YtChatView/chatWidget/chatWindow/index.tsx +791 -0
  36. package/src/YtChatView/chatWidget/chatWindow/types/chatWidget/index.ts +37 -0
  37. package/src/YtChatView/chatWidget/chatWindow/utils.ts +75 -0
  38. package/src/YtChatView/chatWidget/index.tsx +2289 -0
  39. package/src/YtChatView/logoBtn/index.css +4 -0
  40. package/src/YtChatView/logoBtn/index.jsx +65 -0
  41. package/src/YtChatView/logoSplitBtn/index.css +4 -0
  42. package/src/YtChatView/logoSplitBtn/index.jsx +67 -0
  43. package/src/YtChatView/previewDialog/index.jsx +431 -0
  44. package/src/YtChatView/previewDialog/index.module.css +144 -0
  45. package/src/assets/aicenter/add.png +0 -0
  46. package/src/assets/aicenter/aiavatar.png +0 -0
  47. package/src/assets/aicenter/aicenterbg.png +0 -0
  48. package/src/assets/aicenter/aicenterbgdark.png +0 -0
  49. package/src/assets/aicenter/close.png +0 -0
  50. package/src/assets/aicenter/closex.png +0 -0
  51. package/src/assets/aicenter/copy.png +0 -0
  52. package/src/assets/aicenter/file.png +0 -0
  53. package/src/assets/aicenter/fileupload.png +0 -0
  54. package/src/assets/aicenter/history-list-empty.png +0 -0
  55. package/src/assets/aicenter/history.png +0 -0
  56. package/src/assets/aicenter/luyin.png +0 -0
  57. package/src/assets/aicenter/moreAi.png +0 -0
  58. package/src/assets/aicenter/moreBg.png +0 -0
  59. package/src/assets/aicenter/play-run.gif +0 -0
  60. package/src/assets/aicenter/play.png +0 -0
  61. package/src/assets/aicenter/send-img.png +0 -0
  62. package/src/assets/aicenter/send-question-black.png +0 -0
  63. package/src/assets/aicenter/send-question.png +0 -0
  64. package/src/assets/aicenter/sendmessage.png +0 -0
  65. package/src/assets/aicenter/sound-wave.gif +0 -0
  66. package/src/assets/aicenter/toLeft.png +0 -0
  67. package/src/assets/aicenter/toRight.png +0 -0
  68. package/src/assets/aicenter/type-excel.png +0 -0
  69. package/src/assets/aicenter/type-markdown.png +0 -0
  70. package/src/assets/aicenter/type-mobi.png +0 -0
  71. package/src/assets/aicenter/type-pdf.png +0 -0
  72. package/src/assets/aicenter/type-rpub.png +0 -0
  73. package/src/assets/aicenter/type-text.png +0 -0
  74. package/src/assets/aicenter/type-word.png +0 -0
  75. package/src/assets/aicenter/upfile.png +0 -0
  76. package/src/chatPlaceholder/index.tsx +18 -0
  77. package/src/chatWidget/chatTrigger/index.tsx +15 -0
  78. package/src/chatWidget/chatWindow/chatMessage/index.tsx +42 -0
  79. package/src/chatWidget/chatWindow/index.tsx +426 -0
  80. package/src/chatWidget/index.tsx +2195 -0
  81. package/src/chatWidget/utils.ts +76 -0
  82. package/src/controllers/index.ts +205 -0
  83. package/src/index.tsx +60 -0
  84. package/src/react-app-env.d.ts +1 -0
  85. package/src/reportWebVitals.ts +15 -0
  86. package/src/setupTests.ts +5 -0
  87. package/src/types/chatWidget/index.ts +13 -0
  88. package/tsconfig.json +26 -0
  89. package/webpack.config.js +51 -0
@@ -0,0 +1,197 @@
1
+ .w_send_file_box {
2
+ height: 23px;
3
+ display: flex;
4
+ background: transparent;
5
+ align-items: center;
6
+ justify-content: center;
7
+ border-radius: 24px;
8
+ font-size: 12px;
9
+ color: #666666;
10
+ cursor: pointer;
11
+ }
12
+
13
+ .w_file_preview {
14
+ width: 100%;
15
+ height: fit-content;
16
+ background-color: transparent;
17
+ z-index: 500;
18
+ display: flex;
19
+ justify-content: flex-start;
20
+ align-items: center;
21
+ padding: 0 5px;
22
+ overflow-x: hidden;
23
+ }
24
+
25
+ .w_file_preview .w_directionBg {
26
+ position: absolute;
27
+ cursor: pointer;
28
+ width: 18px;
29
+ height: 18px;
30
+ background: #FFFFFF;
31
+ box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
32
+ border-radius: 5px;
33
+ border: 1px solid #F0F0F0;
34
+ z-index: 999999;
35
+ display: flex;
36
+ justify-content: center;
37
+ align-items: center;
38
+ }
39
+
40
+ .w_file_preview .w_directionBg img {
41
+ width: 12px;
42
+ }
43
+
44
+ .w_file_preview .w_toLeftBox {
45
+ position: absolute;
46
+ left: 0;
47
+ top: 6px;
48
+ height: 60px;
49
+ width: 80px;
50
+ background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 25%, rgba(255,255,255,0) 100%);
51
+ z-index: 99999;
52
+ }
53
+
54
+ .w_file_preview .w_toLeftBox .w_toLeft {
55
+ position: absolute;
56
+ cursor: pointer;
57
+ width: 18px;
58
+ height: 18px;
59
+ background: #FFFFFF;
60
+ box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
61
+ border-radius: 5px;
62
+ border: 1px solid #F0F0F0;
63
+ z-index: 999999;
64
+ display: flex;
65
+ justify-content: center;
66
+ align-items: center;
67
+ top: 25px;
68
+ left: 5px;
69
+ }
70
+
71
+ .w_file_preview .w_toRightBox {
72
+ position: absolute;
73
+ right: 0;
74
+ top: 6px;
75
+ height: 60px;
76
+ width: 80px;
77
+ background: linear-gradient(-90deg, #FFFFFF 0%, #FFFFFF 25%, rgba(255, 255, 255, 0) 100%);
78
+ z-index: 99999;
79
+ }
80
+
81
+ .w_file_preview .w_toRightBox .w_toRight {
82
+ position: absolute;
83
+ cursor: pointer;
84
+ width: 18px;
85
+ height: 18px;
86
+ background: #FFFFFF;
87
+ box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.1);
88
+ border-radius: 5px;
89
+ border: 1px solid #F0F0F0;
90
+ z-index: 999999;
91
+ display: flex;
92
+ justify-content: center;
93
+ align-items: center;
94
+ top: 25px;
95
+ right: 5px;
96
+ }
97
+
98
+ .w_file_preview .w_fileBox {
99
+ position: relative;
100
+ min-width: fit-content;
101
+ background-color: #f0f0f0;
102
+ border-radius: 10px;
103
+ margin: 10px 5px;
104
+ padding: 5px;
105
+ display: flex;
106
+ }
107
+
108
+ .w_file_preview .w_fileBox:hover .w_fileRemove {
109
+ display: block;
110
+ }
111
+
112
+ .w_file_preview .w_fileBox .w_fileInfoBox {
113
+ width: fit-content;
114
+ margin-left: 10px;
115
+ }
116
+
117
+ .w_file_preview .w_fileBox .w_fileInfoBox .w_fileInfoFileName {
118
+ overflow: hidden;
119
+ text-overflow: ellipsis;
120
+ white-space: nowrap;
121
+ width: 110px;
122
+ color: #242424;
123
+ user-select: none;
124
+ }
125
+
126
+ .w_file_preview .w_fileBox .w_fileInfoBox .w_fileInfoMeta {
127
+ width: fit-content;
128
+ user-select: none;
129
+ color: #a8a8a8;
130
+ white-space: nowrap;
131
+ }
132
+
133
+ .w_file_preview .w_fileBox .w_fileRemove {
134
+ display: none;
135
+ position: absolute;
136
+ cursor: pointer;
137
+ top: -2px;
138
+ right: 0;
139
+ z-index: 99999;
140
+ }
141
+
142
+ .w_file_preview .w_fileBox .w_fileRemove img {
143
+ width: 20px;
144
+ }
145
+
146
+ .w_file_preview .w_fileBox .w_upImg {
147
+ border-radius: 3px;
148
+ z-index: 510;
149
+ }
150
+
151
+ .w_inputBox {
152
+ width: 100%;
153
+ display: flex;
154
+ align-items: center;
155
+ textarea {
156
+ resize: none;
157
+ min-height: 48px;
158
+ max-height: 96px;
159
+ border: 0;
160
+ box-shadow: none !important;
161
+ color: #333;
162
+ outline: 0;
163
+ padding: 5px 10px 0 10px;
164
+ width: 100%;
165
+
166
+ box-sizing: border-box;
167
+ overflow-y: auto; /* 允许垂直滚动 */
168
+ scrollbar-width: none; /* Firefox */
169
+ -ms-overflow-style: none; /* IE and Edge */
170
+ }
171
+ textarea::-webkit-scrollbar {
172
+ display: none; /* Chrome, Safari, and Opera */
173
+ }
174
+ }
175
+
176
+ /**
177
+ * 输入框上方的标签问题列表
178
+ */
179
+
180
+ .w_send_voice_box {
181
+ height: 23px;
182
+ display: flex;
183
+ background: transparent;
184
+ align-items: center;
185
+ justify-content: center;
186
+ border-radius: 24px;
187
+ font-size: 12px;
188
+ color: #666666;
189
+ cursor: pointer;
190
+ margin-right: 10px;
191
+ }
192
+
193
+ .w_send_voice_box .w_recordIng {
194
+ padding: 4px;
195
+ background: #1552FF;
196
+ border-radius: 8px;
197
+ }