vue-element-ui-x 1.0.42-beta → 1.0.43-beta

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/lib/index.common.js +1 -1
  2. package/lib/index.esm.js +1 -1
  3. package/lib/index.ssr.js +90 -0
  4. package/lib/index.umd.js +1 -1
  5. package/package.json +5 -5
  6. package/src/components/Attachments/index.js +0 -8
  7. package/src/components/Attachments/src/main.vue +0 -529
  8. package/src/components/Bubble/index.js +0 -6
  9. package/src/components/Bubble/src/main.vue +0 -288
  10. package/src/components/BubbleList/index.js +0 -8
  11. package/src/components/BubbleList/src/loading.vue +0 -75
  12. package/src/components/BubbleList/src/main.vue +0 -444
  13. package/src/components/Conversations/index.js +0 -8
  14. package/src/components/Conversations/src/components/item.vue +0 -350
  15. package/src/components/Conversations/src/main.vue +0 -587
  16. package/src/components/FilesCard/index.js +0 -8
  17. package/src/components/FilesCard/src/fileSvg/audio.vue +0 -38
  18. package/src/components/FilesCard/src/fileSvg/changeFileName.bat +0 -18
  19. package/src/components/FilesCard/src/fileSvg/code.vue +0 -35
  20. package/src/components/FilesCard/src/fileSvg/database.vue +0 -94
  21. package/src/components/FilesCard/src/fileSvg/excel.vue +0 -38
  22. package/src/components/FilesCard/src/fileSvg/file.vue +0 -40
  23. package/src/components/FilesCard/src/fileSvg/image.vue +0 -40
  24. package/src/components/FilesCard/src/fileSvg/index.js +0 -46
  25. package/src/components/FilesCard/src/fileSvg/link.vue +0 -54
  26. package/src/components/FilesCard/src/fileSvg/mark.vue +0 -38
  27. package/src/components/FilesCard/src/fileSvg/pdf.vue +0 -38
  28. package/src/components/FilesCard/src/fileSvg/ppt.vue +0 -38
  29. package/src/components/FilesCard/src/fileSvg/three.vue +0 -38
  30. package/src/components/FilesCard/src/fileSvg/txt.vue +0 -38
  31. package/src/components/FilesCard/src/fileSvg/unknown.vue +0 -54
  32. package/src/components/FilesCard/src/fileSvg/video.vue +0 -38
  33. package/src/components/FilesCard/src/fileSvg/word.vue +0 -38
  34. package/src/components/FilesCard/src/fileSvg/zip.vue +0 -38
  35. package/src/components/FilesCard/src/main.vue +0 -403
  36. package/src/components/FilesCard/src/options.js +0 -18
  37. package/src/components/Prompts/index.js +0 -8
  38. package/src/components/Prompts/src/main.vue +0 -248
  39. package/src/components/Sender/index.js +0 -8
  40. package/src/components/Sender/src/components/ClearButton.vue +0 -28
  41. package/src/components/Sender/src/components/Loading.vue +0 -53
  42. package/src/components/Sender/src/components/LoadingButton.vue +0 -37
  43. package/src/components/Sender/src/components/SendButton.vue +0 -26
  44. package/src/components/Sender/src/components/SpeechButton.vue +0 -24
  45. package/src/components/Sender/src/components/SpeechLoading.vue +0 -87
  46. package/src/components/Sender/src/components/SpeechLoadingButton.vue +0 -41
  47. package/src/components/Sender/src/main.vue +0 -803
  48. package/src/components/Thinking/index.js +0 -8
  49. package/src/components/Thinking/src/main.vue +0 -199
  50. package/src/components/ThoughtChain/index.js +0 -8
  51. package/src/components/ThoughtChain/src/main.vue +0 -291
  52. package/src/components/Typewriter/index.js +0 -8
  53. package/src/components/Typewriter/src/main.vue +0 -255
  54. package/src/components/Welcome/index.js +0 -8
  55. package/src/components/Welcome/src/main.vue +0 -151
  56. package/src/index.js +0 -104
  57. package/src/locale/index.js +0 -97
  58. package/src/locale/lang/ar.js +0 -18
  59. package/src/locale/lang/de.js +0 -18
  60. package/src/locale/lang/en.js +0 -18
  61. package/src/locale/lang/es.js +0 -18
  62. package/src/locale/lang/fr.js +0 -18
  63. package/src/locale/lang/index.js +0 -62
  64. package/src/locale/lang/it.js +0 -18
  65. package/src/locale/lang/ja.js +0 -18
  66. package/src/locale/lang/ko.js +0 -18
  67. package/src/locale/lang/pt-br.js +0 -18
  68. package/src/locale/lang/ru-RU.js +0 -18
  69. package/src/locale/lang/zh-CN.js +0 -18
  70. package/src/locale/lang/zh-TW.js +0 -18
  71. package/src/locale/mixin.js +0 -9
  72. package/src/mixins/index.js +0 -49
  73. package/src/mixins/recordMixin.js +0 -117
  74. package/src/mixins/sendMixin.js +0 -450
  75. package/src/mixins/streamMixin.js +0 -497
  76. package/src/styles/Attachments.scss +0 -236
  77. package/src/styles/Bubble.scss +0 -158
  78. package/src/styles/BubbleList.scss +0 -148
  79. package/src/styles/Conversations.scss +0 -283
  80. package/src/styles/FilesCard.scss +0 -222
  81. package/src/styles/Prompts.scss +0 -197
  82. package/src/styles/Sender.scss +0 -211
  83. package/src/styles/Thinking.scss +0 -142
  84. package/src/styles/ThoughtChain.scss +0 -113
  85. package/src/styles/Typewriter.scss +0 -66
  86. package/src/styles/Welcome.scss +0 -283
  87. package/src/theme/var.scss +0 -183
  88. package/src/utils/index.js +0 -199
  89. package/src/utils/scrollDetector.js +0 -34
