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.
- package/es/cascader/Cascader.d.ts +1 -1
- package/es/cascader/index.d.ts +1 -1
- package/es/coupon-list/style/index.mjs +1 -1
- package/es/coupon-list/style/less.mjs +1 -1
- package/es/index.d.ts +2 -2
- package/es/index.mjs +4 -4
- package/es/label/Label.d.ts +92 -0
- package/es/label/Label.mjs +95 -0
- package/es/label/index.css +1 -0
- package/es/label/index.d.ts +64 -0
- package/es/label/index.less +113 -0
- package/es/label/index.mjs +8 -0
- package/es/label/style/index.mjs +6 -0
- package/es/label/style/less.mjs +6 -0
- package/es/label/var.less +11 -0
- package/es/location-select/style/index.mjs +1 -1
- package/es/location-select/style/less.mjs +1 -1
- package/es/material-add/MaterialAdd.d.ts +105 -1
- package/es/material-add/MaterialAdd.mjs +63 -23
- package/es/material-add/index.d.ts +73 -1
- package/es/quantity-input/QuantityInput.d.ts +1 -1
- package/es/quantity-input/index.d.ts +2 -2
- package/es/radio-panel/RadioPanel.d.ts +46 -1
- package/es/radio-panel/RadioPanel.mjs +115 -29
- package/es/radio-panel/index.css +1 -1
- package/es/radio-panel/index.d.ts +35 -1
- package/es/radio-panel/index.less +17 -0
- package/es/radio-panel/style/index.mjs +4 -0
- package/es/radio-panel/style/less.mjs +4 -0
- package/es/sticky/Sticky.d.ts +1 -1
- package/es/sticky/index.d.ts +1 -1
- package/es/tabs/TabsTitle.mjs +1 -0
- package/es/tabs/index.css +1 -1
- package/es/tabs/index.less +11 -0
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/index.css +1 -1
- package/es/tag/index.less +7 -0
- package/es/tag/var.less +3 -0
- package/lib/cascader/Cascader.d.ts +1 -1
- package/lib/cascader/index.d.ts +1 -1
- package/lib/coupon-list/style/index.js +1 -1
- package/lib/coupon-list/style/less.js +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +4 -4
- package/lib/index.less +6 -6
- package/lib/label/Label.d.ts +92 -0
- package/lib/label/Label.js +114 -0
- package/lib/label/index.css +1 -0
- package/lib/label/index.d.ts +64 -0
- package/lib/{bot-mobile/session-filter.js → label/index.js} +16 -13
- package/lib/label/index.less +113 -0
- package/lib/label/style/index.js +6 -0
- package/lib/label/style/less.js +6 -0
- package/lib/label/var.less +11 -0
- package/lib/location-select/style/index.js +1 -1
- package/lib/location-select/style/less.js +1 -1
- package/lib/material-add/MaterialAdd.d.ts +105 -1
- package/lib/material-add/MaterialAdd.js +63 -23
- package/lib/material-add/index.d.ts +73 -1
- package/lib/quantity-input/QuantityInput.d.ts +1 -1
- package/lib/quantity-input/index.d.ts +2 -2
- package/lib/radio-panel/RadioPanel.d.ts +46 -1
- package/lib/radio-panel/RadioPanel.js +114 -28
- package/lib/radio-panel/index.css +1 -1
- package/lib/radio-panel/index.d.ts +35 -1
- package/lib/radio-panel/index.less +17 -0
- package/lib/radio-panel/style/index.js +4 -0
- package/lib/radio-panel/style/less.js +4 -0
- package/lib/sticky/Sticky.d.ts +1 -1
- package/lib/sticky/index.d.ts +1 -1
- package/lib/tabs/TabsTitle.js +1 -0
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/index.less +11 -0
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/index.css +1 -1
- package/lib/tag/index.less +7 -0
- package/lib/tag/var.less +3 -0
- package/lib/vant.cjs.js +1212 -1769
- package/lib/vant.es.js +1212 -1769
- package/lib/vant.js +13016 -24376
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +4 -4
- package/es/bot-mobile/BotFab.d.ts +0 -72
- package/es/bot-mobile/BotFab.mjs +0 -152
- package/es/bot-mobile/BotHistoryDrawer.d.ts +0 -72
- package/es/bot-mobile/BotHistoryDrawer.mjs +0 -97
- package/es/bot-mobile/BotMobile.d.ts +0 -83
- package/es/bot-mobile/BotMobile.mjs +0 -47
- package/es/bot-mobile/BotMobileContextTags.d.ts +0 -52
- package/es/bot-mobile/BotMobileContextTags.mjs +0 -52
- package/es/bot-mobile/BotMobilePrompts.d.ts +0 -54
- package/es/bot-mobile/BotMobilePrompts.mjs +0 -49
- package/es/bot-mobile/BotMobileSheet.d.ts +0 -92
- package/es/bot-mobile/BotMobileSheet.mjs +0 -50
- package/es/bot-mobile/BotMobileView.d.ts +0 -82
- package/es/bot-mobile/BotMobileView.mjs +0 -45
- package/es/bot-mobile/BotSessionList.d.ts +0 -71
- package/es/bot-mobile/BotSessionList.mjs +0 -99
- package/es/bot-mobile/BotVoiceBar.d.ts +0 -80
- package/es/bot-mobile/BotVoiceBar.mjs +0 -138
- package/es/bot-mobile/fab-position.d.ts +0 -9
- package/es/bot-mobile/fab-position.mjs +0 -10
- package/es/bot-mobile/fab-position.test.d.ts +0 -1
- package/es/bot-mobile/fab-position.test.mjs +0 -29
- package/es/bot-mobile/index.css +0 -1
- package/es/bot-mobile/index.d.ts +0 -469
- package/es/bot-mobile/index.less +0 -464
- package/es/bot-mobile/index.mjs +0 -50
- package/es/bot-mobile/session-filter.d.ts +0 -6
- package/es/bot-mobile/session-filter.mjs +0 -15
- package/es/bot-mobile/session-item.d.ts +0 -15
- package/es/bot-mobile/session-item.mjs +0 -73
- package/es/bot-mobile/style/index.mjs +0 -15
- package/es/bot-mobile/style/less.mjs +0 -15
- package/es/bot-mobile/types.d.ts +0 -23
- package/es/bot-mobile/types.mjs +0 -0
- package/es/bot-mobile/var.less +0 -58
- package/es/bot-mobile/voice-zone.d.ts +0 -6
- package/es/bot-mobile/voice-zone.mjs +0 -6
- package/es/bot-mobile/voice-zone.test.d.ts +0 -1
- package/es/bot-mobile/voice-zone.test.mjs +0 -19
- package/lib/bot-mobile/BotFab.d.ts +0 -72
- package/lib/bot-mobile/BotFab.js +0 -171
- package/lib/bot-mobile/BotHistoryDrawer.d.ts +0 -72
- package/lib/bot-mobile/BotHistoryDrawer.js +0 -116
- package/lib/bot-mobile/BotMobile.d.ts +0 -83
- package/lib/bot-mobile/BotMobile.js +0 -66
- package/lib/bot-mobile/BotMobileContextTags.d.ts +0 -52
- package/lib/bot-mobile/BotMobileContextTags.js +0 -71
- package/lib/bot-mobile/BotMobilePrompts.d.ts +0 -54
- package/lib/bot-mobile/BotMobilePrompts.js +0 -68
- package/lib/bot-mobile/BotMobileSheet.d.ts +0 -92
- package/lib/bot-mobile/BotMobileSheet.js +0 -79
- package/lib/bot-mobile/BotMobileView.d.ts +0 -82
- package/lib/bot-mobile/BotMobileView.js +0 -64
- package/lib/bot-mobile/BotSessionList.d.ts +0 -71
- package/lib/bot-mobile/BotSessionList.js +0 -118
- package/lib/bot-mobile/BotVoiceBar.d.ts +0 -80
- package/lib/bot-mobile/BotVoiceBar.js +0 -157
- package/lib/bot-mobile/fab-position.d.ts +0 -9
- package/lib/bot-mobile/fab-position.js +0 -29
- package/lib/bot-mobile/fab-position.test.d.ts +0 -1
- package/lib/bot-mobile/fab-position.test.js +0 -29
- package/lib/bot-mobile/index.css +0 -1
- package/lib/bot-mobile/index.d.ts +0 -469
- package/lib/bot-mobile/index.js +0 -79
- package/lib/bot-mobile/index.less +0 -464
- package/lib/bot-mobile/session-filter.d.ts +0 -6
- package/lib/bot-mobile/session-item.d.ts +0 -15
- package/lib/bot-mobile/session-item.js +0 -92
- package/lib/bot-mobile/style/index.js +0 -15
- package/lib/bot-mobile/style/less.js +0 -15
- package/lib/bot-mobile/types.d.ts +0 -23
- package/lib/bot-mobile/types.js +0 -15
- package/lib/bot-mobile/var.less +0 -58
- package/lib/bot-mobile/voice-zone.d.ts +0 -6
- package/lib/bot-mobile/voice-zone.js +0 -25
- package/lib/bot-mobile/voice-zone.test.d.ts +0 -1
- package/lib/bot-mobile/voice-zone.test.js +0 -19
- /package/es/{bot-mobile → label}/var.css +0 -0
- /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,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,92 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var stdin_exports = {};
|
|
19
|
-
__export(stdin_exports, {
|
|
20
|
-
renderSessionItem: () => renderSessionItem
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(stdin_exports);
|
|
23
|
-
var import_vue = require("vue");
|
|
24
|
-
var import_utils = require("../utils");
|
|
25
|
-
var import_icon = require("../icon");
|
|
26
|
-
const [, bem] = (0, import_utils.createNamespace)("bot-mobile-session-item");
|
|
27
|
-
function renderSessionItem(options) {
|
|
28
|
-
const {
|
|
29
|
-
key,
|
|
30
|
-
session,
|
|
31
|
-
active,
|
|
32
|
-
editing,
|
|
33
|
-
editingName,
|
|
34
|
-
onSelect,
|
|
35
|
-
onStartRename,
|
|
36
|
-
onEditingNameInput,
|
|
37
|
-
onCommitRename,
|
|
38
|
-
onCancelRename,
|
|
39
|
-
onDelete
|
|
40
|
-
} = options;
|
|
41
|
-
const stop = (fn) => (event) => {
|
|
42
|
-
event.stopPropagation();
|
|
43
|
-
fn();
|
|
44
|
-
};
|
|
45
|
-
const renderBody = () => {
|
|
46
|
-
if (editing) {
|
|
47
|
-
return (0, import_vue.createVNode)("input", {
|
|
48
|
-
"class": bem("input"),
|
|
49
|
-
"value": editingName,
|
|
50
|
-
"autofocus": true,
|
|
51
|
-
"onClick": (event) => event.stopPropagation(),
|
|
52
|
-
"onInput": (event) => onEditingNameInput(event.target.value),
|
|
53
|
-
"onKeydown": (event) => {
|
|
54
|
-
if (event.key === "Enter") {
|
|
55
|
-
onCommitRename();
|
|
56
|
-
} else if (event.key === "Escape") {
|
|
57
|
-
onCancelRename();
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"onBlur": onCommitRename
|
|
61
|
-
}, null);
|
|
62
|
-
}
|
|
63
|
-
return (0, import_vue.createVNode)("div", {
|
|
64
|
-
"class": bem("body"),
|
|
65
|
-
"onClick": onSelect
|
|
66
|
-
}, [(0, import_vue.createVNode)("div", {
|
|
67
|
-
"class": bem("name")
|
|
68
|
-
}, [session.name]), (session.preview || session.updatedAt !== void 0) && (0, import_vue.createVNode)("div", {
|
|
69
|
-
"class": bem("meta")
|
|
70
|
-
}, [session.preview && (0, import_vue.createVNode)("span", {
|
|
71
|
-
"class": bem("preview")
|
|
72
|
-
}, [session.preview]), session.updatedAt !== void 0 && (0, import_vue.createVNode)("span", {
|
|
73
|
-
"class": bem("time")
|
|
74
|
-
}, [session.updatedAt])])]);
|
|
75
|
-
};
|
|
76
|
-
return (0, import_vue.createVNode)("div", {
|
|
77
|
-
"key": key,
|
|
78
|
-
"class": bem({
|
|
79
|
-
active
|
|
80
|
-
})
|
|
81
|
-
}, [renderBody(), !editing && (0, import_vue.createVNode)("div", {
|
|
82
|
-
"class": bem("actions")
|
|
83
|
-
}, [(0, import_vue.createVNode)(import_icon.Icon, {
|
|
84
|
-
"name": "edit",
|
|
85
|
-
"class": bem("action"),
|
|
86
|
-
"onClick": stop(onStartRename)
|
|
87
|
-
}, null), (0, import_vue.createVNode)(import_icon.Icon, {
|
|
88
|
-
"name": "delete",
|
|
89
|
-
"class": bem("action", "danger"),
|
|
90
|
-
"onClick": stop(onDelete)
|
|
91
|
-
}, null)])]);
|
|
92
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
require("../../style/base.css");
|
|
2
|
-
require("../../badge/index.css");
|
|
3
|
-
require("../../icon/index.css");
|
|
4
|
-
require("../../loading/index.css");
|
|
5
|
-
require("../../overlay/index.css");
|
|
6
|
-
require("../../popup/index.css");
|
|
7
|
-
require("../../checkbox-group/index.css");
|
|
8
|
-
require("../../checkbox/index.css");
|
|
9
|
-
require("../../radio-group/index.css");
|
|
10
|
-
require("../../radio/index.css");
|
|
11
|
-
require("../../cell/index.css");
|
|
12
|
-
require("../../field/index.css");
|
|
13
|
-
require("../../search/index.css");
|
|
14
|
-
require("../../empty/index.css");
|
|
15
|
-
require("../index.css");
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
require("../../style/base.less");
|
|
2
|
-
require("../../badge/index.less");
|
|
3
|
-
require("../../icon/index.less");
|
|
4
|
-
require("../../loading/index.less");
|
|
5
|
-
require("../../overlay/index.less");
|
|
6
|
-
require("../../popup/index.less");
|
|
7
|
-
require("../../checkbox-group/index.less");
|
|
8
|
-
require("../../checkbox/index.less");
|
|
9
|
-
require("../../radio-group/index.less");
|
|
10
|
-
require("../../radio/index.less");
|
|
11
|
-
require("../../cell/index.less");
|
|
12
|
-
require("../../field/index.less");
|
|
13
|
-
require("../../search/index.less");
|
|
14
|
-
require("../../empty/index.less");
|
|
15
|
-
require("../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
|
-
}
|
package/lib/bot-mobile/types.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
-
var stdin_exports = {};
|
|
15
|
-
module.exports = __toCommonJS(stdin_exports);
|