dsh-plugin-table-zoom 0.3.4 → 0.3.6
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 +10 -0
- package/README.en.md +184 -0
- package/README.md +33 -4
- package/docs/banner.svg +25 -0
- package/docs/table-zoom-float.png +0 -0
- package/lib/client.js +10 -8
- package/package.json +12 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.6] - 2026-09-11
|
|
4
|
+
|
|
5
|
+
- 修复:浮窗按钮防重复判定改用表格 dataset 标记,列表重排 / 父级重渲染不再误判为「已注入」或「未注入」;
|
|
6
|
+
- 修复:浮窗关闭时 body 滚动锁还原更精确——只在自己锁过滚动时才解锁,与 image-tools 放大层等其他浮层共存时不会错乱恢复。
|
|
7
|
+
|
|
8
|
+
## [0.3.5] - 2026-08-29
|
|
9
|
+
|
|
10
|
+
- 文档:安装节补单行 dsh plugin add 命令(原四步手动挂载降为备选);
|
|
11
|
+
- 元数据:description 补缩放/平移/复制卖点,keywords 11 → 18;
|
|
12
|
+
- 新增英文版 README.en.md 与双语切换行。
|
|
3
13
|
## [0.3.4] - 2026-08-25
|
|
4
14
|
|
|
5
15
|
- 相关插件段新增 dsh-plugin-windows-guard(Windows 环境防坑守则 skill 插件,互相引流)。
|
package/README.en.md
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/banner.svg" alt="dsh-plugin-table-zoom banner" width="100%">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# dsh-plugin-table-zoom
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

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

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

|
|
8
|
+

|
|
4
9
|

|
|
10
|
+

|
|
5
11
|

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