@@ -1,222 +0,0 @@
1
- @import '../theme/var.scss';
2
-
3
- .el-x-filescard {
4
- width: fit-content;
5
- padding: 12px;
6
- display: flex;
7
- flex-wrap: nowrap;
8
- gap: 8px;
9
- align-items: center;
10
- border-radius: 8px;
11
- position: relative;
12
- background: rgba(0, 0, 0, 0.06);
13
- max-width: var(--elx-files-card-max-width);
14
-
15
- .el-x-filescard-progress {
16
- position: absolute;
17
- top: 0;
18
- left: 0;
19
- bottom: 0;
20
- background: rgba(0, 0, 0, 0.08);
21
- border-radius: 8px;
22
- transition: width 0.2s ease;
23
- }
24
-
25
- .el-x-filescard-delete-icon {
26
- position: absolute;
27
- top: -8px;
28
- right: -6px;
29
- cursor: pointer;
30
- color: rgba(0, 0, 0, 0.4);
31
- display: none;
32
-
33
- &:hover {
34
- color: #ff4d4f;
35
- }
36
- }
37
-
38
- &:hover .el-x-filescard-delete-icon {
39
- display: block;
40
- }
41
- }
42
-
43
- .el-x-filescard-square {
44
- padding: 0;
45
- margin: 0;
46
- }
47
-
48
- .el-x-filescard-icon {
49
- flex: none;
50
- font-size: var(--elx-files-card-icon-size);
51
- }
52
-
53
- .el-x-filescard-img {
54
- flex: none;
55
- width: var(--elx-files-card-icon-size);
56
- height: var(--elx-files-card-icon-size);
57
- border-radius: 8px;
58
- object-fit: cover;
59
- }
60
-
61
- .el-x-filescard-content {
62
- flex: auto;
63
- min-width: 0;
64
- display: flex;
65
- flex-direction: column;
66
- align-items: stretch;
67
- justify-content: space-between;
68
- height: 100%;
69
-
70
- .el-x-filescard-name {
71
- display: flex;
72
- flex-wrap: nowrap;
73
- max-width: 100%;
74
- font-size: 14px;
75
-
76
- .el-x-filescard-name-prefix {
77
- flex: 0 1 auto;
78
- min-width: 0;
79
- overflow: hidden;
80
- text-overflow: ellipsis;
81
- white-space: nowrap;
82
- }
83
-
84
- .el-x-filescard-name-suffix {
85
- flex: none;
86
- }
87
- }
88
-
89
- .el-x-filescard-description {
90
- flex: none;
91
- min-width: 0;
92
- overflow: hidden;
93
- text-overflow: ellipsis;
94
- white-space: nowrap;
95
- color: rgba(0, 0, 0, 0.4);
96
- font-size: 12px;
97
- }
98
-
99
- .el-x-filescard-description-error {
100
- color: #ff4d4f;
101
- }
102
- }
103
-
104
- /* 遮罩层样式 */
105
- .image-preview-container {
106
- position: relative;
107
- padding: 0px;
108
- width: var(--elx-files-card-icon-size);
109
- height: var(--elx-files-card-icon-size);
110
- display: inline-block;
111
- border-radius: 8px;
112
- // overflow: hidden;
113
- transition: all 0.3s;
114
-
115
- .preview-mask {
116
- position: absolute;
117
- inset: 0;
118
- width: 100%;
119
- display: flex;
120
- justify-content: center;
121
- align-items: center;
122
- opacity: 0;
123
- background: rgba(0, 0, 0, 0.65);
124
- color: #fff;
125
- font-size: 10px;
126
- transition: opacity 0.3s;
127
-
128
- .el-icon-view {
129
- font-size: 10px;
130
- margin-right: 2px;
131
- display: flex;
132
- align-items: center;
133
- height: 100%;
134
- margin-top: 2px;
135
- }
136
-
137
- &:hover {
138
- opacity: 1;
139
- transition: opacity 0.3s;
140
- cursor: pointer;
141
- }
142
- }
143
- }
144
-
145
- .image-preview-container-square {
146
- .preview-mask {
147
- font-size: 14px;
148
-
149
- .el-icon-view {
150
- font-size: 12px;
151
- }
152
- }
153
- }
154
-
155
- // 正方形变体,加载中样式,不悬停直接展示
156
- .preview-mask-loading {
157
- position: absolute;
158
- inset: 0;
159
- width: 100%;
160
- display: flex;
161
- justify-content: center;
162
- align-items: center;
163
- background: rgba(0, 0, 0, 0.65);
164
- color: #fff;
165
- transition: all 0.3s;
166
-
167
- .circle-progress {
168
- width: 100% !important;
169
- height: 100% !important;
170
- display: flex;
171
- justify-content: center;
172
- align-items: center;
173
-
174
- .el-progress-circle {
175
- width: calc(100% - 12px) !important;
176
- height: calc(100% - 12px) !important;
177
-
178
- svg>path:nth-child(1) {
179
- stroke: rgba(255, 255, 255, 0.2);
180
- stroke-width: 8px;
181
- }
182
- }
183
-
184
- .el-progress__text {
185
- color: #fff;
186
- font-size: 14px;
187
- }
188
- }
189
- }
190
-
191
- // 正方形变体,加载中样式,不悬停直接展示
192
- .preview-mask-error {
193
- position: absolute;
194
- inset: 0;
195
- width: 100%;
196
- display: flex;
197
- justify-content: center;
198
- align-items: center;
199
- background: rgba(0, 0, 0, 0.5);
200
- font-size: 12px;
201
- transition: all 0.3s;
202
- color: #ff4d4f;
203
- // 溢出隐藏
204
- overflow: hidden;
205
- text-overflow: ellipsis;
206
- white-space: nowrap;
207
- }
208
-
209
- .el-image-viewer__progress {
210
- display: none;
211
- }
212
-
213
- /* 过渡动画样式 */
214
- .fade-enter-active,
215
- .fade-leave-active {
216
- transition: opacity 0.3s;
217
- }
218
-
219
- .fade-enter,
220
- .fade-leave-to {
221
- opacity: 0;
222
- }
@@ -1,197 +0,0 @@
1
- @import '../theme/var.scss';
2
-
3
- // 移动设备断点
4
- $--mobile-breakpoint: 768px;
5
-
6
- // Prompts 组件样式
7
- .el-x-prompts {
8
- max-width: 100%;
9
-
10
- &,
11
- & * {
12
- box-sizing: border-box;
13
- }
14
-
15
-
16
- // RTL 支持
17
- &.el-x-prompts-rtl {
18
- direction: rtl;
19
- }
20
-
21
- // 标题样式
22
- .el-x-prompts-title {
23
- font-weight: normal;
24
- font-size: $--el-x-font-size-medium;
25
- color: $--color-text-secondary;
26
- margin-top: 0;
27
- margin-bottom: 0.5em;
28
- }
29
-
30
- // 列表样式
31
- .el-x-prompts-list {
32
- display: flex;
33
- gap: $--el-x-padding-sm;
34
- overflow-x: auto;
35
- // 隐藏滚动条
36
- scrollbar-width: none;
37
- -ms-overflow-style: none;
38
-
39
- &::-webkit-scrollbar {
40
- display: none;
41
- }
42
-
43
- list-style: none;
44
- padding-left: 0;
45
- margin: 0;
46
- align-items: stretch;
47
-
48
- // 换行
49
- &-wrap {
50
- flex-wrap: wrap;
51
- }
52
-
53
- // 垂直排列
54
- &-vertical {
55
- flex-direction: column;
56
- align-items: flex-start;
57
- }
58
-
59
- // 移动设备响应式
60
- @media screen and (max-width: $--mobile-breakpoint) {
61
- flex-wrap: wrap;
62
- gap: 8px;
63
-
64
- &-wrap {
65
- justify-content: space-between;
66
- }
67
- }
68
- }
69
-
70
- // 项目样式
71
- .el-x-prompts-item {
72
- flex: none;
73
- display: flex;
74
- gap: 4px;
75
- height: auto;
76
- padding: $--el-x-padding-md $--el-x-padding-lg;
77
- align-items: flex-start;
78
- justify-content: flex-start;
79
- background: $--color-white;
80
- border-radius: $--el-x-border-radius-md;
81
- transition: border $--all-transition, background $--all-transition;
82
- border: $--border-width-base $--border-style-base $--border-color-lighter;
83
-
84
- // 移动设备响应式
85
- @media screen and (max-width: $--mobile-breakpoint) {
86
- width: calc(50% - 4px); // 小屏幕上默认两列布局
87
- min-width: 150px;
88
- padding: $--el-x-padding-sm $--el-x-padding-md;
89
-
90
- .el-x-prompts-list-wrap & {
91
- width: calc(50% - 4px);
92
- margin-bottom: 8px;
93
- }
94
-
95
- .el-x-prompts-list-vertical & {
96
- width: 100%;
97
- }
98
- }
99
-
100
- &:not(.el-x-prompts-item-has-nest) {
101
- &:hover {
102
- cursor: pointer;
103
- background: $--background-color-base;
104
- }
105
-
106
- &:active {
107
- background: $--color-primary-light-9;
108
- }
109
- }
110
-
111
- // 内容样式
112
- .el-x-prompts-content {
113
- flex: auto;
114
- min-width: 0;
115
- display: flex;
116
- gap: 4px;
117
- flex-direction: column;
118
- align-items: flex-start;
119
-
120
- // 移动设备响应式
121
- @media screen and (max-width: $--mobile-breakpoint) {
122
- width: 100%;
123
- gap: 2px;
124
- }
125
- }
126
-
127
- // 图标、标签和描述共同样式
128
- .el-x-prompts-icon,
129
- .el-x-prompts-label,
130
- .el-x-prompts-desc {
131
- margin: 0;
132
- padding: 0;
133
- font-size: $--el-x-font-size-base;
134
- line-height: $--el-x-font-line-height-primary;
135
- text-align: start;
136
- white-space: normal;
137
-
138
- // 移动设备响应式
139
- @media screen and (max-width: $--mobile-breakpoint) {
140
- font-size: 14px;
141
- line-height: 1.4;
142
- overflow: hidden;
143
- text-overflow: ellipsis;
144
- display: -webkit-box;
145
- -webkit-line-clamp: 2;
146
- -webkit-box-orient: vertical;
147
- }
148
- }
149
-
150
- // 标签样式
151
- .el-x-prompts-label {
152
- color: $--color-text-primary;
153
- font-weight: 500;
154
- }
155
-
156
- // 描述样式
157
- .el-x-prompts-label+.el-x-prompts-desc {
158
- color: $--color-text-secondary;
159
- }
160
-
161
- // 禁用状态
162
- &.el-x-prompts-item-disabled {
163
- pointer-events: none;
164
- background: $--background-color-base;
165
-
166
- .el-x-prompts-label,
167
- .el-x-prompts-desc {
168
- color: $--color-text-secondary;
169
- }
170
- }
171
- }
172
-
173
- // 嵌套样式
174
- .el-x-prompts-item-has-nest {
175
- >.el-x-prompts-content {
176
- >.el-x-prompts-label {
177
- font-size: $--font-size-large;
178
- line-height: $--font-line-height-primary;
179
- }
180
- }
181
- }
182
-
183
- // 嵌套组件样式
184
- &.el-x-prompts-nested {
185
- margin-top: 5px;
186
- align-self: stretch;
187
-
188
- .el-x-prompts-list {
189
- align-items: stretch;
190
- }
191
-
192
- .el-x-prompts-item {
193
- border: 0;
194
- background: $--background-color-base;
195
- }
196
- }
197
- }
@@ -1,211 +0,0 @@
1
- @import '../theme/var.scss';
2
-
3
- // 设置全局CSS变量默认值
4
- // :root {
5
- // --el-x-sender-trigger-popover-width: fit-content;
6
- // --el-x-sender-trigger-popover-left: 0px;
7
- // }
8
-
9
- $--el-x-sender-box-shadow-tertiary: 0 1px 2px 0 rgba(0, 0, 0, 0.03),
10
- 0 1px 6px -1px rgba(0, 0, 0, 0.02),
11
- 0 2px 4px 0 rgba(0, 0, 0, 0.02);
12
- $--el-x-sender-input-font-size: 14px;
13
- // $--el-x-sender-header-animation-duration: 300ms;
14
- $--el-x-border-width: $--border-width-base;
15
- $--el-x-padding-xs: 8px;
16
- $--el-x-padding-sm: 12px;
17
- $--el-x-padding: 16px;
18
- $--el-x-transition-duration: 0.3s;
19
- $--el-x-color-primary: $--color-primary;
20
- $--el-x-color-white: $--color-white;
21
- $--el-x-box-shadow: $--box-shadow-base;
22
- $--el-x-border-color: $--border-color-base;
23
- $--el-x-text-color-primary: $--color-text-primary;
24
- $--el-x-font-line-height-primary: $--font-line-height-primary;
25
- $--el-x-fill-color: $--background-color-base;
26
-
27
- .el-x-sender {
28
- width: 100%;
29
- display: flex;
30
- flex-direction: column;
31
-
32
- position: relative;
33
- box-sizing: border-box;
34
- box-shadow: $--el-x-sender-box-shadow-tertiary;
35
- transition: background $--el-x-transition-duration;
36
- border-radius: calc(#{$--border-radius-base} * 2);
37
- border-color: $--el-x-border-color;
38
- border-width: 0;
39
- border-style: solid;
40
- transition: width var(--el-x-sender-header-animation-duration);
41
-
42
- &:after {
43
- content: '';
44
- position: absolute;
45
- top: 0;
46
- right: 0;
47
- bottom: 0;
48
- left: 0;
49
- pointer-events: none;
50
- transition: border-color $--el-x-transition-duration;
51
- border-radius: inherit;
52
- border-style: inherit;
53
- border-color: inherit;
54
- border-width: $--el-x-border-width;
55
- }
56
-
57
- &:focus-within {
58
- box-shadow: $--el-x-box-shadow;
59
- border-color: $--el-x-color-primary;
60
-
61
- &::after {
62
- border-width: 2px;
63
- }
64
- }
65
-
66
- .el-x-sender-header-wrap {
67
- display: flex;
68
- flex-direction: column;
69
- gap: $--el-x-padding-xs;
70
- width: 100%;
71
- margin: 0;
72
- padding: 0;
73
- }
74
-
75
- // 展开收起动画 - calc-size:解决无法对某些非固定尺寸(如 auto、min-content、max-content 等)进行动画过渡的新特性
76
- .slide-enter-active,
77
- .slide-leave-active {
78
- height: calc-size(max-content, size);
79
- opacity: 1;
80
- transition:
81
- height var(--el-x-sender-header-animation-duration),
82
- opacity var(--el-x-sender-header-animation-duration),
83
- border var(--el-x-sender-header-animation-duration);
84
- overflow: hidden;
85
- }
86
-
87
- .slide-enter,
88
- .slide-leave-to {
89
- height: 0;
90
- opacity: 0 !important;
91
- }
92
-
93
- .slide-enter-to,
94
- .slide-leave {
95
- height: calc-size(max-content, size);
96
- opacity: 1;
97
- }
98
-
99
- // 确保内部内容能够正确收缩
100
- .slide-enter-active .el-x-sender-header-wrap,
101
- .slide-leave-active .el-x-sender-header-wrap {
102
- min-height: 0;
103
- overflow: hidden;
104
- }
105
-
106
- .el-x-sender-header {
107
- border-bottom-width: $--el-x-border-width;
108
- border-bottom-style: solid;
109
- border-bottom-color: $--el-x-border-color;
110
- }
111
-
112
- .el-x-sender-content {
113
- display: flex;
114
- gap: $--el-x-padding-xs;
115
- width: 100%;
116
- padding-top: $--el-x-padding-sm;
117
- padding-bottom: $--el-x-padding-sm;
118
- padding-left: $--el-x-padding;
119
- padding-right: $--el-x-padding-sm;
120
- box-sizing: border-box;
121
- align-items: flex-end;
122
-
123
- // 前缀
124
- .el-x-sender-prefix {
125
- flex: none;
126
- }
127
-
128
- // 输入框
129
- .el-x-sender-input {
130
- height: 100%;
131
- display: flex;
132
- align-items: center;
133
- align-self: center;
134
-
135
- ::v-deep .el-textarea__inner {
136
- padding: 0 !important;
137
- margin: 0;
138
- color: $--el-x-text-color-primary;
139
- font-size: $--el-x-sender-input-font-size;
140
- line-height: $--el-x-font-line-height-primary;
141
- list-style: none;
142
- position: relative;
143
- display: inline-block;
144
- box-sizing: border-box;
145
- width: 100%;
146
- min-width: 0;
147
- max-width: 100%;
148
- height: auto;
149
- min-height: auto !important;
150
- border-radius: 0;
151
- border: none;
152
- flex: auto;
153
- align-self: center;
154
- vertical-align: bottom;
155
- resize: none;
156
- background-color: transparent;
157
- transition: all $--el-x-transition-duration, height 0s;
158
- box-shadow: none !important;
159
- }
160
- }
161
-
162
- // 操作列表
163
- .el-x-sender-action-list-presets {
164
- display: flex;
165
- gap: $--el-x-padding-xs;
166
- flex-direction: row-reverse;
167
- }
168
- }
169
-
170
- // 变体样式 --variant
171
- .content-variant-updown {
172
- display: flex;
173
- flex-direction: column;
174
- align-items: initial;
175
-
176
- .el-x-sender-updown-wrap {
177
- display: flex;
178
- justify-content: space-between;
179
- gap: 8px;
180
-
181
- // 前缀
182
- .el-x-sender-prefix {
183
- flex: initial;
184
- }
185
-
186
- .el-x-sender-action-list {
187
- margin-left: auto;
188
- }
189
- }
190
- }
191
-
192
- // 底部容器
193
- .el-x-sender-footer {
194
- border-top-width: $--el-x-border-width;
195
- border-top-style: solid;
196
- border-top-color: $--el-x-border-color;
197
- }
198
- }
199
-
200
- .el-x-sender-disabled {
201
- background-color: $--el-x-fill-color;
202
- pointer-events: none;
203
- }
204
-
205
- ::v-deep .el-x-sender-trigger-popover {
206
- max-width: calc(100% - 54px) !important;
207
-
208
- // 应用自定义变量(如果存在)
209
- width: var(--el-x-sender-trigger-popover-width) !important;
210
- margin-left: var(--el-x-sender-trigger-popover-left) !important;
211
- }