dsh-tide-theme 0.4.1 → 0.5.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/lib/client.js CHANGED
@@ -10,164 +10,180 @@ window.__ModuleLoader__.load({
10
10
  const THEME_SOURCE = "dsh-tide-theme";
11
11
  const SIMPLIFY_TOKENS = Object.freeze({
12
12
  "--dsw-alias-bg-base": {
13
- light: "#f4f7fb",
14
- dark: "#070d17"
13
+ light: "#f5f8fc",
14
+ dark: "#0b121e"
15
15
  },
16
16
  "--dsw-alias-bg-layer-1": {
17
17
  light: "#edf3fa",
18
- dark: "#0a1220"
18
+ dark: "#0e1726"
19
19
  },
20
20
  "--dsw-alias-bg-layer-2": {
21
21
  light: "#ffffff",
22
- dark: "#101c2e"
22
+ dark: "#142034"
23
23
  },
24
24
  "--dsw-alias-bg-layer-3": {
25
- light: "#f6faff",
26
- dark: "#16273f"
25
+ light: "#fbfdff",
26
+ dark: "#1a2840"
27
27
  },
28
28
  "--dsw-alias-bg-module-platform": {
29
- light: "#f4f7fb",
30
- dark: "#070d17"
29
+ light: "#f5f8fc",
30
+ dark: "#0b121e"
31
31
  },
32
32
  "--dsw-alias-bg-skeleton": {
33
- light: "#1d6cf00f",
34
- dark: "#8fc4ff12"
33
+ light: "rgba(37, 99, 235, 0.06)",
34
+ dark: "rgba(96, 165, 250, 0.08)"
35
35
  },
36
36
  "--dsw-alias-border-l1": {
37
- light: "#1d6cf017",
38
- dark: "#8fc4ff1f"
37
+ light: "rgba(37, 99, 235, 0.08)",
38
+ dark: "rgba(96, 165, 250, 0.12)"
39
39
  },
40
40
  "--dsw-alias-border-l2": {
41
- light: "#1d6cf026",
42
- dark: "#8fc4ff33"
41
+ light: "rgba(37, 99, 235, 0.14)",
42
+ dark: "rgba(96, 165, 250, 0.18)"
43
43
  },
44
44
  "--dsw-alias-border-l3": {
45
- light: "#1d6cf040",
46
- dark: "#8fc4ff4d"
45
+ light: "rgba(37, 99, 235, 0.22)",
46
+ dark: "rgba(96, 165, 250, 0.28)"
47
47
  },
48
48
  "--dsw-alias-border-l4": {
49
- light: "#1d6cf05c",
50
- dark: "#8fc4ff6b"
49
+ light: "rgba(37, 99, 235, 0.32)",
50
+ dark: "rgba(96, 165, 250, 0.40)"
51
51
  },
52
52
  "--dsw-alias-separator-primary": {
53
- light: "#1d6cf014",
54
- dark: "#8fc4ff1a"
53
+ light: "rgba(37, 99, 235, 0.08)",
54
+ dark: "rgba(96, 165, 250, 0.12)"
55
55
  },
56
56
  "--dsw-alias-label-primary": {
57
- light: "#0d1b2e",
58
- dark: "#e8f2ff"
57
+ light: "#0f172a",
58
+ dark: "#f0f6ff"
59
59
  },
60
60
  "--dsw-alias-label-secondary": {
61
- light: "#41546e",
62
- dark: "#9eb4d0"
61
+ light: "#334155",
62
+ dark: "#c8dcf5"
63
63
  },
64
64
  "--dsw-alias-label-tertiary": {
65
- light: "#677d99",
66
- dark: "#758ba8"
65
+ light: "#64748b",
66
+ dark: "#93b4dc"
67
67
  },
68
68
  "--dsw-alias-label-caption": {
69
- light: "#8295ae",
70
- dark: "#5e7592"
69
+ light: "#475569",
70
+ dark: "#678ab8"
71
71
  },
72
72
  "--dsw-alias-label-dimmed": {
73
- light: "#9eb0c6",
74
- dark: "#4c627e"
73
+ light: "#526071",
74
+ dark: "#45638c"
75
+ },
76
+ "--dsw-alias-label-quaternary": {
77
+ light: "#64748b",
78
+ dark: "#678ab8"
79
+ },
80
+ "--dsw-alias-label-error": {
81
+ light: "#dc2626",
82
+ dark: "#ef4444"
75
83
  },
76
84
  "--dsw-alias-label-primary-dimmed": {
77
- light: "#41546e",
78
- dark: "#c4d7ee"
85
+ light: "#1e293b",
86
+ dark: "#dbeafe"
79
87
  },
80
88
  "--dsw-alias-label-primary-bluish": {
81
- light: "#1d6cf0",
82
- dark: "#8fc4ff"
89
+ light: "#1d4ed8",
90
+ dark: "#38bdf8"
83
91
  },
84
92
  "--dsw-alias-label-shimmer": {
85
- light: "#8b9aac",
86
- dark: "#54688a"
93
+ light: "#64748b",
94
+ dark: "#93b4dc"
87
95
  },
88
96
  "--dsw-alias-label-deep-diving": {
89
- light: "#677d99",
90
- dark: "#a3bfe0"
97
+ light: "#334155",
98
+ dark: "#c8dcf5"
91
99
  },
92
100
  "--dsw-alias-label-deep-diving-shimmer": {
93
- light: "#8b9aac",
94
- dark: "#c6dcf5"
101
+ light: "#1e293b",
102
+ dark: "#e0edfd"
95
103
  },
96
104
  "--dsw-alias-link": {
97
- light: "#1d6cf0",
98
- dark: "#63aaff"
105
+ light: "#1d4ed8",
106
+ dark: "#38bdf8"
99
107
  },
100
108
  "--dsw-alias-interactive-bg-hover": {
101
- light: "#1d6cf00f",
102
- dark: "#8fc4ff14"
109
+ light: "rgba(37, 99, 235, 0.05)",
110
+ dark: "rgba(96, 165, 250, 0.08)"
103
111
  },
104
112
  "--dsw-alias-interactive-bg-hover-solid": {
105
113
  light: "#e8f1fd",
106
- dark: "#15243b"
114
+ dark: "#18263e"
115
+ },
116
+ "--dsw-alias-interactive-bg-subtle": {
117
+ light: "rgba(15, 23, 42, 0.03)",
118
+ dark: "rgba(255, 255, 255, 0.03)"
107
119
  },
108
120
  "--dsw-alias-interactive-bg-active": {
109
- light: "#1d6cf01c",
110
- dark: "#8fc4ff24"
121
+ light: "rgba(37, 99, 235, 0.10)",
122
+ dark: "rgba(96, 165, 250, 0.15)"
111
123
  },
112
124
  "--dsw-alias-turn-trigger-bg": {
113
- light: "#1d6cf00a",
114
- dark: "#8fc4ff0d"
125
+ light: "rgba(37, 99, 235, 0.04)",
126
+ dark: "rgba(96, 165, 250, 0.06)"
115
127
  },
116
128
  "--dsw-alias-turn-trigger-bg-hover": {
117
- light: "#1d6cf017",
118
- dark: "#8fc4ff1a"
129
+ light: "rgba(37, 99, 235, 0.08)",
130
+ dark: "rgba(96, 165, 250, 0.12)"
119
131
  },
120
132
  "--dsw-alias-button-elevated-fill": {
121
133
  light: "#ffffff",
122
- dark: "#12203a"
134
+ dark: "#18263e"
123
135
  },
124
136
  "--dsw-alias-button-floating-fill": {
125
137
  light: "#ffffff",
126
- dark: "#12203a"
138
+ dark: "#18263e"
127
139
  },
128
140
  "--dsw-alias-button-floating-hover": {
129
- light: "#eff4fa",
130
- dark: "#1a2c49"
141
+ light: "#f0f6fc",
142
+ dark: "#203250"
131
143
  },
132
144
  "--dsw-alias-button-info-fill": {
133
- light: "#1d6cf0",
134
- dark: "#3b8bf5"
145
+ light: "#1d4ed8",
146
+ dark: "#2563eb"
135
147
  },
136
148
  "--dsw-alias-button-info-hover": {
137
- light: "#155cd0",
138
- dark: "#5aa0ff"
149
+ light: "#1e40af",
150
+ dark: "#3b82f6"
139
151
  },
140
152
  "--dsw-alias-state-business-primary": {
141
- light: "#1d6cf0",
142
- dark: "#4f9dff"
153
+ light: "#1d4ed8",
154
+ dark: "#38bdf8"
143
155
  },
144
156
  "--dsw-alias-state-business-tertiary": {
145
- light: "#1d6cf026",
146
- dark: "#4f9dff2e"
157
+ light: "rgba(29, 78, 216, 0.15)",
158
+ dark: "rgba(56, 189, 248, 0.20)"
147
159
  },
148
160
  "--dsw-alias-state-success-primary": {
149
- light: "#0f8754",
150
- dark: "#34d399"
161
+ light: "#047857",
162
+ dark: "#10b981"
163
+ },
164
+ "--dsw-alias-state-success-subtle": {
165
+ light: "rgba(4, 120, 87, 0.12)",
166
+ dark: "rgba(16, 185, 129, 0.16)"
151
167
  },
152
168
  "--dsw-alias-state-warn-primary": {
153
- light: "#b46a05",
154
- dark: "#fbbf24"
169
+ light: "#b45309",
170
+ dark: "#f59e0b"
155
171
  },
156
172
  "--dsw-alias-state-warn-label": {
157
- light: "#9a5800",
173
+ light: "#b45309",
158
174
  dark: "#fbbf24"
159
175
  },
160
176
  "--dsw-alias-state-error-primary": {
161
177
  light: "#dc2626",
162
- dark: "#f87171"
178
+ dark: "#ef4444"
163
179
  },
164
180
  "--dsw-alias-state-mixed-primary": {
165
- light: "#b46a05",
166
- dark: "#fbbf24"
181
+ light: "#b45309",
182
+ dark: "#f59e0b"
167
183
  },
168
184
  "--dsw-alias-state-unknown-primary": {
169
- light: "#677d99",
170
- dark: "#758ba8"
185
+ light: "#64748b",
186
+ dark: "#93b4dc"
171
187
  },
172
188
  "--dsw-corner-shape": {
173
189
  light: "round",
@@ -178,52 +194,52 @@ window.__ModuleLoader__.load({
178
194
  dark: "4px"
179
195
  },
180
196
  "--dsw-radius-sm": {
181
- light: "8px",
182
- dark: "8px"
197
+ light: "6px",
198
+ dark: "6px"
183
199
  },
184
200
  "--dsw-radius-md": {
185
- light: "12px",
186
- dark: "12px"
201
+ light: "10px",
202
+ dark: "10px"
187
203
  },
188
204
  "--dsw-radius-lg": {
189
- light: "16px",
190
- dark: "16px"
205
+ light: "14px",
206
+ dark: "14px"
191
207
  },
192
208
  "--dsw-radius-xl": {
193
- light: "20px",
194
- dark: "20px"
209
+ light: "18px",
210
+ dark: "18px"
195
211
  },
196
212
  "--dsw-radius-panel": {
197
- light: "24px",
198
- dark: "24px"
213
+ light: "20px",
214
+ dark: "20px"
199
215
  },
200
216
  "--dsw-elevation-soft": {
201
- light: "0 1px 3px rgba(24, 38, 64, 0.04), 0 6px 18px -4px rgba(24, 38, 64, 0.07), 0 0 0 0.5px rgba(29, 108, 240, 0.1)",
202
- dark: "0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px -6px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(143, 196, 255, 0.12)"
217
+ light: "0 1px 3px rgba(15, 23, 42, 0.05), 0 6px 16px -3px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(37, 99, 235, 0.08)",
218
+ dark: "0 1px 3px rgba(3, 7, 18, 0.45), 0 6px 16px -3px rgba(3, 7, 18, 0.55), 0 0 0 1px rgba(96, 165, 250, 0.12)"
203
219
  },
204
220
  "--dsw-elevation-panel": {
205
- light: "0 2px 6px rgba(24, 38, 64, 0.04), 0 16px 40px -10px rgba(24, 38, 64, 0.14), 0 0 0 0.5px rgba(29, 108, 240, 0.12), inset 0 1px 0 #ffffff",
206
- dark: "0 2px 6px rgba(0, 0, 0, 0.5), 0 18px 44px -10px rgba(0, 0, 0, 0.75), 0 0 0 0.5px rgba(143, 196, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08)"
221
+ light: "0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 16px 36px -6px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(37, 99, 235, 0.10)",
222
+ dark: "0 4px 16px -2px rgba(3, 7, 18, 0.55), 0 16px 36px -6px rgba(3, 7, 18, 0.75), 0 0 0 1px rgba(96, 165, 250, 0.16)"
207
223
  },
208
224
  "--dsw-elevation-prominent": {
209
- light: "0 24px 56px -12px rgba(24, 38, 64, 0.20), 0 2px 6px rgba(24, 38, 64, 0.04), 0 0 0 0.5px rgba(29, 108, 240, 0.14), inset 0 1px 0 #ffffff",
210
- dark: "0 24px 56px -12px rgba(0, 0, 0, 0.85), 0 0 1px rgba(143, 196, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1)"
225
+ light: "0 20px 48px -10px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(37, 99, 235, 0.12)",
226
+ dark: "0 20px 48px -10px rgba(3, 7, 18, 0.85), 0 0 0 1px rgba(96, 165, 250, 0.20)"
211
227
  },
212
228
  "--dsw-elevation-stroke-color": {
213
- light: "rgba(29, 108, 240, 0.1)",
214
- dark: "rgba(143, 196, 255, 0.14)"
229
+ light: "rgba(37, 99, 235, 0.10)",
230
+ dark: "rgba(96, 165, 250, 0.16)"
215
231
  },
216
232
  "--dsw-menu-backdrop-filter": {
217
- light: "blur(20px) saturate(180%)",
218
- dark: "blur(24px) saturate(170%)"
233
+ light: "blur(16px)",
234
+ dark: "blur(16px)"
219
235
  },
220
236
  "--dsw-menu-surface-fill": {
221
- light: "#fffffffa",
222
- dark: "#0d182ae8"
237
+ light: "#fffffff8",
238
+ dark: "#142034f5"
223
239
  },
224
240
  "--dsw-alias-menu-group-header-fill": {
225
- light: "#fffffffa",
226
- dark: "#0d182ae8"
241
+ light: "#fffffff8",
242
+ dark: "#142034f5"
227
243
  },
228
244
  "--dsw-specific-menu": {
229
245
  light: "var(--dsw-menu-surface-fill)",
@@ -231,59 +247,59 @@ window.__ModuleLoader__.load({
231
247
  },
232
248
  "--dsw-specific-sidebar-fill": {
233
249
  light: "#edf3fa",
234
- dark: "#060b13"
250
+ dark: "#0e1726"
235
251
  },
236
252
  "--dsw-specific-selector": {
237
253
  light: "#ffffff",
238
- dark: "#122034"
254
+ dark: "#142034"
239
255
  },
240
256
  "--dsw-specific-input-major": {
241
257
  light: "#ffffff",
242
- dark: "#101c2e"
258
+ dark: "#10192a"
243
259
  },
244
260
  "--dsw-specific-bubble": {
245
- light: "#eaf2fc",
246
- dark: "#132238"
261
+ light: "#e8f1fd",
262
+ dark: "#16243b"
247
263
  },
248
264
  "--dsw-specific-bubble-highlight": {
249
- light: "#ddeaf9",
250
- dark: "#1a2e4c"
265
+ light: "#dbeafe",
266
+ dark: "#1d304f"
251
267
  },
252
268
  "--dsw-alias-markdown-code-block": {
253
- light: "#f1f5fa",
254
- dark: "#050a12"
269
+ light: "#f0f5fc",
270
+ dark: "#09101c"
255
271
  },
256
272
  "--dsw-alias-markdown-code-block-banner": {
257
- light: "#f1f5fa",
258
- dark: "#050a12"
273
+ light: "#f0f5fc",
274
+ dark: "#09101c"
259
275
  },
260
276
  "--dsw-alias-markdown-inline-code": {
261
- light: "#e8f0f9",
262
- dark: "#152943"
277
+ light: "#e2ecf9",
278
+ dark: "#152238"
263
279
  },
264
280
  "--dsw-alias-scrollbar-bg-l1": {
265
- light: "#1d6cf012",
266
- dark: "#8fc4ff1a"
281
+ light: "rgba(37, 99, 235, 0.08)",
282
+ dark: "rgba(96, 165, 250, 0.10)"
267
283
  },
268
284
  "--dsw-alias-scrollbar-bg-l2": {
269
- light: "#1d6cf024",
270
- dark: "#8fc4ff2b"
285
+ light: "rgba(37, 99, 235, 0.16)",
286
+ dark: "rgba(96, 165, 250, 0.18)"
271
287
  },
272
288
  "--dsw-alias-scrollbar-hover-l2": {
273
- light: "#1d6cf03b",
274
- dark: "#8fc4ff40"
289
+ light: "rgba(37, 99, 235, 0.26)",
290
+ dark: "rgba(96, 165, 250, 0.28)"
275
291
  },
276
292
  "--dsw-focus-ring-color": {
277
- light: "#1d6cf0",
278
- dark: "#4f9dff"
293
+ light: "#1d4ed8",
294
+ dark: "#38bdf8"
279
295
  },
280
296
  "--dsw-static-blue-450": {
281
- light: "#1d6cf0",
282
- dark: "#4f9dff"
297
+ light: "#1d4ed8",
298
+ dark: "#38bdf8"
283
299
  },
284
300
  "--dsw-static-neutral-bluish-400": {
285
- light: "#677d99",
286
- dark: "#758ba8"
301
+ light: "#64748b",
302
+ dark: "#93b4dc"
287
303
  }
288
304
  });
289
305
  //#endregion
@@ -306,49 +322,41 @@ window.__ModuleLoader__.load({
306
322
  * ========================================================================== */
307
323
 
308
324
  /* ============================================================================
309
- * 主题材质变量:门控层唯一事实源
325
+ * 潮汐主题材质变量(Tide Theme Surface Tokens)
310
326
  *
311
- * 三个自绘组件(HUD / 看板浮窗 / 委派图)在主题开启时套用同一套冰蓝玻璃:
312
- * 光源统一在左上(circle at 12% 0%),描边统一 0.5px,投影统一向下。
313
- * 开关关闭时这些变量不参与,组件回落到原生 token 表面。
327
+ * 遵循 workbuddy-design 规范:高端、克制、现代设计风格,纯正深海潮汐蓝体系
328
+ * 杜绝 AI 廉价蓝紫/粉色杂乱渐变与大光斑;底色采用深海曜岩蓝灰,禁用纯黑 #000000;
329
+ * 采用自然融入深海的漫反射柔影与精细物理边框。
314
330
  * ========================================================================== */
315
331
  body[data-dsh-tide-theme][data-ds-dark-theme] {
316
- --dsh-tide-glass-surface:
317
- radial-gradient(circle at 12% 0%, rgba(56, 132, 255, 0.14) 0%, transparent 52%),
318
- linear-gradient(180deg, rgba(20, 31, 48, 0.95) 0%, rgba(12, 18, 29, 0.97) 100%);
319
- --dsh-tide-glass-border: rgba(143, 196, 255, 0.18);
320
- --dsh-tide-glass-border-hover: rgba(143, 196, 255, 0.32);
321
- --dsh-tide-glass-blur: blur(26px) saturate(170%);
322
- --dsh-tide-glass-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.10);
323
- --dsh-tide-glass-shadow-hover: 0 16px 40px -6px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15);
324
- --dsh-tide-glass-shadow-panel: 0 24px 56px -12px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.10);
325
- --dsh-tide-glass-shadow-card: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px -4px rgba(0, 0, 0, 0.4);
326
- /* 内层卡面:比玻璃底色亮一档,形成可辨的明度台阶(B2)。
327
- * 用实色而非叠加半透白,避免与玻璃同色糊成一片。 */
328
- --dsh-tide-card-surface: linear-gradient(180deg, rgba(38, 52, 74, 0.96) 0%, rgba(28, 40, 58, 0.94) 100%);
329
- --dsh-tide-card-border: rgba(143, 196, 255, 0.20);
330
- --dsh-tide-card-border-hover: rgba(143, 196, 255, 0.36);
332
+ --dsh-tide-glass-surface: rgba(20, 32, 52, 0.95);
333
+ --dsh-tide-glass-border: rgba(96, 165, 250, 0.16);
334
+ --dsh-tide-glass-border-hover: rgba(96, 165, 250, 0.32);
335
+ --dsh-tide-glass-blur: blur(16px);
336
+ --dsh-tide-glass-shadow: 0 8px 24px -4px rgba(3, 7, 18, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
337
+ --dsh-tide-glass-shadow-hover: 0 12px 32px -4px rgba(3, 7, 18, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
338
+ --dsh-tide-glass-shadow-panel: 0 16px 40px -8px rgba(3, 7, 18, 0.75), 0 0 0 1px rgba(96, 165, 250, 0.16);
339
+ --dsh-tide-glass-shadow-card: 0 2px 8px -2px rgba(3, 7, 18, 0.45), 0 0 0 1px rgba(96, 165, 250, 0.12);
340
+ --dsh-tide-card-surface: #16243a;
341
+ --dsh-tide-card-border: rgba(96, 165, 250, 0.14);
342
+ --dsh-tide-card-border-hover: rgba(96, 165, 250, 0.28);
331
343
  }
332
344
 
333
345
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) {
334
- --dsh-tide-glass-surface:
335
- radial-gradient(circle at 12% 0%, rgba(29, 108, 240, 0.08) 0%, transparent 52%),
336
- linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 247, 254, 0.99) 100%);
337
- --dsh-tide-glass-border: rgba(29, 108, 240, 0.14);
338
- --dsh-tide-glass-border-hover: rgba(29, 108, 240, 0.30);
339
- --dsh-tide-glass-blur: blur(26px) saturate(170%);
340
- --dsh-tide-glass-shadow: inset 0 1px 0 #ffffff, 0 1px 3px rgba(24, 38, 64, 0.04), 0 8px 24px -6px rgba(24, 38, 64, 0.08);
341
- --dsh-tide-glass-shadow-hover: inset 0 1px 0 #ffffff, 0 4px 16px -4px rgba(29, 108, 240, 0.16);
342
- --dsh-tide-glass-shadow-panel: inset 0 1px 0 #ffffff, 0 1px 2px rgba(24, 33, 51, 0.04), 0 24px 56px -12px rgba(24, 33, 51, 0.22);
343
- --dsh-tide-glass-shadow-card: inset 0 1px 0 #ffffff, 0 1px 3px rgba(24, 38, 64, 0.04);
344
- /* 亮色卡片比白玻璃深一档冷灰,形成可辨台阶(B2) */
345
- --dsh-tide-card-surface: linear-gradient(180deg, #e4ecf8 0%, #d6e3f3 100%);
346
- --dsh-tide-card-border: rgba(29, 108, 240, 0.16);
347
- --dsh-tide-card-border-hover: rgba(29, 108, 240, 0.32);
348
- }
349
-
350
- /* —— Simplify Theme 全局深色玻璃底色(单一 Token 来源与精准结构选择器,body[data-dsh-tide-theme] 门控) —— */
351
- /* 宿主主框架:只在启用本主题时覆盖全局底色,基色复用现有 token 变量,不在 CSS 写第二套色值 */
346
+ --dsh-tide-glass-surface: rgba(255, 255, 255, 0.95);
347
+ --dsh-tide-glass-border: rgba(37, 99, 235, 0.12);
348
+ --dsh-tide-glass-border-hover: rgba(37, 99, 235, 0.24);
349
+ --dsh-tide-glass-blur: blur(16px);
350
+ --dsh-tide-glass-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(37, 99, 235, 0.08);
351
+ --dsh-tide-glass-shadow-hover: 0 8px 24px -4px rgba(15, 23, 42, 0.10), 0 0 0 1px rgba(37, 99, 235, 0.14);
352
+ --dsh-tide-glass-shadow-panel: 0 12px 32px -6px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(37, 99, 235, 0.10);
353
+ --dsh-tide-glass-shadow-card: 0 1px 4px rgba(15, 23, 42, 0.04), 0 0 0 1px rgba(37, 99, 235, 0.08);
354
+ --dsh-tide-card-surface: #ffffff;
355
+ --dsh-tide-card-border: rgba(37, 99, 235, 0.12);
356
+ --dsh-tide-card-border-hover: rgba(37, 99, 235, 0.22);
357
+ }
358
+
359
+ /* —— 潮汐主题全局底色(单一 Token 来源与精准结构选择器,body[data-dsh-tide-theme] 门控) —— */
352
360
  body[data-dsh-tide-theme][data-ds-dark-theme] {
353
361
  background-color: var(--dsw-alias-bg-base) !important;
354
362
  }
@@ -357,68 +365,62 @@ body[data-dsh-tide-theme]:not([data-ds-dark-theme]) {
357
365
  background-color: var(--dsw-alias-bg-base) !important;
358
366
  }
359
367
 
360
- /* 侧栏:深色曜石蓝黑分层 / 浅色通透冰蓝雾白分层 */
368
+ /* 侧栏:微偏暖深灰/浅灰分层 */
361
369
  body[data-dsh-tide-theme][data-ds-dark-theme] [class*='_sidebarCol'],
362
370
  body[data-dsh-tide-theme][data-ds-dark-theme] [data-slot='sidebar.workspaces'],
363
371
  body[data-dsh-tide-theme][data-ds-dark-theme] [data-slot='sidebar'] {
364
- background: linear-gradient(180deg, var(--dsw-specific-sidebar-fill) 0%, #080f18 100%) !important;
365
- border-right: 1px solid rgba(80, 140, 220, 0.12) !important;
372
+ background: var(--dsw-specific-sidebar-fill) !important;
373
+ border-right: 1px solid var(--dsw-alias-border-l1) !important;
366
374
  }
367
375
 
368
376
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [class*='_sidebarCol'],
369
377
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [data-slot='sidebar.workspaces'],
370
378
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [data-slot='sidebar'] {
371
- background: linear-gradient(180deg, var(--dsw-specific-sidebar-fill) 0%, #e6eff8 100%) !important;
372
- border-right: 0.5px solid rgba(29, 108, 240, 0.12) !important;
379
+ background: var(--dsw-specific-sidebar-fill) !important;
380
+ border-right: 1px solid var(--dsw-alias-border-l1) !important;
373
381
  }
374
382
 
375
- /* 中间主画布:深色顶部柔和蓝微光 / 浅色顶部柔和冰蓝微光(与看板浮窗顶部光晕完全同调) */
383
+ /* 中间主画布:纯粹克制的无微光中性底色 */
376
384
  body[data-dsh-tide-theme][data-ds-dark-theme] [class*='_centerCol'],
377
385
  body[data-dsh-tide-theme][data-ds-dark-theme] [data-conversation-scroll] {
378
- background:
379
- radial-gradient(120% 60% at 50% -10%, rgba(30, 80, 180, 0.12) 0%, transparent 60%),
380
- radial-gradient(ellipse at 80% 100%, rgba(20, 60, 140, 0.08) 0%, transparent 50%),
381
- var(--dsw-alias-bg-base) !important;
386
+ background: var(--dsw-alias-bg-base) !important;
382
387
  }
383
388
 
384
389
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [class*='_centerCol'],
385
390
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [data-conversation-scroll] {
386
- background:
387
- radial-gradient(120% 60% at 50% -10%, rgba(29, 108, 240, 0.07) 0%, transparent 60%),
388
- radial-gradient(ellipse at 85% 100%, rgba(29, 108, 240, 0.04) 0%, transparent 50%),
389
- var(--dsw-alias-bg-base) !important;
391
+ background: var(--dsw-alias-bg-base) !important;
390
392
  }
391
393
 
392
- /* 顶栏头部与面包屑:精准定位真正的对话头部,毛玻璃质感,不匹配全局 _header */
394
+ /* 顶栏头部与面包屑:精准定位真正的对话头部,克制毛玻璃质感 */
393
395
  body[data-dsh-tide-theme][data-ds-dark-theme] header[class*='_header']:has([data-conversation-header-leading]),
394
396
  body[data-dsh-tide-theme][data-ds-dark-theme] header[class*='_header']:has([data-conversation-header-corner]),
395
397
  body[data-dsh-tide-theme][data-ds-dark-theme] [data-conversation-header-leading],
396
398
  body[data-dsh-tide-theme][data-ds-dark-theme] [data-conversation-header-corner] {
397
- background: color-mix(in srgb, var(--dsw-alias-bg-base) 75%, transparent) !important;
399
+ background: color-mix(in srgb, var(--dsw-alias-bg-base) 80%, transparent) !important;
398
400
  backdrop-filter: blur(16px);
399
401
  -webkit-backdrop-filter: blur(16px);
400
- border-bottom: 1px solid rgba(80, 140, 220, 0.12) !important;
402
+ border-bottom: 1px solid var(--dsw-alias-border-l1) !important;
401
403
  }
402
404
 
403
405
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) header[class*='_header']:has([data-conversation-header-leading]),
404
406
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) header[class*='_header']:has([data-conversation-header-corner]),
405
407
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [data-conversation-header-leading],
406
408
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [data-conversation-header-corner] {
407
- background: color-mix(in srgb, var(--dsw-alias-bg-base) 80%, transparent) !important;
408
- backdrop-filter: blur(18px);
409
- -webkit-backdrop-filter: blur(18px);
410
- border-bottom: 0.5px solid rgba(29, 108, 240, 0.10) !important;
409
+ background: color-mix(in srgb, var(--dsw-alias-bg-base) 85%, transparent) !important;
410
+ backdrop-filter: blur(16px);
411
+ -webkit-backdrop-filter: blur(16px);
412
+ border-bottom: 1px solid var(--dsw-alias-border-l1) !important;
411
413
  }
412
414
 
413
415
  /* 右侧抽屉 / 产物栏(如 diff viewer) */
414
416
  body[data-dsh-tide-theme][data-ds-dark-theme] [class*='_rightbarCol'] {
415
417
  background: var(--dsw-alias-bg-layer-1) !important;
416
- border-left: 1px solid rgba(80, 140, 220, 0.12) !important;
418
+ border-left: 1px solid var(--dsw-alias-border-l1) !important;
417
419
  }
418
420
 
419
421
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [class*='_rightbarCol'] {
420
422
  background: var(--dsw-alias-bg-layer-1) !important;
421
- border-left: 0.5px solid rgba(29, 108, 240, 0.10) !important;
423
+ border-left: 1px solid var(--dsw-alias-border-l1) !important;
422
424
  }
423
425
 
424
426
  /* —— 侧栏:行悬停玻璃高亮 + 会话行文字层级(受 body[data-dsh-tide-theme] 门控) —— */
@@ -432,51 +434,40 @@ body[data-dsh-tide-theme] [data-row-key][data-selected] {
432
434
  background: var(--dsw-alias-interactive-bg-active);
433
435
  }
434
436
 
435
- /* —— 输入卡片:玻璃卡面(渐变 + 内高光 + 定向投影),亮暗各自成立(受 body[data-dsh-tide-theme] 门控) —— */
437
+ /* —— 输入卡片:沉稳深海蓝灰卡面,克制 1px 描边与自然投影 —— */
436
438
  body[data-dsh-tide-theme] [data-composer-card] {
437
439
  background: var(--dsw-specific-input-major);
438
440
  box-shadow: var(--dsw-elevation-soft);
439
441
  }
440
442
 
441
443
  body[data-dsh-tide-theme][data-ds-dark-theme] [data-composer-card] {
442
- border: 0.5px solid rgba(143, 196, 255, 0.18) !important;
443
- background:
444
- radial-gradient(circle at 12% 0%, rgba(56, 132, 255, 0.12) 0%, transparent 52%),
445
- linear-gradient(180deg, rgba(20, 31, 48, 0.95) 0%, rgba(12, 18, 29, 0.97) 100%);
446
- backdrop-filter: blur(24px);
447
- -webkit-backdrop-filter: blur(24px);
448
- box-shadow:
449
- inset 0 1px 0 rgba(255, 255, 255, 0.10),
450
- 0 16px 40px -12px rgba(0, 0, 0, 0.75);
444
+ border: 1px solid var(--dsw-alias-border-l2) !important;
445
+ background: var(--dsw-specific-input-major) !important;
446
+ backdrop-filter: blur(16px);
447
+ -webkit-backdrop-filter: blur(16px);
448
+ box-shadow: 0 4px 20px -4px rgba(3, 7, 18, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
451
449
  }
452
450
 
453
451
  body[data-dsh-tide-theme][data-ds-dark-theme] [data-composer-card]:focus-within {
454
- border-color: rgba(143, 196, 255, 0.35) !important;
452
+ border-color: rgba(56, 189, 248, 0.5) !important;
455
453
  box-shadow:
456
- inset 0 1px 0 rgba(255, 255, 255, 0.18),
457
- 0 0 0 1px rgba(143, 196, 255, 0.20),
458
- 0 20px 48px -10px rgba(0, 0, 0, 0.85);
454
+ 0 0 0 2px rgba(56, 189, 248, 0.18),
455
+ 0 8px 30px -4px rgba(3, 7, 18, 0.75);
459
456
  }
460
457
 
461
458
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [data-composer-card] {
462
- border: 0.5px solid rgba(29, 108, 240, 0.14) !important;
463
- background:
464
- radial-gradient(circle at 12% 0%, rgba(29, 108, 240, 0.05) 0%, transparent 52%),
465
- linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 248, 254, 0.96) 100%);
466
- backdrop-filter: blur(24px);
467
- -webkit-backdrop-filter: blur(24px);
468
- box-shadow:
469
- inset 0 1px 0 #ffffff,
470
- 0 2px 8px -2px rgba(24, 38, 64, 0.04),
471
- 0 16px 40px -12px rgba(24, 38, 64, 0.12);
459
+ border: 1px solid var(--dsw-alias-border-l2) !important;
460
+ background: #ffffff !important;
461
+ backdrop-filter: blur(16px);
462
+ -webkit-backdrop-filter: blur(16px);
463
+ box-shadow: 0 2px 12px -2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(37, 99, 235, 0.06);
472
464
  }
473
465
 
474
466
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) [data-composer-card]:focus-within {
475
- border-color: rgba(29, 108, 240, 0.30) !important;
467
+ border-color: rgba(29, 78, 216, 0.45) !important;
476
468
  box-shadow:
477
- inset 0 1px 0 #ffffff,
478
- 0 0 0 1px rgba(29, 108, 240, 0.16),
479
- 0 20px 48px -12px rgba(24, 38, 64, 0.18);
469
+ 0 0 0 2px rgba(29, 78, 216, 0.12),
470
+ 0 4px 16px -2px rgba(15, 23, 42, 0.08);
480
471
  }
481
472
 
482
473
  /* —— 全局滚动条:窄、圆、同色相(受 body[data-dsh-tide-theme] 门控) —— */
@@ -590,7 +581,7 @@ body[data-dsh-tide-theme] ::selection {
590
581
  }
591
582
 
592
583
  /* 主题风格层:开关打开时(body 带 data-dsh-tide-theme)三个组件套用插件自有的
593
- * 冰蓝玻璃材质——径向微光 + 定向双层投影 + 发丝描边;关闭时上面的原生 token 值生效,
584
+ * 潮汐深海材质——哑光微透 + 0.5px 发丝描边 + 漫反射柔影;关闭时上面的原生 token 值生效,
594
585
  * 与 DSH 完全一致。明暗两套各自成立,色相体系同源。 */
595
586
  body[data-dsh-tide-theme] .dsh-tide-dock-stats-trigger {
596
587
  border: 0.5px solid var(--dsh-tide-glass-border);
@@ -702,12 +693,13 @@ body[data-dsh-tide-theme] .dsh-tide-dock-stats-trigger[aria-expanded='true'] {
702
693
  color: var(--dsw-alias-state-error-primary);
703
694
  }
704
695
 
705
- /* 读数:13px 与标签同级(DSH TodoPanel 标题规格),不再是大号仪表数字 */
696
+ /* 读数:13px 精密航海等宽读数 */
706
697
  .dsh-tide-hud-number {
707
698
  font-size: var(--dsw-font-xs-13-font-size, 13px);
708
699
  line-height: var(--dsw-font-xs-13-line-height, 20px);
709
700
  font-weight: 500;
710
- font-family: Inter, var(--dsw-font-family), -apple-system, system-ui, sans-serif;
701
+ font-family: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
702
+ font-feature-settings: "tnum" 1;
711
703
  color: var(--dsw-alias-label-primary);
712
704
  font-variant-numeric: tabular-nums;
713
705
  }
@@ -724,12 +716,14 @@ body[data-dsh-tide-theme] .dsh-tide-dock-stats-trigger[aria-expanded='true'] {
724
716
  line-height: 16px;
725
717
  font-weight: 500;
726
718
  margin-left: 2px;
719
+ font-family: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
720
+ font-feature-settings: "tnum" 1;
721
+ font-variant-numeric: tabular-nums;
727
722
  color: var(--dsw-alias-state-success-primary);
728
723
  }
729
724
 
730
725
  .dsh-tide-hud-percent[data-bucket='warn'] {
731
- /* 浅色下 warn-label 偏黄绿难分辨,与全插件同一基准:#d97706 */
732
- color: var(--dsw-alias-state-warn-primary, #d97706);
726
+ color: var(--dsw-alias-state-warn-primary);
733
727
  }
734
728
 
735
729
  .dsh-tide-hud-percent[data-bucket='bad'] {
@@ -781,33 +775,16 @@ body[data-dsh-tide-theme] .dsh-tide-dock-stats-trigger[aria-expanded='true'] {
781
775
 
782
776
  .dsh-tide-hud-val {
783
777
  display: inline-block;
778
+ min-width: 0;
779
+ max-width: 160px;
780
+ overflow: hidden;
781
+ text-overflow: ellipsis;
784
782
  font-variant-numeric: tabular-nums;
785
783
  white-space: nowrap;
784
+ vertical-align: middle;
786
785
  }
787
786
 
788
- /* 频谱装饰:低亮度等宽柱形,不闪动、不冒充实时采样。 */
789
- .dsh-tide-eq {
790
- display: inline-flex;
791
- align-items: flex-end;
792
- gap: 2px;
793
- height: 11px;
794
- padding-bottom: 1px;
795
- opacity: 0.75;
796
- }
797
-
798
- .dsh-tide-eq-bar {
799
- width: 2px;
800
- border-radius: 1px;
801
- background: var(--dsw-alias-state-success-primary);
802
- opacity: 0.75;
803
- }
804
-
805
- .dsh-tide-eq-bar:nth-child(1) { height: 35%; }
806
- .dsh-tide-eq-bar:nth-child(2) { height: 95%; }
807
- .dsh-tide-eq-bar:nth-child(3) { height: 60%; }
808
- .dsh-tide-eq-bar:nth-child(4) { height: 80%; }
809
-
810
- /* 主题风格层:浮窗本体套用冰蓝玻璃材质(关掉主题开关即回到上面的原生 token 值) */
787
+ /* 主题风格层:浮窗本体套用潮汐深海材质(关掉主题开关即回到上面的原生 token 值) */
811
788
  body[data-dsh-tide-theme] .dsh-tide-stats-popover {
812
789
  border: 0.5px solid var(--dsh-tide-glass-border);
813
790
  background: var(--dsh-tide-glass-surface);
@@ -840,6 +817,11 @@ body[data-dsh-tide-theme] .dsh-tide-stats-detail-list {
840
817
  z-index: 1000;
841
818
  width: 400px;
842
819
  max-width: calc(100vw - 32px);
820
+ /* 上限按最满内容(约 590px)留出余量:数据齐全时不产生内部滚动,
821
+ * 只在矮视口下才由 vh 约束接管并滚动,避免默认场景被裁掉末行。 */
822
+ max-height: min(640px, calc(100vh - 48px));
823
+ overflow-y: auto;
824
+ overscroll-behavior: contain;
843
825
  box-sizing: border-box;
844
826
  padding: 16px 18px;
845
827
  border: 0.5px solid var(--dsw-alias-border-l1);
@@ -1067,10 +1049,16 @@ body[data-dsh-tide-theme] .dsh-tide-stats-detail-list {
1067
1049
 
1068
1050
  .dsh-tide-stats-card-v {
1069
1051
  color: var(--dsw-alias-label-primary);
1052
+ font-family: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
1053
+ font-feature-settings: "tnum" 1;
1070
1054
  font-size: var(--dsw-font-base-strong-16-font-size, 16px);
1071
1055
  font-weight: 600;
1072
1056
  line-height: var(--dsw-font-base-strong-16-line-height, 20px);
1073
1057
  font-variant-numeric: tabular-nums;
1058
+ min-width: 0;
1059
+ overflow: hidden;
1060
+ text-overflow: ellipsis;
1061
+ white-space: nowrap;
1074
1062
  }
1075
1063
 
1076
1064
  .dsh-tide-stats-card-v.is-highlight { color: var(--dsw-alias-label-primary-bluish); }
@@ -1401,6 +1389,15 @@ body[data-dsh-tide-theme] .dsh-tide-stats-detail-list {
1401
1389
  padding: 5px 8px;
1402
1390
  border-radius: var(--dsw-radius-sm);
1403
1391
  font: inherit;
1392
+ min-width: 0;
1393
+ box-sizing: border-box;
1394
+ }
1395
+
1396
+ [data-dsh-tide-popup] button[data-dsh-tide-item] > span:not([data-dsh-tide-badge]):not([data-dsh-tide-check]) {
1397
+ min-width: 0;
1398
+ overflow: hidden;
1399
+ text-overflow: ellipsis;
1400
+ white-space: nowrap;
1404
1401
  }
1405
1402
 
1406
1403
  [data-dsh-tide-popup] button[data-dsh-tide-item]:hover,
@@ -1603,7 +1600,7 @@ body[data-dsh-tide-theme] .dsh-tide-stats-detail-list {
1603
1600
  padding: 2px 0;
1604
1601
  }
1605
1602
 
1606
- /* 主题风格层:委派图三件套(摘要条 / 画布 / 卡片)套用同一套冰蓝玻璃材质。
1603
+ /* 主题风格层:委派图三件套(摘要条 / 画布 / 卡片)套用同一套潮汐深海材质。
1607
1604
  * 关闭主题开关后这些规则失效,回落到上面的原生 token 值。 */
1608
1605
  body[data-dsh-tide-theme] .subagent-topology-summary,
1609
1606
  body[data-dsh-tide-theme] .subagent-topology-detail {
@@ -1706,7 +1703,7 @@ body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-root-icon
1706
1703
  min-width: 0;
1707
1704
  overflow: hidden;
1708
1705
  font-size: 12px;
1709
- color: var(--dsw-alias-label-tertiary, #758ba8);
1706
+ color: var(--dsw-alias-label-tertiary);
1710
1707
  text-overflow: ellipsis;
1711
1708
  white-space: nowrap;
1712
1709
  font-variant-numeric: tabular-nums;
@@ -1721,7 +1718,7 @@ body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-root-icon
1721
1718
  display: inline-flex;
1722
1719
  flex: none;
1723
1720
  margin-left: auto;
1724
- color: var(--dsw-alias-label-tertiary, #758ba8);
1721
+ color: var(--dsw-alias-label-tertiary);
1725
1722
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
1726
1723
  }
1727
1724
 
@@ -1785,11 +1782,6 @@ body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-root-icon
1785
1782
  box-shadow: var(--dsw-elevation-panel);
1786
1783
  }
1787
1784
 
1788
- /* 移除悬空无指引的向上大箭头 */
1789
- .subagent-orchestrator-arrow {
1790
- display: none !important;
1791
- }
1792
-
1793
1785
  .subagent-root-title-row {
1794
1786
  display: flex;
1795
1787
  flex-wrap: wrap;
@@ -1815,8 +1807,8 @@ body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-root-icon
1815
1807
  }
1816
1808
 
1817
1809
  @keyframes dsh-chip-pulse {
1818
- from { opacity: 0.82; box-shadow: 0 0 0 rgba(56, 214, 138, 0); }
1819
- to { opacity: 1; box-shadow: 0 0 8px rgba(56, 214, 138, 0.45); }
1810
+ from { opacity: 0.75; }
1811
+ to { opacity: 1; }
1820
1812
  }
1821
1813
 
1822
1814
  .subagent-root-sub {
@@ -1901,9 +1893,9 @@ body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-root-icon
1901
1893
  animation: dsh-topology-dash 1.1s linear infinite;
1902
1894
  }
1903
1895
 
1904
- /* 连线发光是插件主题语言,仅在主题开启时叠加 */
1896
+ /* 连线保持利落克制的工程感,无外发光辉光 */
1905
1897
  body[data-dsh-tide-theme] .subagent-topology:has(.outcome-running) .subagent-topology-lines path {
1906
- filter: drop-shadow(0 0 3px rgba(90, 170, 255, 0.7));
1898
+ stroke: var(--dsw-alias-state-business-primary);
1907
1899
  }
1908
1900
 
1909
1901
  @media (prefers-reduced-motion: reduce) {
@@ -1938,12 +1930,12 @@ body[data-dsh-tide-theme] .subagent-topology:has(.outcome-running) .subagent-top
1938
1930
  align-items: stretch;
1939
1931
  gap: 0;
1940
1932
  box-sizing: border-box;
1941
- min-height: 194px;
1933
+ min-height: 130px;
1942
1934
  padding: 14px;
1943
1935
  border: none;
1944
1936
  border-radius: inherit;
1945
1937
  background: transparent;
1946
- color: var(--dsw-alias-label-secondary, #9fb0c9);
1938
+ color: var(--dsw-alias-label-secondary);
1947
1939
  font: inherit;
1948
1940
  text-align: left;
1949
1941
  cursor: pointer;
@@ -2098,33 +2090,35 @@ body[data-dsh-tide-theme] .subagent-topology-avatar {
2098
2090
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
2099
2091
  }
2100
2092
 
2101
- /* 头像配色属于插件主题风格:仅主题开启时生效,关闭后回落到中性 token 外观 */
2093
+ /* 头像配色属于插件主题风格:仅主题开启时生效,关闭后回落到中性 token 外观。
2094
+ * 遵循 workbuddy-design 规范:杜绝霓虹外发光与廉价蓝紫渐变,采用克制物理微阴影与高辨识度单色前景 */
2095
+ body[data-dsh-tide-theme][data-ds-dark-theme] .subagent-topology-avatar.is-cyan,
2102
2096
  body[data-dsh-tide-theme][data-ds-dark-theme] .subagent-topology-avatar.is-purple {
2103
- border: 1px solid rgba(168, 132, 255, 0.4);
2104
- background: linear-gradient(150deg, rgba(168, 132, 255, 0.3) 0%, rgba(120, 80, 220, 0.12) 100%);
2105
- color: #c4a9ff;
2106
- box-shadow: 0 0 12px rgba(168, 132, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16);
2097
+ border: 1px solid rgba(56, 189, 248, 0.28);
2098
+ background: rgba(56, 189, 248, 0.10);
2099
+ color: #38bdf8;
2100
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
2107
2101
  }
2108
2102
 
2109
2103
  body[data-dsh-tide-theme][data-ds-dark-theme] .subagent-topology-avatar.is-green {
2110
- border: 1px solid rgba(74, 222, 158, 0.38);
2111
- background: linear-gradient(150deg, rgba(74, 222, 158, 0.28) 0%, rgba(20, 150, 100, 0.12) 100%);
2112
- color: #6ee7b7;
2113
- box-shadow: 0 0 12px rgba(74, 222, 158, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.16);
2104
+ border: 1px solid rgba(52, 211, 153, 0.28);
2105
+ background: rgba(52, 211, 153, 0.10);
2106
+ color: #34d399;
2107
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
2114
2108
  }
2115
2109
 
2116
2110
  body[data-dsh-tide-theme][data-ds-dark-theme] .subagent-topology-avatar.is-orange {
2117
- border: 1px solid rgba(251, 178, 74, 0.38);
2118
- background: linear-gradient(150deg, rgba(251, 178, 74, 0.28) 0%, rgba(190, 120, 20, 0.12) 100%);
2119
- color: #fbd38d;
2120
- box-shadow: 0 0 12px rgba(251, 178, 74, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.16);
2111
+ border: 1px solid rgba(251, 191, 36, 0.28);
2112
+ background: rgba(251, 191, 36, 0.10);
2113
+ color: #fbbf24;
2114
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
2121
2115
  }
2122
2116
 
2123
2117
  body[data-dsh-tide-theme][data-ds-dark-theme] .subagent-topology-avatar.is-blue {
2124
- border: 1px solid rgba(110, 168, 255, 0.4);
2125
- background: linear-gradient(150deg, rgba(110, 168, 255, 0.3) 0%, rgba(40, 100, 200, 0.12) 100%);
2126
- color: var(--dsw-alias-label-primary-bluish);
2127
- box-shadow: 0 0 12px rgba(110, 168, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.16);
2118
+ border: 1px solid rgba(96, 165, 250, 0.28);
2119
+ background: rgba(96, 165, 250, 0.10);
2120
+ color: #60a5fa;
2121
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
2128
2122
  }
2129
2123
 
2130
2124
  /* 未开启主题时,头像用中性 token 外观(与 DSH 原生图标一致) */
@@ -2229,6 +2223,11 @@ body[data-dsh-tide-theme][data-ds-dark-theme] .subagent-topology-avatar.is-blue
2229
2223
  background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);
2230
2224
  }
2231
2225
 
2226
+ .subagent-stop-button:focus-visible {
2227
+ outline: 2px solid var(--dsw-alias-state-error-primary);
2228
+ outline-offset: 1px;
2229
+ }
2230
+
2232
2231
  /* 停止按钮浮在卡片右下角,不再撑高卡片内容。 */
2233
2232
  .subagent-topology-node-actions:has(> .subagent-stop-button) .subagent-topology-node-header { padding-bottom: 34px; }
2234
2233
 
@@ -2278,9 +2277,7 @@ body[data-dsh-tide-theme][data-ds-dark-theme] .subagent-topology-avatar.is-blue
2278
2277
  }
2279
2278
 
2280
2279
  [data-dsh-tide-pct='warn'] {
2281
- /* 宿主 --dsw-alias-state-warn-label 在浅色主题里偏黄绿,和成功色难以区分;
2282
- 这里用明确的琥珀色,保证 50–75% 一眼能读成「该注意了」。 */
2283
- color: #d97706;
2280
+ color: var(--dsw-alias-state-warn-primary);
2284
2281
  }
2285
2282
 
2286
2283
  [data-dsh-tide-pct='bad'] {
@@ -2323,6 +2320,11 @@ body[data-ds-dark-theme] [data-dsh-tide-pct='warn'] { color: #ffc46b; }
2323
2320
  background: var(--dsw-alias-interactive-bg-hover);
2324
2321
  }
2325
2322
 
2323
+ [data-dsh-tide-tab]:focus-visible {
2324
+ outline: 2px solid var(--dsw-alias-state-business-primary);
2325
+ outline-offset: -1px;
2326
+ }
2327
+
2326
2328
  [data-dsh-tide-tab][data-active='true'] {
2327
2329
  color: var(--dsw-alias-label-primary);
2328
2330
  font-weight: 500;
@@ -2548,13 +2550,12 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key^='works
2548
2550
 
2549
2551
  [data-dsh-tide-pinned] [data-row-key^='workspace:']::before {
2550
2552
  content: '★ ';
2551
- color: var(--dsw-alias-state-warn-label, #eab308);
2553
+ color: var(--dsw-alias-state-warn-primary);
2552
2554
  font-size: 11px;
2553
2555
  line-height: 1;
2554
- margin-right: 3px;
2556
+ margin-right: 4px;
2555
2557
  display: inline-block;
2556
2558
  vertical-align: baseline;
2557
- filter: drop-shadow(0 0 3px rgba(234, 179, 8, 0.4));
2558
2559
  }
2559
2560
 
2560
2561
  body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][data-selected='true'],
@@ -2573,8 +2574,7 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2573
2574
  bottom: 4px;
2574
2575
  width: 3px;
2575
2576
  border-radius: 2px;
2576
- background: var(--dsw-alias-state-business-primary, #2563eb);
2577
- box-shadow: 0 0 8px rgba(37, 99, 235, 0.5);
2577
+ background: var(--dsw-alias-state-business-primary);
2578
2578
  }
2579
2579
 
2580
2580
  /* 侧栏独立小节分区分组(方案 A:Linear / Slack / Notion 风格) */
@@ -2686,22 +2686,27 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2686
2686
  }
2687
2687
 
2688
2688
  .dsh-tide-settings-card {
2689
- border: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, 0.08));
2689
+ border: 1px solid var(--dsw-alias-border-l1);
2690
2690
  border-radius: var(--dsw-radius-lg, 12px);
2691
- background: var(--dsw-alias-bg-layer-2, #ffffff);
2692
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.1);
2691
+ background: var(--dsw-alias-bg-layer-2);
2692
+ box-shadow: var(--dsw-elevation-soft);
2693
2693
  overflow: hidden;
2694
2694
  }
2695
2695
 
2696
+ body[data-ds-dark-theme] .dsh-tide-settings-card {
2697
+ border-color: var(--dsh-tide-card-border);
2698
+ background: var(--dsh-tide-card-surface);
2699
+ }
2700
+
2696
2701
  .dsh-tide-settings-group-title {
2697
2702
  padding: 10px 14px 6px;
2698
- font-size: 11.5px;
2703
+ font-size: 11px;
2699
2704
  font-weight: 600;
2700
- color: var(--dsw-alias-label-tertiary, #6b7280);
2705
+ color: var(--dsw-alias-label-tertiary);
2701
2706
  text-transform: uppercase;
2702
2707
  letter-spacing: 0.04em;
2703
- background: var(--dsw-alias-interactive-bg-subtle, rgba(0, 0, 0, 0.015));
2704
- border-bottom: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, 0.04));
2708
+ background: var(--dsw-alias-interactive-bg-subtle);
2709
+ border-bottom: 1px solid var(--dsw-alias-border-l1);
2705
2710
  }
2706
2711
 
2707
2712
  .dsh-tide-settings-list {
@@ -2718,7 +2723,7 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2718
2723
  }
2719
2724
 
2720
2725
  .dsh-tide-settings-row + .dsh-tide-settings-row {
2721
- border-top: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, 0.05));
2726
+ border-top: 1px solid var(--dsw-alias-border-l1);
2722
2727
  }
2723
2728
 
2724
2729
  .dsh-tide-settings-row-text {
@@ -2731,12 +2736,12 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2731
2736
  .dsh-tide-settings-item-title {
2732
2737
  font-size: 13px;
2733
2738
  font-weight: 500;
2734
- color: var(--dsw-alias-label-primary, #0f1115);
2739
+ color: var(--dsw-alias-label-primary);
2735
2740
  }
2736
2741
 
2737
2742
  .dsh-tide-settings-item-desc {
2738
- font-size: 11.5px;
2739
- color: var(--dsw-alias-label-tertiary, #6b7280);
2743
+ font-size: 11px;
2744
+ color: var(--dsw-alias-label-tertiary);
2740
2745
  line-height: 16px;
2741
2746
  }
2742
2747
 
@@ -2750,20 +2755,24 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2750
2755
  padding: 2px;
2751
2756
  border-radius: 999px;
2752
2757
  border: 0.5px solid var(--dsw-alias-border-l2);
2753
- background: var(--dsw-alias-border-l1, rgba(0, 0, 0, 0.1));
2758
+ background: var(--dsw-alias-border-l2);
2754
2759
  cursor: pointer;
2755
- transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
2760
+ transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.15s ease;
2756
2761
  box-sizing: border-box;
2757
2762
  }
2758
2763
 
2764
+ .dsh-tide-switch:hover {
2765
+ filter: brightness(1.08);
2766
+ }
2767
+
2759
2768
  .dsh-tide-switch:focus-visible {
2760
- outline: 2px solid var(--dsw-alias-state-business-primary, #2563eb);
2769
+ outline: 2px solid var(--dsw-alias-state-business-primary);
2761
2770
  outline-offset: 2px;
2762
2771
  }
2763
2772
 
2764
2773
  .dsh-tide-switch[data-active='true'] {
2765
- background: var(--dsw-alias-state-business-primary, #2563eb);
2766
- border-color: var(--dsw-alias-state-business-primary, #2563eb);
2774
+ background: var(--dsw-alias-state-business-primary);
2775
+ border-color: var(--dsw-alias-state-business-primary);
2767
2776
  }
2768
2777
 
2769
2778
  .dsh-tide-switch-knob {
@@ -2771,7 +2780,7 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2771
2780
  height: 16px;
2772
2781
  border-radius: 999px;
2773
2782
  background: #ffffff;
2774
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
2783
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
2775
2784
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
2776
2785
  transform: translateX(0);
2777
2786
  }
@@ -2789,12 +2798,12 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2789
2798
  }
2790
2799
 
2791
2800
  .dsh-tide-settings-notice {
2792
- color: var(--dsw-alias-state-success-primary, #16a34a);
2801
+ color: var(--dsw-alias-state-success-primary);
2793
2802
  font-weight: 500;
2794
2803
  }
2795
2804
 
2796
2805
  .dsh-tide-settings-hint {
2797
- color: var(--dsw-alias-label-tertiary, #9ca3af);
2806
+ color: var(--dsw-alias-label-tertiary);
2798
2807
  }
2799
2808
 
2800
2809
  .dsh-tide-settings-reset-btn {
@@ -2803,15 +2812,20 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2803
2812
  border: 0.5px solid var(--dsw-alias-border-l2);
2804
2813
  background: var(--dsw-alias-bg-layer-2);
2805
2814
  color: var(--dsw-alias-label-secondary);
2806
- font-size: 11.5px;
2815
+ font-size: 11px;
2807
2816
  cursor: pointer;
2808
2817
  transition: all 0.15s ease;
2809
2818
  }
2810
2819
 
2811
2820
  .dsh-tide-settings-reset-btn:hover {
2812
- border-color: var(--dsw-alias-border-l3, rgba(0, 0, 0, 0.25));
2813
- color: var(--dsw-alias-label-primary, #0f1115);
2814
- background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, 0.04));
2821
+ border-color: var(--dsw-alias-border-l3);
2822
+ color: var(--dsw-alias-label-primary);
2823
+ background: var(--dsw-alias-interactive-bg-hover);
2824
+ }
2825
+
2826
+ .dsh-tide-settings-reset-btn:focus-visible {
2827
+ outline: 2px solid var(--dsw-alias-state-business-primary);
2828
+ outline-offset: 1px;
2815
2829
  }
2816
2830
 
2817
2831
  /* 数值步进器控件 */
@@ -2819,8 +2833,8 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2819
2833
  display: inline-flex;
2820
2834
  align-items: center;
2821
2835
  gap: 4px;
2822
- background: var(--dsw-alias-interactive-bg-subtle, rgba(0, 0, 0, 0.03));
2823
- border: 1px solid var(--dsw-alias-border-l1, rgba(0, 0, 0, 0.1));
2836
+ background: var(--dsw-alias-interactive-bg-subtle);
2837
+ border: 1px solid var(--dsw-alias-border-l1);
2824
2838
  border-radius: 8px;
2825
2839
  padding: 2px 4px;
2826
2840
  flex: none;
@@ -2835,15 +2849,20 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2835
2849
  background: transparent;
2836
2850
  border: none;
2837
2851
  border-radius: 4px;
2838
- color: var(--dsw-alias-label-primary, #0f1115);
2839
- font-size: 15px;
2852
+ color: var(--dsw-alias-label-primary);
2853
+ font-size: 14px;
2840
2854
  font-weight: 500;
2841
2855
  cursor: pointer;
2842
2856
  transition: background 0.12s ease;
2843
2857
  }
2844
2858
 
2845
2859
  .dsh-tide-stepper-btn:hover:not(:disabled) {
2846
- background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, 0.06));
2860
+ background: var(--dsw-alias-interactive-bg-hover);
2861
+ }
2862
+
2863
+ .dsh-tide-stepper-btn:focus-visible {
2864
+ outline: 2px solid var(--dsw-alias-state-business-primary);
2865
+ outline-offset: 1px;
2847
2866
  }
2848
2867
 
2849
2868
  .dsh-tide-stepper-btn:disabled {
@@ -2854,10 +2873,10 @@ body[data-dsh-tide-theme] [data-slot='sidebar.workspaces'] [data-row-key][aria-s
2854
2873
  .dsh-tide-stepper-val {
2855
2874
  min-width: 52px;
2856
2875
  text-align: center;
2857
- font-size: 12.5px;
2876
+ font-size: 13px;
2858
2877
  font-weight: 600;
2859
2878
  font-variant-numeric: tabular-nums;
2860
- color: var(--dsw-alias-label-primary, #0f1115);
2879
+ color: var(--dsw-alias-label-primary);
2861
2880
  }
2862
2881
 
2863
2882
  /* ============================================================================
@@ -2927,30 +2946,31 @@ body:not([data-ds-dark-theme]) .subagent-stop-button {
2927
2946
  box-shadow: var(--dsw-elevation-soft);
2928
2947
  }
2929
2948
 
2949
+ body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-avatar.is-cyan,
2930
2950
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-avatar.is-purple {
2931
- border-color: rgba(139, 92, 246, 0.3);
2932
- background: linear-gradient(150deg, rgba(139, 92, 246, 0.16) 0%, rgba(139, 92, 246, 0.05) 100%);
2933
- color: #7c3aed;
2951
+ border-color: rgba(2, 132, 199, 0.24);
2952
+ background: rgba(2, 132, 199, 0.08);
2953
+ color: #0284c7;
2934
2954
  box-shadow: inset 0 1px 0 #ffffff;
2935
2955
  }
2936
2956
 
2937
2957
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-avatar.is-green {
2938
- border-color: rgba(16, 145, 90, 0.28);
2939
- background: linear-gradient(150deg, rgba(16, 145, 90, 0.14) 0%, rgba(16, 145, 90, 0.04) 100%);
2940
- color: #0f7a44;
2958
+ border-color: rgba(4, 120, 87, 0.24);
2959
+ background: rgba(4, 120, 87, 0.08);
2960
+ color: #047857;
2941
2961
  box-shadow: inset 0 1px 0 #ffffff;
2942
2962
  }
2943
2963
 
2944
2964
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-avatar.is-orange {
2945
- border-color: rgba(217, 119, 6, 0.28);
2946
- background: linear-gradient(150deg, rgba(217, 119, 6, 0.14) 0%, rgba(217, 119, 6, 0.04) 100%);
2965
+ border-color: rgba(180, 83, 9, 0.24);
2966
+ background: rgba(180, 83, 9, 0.08);
2947
2967
  color: #b45309;
2948
2968
  box-shadow: inset 0 1px 0 #ffffff;
2949
2969
  }
2950
2970
 
2951
2971
  body[data-dsh-tide-theme]:not([data-ds-dark-theme]) .subagent-topology-avatar.is-blue {
2952
- border-color: rgba(29, 108, 240, 0.28);
2953
- background: linear-gradient(150deg, rgba(29, 108, 240, 0.16) 0%, rgba(29, 108, 240, 0.05) 100%);
2972
+ border-color: rgba(29, 78, 216, 0.24);
2973
+ background: rgba(29, 78, 216, 0.08);
2954
2974
  color: var(--dsw-alias-state-business-primary);
2955
2975
  box-shadow: inset 0 1px 0 #ffffff;
2956
2976
  }
@@ -3469,9 +3489,42 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
3469
3489
  }
3470
3490
  return handles;
3471
3491
  }
3492
+ /**
3493
+ * 挂载归属标记:写在宿主 slot 上的自增序号。
3494
+ *
3495
+ * 所有者判定必须落在 DOM 上而不是模块变量里——插件被重复加载时会存在两份
3496
+ * 相互独立的模块实例,各持一份 `activeMount` 互不可见,模块级单例对它们完全
3497
+ * 失效(实测仍会叠成双份标头)。把序号写到共用的 DOM 节点上,任何实例都能
3498
+ * 据此判断自己是否已被后来者取代。
3499
+ */
3500
+ const OWNER_ATTR = "data-dsh-tide-groups-owner";
3501
+ /** 生成全实例唯一的归属序号(时间戳 + 随机,避免跨模块实例撞号)。 */
3502
+ function nextOwnerId() {
3503
+ return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
3504
+ }
3505
+ /**
3506
+ * 清理注入物并复位宿主属性。
3507
+ *
3508
+ * 供两处复用:新的所有者接管时回收残留,以及 unmount 时还原宿主初始态。
3509
+ */
3510
+ function teardownInjectedNodes(slot) {
3511
+ for (const node of slot.querySelectorAll("[data-dsh-tide-section], [data-dsh-tide-groups-controls]")) node.remove();
3512
+ for (const group of collectGroups(slot)) {
3513
+ group.element.removeAttribute("data-dsh-tide-group");
3514
+ group.element.removeAttribute("data-dsh-tide-pinned");
3515
+ group.element.removeAttribute("data-dsh-tide-pinned-tail");
3516
+ group.element.removeAttribute("data-dsh-tide-collapsed");
3517
+ group.row.removeAttribute("data-dsh-tide-count");
3518
+ group.row.removeAttribute("title");
3519
+ }
3520
+ }
3472
3521
  function mountSidebarGroups(options) {
3473
3522
  const slot = document.querySelector(SLOT_SELECTOR);
3474
3523
  if (slot === null) return null;
3524
+ const owner = nextOwnerId();
3525
+ slot.setAttribute(OWNER_ATTR, owner);
3526
+ teardownInjectedNodes(slot);
3527
+ const isOwner = () => slot.getAttribute(OWNER_ATTR) === owner;
3475
3528
  const pinned = new Set(parsePinned(localStorage.getItem(PINNED_KEY)));
3476
3529
  let expanded = localStorage.getItem(EXPANDED_KEY) === "1";
3477
3530
  const header = slot.querySelector("button[aria-label*=\"搜索\"], button[aria-label*=\"Search\"]")?.parentElement?.parentElement?.parentElement ?? null;
@@ -3539,8 +3592,13 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
3539
3592
  });
3540
3593
  const originalOrders = /* @__PURE__ */ new WeakMap();
3541
3594
  let frame = 0;
3595
+ let released = false;
3542
3596
  const apply = () => {
3543
3597
  frame = 0;
3598
+ if (released || !isOwner()) {
3599
+ release(false);
3600
+ return;
3601
+ }
3544
3602
  const groups = collectGroups(slot);
3545
3603
  const config = loadSimplifyConfig();
3546
3604
  if (!config.sidebarGrouping) {
@@ -3625,12 +3683,13 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
3625
3683
  }
3626
3684
  });
3627
3685
  };
3628
- toggle.addEventListener("click", (event) => {
3686
+ const onToggleClick = (event) => {
3629
3687
  event.stopPropagation();
3630
3688
  expanded = !expanded;
3631
3689
  localStorage.setItem(EXPANDED_KEY, expanded ? "1" : "0");
3632
3690
  apply();
3633
- });
3691
+ };
3692
+ toggle.addEventListener("click", onToggleClick);
3634
3693
  const observer = new MutationObserver(schedule);
3635
3694
  observer.observe(slot, {
3636
3695
  childList: true,
@@ -3639,27 +3698,34 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
3639
3698
  const unsubscribeWorkspaces = options.workspaces.subscribe(schedule);
3640
3699
  const unsubscribeSessions = options.sessions.subscribe(schedule);
3641
3700
  const unsubscribeConfig = onSimplifyConfigChange(schedule);
3642
- schedule();
3643
- return { unmount: () => {
3701
+ /**
3702
+ * 停用本实例:摘掉全部监听并还原宿主初始态。
3703
+ *
3704
+ * 只在内部使用——既用于正常 unmount,也用于归属权被后来者接管时自解绑。
3705
+ * 归属权已不属于自己时不要再 teardown DOM,否则会误删新主人的注入物。
3706
+ */
3707
+ const release = (teardown) => {
3708
+ if (released) return;
3709
+ released = true;
3644
3710
  observer.disconnect();
3645
3711
  menuObserver.disconnect();
3646
3712
  unsubscribeWorkspaces();
3647
3713
  unsubscribeSessions();
3648
3714
  unsubscribeConfig();
3649
3715
  document.removeEventListener("pointerdown", onPointerDownCapture, true);
3716
+ toggle.removeEventListener("click", onToggleClick);
3650
3717
  if (frame !== 0) window.cancelAnimationFrame(frame);
3718
+ if (!teardown) return;
3651
3719
  for (const group of collectGroups(slot)) {
3652
3720
  const order = originalOrders.get(group.element);
3653
3721
  if (order !== void 0) group.element.style.order = order;
3654
- group.element.removeAttribute("data-dsh-tide-group");
3655
- group.element.removeAttribute("data-dsh-tide-pinned");
3656
- group.element.removeAttribute("data-dsh-tide-collapsed");
3657
- group.row.removeAttribute("data-dsh-tide-count");
3658
3722
  }
3659
- controls.remove();
3660
- pinnedHeader.remove();
3661
- unpinnedHeader.remove();
3662
- } };
3723
+ teardownInjectedNodes(slot);
3724
+ if (slot.getAttribute(OWNER_ATTR) === owner) slot.removeAttribute(OWNER_ATTR);
3725
+ };
3726
+ const mount = { unmount: () => release(true) };
3727
+ schedule();
3728
+ return mount;
3663
3729
  }
3664
3730
  //#endregion
3665
3731
  //#region src/client/stat-colors.ts
@@ -4190,13 +4256,14 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
4190
4256
  ];
4191
4257
  function classifyAgentTheme(title) {
4192
4258
  const lower = title.toLowerCase();
4193
- if (lower.includes("research") || lower.includes("search") || lower.includes("搜索") || lower.includes("调研")) return "purple";
4259
+ if (lower.includes("research") || lower.includes("search") || lower.includes("搜索") || lower.includes("调研")) return "cyan";
4194
4260
  if (lower.includes("code") || lower.includes("debug") || lower.includes("代码") || lower.includes("实现") || lower.includes("修复")) return "green";
4195
4261
  if (lower.includes("analy") || lower.includes("data") || lower.includes("分析") || lower.includes("排查") || lower.includes("指标")) return "orange";
4196
4262
  return "blue";
4197
4263
  }
4198
4264
  function iconForTheme(theme) {
4199
4265
  switch (theme) {
4266
+ case "cyan":
4200
4267
  case "purple": return ICON_RESEARCH;
4201
4268
  case "green": return ICON_CODE;
4202
4269
  case "orange": return ICON_ANALYSIS;
@@ -4339,10 +4406,6 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
4339
4406
  const detail = el("div", "subagent-topology-detail");
4340
4407
  const stage = el("div", "subagent-topology-stage");
4341
4408
  const root = el("div", "subagent-topology-root");
4342
- const topArrow = el("span", "subagent-orchestrator-arrow");
4343
- topArrow.setAttribute("aria-hidden", "true");
4344
- topArrow.append(icon(["M8 12.5V3.5", "M4.5 7L8 3.5 11.5 7"], 11));
4345
- root.append(topArrow);
4346
4409
  const rootIcon = el("span", "subagent-topology-root-icon");
4347
4410
  rootIcon.setAttribute("aria-hidden", "true");
4348
4411
  rootIcon.append(icon(ICON_TARGET, 18));
@@ -4925,9 +4988,8 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
4925
4988
  const selection = state.pending ?? state.current;
4926
4989
  const name = displayName(groups, selection);
4927
4990
  const group = selection === null ? void 0 : groups.find((candidate) => candidate.id === selection.provider);
4928
- const duplicatedName = groups.filter((candidate) => candidate.models.some((model) => model.name === name)).length > 1;
4929
- const providerLabel = group === void 0 ? "" : providerName(group.id, group.name);
4930
- const modelLabel = name === "" ? t("model.placeholder") : duplicatedName ? `${providerLabel} / ${name}` : name;
4991
+ const providerLabel = group === void 0 ? selection?.provider ?? "" : providerName(group.id, group.name);
4992
+ const modelLabel = name === "" ? t("model.placeholder") : `${providerLabel} / ${name}`;
4931
4993
  const effort = effortLabel(groups, selection, t("effort.providerDefault"), state.retainedEffort);
4932
4994
  const busy = state.status === "selecting" || state.status === "loading";
4933
4995
  const close = () => {
@@ -4997,7 +5059,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
4997
5059
  "data-dsh-tide-pill": "",
4998
5060
  "data-dsh-tide-control": kind,
4999
5061
  "data-dsh-tide-emphasis": kind,
5000
- title: kind === "model" && name !== "" ? `${providerLabel} / ${name}` : void 0,
5062
+ title: kind === "model" ? modelLabel : void 0,
5001
5063
  style: color === void 0 ? void 0 : { "--dsh-tide-provider-color": color },
5002
5064
  "aria-label": kind === "effort" ? `${t("effort.title")}:${effort ?? t("effort.unavailableShort")}` : void 0,
5003
5065
  "aria-haspopup": "dialog",
@@ -5587,7 +5649,12 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5587
5649
  key: value,
5588
5650
  className: "dsh-tide-hud-unit"
5589
5651
  }, value);
5590
- if (model.activity) items.push(block("activity", "is-activity", "会话规模", iconUser, [number(model.activity.turns), unit(` 轮 · ${model.activity.steps} 步`)]));
5652
+ if (model.activity) items.push(block("activity", "is-activity", "会话规模", iconUser, [
5653
+ number(model.activity.turns),
5654
+ unit(" 轮 · "),
5655
+ number(model.activity.steps),
5656
+ unit(" 步")
5657
+ ]));
5591
5658
  if (model.context) {
5592
5659
  const bucket = config.contextColorAlert ? model.context.bucket : "good";
5593
5660
  items.push(block("context", "is-context", "上下文容量", createCircleMeter(model.context.usedPercent, bucket), [
@@ -5654,10 +5721,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5654
5721
  className: "dsh-tide-stats-progress-fill",
5655
5722
  "data-bucket": model.context.bucket,
5656
5723
  style: { width: `${Math.min(100, Math.max(0, model.context.usedPercent))}%` }
5657
- })), model.context.breakdown && model.context.breakdown.totalTokens > 0 ? h("div", { className: "dsh-tide-stats-breakdown-legend" }, h("span", { className: "dsh-tide-legend-chip is-system" }, `系统 ${formatCompactTokens(model.context.breakdown.systemTokens)}`), h("span", { className: "dsh-tide-legend-chip is-tools" }, `工具 ${formatCompactTokens(model.context.breakdown.toolsTokens)}`), h("span", { className: "dsh-tide-legend-chip is-messages" }, `消息 ${formatCompactTokens(model.context.breakdown.messageTokens)}`)) : null, h("div", { className: "dsh-tide-stats-progress-footer" }, h("span", {}, `剩余空间: ${model.context.remainingTokens.toLocaleString()} tokens`), h("span", {}, `上限: ${model.context.contextWindow.toLocaleString()}`))) : null, h("div", { className: "dsh-tide-stats-grid" }, h("div", { className: "dsh-tide-stats-card" }, h("div", { className: "dsh-tide-stats-card-head" }, h("span", { className: "dsh-tide-stats-card-k" }, "平均 TPS"), h("span", {
5658
- className: "dsh-tide-eq",
5659
- "aria-hidden": "true"
5660
- }, h("span", { className: "dsh-tide-eq-bar" }), h("span", { className: "dsh-tide-eq-bar" }), h("span", { className: "dsh-tide-eq-bar" }), h("span", { className: "dsh-tide-eq-bar" }))), h("strong", { className: "dsh-tide-stats-card-v is-highlight" }, model.tps ? model.tps.label : "暂无数据"), h("span", { className: "dsh-tide-stats-card-hint" }, model.tps?.rawDecodeTps ? `端到端平均,非实时瞬时(流式解码: ${model.tps.rawDecodeTps})` : "端到端平均速率,非实时瞬时")), h("div", { className: "dsh-tide-stats-card" }, h("span", { className: "dsh-tide-stats-card-k" }, "Prompt 缓存命中率"), h("strong", {
5724
+ })), model.context.breakdown && model.context.breakdown.totalTokens > 0 ? h("div", { className: "dsh-tide-stats-breakdown-legend" }, h("span", { className: "dsh-tide-legend-chip is-system" }, `系统 ${formatCompactTokens(model.context.breakdown.systemTokens)}`), h("span", { className: "dsh-tide-legend-chip is-tools" }, `工具 ${formatCompactTokens(model.context.breakdown.toolsTokens)}`), h("span", { className: "dsh-tide-legend-chip is-messages" }, `消息 ${formatCompactTokens(model.context.breakdown.messageTokens)}`)) : null, h("div", { className: "dsh-tide-stats-progress-footer" }, h("span", {}, `剩余空间: ${model.context.remainingTokens.toLocaleString()} tokens`), h("span", {}, `上限: ${model.context.contextWindow.toLocaleString()}`))) : null, h("div", { className: "dsh-tide-stats-grid" }, h("div", { className: "dsh-tide-stats-card" }, h("div", { className: "dsh-tide-stats-card-head" }, h("span", { className: "dsh-tide-stats-card-k" }, "平均 TPS")), h("strong", { className: "dsh-tide-stats-card-v is-highlight" }, model.tps ? model.tps.label : "暂无数据"), h("span", { className: "dsh-tide-stats-card-hint" }, model.tps?.rawDecodeTps ? `端到端平均,非实时瞬时(流式解码: ${model.tps.rawDecodeTps})` : "端到端平均速率,非实时瞬时")), h("div", { className: "dsh-tide-stats-card" }, h("span", { className: "dsh-tide-stats-card-k" }, "Prompt 缓存命中率"), h("strong", {
5661
5725
  className: "dsh-tide-stats-card-v",
5662
5726
  "data-dsh-tide-pct": model.cache?.bucket ?? "bad"
5663
5727
  }, model.cache ? `${model.cache.percent}%` : "暂无数据"), h("div", { className: "dsh-tide-hud-mini-track" }, h("div", {
@@ -5790,11 +5854,11 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5790
5854
  },
5791
5855
  {
5792
5856
  id: "theme",
5793
- title: "潮汐玻璃主题",
5857
+ title: "潮汐主题",
5794
5858
  items: [{
5795
5859
  key: "themeOverrides",
5796
- title: "潮汐玻璃主题材质",
5797
- description: "为底栏 HUD、用量看板与委派图套用冰蓝玻璃材质(径向微光、定向投影、发丝描边与彩色图标);关闭此项后这些组件回落到 DSH 原生外观。"
5860
+ title: "潮汐主题材质",
5861
+ description: "为底栏 HUD、用量看板与委派图套用潮汐主题材质(深海微透质感、精密发丝描边与自然漫反射柔影);关闭此项后这些组件回落到 DSH 原生外观。"
5798
5862
  }]
5799
5863
  }
5800
5864
  ];
@@ -5821,7 +5885,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5821
5885
  return h("div", {
5822
5886
  className: "dsh-tide-settings-root",
5823
5887
  "data-dsh-tide-settings": ""
5824
- }, h("div", { className: "dsh-tide-settings-head" }, h("div", { className: "dsh-tide-settings-title-wrap" }, h("h4", { className: "dsh-tide-settings-title" }, "潮汐玻璃 · 主题与增强功能配置"), h("span", { className: "dsh-tide-settings-badge" }, "即时生效")), h("p", { className: "dsh-tide-settings-desc" }, "可视化切换各项界面增强与显示模块。主题材质开启时套用冰蓝玻璃皮肤,关闭后回落到 DSH 原生外观;所有设置实时保存在本地。")), h("div", { className: "dsh-tide-settings-groups" }, SETTING_GROUPS.map((group) => h("div", {
5888
+ }, h("div", { className: "dsh-tide-settings-head" }, h("div", { className: "dsh-tide-settings-title-wrap" }, h("h4", { className: "dsh-tide-settings-title" }, "潮汐主题 · 主题与增强功能配置"), h("span", { className: "dsh-tide-settings-badge" }, "即时生效")), h("p", { className: "dsh-tide-settings-desc" }, "可视化切换各项界面增强与显示模块。主题材质开启时套用潮汐深海皮肤,关闭后回落到 DSH 原生外观;所有设置实时保存在本地。")), h("div", { className: "dsh-tide-settings-groups" }, SETTING_GROUPS.map((group) => h("div", {
5825
5889
  key: group.id,
5826
5890
  className: "dsh-tide-settings-card",
5827
5891
  "data-group": group.id
@@ -5886,7 +5950,7 @@ body:not([data-ds-dark-theme]) [data-dsh-tide-pill][aria-expanded='true']:hover:
5886
5950
  * ModuleLoader 壳提供,这正是 tsdown client 构建保持 require 的原因。
5887
5951
  */
5888
5952
  const PLUGIN_ID = "dsh-tide-theme";
5889
- const BUILD = "0.4.1+2026-11-02T02:57:22.787Z";
5953
+ const BUILD = "0.5.0+2026-11-02T17:33:05.904Z";
5890
5954
  const name = PLUGIN_ID;
5891
5955
  const inject = [
5892
5956
  "slots",