dsh-plugin 1.1.2 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/client/client.js +4465 -1442
  2. package/client/client.js.map +1 -1
  3. package/lib/http/routes.js +438 -22
  4. package/lib/index.js +1 -1
  5. package/lib/services/install/install.js +4 -0
  6. package/lib/services/install/npm-check.js +55 -0
  7. package/lib/services/{npm-resolve.js → install/npm-resolve.js} +7 -5
  8. package/lib/services/{preflight.js → install/preflight.js} +15 -4
  9. package/lib/services/{task-queue.js → install/task-queue.js} +155 -66
  10. package/lib/services/loader.js +56 -1
  11. package/lib/services/log.js +138 -0
  12. package/lib/services/probe.js +157 -0
  13. package/lib/services/{profile.js → profile/profile.js} +29 -1
  14. package/lib/services/settings.js +60 -0
  15. package/lib/types/http/routes.d.ts +1 -1
  16. package/lib/types/index.d.ts +1 -1
  17. package/lib/types/services/{install-types.d.ts → install/install-types.d.ts} +3 -0
  18. package/lib/types/services/{install.d.ts → install/install.d.ts} +5 -5
  19. package/lib/types/services/install/npm-check.d.ts +12 -0
  20. package/lib/types/services/{npm-resolve.d.ts → install/npm-resolve.d.ts} +2 -1
  21. package/lib/types/services/{task-queue.d.ts → install/task-queue.d.ts} +5 -1
  22. package/lib/types/services/loader.d.ts +14 -8
  23. package/lib/types/services/log.d.ts +49 -0
  24. package/lib/types/services/probe.d.ts +30 -0
  25. package/lib/types/services/{pending-restart.d.ts → profile/pending-restart.d.ts} +1 -1
  26. package/lib/types/services/{profile.d.ts → profile/profile.d.ts} +2 -0
  27. package/lib/types/services/settings.d.ts +24 -0
  28. package/package.json +1 -1
  29. package/src/client/components/PluginHubSection.tsx +341 -120
  30. package/src/client/components/{CatalogList.tsx → catalog/CatalogList.tsx} +11 -7
  31. package/src/client/components/{PluginCard.tsx → catalog/PluginCard.tsx} +5 -4
  32. package/src/client/components/layout/CatalogControls.tsx +80 -0
  33. package/src/client/components/{CatalogHeader.tsx → layout/CatalogHeader.tsx} +4 -4
  34. package/src/client/components/{CategoryTabs.tsx → layout/CategoryTabs.tsx} +3 -3
  35. package/src/client/components/layout/SectionTabs.tsx +60 -0
  36. package/src/client/components/{AboutModal.tsx → modals/AboutModal.tsx} +7 -7
  37. package/src/client/components/{HubUpdateModal.tsx → modals/HubUpdateModal.tsx} +5 -5
  38. package/src/client/components/modals/InstalledDetailModal.tsx +193 -0
  39. package/src/client/components/modals/LogsModal.tsx +301 -0
  40. package/src/client/components/modals/LogsPathModal.tsx +161 -0
  41. package/src/client/components/{NotificationsModal.tsx → modals/NotificationsModal.tsx} +47 -20
  42. package/src/client/components/{ProgressView.tsx → modals/ProgressView.tsx} +2 -2
  43. package/src/client/components/{modals.tsx → modals/modals.tsx} +117 -40
  44. package/src/client/components/{Dropdown.tsx → ui/Dropdown.tsx} +14 -6
  45. package/src/client/components/ui/Toggle.tsx +28 -0
  46. package/src/client/components/ui/icons.tsx +343 -0
  47. package/src/client/components/views/CustomInstallView.tsx +250 -0
  48. package/src/client/components/views/DiagnosticsView.tsx +172 -0
  49. package/src/client/components/views/InstalledView.tsx +328 -0
  50. package/src/client/components/views/LogsView.tsx +150 -0
  51. package/src/client/components/views/MarketView.tsx +66 -0
  52. package/src/client/components/views/SettingsView.tsx +273 -0
  53. package/src/client/data/catalog.ts +38 -0
  54. package/src/client/data/host.ts +107 -0
  55. package/src/client/data/hub.ts +41 -0
  56. package/src/client/hooks/useCatalog.ts +71 -115
  57. package/src/client/hooks/useIncrementalList.ts +46 -0
  58. package/src/client/hooks/useLanguage.ts +40 -0
  59. package/src/client/hooks/useSettings.ts +90 -0
  60. package/src/client/hooks/useTaskQueue.ts +156 -39
  61. package/src/client/locales.ts +358 -38
  62. package/src/client/logic/constants.ts +86 -0
  63. package/src/client/{lib → logic}/failures.ts +95 -74
  64. package/src/client/logic/install-command.ts +56 -0
  65. package/src/client/logic/installed.ts +207 -0
  66. package/src/client/logic/normalize.ts +52 -0
  67. package/src/client/logic/urls.ts +125 -0
  68. package/src/client/styles/CustomInstallView.module.css +191 -0
  69. package/src/client/styles/DiagnosticsView.module.css +231 -0
  70. package/src/client/styles/Dropdown.module.css +42 -41
  71. package/src/client/styles/Header.module.css +100 -132
  72. package/src/client/styles/InstalledView.module.css +447 -0
  73. package/src/client/styles/List.module.css +6 -0
  74. package/src/client/styles/LogsView.module.css +503 -0
  75. package/src/client/styles/Modal.module.css +352 -70
  76. package/src/client/styles/SectionTabs.module.css +142 -0
  77. package/src/client/styles/SettingsView.module.css +232 -0
  78. package/src/client/styles/Toggle.module.css +60 -0
  79. package/src/client/styles/tokens.module.css +1 -0
  80. package/src/client/types.ts +23 -3
  81. package/src/server/http/routes.ts +414 -22
  82. package/src/server/index.ts +1 -1
  83. package/src/server/services/{install-types.ts → install/install-types.ts} +3 -1
  84. package/src/server/services/{install.ts → install/install.ts} +5 -5
  85. package/src/server/services/install/npm-check.ts +53 -0
  86. package/src/server/services/{npm-resolve.ts → install/npm-resolve.ts} +7 -5
  87. package/src/server/services/{preflight.ts → install/preflight.ts} +16 -4
  88. package/src/server/services/{task-queue.ts → install/task-queue.ts} +157 -63
  89. package/src/server/services/loader.ts +55 -1
  90. package/src/server/services/log.ts +167 -0
  91. package/src/server/services/probe.ts +157 -0
  92. package/src/server/services/{pending-restart.ts → profile/pending-restart.ts} +1 -1
  93. package/src/server/services/{profile.ts → profile/profile.ts} +31 -1
  94. package/src/server/services/settings.ts +79 -0
  95. package/lib/services/install.js +0 -4
  96. package/src/client/components/CatalogControls.tsx +0 -108
  97. package/src/client/components/icons.tsx +0 -129
  98. package/src/client/lib/catalog.ts +0 -293
  99. package/src/client/lib/env.ts +0 -20
  100. /package/lib/services/{install-types.js → install/install-types.js} +0 -0
  101. /package/lib/services/{installed-versions.js → profile/installed-versions.js} +0 -0
  102. /package/lib/services/{pending-restart.js → profile/pending-restart.js} +0 -0
  103. /package/lib/services/{progress.js → profile/progress.js} +0 -0
  104. /package/lib/types/services/{preflight.d.ts → install/preflight.d.ts} +0 -0
  105. /package/lib/types/services/{installed-versions.d.ts → profile/installed-versions.d.ts} +0 -0
  106. /package/lib/types/services/{progress.d.ts → profile/progress.d.ts} +0 -0
  107. /package/src/client/{lib → logic}/format.ts +0 -0
  108. /package/src/client/{lib → logic}/renderMarkdown.ts +0 -0
  109. /package/src/server/services/{installed-versions.ts → profile/installed-versions.ts} +0 -0
  110. /package/src/server/services/{progress.ts → profile/progress.ts} +0 -0
