persagy-vant 0.0.27 → 0.0.28

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 (163) hide show
  1. package/es/cascader/Cascader.d.ts +1 -1
  2. package/es/cascader/index.d.ts +1 -1
  3. package/es/coupon-list/style/index.mjs +1 -1
  4. package/es/coupon-list/style/less.mjs +1 -1
  5. package/es/index.d.ts +2 -2
  6. package/es/index.mjs +4 -4
  7. package/es/label/Label.d.ts +92 -0
  8. package/es/label/Label.mjs +95 -0
  9. package/es/label/index.css +1 -0
  10. package/es/label/index.d.ts +64 -0
  11. package/es/label/index.less +113 -0
  12. package/es/label/index.mjs +8 -0
  13. package/es/label/style/index.mjs +6 -0
  14. package/es/label/style/less.mjs +6 -0
  15. package/es/label/var.less +11 -0
  16. package/es/location-select/style/index.mjs +1 -1
  17. package/es/location-select/style/less.mjs +1 -1
  18. package/es/material-add/MaterialAdd.d.ts +105 -1
  19. package/es/material-add/MaterialAdd.mjs +63 -23
  20. package/es/material-add/index.d.ts +73 -1
  21. package/es/quantity-input/QuantityInput.d.ts +1 -1
  22. package/es/quantity-input/index.d.ts +2 -2
  23. package/es/radio-panel/RadioPanel.d.ts +46 -1
  24. package/es/radio-panel/RadioPanel.mjs +115 -29
  25. package/es/radio-panel/index.css +1 -1
  26. package/es/radio-panel/index.d.ts +35 -1
  27. package/es/radio-panel/index.less +17 -0
  28. package/es/radio-panel/style/index.mjs +4 -0
  29. package/es/radio-panel/style/less.mjs +4 -0
  30. package/es/sticky/Sticky.d.ts +1 -1
  31. package/es/sticky/index.d.ts +1 -1
  32. package/es/tabs/TabsTitle.mjs +1 -0
  33. package/es/tabs/index.css +1 -1
  34. package/es/tabs/index.less +11 -0
  35. package/es/tag/Tag.d.ts +1 -1
  36. package/es/tag/index.css +1 -1
  37. package/es/tag/index.less +7 -0
  38. package/es/tag/var.less +3 -0
  39. package/lib/cascader/Cascader.d.ts +1 -1
  40. package/lib/cascader/index.d.ts +1 -1
  41. package/lib/coupon-list/style/index.js +1 -1
  42. package/lib/coupon-list/style/less.js +1 -1
  43. package/lib/index.css +1 -1
  44. package/lib/index.d.ts +2 -2
  45. package/lib/index.js +4 -4
  46. package/lib/index.less +6 -6
  47. package/lib/label/Label.d.ts +92 -0
  48. package/lib/label/Label.js +114 -0
  49. package/lib/label/index.css +1 -0
  50. package/lib/label/index.d.ts +64 -0
  51. package/lib/{bot-mobile/session-filter.js → label/index.js} +16 -13
  52. package/lib/label/index.less +113 -0
  53. package/lib/label/style/index.js +6 -0
  54. package/lib/label/style/less.js +6 -0
  55. package/lib/label/var.less +11 -0
  56. package/lib/location-select/style/index.js +1 -1
  57. package/lib/location-select/style/less.js +1 -1
  58. package/lib/material-add/MaterialAdd.d.ts +105 -1
  59. package/lib/material-add/MaterialAdd.js +63 -23
  60. package/lib/material-add/index.d.ts +73 -1
  61. package/lib/quantity-input/QuantityInput.d.ts +1 -1
  62. package/lib/quantity-input/index.d.ts +2 -2
  63. package/lib/radio-panel/RadioPanel.d.ts +46 -1
  64. package/lib/radio-panel/RadioPanel.js +114 -28
  65. package/lib/radio-panel/index.css +1 -1
  66. package/lib/radio-panel/index.d.ts +35 -1
  67. package/lib/radio-panel/index.less +17 -0
  68. package/lib/radio-panel/style/index.js +4 -0
  69. package/lib/radio-panel/style/less.js +4 -0
  70. package/lib/sticky/Sticky.d.ts +1 -1
  71. package/lib/sticky/index.d.ts +1 -1
  72. package/lib/tabs/TabsTitle.js +1 -0
  73. package/lib/tabs/index.css +1 -1
  74. package/lib/tabs/index.less +11 -0
  75. package/lib/tag/Tag.d.ts +1 -1
  76. package/lib/tag/index.css +1 -1
  77. package/lib/tag/index.less +7 -0
  78. package/lib/tag/var.less +3 -0
  79. package/lib/vant.cjs.js +1212 -1769
  80. package/lib/vant.es.js +1212 -1769
  81. package/lib/vant.js +13016 -24376
  82. package/lib/vant.min.js +1 -1
  83. package/lib/web-types.json +1 -1
  84. package/package.json +4 -4
  85. package/es/bot-mobile/BotFab.d.ts +0 -72
  86. package/es/bot-mobile/BotFab.mjs +0 -152
  87. package/es/bot-mobile/BotHistoryDrawer.d.ts +0 -72
  88. package/es/bot-mobile/BotHistoryDrawer.mjs +0 -97
  89. package/es/bot-mobile/BotMobile.d.ts +0 -83
  90. package/es/bot-mobile/BotMobile.mjs +0 -47
  91. package/es/bot-mobile/BotMobileContextTags.d.ts +0 -52
  92. package/es/bot-mobile/BotMobileContextTags.mjs +0 -52
  93. package/es/bot-mobile/BotMobilePrompts.d.ts +0 -54
  94. package/es/bot-mobile/BotMobilePrompts.mjs +0 -49
  95. package/es/bot-mobile/BotMobileSheet.d.ts +0 -92
  96. package/es/bot-mobile/BotMobileSheet.mjs +0 -50
  97. package/es/bot-mobile/BotMobileView.d.ts +0 -82
  98. package/es/bot-mobile/BotMobileView.mjs +0 -45
  99. package/es/bot-mobile/BotSessionList.d.ts +0 -71
  100. package/es/bot-mobile/BotSessionList.mjs +0 -99
  101. package/es/bot-mobile/BotVoiceBar.d.ts +0 -80
  102. package/es/bot-mobile/BotVoiceBar.mjs +0 -138
  103. package/es/bot-mobile/fab-position.d.ts +0 -9
  104. package/es/bot-mobile/fab-position.mjs +0 -10
  105. package/es/bot-mobile/fab-position.test.d.ts +0 -1
  106. package/es/bot-mobile/fab-position.test.mjs +0 -29
  107. package/es/bot-mobile/index.css +0 -1
  108. package/es/bot-mobile/index.d.ts +0 -469
  109. package/es/bot-mobile/index.less +0 -464
  110. package/es/bot-mobile/index.mjs +0 -50
  111. package/es/bot-mobile/session-filter.d.ts +0 -6
  112. package/es/bot-mobile/session-filter.mjs +0 -15
  113. package/es/bot-mobile/session-item.d.ts +0 -15
  114. package/es/bot-mobile/session-item.mjs +0 -73
  115. package/es/bot-mobile/style/index.mjs +0 -15
  116. package/es/bot-mobile/style/less.mjs +0 -15
  117. package/es/bot-mobile/types.d.ts +0 -23
  118. package/es/bot-mobile/types.mjs +0 -0
  119. package/es/bot-mobile/var.less +0 -58
  120. package/es/bot-mobile/voice-zone.d.ts +0 -6
  121. package/es/bot-mobile/voice-zone.mjs +0 -6
  122. package/es/bot-mobile/voice-zone.test.d.ts +0 -1
  123. package/es/bot-mobile/voice-zone.test.mjs +0 -19
  124. package/lib/bot-mobile/BotFab.d.ts +0 -72
  125. package/lib/bot-mobile/BotFab.js +0 -171
  126. package/lib/bot-mobile/BotHistoryDrawer.d.ts +0 -72
  127. package/lib/bot-mobile/BotHistoryDrawer.js +0 -116
  128. package/lib/bot-mobile/BotMobile.d.ts +0 -83
  129. package/lib/bot-mobile/BotMobile.js +0 -66
  130. package/lib/bot-mobile/BotMobileContextTags.d.ts +0 -52
  131. package/lib/bot-mobile/BotMobileContextTags.js +0 -71
  132. package/lib/bot-mobile/BotMobilePrompts.d.ts +0 -54
  133. package/lib/bot-mobile/BotMobilePrompts.js +0 -68
  134. package/lib/bot-mobile/BotMobileSheet.d.ts +0 -92
  135. package/lib/bot-mobile/BotMobileSheet.js +0 -79
  136. package/lib/bot-mobile/BotMobileView.d.ts +0 -82
  137. package/lib/bot-mobile/BotMobileView.js +0 -64
  138. package/lib/bot-mobile/BotSessionList.d.ts +0 -71
  139. package/lib/bot-mobile/BotSessionList.js +0 -118
  140. package/lib/bot-mobile/BotVoiceBar.d.ts +0 -80
  141. package/lib/bot-mobile/BotVoiceBar.js +0 -157
  142. package/lib/bot-mobile/fab-position.d.ts +0 -9
  143. package/lib/bot-mobile/fab-position.js +0 -29
  144. package/lib/bot-mobile/fab-position.test.d.ts +0 -1
  145. package/lib/bot-mobile/fab-position.test.js +0 -29
  146. package/lib/bot-mobile/index.css +0 -1
  147. package/lib/bot-mobile/index.d.ts +0 -469
  148. package/lib/bot-mobile/index.js +0 -79
  149. package/lib/bot-mobile/index.less +0 -464
  150. package/lib/bot-mobile/session-filter.d.ts +0 -6
  151. package/lib/bot-mobile/session-item.d.ts +0 -15
  152. package/lib/bot-mobile/session-item.js +0 -92
  153. package/lib/bot-mobile/style/index.js +0 -15
  154. package/lib/bot-mobile/style/less.js +0 -15
  155. package/lib/bot-mobile/types.d.ts +0 -23
  156. package/lib/bot-mobile/types.js +0 -15
  157. package/lib/bot-mobile/var.less +0 -58
  158. package/lib/bot-mobile/voice-zone.d.ts +0 -6
  159. package/lib/bot-mobile/voice-zone.js +0 -25
  160. package/lib/bot-mobile/voice-zone.test.d.ts +0 -1
  161. package/lib/bot-mobile/voice-zone.test.js +0 -19
  162. /package/es/{bot-mobile → label}/var.css +0 -0
  163. /package/lib/{bot-mobile → label}/var.css +0 -0
