@weniatall/dsh-file-viewer 0.3.21 → 0.3.22
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 +25 -0
- package/lib/client.js +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -144,6 +144,31 @@ macOS 端按规范**优先消费宿主算好的 `--dsh-frame-overlay-top`**—
|
|
|
144
144
|
|
|
145
145
|
手机端不需要这条偏移:抽屉在手机上占满全屏,而 `dsh-mobile-adapter` 会把含 scrim 的 overlay 层提到 `z-index:1100`(高于它自己 900 的顶栏),所以抽屉工具栏不会被顶栏压住。这两点由插件测试之外的因素保证,改动移动端层级时需一并复查。
|
|
146
146
|
|
|
147
|
+
### 桌面版圆角:抽屉是"卡片",不是"浮层"
|
|
148
|
+
|
|
149
|
+
Windows 桌面版的抽屉与宿主内容卡**从同一条边开始**——标题栏条带的下沿。宿主把内容卡的**左上角**切 16px 圆角(`--dsh-windows-content-radius`),其余三个角保持直角。抽屉如果四角全直,就会在这条共用边上与内容卡拼成一条连续横带:会话标题、会话页签和抽屉工具栏连成一片,抽屉看起来像是**盖在窗口之上的一层**,而不是**窗口里的一块面板**——这正是"层级比窗体和会话高太多"的视觉来源。
|
|
150
|
+
|
|
151
|
+
因此 Windows 桌面版下抽屉只切**左上角**,取值直接消费宿主变量:
|
|
152
|
+
|
|
153
|
+
```css
|
|
154
|
+
html[data-windows-titlebar]:not([data-fullscreen]) .fv-shell[data-mobile="false"]{
|
|
155
|
+
border-radius:var(--dsh-windows-content-radius,16px) 0 0 0}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
- **只切一个角**:四角全圆会变成"悬浮卡片",那是与窗口的另一种关系;右侧和底部贴住窗口边缘,保持直角。
|
|
159
|
+
- **消费宿主变量而非写死 16px**:宿主按 DPI 换算,写死会在 150% 缩放下错位。
|
|
160
|
+
- **全屏撤掉**:全屏时条带消失、抽屉铺满 frame,圆角会在窗口边缘留下缺口,所以用 `:not([data-fullscreen])` 收口。
|
|
161
|
+
- **不带 `!important`**:这条规则不与标题栏偏移争夺同一属性,留在普通声明里,也就不会进"必须人工复核"的白名单。
|
|
162
|
+
|
|
163
|
+
| 平台 | 抽屉圆角 |
|
|
164
|
+
| --- | --- |
|
|
165
|
+
| Windows 桌面版(窗口态) | 左上角 `--dsh-windows-content-radius`,其余直角 |
|
|
166
|
+
| Windows 桌面版(全屏) | 四角直角 |
|
|
167
|
+
| macOS 桌面版 | 四角直角(交通灯让位由 `top` 偏移负责,几何与 Windows 不同) |
|
|
168
|
+
| Web 浏览器 | 四角直角(没有需要对齐的宿主内容卡) |
|
|
169
|
+
|
|
170
|
+
**验证方式**:`test/cascade.test.mjs` 在真实 Chrome 里读取 `getComputedStyle` 的四个角,逐平台/全屏组合断言最终半径,并验证改宿主变量时圆角跟着变(证明消费的是变量而不是字面量);`test/package.test.mjs` 锁住"只切左上角"与"不带 `!important`"。移除该规则后这两项测试即失败。
|
|
171
|
+
|
|
147
172
|
## Git 面板
|
|
148
173
|
|
|
149
174
|
左侧栏顶部有两个页签:**文件**(目录树)与 **Git**(源代码管理)。Git 页签按 VSCode 源代码管理面板的方式组织:仓库 → 分支 → 提交记录 → 该提交的改动文件。
|
package/lib/client.js
CHANGED
|
@@ -459,6 +459,24 @@ window.__ModuleLoader__.load({
|
|
|
459
459
|
rule it has to beat, so the outcome is decided by the important flag and
|
|
460
460
|
the attribute count rather than by sheet order. */
|
|
461
461
|
html[data-windows-titlebar]:not([data-fullscreen]) .fv-scrim[role="dialog"]{top:var(--dsh-windows-titlebar-height,40px)!important}
|
|
462
|
+
/* The drawer is a peer of the host's content card, not a second window.
|
|
463
|
+
|
|
464
|
+
On Windows the host rounds the content card's leading-top corner with
|
|
465
|
+
--dsh-windows-content-radius and leaves every other corner square. The
|
|
466
|
+
drawer starts on that same edge — the caption strip's bottom — so it
|
|
467
|
+
has to speak the same language. Left square, its corner reads as a slab
|
|
468
|
+
welded onto the session header: the session title, its tabs and the
|
|
469
|
+
drawer's own toolbar all line up into one continuous strip, and the
|
|
470
|
+
drawer looks like a layer above the window it lives in rather than a
|
|
471
|
+
panel inside it.
|
|
472
|
+
|
|
473
|
+
Only the leading-top corner is rounded, matching the host exactly. The
|
|
474
|
+
trailing edge is the window edge and stays square, as does the bottom.
|
|
475
|
+
No !important: nothing else sets a radius on the shell, so this wins on
|
|
476
|
+
specificity and stays out of the caption-strip guard's way. Fullscreen
|
|
477
|
+
drops the caption strip, so the drawer covers the frame and goes square
|
|
478
|
+
again; a phone drawer is the whole viewport and keeps its own rules. */
|
|
479
|
+
html[data-windows-titlebar]:not([data-fullscreen]) .fv-shell[data-mobile="false"]{border-radius:var(--dsh-windows-content-radius,16px) 0 0 0}
|
|
462
480
|
/* macOS 桌面版是另一套几何:没有那排 caption 按钮,但窗口左上角有交通灯
|
|
463
481
|
(关闭/最小化/缩放),宿主用 html[data-platform="darwin"] 标记,并把需要
|
|
464
482
|
让位的高度发布为 --dsh-frame-top-clearance(48px)。宿主另外提供一个算好
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weniatall/dsh-file-viewer",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.22",
|
|
4
4
|
"description": "Workspace file viewer and Git panel for DeepSeek Harness: file tree, syntax-highlighted code, images, PDF, Excel and Word, plus local/remote branches, paged commit history, commit diffs, working-tree changes and changed-file navigation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|