@@ -0,0 +1,191 @@
1
+ /* DSH-Plugin Hub — the community plugin marketplace for DeepSeek Harness.
2
+ * Website: https://dsh-plugin.org
3
+ * GitHub: https://github.com/dshplugin/dsh-plugin-hub
4
+ *
5
+ * Custom install view: a standalone top-level section for manually
6
+ * installing npm packages or GitHub sources outside the catalog. The two
7
+ * installer cards (npm / GitHub) stack one per line; each card = channel
8
+ * label + example hint above the input + input row (input + install button)
9
+ * + optional format-error note. Colors resolve through the --hub-* tokens.
10
+ */
11
+
12
+ .root {
13
+ display: flex;
14
+ flex-direction: column;
15
+ gap: 10px;
16
+ min-width: 0;
17
+ /* 输入面板集中在左侧可读宽度,避免在宽窗口里把输入框拉得过长 */
18
+ max-width: 560px;
19
+ }
20
+
21
+ /* 页面说明:一行灰字,交代这是做什么的、装完去哪看 */
22
+ .desc {
23
+ margin: 0;
24
+ font-size: 12px;
25
+ line-height: 18px;
26
+ color: var(--hub-text-tertiary);
27
+ }
28
+
29
+ /* —— 输入卡片:NPM / GitHub 两块,一行一个 —— */
30
+ .installCards {
31
+ display: flex;
32
+ flex-direction: column;
33
+ gap: 10px;
34
+ flex-shrink: 0;
35
+ min-width: 0;
36
+ }
37
+
38
+ .installCard {
39
+ display: flex;
40
+ flex-direction: column;
41
+ gap: 8px;
42
+ min-width: 0;
43
+ padding: 10px 12px;
44
+ background: var(--hub-bg-1);
45
+ border: 1px solid var(--hub-border-1);
46
+ border-radius: 8px;
47
+ }
48
+
49
+ .installCardHead {
50
+ display: flex;
51
+ align-items: center;
52
+ min-width: 0;
53
+ }
54
+
55
+ .installLabel {
56
+ font-size: 12px;
57
+ line-height: 18px;
58
+ font-weight: 600;
59
+ color: var(--hub-text-primary);
60
+ }
61
+
62
+ /* 文本框上方的示例:灰字小字,告诉用户该通道的推荐写法 */
63
+ .installExample {
64
+ font-size: 11px;
65
+ line-height: 16px;
66
+ color: var(--hub-text-tertiary);
67
+ white-space: nowrap;
68
+ overflow: hidden;
69
+ text-overflow: ellipsis;
70
+ min-width: 0;
71
+ }
72
+
73
+ .installRow {
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 8px;
77
+ min-width: 0;
78
+ }
79
+
80
+ .installInput {
81
+ flex: 1 1 auto;
82
+ min-width: 0;
83
+ height: 28px;
84
+ padding: 0 9px;
85
+ font-size: 12px;
86
+ line-height: 26px;
87
+ color: var(--hub-text-primary);
88
+ background: transparent;
89
+ border: 1px solid var(--hub-border-2);
90
+ border-radius: 6px;
91
+ outline: none;
92
+ transition: border-color 120ms ease;
93
+ }
94
+
95
+ .installInput::placeholder {
96
+ color: var(--hub-text-tertiary);
97
+ }
98
+
99
+ .installInput:focus {
100
+ border-color: var(--hub-brand);
101
+ }
102
+
103
+ .installInputError,
104
+ .installInputError:focus {
105
+ border-color: var(--hub-danger-text);
106
+ }
107
+
108
+ .installBtn {
109
+ flex-shrink: 0;
110
+ font-family: inherit;
111
+ font-size: 12px;
112
+ line-height: 18px;
113
+ font-weight: 500;
114
+ color: #fff;
115
+ background: var(--hub-brand);
116
+ border: none;
117
+ border-radius: 6px;
118
+ padding: 5px 14px;
119
+ cursor: pointer;
120
+ user-select: none;
121
+ transition: background 120ms ease, opacity 120ms ease;
122
+ }
123
+
124
+ .installBtn:hover {
125
+ background: var(--hub-brand-hover);
126
+ }
127
+
128
+ .installBtn:disabled {
129
+ opacity: 0.45;
130
+ cursor: default;
131
+ }
132
+
133
+ /* 通道关闭(安全信任开关关掉):卡片整体压暗,输入行换成提示行 */
134
+ .installCardDisabled {
135
+ opacity: 0.8;
136
+ }
137
+
138
+ /* 通道关闭提示行:琥珀色提示 + 「前往设置」按钮,替代示例与输入行 */
139
+ .channelOff {
140
+ display: flex;
141
+ align-items: center;
142
+ justify-content: space-between;
143
+ gap: 8px;
144
+ min-width: 0;
145
+ padding: 6px 9px;
146
+ font-size: 12px;
147
+ line-height: 16px;
148
+ color: var(--hub-warn);
149
+ background: var(--hub-warn-tint);
150
+ border: 1px solid var(--hub-warn-border);
151
+ border-radius: 6px;
152
+ }
153
+
154
+ .channelOffText {
155
+ min-width: 0;
156
+ overflow: hidden;
157
+ text-overflow: ellipsis;
158
+ white-space: nowrap;
159
+ }
160
+
161
+ .channelOffBtn {
162
+ flex-shrink: 0;
163
+ font-family: inherit;
164
+ font-size: 12px;
165
+ line-height: 18px;
166
+ font-weight: 500;
167
+ color: var(--hub-warn-strong);
168
+ background: transparent;
169
+ border: 1px solid var(--hub-warn-border);
170
+ border-radius: 6px;
171
+ padding: 3px 10px;
172
+ cursor: pointer;
173
+ white-space: nowrap;
174
+ transition: background 120ms ease, color 120ms ease;
175
+ }
176
+
177
+ .channelOffBtn:hover {
178
+ background: var(--hub-warn-tint);
179
+ color: var(--hub-warn);
180
+ }
181
+
182
+ /* 格式错误:输入框红边框 + 卡片下方红字提示(给出该通道的推荐写法) */
183
+ .installError {
184
+ font-size: 12px;
185
+ line-height: 16px;
186
+ color: var(--hub-danger-text);
187
+ background: var(--hub-danger-tint);
188
+ border: 1px solid var(--hub-danger-border);
189
+ border-radius: 6px;
190
+ padding: 5px 8px;
191
+ }
@@ -0,0 +1,231 @@
1
+ /* DSH-Plugin Hub — the community plugin marketplace for DeepSeek Harness.
2
+ * Website: https://dsh-plugin.org
3
+ * GitHub: https://github.com/dshplugin/dsh-plugin-hub
4
+ *
5
+ * System diagnostics list: every connectivity probe is one row — name,
6
+ * target address, latency and a live status badge (200 OK / Unreachable /
7
+ * Checking…). The list runs automatically when the page opens; each row is
8
+ * a button — click to re-probe just that channel with a visible
9
+ * running→result feedback loop. Colors resolve through the --hub-* tokens. */
10
+
11
+ .panel {
12
+ display: flex;
13
+ flex-direction: column;
14
+ min-width: 0;
15
+ }
16
+
17
+ /* —— 系统版本(最顶部)—— */
18
+
19
+ /* 版本行:左侧标题+说明,右侧「复制」按钮;与设置行同构,置顶展示 */
20
+ .envRow {
21
+ display: flex;
22
+ align-items: center;
23
+ gap: 10px;
24
+ padding: 8px 12px;
25
+ border-bottom: 1px solid var(--hub-border-1);
26
+ }
27
+
28
+ .envLabel {
29
+ flex: 1;
30
+ min-width: 0;
31
+ }
32
+
33
+ .envTitle {
34
+ font-size: 12.5px;
35
+ line-height: 18px;
36
+ font-weight: 500;
37
+ color: var(--hub-text-primary);
38
+ }
39
+
40
+ .envDesc {
41
+ font-size: 11px;
42
+ line-height: 16px;
43
+ color: var(--hub-text-tertiary);
44
+ }
45
+
46
+ .envCopyBtn {
47
+ flex: none;
48
+ height: 24px;
49
+ padding: 0 12px;
50
+ font-size: 11.5px;
51
+ font-weight: 500;
52
+ color: var(--hub-text-secondary);
53
+ background: var(--hub-bg-hover);
54
+ border: 1px solid var(--hub-border-2);
55
+ border-radius: 6px;
56
+ cursor: pointer;
57
+ user-select: none;
58
+ transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
59
+ }
60
+
61
+ .envCopyBtn:hover:not(:disabled) {
62
+ color: var(--hub-text-primary);
63
+ background: var(--hub-bg-2);
64
+ }
65
+
66
+ .envCopyBtn:disabled {
67
+ opacity: 0.55;
68
+ cursor: default;
69
+ }
70
+
71
+ /* 头部行:左侧说明文字,右侧「立即诊断」品牌色按钮 */
72
+ .head {
73
+ display: flex;
74
+ align-items: center;
75
+ gap: 10px;
76
+ padding: 8px 12px;
77
+ border-bottom: 1px solid var(--hub-border-1);
78
+ }
79
+
80
+ .headHint {
81
+ flex: 1;
82
+ min-width: 0;
83
+ font-size: 11px;
84
+ line-height: 16px;
85
+ color: var(--hub-text-tertiary);
86
+ }
87
+
88
+ .runBtn {
89
+ flex: none;
90
+ height: 24px;
91
+ padding: 0 12px;
92
+ font-size: 11.5px;
93
+ font-weight: 500;
94
+ color: var(--hub-brand);
95
+ background: var(--hub-brand-tint);
96
+ border: 1px solid transparent;
97
+ border-radius: 6px;
98
+ cursor: pointer;
99
+ user-select: none;
100
+ transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
101
+ }
102
+
103
+ .runBtn:hover:not(:disabled) {
104
+ color: #ffffff;
105
+ background: var(--hub-brand);
106
+ border-color: var(--hub-brand);
107
+ }
108
+
109
+ .runBtn:disabled {
110
+ opacity: 0.55;
111
+ cursor: default;
112
+ }
113
+
114
+ /* 一行一个通道:整行可点击重测,悬浮高亮,检测中置灰不可点 */
115
+ .row {
116
+ display: flex;
117
+ align-items: center;
118
+ gap: 10px;
119
+ width: 100%;
120
+ min-width: 0;
121
+ box-sizing: border-box;
122
+ padding: 9px 12px;
123
+ border: none;
124
+ border-bottom: 1px solid var(--hub-border-1);
125
+ background: transparent;
126
+ font: inherit;
127
+ text-align: left;
128
+ cursor: pointer;
129
+ user-select: none;
130
+ transition: background-color 0.12s ease;
131
+ }
132
+
133
+ .row:last-of-type {
134
+ border-bottom: none;
135
+ }
136
+
137
+ .row:hover:not(:disabled) {
138
+ background: var(--hub-bg-hover);
139
+ }
140
+
141
+ .row:disabled {
142
+ cursor: default;
143
+ }
144
+
145
+ .name {
146
+ flex: none;
147
+ font-size: 12.5px;
148
+ line-height: 18px;
149
+ font-weight: 500;
150
+ color: var(--hub-text-primary);
151
+ white-space: nowrap;
152
+ }
153
+
154
+ /* 目标地址(registry 地址 / github.com / dsh-plugin.org):次级灰,过长省略 */
155
+ .display {
156
+ flex: 1;
157
+ min-width: 0;
158
+ font-size: 11px;
159
+ line-height: 16px;
160
+ color: var(--hub-text-tertiary);
161
+ white-space: nowrap;
162
+ overflow: hidden;
163
+ text-overflow: ellipsis;
164
+ }
165
+
166
+ /* 耗时:成功时显示,如 42ms,等宽数字 */
167
+ .meta {
168
+ flex: none;
169
+ font-size: 11px;
170
+ line-height: 16px;
171
+ color: var(--hub-text-tertiary);
172
+ font-variant-numeric: tabular-nums;
173
+ }
174
+
175
+ /* 状态徽章:成功绿 / 失败红 / 检测中灰底闪烁 / 待检空 */
176
+ .badge {
177
+ flex: none;
178
+ padding: 0 8px;
179
+ height: 17px;
180
+ border-radius: 999px;
181
+ font-size: 10.5px;
182
+ line-height: 17px;
183
+ text-align: center;
184
+ white-space: nowrap;
185
+ font-variant-numeric: tabular-nums;
186
+ }
187
+
188
+ .badgeOk {
189
+ color: var(--hub-success);
190
+ background: var(--hub-success-tint);
191
+ }
192
+
193
+ .badgeFail {
194
+ color: var(--hub-danger-text);
195
+ background: var(--hub-danger-tint);
196
+ }
197
+
198
+ .badgeRunning {
199
+ color: var(--hub-text-secondary);
200
+ background: var(--hub-bg-hover);
201
+ animation: diagPulse 1s ease-in-out infinite;
202
+ }
203
+
204
+ .badgeIdle {
205
+ color: var(--hub-text-disabled);
206
+ background: var(--hub-bg-hover);
207
+ }
208
+
209
+ @keyframes diagPulse {
210
+ 0%, 100% { opacity: 1; }
211
+ 50% { opacity: 0.4; }
212
+ }
213
+
214
+ /* 底部总览:全部通过 / 存在异常 / 检测中,与列表行左对齐 */
215
+ .summary {
216
+ padding: 8px 12px 10px;
217
+ font-size: 11px;
218
+ line-height: 16px;
219
+ }
220
+
221
+ .summaryOk {
222
+ color: var(--hub-success);
223
+ }
224
+
225
+ .summaryFail {
226
+ color: var(--hub-danger-text);
227
+ }
228
+
229
+ .summaryRunning {
230
+ color: var(--hub-text-tertiary);
231
+ }
@@ -2,69 +2,71 @@
2
2
  * Website: https://dsh-plugin.org
