yt-chat-components 0.9.9 → 1.0.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.
@@ -0,0 +1,254 @@
1
+ .p_closeImg {
2
+ width: 14px;
3
+ cursor: pointer;
4
+ }
5
+
6
+ .p_toolDialog {
7
+ display: flex;
8
+ height:100%;
9
+ background:url('https://trans-from-yuntu-resourse.oss-cn-beijing.aliyuncs.com/smartSchool/appCreator/ai/ai_modal_bg.png');
10
+ background-size: cover;
11
+ border-radius:8px;
12
+ }
13
+
14
+ .p_toolDialog .p_toolLeft {
15
+ display: flex;
16
+ flex-direction: column;
17
+ align-items: center;
18
+ width: 300px;
19
+ padding: 1.7rem 1.6rem 1.7rem 1.6rem;
20
+
21
+ border-top-left-radius: 8px;
22
+ border-bottom-left-radius: 8px;
23
+ }
24
+
25
+ .p_toolDialog .p_toolLeft .p_toolLogo {
26
+ user-select: none;
27
+ display: flex;
28
+ align-items: center;
29
+ }
30
+
31
+ .p_toolDialog .p_toolLeft .p_toolLogo .p_logoImg {
32
+ width: 48px;
33
+ }
34
+
35
+ .p_toolDialog .p_toolLeft .p_toolLogo .p_logoText {
36
+ font-weight: bold;
37
+ margin-left: 10px;
38
+ font-size: 30px;
39
+ background: linear-gradient(to right, #1551FF, #8F4BFF);
40
+ -webkit-background-clip: text;
41
+ -webkit-text-fill-color: transparent;
42
+ }
43
+
44
+ .p_toolDialog .p_toolLeft .p_historyDialog {
45
+ user-select: none;
46
+ margin-top: 20px;
47
+ margin-bottom: 20px;
48
+ border-radius: 10px;
49
+ flex: 1;
50
+ width: 100%;
51
+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
52
+ border-image: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 1 1;
53
+ backdrop-filter: blur(10px);
54
+ position: relative;
55
+ max-height:calc(100% - 5.5rem - 60px);
56
+ }
57
+
58
+ .p_toolDialog .p_toolLeft .p_historyDialog ::-webkit-scrollbar-thumb {
59
+ border-radius: 10px;
60
+ -webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
61
+ background: #535353 !important;
62
+ }
63
+
64
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyTitle {
65
+ padding: 1.3rem 16px 0 16px;
66
+ display: flex;
67
+ align-items: center;
68
+ }
69
+
70
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyTitle .p_historyImg {
71
+ width: 25px;
72
+ }
73
+
74
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyTitle .p_dialogTitle {
75
+ margin-left: 10px;
76
+ font-weight: 500;
77
+ font-size: 18px;
78
+ color: #333333;
79
+ line-height: 16px;
80
+ text-align: left;
81
+ font-style: normal;
82
+ }
83
+
84
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyListEmpty {
85
+ position: absolute;
86
+ top: 50%;
87
+ left: 50%;
88
+ transform: translate(-50%, -50%);
89
+ text-align: center;
90
+ font-size: 12px;
91
+ color: #999999;
92
+ max-height: calc(100% - 3rem);
93
+
94
+ }
95
+
96
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyList {
97
+ height: calc(100% - 3rem);
98
+ margin-top: 10px;
99
+ overflow-y: auto;
100
+ scrollbar-width: none !important; /* firefox */
101
+ }
102
+
103
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyList::-webkit-scrollbar{
104
+ display:none;
105
+ }
106
+
107
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyList:hover {
108
+ scrollbar-width: thin !important; /* firefox */
109
+ scrollbar-color: #ced4e3 transparent;
110
+ }
111
+
112
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyList .p_historyItem {
113
+ padding: 7px 16px;
114
+ }
115
+
116
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyList .p_historyItem .p_activeHistoryName {
117
+ color: #1552FF !important;
118
+ }
119
+
120
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyList .p_historyItem .p_historyName {
121
+ color: #333333;
122
+ overflow: hidden;
123
+ text-overflow: ellipsis;
124
+ white-space: nowrap;
125
+ cursor: pointer;
126
+ }
127
+
128
+ .p_toolDialog .p_toolLeft .p_historyDialog .p_historyList .p_historyItem .p_historyName:hover {
129
+ color: #171717;
130
+ }
131
+
132
+ .p_toolDialog .p_toolRight {
133
+ flex: 1;
134
+ }
135
+
136
+ .p_toolRightToRight {
137
+ width:300px;
138
+ display:flex;
139
+ flex-direction:column;
140
+ padding:2rem 1.6rem 1.8rem 1.6rem
141
+ }
142
+ .rightInnerContainer{
143
+ height:calc(100% - 80px);
144
+ flex:1;
145
+ display:flex;
146
+ flex-direction:column;
147
+ justify-content: space-between;
148
+ }
149
+ .p_toolRightToRight .rightSideTitle{
150
+ margin-bottom:1.4rem;
151
+ margin-top:10px;
152
+ margin-top:0;
153
+ font-size:18px;
154
+ font-weight:500;
155
+ display:flex;
156
+ align-items: center;
157
+ }
158
+ .p_toolRightToRight .rightSideTitle img{
159
+ margin-right:4px;
160
+ }
161
+
162
+ .p_toolRightToRight .rightSideTitle .titleSideColumn{
163
+ color:#1551FF;
164
+ }
165
+
166
+ .p_toolRightToRight .rightSkillContainer{
167
+ min-height:40%;
168
+ }
169
+ .p_toolRightToRight .rightSkillContainer .rightSkillList{
170
+ display: flex;
171
+ flex-wrap: wrap;
172
+ grid-template-columns: repeat(3, 1fr);
173
+ gap: 10px;
174
+ }
175
+ .p_toolRightToRight .rightSkillContainer .rightSkillList .rightSkillItem{
176
+ text-align: center;
177
+ cursor:pointer;
178
+ width:30%;
179
+ }
180
+ .p_toolRightToRight .rightSkillContainer .rightSkillList .rightSkillItem img{
181
+ width: 40px;
182
+ height: 40px;
183
+ border-radius:10px;
184
+ }
185
+ .p_toolRightToRight .rightSkillContainer .rightSkillList .rightSkillItem p{
186
+ margin-top:0px;
187
+ margin-bottom:4px;
188
+ overflow: hidden;
189
+ text-overflow: ellipsis;
190
+ white-space: nowrap;
191
+ color: #333333;
192
+ }
193
+ .p_toolRightToRight .rightKnowledgeTitle{
194
+ nargin-top: 2.2rem;
195
+ margin-bottom: 1.4rem;
196
+ font-size:18px;
197
+ font-weight:500;
198
+ display:flex;
199
+ align-items: center;
200
+ }
201
+
202
+ .p_toolRightToRight .rightKnowledgeTitle img{
203
+ margin-right:4px;
204
+ }
205
+
206
+ .p_toolRightToRight .rightKnowledgeContainer{
207
+ position:relative;
208
+ }
209
+ .p_toolRightToRight .rightMoreButton{
210
+ background: url('../../assets/aicenter/moreAi.png');
211
+ background-size: 85% auto;
212
+ background-repeat: no-repeat;
213
+ background-position: bottom;
214
+ position: absolute;
215
+ bottom: 8px;
216
+ left: 0;
217
+ width: 100%;
218
+ height: 100%;
219
+ z-index: 1;
220
+ display: flex;
221
+ justify-content: center;
222
+ align-items: flex-end;
223
+ }
224
+ .p_toolRightToRight .rightMoreButton div{
225
+ width:calc(100% - 50px);
226
+ padding: 16px 16px 10px 20px;
227
+ font-weight: 500;
228
+ color: #ffffff;
229
+ line-height: 17px;
230
+ font-size: 12px;
231
+ cursor:pointer;
232
+ }
233
+
234
+ .p_newDialog {
235
+ width: 252px;
236
+ height: 40px;
237
+ min-height:40px;
238
+ background: linear-gradient( 45deg, #1551FF 0%, #8F4BFF 100%);
239
+ margin-top: 20px;
240
+ border-radius: 20px;
241
+ cursor: pointer;
242
+ display: flex;
243
+ align-items: center;
244
+ justify-content: center;
245
+ }
246
+
247
+ .p_newDialog img {
248
+ width: 18px;
249
+ }
250
+
251
+ .p_newDialog .p_newDialogText {
252
+ color: #fff;
253
+ margin-left: 6px;
254
+ }
@@ -453,7 +453,7 @@ export class ToolDialog extends React.Component {
453
453
  {
454
454
  isShowSideLeft && <div className="p_toolLeft">
455
455
  <div className="p_toolLogo">
456
- <img className="p_logoImg" style={{ width: logoWidth }} src={agentUrl}/>
456
+ <img className="p_logoImg" style={{ width: logoWidth, borderRadius: 15 }} src={agentUrl}/>
457
457
  <div className="p_logoText" style={{ fontSize: logoFontSize }}>{agentName}</div>
458
458
  </div>
459
459
  <div className="p_historyDialog">
package/src/index.tsx CHANGED
@@ -3,8 +3,9 @@ import ReactDOM from 'react-dom';
3
3
  import LogoBtn from './YtChatView/logoBtn/index';
4
4
  import ToolDialog from "./YtChatView/previewDialog/index";
5
5
  import LogoSplitBtn from "./YtChatView/logoSplitBtn/index";
6
+ import MobileChatPage from "./YtChatView/mobileChat";
6
7
 
7
8
  // 手动注入 React 和 ReactDOM 到全局
8
9
  window.React = React;
9
10
  window.ReactDOM = ReactDOM;
10
- export {ToolDialog, LogoSplitBtn, LogoBtn}
11
+ export {ToolDialog, LogoSplitBtn, LogoBtn, MobileChatPage}