@@ -1,464 +0,0 @@
1
- @import './var.less';
2
-
3
- :root {
4
- --van-bot-mobile-primary-color: @bot-mobile-primary-color;
5
- --van-bot-mobile-text-color: @bot-mobile-text-color;
6
- --van-bot-mobile-border-color: @bot-mobile-border-color;
7
- --van-bot-mobile-background-color: @bot-mobile-background-color;
8
- --van-bot-mobile-prompts-title-color: @bot-mobile-prompts-title-color;
9
- --van-bot-mobile-prompts-title-font-size: @bot-mobile-prompts-title-font-size;
10
- --van-bot-mobile-prompts-item-background: @bot-mobile-prompts-item-background;
11
- --van-bot-mobile-prompts-item-border-color: @bot-mobile-prompts-item-border-color;
12
- --van-bot-mobile-prompts-item-active-background: @bot-mobile-prompts-item-active-background;
13
- --van-bot-mobile-prompts-item-selected-background: @bot-mobile-prompts-item-selected-background;
14
- --van-bot-mobile-prompts-item-selected-border-color: @bot-mobile-prompts-item-selected-border-color;
15
- --van-bot-mobile-prompts-item-selected-color: @bot-mobile-prompts-item-selected-color;
16
- --van-bot-mobile-prompts-item-title-color: @bot-mobile-prompts-item-title-color;
17
- --van-bot-mobile-prompts-item-desc-color: @bot-mobile-prompts-item-desc-color;
18
- --van-bot-mobile-context-tags-gap: @bot-mobile-context-tags-gap;
19
- --van-bot-mobile-context-tags-padding: @bot-mobile-context-tags-padding;
20
- --van-bot-mobile-context-tags-font-size: @bot-mobile-context-tags-font-size;
21
- --van-bot-mobile-context-tags-line-height: @bot-mobile-context-tags-line-height;
22
- --van-bot-mobile-context-tags-border-radius: @bot-mobile-context-tags-border-radius;
23
- --van-bot-mobile-context-tags-color: @bot-mobile-context-tags-color;
24
- --van-bot-mobile-context-tags-background-color: @bot-mobile-context-tags-background-color;
25
- --van-bot-mobile-context-tags-selected-color: @bot-mobile-context-tags-selected-color;
26
- --van-bot-mobile-context-tags-selected-background-color: @bot-mobile-context-tags-selected-background-color;
27
- --van-bot-mobile-context-tags-active-opacity: @bot-mobile-context-tags-active-opacity;
28
- --van-bot-mobile-sheet-height: @bot-mobile-sheet-height;
29
- --van-bot-mobile-fab-size: @bot-mobile-fab-size;
30
- --van-bot-mobile-fab-z-index: @bot-mobile-fab-z-index;
31
- --van-bot-mobile-fab-color: @bot-mobile-fab-color;
32
- --van-bot-mobile-fab-background: @bot-mobile-fab-background;
33
- --van-bot-mobile-fab-shadow: @bot-mobile-fab-shadow;
34
- --van-bot-mobile-session-item-active-background: @bot-mobile-session-item-active-background;
35
- --van-bot-mobile-session-item-name-color: @bot-mobile-session-item-name-color;
36
- --van-bot-mobile-session-item-meta-color: @bot-mobile-session-item-meta-color;
37
- --van-bot-mobile-session-item-action-color: @bot-mobile-session-item-action-color;
38
- --van-bot-mobile-session-item-danger-color: @bot-mobile-session-item-danger-color;
39
- --van-bot-mobile-history-drawer-header-height: @bot-mobile-history-drawer-header-height;
40
- --van-bot-mobile-history-drawer-title-color: @bot-mobile-history-drawer-title-color;
41
- --van-bot-mobile-voice-bar-height: @bot-mobile-voice-bar-height;
42
- --van-bot-mobile-voice-bar-background: @bot-mobile-voice-bar-background;
43
- --van-bot-mobile-voice-bar-border-color: @bot-mobile-voice-bar-border-color;
44
- --van-bot-mobile-voice-bar-recording-background: @bot-mobile-voice-bar-recording-background;
45
- --van-bot-mobile-voice-bar-cancel-zone-background: @bot-mobile-voice-bar-cancel-zone-background;
46
- --van-bot-mobile-voice-bar-elapsed-color: @bot-mobile-voice-bar-elapsed-color;
47
- --van-bot-mobile-voice-bar-hint-color: @bot-mobile-voice-bar-hint-color;
48
- --van-bot-mobile-voice-bar-wave-color: @bot-mobile-voice-bar-wave-color;
49
- --van-bot-mobile-session-list-toolbar-padding: @bot-mobile-session-list-toolbar-padding;
50
- --van-bot-mobile-session-list-create-color: @bot-mobile-session-list-create-color;
51
- }
52
-
53
- // 宿主 vant token → meos-bot-web .bot-card token 映射(可被 ConfigProvider 换肤)
54
- // BotMobileView(纯展示版主组件)与 BotMobile(开箱连网关版)共用同一段 token 映射
55
- .van-bot-mobile,
56
- .van-bot-mobile-view {
57
- width: 100%;
58
- height: 100%;
59
-
60
- .bot-card {
61
- --primary-color: var(--van-bot-mobile-primary-color);
62
- --accent: var(--van-bot-mobile-primary-color);
63
- --ink-1: var(--van-bot-mobile-text-color);
64
- --line: var(--van-bot-mobile-border-color);
65
- --gray-0: var(--van-bot-mobile-background-color);
66
- }
67
- }
68
-
69
- // 示例输入 chips:竖向列表卡片式,标题一行 + prompt 摘要一行
70
- .van-bot-mobile-prompts {
71
- width: 100%;
72
-
73
- &__title {
74
- margin-bottom: 8px;
75
- color: var(--van-bot-mobile-prompts-title-color);
76
- font-size: var(--van-bot-mobile-prompts-title-font-size);
77
- line-height: 1.4;
78
- }
79
-
80
- &__list {
81
- display: flex;
82
- flex-direction: column;
83
- gap: 8px;
84
- }
85
-
86
- &__item {
87
- box-sizing: border-box;
88
- display: flex;
89
- flex-direction: column;
90
- justify-content: center;
91
- gap: 4px;
92
- min-height: 44px;
93
- padding: 8px 12px;
94
- background: var(--van-bot-mobile-prompts-item-background);
95
- border: 1px solid var(--van-bot-mobile-prompts-item-border-color);
96
- border-radius: 8px;
97
- cursor: pointer;
98
-
99
- &:active {
100
- background: var(--van-bot-mobile-prompts-item-active-background);
101
- }
102
-
103
- // 触屏无 hover:选中态是点击后唯一的持久反馈,需明显可辨
104
- &--active {
105
- background: var(--van-bot-mobile-prompts-item-selected-background);
106
- border-color: var(--van-bot-mobile-prompts-item-selected-border-color);
107
-
108
- .van-bot-mobile-prompts__item-title {
109
- color: var(--van-bot-mobile-prompts-item-selected-color);
110
- font-weight: var(--van-font-weight-bold);
111
- }
112
- }
113
- }
114
-
115
- &__item-title {
116
- color: var(--van-bot-mobile-prompts-item-title-color);
117
- font-size: var(--van-font-size-md);
118
- font-weight: 500;
119
- line-height: 1.4;
120
- }
121
-
122
- &__item-desc {
123
- overflow: hidden;
124
- color: var(--van-bot-mobile-prompts-item-desc-color);
125
- font-size: var(--van-bot-mobile-prompts-title-font-size);
126
- line-height: 1.4;
127
- text-overflow: ellipsis;
128
- white-space: nowrap;
129
- }
130
- }
131
-
132
- // 90% 高呼出面板:内嵌 BotMobile 撑满剩余高度
133
- .van-bot-mobile-sheet {
134
- height: var(--van-bot-mobile-sheet-height);
135
-
136
- .van-bot-mobile {
137
- display: flex;
138
- flex-direction: column;
139
- height: 100%;
140
-
141
- .bot-card {
142
- flex: 1;
143
- min-height: 0;
144
- }
145
- }
146
- }
147
-
148
- // 上下文标签行:横向滚动一行,不换行,命中区 ≥44px,选中态对照 FilterTag
149
- .van-bot-mobile-context-tags {
150
- display: flex;
151
- flex-wrap: nowrap;
152
- gap: var(--van-bot-mobile-context-tags-gap);
153
- width: 100%;
154
- overflow-x: auto;
155
- -webkit-overflow-scrolling: touch;
156
-
157
- &__item {
158
- box-sizing: border-box;
159
- display: flex;
160
- flex: none;
161
- align-items: center;
162
- justify-content: center;
163
- min-height: 44px;
164
- padding: var(--van-bot-mobile-context-tags-padding);
165
- color: var(--van-bot-mobile-context-tags-color);
166
- font-size: var(--van-bot-mobile-context-tags-font-size);
167
- line-height: var(--van-bot-mobile-context-tags-line-height);
168
- white-space: nowrap;
169
- background: var(--van-bot-mobile-context-tags-background-color);
170
- border-radius: var(--van-bot-mobile-context-tags-border-radius);
171
- cursor: pointer;
172
-
173
- &:active {
174
- opacity: var(--van-bot-mobile-context-tags-active-opacity);
175
- }
176
-
177
- &--selected {
178
- color: var(--van-bot-mobile-context-tags-selected-color);
179
- background: var(--van-bot-mobile-context-tags-selected-background-color);
180
- }
181
- }
182
- }
183
-
184
- // 可拖拽吸边浮标:position: fixed 由组件内联 style 控制 top/left/right,
185
- // 这里只负责外观;拖拽中禁用过渡以避免位置跳变的动画干扰手势
186
- .van-bot-mobile-fab {
187
- position: fixed;
188
- z-index: var(--van-bot-mobile-fab-z-index);
189
- box-sizing: border-box;
190
- display: flex;
191
- align-items: center;
192
- justify-content: center;
193
- width: var(--van-bot-mobile-fab-size);
194
- height: var(--van-bot-mobile-fab-size);
195
- color: var(--van-bot-mobile-fab-color);
196
- background: var(--van-bot-mobile-fab-background);
197
- border-radius: 50%;
198
- box-shadow: var(--van-bot-mobile-fab-shadow);
199
- cursor: pointer;
200
- touch-action: none;
201
- transition: left 0.25s ease, right 0.25s ease, top 0.25s ease;
202
-
203
- &--dragging {
204
- transition: none;
205
- }
206
-
207
- &__icon {
208
- font-size: 24px;
209
- }
210
- }
211
-
212
- // 会话历史全屏抽屉:Popup(position=right) 撑满视口
213
- .van-bot-mobile-history-drawer {
214
- box-sizing: border-box;
215
- display: flex;
216
- flex-direction: column;
217
- width: 100%;
218
- height: 100%;
219
- overflow: hidden;
220
-
221
- &__header {
222
- box-sizing: border-box;
223
- display: flex;
224
- flex: none;
225
- align-items: center;
226
- justify-content: space-between;
227
- height: var(--van-bot-mobile-history-drawer-header-height);
228
- padding: 0 16px;
229
- border-bottom: 1px solid var(--van-bot-mobile-border-color);
230
- }
231
-
232
- &__close,
233
- &__create {
234
- display: flex;
235
- align-items: center;
236
- justify-content: center;
237
- min-width: 44px;
238
- min-height: 44px;
239
- font-size: 20px;
240
- cursor: pointer;
241
- }
242
-
243
- &__title {
244
- overflow: hidden;
245
- color: var(--van-bot-mobile-history-drawer-title-color);
246
- font-size: var(--van-font-size-lg);
247
- font-weight: 500;
248
- text-align: center;
249
- text-overflow: ellipsis;
250
- white-space: nowrap;
251
- }
252
-
253
- &__search {
254
- flex: none;
255
- }
256
-
257
- &__list {
258
- flex: 1;
259
- min-height: 0;
260
- overflow-y: auto;
261
- -webkit-overflow-scrolling: touch;
262
- }
263
- }
264
-
265
- // 会话行公共样式:BotHistoryDrawer 与 BotSessionList 共用,避免两份重复
266
- .van-bot-mobile-session-item {
267
- box-sizing: border-box;
268
- display: flex;
269
- align-items: center;
270
- min-height: 44px;
271
- padding: 8px 16px;
272
- border-bottom: 1px solid var(--van-bot-mobile-border-color);
273
-
274
- &--active {
275
- background: var(--van-bot-mobile-session-item-active-background);
276
- }
277
-
278
- &__body {
279
- display: flex;
280
- flex: 1;
281
- flex-direction: column;
282
- justify-content: center;
283
- min-width: 0;
284
- min-height: 44px;
285
- cursor: pointer;
286
- }
287
-
288
- &__name {
289
- overflow: hidden;
290
- color: var(--van-bot-mobile-session-item-name-color);
291
- font-size: var(--van-font-size-md);
292
- line-height: 1.4;
293
- text-overflow: ellipsis;
294
- white-space: nowrap;
295
- }
296
-
297
- &__meta {
298
- display: flex;
299
- gap: 8px;
300
- overflow: hidden;
301
- color: var(--van-bot-mobile-session-item-meta-color);
302
- font-size: var(--van-font-size-sm);
303
- line-height: 1.4;
304
- }
305
-
306
- &__preview {
307
- overflow: hidden;
308
- text-overflow: ellipsis;
309
- white-space: nowrap;
310
- }
311
-
312
- &__time {
313
- flex: none;
314
- }
315
-
316
- &__input {
317
- flex: 1;
318
- box-sizing: border-box;
319
- min-height: 44px;
320
- padding: 0 8px;
321
- color: var(--van-bot-mobile-session-item-name-color);
322
- font-size: var(--van-font-size-md);
323
- background: var(--van-background-color);
324
- border: 1px solid var(--van-bot-mobile-primary-color);
325
- border-radius: var(--van-border-radius-md);
326
- outline: none;
327
- }
328
-
329
- // 触屏无 hover:常显,不依赖 :hover
330
- &__actions {
331
- display: flex;
332
- flex: none;
333
- gap: 4px;
334
- margin-left: 8px;
335
- }
336
-
337
- &__action {
338
- display: flex;
339
- align-items: center;
340
- justify-content: center;
341
- min-width: 44px;
342
- min-height: 44px;
343
- color: var(--van-bot-mobile-session-item-action-color);
344
- font-size: 18px;
345
- cursor: pointer;
346
-
347
- &--danger {
348
- color: var(--van-bot-mobile-session-item-danger-color);
349
- }
350
- }
351
- }
352
-
353
- // 按住说话条:受控组件,state/amplitudes 均由宿主传入;拖拽中禁用文本选中,
354
- // touch-action: none 避免触屏滚动干扰上滑取消手势
355
- .van-bot-mobile-voice-bar {
356
- box-sizing: border-box;
357
- display: flex;
358
- align-items: center;
359
- justify-content: center;
360
- height: var(--van-bot-mobile-voice-bar-height);
361
- padding: 0 16px;
362
- background: var(--van-bot-mobile-voice-bar-background);
363
- border: 1px solid var(--van-bot-mobile-voice-bar-border-color);
364
- border-radius: var(--van-border-radius-lg);
365
- cursor: pointer;
366
- touch-action: none;
367
- user-select: none;
368
-
369
- &--recording {
370
- background: var(--van-bot-mobile-voice-bar-recording-background);
371
- }
372
-
373
- &--cancel-zone {
374
- background: var(--van-bot-mobile-voice-bar-cancel-zone-background);
375
- }
376
-
377
- &__wave {
378
- width: 100%;
379
- height: 32px;
380
- color: var(--van-bot-mobile-voice-bar-wave-color);
381
- }
382
-
383
- &__info {
384
- display: flex;
385
- align-items: center;
386
- justify-content: center;
387
- gap: 8px;
388
- margin-top: 2px;
389
- }
390
-
391
- &__elapsed {
392
- color: var(--van-bot-mobile-voice-bar-elapsed-color);
393
- font-size: var(--van-font-size-sm);
394
- }
395
-
396
- &__hint {
397
- color: var(--van-bot-mobile-voice-bar-hint-color);
398
- font-size: var(--van-font-size-sm);
399
- }
400
-
401
- &__transcribing {
402
- display: flex;
403
- align-items: center;
404
- gap: 8px;
405
- }
406
-
407
- &__transcribing-text {
408
- color: var(--van-bot-mobile-voice-bar-hint-color);
409
- font-size: var(--van-font-size-sm);
410
- }
411
- }
412
-
413
- // 全部会话页:块级组件,无 Popup 外壳,可直接放进路由页;列表项样式复用
414
- // .van-bot-mobile-session-item(见上),这里只负责工具条 + 空态/加载态外观
415
- .van-bot-mobile-session-list {
416
- display: flex;
417
- flex-direction: column;
418
- width: 100%;
419
- height: 100%;
420
-
421
- &__toolbar {
422
- box-sizing: border-box;
423
- display: flex;
424
- flex: none;
425
- align-items: center;
426
- gap: 8px;
427
- padding: var(--van-bot-mobile-session-list-toolbar-padding);
428
- }
429
-
430
- &__search {
431
- flex: 1;
432
- }
433
-
434
- &__create {
435
- display: flex;
436
- flex: none;
437
- align-items: center;
438
- justify-content: center;
439
- min-width: 44px;
440
- min-height: 44px;
441
- color: var(--van-bot-mobile-session-list-create-color);
442
- font-size: 20px;
443
- cursor: pointer;
444
- }
445
-
446
- &__list {
447
- flex: 1;
448
- min-height: 0;
449
- overflow-y: auto;
450
- -webkit-overflow-scrolling: touch;
451
- }
452
-
453
- &__loading {
454
- display: flex;
455
- flex: 1;
456
- align-items: center;
457
- justify-content: center;
458
- padding: 32px 0;
459
- }
460
-
461
- &__empty {
462
- flex: 1;
463
- }
464
- }
@@ -1,50 +0,0 @@
1
- import { withInstall } from "../utils/index.mjs";
2
- import _BotMobile from "./BotMobile.mjs";
3
- import _BotMobilePrompts from "./BotMobilePrompts.mjs";
4
- import _BotMobileContextTags from "./BotMobileContextTags.mjs";
5
- import _BotMobileSheet from "./BotMobileSheet.mjs";
6
- import _BotMobileView from "./BotMobileView.mjs";
7
- import _BotFab from "./BotFab.mjs";
8
- import _BotHistoryDrawer from "./BotHistoryDrawer.mjs";
9
- import _BotVoiceBar from "./BotVoiceBar.mjs";
10
- import _BotSessionList from "./BotSessionList.mjs";
11
- const BotMobile = withInstall(_BotMobile);
12
- var stdin_default = BotMobile;
13
- const BotMobilePrompts = withInstall(_BotMobilePrompts);
14
- const BotMobileContextTags = withInstall(_BotMobileContextTags);
15
- const BotMobileSheet = withInstall(_BotMobileSheet);
16
- const BotMobileView = withInstall(_BotMobileView);
17
- const BotFab = withInstall(_BotFab);
18
- const BotHistoryDrawer = withInstall(_BotHistoryDrawer);
19
- const BotVoiceBar = withInstall(_BotVoiceBar);
20
- const BotSessionList = withInstall(_BotSessionList);
21
- import { botMobileProps } from "./BotMobile.mjs";
22
- import { botMobilePromptsProps } from "./BotMobilePrompts.mjs";
23
- import { botMobileContextTagsProps } from "./BotMobileContextTags.mjs";
24
- import { botMobileSheetProps } from "./BotMobileSheet.mjs";
25
- import { botMobileViewProps } from "./BotMobileView.mjs";
26
- import { botFabProps } from "./BotFab.mjs";
27
- import { botHistoryDrawerProps } from "./BotHistoryDrawer.mjs";
28
- import { botVoiceBarProps } from "./BotVoiceBar.mjs";
29
- import { botSessionListProps } from "./BotSessionList.mjs";
30
- export {
31
- BotFab,
32
- BotHistoryDrawer,
33
- BotMobile,
34
- BotMobileContextTags,
35
- BotMobilePrompts,
36
- BotMobileSheet,
37
- BotMobileView,
38
- BotSessionList,
39
- BotVoiceBar,
40
- botFabProps,
41
- botHistoryDrawerProps,
42
- botMobileContextTagsProps,
43
- botMobilePromptsProps,
44
- botMobileProps,
45
- botMobileSheetProps,
46
- botMobileViewProps,
47
- botSessionListProps,
48
- botVoiceBarProps,
49
- stdin_default as default
50
- };
@@ -1,6 +0,0 @@
1
- import type { BotMobileSession } from './types';
2
- /**
3
- * 会话搜索过滤:按名称/预览文本模糊匹配(不区分大小写),关键词为空时原样返回。
4
- * BotHistoryDrawer 与 BotSessionList 共用,避免两处各写一份过滤逻辑。
5
- */
6
- export declare function filterSessions(sessions: BotMobileSession[], keyword: string): BotMobileSession[];
@@ -1,15 +0,0 @@
1
- function filterSessions(sessions, keyword) {
2
- const query = keyword.trim().toLowerCase();
3
- if (!query) {
4
- return sessions;
5
- }
6
- return sessions.filter((session) => {
7
- var _a;
8
- const name = session.name.toLowerCase();
9
- const preview = ((_a = session.preview) != null ? _a : "").toLowerCase();
10
- return name.includes(query) || preview.includes(query);
11
- });
12
- }
13
- export {
14
- filterSessions
15
- };
@@ -1,15 +0,0 @@
1
- import type { BotMobileSession } from './types';
2
- export interface RenderSessionItemOptions {
3
- key: string;
4
- session: BotMobileSession;
5
- active: boolean;
6
- editing: boolean;
7
- editingName: string;
8
- onSelect: () => void;
9
- onStartRename: () => void;
10
- onEditingNameInput: (value: string) => void;
11
- onCommitRename: () => void;
12
- onCancelRename: () => void;
13
- onDelete: () => void;
14
- }
15
- export declare function renderSessionItem(options: RenderSessionItemOptions): JSX.Element;
@@ -1,73 +0,0 @@
1
- import { createVNode as _createVNode } from "vue";
2
- import { createNamespace } from "../utils/index.mjs";
3
- import { Icon } from "../icon/index.mjs";
4
- const [, bem] = createNamespace("bot-mobile-session-item");
5
- function renderSessionItem(options) {
6
- const {
7
- key,
8
- session,
9
- active,
10
- editing,
11
- editingName,
12
- onSelect,
13
- onStartRename,
14
- onEditingNameInput,
15
- onCommitRename,
16
- onCancelRename,
17
- onDelete
18
- } = options;
19
- const stop = (fn) => (event) => {
20
- event.stopPropagation();
21
- fn();
22
- };
23
- const renderBody = () => {
24
- if (editing) {
25
- return _createVNode("input", {
26
- "class": bem("input"),
27
- "value": editingName,
28
- "autofocus": true,
29
- "onClick": (event) => event.stopPropagation(),
30
- "onInput": (event) => onEditingNameInput(event.target.value),
31
- "onKeydown": (event) => {
32
- if (event.key === "Enter") {
33
- onCommitRename();
34
- } else if (event.key === "Escape") {
35
- onCancelRename();
36
- }
37
- },
38
- "onBlur": onCommitRename
39
- }, null);
40
- }
41
- return _createVNode("div", {
42
- "class": bem("body"),
43
- "onClick": onSelect
44
- }, [_createVNode("div", {
45
- "class": bem("name")
46
- }, [session.name]), (session.preview || session.updatedAt !== void 0) && _createVNode("div", {
47
- "class": bem("meta")
48
- }, [session.preview && _createVNode("span", {
49
- "class": bem("preview")
50
- }, [session.preview]), session.updatedAt !== void 0 && _createVNode("span", {
51
- "class": bem("time")
52
- }, [session.updatedAt])])]);
53
- };
54
- return _createVNode("div", {
55
- "key": key,
56
- "class": bem({
57
- active
58
- })
59
- }, [renderBody(), !editing && _createVNode("div", {
60
- "class": bem("actions")
61
- }, [_createVNode(Icon, {
62
- "name": "edit",
63
- "class": bem("action"),
64
- "onClick": stop(onStartRename)
65
- }, null), _createVNode(Icon, {
66
- "name": "delete",
67
- "class": bem("action", "danger"),
68
- "onClick": stop(onDelete)
69
- }, null)])]);
70
- }
71
- export {
72
- renderSessionItem
73
- };
@@ -1,15 +0,0 @@
1
- import "../../style/base.css";
2
- import "../../badge/index.css";
3
- import "../../icon/index.css";
4
- import "../../loading/index.css";
5
- import "../../overlay/index.css";
6
- import "../../popup/index.css";
7
- import "../../checkbox-group/index.css";
8
- import "../../checkbox/index.css";
9
- import "../../radio-group/index.css";
10
- import "../../radio/index.css";
11
- import "../../cell/index.css";
12
- import "../../field/index.css";
13
- import "../../search/index.css";
14
- import "../../empty/index.css";
15
- import "../index.css";
@@ -1,15 +0,0 @@
1
- import "../../style/base.less";
2
- import "../../badge/index.less";
3
- import "../../icon/index.less";
4
- import "../../loading/index.less";
5
- import "../../overlay/index.less";
6
- import "../../popup/index.less";
7
- import "../../checkbox-group/index.less";
8
- import "../../checkbox/index.less";
9
- import "../../radio-group/index.less";
10
- import "../../radio/index.less";
11
- import "../../cell/index.less";
12
- import "../../field/index.less";
13
- import "../../search/index.less";
14
- import "../../empty/index.less";
15
- import "../index.less";
@@ -1,23 +0,0 @@
1
- import type { ComponentPublicInstance } from 'vue';
2
- import type { BotContainerNanobotExpose } from 'meos-bot-web';
3
- export declare type BotMobileBotRef = (ComponentPublicInstance & BotContainerNanobotExpose) | undefined;
4
- export interface BotMobileExpose {
5
- /** 内层 BotContainerNanobot 实例引用;宿主经 ref.value.botRef 调用会话方法(connect/disconnect 等) */
6
- botRef: BotMobileBotRef;
7
- }
8
- export interface BotMobilePromptItem {
9
- id: string;
10
- title: string;
11
- prompt: string;
12
- }
13
- export interface BotMobileContextTag {
14
- id: string;
15
- label: string;
16
- value?: unknown;
17
- }
18
- export interface BotMobileSession {
19
- id: string;
20
- name: string;
21
- preview?: string;
22
- updatedAt?: string | number;
23
- }
File without changes