3
3
  * GitHub: https://github.com/dshplugin/dsh-plugin-hub
4
4
  *
5
- * 自绘下拉(替换原生 <select>)。颜色跟随宿主主题:经 --hub-* 设计令牌解析,
6
- * 与 Header 的控件(排序/分段)保持一致的无边框 + 圆角语言。 */
5
+ * Button-style dropdown: the trigger reads as a compact toolbar button
6
+ * (hairline border + subtle fill + current value + chevron), the panel is
7
+ * a floating menu with hover fills and a brand-highlighted active option.
8
+ * Colors resolve through the --hub-* design tokens. */
9
+
7
10
  .dropdown {
8
11
  position: relative;
9
- display: inline-flex;
10
12
  flex-shrink: 0;
11
13
  }
12
14
 
15
+ /* 触发器:工具栏按钮风格 —— 细边框 + 次级灰底,与通知入口按钮同一视觉语言,
16
+ 只占一个按钮位,给工具栏后续新增按钮留空间 */
13
17
  .dropdownBtn {
14
18
  display: inline-flex;
15
19
  align-items: center;
16
20
  gap: 6px;
17
- height: 24px;
18
- padding: 0 8px;
21
+ box-sizing: border-box;
22
+ height: 28px;
23
+ padding: 0 10px;
24
+ border: 1px solid var(--hub-border-2);
25
+ border-radius: 6px;
19
26
  font-size: 12px;
20
- line-height: 22px;
27
+ line-height: 26px;
21
28
  color: var(--hub-text-primary);
22
- background: transparent;
23
- border: none;
24
- border-radius: 6px;
29
+ background: var(--hub-bg-hover);
25
30
  cursor: pointer;
26
31
  user-select: none;
27
- white-space: nowrap;
28
- transition: background 120ms ease;
32
+ transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
29
33
  }
