@eddyskywalker/dsh-chatgpt-subscription 0.36.2 → 0.37.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/CHANGELOG.md +39 -0
- package/README.md +23 -3
- package/lib/client.js +340 -47
- package/lib/client.js.map +1 -1
- package/lib/index.js +3043 -40
- package/lib/types/client/common/ComposerQuotaBadge.d.ts +7 -0
- package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -1
- package/lib/types/client/locales-ru/opendesign.d.ts.map +1 -1
- package/lib/types/client/locales-ru/progress-updates.d.ts.map +1 -1
- package/lib/types/client/locales.d.ts +4 -4
- package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts +6 -0
- package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts.map +1 -1
- package/lib/types/client/opendesign/OpenDesignSection.d.ts.map +1 -1
- package/lib/types/client/opendesign/locales.d.ts +54 -0
- package/lib/types/client/opendesign/locales.d.ts.map +1 -1
- package/lib/types/client/opendesign/styles.d.ts +5 -0
- package/lib/types/client/opendesign/styles.d.ts.map +1 -1
- package/lib/types/client/progress-updates/locales.d.ts +17 -2
- package/lib/types/client/progress-updates/locales.d.ts.map +1 -1
- package/lib/types/client/progress-updates/settings-binding.d.ts +13 -3
- package/lib/types/client/progress-updates/settings-binding.d.ts.map +1 -1
- package/lib/types/client/progress-updates/settings-section.d.ts +5 -5
- package/lib/types/client/progress-updates/settings-section.d.ts.map +1 -1
- package/lib/types/client/progress-updates/styles.d.ts.map +1 -1
- package/lib/types/host/opendesign/client.d.ts +103 -0
- package/lib/types/host/opendesign/client.d.ts.map +1 -1
- package/lib/types/host/opendesign/routes.d.ts.map +1 -1
- package/lib/types/host/opendesign/types.d.ts +31 -0
- package/lib/types/host/opendesign/types.d.ts.map +1 -1
- package/lib/types/host/progress-updates/index.d.ts +5 -0
- package/lib/types/host/progress-updates/index.d.ts.map +1 -1
- package/lib/types/host/progress-updates/prompt.d.ts +37 -3
- package/lib/types/host/progress-updates/prompt.d.ts.map +1 -1
- package/lib/types/host/progress-updates/tool.d.ts.map +1 -1
- package/lib/types/host/proxy-manager.d.ts +63 -1
- package/lib/types/host/proxy-manager.d.ts.map +1 -1
- package/lib/types/host/widget-board/line-contracts.d.ts +192 -0
- package/lib/types/host/widget-board/line-contracts.d.ts.map +1 -0
- package/lib/types/host/widget-board/line-quota.d.ts +284 -0
- package/lib/types/host/widget-board/line-quota.d.ts.map +1 -0
- package/lib/types/host/widget-board/line-registry.d.ts +402 -0
- package/lib/types/host/widget-board/line-registry.d.ts.map +1 -0
- package/lib/types/host/widget-board/provider.d.ts +140 -0
- package/lib/types/host/widget-board/provider.d.ts.map +1 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/shared/opendesign-contracts.d.ts +47 -0
- package/lib/types/shared/opendesign-contracts.d.ts.map +1 -1
- package/package.json +2 -1
- package/widgets/line-flip/index.html +58 -0
- package/widgets/line-flip/main.js +1102 -0
- package/widgets/line-flip/style.css +729 -0
- package/widgets/line-flip/widget.json +555 -0
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* 线路额度卡的样式。
|
|
3
|
+
*
|
|
4
|
+
* 翻转的几何与时长来自套件的 `.t-flip-card`(透视、内层 rotateY、两面 backface-visibility),底色与
|
|
5
|
+
* 标题区来自 `.t-data`:这里只排两张脸的内容,并给它们同一套间距、字号与按钮语言——与 Codex 额度卡、
|
|
6
|
+
* 账号轮换卡是同一句话。颜色、间距、字号与动效全部从套件令牌读,不写颜色字面值。
|
|
7
|
+
*
|
|
8
|
+
* 两张脸都是 `.t-data`,各自带自己的底色与描边,所以转到哪一面,看到的就是那一面的完整卡片;
|
|
9
|
+
* `.t-data` 的 `height: 100vh` 在这里被改回 100%——脸是绝对定位的,高度要跟盒子,不是跟视口。
|
|
10
|
+
*
|
|
11
|
+
* 刷新按钮在翻转容器里、但不在旋转的内层:悬停翻面时它不跟着转,两块脸也都压不到它。正面的按钮
|
|
12
|
+
* 因此永远点得到,不会因为鼠标悬停把卡片翻到背面而失效。
|
|
13
|
+
*
|
|
14
|
+
* 进度条与 chip 是本卡自己写的:套件的原语里只有 `.w-frame`、`.w-actions`、`.w-scroll`、`.w-sr`,
|
|
15
|
+
* `.w-meter` 与 `.w-chip` 并不存在,写下来也只是一条不生效的类名。
|
|
16
|
+
*/
|
|
17
|
+
.line-flip {
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
height: 100vh;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
-webkit-tap-highlight-color: transparent;
|
|
23
|
+
touch-action: manipulation;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.line-flip *,
|
|
27
|
+
.line-flip *::before,
|
|
28
|
+
.line-flip *::after {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.line-flip__face {
|
|
33
|
+
height: 100%;
|
|
34
|
+
gap: var(--w-space-sm);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* 标题区右上角给刷新按钮让位:按钮 24px 宽,再加一点呼吸。 */
|
|
38
|
+
.line-flip__head {
|
|
39
|
+
padding-right: var(--w-space-2xl);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.line-flip__head-main {
|
|
43
|
+
min-width: 0;
|
|
44
|
+
flex: 1 1 auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.line-flip__title {
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* 右侧事实(套餐名、账号数)先保完整,让标题先省略:两个都可伸缩时,窄盒子里会两边各截一半,
|
|
55
|
+
* 变成「7 个…」这种读不出意思的东西。
|
|
56
|
+
*/
|
|
57
|
+
.line-flip__meta {
|
|
58
|
+
min-width: 0;
|
|
59
|
+
flex: 0 0 auto;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
text-overflow: ellipsis;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.line-flip__kicker {
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
text-overflow: ellipsis;
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* 刷新按钮:与额度卡的刷新、账号卡的切换同一种描边圆钮。 */
|
|
71
|
+
.line-flip__refresh {
|
|
72
|
+
position: absolute;
|
|
73
|
+
z-index: 2;
|
|
74
|
+
top: var(--w-space-lg);
|
|
75
|
+
right: var(--w-space-lg);
|
|
76
|
+
display: grid;
|
|
77
|
+
width: 24px;
|
|
78
|
+
height: 24px;
|
|
79
|
+
place-items: center;
|
|
80
|
+
padding: 0;
|
|
81
|
+
border: 1px solid color-mix(in srgb, var(--w-color-border) 90%, transparent);
|
|
82
|
+
border-radius: 50%;
|
|
83
|
+
background: var(--w-color-surface);
|
|
84
|
+
color: var(--w-color-muted);
|
|
85
|
+
cursor: pointer;
|
|
86
|
+
transition: color var(--w-motion-fast) linear, border-color var(--w-motion-fast) linear;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.line-flip__refresh svg {
|
|
90
|
+
display: block;
|
|
91
|
+
width: 13px;
|
|
92
|
+
height: 13px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.line-flip__refresh:hover {
|
|
96
|
+
border-color: var(--w-color-border);
|
|
97
|
+
color: var(--w-color-fg);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.line-flip__refresh:focus-visible {
|
|
101
|
+
outline: 2px solid var(--w-color-accent);
|
|
102
|
+
outline-offset: 2px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.line-flip__refresh:disabled {
|
|
106
|
+
cursor: default;
|
|
107
|
+
opacity: 0.45;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* 在途:图标转一圈;按钮停用由脚本控制在「这一次调用」上,别人家的读取只让它转、不禁用。 */
|
|
111
|
+
.line-flip[data-busy="true"] .line-flip__refresh svg {
|
|
112
|
+
animation: line-flip-spin calc(var(--w-motion-base) * 4) linear infinite;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@keyframes line-flip-spin {
|
|
116
|
+
to { transform: rotate(360deg); }
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.line-flip__body {
|
|
120
|
+
gap: var(--w-space-sm);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/*
|
|
124
|
+
* 窗口区就是那块可滚动的纵向区域:.w-scroll 给 overflow,这里补上 flex 布局里的 min-height: 0——
|
|
125
|
+
* 少了它,行数一多整块会把正文撑出去,滚不动也压住页脚。行再多也只在这块里滚,卡片高度仍由
|
|
126
|
+
* 用户给的盒子决定;页脚是 flex: none 的兄弟,永远贴底、不参与滚动。
|
|
127
|
+
*
|
|
128
|
+
* 居中只对「行少到装得下」的盒子生效:safe center 在内容溢出时退回起点对齐。只用 center 的话,
|
|
129
|
+
* 溢出到盒子上方的那几行既滚不到、也不计入 scrollHeight——窗口会凭空消失,正是这次要修掉的毛病。
|
|
130
|
+
*/
|
|
131
|
+
.line-flip__windows {
|
|
132
|
+
display: flex;
|
|
133
|
+
flex: 1 1 auto;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
gap: var(--w-space-sm);
|
|
136
|
+
min-height: 0;
|
|
137
|
+
/* 行少时在正文里居中;行多时 safe 会退回起点对齐,保证第一行与最后一行都滚得到。 */
|
|
138
|
+
justify-content: center;
|
|
139
|
+
justify-content: safe center;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.line-flip__win {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex: none;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
gap: var(--w-space-xs);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.line-flip__win-head {
|
|
150
|
+
display: flex;
|
|
151
|
+
min-width: 0;
|
|
152
|
+
align-items: baseline;
|
|
153
|
+
gap: var(--w-space-sm);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.line-flip__win-label {
|
|
157
|
+
/* 标签是这个窗口的第一身份:可以省略,但不许把整行顶出盒子。 */
|
|
158
|
+
min-width: 0;
|
|
159
|
+
flex: 0 1 auto;
|
|
160
|
+
overflow: hidden;
|
|
161
|
+
color: var(--w-color-fg);
|
|
162
|
+
font-size: var(--w-type-body);
|
|
163
|
+
font-weight: 500;
|
|
164
|
+
line-height: 20px;
|
|
165
|
+
text-overflow: ellipsis;
|
|
166
|
+
white-space: nowrap;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.line-flip__win-used {
|
|
170
|
+
flex: none;
|
|
171
|
+
color: var(--w-color-fg);
|
|
172
|
+
font-size: var(--w-type-body);
|
|
173
|
+
font-variant-numeric: tabular-nums;
|
|
174
|
+
font-weight: 600;
|
|
175
|
+
line-height: 20px;
|
|
176
|
+
white-space: nowrap;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.line-flip__win-reset {
|
|
180
|
+
min-width: 0;
|
|
181
|
+
margin-left: auto;
|
|
182
|
+
overflow: hidden;
|
|
183
|
+
color: var(--w-color-muted);
|
|
184
|
+
font-size: var(--w-type-caption);
|
|
185
|
+
font-variant-numeric: tabular-nums;
|
|
186
|
+
line-height: 16px;
|
|
187
|
+
text-overflow: ellipsis;
|
|
188
|
+
white-space: nowrap;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* 进度条:底是前景色的一层薄纱,填充读行上的百分比(`--line-used`),接近满额换成警告色。 */
|
|
192
|
+
.line-flip__meter {
|
|
193
|
+
position: relative;
|
|
194
|
+
height: 4px;
|
|
195
|
+
overflow: hidden;
|
|
196
|
+
border-radius: 999px;
|
|
197
|
+
background: color-mix(in srgb, var(--w-color-fg) 10%, transparent);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.line-flip__fill {
|
|
201
|
+
display: block;
|
|
202
|
+
width: var(--line-used, 0%);
|
|
203
|
+
height: 100%;
|
|
204
|
+
border-radius: inherit;
|
|
205
|
+
background: var(--w-color-accent);
|
|
206
|
+
transition: width var(--w-motion-base) var(--w-motion-ease-smooth);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.line-flip__win[data-high="true"] .line-flip__fill,
|
|
210
|
+
.line-flip__row[data-high="true"] .line-flip__fill {
|
|
211
|
+
background: var(--w-tone-warn);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/*
|
|
215
|
+
* 正面按账号分组(≥2 个账号各自带着非空窗口时才出现):一个账号一块,块头是一行 caption 级的弱化标题,
|
|
216
|
+
* 下面再是这个账号自己的窗口行。
|
|
217
|
+
*
|
|
218
|
+
* 标题行按 16px 的行高排,比一行窗口(20px 标签 + 4px 条)还矮——它只负责说清「这一块是谁」,
|
|
219
|
+
* 不该跟窗口抢注意力;块与块之间的距离由窗口区自己的 gap 给,块内窗口之间用更小的一档。
|
|
220
|
+
*/
|
|
221
|
+
.line-flip__group {
|
|
222
|
+
display: flex;
|
|
223
|
+
flex: none;
|
|
224
|
+
flex-direction: column;
|
|
225
|
+
gap: var(--w-space-xs);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.line-flip__group-head {
|
|
229
|
+
display: flex;
|
|
230
|
+
min-width: 0;
|
|
231
|
+
align-items: baseline;
|
|
232
|
+
gap: var(--w-space-xs);
|
|
233
|
+
margin: 0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* 小标题本身弱化一档:它是分组的路标,不是内容。 */
|
|
237
|
+
.line-flip__group-title {
|
|
238
|
+
min-width: 0;
|
|
239
|
+
flex: 0 1 auto;
|
|
240
|
+
overflow: hidden;
|
|
241
|
+
color: var(--w-color-muted);
|
|
242
|
+
font-size: var(--w-type-caption);
|
|
243
|
+
font-weight: 600;
|
|
244
|
+
line-height: 16px;
|
|
245
|
+
text-overflow: ellipsis;
|
|
246
|
+
white-space: nowrap;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/* 撞名的区分符:与背面那一行同一套规则,不参与收缩,先让标题省。 */
|
|
250
|
+
.line-flip__group-tag {
|
|
251
|
+
min-width: 0;
|
|
252
|
+
max-width: 50%;
|
|
253
|
+
flex: 0 0 auto;
|
|
254
|
+
overflow: hidden;
|
|
255
|
+
color: var(--w-color-muted);
|
|
256
|
+
font-size: var(--w-type-caption);
|
|
257
|
+
font-variant-numeric: tabular-nums;
|
|
258
|
+
line-height: 16px;
|
|
259
|
+
text-overflow: ellipsis;
|
|
260
|
+
white-space: nowrap;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* 计划名与「当前」标记贴在标题行最右;挤不下时先省它,标题的完整不交给它决定。 */
|
|
264
|
+
.line-flip__group-note {
|
|
265
|
+
min-width: 0;
|
|
266
|
+
flex: 0 1 auto;
|
|
267
|
+
margin-left: auto;
|
|
268
|
+
overflow: hidden;
|
|
269
|
+
color: var(--w-color-muted);
|
|
270
|
+
font-size: var(--w-type-caption);
|
|
271
|
+
font-variant-numeric: tabular-nums;
|
|
272
|
+
line-height: 16px;
|
|
273
|
+
text-overflow: ellipsis;
|
|
274
|
+
white-space: nowrap;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.line-flip__foot {
|
|
278
|
+
display: flex;
|
|
279
|
+
flex: none;
|
|
280
|
+
flex-wrap: wrap;
|
|
281
|
+
align-items: center;
|
|
282
|
+
gap: var(--w-space-sm);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.line-flip__fact {
|
|
286
|
+
color: var(--w-color-muted);
|
|
287
|
+
font-size: var(--w-type-caption);
|
|
288
|
+
font-variant-numeric: tabular-nums;
|
|
289
|
+
line-height: 16px;
|
|
290
|
+
overflow-wrap: anywhere;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.line-flip__blank {
|
|
294
|
+
display: flex;
|
|
295
|
+
margin: auto;
|
|
296
|
+
padding: var(--w-space-sm) 0;
|
|
297
|
+
flex-direction: column;
|
|
298
|
+
align-items: center;
|
|
299
|
+
gap: var(--w-space-xs);
|
|
300
|
+
color: var(--w-color-muted);
|
|
301
|
+
font-size: var(--w-type-caption);
|
|
302
|
+
line-height: 18px;
|
|
303
|
+
text-align: center;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.line-flip__blank-text {
|
|
307
|
+
max-width: 30rem;
|
|
308
|
+
overflow-wrap: anywhere;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.line-flip__blank-hint {
|
|
312
|
+
max-width: 30rem;
|
|
313
|
+
overflow-wrap: anywhere;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.line-flip .line-flip__error {
|
|
317
|
+
flex: none;
|
|
318
|
+
margin: 0;
|
|
319
|
+
color: var(--w-tone-danger);
|
|
320
|
+
font-size: var(--w-type-caption);
|
|
321
|
+
line-height: 16px;
|
|
322
|
+
overflow-wrap: anywhere;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/* 整张卡级别的失败(线路接口不可达):描边走一层危险色,原因写在正面正文里。 */
|
|
326
|
+
.line-flip[data-state="error"] .line-flip__face {
|
|
327
|
+
border-color: color-mix(in srgb, var(--w-tone-danger) 40%, transparent);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* 三档轮换策略:每档就一句看得懂的中文,策略 id 放在按钮的 title 里备查;三档等宽,一行放得下。 */
|
|
331
|
+
.line-flip__strategy {
|
|
332
|
+
display: flex;
|
|
333
|
+
flex: none;
|
|
334
|
+
flex-wrap: wrap;
|
|
335
|
+
gap: var(--w-space-xs);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.line-flip__strategy[data-busy="true"] {
|
|
339
|
+
opacity: 0.65;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.line-flip__chip {
|
|
343
|
+
display: flex;
|
|
344
|
+
min-width: 0;
|
|
345
|
+
flex: 1 1 0;
|
|
346
|
+
flex-direction: column;
|
|
347
|
+
align-items: flex-start;
|
|
348
|
+
gap: 0;
|
|
349
|
+
padding: var(--w-space-xs) var(--w-space-sm);
|
|
350
|
+
border: 1px solid color-mix(in srgb, var(--w-color-border) 90%, transparent);
|
|
351
|
+
border-radius: var(--w-radius-card);
|
|
352
|
+
background: transparent;
|
|
353
|
+
color: var(--w-color-muted);
|
|
354
|
+
cursor: pointer;
|
|
355
|
+
font: inherit;
|
|
356
|
+
text-align: left;
|
|
357
|
+
transition:
|
|
358
|
+
background-color var(--w-motion-fast) linear,
|
|
359
|
+
border-color var(--w-motion-fast) linear,
|
|
360
|
+
color var(--w-motion-fast) linear,
|
|
361
|
+
transform var(--w-motion-press) var(--w-motion-ease-smooth);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/* 一行文案:未选中时是弱化的说明色,选中时由下面那条提到前景色。 */
|
|
365
|
+
.line-flip__chip-label {
|
|
366
|
+
min-width: 0;
|
|
367
|
+
max-width: 100%;
|
|
368
|
+
overflow: hidden;
|
|
369
|
+
font-size: var(--w-type-caption);
|
|
370
|
+
line-height: 16px;
|
|
371
|
+
text-overflow: ellipsis;
|
|
372
|
+
white-space: nowrap;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.line-flip__chip[aria-pressed="true"] {
|
|
376
|
+
border-color: color-mix(in srgb, var(--w-color-accent) 55%, transparent);
|
|
377
|
+
background: color-mix(in srgb, var(--w-color-accent) 9%, transparent);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.line-flip__chip[aria-pressed="true"] .line-flip__chip-label {
|
|
381
|
+
color: var(--w-color-fg);
|
|
382
|
+
font-weight: 600;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.line-flip__chip:is(:active, .is-pressed) {
|
|
386
|
+
transform: scale(var(--w-motion-press-scale));
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.line-flip__chip:focus-visible {
|
|
390
|
+
outline: 2px solid var(--w-color-accent);
|
|
391
|
+
outline-offset: 2px;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.line-flip__chip:disabled {
|
|
395
|
+
cursor: default;
|
|
396
|
+
opacity: 0.55;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
@media (hover: hover) and (pointer: fine) {
|
|
400
|
+
.line-flip__chip:not(:disabled):not([aria-pressed="true"]):hover {
|
|
401
|
+
border-color: var(--w-color-border);
|
|
402
|
+
background: color-mix(in srgb, var(--w-color-fg) 5%, transparent);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* 账号列表:一行一个账号,整行就是切换按钮——状态点、名字与邮箱、该账号自己的迷你额度条。 */
|
|
407
|
+
.line-flip__list {
|
|
408
|
+
display: flex;
|
|
409
|
+
flex: 1 1 auto;
|
|
410
|
+
flex-direction: column;
|
|
411
|
+
min-height: 0;
|
|
412
|
+
margin: 0;
|
|
413
|
+
padding: 0;
|
|
414
|
+
list-style: none;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.line-flip__item {
|
|
418
|
+
flex: none;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.line-flip__item + .line-flip__item {
|
|
422
|
+
border-top: 1px solid color-mix(in srgb, var(--w-color-border) 55%, transparent);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.line-flip__row {
|
|
426
|
+
display: flex;
|
|
427
|
+
width: 100%;
|
|
428
|
+
align-items: center;
|
|
429
|
+
gap: var(--w-space-sm);
|
|
430
|
+
padding: var(--w-space-xs) var(--w-space-xs);
|
|
431
|
+
border: 0;
|
|
432
|
+
border-radius: var(--w-space-xs);
|
|
433
|
+
background: transparent;
|
|
434
|
+
color: inherit;
|
|
435
|
+
cursor: pointer;
|
|
436
|
+
font: inherit;
|
|
437
|
+
text-align: left;
|
|
438
|
+
transition:
|
|
439
|
+
background-color var(--w-motion-fast) linear,
|
|
440
|
+
transform var(--w-motion-press) var(--w-motion-ease-smooth);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.line-flip__row:is(:active, .is-pressed) {
|
|
444
|
+
transform: scale(var(--w-motion-press-scale));
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.line-flip__row:focus-visible {
|
|
448
|
+
outline: 2px solid var(--w-color-accent);
|
|
449
|
+
outline-offset: -2px;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.line-flip__row:disabled {
|
|
453
|
+
cursor: default;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.line-flip__row[data-busy="true"] {
|
|
457
|
+
opacity: 0.85;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
@media (hover: hover) and (pointer: fine) {
|
|
461
|
+
.line-flip__row:not(:disabled):hover {
|
|
462
|
+
background: color-mix(in srgb, var(--w-color-fg) 6%, transparent);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/* 状态点:颜色只是辅助,读屏文字在同一个行里(.w-sr)。 */
|
|
467
|
+
.line-flip__dot {
|
|
468
|
+
width: 8px;
|
|
469
|
+
height: 8px;
|
|
470
|
+
flex: none;
|
|
471
|
+
border-radius: 50%;
|
|
472
|
+
background: var(--w-tone-idle);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.line-flip__row[data-tone="brand"] .line-flip__dot { background: var(--w-color-accent); }
|
|
476
|
+
.line-flip__row[data-tone="warn"] .line-flip__dot { background: var(--w-tone-warn); }
|
|
477
|
+
.line-flip__row[data-tone="danger"] .line-flip__dot { background: var(--w-tone-danger); }
|
|
478
|
+
|
|
479
|
+
.line-flip__row[data-busy="true"] .line-flip__dot {
|
|
480
|
+
animation: line-flip-pulse calc(var(--w-motion-base) * 2) var(--w-motion-ease-standard) infinite;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
@keyframes line-flip-pulse {
|
|
484
|
+
50% { opacity: 0.3; }
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.line-flip__id {
|
|
488
|
+
display: flex;
|
|
489
|
+
min-width: 0;
|
|
490
|
+
flex: 1 1 auto;
|
|
491
|
+
flex-direction: column;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/*
|
|
495
|
+
* 标题这一行放「名字 + 可选的短区分符」。同一张卡里两个账号标签一样时,区分符就是这两行唯一分开的地方,
|
|
496
|
+
* 所以它不参与省略、名字先让;窄盒子里邮箱副标题被 .w-hide-narrow 收掉之后,这一行仍然分得清。
|
|
497
|
+
*/
|
|
498
|
+
.line-flip__name {
|
|
499
|
+
display: flex;
|
|
500
|
+
min-width: 0;
|
|
501
|
+
align-items: baseline;
|
|
502
|
+
gap: var(--w-space-xs);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.line-flip__label {
|
|
506
|
+
min-width: 0;
|
|
507
|
+
flex: 1 1 auto;
|
|
508
|
+
overflow: hidden;
|
|
509
|
+
color: var(--w-color-fg);
|
|
510
|
+
font-size: var(--w-type-body);
|
|
511
|
+
font-weight: 500;
|
|
512
|
+
line-height: 20px;
|
|
513
|
+
text-overflow: ellipsis;
|
|
514
|
+
white-space: nowrap;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.line-flip__tag {
|
|
518
|
+
min-width: 0;
|
|
519
|
+
max-width: 60%;
|
|
520
|
+
/* 区分符不参与收缩:撞名的那两行全靠它分开,宁可让名字先省略到只剩几个字。 */
|
|
521
|
+
flex: 0 0 auto;
|
|
522
|
+
overflow: hidden;
|
|
523
|
+
color: var(--w-color-muted);
|
|
524
|
+
font-size: var(--w-type-caption);
|
|
525
|
+
font-variant-numeric: tabular-nums;
|
|
526
|
+
font-weight: 400;
|
|
527
|
+
line-height: 16px;
|
|
528
|
+
text-overflow: ellipsis;
|
|
529
|
+
white-space: nowrap;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.line-flip__email {
|
|
533
|
+
overflow: hidden;
|
|
534
|
+
color: var(--w-color-muted);
|
|
535
|
+
font-size: var(--w-type-caption);
|
|
536
|
+
line-height: 16px;
|
|
537
|
+
text-overflow: ellipsis;
|
|
538
|
+
white-space: nowrap;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/* 该账号自己最近一次快照的主窗口:迷你进度条加百分比,没有快照时不画。 */
|
|
542
|
+
.line-flip__gauge {
|
|
543
|
+
display: flex;
|
|
544
|
+
flex: none;
|
|
545
|
+
align-items: center;
|
|
546
|
+
gap: var(--w-space-xs);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.line-flip__meter--mini {
|
|
550
|
+
width: 40px;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
/*
|
|
554
|
+
* 这一个账号还没有额度快照:不画 0% 的空条(空条会被读成「用完了」),只留一句弱化的小字。
|
|
555
|
+
* 卡片里没有 host 的额度数据时,这句话比一条零进度条诚实。
|
|
556
|
+
*/
|
|
557
|
+
.line-flip__gauge-missing {
|
|
558
|
+
flex: none;
|
|
559
|
+
color: var(--w-color-muted);
|
|
560
|
+
font-size: var(--w-type-caption);
|
|
561
|
+
line-height: 16px;
|
|
562
|
+
white-space: nowrap;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.line-flip__pct {
|
|
566
|
+
flex: none;
|
|
567
|
+
color: var(--w-color-muted);
|
|
568
|
+
font-size: var(--w-type-caption);
|
|
569
|
+
font-variant-numeric: tabular-nums;
|
|
570
|
+
line-height: 16px;
|
|
571
|
+
white-space: nowrap;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/*
|
|
575
|
+
* 撞名的行在窄盒子里只剩区分符当标题(脚本给这一行 data-tagged,并在这里放一份 .line-flip__alias)。
|
|
576
|
+
* 「名字 + 区分符」在 288px 里两半都只能剩几个字,读完谁也不是谁;换成只写区分符,标题就只有它一个,
|
|
577
|
+
* 读得完整。名字没有丢:它在行的 aria-label 里,也在这一格的 title 上,悬停还能看到。
|
|
578
|
+
*/
|
|
579
|
+
.line-flip__alias {
|
|
580
|
+
display: none;
|
|
581
|
+
min-width: 0;
|
|
582
|
+
overflow: hidden;
|
|
583
|
+
color: var(--w-color-fg);
|
|
584
|
+
font-size: var(--w-type-body);
|
|
585
|
+
font-weight: 500;
|
|
586
|
+
line-height: 20px;
|
|
587
|
+
text-overflow: ellipsis;
|
|
588
|
+
white-space: nowrap;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
:root[data-box-width="narrow"] .line-flip__row[data-tagged="true"] .line-flip__name {
|
|
592
|
+
display: none;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
:root[data-box-width="narrow"] .line-flip__row[data-tagged="true"] .line-flip__alias {
|
|
596
|
+
display: block;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/* 百分比默认一位小数;窄盒子里行内宽度紧张,收成整数,不去挤标题。 */
|
|
600
|
+
.line-flip__pct-int {
|
|
601
|
+
display: none;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
:root[data-box-width="narrow"] .line-flip__pct-full {
|
|
605
|
+
display: none;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
:root[data-box-width="narrow"] .line-flip__pct-int {
|
|
609
|
+
display: inline;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
/* 当前账号与切换中的标记:位置固定在行尾,文字比名字弱一档。 */
|
|
613
|
+
.line-flip__marker {
|
|
614
|
+
flex: none;
|
|
615
|
+
color: var(--w-color-muted);
|
|
616
|
+
font-size: var(--w-type-caption);
|
|
617
|
+
line-height: 16px;
|
|
618
|
+
white-space: nowrap;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.line-flip__row[aria-current="true"] .line-flip__marker {
|
|
622
|
+
color: var(--w-color-fg);
|
|
623
|
+
font-weight: 500;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/* 组件库的缩略画面不放按钮。 */
|
|
627
|
+
:root[data-placement="preview"] .line-flip__refresh {
|
|
628
|
+
display: none;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/* 窄盒子:窗口与账号的标注降到说明字号,邮箱与倒计时由 .w-hide-narrow 收掉。 */
|
|
632
|
+
:root[data-box-width="narrow"] .line-flip__win-label,
|
|
633
|
+
:root[data-box-width="narrow"] .line-flip__win-used {
|
|
634
|
+
font-size: var(--w-type-caption);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
:root[data-box-width="narrow"] .line-flip__meter--mini {
|
|
638
|
+
width: 28px;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
:root[data-box-width="narrow"] .line-flip__head {
|
|
642
|
+
/* 窄盒子里按钮缩到 22px、离边 12px,标题区仍要让出整数宽度,meta 才不会被压在按钮底下。 */
|
|
643
|
+
padding-right: var(--w-space-2xl);
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
:root[data-box-width="narrow"] .line-flip__refresh {
|
|
647
|
+
top: var(--w-space-md);
|
|
648
|
+
right: var(--w-space-md);
|
|
649
|
+
width: 22px;
|
|
650
|
+
height: 22px;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/*
|
|
654
|
+
* 矮盒子:窗口与页脚一条都不收——正文本来就是可滚动的(.line-flip__windows 上带着 .w-scroll),
|
|
655
|
+
* 高度由用户给的盒子决定,多出来的窗口在窗口区里滚,页脚照旧贴底不跟着滚。这里只把间距收紧。
|
|
656
|
+
*/
|
|
657
|
+
:root[data-box-height="short"] .line-flip__body {
|
|
658
|
+
gap: var(--w-space-xs);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
:root[data-box-height="short"] .line-flip__row {
|
|
662
|
+
padding: 0 var(--w-space-xs);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
:root[data-box-height="short"] .line-flip__head {
|
|
666
|
+
padding-right: var(--w-space-2xl);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
:root[data-box-height="short"] .line-flip__refresh {
|
|
670
|
+
top: var(--w-space-md);
|
|
671
|
+
right: var(--w-space-md);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/* 高盒子:窗口长到标题字号,进度条加厚,窗口之间松一点。 */
|
|
675
|
+
:root[data-box-height="tall"] .line-flip__windows {
|
|
676
|
+
gap: var(--w-space-md);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
:root[data-box-height="tall"] .line-flip__group {
|
|
680
|
+
gap: var(--w-space-sm);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
:root[data-box-height="tall"] .line-flip__win-label,
|
|
684
|
+
:root[data-box-height="tall"] .line-flip__win-used {
|
|
685
|
+
font-size: var(--w-type-title);
|
|
686
|
+
line-height: 24px;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
:root[data-box-height="tall"] .line-flip__meter {
|
|
690
|
+
height: 6px;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
:root[data-box-height="tall"] .line-flip__fact,
|
|
694
|
+
:root[data-box-height="tall"] .line-flip__win-reset {
|
|
695
|
+
font-size: var(--w-type-body);
|
|
696
|
+
line-height: 20px;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
:root[data-box-height="tall"] .line-flip__row {
|
|
700
|
+
padding: var(--w-space-sm) var(--w-space-xs);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
:root[data-box-height="tall"] .line-flip__label,
|
|
704
|
+
:root[data-box-height="tall"] .line-flip__alias {
|
|
705
|
+
font-size: var(--w-type-title);
|
|
706
|
+
line-height: 24px;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
/* 减弱动效:翻面由套件直接换面、不做过渡;这里的进度条、按钮与忙碌圆点同样停下。 */
|
|
710
|
+
:root[data-motion="reduced"] .line-flip__fill {
|
|
711
|
+
transition: none;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
:root[data-motion="reduced"] .line-flip[data-busy="true"] .line-flip__refresh svg {
|
|
715
|
+
animation: none;
|
|
716
|
+
opacity: 0.5;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
:root[data-motion="reduced"] .line-flip__row[data-busy="true"] .line-flip__dot {
|
|
720
|
+
animation: none;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
:root[data-motion="reduced"] .line-flip__chip,
|
|
724
|
+
:root[data-motion="reduced"] .line-flip__chip:is(:active, .is-pressed),
|
|
725
|
+
:root[data-motion="reduced"] .line-flip__row,
|
|
726
|
+
:root[data-motion="reduced"] .line-flip__row:is(:active, .is-pressed) {
|
|
727
|
+
transition: none;
|
|
728
|
+
transform: none;
|
|
729
|
+
}
|