|
|
27
|
+
|
|
28
|
+
> 真实 Web GUI 截图(上方大宽表 → 点「⛶ 浮窗查看」→ 浮窗内完整浏览,
|
|
29
|
+
> 支持拖拽改尺寸 / Ctrl+滚轮缩放 / 空格拖拽平移 / 一键复制 Markdown)。
|
|
30
|
+
|
|
16
31
|
## 功能
|
|
17
32
|
|
|
18
33
|
- 长表(≥ 9 行含表头,或横向溢出超过 2px)表格下方出现右对齐的「⛶ 浮窗查看」按钮;
|
|
19
34
|
- 短表不打扰;
|
|
20
35
|
- 点击按钮弹出浮窗:标题显示「表格 · N 行 × M 列」,正文可独立滚动(横竖都行),
|
|
21
36
|
关闭按钮 / Esc / 点击遮罩均可关闭,打开期间锁定聊天页滚动;
|
|
37
|
+
- **关闭时滚动锁还原精确**:只在自己锁过 body 滚动时才解锁,与
|
|
38
|
+
dsh-plugin-image-tools 的放大层等其他浮层共存时不会错乱恢复;
|
|
22
39
|
- 浮窗头部「复制为 Markdown」按钮一键复制整表(单元格内联换行折叠、管道符转义);
|
|
23
40
|
- 浮窗里展示的是**原表格的克隆**,聊天里的表格保持不变,也不会被重复增强;
|
|
24
41
|
- **拖拽改尺寸**:浮窗右下角手柄可自由调整大小(最小 320×200,最大到视口留白),
|
|
@@ -47,8 +64,19 @@ DeepSeek Harness (dsh) Web GUI 聊天表格浮窗插件。
|
|
|
47
64
|
|
|
48
65
|
## 安装
|
|
49
66
|
|
|
50
|
-
|
|
51
|
-
|
|
67
|
+
```powershell
|
|
68
|
+
# npm(推荐)
|
|
69
|
+
dsh plugin --profile web add dsh-plugin-table-zoom
|
|
70
|
+
# 或 GitHub
|
|
71
|
+
dsh plugin --profile web add github:Pasumao/dsh-plugin-table-zoom
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
装完重启 `dsh web`(launcher 重新拉起)并刷新浏览器。包自带 `cordis.patch.yml`
|
|
75
|
+
挂载行,`dsh plugin add` 会自动应用,无需手动改配置。
|
|
76
|
+
|
|
77
|
+
手动挂载(备选,无法使用 `dsh plugin add` 时)——本插件是纯客户端插件,
|
|
78
|
+
需作为 bundle 挂载进 dsh 的 Web profile(与 dsh-notify / dsh-plugin-image-tools
|
|
79
|
+
同款机制):
|
|
52
80
|
|
|
53
81
|
1. 安装依赖(在 profile 目录,例如 `~/.dsh/profiles/web`):
|
|
54
82
|
|
|
@@ -128,7 +156,8 @@ npm run pack # 打包
|
|
|
128
156
|
| [dsh-plugin-dev-kb](https://www.npmjs.com/package/dsh-plugin-dev-kb) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-dev-kb) | 插件开发知识库(官方文档完整镜像 + 技能) |
|
|
129
157
|
| [dsh-plugin-image-tools](https://www.npmjs.com/package/dsh-plugin-image-tools) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-image-tools) | 图片选择卡 + 回复内嵌图片 + 盲模型收图 |
|
|
130
158
|
| [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
|
|
159
|
+
| [dsh-plugin-windows-guard](https://www.npmjs.com/package/dsh-plugin-windows-guard) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-windows-guard) | Windows 环境防坑:守则技能 + 乱码检测 / 危险写拦截 / 编码诊断修复 |
|
|
160
|
+
| [dsh-plugin-context-trim](https://www.npmjs.com/package/dsh-plugin-context-trim) | [GitHub 仓库](https://github.com/Pasumao/dsh-plugin-context-trim) | 会话注入门控:skill / tool / 提示词段落按会话裁剪 |
|
|
132
161
|
|
|
133
162
|
> 本系列其余插件见 [Pasumao · dsh 插件](https://github.com/Pasumao);觉得好用欢迎到 GitHub 点 ⭐。
|
|
134
163
|
|
|
@@ -139,4 +168,4 @@ npm run pack # 打包
|
|
|
139
168
|
|
|
140
169
|
## License
|
|
141
170
|
|
|
142
|
-
MIT
|
|
171
|
+
[MIT](./LICENSE)
|
package/docs/banner.svg
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="260" viewBox="0 0 1200 260" role="img" aria-label="dsh-plugin-table-zoom banner">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#0a1830"/>
|
|
5
|
+
<stop offset="1" stop-color="#102a4c"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<radialGradient id="glow" cx="0.85" cy="0.1" r="0.9">
|
|
8
|
+
<stop offset="0" stop-color="#2DD4BF" stop-opacity="0.22"/>
|
|
9
|
+
<stop offset="1" stop-color="#2DD4BF" stop-opacity="0"/>
|
|
10
|
+
</radialGradient>
|
|
11
|
+
<linearGradient id="whale" x1="0" y1="0" x2="0" y2="1">
|
|
12
|
+
<stop offset="0" stop-color="#ffffff"/>
|
|
13
|
+
<stop offset="1" stop-color="#cfe3ff"/>
|
|
14
|
+
</linearGradient>
|
|
15
|
+
</defs>
|
|
16
|
+
<rect width="1200" height="260" rx="18" fill="url(#bg)"/>
|
|
17
|
+
<rect width="1200" height="260" rx="18" fill="url(#glow)"/>
|
|
18
|
+
<rect x="0" y="0" width="1200" height="6" rx="3" fill="#2DD4BF" opacity="0.85"/>
|
|
19
|
+
<g transform="translate(64,80) scale(2.0)">
|
|
20
|
+
<path d="M48.8354 10.0479C48.3232 9.79199 48.1025 10.2798 47.8032 10.5278C47.7007 10.6079 47.6143 10.7119 47.5273 10.8076C46.7793 11.624 45.9048 12.1597 44.7622 12.0957C43.0923 12 41.666 12.5356 40.4058 13.8398C40.1377 12.2319 39.2476 11.272 37.8926 10.6558C37.1836 10.3359 36.4668 10.0156 35.9702 9.31982C35.6235 8.82373 35.5293 8.27197 35.356 7.72754C35.2456 7.3999 35.1353 7.06396 34.7651 7.00781C34.3633 6.94385 34.2056 7.2876 34.0479 7.57568C33.418 8.75195 33.1733 10.0479 33.1973 11.3599C33.2524 14.312 34.4736 16.6641 36.8999 18.3359C37.1758 18.5278 37.2466 18.7197 37.1597 19C36.9946 19.5757 36.7974 20.1357 36.624 20.7119C36.5137 21.0801 36.3486 21.1597 35.9624 21C34.6309 20.4321 33.481 19.5918 32.4644 18.5757C30.7393 16.8721 29.1792 14.9917 27.2334 13.52C26.7764 13.1758 26.3193 12.856 25.8467 12.5518C23.8618 10.584 26.1069 8.96777 26.627 8.77588C27.1704 8.57568 26.8159 7.8877 25.0591 7.896C23.3022 7.90381 21.6953 8.50391 19.647 9.30371C19.3477 9.42383 19.0322 9.51172 18.7095 9.58398C16.8501 9.22363 14.9199 9.14355 12.9033 9.37598C9.10596 9.80762 6.07275 11.6396 3.84326 14.7681C1.16455 18.5278 0.53418 22.7998 1.30664 27.2559C2.11768 31.9521 4.46582 35.8398 8.07373 38.8799C11.8159 42.0322 16.1255 43.5762 21.041 43.2803C24.0269 43.104 27.3516 42.6963 31.1016 39.4561C32.0469 39.936 33.0396 40.1279 34.686 40.272C35.9546 40.3921 37.1758 40.208 38.1211 40.0078C39.6021 39.688 39.4995 38.2881 38.9639 38.0322C34.623 35.9678 35.5762 36.8081 34.71 36.1279C36.9155 33.4639 40.2402 30.6958 41.54 21.728C41.6426 21.0161 41.5557 20.5679 41.54 19.9917C41.5322 19.6396 41.6108 19.5039 42.0049 19.4639C43.0923 19.3359 44.1479 19.0317 45.1167 18.4878C47.9292 16.9199 49.064 14.3438 49.3315 11.2559C49.3711 10.7837 49.3237 10.2959 48.8354 10.0479ZM24.3262 37.8398C20.1196 34.4639 18.0791 33.3521 17.2358 33.3999C16.4482 33.4482 16.5898 34.3682 16.7632 34.9678C16.9443 35.5601 17.1812 35.9683 17.5117 36.4878C17.7402 36.832 17.8979 37.3442 17.2832 37.728C15.9282 38.584 13.5728 37.4399 13.4624 37.3838C10.7207 35.7358 8.42822 33.5601 6.81348 30.584C5.25342 27.7197 4.34766 24.6479 4.19775 21.3677C4.1582 20.5757 4.38672 20.2959 5.15869 20.1519C6.17529 19.96 7.22314 19.9199 8.23926 20.0718C12.5327 20.7119 16.1885 22.6719 19.2529 25.7759C21.002 27.5439 22.3252 29.6558 23.6885 31.7202C25.1377 33.9121 26.6978 36 28.6831 37.7119C29.3843 38.312 29.9434 38.7681 30.479 39.104C28.8643 39.2881 26.1699 39.3281 24.3262 37.8398ZM26.3433 24.6001C26.3433 24.248 26.6191 23.9678 26.9658 23.9678C27.0444 23.9678 27.1152 23.9839 27.1782 24.0078C27.2651 24.04 27.3438 24.0879 27.4067 24.1602C27.5171 24.272 27.5801 24.4321 27.5801 24.6001C27.5801 24.9521 27.3042 25.2319 26.9575 25.2319C26.6108 25.2319 26.3433 24.9521 26.3433 24.6001ZM32.6064 27.8799C32.2046 28.0479 31.8027 28.1919 31.4165 28.208C30.8179 28.2397 30.1641 27.9922 29.8096 27.688C29.2583 27.2158 28.8643 26.9521 28.6987 26.1279C28.6279 25.7759 28.6675 25.2319 28.7305 24.9199C28.8721 24.248 28.7144 23.8159 28.2495 23.4238C27.8716 23.104 27.3911 23.0161 26.8633 23.0161C26.666 23.0161 26.4849 22.9277 26.3511 22.856C26.1304 22.7441 25.9492 22.4639 26.1226 22.1201C26.1777 22.0078 26.4458 21.7358 26.5088 21.688C27.2256 21.272 28.0527 21.4077 28.8169 21.7197C29.5259 22.0161 30.0615 22.5601 30.834 23.3281C31.6216 24.2559 31.7632 24.5117 32.2124 25.208C32.5669 25.752 32.8901 26.312 33.1104 26.9521C33.2446 27.3521 33.0713 27.6802 32.6064 27.8799Z" fill="url(#whale)"/>
|
|
21
|
+
</g>
|
|
22
|
+
<text x="212" y="86" font-family="'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif" font-size="17" font-weight="600" letter-spacing="5" fill="#2DD4BF">DEEPSEEK HARNESS · DSH PLUGIN</text>
|
|
23
|
+
<text x="212" y="152" font-family="ui-monospace,'Cascadia Code',Consolas,monospace" font-size="46" font-weight="700" fill="#f4f8ff">dsh-plugin-table-zoom</text>
|
|
24
|
+
<text x="212" y="204" font-family="'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif" font-size="22" fill="#9fb3c8">长表 / 宽表一键浮窗查看 · 缩放平移 · 复制为 Markdown</text>
|
|
25
|
+
</svg>
|
|
Binary file
|
package/lib/client.js
CHANGED
|
@@ -178,7 +178,11 @@ window.__ModuleLoader__.load({
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
popup.remove();
|
|
181
|
-
|
|
181
|
+
// 仅当 body.style.overflow 仍是我们打开时设置的值才还原:
|
|
182
|
+
// 期间其它组件(如图片 lightbox)可能又改写过该属性,不能覆盖别人的状态。
|
|
183
|
+
if (lastTrigger !== null && document.body.style.overflow === lastTrigger.appliedOverflow) {
|
|
184
|
+
document.body.style.overflow = lastTrigger.bodyOverflow !== void 0 ? lastTrigger.bodyOverflow : '';
|
|
185
|
+
}
|
|
182
186
|
lastTrigger = null;
|
|
183
187
|
}
|
|
184
188
|
|
|
@@ -593,7 +597,7 @@ window.__ModuleLoader__.load({
|
|
|
593
597
|
});
|
|
594
598
|
}
|
|
595
599
|
|
|
596
|
-
lastTrigger = { bodyOverflow: document.body.style.overflow };
|
|
600
|
+
lastTrigger = { bodyOverflow: document.body.style.overflow, appliedOverflow: 'hidden' };
|
|
597
601
|
document.body.style.overflow = 'hidden';
|
|
598
602
|
|
|
599
603
|
var onKey = function (event) {
|
|
@@ -635,12 +639,10 @@ window.__ModuleLoader__.load({
|
|
|
635
639
|
if (wrap === null || wrap === void 0) return null;
|
|
636
640
|
if (!isLongTable(table, wrap)) return null;
|
|
637
641
|
|
|
638
|
-
//
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
return null;
|
|
643
|
-
}
|
|
642
|
+
// 幂等判定:打过标记的表格(已插入按钮行)直接跳过。
|
|
643
|
+
// (旧判定「容器后紧跟兄弟是否 .dstz-row」不可靠——React 重排会把按钮行
|
|
644
|
+
// 挪走或移除,导致同一表格重复插行;dataset 标记跟着表格本身走。)
|
|
645
|
+
if (table.dataset !== void 0 && table.dataset.dstz === '1') return null;
|
|
644
646
|
|
|
645
647
|
var parent = wrap.parentNode;
|
|
646
648
|
if (parent === null || parent === void 0) return null;
|
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.6",
|
|
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",
|