30
34
 
31
35
  .dropdownBtn:hover {
32
- background: var(--hub-bg-hover);
36
+ background: rgba(128, 128, 128, 0.28);
33
37
  }
34
38
 
35
39
  .dropdownLabel {
36
- min-width: 0;
37
- overflow: hidden;
38
- text-overflow: ellipsis;
40
+ white-space: nowrap;
39
41
  }
40
42
 
43
+ /* 箭头:弱化灰,展开时 180° 翻转并加深,提示可收起 */
41
44
  .dropdownArrow,
42
45
  .dropdownArrowOpen {
43
46
  display: inline-flex;
44
- align-items: center;
45
- justify-content: center;
46
47
  color: var(--hub-text-tertiary);
47
- transition: transform 120ms ease;
48
+ transition: transform 120ms ease, color 120ms ease;
48
49
  }
49
50
 
50
51
  .dropdownArrowOpen {
52
+ color: var(--hub-text-secondary);
51
53
  transform: rotate(180deg);
52
54
  }
53
55
 
56
+ /* 浮层:跟随按钮左对齐(left:0),浅底 + 细边框,不加模糊背景投影,克制不抢内容 */
54
57
  .dropdownPanel {
55
58
  position: absolute;
56
59
  top: calc(100% + 4px);
57
60
  left: 0;
58
- z-index: 50;
59
61
  min-width: 100%;
60
- display: flex;
61
- flex-direction: column;
62
- gap: 2px;
62
+ z-index: 20;
63
63
  padding: 4px;
64
- background: var(--hub-bg-1);
65
64
  border: 1px solid var(--hub-border-2);
66
65
  border-radius: 8px;
67
- box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
66
+ background: var(--hub-bg-1);
67
+ display: flex;
68
+ flex-direction: column;
69
+ gap: 1px;
68
70
  }
