@dsh-tom/dsh-css 0.0.0-stage → 0.1.2
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/LICENSE +21 -0
- package/README.md +36 -2
- package/cordis.patch.yml +3 -0
- package/dist/client.js +87 -0
- package/index.js +2 -0
- package/package.json +27 -4
- package/theme.css +256 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 dsh-tom
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-css 发布与安装
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## 发布到 npmjs
|
|
4
|
+
|
|
5
|
+
使用有 `dsh-tom` 组织发布权限的账号,在 PowerShell 执行:
|
|
6
|
+
|
|
7
|
+
```powershell
|
|
8
|
+
cd D:\product\dsh-css
|
|
9
|
+
npm ci
|
|
10
|
+
npm login --registry=https://registry.npmjs.org/
|
|
11
|
+
npm publish --access public --registry=https://registry.npmjs.org/
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
按提示完成登录和验证,发布时会自动构建并运行测试。已发布的版本号不能重复使用;后续发新版前先执行 `npm version patch --no-git-tag-version`,安装时也换成新版本号。
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 本地安装
|
|
18
|
+
|
|
19
|
+
如果已经安装旧版,先在 dsh 的插件页卸载。
|
|
20
|
+
|
|
21
|
+
打开 **插件 → 添加插件 → 安装第三方插件**,在“包名或地址”输入:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
D:\product\dsh-css\dsh-tom-dsh-css-0.1.2.tgz
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
安装并启用,然后完全退出并重新打开 dsh。
|
|
28
|
+
|
|
29
|
+
## npmjs 安装
|
|
30
|
+
|
|
31
|
+
包发布到 npmjs 后,先卸载已安装的旧版,再打开 **插件 → 添加插件 → 安装第三方插件**,输入:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
@dsh-tom/dsh-css@0.1.2
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
选择 **安装源 → npm 官方源**,安装并启用,然后完全退出并重新打开 dsh。
|
package/cordis.patch.yml
ADDED
package/dist/client.js
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Generated by scripts/build.mjs. Edit theme.css or src/client.js instead.
|
|
2
|
+
window.__ModuleLoader__.load({
|
|
3
|
+
id: "@dsh-tom/dsh-css",
|
|
4
|
+
factory: (require) => {
|
|
5
|
+
const { createElement } = require('react');
|
|
6
|
+
const css = "/* 深色模式配色,保留内置文字、边框和语法高亮颜色。 */\nhtml body[data-ds-dark-theme] {\n /* 区域 1:左侧会话列表;Windows 标题栏在下方单独设置。原 RGB(27, 27, 28)。 */\n --dsw-specific-sidebar-fill: rgb(36, 37, 33) !important;\n\n /* 区域 2:会话标题、正文以及应用基础背景。原 RGB(21, 21, 23)。 */\n --dsw-alias-bg-base: rgb(39, 40, 34) !important;\n\n /* 区域 3:主输入框。原 RGB(44, 44, 46)。 */\n --dsw-specific-input-major: rgb(66, 67, 61) !important;\n\n /* 会话内代码块及使用同一语义变量的输出区域。原 RGB(27, 27, 28)。 */\n --dsw-alias-markdown-code-block: rgb(55, 56, 50) !important;\n}\n\n/* 标题栏及原生窗口按钮共享此颜色,会话列表继续使用原来的背景。 */\nhtml[data-windows-titlebar] body[data-ds-dark-theme] {\n --dsw-specific-sidebar-fill: rgb(32, 32, 32) !important;\n\n & .BynINW_sidebarCol {\n --dsw-specific-sidebar-fill: rgb(36, 37, 33) !important;\n }\n}\n\n/* Windows 桌面版展开侧栏:左侧图标栏 + 右侧标题、会话列表。\n * 类名对应 DSH 0.2.1-rc.2;折叠侧栏继续使用宿主布局。\n * 复用品牌、新会话、面板和账户按钮,不改变原有点击事件。\n */\nhtml[data-windows-titlebar] body[data-ds-dark-theme] ._2H3hWW_root:not(._2H3hWW_collapsed) {\n --dsh-css-rail-width: 52px;\n display: grid;\n grid-template-columns: var(--dsh-css-rail-width) minmax(0, 1fr);\n grid-template-rows: 52px auto auto minmax(0, 1fr);\n padding: 0;\n position: relative;\n\n &::before {\n content: \"\";\n position: absolute;\n inset: 0 auto 0 0;\n width: var(--dsh-css-rail-width);\n background: rgb(32, 32, 32);\n pointer-events: none;\n }\n\n & ._2H3hWW_logoRow {\n grid-area: 1 / 2;\n height: 52px;\n margin: 0;\n padding: 0 16px;\n justify-content: flex-start;\n }\n\n & ._2H3hWW_logoRow::after {\n content: \"DeepSeek\";\n color: var(--dsw-alias-label-primary);\n font: 600 18px / 24px var(--dsw-font-family);\n letter-spacing: 0;\n }\n\n /* 原品牌按钮仍打开新会话,以首页图标呈现。 */\n & ._2H3hWW_brand {\n position: absolute;\n top: 8px;\n left: 8px;\n width: 36px;\n height: 36px;\n padding: 0;\n border-radius: 8px;\n justify-content: center;\n background: var(--dsw-alias-interactive-bg-hover);\n overflow: visible;\n }\n\n & ._2H3hWW_brandIdentity {\n display: none;\n }\n\n & ._2H3hWW_brand::before {\n content: \"\";\n width: 18px;\n height: 18px;\n background: currentColor;\n mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 2 10v3h2v7a2 2 0 0 0 2 2h4v-7h4v7h4a2 2 0 0 0 2-2v-7h2v-3Z'/%3E%3C/svg%3E\") center / contain no-repeat;\n }\n\n &:has(._2H3hWW_panelActive) ._2H3hWW_brand {\n background: transparent;\n }\n\n & ._2H3hWW_newSession {\n grid-area: 2 / 2;\n align-self: start;\n z-index: 1;\n height: 36px;\n margin: 0 8px;\n padding: 0 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n font-weight: 400;\n justify-content: flex-start;\n }\n\n & ._2H3hWW_newSessionContent {\n width: 100%;\n justify-content: flex-start;\n gap: 8px;\n }\n\n & ._2H3hWW_newSessionContent > svg {\n display: none;\n }\n\n & ._2H3hWW_newSessionContent::before {\n content: \"\";\n flex: none;\n width: 14px;\n height: 14px;\n background: currentColor;\n mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h13a2 2 0 0 0 2-2v-7M16 3a2.1 2.1 0 0 1 3 3L9 16l-4 1 1-4Z'/%3E%3C/svg%3E\") center / contain no-repeat;\n }\n\n & ._2H3hWW_panelList {\n grid-area: 2 / 1;\n position: relative;\n align-self: start;\n gap: 8px;\n margin: 0;\n padding: 0 8px;\n }\n\n & ._2H3hWW_panelRow {\n position: relative;\n justify-content: center;\n width: 36px;\n height: 36px;\n margin: 0;\n padding: 0;\n border-radius: 8px;\n color: var(--dsw-alias-label-tertiary);\n }\n\n & ._2H3hWW_panelTitle {\n display: none;\n }\n\n & ._2H3hWW_panelGlyph > svg {\n width: 18px;\n height: 18px;\n }\n\n & ._2H3hWW_panelActive {\n color: var(--dsw-alias-label-primary);\n }\n\n /* 列表与导航共用网格行,顶部留出新会话按钮的位置。 */\n & ._2H3hWW_regionArea {\n grid-area: 2 / 2 / -1 / 3;\n margin: 0;\n padding: 44px 0 0 12px;\n }\n\n & ._2H3hWW_footArea {\n grid-area: 4 / 1;\n position: relative;\n align-self: end;\n gap: 8px;\n padding: 8px;\n }\n\n & ._2H3hWW_footerActions:empty {\n display: none;\n }\n\n /* 左下角设置按钮沿用账户菜单,设置、登录等入口仍由宿主提供。 */\n & .ET65mq_trigger {\n position: relative;\n justify-content: center;\n width: 36px;\n height: 36px;\n padding: 0;\n border-radius: 8px;\n color: var(--dsw-alias-label-tertiary);\n }\n\n & .ET65mq_trigger > * {\n display: none;\n }\n\n & .ET65mq_trigger::before {\n content: \"\";\n width: 18px;\n height: 18px;\n background: currentColor;\n mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9.5 3-.5 2-2 1-2-.5-2 3.5L4.5 10v3L3 14l2 3.5 2-.5 2 1 .5 3h5l.5-3 2-1 2 .5 2-3.5-1.5-1v-3L21 9l-2-3.5-2 .5-2-1-.5-2Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E\") center / contain no-repeat;\n }\n\n /* 同一元素也显示等待状态,只隐藏普通的相对时间。 */\n & .hIlkoa_sessionRow > .hIlkoa_time:not([aria-hidden=\"true\"]) {\n display: none;\n }\n\n & :is(._2H3hWW_brand, ._2H3hWW_newSession, .ET65mq_trigger):hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n\n & :is(._2H3hWW_brand, ._2H3hWW_newSession, .ET65mq_trigger):focus-visible {\n outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));\n outline-offset: -2px;\n }\n\n /* 展开状态下宿主禁用了面板 Tooltip,为纯图标入口补上名称。 */\n & :is(._2H3hWW_panelRow, .ET65mq_trigger):is(:hover, :focus-visible)::after {\n content: attr(aria-label);\n position: absolute;\n z-index: 40;\n left: 44px;\n top: 50%;\n transform: translateY(-50%);\n padding: 4px 8px;\n border: 1px solid var(--dsw-alias-border-l3);\n border-radius: 6px;\n background: var(--dsw-alias-bg-layer-1);\n color: var(--dsw-alias-label-primary);\n font: 12px / 20px var(--dsw-font-family);\n white-space: nowrap;\n pointer-events: none;\n }\n\n & .ET65mq_trigger:is(:hover, :focus-visible)::after {\n content: \"设置\";\n }\n}\n\n/* 悬浮卡片由宿主通过 portal 挂在侧栏外。 */\n.dsh-css-project {\n display: none;\n}\n\nhtml[data-windows-titlebar] body[data-ds-dark-theme] .dsh-css-project {\n display: flex;\n align-items: center;\n gap: 6px;\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n line-height: 20px;\n\n & svg {\n flex: none;\n }\n\n & span {\n overflow-wrap: anywhere;\n }\n}\n";
|
|
7
|
+
const inject = ['slots', 'sessions', 'workspaces', 'layout'];
|
|
8
|
+
|
|
9
|
+
// createElement 和 css 由构建入口注入,React 复用宿主提供的模块。
|
|
10
|
+
function ProjectHover({ sessionId, useWorkspaces, useSessions }) {
|
|
11
|
+
const workspace = useWorkspaces(state => state.items.find(item => item.sessionIds.includes(sessionId)));
|
|
12
|
+
const cwd = useSessions(state => state.byId[sessionId]?.cwd);
|
|
13
|
+
const path = workspace?.path || cwd;
|
|
14
|
+
const name = workspace?.title || path?.split(/[\\/]/).filter(Boolean).at(-1) || path || '未归属项目';
|
|
15
|
+
|
|
16
|
+
return createElement('div', { className: 'dsh-css-project', title: path },
|
|
17
|
+
createElement('svg', {
|
|
18
|
+
width: 14, height: 14, viewBox: '0 0 24 24', fill: 'none',
|
|
19
|
+
stroke: 'currentColor', strokeWidth: 1.7, strokeLinejoin: 'round', 'aria-hidden': true,
|
|
20
|
+
}, createElement('path', { d: 'M3 7V5a2 2 0 0 1 2-2h5l2 3h7a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Zm0 2h18' })),
|
|
21
|
+
createElement('span', null, name));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 使用 DSH 0.2.1-rc.2 的布局 action,让正文、右侧面板和拖拽手柄一起更新。
|
|
25
|
+
function applySidebarWidth(layout) {
|
|
26
|
+
let frame;
|
|
27
|
+
let expanded = false;
|
|
28
|
+
let previousWidth;
|
|
29
|
+
const width = () => Number.parseFloat(frame?.style.getPropertyValue('--dsh-windows-sidebar-width'));
|
|
30
|
+
const restore = () => {
|
|
31
|
+
if (previousWidth !== undefined && width() === 328) layout.panels.setSidebar(previousWidth);
|
|
32
|
+
previousWidth = undefined;
|
|
33
|
+
};
|
|
34
|
+
const sync = () => {
|
|
35
|
+
const nextFrame = frame?.isConnected ? frame : document.querySelector('.BynINW_frame');
|
|
36
|
+
const enabled = document.documentElement.hasAttribute('data-windows-titlebar') &&
|
|
37
|
+
document.body.hasAttribute('data-ds-dark-theme');
|
|
38
|
+
const nextExpanded = enabled && nextFrame !== null && !nextFrame.hasAttribute('data-sidebar-collapsed');
|
|
39
|
+
const opening = nextExpanded && (!expanded || frame !== nextFrame);
|
|
40
|
+
frame = nextFrame;
|
|
41
|
+
expanded = nextExpanded;
|
|
42
|
+
if (!enabled) restore();
|
|
43
|
+
else if (opening) {
|
|
44
|
+
const current = width();
|
|
45
|
+
if (current > 0 && current < 328) {
|
|
46
|
+
previousWidth = current;
|
|
47
|
+
layout.panels.setSidebar(328);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const observer = new MutationObserver(sync);
|
|
52
|
+
observer.observe(document.body, {
|
|
53
|
+
childList: true, subtree: true, attributes: true,
|
|
54
|
+
attributeFilter: ['data-sidebar-collapsed', 'data-ds-dark-theme'],
|
|
55
|
+
});
|
|
56
|
+
observer.observe(document.documentElement, { attributes: true, attributeFilter: ['data-windows-titlebar'] });
|
|
57
|
+
sync();
|
|
58
|
+
return () => {
|
|
59
|
+
observer.disconnect();
|
|
60
|
+
restore();
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function apply(ctx) {
|
|
65
|
+
ctx.effect(() => {
|
|
66
|
+
const style = document.createElement('style');
|
|
67
|
+
style.dataset.plugin = 'dsh-css';
|
|
68
|
+
style.dataset.pluginCss = 'dsh-css/theme.css';
|
|
69
|
+
style.textContent = css;
|
|
70
|
+
document.head.appendChild(style);
|
|
71
|
+
|
|
72
|
+
// Cordis 在停用、卸载或重新加载插件时回收样式。
|
|
73
|
+
return () => style.remove();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
ctx.effect(() => applySidebarWidth(ctx.layout));
|
|
77
|
+
ctx.slots.inject('sidebar.session.row.hover', () => ctx.slots.register({
|
|
78
|
+
name: 'sidebar.session.row.hover',
|
|
79
|
+
id: 'dsh-css-project',
|
|
80
|
+
order: -100,
|
|
81
|
+
inject: () => ({ hooks: { workspaces: ctx.workspaces.list, sessions: ctx.sessions.list } }),
|
|
82
|
+
}, ProjectHover));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return { apply, inject };
|
|
86
|
+
},
|
|
87
|
+
});
|
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-tom/dsh-css",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "为 DeepSeek Harness 深色界面调整侧边栏、会话、输入框和代码块的背景颜色。",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./client": "./dist/client.js",
|
|
10
|
+
"./package.json": "./package.json"
|
|
11
|
+
},
|
|
12
|
+
"files": ["index.js", "dist/client.js", "theme.css", "cordis.patch.yml", "README.md"],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22",
|
|
15
|
+
"dsh": ">=0.2.1-rc.2 <0.2.2-0"
|
|
16
|
+
},
|
|
17
|
+
"dsh": {
|
|
18
|
+
"bundle": { "patch": "./cordis.patch.yml" },
|
|
19
|
+
"client": {
|
|
20
|
+
"platform": "web",
|
|
21
|
+
"inject": ["@deepseek-ai/dsh-client-ui-layout", "@deepseek-ai/dsh-client-ui-workspace"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "node scripts/build.mjs",
|
|
26
|
+
"check": "node --check index.js && node --check src/client.js && node --check scripts/build.mjs && npm run build && node --check dist/client.js",
|
|
27
|
+
"prepack": "npm run check"
|
|
28
|
+
}
|
|
29
|
+
}
|
package/theme.css
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/* 深色模式配色,保留内置文字、边框和语法高亮颜色。 */
|
|
2
|
+
html body[data-ds-dark-theme] {
|
|
3
|
+
/* 区域 1:左侧会话列表;Windows 标题栏在下方单独设置。原 RGB(27, 27, 28)。 */
|
|
4
|
+
--dsw-specific-sidebar-fill: rgb(36, 37, 33) !important;
|
|
5
|
+
|
|
6
|
+
/* 区域 2:会话标题、正文以及应用基础背景。原 RGB(21, 21, 23)。 */
|
|
7
|
+
--dsw-alias-bg-base: rgb(39, 40, 34) !important;
|
|
8
|
+
|
|
9
|
+
/* 区域 3:主输入框。原 RGB(44, 44, 46)。 */
|
|
10
|
+
--dsw-specific-input-major: rgb(66, 67, 61) !important;
|
|
11
|
+
|
|
12
|
+
/* 会话内代码块及使用同一语义变量的输出区域。原 RGB(27, 27, 28)。 */
|
|
13
|
+
--dsw-alias-markdown-code-block: rgb(55, 56, 50) !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* 标题栏及原生窗口按钮共享此颜色,会话列表继续使用原来的背景。 */
|
|
17
|
+
html[data-windows-titlebar] body[data-ds-dark-theme] {
|
|
18
|
+
--dsw-specific-sidebar-fill: rgb(32, 32, 32) !important;
|
|
19
|
+
|
|
20
|
+
& .BynINW_sidebarCol {
|
|
21
|
+
--dsw-specific-sidebar-fill: rgb(36, 37, 33) !important;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Windows 桌面版展开侧栏:左侧图标栏 + 右侧标题、会话列表。
|
|
26
|
+
* 类名对应 DSH 0.2.1-rc.2;折叠侧栏继续使用宿主布局。
|
|
27
|
+
* 复用品牌、新会话、面板和账户按钮,不改变原有点击事件。
|
|
28
|
+
*/
|
|
29
|
+
html[data-windows-titlebar] body[data-ds-dark-theme] ._2H3hWW_root:not(._2H3hWW_collapsed) {
|
|
30
|
+
--dsh-css-rail-width: 52px;
|
|
31
|
+
display: grid;
|
|
32
|
+
grid-template-columns: var(--dsh-css-rail-width) minmax(0, 1fr);
|
|
33
|
+
grid-template-rows: 52px auto auto minmax(0, 1fr);
|
|
34
|
+
padding: 0;
|
|
35
|
+
position: relative;
|
|
36
|
+
|
|
37
|
+
&::before {
|
|
38
|
+
content: "";
|
|
39
|
+
position: absolute;
|
|
40
|
+
inset: 0 auto 0 0;
|
|
41
|
+
width: var(--dsh-css-rail-width);
|
|
42
|
+
background: rgb(32, 32, 32);
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& ._2H3hWW_logoRow {
|
|
47
|
+
grid-area: 1 / 2;
|
|
48
|
+
height: 52px;
|
|
49
|
+
margin: 0;
|
|
50
|
+
padding: 0 16px;
|
|
51
|
+
justify-content: flex-start;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
& ._2H3hWW_logoRow::after {
|
|
55
|
+
content: "DeepSeek";
|
|
56
|
+
color: var(--dsw-alias-label-primary);
|
|
57
|
+
font: 600 18px / 24px var(--dsw-font-family);
|
|
58
|
+
letter-spacing: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* 原品牌按钮仍打开新会话,以首页图标呈现。 */
|
|
62
|
+
& ._2H3hWW_brand {
|
|
63
|
+
position: absolute;
|
|
64
|
+
top: 8px;
|
|
65
|
+
left: 8px;
|
|
66
|
+
width: 36px;
|
|
67
|
+
height: 36px;
|
|
68
|
+
padding: 0;
|
|
69
|
+
border-radius: 8px;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
72
|
+
overflow: visible;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
& ._2H3hWW_brandIdentity {
|
|
76
|
+
display: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
& ._2H3hWW_brand::before {
|
|
80
|
+
content: "";
|
|
81
|
+
width: 18px;
|
|
82
|
+
height: 18px;
|
|
83
|
+
background: currentColor;
|
|
84
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 2 10v3h2v7a2 2 0 0 0 2 2h4v-7h4v7h4a2 2 0 0 0 2-2v-7h2v-3Z'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:has(._2H3hWW_panelActive) ._2H3hWW_brand {
|
|
88
|
+
background: transparent;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
& ._2H3hWW_newSession {
|
|
92
|
+
grid-area: 2 / 2;
|
|
93
|
+
align-self: start;
|
|
94
|
+
z-index: 1;
|
|
95
|
+
height: 36px;
|
|
96
|
+
margin: 0 8px;
|
|
97
|
+
padding: 0 8px;
|
|
98
|
+
border: none;
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
background: transparent;
|
|
101
|
+
font-weight: 400;
|
|
102
|
+
justify-content: flex-start;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
& ._2H3hWW_newSessionContent {
|
|
106
|
+
width: 100%;
|
|
107
|
+
justify-content: flex-start;
|
|
108
|
+
gap: 8px;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
& ._2H3hWW_newSessionContent > svg {
|
|
112
|
+
display: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
& ._2H3hWW_newSessionContent::before {
|
|
116
|
+
content: "";
|
|
117
|
+
flex: none;
|
|
118
|
+
width: 14px;
|
|
119
|
+
height: 14px;
|
|
120
|
+
background: currentColor;
|
|
121
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h13a2 2 0 0 0 2-2v-7M16 3a2.1 2.1 0 0 1 3 3L9 16l-4 1 1-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
& ._2H3hWW_panelList {
|
|
125
|
+
grid-area: 2 / 1;
|
|
126
|
+
position: relative;
|
|
127
|
+
align-self: start;
|
|
128
|
+
gap: 8px;
|
|
129
|
+
margin: 0;
|
|
130
|
+
padding: 0 8px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
& ._2H3hWW_panelRow {
|
|
134
|
+
position: relative;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
width: 36px;
|
|
137
|
+
height: 36px;
|
|
138
|
+
margin: 0;
|
|
139
|
+
padding: 0;
|
|
140
|
+
border-radius: 8px;
|
|
141
|
+
color: var(--dsw-alias-label-tertiary);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
& ._2H3hWW_panelTitle {
|
|
145
|
+
display: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
& ._2H3hWW_panelGlyph > svg {
|
|
149
|
+
width: 18px;
|
|
150
|
+
height: 18px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
& ._2H3hWW_panelActive {
|
|
154
|
+
color: var(--dsw-alias-label-primary);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* 列表与导航共用网格行,顶部留出新会话按钮的位置。 */
|
|
158
|
+
& ._2H3hWW_regionArea {
|
|
159
|
+
grid-area: 2 / 2 / -1 / 3;
|
|
160
|
+
margin: 0;
|
|
161
|
+
padding: 44px 0 0 12px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
& ._2H3hWW_footArea {
|
|
165
|
+
grid-area: 4 / 1;
|
|
166
|
+
position: relative;
|
|
167
|
+
align-self: end;
|
|
168
|
+
gap: 8px;
|
|
169
|
+
padding: 8px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
& ._2H3hWW_footerActions:empty {
|
|
173
|
+
display: none;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* 左下角设置按钮沿用账户菜单,设置、登录等入口仍由宿主提供。 */
|
|
177
|
+
& .ET65mq_trigger {
|
|
178
|
+
position: relative;
|
|
179
|
+
justify-content: center;
|
|
180
|
+
width: 36px;
|
|
181
|
+
height: 36px;
|
|
182
|
+
padding: 0;
|
|
183
|
+
border-radius: 8px;
|
|
184
|
+
color: var(--dsw-alias-label-tertiary);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
& .ET65mq_trigger > * {
|
|
188
|
+
display: none;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
& .ET65mq_trigger::before {
|
|
192
|
+
content: "";
|
|
193
|
+
width: 18px;
|
|
194
|
+
height: 18px;
|
|
195
|
+
background: currentColor;
|
|
196
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9.5 3-.5 2-2 1-2-.5-2 3.5L4.5 10v3L3 14l2 3.5 2-.5 2 1 .5 3h5l.5-3 2-1 2 .5 2-3.5-1.5-1v-3L21 9l-2-3.5-2 .5-2-1-.5-2Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* 同一元素也显示等待状态,只隐藏普通的相对时间。 */
|
|
200
|
+
& .hIlkoa_sessionRow > .hIlkoa_time:not([aria-hidden="true"]) {
|
|
201
|
+
display: none;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
& :is(._2H3hWW_brand, ._2H3hWW_newSession, .ET65mq_trigger):hover {
|
|
205
|
+
background: var(--dsw-alias-interactive-bg-hover);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
& :is(._2H3hWW_brand, ._2H3hWW_newSession, .ET65mq_trigger):focus-visible {
|
|
209
|
+
outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
|
|
210
|
+
outline-offset: -2px;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* 展开状态下宿主禁用了面板 Tooltip,为纯图标入口补上名称。 */
|
|
214
|
+
& :is(._2H3hWW_panelRow, .ET65mq_trigger):is(:hover, :focus-visible)::after {
|
|
215
|
+
content: attr(aria-label);
|
|
216
|
+
position: absolute;
|
|
217
|
+
z-index: 40;
|
|
218
|
+
left: 44px;
|
|
219
|
+
top: 50%;
|
|
220
|
+
transform: translateY(-50%);
|
|
221
|
+
padding: 4px 8px;
|
|
222
|
+
border: 1px solid var(--dsw-alias-border-l3);
|
|
223
|
+
border-radius: 6px;
|
|
224
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
225
|
+
color: var(--dsw-alias-label-primary);
|
|
226
|
+
font: 12px / 20px var(--dsw-font-family);
|
|
227
|
+
white-space: nowrap;
|
|
228
|
+
pointer-events: none;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
& .ET65mq_trigger:is(:hover, :focus-visible)::after {
|
|
232
|
+
content: "设置";
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* 悬浮卡片由宿主通过 portal 挂在侧栏外。 */
|
|
237
|
+
.dsh-css-project {
|
|
238
|
+
display: none;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
html[data-windows-titlebar] body[data-ds-dark-theme] .dsh-css-project {
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
gap: 6px;
|
|
245
|
+
color: var(--dsw-alias-label-secondary);
|
|
246
|
+
font-size: 12px;
|
|
247
|
+
line-height: 20px;
|
|
248
|
+
|
|
249
|
+
& svg {
|
|
250
|
+
flex: none;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
& span {
|
|
254
|
+
overflow-wrap: anywhere;
|
|
255
|
+
}
|
|
256
|
+
}
|