@xixka/dsh-hub 0.2.1-rc.16 → 0.2.1-rc.17
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/lib/client/jet-hub.js +6 -31
- package/package.json +1 -1
package/lib/client/jet-hub.js
CHANGED
|
@@ -1202,28 +1202,12 @@ var STYLES = `
|
|
|
1202
1202
|
两者会在同一位置交替出现(首次请求成功后换成真胶囊),尺寸不一致会看到跳动。 */
|
|
1203
1203
|
.dim-jh-badgePending { display: inline-flex; align-items: center; gap: 6px; max-width: 216px; min-width: 0; padding: 1px 8px; border-radius: var(--dsw-radius-sm, 6px); background: 0 0; color: var(--dsw-alias-label-tertiary); line-height: inherit; white-space: nowrap; font-variant-numeric: tabular-nums; }
|
|
1204
1204
|
.dim-jh-badgePending > span:last-child { overflow: hidden; text-overflow: ellipsis; }
|
|
1205
|
-
/*
|
|
1206
|
-
|
|
1205
|
+
/* 折叠态文本容器:只装「额度」一个读数(用户 2026-11-01 要求 pill 不显示供应商名
|
|
1206
|
+
—— 渠道名挤在同排官方 pill 中间只会被截成省略号;名字走 title 悬停与浮层)。
|
|
1207
|
+
⚠️ 仍必须是 flex 容器:读数与「不完整」角标各自独立、角标不参与收缩。 */
|
|
1207
1208
|
.dim-jh-badgeText { display: flex; align-items: center; min-width: 0; }
|
|
1208
|
-
/* ⚠️ 让位顺序:中段说明(999) → 渠道名(99) → 读数(none,**不参与收缩**)。
|
|
1209
|
-
收缩量按 flex-shrink × flex-basis 加权分配,999 与 99 相差一个数量级,
|
|
1210
|
-
故「包名先走、渠道名其次」,读数一个字都不会少。
|
|
1211
|
-
flex-grow 一律为 0:胶囊是内容自适应宽度,任何 grow 都只会让它在宽容器里虚胖。
|
|
1212
|
-
min-width:0 是省略号生效的前提(flex 子项默认 min-width:auto,会撑破 max-width)。 */
|
|
1213
|
-
.dim-jh-badgeName { flex: 0 99 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1214
|
-
/* 分隔符「•」:定宽不收缩,两侧间距由 margin 给。
|
|
1215
|
-
⚠️ 这里的 3px **不能**换成前后空格:flex 容器把 span 之间只含空白的文本节点
|
|
1216
|
-
渲染成**零宽**(实测 gap=0,节点还在但看不见),空格会静默消失。
|
|
1217
|
-
带空格的那份写法(BADGE_SEP = ' • ')只用于 title / aria-label 那句整文。 */
|
|
1218
|
-
.dim-jh-badgeSep { flex: none; margin: 0 3px; }
|
|
1219
|
-
/* 中段说明(只有套餐模式有值,如包名 Free Plan Subscription)。
|
|
1220
|
-
⚠️ 收缩权重**最大**(999):它比渠道名更该让位 —— 包名多为样板字、且长,
|
|
1221
|
-
而用户认得出自己选的渠道。
|
|
1222
|
-
⚠️ 它被压到 0 宽时(内容过长)该节点仍在,会留下一个「悬空的分隔符」;
|
|
1223
|
-
这在胶囊这一行是可接受的(完整文案在 title 与弹窗里),故不额外做条件渲染。 */
|
|
1224
|
-
.dim-jh-badgeDetail { flex: 0 999 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1225
1209
|
/* ⚠️⚠️ 读数必须 flex: none(**完全不收缩**),不能写 flex: 0 1 auto。
|
|
1226
|
-
|
|
1210
|
+
这是历史上「数字被截」的隐蔽成因,**靠截图才发现**:
|
|
1227
1211
|
|
|
1228
1212
|
收缩量按 flex-shrink × flex-basis 加权分配,读数那一份虽小却**不为零** ——
|
|
1229
1213
|
实测读数被分到 0.77px 的收缩(getBoundingClientRect 宽 78.23 / 内容宽 79)。
|
|
@@ -1238,11 +1222,7 @@ var STYLES = `
|
|
|
1238
1222
|
不能用取整后的 clientWidth。
|
|
1239
1223
|
|
|
1240
1224
|
⚠️ 类名刻意**不叫 .dim-jh-badgeValue**:那个名字已被弹窗读数占用,且那条规则
|
|
1241
|
-
(font-weight:600)排在样式表更后面 ——
|
|
1242
|
-
|
|
1243
|
-
⇒ 读数恒定完整;全部收缩由 .dim-jh-badgeDetail(999) 与 .dim-jh-badgeName(99)
|
|
1244
|
-
承担,两者最坏缩到 0 也放得下(读数最宽约 97px + 分隔符与内边距 ≈ 131px
|
|
1245
|
-
< 186px 上限)。 */
|
|
1225
|
+
(font-weight:600)排在样式表更后面 —— 同名会让数字被静默加粗。 */
|
|
1246
1226
|
.dim-jh-badgeReading { flex: none; min-width: 0; white-space: nowrap; }
|
|
1247
1227
|
/* 「这个读数不完整」的标记(合计少算了账号时才出现),排在读数**之后**。
|
|
1248
1228
|
⚠️ 必须与读数同级 flex: none:它是**补语**,被省略号吃掉就等于没标 —— 而它要
|
|
@@ -14226,13 +14206,8 @@ function UsageBadgeActive(props) {
|
|
|
14226
14206
|
const title = [view.text, view.incompleteNote, view.failureReason].filter((part) => part !== "").join("\n");
|
|
14227
14207
|
const ariaLabel = `${label} 用量:${view.text}${view.incompleteNote === "" ? "" : `(${view.incompleteNote})`}`;
|
|
14228
14208
|
const collapsed = React6.createElement("span", { key: "text", className: "dim-jh-badgeText" }, [
|
|
14229
|
-
React6.createElement("span", { key: "name", className: "dim-jh-badgeName" }, view.name),
|
|
14230
|
-
React6.createElement("span", { key: "sep", className: "dim-jh-badgeSep" }, "•"),
|
|
14231
|
-
// 空串时**不渲染**该节点:留一个空 span 会白吃一个 6px 的 gap
|
|
14232
|
-
//(.dim-jh-badgeText 用的是 .dim-jh-badgeBtn 的 gap)。只有套餐模式有中段。
|
|
14233
|
-
view.detail === "" ? null : React6.createElement("span", { key: "detail", className: "dim-jh-badgeDetail" }, view.detail),
|
|
14234
14209
|
// ⚠️ 类名是 Reading 而**不是** Value:.dim-jh-badgeValue 已被弹窗里的读数占用
|
|
14235
|
-
//(那条规则带 font-weight:600,且排在样式表更后面 ——
|
|
14210
|
+
//(那条规则带 font-weight:600,且排在样式表更后面 —— 同名会让数字
|
|
14236
14211
|
// 被静默加粗、并拿到 flex:none 而无法收缩)。
|
|
14237
14212
|
React6.createElement("span", { key: "value", className: "dim-jh-badgeReading" }, view.reading),
|
|
14238
14213
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xixka/dsh-hub",
|
|
3
|
-
"version": "0.2.1-rc.
|
|
3
|
+
"version": "0.2.1-rc.17",
|
|
4
4
|
"description": "DeepSeek Harness plugin: one hub for AI coding providers — account login, multi-account pools, silent credential refresh, credit claiming, and a local OpenAI-compatible gateway",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|