@dsh-tom/dsh-css 0.2.8 → 0.2.10

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/README.md CHANGED
@@ -22,7 +22,7 @@ npm publish --access public --registry=https://registry.npmjs.org/
22
22
  打开 **插件 → 添加插件 → 安装第三方插件**,在“包名或地址”输入:
23
23
 
24
24
  ```text
25
- D:\product\dsh-css\dsh-tom-dsh-css-0.2.8.tgz
25
+ D:\product\dsh-css\dsh-tom-dsh-css-0.2.10.tgz
26
26
  ```
27
27
 
28
28
  安装并启用,然后完全退出并重新打开 dsh。
@@ -32,7 +32,7 @@ D:\product\dsh-css\dsh-tom-dsh-css-0.2.8.tgz
32
32
  包发布到 npmjs 后,先卸载已安装的旧版,再打开 **插件 → 添加插件 → 安装第三方插件**,输入:
33
33
 
34
34
  ```text
35
- @dsh-tom/dsh-css@0.2.8
35
+ @dsh-tom/dsh-css@0.2.10
36
36
  ```
37
37
 
38
38
  选择 **安装源 → npm 官方源**,安装并启用,然后完全退出并重新打开 dsh。
package/dist/client.js CHANGED
@@ -52,6 +52,17 @@ var theme_default = `.dsh-css-unread-dot {
52
52
  mask-image: none;
53
53
  }
54
54
 
55
+ /* \u4F1A\u8BDD\u83DC\u5355\u6539\u4E3A\u53F3\u952E\u6253\u5F00\uFF1B\u4FDD\u7559\u5BBF\u4E3B\u83DC\u5355\u951A\u70B9\uFF0C\u5E76\u79FB\u5230\u9F20\u6807\u4F4D\u7F6E\u3002 */
56
+ .hIlkoa_sessionRow > .hIlkoa_rowActions > ._root_4ub78_1 {
57
+ position: fixed;
58
+ left: var(--dsh-css-context-x, 0px);
59
+ top: var(--dsh-css-context-y, 0px);
60
+ width: 0;
61
+ height: 0;
62
+
63
+ & > button { display: none; }
64
+ }
65
+
55
66
  /* \u6DF1\u8272\u6A21\u5F0F\u914D\u8272\uFF0C\u4FDD\u7559\u5185\u7F6E\u6587\u5B57\u3001\u8FB9\u6846\u548C\u8BED\u6CD5\u9AD8\u4EAE\u989C\u8272\u3002 */
56
67
  html body[data-ds-dark-theme] {
57
68
  /* \u533A\u57DF 1\uFF1A\u5DE6\u4FA7\u4F1A\u8BDD\u5217\u8868\uFF1BWindows \u6807\u9898\u680F\u5728\u4E0B\u65B9\u5355\u72EC\u8BBE\u7F6E\u3002\u539F RGB(27, 27, 28)\u3002 */
@@ -220,6 +231,13 @@ html[data-windows-titlebar] body[data-ds-dark-theme] ._2H3hWW_root:not(._2H3hWW_
220
231
  padding: 44px 0 0 12px;
221
232
  }
222
233
 
234
+ /* \u64CD\u4F5C\u6309\u94AE\u95F4\u8DDD 15px \u2192 10px\uFF1B\u53F3\u4FA7\u5185\u8FB9\u8DDD 8px \u2192 4px\u3002 */
235
+ & .hIlkoa_sessionRow {
236
+ padding-inline-end: 4px;
237
+
238
+ & > .hIlkoa_rowActions { gap: 10px; }
239
+ }
240
+
223
241
  /* \u884C\u80CC\u666F\u5411\u5DE6\u5EF6\u4F38 4px\uFF0C\u7559\u8DB3\u6807\u9898\u5185\u8FB9\u8DDD\u5E76\u4E0E\u201C\u4F1A\u8BDD\u201D\u4FDD\u6301\u5DE6\u5BF9\u9F50\u3002 */
224
242
  & ._9lTDKa_flatList .hIlkoa_sessionRow {
225
243
  margin-inline-start: -4px;
@@ -233,6 +251,11 @@ html[data-windows-titlebar] body[data-ds-dark-theme] ._2H3hWW_root:not(._2H3hWW_
233
251
  order: 1;
234
252
  }
235
253
 
254
+ /* \u7A7A\u72B6\u6001\u5360\u4F4D\u51CF\u534A\uFF0C\u4E0E\u53F3\u5185\u8FB9\u8DDD\u5408\u8BA1 12px\uFF1B\u5B9E\u9645\u72B6\u6001\u56FE\u6807\u4FDD\u7559\u539F\u5BBD\u5EA6\u3002 */
255
+ & > .hIlkoa_slot:has(> [data-slot="sidebar.session.row.leading"]:empty) {
256
+ width: 8px;
257
+ }
258
+
236
259
  & > .hIlkoa_slot:empty,
237
260
  &:is(:hover, .hIlkoa_menuOpen) > .hIlkoa_slot:has(.dsh-css-unread-dot) {
238
261
  display: none;
@@ -21668,6 +21691,28 @@ function applySidebarWidth(layout) {
21668
21691
  restore();
21669
21692
  };
21670
21693
  }
21694
+ function applySessionContextMenu() {
21695
+ const menuSelector = ".hIlkoa_sessionRow > .hIlkoa_rowActions > ._root_4ub78_1";
21696
+ const open2 = (event) => {
21697
+ const row = event.target.closest?.(".hIlkoa_sessionRow");
21698
+ const menu = row?.querySelector(menuSelector);
21699
+ const button = menu?.querySelector(":scope > button");
21700
+ if (!button) return;
21701
+ event.preventDefault();
21702
+ event.stopPropagation();
21703
+ menu.style.setProperty("--dsh-css-context-x", `${event.clientX}px`);
21704
+ menu.style.setProperty("--dsh-css-context-y", `${event.clientY}px`);
21705
+ if (!row.classList.contains("hIlkoa_menuOpen")) button.click();
21706
+ };
21707
+ document.addEventListener("contextmenu", open2);
21708
+ return () => {
21709
+ document.removeEventListener("contextmenu", open2);
21710
+ for (const menu of document.querySelectorAll(menuSelector)) {
21711
+ menu.style.removeProperty("--dsh-css-context-x");
21712
+ menu.style.removeProperty("--dsh-css-context-y");
21713
+ }
21714
+ };
21715
+ }
21671
21716
  async function apply2(ctx) {
21672
21717
  ctx.effect(() => {
21673
21718
  const style = document.createElement("style");
@@ -21678,6 +21723,7 @@ async function apply2(ctx) {
21678
21723
  return () => style.remove();
21679
21724
  });
21680
21725
  ctx.effect(() => applySidebarWidth(ctx.layout));
21726
+ ctx.effect(applySessionContextMenu);
21681
21727
  registerCacheHitPrecision(ctx);
21682
21728
  registerDateGroups(ctx);
21683
21729
  registerProjects(ctx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-tom/dsh-css",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "为 DeepSeek Harness 调整深色界面,增加项目管理、费用统计和任务进展播报。",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/theme.css CHANGED
@@ -18,6 +18,17 @@
18
18
  mask-image: none;
19
19
  }
20
20
 
21
+ /* 会话菜单改为右键打开;保留宿主菜单锚点,并移到鼠标位置。 */
22
+ .hIlkoa_sessionRow > .hIlkoa_rowActions > ._root_4ub78_1 {
23
+ position: fixed;
24
+ left: var(--dsh-css-context-x, 0px);
25
+ top: var(--dsh-css-context-y, 0px);
26
+ width: 0;
27
+ height: 0;
28
+
29
+ & > button { display: none; }
30
+ }
31
+
21
32
  /* 深色模式配色,保留内置文字、边框和语法高亮颜色。 */
22
33
  html body[data-ds-dark-theme] {
23
34
  /* 区域 1:左侧会话列表;Windows 标题栏在下方单独设置。原 RGB(27, 27, 28)。 */
@@ -186,6 +197,13 @@ html[data-windows-titlebar] body[data-ds-dark-theme] ._2H3hWW_root:not(._2H3hWW_
186
197
  padding: 44px 0 0 12px;
187
198
  }
188
199
 
200
+ /* 操作按钮间距 15px → 10px;右侧内边距 8px → 4px。 */
201
+ & .hIlkoa_sessionRow {
202
+ padding-inline-end: 4px;
203
+
204
+ & > .hIlkoa_rowActions { gap: 10px; }
205
+ }
206
+
189
207
  /* 行背景向左延伸 4px,留足标题内边距并与“会话”保持左对齐。 */
190
208
  & ._9lTDKa_flatList .hIlkoa_sessionRow {
191
209
  margin-inline-start: -4px;
@@ -199,6 +217,11 @@ html[data-windows-titlebar] body[data-ds-dark-theme] ._2H3hWW_root:not(._2H3hWW_
199
217
  order: 1;
200
218
  }
201
219
 
220
+ /* 空状态占位减半,与右内边距合计 12px;实际状态图标保留原宽度。 */
221
+ & > .hIlkoa_slot:has(> [data-slot="sidebar.session.row.leading"]:empty) {
222
+ width: 8px;
223
+ }
224
+
202
225
  & > .hIlkoa_slot:empty,
203
226
  &:is(:hover, .hIlkoa_menuOpen) > .hIlkoa_slot:has(.dsh-css-unread-dot) {
204
227
  display: none;