69
71
 
70
72
  .dropdownItem,
@@ -72,38 +74,37 @@
72
74
  display: flex;
73
75
  align-items: center;
74
76
  justify-content: space-between;
75
- gap: 10px;
76
- font-size: 12px;
77
- line-height: 18px;
77
+ gap: 12px;
78
+ width: 100%;
79
+ padding: 5px 8px;
78
80
  border: none;
79
81
  border-radius: 6px;
80
- padding: 4px 9px;
82
+ font-size: 12px;
83
+ line-height: 16px;
84
+ text-align: left;
81
85
  cursor: pointer;
82
86
  user-select: none;
83
- white-space: nowrap;
84
- text-align: left;
85
- transition: background 120ms ease, color 120ms ease;
87
+ transition: color 120ms ease, background 120ms ease;
86
88
  }
87
89
 
88
90
  .dropdownItem {
89
- color: var(--hub-text-primary);
91
+ color: var(--hub-text-secondary);
90
92
  background: transparent;
91
93
  }
92
94
 
93
- /* 悬浮选项:明显加重底色,保证「看得见、点得准」。 */
94
95
  .dropdownItem:hover {
96
+ color: var(--hub-text-primary);
95
97
  background: var(--hub-bg-hover);
96
98
  }
97
99
 
98
100
  .dropdownItemActive {
99
- color: var(--hub-text-on-fill);
100
- background: var(--hub-btn-fill);
101
+ color: var(--hub-brand);
102
+ background: var(--hub-brand-tint);
103
+ font-weight: 600;
101
104
  }
102
105
 
103
106
  .dropdownItemLabel {
104
- min-width: 0;
105
- overflow: hidden;
106
- text-overflow: ellipsis;
107
+ white-space: nowrap;
107
108
  }
108
109
 
109
110
  .dropdownCount,
@@ -111,7 +112,7 @@
111
112
  font-size: 10px;
112
113
  line-height: 14px;
113
114
  border-radius: 999px;
114
- padding: 0 6px;
115
+ padding: 0 5px;
115
116
  min-width: 16px;
116
117
  text-align: center;
117
118
  }
@@ -121,7 +122,7 @@
121
122
  background: var(--hub-bg-btn);
122
123
  }
123
124
 
124
- .dropdownItemActive .dropdownCountActive {
125
+ .dropdownCountActive {
125
126
  color: var(--hub-text-on-fill);
126
- background: var(--hub-bg-on-fill);
127
+ background: var(--hub-btn-fill);
127
128
  }