dsh-plugin-table-zoom 0.3.4 → 0.3.5
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/CHANGELOG.md +5 -0
- package/README.en.md +175 -0
- package/README.md +23 -3
- package/docs/table-zoom-float.png +0 -0
- package/package.json +12 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.5] - 2026-08-29
|
|
4
|
+
|
|
5
|
+
- 文档:安装节补单行 dsh plugin add 命令(原四步手动挂载降为备选);
|
|
6
|
+
- 元数据:description 补缩放/平移/复制卖点,keywords 11 → 18;
|
|
7
|
+
- 新增英文版 README.en.md 与双语切换行。
|
|
3
8
|
## [0.3.4] - 2026-08-25
|
|
4
9
|
|
|
5
10
|
- 相关插件段新增 dsh-plugin-windows-guard(Windows 环境防坑守则 skill 插件,互相引流)。
|
package/README.en.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
[中文](./README.md) | **English**
|
|
2
|
+
|
|
3
|
+
# dsh-plugin-table-zoom
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
A chat table float-window plugin for the DeepSeek Harness (dsh) Web GUI.
|
|
10
|
+
|
|
11
|
+
Markdown tables the model outputs in chat are often **very long (many rows) or very wide (horizontal overflow)**,
|
|
12
|
+
and can't be read in one pass within the conversation flow: you have to scroll the chat up and down and drag
|
|
13
|
+
left and right to see it all. This plugin automatically injects a small "⛶ Float view" (浮窗查看) button above
|
|
14
|
+
long tables; clicking it pops up a **standalone, scrollable float window** showing the full table, with
|
|
15
|
+
**one-click copy as Markdown**.
|
|
16
|
+
|
|
17
|
+
Pure front-end DOM enhancement: no core-package changes, no tool registration, no server-side logic, zero
|
|
18
|
+
runtime dependencies.
|
|
19
|
+
|
|
20
|
+
## Screenshot
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
> Real Web GUI screenshot (a large wide table → click "⛶ Float view" → browse the full table in the
|
|
25
|
+
> float window, with drag-to-resize / Ctrl+wheel zoom 60%–250% / Space-drag panning / one-click copy
|
|
26
|
+
> as Markdown).
|
|
27
|
+
|
|
28
|
+
## Features
|
|
29
|
+
|
|
30
|
+
- Long tables (≥ 9 rows including the header, or horizontal overflow beyond 2px) get a right-aligned
|
|
31
|
+
"⛶ Float view" button below the table;
|
|
32
|
+
- Short tables are left alone;
|
|
33
|
+
- Clicking the button opens the float window: the title shows "Table · N rows × M columns", the body scrolls
|
|
34
|
+
independently (both horizontally and vertically), it closes via the close button / Esc / clicking the
|
|
35
|
+
overlay, and chat-page scrolling is locked while it is open;
|
|
36
|
+
- A "Copy as Markdown" button in the window header copies the whole table in one click (inline line breaks
|
|
37
|
+
in cells are collapsed, pipe characters are escaped);
|
|
38
|
+
- The float window shows a **clone of the original table** — the table in chat stays untouched and is not
|
|
39
|
+
enhanced twice;
|
|
40
|
+
- **Drag to resize**: the handle at the bottom-right corner freely adjusts the window size (minimum 320×200,
|
|
41
|
+
maximum up to the viewport margins) and only affects the current open;
|
|
42
|
+
- **Re-fits every time it opens**: the window remembers no layout — width adapts to the table content
|
|
43
|
+
(narrow tables don't fill the window; very large tables fill the available viewport width, floor of 320),
|
|
44
|
+
position is centered, zoom is 100%; close and reopen and it returns to the adaptive state;
|
|
45
|
+
- **Drag to move**: hold the title bar to drag the window anywhere (kept within the page, it cannot be
|
|
46
|
+
dragged off screen); the position only affects the current open;
|
|
47
|
+
- **Ctrl+wheel zoom**: hold Ctrl and scroll inside the window to zoom the table font from 60% to 250%
|
|
48
|
+
(10% steps); the title bar shows the percentage live; **zoom is not remembered — every open resets to 100%**;
|
|
49
|
+
- **Text selection**: a normal left-click drag inside the table (including when zoomed) selects text,
|
|
50
|
+
with no panning hijack;
|
|
51
|
+
- **Hold Space to pan**: when the table is wider/taller than the window, hold Space and drag the body to
|
|
52
|
+
scroll left/right/up/down (the grab cursor appears only while Space is held; touch devices use native
|
|
53
|
+
scrolling);
|
|
54
|
+
- **Clear scrollbars**: the body scrollbar is darkened and thickened so it stays visible in light themes;
|
|
55
|
+
- **Column width matching**: the column width cap matches in-chat tables (`min(30vw, 320px)`); overly wide
|
|
56
|
+
columns wrap and shrink, so the table no longer breaks out of the window.
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
No configuration required — install and use:
|
|
61
|
+
|
|
62
|
+
- No environment variables are read, no API key / token is needed, no config files are written;
|
|
63
|
+
- The long-table thresholds (≥ 9 rows / 2px horizontal overflow) are built-in defaults, nothing to tune;
|
|
64
|
+
- Styling adapts to the DSH theme CSS variables; no separate theme configuration is introduced.
|
|
65
|
+
|
|
66
|
+
## Installation
|
|
67
|
+
|
|
68
|
+
```powershell
|
|
69
|
+
# npm (recommended)
|
|
70
|
+
dsh plugin --profile web add dsh-plugin-table-zoom
|
|
71
|
+
# or GitHub
|
|
72
|
+
dsh plugin --profile web add github:Pasumao/dsh-plugin-table-zoom
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
After installing, restart `dsh web` (the launcher brings it back up) and refresh the browser. The package
|
|
76
|
+
ships with its own `cordis.patch.yml` mount line, which `dsh plugin add` applies automatically — no manual
|
|
77
|
+
config edits needed.
|
|
78
|
+
|
|
79
|
+
Manual mounting (fallback, for when `dsh plugin add` is unavailable) — this is a pure client-side plugin
|
|
80
|
+
and must be mounted as a bundle into dsh's web profile (same mechanism as dsh-notify /
|
|
81
|
+
dsh-plugin-image-tools):
|
|
82
|
+
|
|
83
|
+
1. Install the dependency (in the profile directory, e.g. `~/.dsh/profiles/web`):
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install dsh-plugin-table-zoom
|
|
87
|
+
# or install directly from GitHub
|
|
88
|
+
npm install github:Pasumao/dsh-plugin-table-zoom
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
2. Add the plugin to `dsh.profile.bundles` in the profile's `package.json`:
|
|
92
|
+
|
|
93
|
+
```jsonc
|
|
94
|
+
"dsh": {
|
|
95
|
+
"profile": {
|
|
96
|
+
"bundles": [
|
|
97
|
+
/* ...existing bundles... */,
|
|
98
|
+
"dsh-plugin-table-zoom"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
3. Run `pnpm install` (or `npm install`) in the profile directory;
|
|
105
|
+
4. **Restart `dsh web`** (the launcher brings it back up) so the new plugin enters the browser bundle.
|
|
106
|
+
|
|
107
|
+
Install from source (local development / debugging):
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
git clone https://github.com/Pasumao/dsh-plugin-table-zoom.git
|
|
111
|
+
cd dsh-plugin-table-zoom
|
|
112
|
+
npm install
|
|
113
|
+
# mount into the profile as a link: dependency, see the note below
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
> For local development/debugging, a `link:` dependency can replace step 1:
|
|
117
|
+
> `"dsh-plugin-table-zoom": "link:D:/path/to/dsh-plugin-table-zoom"`.
|
|
118
|
+
|
|
119
|
+
## How it works
|
|
120
|
+
|
|
121
|
+
- Server side (`lib/index.js`): an empty implementation. The plugin is mounted into the profile as a
|
|
122
|
+
"bundled patch"; the client side is declared via `dsh.client` and delivered to the browser through
|
|
123
|
+
`/plugins/dsh-plugin-table-zoom/client.js` (same mechanism as dsh-notify / dsh-plugin-image-tools).
|
|
124
|
+
- Client side (`lib/client.js`): a MutationObserver watches `document.body`, and rAF-coalesced scans find
|
|
125
|
+
markdown tables (the core renderer wraps tables in a container whose class contains `tableScroll`); a
|
|
126
|
+
button row is injected after the container for long tables. Clicking the button imperatively creates the
|
|
127
|
+
float window (reusing image-tools' lightbox pattern: a single pure-DOM node change, no insertion/removal
|
|
128
|
+
of React-managed structures, safe across re-renders).
|
|
129
|
+
|
|
130
|
+
## Development
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
npm run selfcheck # offline pure-function tests (detection / long-table check / Markdown serialization)
|
|
134
|
+
npm run smoke # selfcheck + fake-DOM end-to-end smoke test (button injection / window open-close / copy)
|
|
135
|
+
npm run pack # pack the plugin
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Compatibility
|
|
139
|
+
|
|
140
|
+
- Target: DeepSeek Harness Web GUI (dsh web); adapts to skins and theme CSS variables;
|
|
141
|
+
- Requires browser `MutationObserver` / `requestAnimationFrame`; auto-disables without a DOM environment;
|
|
142
|
+
- Does not affect other plugins: only tables inside `tableScroll` containers are matched, and tables inside
|
|
143
|
+
float windows and the image-tools lightbox are skipped;
|
|
144
|
+
- Since dsh `0.1.1-rc.2`, the core renderer has an `md-table-wide` branch for wide tables with 4+ columns
|
|
145
|
+
(width extends into the whitespace on both sides of the chat content column, `overflow-x:hidden` by
|
|
146
|
+
default with the scrollbar appearing only on hover). The plugin injects an override rule that pulls wide
|
|
147
|
+
tables back to the content column width with a persistent horizontal scrollbar, restoring the classic
|
|
148
|
+
"scroll wide tables within the conversation column" experience; older dsh versions have no
|
|
149
|
+
`md-table-wide` class, so the rule does not match and behavior is unchanged.
|
|
150
|
+
|
|
151
|
+
## Related plugins
|
|
152
|
+
|
|
153
|
+
This plugin is part of **Pasumao's dsh plugin ecosystem**; the published plugins in this family work well
|
|
154
|
+
together:
|
|
155
|
+
|
|
156
|
+
| Plugin (npm) | GitHub | Description |
|
|
157
|
+
|---|---|---|
|
|
158
|
+
| [dsh-notify](https://www.npmjs.com/package/dsh-notify) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-notify) | Native Windows notifications + system tray |
|
|
159
|
+
| [dsh-plugin-choice-refresh](https://www.npmjs.com/package/dsh-plugin-choice-refresh) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-choice-refresh) | Choice enhancements: regenerate options / more options |
|
|
160
|
+
| [dsh-plugin-dev-kb](https://www.npmjs.com/package/dsh-plugin-dev-kb) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-dev-kb) | Plugin-development knowledge base (full official-docs mirror + skill) |
|
|
161
|
+
| [dsh-plugin-image-tools](https://www.npmjs.com/package/dsh-plugin-image-tools) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-image-tools) | Image choice cards + inline images in replies + image intake for blind models |
|
|
162
|
+
| [dsh-plugin-workbench](https://www.npmjs.com/package/dsh-plugin-workbench) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-workbench) | VS Code-style file explorer + editable preview |
|
|
163
|
+
| [dsh-plugin-windows-guard](https://www.npmjs.com/package/dsh-plugin-windows-guard) | [GitHub repo](https://github.com/Pasumao/dsh-plugin-windows-guard) | Windows pitfall protection: guideline skills + mojibake detection / dangerous-write blocking / encoding diagnosis & repair |
|
|
164
|
+
|
|
165
|
+
> The rest of the series: [Pasumao · dsh plugins](https://github.com/Pasumao); if you find these useful,
|
|
166
|
+
> a ⭐ on GitHub is appreciated.
|
|
167
|
+
|
|
168
|
+
## AI generation disclosure
|
|
169
|
+
|
|
170
|
+
Code and docs are AI-assisted (DeepSeek Harness), all human-reviewed and verified on a live install
|
|
171
|
+
(`npm run smoke`: selfcheck + fake-DOM end-to-end smoke test).
|
|
172
|
+
|
|
173
|
+
## License
|
|
174
|
+
|
|
175
|
+
MIT
|
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
+
[**中文**](./README.md) | [English](./README.en.md)
|
|
8
|
+
|
|
7
9
|
DeepSeek Harness (dsh) Web GUI 聊天表格浮窗插件。
|
|
8
10
|
|
|
9
11
|
聊天里模型输出的 markdown 表格经常**很长(行数多)或很宽(横向溢出)**,
|
|
@@ -13,6 +15,13 @@ DeepSeek Harness (dsh) Web GUI 聊天表格浮窗插件。
|
|
|
13
15
|
|
|
14
16
|
纯前端 DOM 增强:不改核心包、不注册工具、无服务端逻辑、零运行时依赖。
|
|
15
17
|
|
|
18
|
+
## 效果图
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
> 真实 Web GUI 截图(上方大宽表 → 点「⛶ 浮窗查看」→ 浮窗内完整浏览,
|
|
23
|
+
> 支持拖拽改尺寸 / Ctrl+滚轮缩放 / 空格拖拽平移 / 一键复制 Markdown)。
|
|
24
|
+
|
|
16
25
|
## 功能
|
|
17
26
|
|
|
18
27
|
- 长表(≥ 9 行含表头,或横向溢出超过 2px)表格下方出现右对齐的「⛶ 浮窗查看」按钮;
|
|
@@ -47,8 +56,19 @@ DeepSeek Harness (dsh) Web GUI 聊天表格浮窗插件。
|
|
|
47
56
|
|
|
48
57
|
## 安装
|
|
49
58
|
|
|
50
|
-
|
|
51
|
-
|
|
59
|
+
```powershell
|
|
60
|
+
# npm(推荐)
|
|
61
|
+
dsh plugin --profile web add dsh-plugin-table-zoom
|
|
62
|
+
# 或 GitHub
|
|
63
|
+
dsh plugin --profile web add github:Pasumao/dsh-plugin-table-zoom
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
装完重启 `dsh web`(launcher 重新拉起)并刷新浏览器。包自带 `cordis.patch.yml`
|
|
67
|
+
挂载行,`dsh plugin add` 会自动应用,无需手动改配置。
|
|
68
|
+
|
|
69
|
+
手动挂载(备选,无法使用 `dsh plugin add` 时)——本插件是纯客户端插件,
|
|
70
|
+
需作为 bundle 挂载进 dsh 的 Web profile(与 dsh-notify / dsh-plugin-image-tools
|
|
71
|
+
同款机制):
|
|
52
72
|
|
|
53
73
|
1. 安装依赖(在 profile 目录,例如 `~/.dsh/profiles/web`):
|
|
54
74
|
|
|
@@ -128,7 +148,7 @@ npm run pack # 打包
|
|
|
128
148
|
| [dsh-plugin-dev-kb](https://www.npmjs.com/package/dsh-plugin-dev-kb) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-dev-kb) | 插件开发知识库(官方文档完整镜像 + 技能) |
|
|
129
149
|
| [dsh-plugin-image-tools](https://www.npmjs.com/package/dsh-plugin-image-tools) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-image-tools) | 图片选择卡 + 回复内嵌图片 + 盲模型收图 |
|
|
130
150
|
| [dsh-plugin-workbench](https://www.npmjs.com/package/dsh-plugin-workbench) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-workbench) | VS Code 风格文件浏览器 + 可编辑预览 |
|
|
131
|
-
| [dsh-plugin-windows-guard](https://www.npmjs.com/package/dsh-plugin-windows-guard) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-windows-guard) | Windows
|
|
151
|
+
| [dsh-plugin-windows-guard](https://www.npmjs.com/package/dsh-plugin-windows-guard) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-windows-guard) | Windows 环境防坑:守则技能 + 乱码检测 / 危险写拦截 / 编码诊断修复 |
|
|
132
152
|
|
|
133
153
|
> 本系列其余插件见 [Pasumao · dsh 插件](https://github.com/Pasumao);觉得好用欢迎到 GitHub 点 ⭐。
|
|
134
154
|
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-table-zoom",
|
|
3
|
-
"description": "DSH
|
|
4
|
-
"version": "0.3.
|
|
3
|
+
"description": "DSH 聊天表格浮窗插件:markdown 表格太长(行多)或太宽(溢出)看不完时,表格上方自动出现「⛶ 浮窗查看」按钮——弹出可独立滚动的浮窗完整显示,支持拖拽移动/改尺寸、Ctrl+滚轮 60%–250% 缩放、空格拖拽平移、一键复制为 Markdown。纯前端 DOM 增强,不改核心包、不注册工具、无服务端逻辑。",
|
|
4
|
+
"version": "0.3.5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"lib",
|
|
14
14
|
"scripts",
|
|
15
|
+
"docs",
|
|
15
16
|
"cordis.patch.yml",
|
|
16
17
|
"CHANGELOG.md",
|
|
17
18
|
"README.md",
|
|
19
|
+
"README.en.md",
|
|
18
20
|
"LICENSE",
|
|
19
21
|
"设计说明.md"
|
|
20
22
|
],
|
|
@@ -40,8 +42,15 @@
|
|
|
40
42
|
"table",
|
|
41
43
|
"markdown",
|
|
42
44
|
"popup",
|
|
45
|
+
"floating-window",
|
|
46
|
+
"overlay",
|
|
43
47
|
"zoom",
|
|
44
|
-
"float"
|
|
48
|
+
"float",
|
|
49
|
+
"wide-table",
|
|
50
|
+
"datatable",
|
|
51
|
+
"copy-markdown",
|
|
52
|
+
"chat-ui",
|
|
53
|
+
"preview"
|
|
45
54
|
],
|
|
46
55
|
"repository": {
|
|
47
56
|
"type": "git",
|