chatluna-plugin-onebot-sandbox 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.
- package/LICENSE +21 -0
- package/README.md +20 -0
- package/client/app.tsx +306 -0
- package/client/chat/chat-pane.tsx +303 -0
- package/client/chat/composer.css +635 -0
- package/client/chat/composer.tsx +646 -0
- package/client/chat/details-panel.tsx +196 -0
- package/client/chat/emoji-picker.tsx +70 -0
- package/client/chat/extension-mark.tsx +16 -0
- package/client/chat/forward.tsx +257 -0
- package/client/chat/image-preview.tsx +93 -0
- package/client/chat/member-menu.tsx +64 -0
- package/client/chat/message-list.tsx +617 -0
- package/client/chat/messages.css +1018 -0
- package/client/chat/notifications.tsx +83 -0
- package/client/chat/reactions.tsx +52 -0
- package/client/chat/search-panel.tsx +231 -0
- package/client/chat/sidebar.tsx +424 -0
- package/client/chat/webqq-view.tsx +71 -0
- package/client/environment/avatar-picker.tsx +92 -0
- package/client/environment/create-popover.tsx +228 -0
- package/client/environment/directory-model.ts +63 -0
- package/client/environment/entity-dialog.css +383 -0
- package/client/environment/entity-dialog.tsx +442 -0
- package/client/environment/page.css +14 -0
- package/client/environment/page.tsx +280 -0
- package/client/i18n.ts +19 -0
- package/client/index.ts +17 -0
- package/client/locales/en.yml +617 -0
- package/client/locales/zh.yml +617 -0
- package/client/mcp/capability-catalog.tsx +277 -0
- package/client/mcp/credential-manager.tsx +257 -0
- package/client/onebot-debug/page.tsx +329 -0
- package/client/records/record-layout.tsx +429 -0
- package/client/records/records.css +259 -0
- package/client/settings/about.tsx +43 -0
- package/client/settings/draft.ts +47 -0
- package/client/settings/localize.ts +76 -0
- package/client/settings/page.tsx +210 -0
- package/client/settings/settings.css +47 -0
- package/client/shared/avatar.tsx +35 -0
- package/client/shared/confirm-dialog.tsx +44 -0
- package/client/shared/controls.css +17 -0
- package/client/shared/discard-confirm.tsx +45 -0
- package/client/shared/floating-panel.ts +40 -0
- package/client/shared/format-duration.ts +22 -0
- package/client/shared/format-time.ts +49 -0
- package/client/shared/glass.css +150 -0
- package/client/shared/implementation.ts +12 -0
- package/client/shared/overlay-scrollbar.css +45 -0
- package/client/shared/overlay-scrollbar.tsx +123 -0
- package/client/shared/use-element-width.ts +19 -0
- package/client/shared/use-retained.ts +12 -0
- package/client/test-call/page.tsx +260 -0
- package/client/test-space/agent-visuals.tsx +121 -0
- package/client/test-space/observe-overlay.tsx +42 -0
- package/client/test-space/overview.tsx +267 -0
- package/client/test-space/spaces.css +201 -0
- package/client/test-space/thumbnail-capture.ts +63 -0
- package/client/test-space/thumbnail-scale.ts +21 -0
- package/client/test-space/use-space-list.ts +35 -0
- package/client/test-space/zoom.ts +197 -0
- package/client/webqq/composer-draft-host.ts +578 -0
- package/client/webqq/composer-draft.ts +81 -0
- package/client/webqq/conversation-tree.ts +155 -0
- package/client/webqq/emoji-catalog.ts +78 -0
- package/client/webqq/fork-boundary.ts +28 -0
- package/client/webqq/forward-cluster.ts +20 -0
- package/client/webqq/forward-dialog-stack.ts +74 -0
- package/client/webqq/forward-preview.ts +40 -0
- package/client/webqq/friend-menu.ts +17 -0
- package/client/webqq/group-display.ts +18 -0
- package/client/webqq/group-menu.ts +25 -0
- package/client/webqq/mention.ts +4 -0
- package/client/webqq/message-capabilities.ts +37 -0
- package/client/webqq/message-cluster.ts +68 -0
- package/client/webqq/message-presentation.ts +197 -0
- package/client/webqq/message-reveal.ts +31 -0
- package/client/webqq/message-search-date.ts +40 -0
- package/client/webqq/message-selection.ts +85 -0
- package/client/webqq/notification-requests.ts +20 -0
- package/client/webqq/participant-presentation.ts +128 -0
- package/client/webqq/profile-card.ts +199 -0
- package/client/webqq/relationship-directory.ts +62 -0
- package/client/webqq/thinking-panel.ts +7 -0
- package/client/webqq/user-stack.ts +53 -0
- package/client/workspace/agent-overlay-effect.ts +238 -0
- package/client/workspace/context.tsx +117 -0
- package/client/workspace/overlay-host.tsx +299 -0
- package/client/workspace/profile-card.css +164 -0
- package/client/workspace/state.ts +28 -0
- package/client/workspace/store.ts +388 -0
- package/client/workspace/use-test-spaces.ts +21 -0
- package/dist/.vite/manifest.json +21 -0
- package/dist/app-63rfTh6w.js +85 -0
- package/dist/client.css +4 -0
- package/dist/client.js +1 -0
- package/lib/account-profile.d.ts +17 -0
- package/lib/account-profile.d.ts.map +1 -0
- package/lib/base-dir.d.ts +4 -0
- package/lib/base-dir.d.ts.map +1 -0
- package/lib/bot.d.ts +185 -0
- package/lib/bot.d.ts.map +1 -0
- package/lib/builtin-avatar-options.d.ts +11 -0
- package/lib/builtin-avatar-options.d.ts.map +1 -0
- package/lib/builtin-avatars.d.ts +6 -0
- package/lib/builtin-avatars.d.ts.map +1 -0
- package/lib/channel-assignee.d.ts +52 -0
- package/lib/channel-assignee.d.ts.map +1 -0
- package/lib/chatluna/conversation-lines.d.ts +46 -0
- package/lib/chatluna/conversation-lines.d.ts.map +1 -0
- package/lib/chatluna/runtime.d.ts +26 -0
- package/lib/chatluna/runtime.d.ts.map +1 -0
- package/lib/chatluna/state.d.ts +67 -0
- package/lib/chatluna/state.d.ts.map +1 -0
- package/lib/chatluna/thinking.d.ts +10 -0
- package/lib/chatluna/thinking.d.ts.map +1 -0
- package/lib/chatluna/tools.d.ts +36 -0
- package/lib/chatluna/tools.d.ts.map +1 -0
- package/lib/chatluna/wakeup.d.ts +143 -0
- package/lib/chatluna/wakeup.d.ts.map +1 -0
- package/lib/console-contract.d.ts +131 -0
- package/lib/console-contract.d.ts.map +1 -0
- package/lib/console.d.ts +31 -0
- package/lib/console.d.ts.map +1 -0
- package/lib/control-service.d.ts +425 -0
- package/lib/control-service.d.ts.map +1 -0
- package/lib/conversation-resolution.d.ts +157 -0
- package/lib/conversation-resolution.d.ts.map +1 -0
- package/lib/error-detail.d.ts +3 -0
- package/lib/error-detail.d.ts.map +1 -0
- package/lib/inbound-delivery.d.ts +156 -0
- package/lib/inbound-delivery.d.ts.map +1 -0
- package/lib/index.d.ts +76 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +12834 -0
- package/lib/index.js.map +1 -0
- package/lib/lifecycle.d.ts +8 -0
- package/lib/lifecycle.d.ts.map +1 -0
- package/lib/mcp/arguments.d.ts +71 -0
- package/lib/mcp/arguments.d.ts.map +1 -0
- package/lib/mcp/call-records.d.ts +32 -0
- package/lib/mcp/call-records.d.ts.map +1 -0
- package/lib/mcp/http-api.d.ts +147 -0
- package/lib/mcp/http-api.d.ts.map +1 -0
- package/lib/mcp/page-cursor.d.ts +37 -0
- package/lib/mcp/page-cursor.d.ts.map +1 -0
- package/lib/mcp/server.d.ts +60 -0
- package/lib/mcp/server.d.ts.map +1 -0
- package/lib/mcp/service.d.ts +219 -0
- package/lib/mcp/service.d.ts.map +1 -0
- package/lib/mcp/tool-registry.d.ts +113 -0
- package/lib/mcp/tool-registry.d.ts.map +1 -0
- package/lib/mcp/types.d.ts +144 -0
- package/lib/mcp/types.d.ts.map +1 -0
- package/lib/media-storage.d.ts +33 -0
- package/lib/media-storage.d.ts.map +1 -0
- package/lib/message-capabilities.d.ts +78 -0
- package/lib/message-capabilities.d.ts.map +1 -0
- package/lib/onebot-debug.d.ts +115 -0
- package/lib/onebot-debug.d.ts.map +1 -0
- package/lib/onebot-message.d.ts +23 -0
- package/lib/onebot-message.d.ts.map +1 -0
- package/lib/onebot-profiles.d.ts +45 -0
- package/lib/onebot-profiles.d.ts.map +1 -0
- package/lib/persistence.d.ts +148 -0
- package/lib/persistence.d.ts.map +1 -0
- package/lib/random.d.ts +5 -0
- package/lib/random.d.ts.map +1 -0
- package/lib/record-store.d.ts +80 -0
- package/lib/record-store.d.ts.map +1 -0
- package/lib/relationship-actions.d.ts +157 -0
- package/lib/relationship-actions.d.ts.map +1 -0
- package/lib/scope-directory.d.ts +105 -0
- package/lib/scope-directory.d.ts.map +1 -0
- package/lib/settings.d.ts +33 -0
- package/lib/settings.d.ts.map +1 -0
- package/lib/test-spaces.d.ts +69 -0
- package/lib/test-spaces.d.ts.map +1 -0
- package/lib/types.d.ts +739 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/webui.d.ts +26 -0
- package/lib/webui.d.ts.map +1 -0
- package/package.json +112 -0
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 发送框样式,逐条移植自 koishi-plugin-chatluna-sandbox 的 `client/webqq/composer.css`。
|
|
3
|
+
*
|
|
4
|
+
* 头像堆叠的折叠与展开靠 CSS 变量驱动的 right/width 过渡,切换发送者时的重排由 Anime.js FLIP
|
|
5
|
+
* 接管(`composer.tsx`);几何常量与 `client/webqq/user-stack.ts` 一一对应,改一处要同时改另一处。
|
|
6
|
+
* 原版的 WebQQ 主题变量在这里映射到 v2 主题 token,强调色 `--sandbox-accent` 继承自 `.sandbox-webqq`
|
|
7
|
+
* (插件设置 `sandboxAccentColor`),类名前缀换成 `sandbox-composer-`。
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@property --sandbox-user-avatar-overlap-center {
|
|
11
|
+
syntax: '<length>';
|
|
12
|
+
inherits: false;
|
|
13
|
+
initial-value: 39px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.sandbox-composer-layout-root {
|
|
17
|
+
--sandbox-accent-foreground: #fff;
|
|
18
|
+
--sandbox-panel: var(--card);
|
|
19
|
+
--sandbox-text: var(--foreground);
|
|
20
|
+
--sandbox-muted: var(--muted-foreground);
|
|
21
|
+
--sandbox-border: var(--border);
|
|
22
|
+
--sandbox-hover: var(--accent);
|
|
23
|
+
|
|
24
|
+
position: absolute;
|
|
25
|
+
right: 0;
|
|
26
|
+
bottom: 20px;
|
|
27
|
+
left: 0;
|
|
28
|
+
z-index: 3;
|
|
29
|
+
height: 44px;
|
|
30
|
+
font-size: 13px;
|
|
31
|
+
line-height: 20px;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.sandbox-composer {
|
|
36
|
+
position: absolute;
|
|
37
|
+
/*
|
|
38
|
+
* 宽 460px 时右缘对齐 50% + 230px,胶囊居中。聊天区窄于 556px 时 max-width 把胶囊收窄到 100% - 96px,
|
|
39
|
+
* 右缘也要跟着收到 48px,左右各留 48px 仍居中;否则右缘固定不动,胶囊右偏并越出聊天区。
|
|
40
|
+
*/
|
|
41
|
+
right: max(48px, calc(50% - 230px));
|
|
42
|
+
bottom: 0;
|
|
43
|
+
z-index: 1;
|
|
44
|
+
isolation: isolate;
|
|
45
|
+
display: flex;
|
|
46
|
+
width: 460px;
|
|
47
|
+
max-width: calc(100% - 96px);
|
|
48
|
+
min-height: 44px;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 4px;
|
|
51
|
+
padding: 4px;
|
|
52
|
+
border: 1px solid transparent;
|
|
53
|
+
border-radius: 999px;
|
|
54
|
+
color: var(--sandbox-text);
|
|
55
|
+
background: transparent;
|
|
56
|
+
pointer-events: auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.sandbox-composer::before {
|
|
60
|
+
position: absolute;
|
|
61
|
+
top: -1px;
|
|
62
|
+
right: -1px;
|
|
63
|
+
bottom: -1px;
|
|
64
|
+
left: calc(-1px - var(--sandbox-composer-visual-extension, 0px));
|
|
65
|
+
z-index: -1;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
border: 1px solid color-mix(in srgb, var(--sandbox-panel) 66%, transparent);
|
|
68
|
+
border-radius: 999px;
|
|
69
|
+
/* 源插件雾化态:62% 底色 + 模糊。模糊放在无后代的伪元素上,胶囊本体不成为 Backdrop Root。 */
|
|
70
|
+
background: color-mix(in srgb, var(--sandbox-panel) 62%, transparent);
|
|
71
|
+
backdrop-filter: saturate(180%) blur(22px);
|
|
72
|
+
box-shadow: 0 8px 18px rgb(15 23 42 / 8%);
|
|
73
|
+
content: "";
|
|
74
|
+
pointer-events: none;
|
|
75
|
+
transition: left 0.18s ease;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.dark .sandbox-composer::before {
|
|
79
|
+
border-color: var(--sandbox-border);
|
|
80
|
+
box-shadow: 0 8px 18px rgb(0 0 0 / 28%);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.sandbox-composer-context {
|
|
84
|
+
position: absolute;
|
|
85
|
+
right: 14px;
|
|
86
|
+
bottom: calc(100% + 8px);
|
|
87
|
+
left: 14px;
|
|
88
|
+
display: flex;
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
min-width: 0;
|
|
91
|
+
flex-wrap: wrap;
|
|
92
|
+
align-items: flex-end;
|
|
93
|
+
gap: 6px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.sandbox-composer-reply {
|
|
97
|
+
display: flex;
|
|
98
|
+
box-sizing: border-box;
|
|
99
|
+
width: max-content;
|
|
100
|
+
max-width: 100%;
|
|
101
|
+
min-width: 0;
|
|
102
|
+
flex: 0 1 auto;
|
|
103
|
+
align-items: center;
|
|
104
|
+
gap: 8px;
|
|
105
|
+
padding: 7px 10px;
|
|
106
|
+
border: 1px solid var(--sandbox-border);
|
|
107
|
+
border-radius: 12px;
|
|
108
|
+
color: var(--sandbox-muted);
|
|
109
|
+
background: var(--sandbox-panel);
|
|
110
|
+
box-shadow: 0 8px 18px rgb(15 23 42 / 8%);
|
|
111
|
+
font-size: 12px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.sandbox-composer-reply span {
|
|
115
|
+
min-width: 0;
|
|
116
|
+
flex: 1 1 auto;
|
|
117
|
+
overflow: hidden;
|
|
118
|
+
text-overflow: ellipsis;
|
|
119
|
+
white-space: nowrap;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.sandbox-composer-reply button {
|
|
123
|
+
display: inline-flex;
|
|
124
|
+
width: 24px;
|
|
125
|
+
height: 24px;
|
|
126
|
+
flex: none;
|
|
127
|
+
align-items: center;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
border: 0;
|
|
130
|
+
border-radius: 50%;
|
|
131
|
+
color: inherit;
|
|
132
|
+
background: transparent;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.sandbox-composer-reply button:hover,
|
|
136
|
+
.sandbox-composer-reply button:focus-visible {
|
|
137
|
+
color: var(--sandbox-text);
|
|
138
|
+
outline: none;
|
|
139
|
+
background: var(--sandbox-hover);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* 待发附件与回复条共享同一 wrap 容器;附件作为直接子项,保证回复始终是第一行最左项。 */
|
|
143
|
+
.sandbox-composer-attachment-file {
|
|
144
|
+
display: inline-flex;
|
|
145
|
+
min-width: 96px;
|
|
146
|
+
max-width: 180px;
|
|
147
|
+
flex: 0 1 auto;
|
|
148
|
+
align-items: center;
|
|
149
|
+
gap: 6px;
|
|
150
|
+
padding: 4px 6px;
|
|
151
|
+
border: 1px solid var(--sandbox-border);
|
|
152
|
+
border-radius: 999px;
|
|
153
|
+
color: var(--sandbox-text);
|
|
154
|
+
background: var(--sandbox-panel);
|
|
155
|
+
box-shadow: 0 8px 18px rgb(15 23 42 / 8%);
|
|
156
|
+
font-size: 12px;
|
|
157
|
+
line-height: 16px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.sandbox-composer-attachment-file > svg {
|
|
161
|
+
flex: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* baseName 弹性截断、扩展名永不截断,长文件名显示为 "很长的名字….zip"。 */
|
|
165
|
+
.sandbox-composer-attachment-name {
|
|
166
|
+
display: inline-flex;
|
|
167
|
+
min-width: 0;
|
|
168
|
+
flex: 1 1 auto;
|
|
169
|
+
align-items: center;
|
|
170
|
+
white-space: nowrap;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.sandbox-composer-attachment-base {
|
|
174
|
+
min-width: 0;
|
|
175
|
+
flex: 1 1 auto;
|
|
176
|
+
overflow: hidden;
|
|
177
|
+
text-overflow: ellipsis;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.sandbox-composer-attachment-name span:last-child {
|
|
181
|
+
flex: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.sandbox-composer-attachment-file button {
|
|
185
|
+
display: inline-flex;
|
|
186
|
+
width: 18px;
|
|
187
|
+
height: 18px;
|
|
188
|
+
flex: none;
|
|
189
|
+
align-items: center;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
padding: 0;
|
|
192
|
+
border: 0;
|
|
193
|
+
border-radius: 50%;
|
|
194
|
+
color: inherit;
|
|
195
|
+
background: transparent;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.sandbox-composer-attachment-file button:hover,
|
|
199
|
+
.sandbox-composer-attachment-file button:focus-visible {
|
|
200
|
+
outline: none;
|
|
201
|
+
background: var(--sandbox-hover);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.sandbox-composer-attachment-image {
|
|
205
|
+
position: relative;
|
|
206
|
+
width: 44px;
|
|
207
|
+
height: 44px;
|
|
208
|
+
flex: none;
|
|
209
|
+
padding: 4px;
|
|
210
|
+
border: 1px solid var(--sandbox-border);
|
|
211
|
+
border-radius: 14px;
|
|
212
|
+
background: var(--sandbox-panel);
|
|
213
|
+
box-shadow: 0 8px 18px rgb(15 23 42 / 8%);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.sandbox-composer-attachment-preview {
|
|
217
|
+
display: block;
|
|
218
|
+
width: 100%;
|
|
219
|
+
height: 100%;
|
|
220
|
+
overflow: hidden;
|
|
221
|
+
padding: 0;
|
|
222
|
+
border: 0;
|
|
223
|
+
border-radius: 10px;
|
|
224
|
+
background: var(--sandbox-hover);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.sandbox-composer-attachment-preview img {
|
|
228
|
+
display: block;
|
|
229
|
+
width: 100%;
|
|
230
|
+
height: 100%;
|
|
231
|
+
object-fit: cover;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.sandbox-composer-attachment-remove {
|
|
235
|
+
position: absolute;
|
|
236
|
+
top: -5px;
|
|
237
|
+
right: -5px;
|
|
238
|
+
display: inline-flex;
|
|
239
|
+
width: 18px;
|
|
240
|
+
height: 18px;
|
|
241
|
+
align-items: center;
|
|
242
|
+
justify-content: center;
|
|
243
|
+
padding: 0;
|
|
244
|
+
border: 1px solid rgb(255 255 255 / 90%);
|
|
245
|
+
border-radius: 50%;
|
|
246
|
+
color: #fff;
|
|
247
|
+
background: rgb(15 23 42 / 72%);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.sandbox-composer-user-layout-root {
|
|
251
|
+
position: relative;
|
|
252
|
+
display: inline-flex;
|
|
253
|
+
width: var(--sandbox-user-layout-width, 36px);
|
|
254
|
+
height: 36px;
|
|
255
|
+
flex: 0 0 auto;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.sandbox-composer-user-capsule {
|
|
259
|
+
position: absolute;
|
|
260
|
+
top: 0;
|
|
261
|
+
right: 0;
|
|
262
|
+
z-index: 2;
|
|
263
|
+
display: inline-flex;
|
|
264
|
+
width: var(--sandbox-user-capsule-collapsed-width, 36px);
|
|
265
|
+
height: 36px;
|
|
266
|
+
flex: 0 0 auto;
|
|
267
|
+
align-items: center;
|
|
268
|
+
padding: 0;
|
|
269
|
+
box-sizing: border-box;
|
|
270
|
+
pointer-events: auto;
|
|
271
|
+
transition: width 0.18s ease;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.sandbox-composer-user-capsule.is-expanded {
|
|
275
|
+
width: var(--sandbox-user-capsule-expanded-width, var(--sandbox-user-capsule-collapsed-width, 36px));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.sandbox-composer-user-avatar {
|
|
279
|
+
position: relative;
|
|
280
|
+
display: inline-flex;
|
|
281
|
+
width: 36px;
|
|
282
|
+
height: 36px;
|
|
283
|
+
flex: 0 0 auto;
|
|
284
|
+
border-radius: 50%;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.sandbox-composer-user-stack {
|
|
288
|
+
position: relative;
|
|
289
|
+
z-index: 2;
|
|
290
|
+
width: var(--sandbox-user-stack-collapsed-width, 36px);
|
|
291
|
+
height: 36px;
|
|
292
|
+
flex: 0 0 auto;
|
|
293
|
+
margin: 0;
|
|
294
|
+
pointer-events: auto;
|
|
295
|
+
transition: width 0.18s ease;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.sandbox-composer-user-stack.is-expanded {
|
|
299
|
+
width: var(--sandbox-user-stack-expanded-width, var(--sandbox-user-stack-collapsed-width, 36px));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.sandbox-composer-user-stack.is-expanded .sandbox-composer-user-switch {
|
|
303
|
+
right: var(--sandbox-user-expanded-right, 0);
|
|
304
|
+
opacity: 1;
|
|
305
|
+
pointer-events: auto;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.sandbox-composer-user-stack.is-expanded .sandbox-composer-user-overflow {
|
|
309
|
+
right: var(--sandbox-user-overflow-expanded-right, var(--sandbox-user-overflow-right, 0));
|
|
310
|
+
opacity: 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.sandbox-composer-user-stack.is-expanded .sandbox-composer-user-add {
|
|
314
|
+
right: var(--sandbox-user-add-expanded-right, var(--sandbox-user-add-collapsed-right, 0));
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.sandbox-composer-user-switch {
|
|
318
|
+
position: absolute;
|
|
319
|
+
top: 0;
|
|
320
|
+
right: var(--sandbox-user-collapsed-right, 0);
|
|
321
|
+
display: inline-flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
justify-content: center;
|
|
324
|
+
margin: 0;
|
|
325
|
+
padding: 0;
|
|
326
|
+
border: 0;
|
|
327
|
+
border-radius: 50%;
|
|
328
|
+
color: inherit;
|
|
329
|
+
background: transparent;
|
|
330
|
+
transition: right 0.18s ease, opacity 0.12s ease;
|
|
331
|
+
-webkit-tap-highlight-color: transparent;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.sandbox-composer-user-button {
|
|
335
|
+
display: inline-flex;
|
|
336
|
+
width: 36px;
|
|
337
|
+
height: 36px;
|
|
338
|
+
align-items: center;
|
|
339
|
+
justify-content: center;
|
|
340
|
+
margin: 0;
|
|
341
|
+
padding: 0;
|
|
342
|
+
border: 0;
|
|
343
|
+
border-radius: 50%;
|
|
344
|
+
color: inherit;
|
|
345
|
+
background: transparent;
|
|
346
|
+
-webkit-tap-highlight-color: transparent;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/* 折叠时只能用透明度隐藏额外头像;display/visibility 会让 Anime.js FLIP
|
|
350
|
+
把节点当作进入或离开元素,导致头像跟随胶囊位移并留下重影。 */
|
|
351
|
+
.sandbox-composer-user-switch.is-collapsed-extra {
|
|
352
|
+
opacity: 0;
|
|
353
|
+
pointer-events: none;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.sandbox-composer-user-button:focus-visible {
|
|
357
|
+
z-index: 20 !important;
|
|
358
|
+
outline: 2px solid var(--sandbox-accent);
|
|
359
|
+
outline-offset: 3px;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.sandbox-composer-user-add {
|
|
363
|
+
position: absolute;
|
|
364
|
+
top: 0;
|
|
365
|
+
right: var(--sandbox-user-add-collapsed-right, 0);
|
|
366
|
+
z-index: 0;
|
|
367
|
+
display: inline-flex;
|
|
368
|
+
width: 36px;
|
|
369
|
+
height: 36px;
|
|
370
|
+
align-items: center;
|
|
371
|
+
justify-content: center;
|
|
372
|
+
margin: 0;
|
|
373
|
+
padding: 0;
|
|
374
|
+
border: 1px dashed color-mix(in srgb, var(--sandbox-accent) 52%, transparent);
|
|
375
|
+
border-radius: 50%;
|
|
376
|
+
color: var(--sandbox-accent);
|
|
377
|
+
background: color-mix(in srgb, var(--sandbox-accent) 11%, var(--sandbox-panel));
|
|
378
|
+
box-shadow: 0 0 0 2px var(--sandbox-panel);
|
|
379
|
+
pointer-events: auto;
|
|
380
|
+
transition: right 0.18s ease, opacity 0.12s ease, background-color 0.15s ease;
|
|
381
|
+
-webkit-tap-highlight-color: transparent;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
.sandbox-composer-user-add.is-collapsed-hidden {
|
|
385
|
+
opacity: 0;
|
|
386
|
+
pointer-events: none;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.sandbox-composer-user-add:hover {
|
|
390
|
+
background: color-mix(in srgb, var(--sandbox-accent) 18%, var(--sandbox-panel));
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.sandbox-composer-user-add:focus-visible {
|
|
394
|
+
z-index: 20;
|
|
395
|
+
outline: 2px solid var(--sandbox-accent);
|
|
396
|
+
outline-offset: 3px;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.sandbox-composer-user-stack.is-expanded .sandbox-composer-user-switch.is-collapsed-extra {
|
|
400
|
+
opacity: 1;
|
|
401
|
+
pointer-events: auto;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* 后方头像挖掉与前方头像重叠的圆形区域,由发送胶囊的真实表面形成分隔。
|
|
405
|
+
折叠与展开分别需要 39px/45px 圆心;使用与头像位移相同的 180ms 缓动连续过渡,
|
|
406
|
+
避免状态类先切换、头像仍在移动时出现瞬时宽缝。 */
|
|
407
|
+
.sandbox-composer-user-switch.is-overlapped .sandbox-composer-user-avatar {
|
|
408
|
+
--sandbox-user-avatar-overlap-center: 39px;
|
|
409
|
+
--sandbox-user-avatar-overlap-cutout: radial-gradient(circle 20px at var(--sandbox-user-avatar-overlap-center) 18px, transparent 98%, #000 100%);
|
|
410
|
+
box-shadow: none;
|
|
411
|
+
transition: --sandbox-user-avatar-overlap-center 0.18s ease;
|
|
412
|
+
-webkit-mask-image: var(--sandbox-user-avatar-overlap-cutout);
|
|
413
|
+
mask-image: var(--sandbox-user-avatar-overlap-cutout);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.sandbox-composer-user-stack.is-expanded .sandbox-composer-user-switch.is-overlapped .sandbox-composer-user-avatar {
|
|
417
|
+
--sandbox-user-avatar-overlap-center: 45px;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.sandbox-composer-user-overflow {
|
|
421
|
+
--sandbox-user-avatar-overlap-center: 39px;
|
|
422
|
+
--sandbox-user-avatar-overlap-cutout: radial-gradient(circle 20px at var(--sandbox-user-avatar-overlap-center) 18px, transparent 98%, #000 100%);
|
|
423
|
+
|
|
424
|
+
position: absolute;
|
|
425
|
+
top: 0;
|
|
426
|
+
right: var(--sandbox-user-overflow-right, 0);
|
|
427
|
+
z-index: var(--sandbox-user-overflow-z-index, 0);
|
|
428
|
+
display: inline-flex;
|
|
429
|
+
width: 36px;
|
|
430
|
+
height: 36px;
|
|
431
|
+
align-items: center;
|
|
432
|
+
justify-content: center;
|
|
433
|
+
overflow: hidden;
|
|
434
|
+
padding-right: 15px;
|
|
435
|
+
box-sizing: border-box;
|
|
436
|
+
border-radius: 50%;
|
|
437
|
+
color: var(--sandbox-text);
|
|
438
|
+
background: color-mix(in srgb, var(--sandbox-accent) 16%, var(--sandbox-panel) 84%);
|
|
439
|
+
box-shadow: none;
|
|
440
|
+
font-size: 10px;
|
|
441
|
+
font-weight: 700;
|
|
442
|
+
line-height: 1;
|
|
443
|
+
text-align: left;
|
|
444
|
+
pointer-events: none;
|
|
445
|
+
transition: right 0.18s ease, opacity 0.12s ease;
|
|
446
|
+
will-change: opacity;
|
|
447
|
+
-webkit-mask-image: var(--sandbox-user-avatar-overlap-cutout);
|
|
448
|
+
mask-image: var(--sandbox-user-avatar-overlap-cutout);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.sandbox-composer-user-overflow-avatar,
|
|
452
|
+
.sandbox-composer-user-overflow-label {
|
|
453
|
+
position: absolute;
|
|
454
|
+
inset: 0;
|
|
455
|
+
display: inline-flex;
|
|
456
|
+
align-items: center;
|
|
457
|
+
justify-content: center;
|
|
458
|
+
border-radius: inherit;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
.sandbox-composer-user-overflow-avatar {
|
|
462
|
+
opacity: 0;
|
|
463
|
+
clip-path: inset(0 100% 0 0 round 999px);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.sandbox-composer-user-overflow-label {
|
|
467
|
+
padding-right: 15px;
|
|
468
|
+
box-sizing: border-box;
|
|
469
|
+
background: inherit;
|
|
470
|
+
clip-path: inset(0 0 0 0 round 999px);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.sandbox-composer-user-overflow-plus,
|
|
474
|
+
.sandbox-composer-user-overflow-count {
|
|
475
|
+
display: inline-flex;
|
|
476
|
+
align-items: center;
|
|
477
|
+
line-height: 1;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
.sandbox-composer-user-stack.is-overflow-expanding .sandbox-composer-user-overflow {
|
|
481
|
+
opacity: 1;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.sandbox-composer-user-stack.is-overflow-expanding .sandbox-composer-user-switch.is-collapsed-extra,
|
|
485
|
+
.sandbox-composer-user-stack.is-overflow-collapsing .sandbox-composer-user-switch.is-collapsed-extra {
|
|
486
|
+
opacity: 1;
|
|
487
|
+
pointer-events: none;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.sandbox-composer-user-stack.is-overflow-collapsing .sandbox-composer-user-overflow {
|
|
491
|
+
opacity: 1;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.sandbox-composer-user-stack.is-overflow-collapsing .sandbox-composer-user-overflow-avatar {
|
|
495
|
+
animation: sandbox-user-overflow-avatar-erase 190ms cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.sandbox-composer-user-stack.is-overflow-collapsing .sandbox-composer-user-overflow-label {
|
|
499
|
+
animation: sandbox-user-overflow-label-reveal 190ms cubic-bezier(0.22, 1, 0.36, 1) both;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
@keyframes sandbox-user-overflow-avatar-erase {
|
|
503
|
+
0% {
|
|
504
|
+
opacity: 1;
|
|
505
|
+
clip-path: inset(0 0 0 0 round 999px);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
100% {
|
|
509
|
+
opacity: 0;
|
|
510
|
+
clip-path: inset(0 100% 0 0 round 999px);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
@keyframes sandbox-user-overflow-label-reveal {
|
|
515
|
+
0% {
|
|
516
|
+
clip-path: inset(0 0 0 100% round 999px);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
100% {
|
|
520
|
+
clip-path: inset(0 0 0 0 round 999px);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.sandbox-composer-main {
|
|
525
|
+
position: relative;
|
|
526
|
+
display: flex;
|
|
527
|
+
min-width: 0;
|
|
528
|
+
flex: 1;
|
|
529
|
+
flex-direction: column;
|
|
530
|
+
justify-content: center;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.sandbox-composer-editor {
|
|
534
|
+
display: block;
|
|
535
|
+
width: 100%;
|
|
536
|
+
min-height: 32px;
|
|
537
|
+
max-height: 92px;
|
|
538
|
+
overflow-x: hidden;
|
|
539
|
+
overflow-y: auto;
|
|
540
|
+
border: 0;
|
|
541
|
+
padding: 6px 2px;
|
|
542
|
+
outline: 0;
|
|
543
|
+
color: inherit;
|
|
544
|
+
background: transparent;
|
|
545
|
+
font: inherit;
|
|
546
|
+
line-height: 20px;
|
|
547
|
+
white-space: pre-wrap;
|
|
548
|
+
word-break: break-word;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.sandbox-composer-editor[aria-disabled="true"] {
|
|
552
|
+
/* 发送中仍保留文本光标语义,不用 not-allowed 表达禁用。 */
|
|
553
|
+
opacity: 0.45;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.sandbox-composer-placeholder {
|
|
557
|
+
position: absolute;
|
|
558
|
+
top: 6px;
|
|
559
|
+
right: 2px;
|
|
560
|
+
bottom: 6px;
|
|
561
|
+
left: 2px;
|
|
562
|
+
overflow: hidden;
|
|
563
|
+
color: var(--sandbox-muted);
|
|
564
|
+
font: inherit;
|
|
565
|
+
line-height: 20px;
|
|
566
|
+
pointer-events: none;
|
|
567
|
+
white-space: nowrap;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
/* mention 作为行内原子节点,复用 onebot-webqq 的紧凑胶囊视觉,不额外创建换行。 */
|
|
571
|
+
.sandbox-composer-mention {
|
|
572
|
+
display: inline-flex;
|
|
573
|
+
max-width: 100%;
|
|
574
|
+
align-items: center;
|
|
575
|
+
gap: 2px;
|
|
576
|
+
margin: 0 1px;
|
|
577
|
+
padding: 1px 6px;
|
|
578
|
+
border-radius: 999px;
|
|
579
|
+
color: var(--sandbox-accent);
|
|
580
|
+
background: color-mix(in srgb, var(--sandbox-accent) 14%, transparent);
|
|
581
|
+
font-size: 12px;
|
|
582
|
+
line-height: 18px;
|
|
583
|
+
white-space: nowrap;
|
|
584
|
+
vertical-align: 1px;
|
|
585
|
+
user-select: none;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.sandbox-composer-action {
|
|
589
|
+
display: inline-flex;
|
|
590
|
+
width: 32px;
|
|
591
|
+
min-height: 32px;
|
|
592
|
+
flex: 0 0 auto;
|
|
593
|
+
align-items: center;
|
|
594
|
+
justify-content: center;
|
|
595
|
+
padding: 0;
|
|
596
|
+
border: 0;
|
|
597
|
+
border-radius: 50%;
|
|
598
|
+
color: var(--sandbox-accent);
|
|
599
|
+
background: transparent;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.sandbox-composer-action.is-primary {
|
|
603
|
+
width: 36px;
|
|
604
|
+
min-height: 36px;
|
|
605
|
+
color: var(--sandbox-accent-foreground);
|
|
606
|
+
background: var(--sandbox-accent);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.sandbox-composer-action:disabled {
|
|
610
|
+
/* 禁用态靠 disabled 与透明度表达,避免禁止光标打断连续输入节奏。 */
|
|
611
|
+
opacity: 0.45;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.sandbox-composer-error {
|
|
615
|
+
position: absolute;
|
|
616
|
+
right: 8px;
|
|
617
|
+
bottom: calc(100% + 8px);
|
|
618
|
+
max-width: 100%;
|
|
619
|
+
overflow: hidden;
|
|
620
|
+
color: var(--destructive);
|
|
621
|
+
font-size: 12px;
|
|
622
|
+
text-overflow: ellipsis;
|
|
623
|
+
white-space: nowrap;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.dark .sandbox-composer-user-add {
|
|
627
|
+
border-color: var(--sandbox-accent);
|
|
628
|
+
color: var(--sandbox-accent);
|
|
629
|
+
background: var(--secondary);
|
|
630
|
+
box-shadow: 0 0 0 2px var(--sandbox-panel);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.dark .sandbox-composer-user-add:hover {
|
|
634
|
+
background: var(--sandbox-hover);
|
|
635
|
+
}
|