dsh-linked-workspace 0.5.12 → 0.6.0
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 +17 -0
- package/README.en.md +22 -0
- package/README.md +12 -0
- package/docs/API.md +10 -0
- package/lib/client.js +438 -12
- package/lib/index.js +256 -2
- package/package.json +3 -2
- package/scripts/doc_tool.py +405 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0 — 2026-11-05
|
|
4
|
+
|
|
5
|
+
- **Document editing in the content panel** for Markdown, PDF, DOCX, XLSX and PPTX, on both local and remote files.
|
|
6
|
+
- Markdown: raw editing, rendered preview, export to PDF.
|
|
7
|
+
- DOCX: paragraph and table text editing (styles are preserved at paragraph level; rich inline formatting may be simplified).
|
|
8
|
+
- XLSX: sheet tabs and editable cell grid; formulas and untouched styles are preserved.
|
|
9
|
+
- PPTX: slide navigation and text-frame editing.
|
|
10
|
+
- PDF: page navigation, rotate/delete page, title/author metadata; page images are rendered by PyMuPDF.
|
|
11
|
+
- New document files can be created from the directory context menu (`.md`, `.pdf`, `.docx`, `.xlsx`, `.pptx`).
|
|
12
|
+
- A small Python bridge (`scripts/doc_tool.py`) implements the format-specific read/write/create operations. Python 3 with `python-docx`, `openpyxl`, `python-pptx` and `PyMuPDF` is required for Office/PDF operations; Markdown works without them.
|
|
13
|
+
- Runs on both local folders and remote linked/directories (remote files are downloaded, processed and uploaded atomically).
|
|
14
|
+
|
|
15
|
+
## 0.5.13 — 2026-11-05
|
|
16
|
+
|
|
17
|
+
- The linked-workspace directory panel can now be resized by dragging the divider; double-click the divider to reset to 300 px. The width is persisted.
|
|
18
|
+
- The local directory tree now refreshes silently every 4 seconds (and on window focus), so newly created local subdirectories appear without a manual refresh; expanded folders are reloaded in place.
|
|
19
|
+
|
|
3
20
|
## 0.5.12 — 2026-11-04
|
|
4
21
|
|
|
5
22
|
- Published as **dsh-linked-workspace** on npm (public).
|
package/README.en.md
CHANGED
|
@@ -28,6 +28,18 @@ The plugin takes over the directory-selection hole used by the DSH sidebar and e
|
|
|
28
28
|
1. **Local workspace**: enter or browse for a local directory (C:/D:/E: drive chips on Windows), set a workspace name, then create a normal DSH workspace.
|
|
29
29
|
2. **Linked workspace**: SSH host + remote folder + local folder + optional mirror. Creating it also registers the local folder as a DSH workspace. The local directory is **not** pre-populated with `.local`/`.remote`; those are created lazily when mirroring or transfers need them.
|
|
30
30
|
|
|
31
|
+
### Document editing
|
|
32
|
+
|
|
33
|
+
The content panel now edits **Markdown / PDF / DOCX / XLSX / PPTX** files on both local and remote sides:
|
|
34
|
+
|
|
35
|
+
- **Markdown**: raw editing, rendered preview, export to PDF.
|
|
36
|
+
- **DOCX**: edit paragraph and table text; paragraph styles are kept, complex inline formatting may be simplified.
|
|
37
|
+
- **XLSX**: switch sheets and edit a cell grid; untouched formulas and styles are preserved.
|
|
38
|
+
- **PPTX**: navigate slides and edit text frames.
|
|
39
|
+
- **PDF**: page navigation, rotate/delete pages, and title/author metadata; pages are rendered by PyMuPDF.
|
|
40
|
+
- Create blank documents from the directory context menu by using one of these extensions.
|
|
41
|
+
- Office/PDF operations need Python 3 with `python-docx`, `openpyxl`, `python-pptx` and `PyMuPDF`; Markdown does not. Set `DSH_OFFICE_PYTHON` to choose an interpreter.
|
|
42
|
+
|
|
31
43
|
### Right-sidebar entries
|
|
32
44
|
|
|
33
45
|
- **Linked workspace directory**: appears only in sessions of a linked workspace, and opens the linked workspace bound to that session. Remote and local files are editable.
|
|
@@ -82,7 +94,13 @@ The remote side is not modified by mirroring. The `linked_workspace` tool suppor
|
|
|
82
94
|
|
|
83
95
|
## Installation
|
|
84
96
|
|
|
97
|
+
```bash
|
|
98
|
+
dsh plugin --profile web add dsh-linked-workspace
|
|
85
99
|
```
|
|
100
|
+
|
|
101
|
+
Install from source (development):
|
|
102
|
+
|
|
103
|
+
```bash
|
|
86
104
|
dsh plugin --profile "$DSH_PROFILE" add "file:$PWD/dsh-linked-workspace"
|
|
87
105
|
```
|
|
88
106
|
|
|
@@ -99,6 +117,10 @@ Old “Remote directories” tabs are restored after refresh through hidden lega
|
|
|
99
117
|
|
|
100
118
|
See [CHANGELOG.md](CHANGELOG.md) for the full version history.
|
|
101
119
|
|
|
120
|
+
### 0.5.13
|
|
121
|
+
|
|
122
|
+
The directory panel divider is draggable (double-click resets to 300 px; width persists). The local tree refreshes silently every 4 seconds and on window focus, so new local subdirectories appear without a manual refresh.
|
|
123
|
+
|
|
102
124
|
## Releases and marketplace updates
|
|
103
125
|
|
|
104
126
|
- The npm package is `dsh-linked-workspace`. To release, bump `package.json` and push a `v*` tag; `.github/workflows/release.yml` runs `npm publish --access public` (set an `NPM_TOKEN` repository secret).
|
package/README.md
CHANGED
|
@@ -29,6 +29,18 @@
|
|
|
29
29
|
|
|
30
30
|
> 左侧工作区行不再带 `⇄` 标题前缀:插件用一份按 `data-row-key` 定位的样式表,把联动工作区行的宿主文件夹图标替换成**链环图标**(普通本地工作区不受影响)。这是对宿主行结构的唯一 DOM 级适配;如果 DSH 以后更改行结构,选择器会自然失配并回退到原来的文件夹图标,不破坏其他功能。
|
|
31
31
|
|
|
32
|
+
### 文档创建与编辑
|
|
33
|
+
|
|
34
|
+
文件内容面板现在支持 **Markdown / PDF / DOCX / XLSX / PPTX**(本地与远程文件均可):
|
|
35
|
+
|
|
36
|
+
- **Markdown**:原始文本编辑、渲染预览、导出 PDF。
|
|
37
|
+
- **DOCX**:按段落与表格编辑文字;保留段落样式,复杂行内格式可能被简化。
|
|
38
|
+
- **XLSX**:工作表切换与单元格网格编辑;未修改的公式与样式保留。
|
|
39
|
+
- **PPTX**:幻灯片切换与文本框编辑。
|
|
40
|
+
- **PDF**:翻页、旋转/删除页面、编辑标题/作者元数据;页面由 PyMuPDF 渲染。
|
|
41
|
+
- 在目录右键「新建文件」中输入支持的扩展名即可创建对应空白文档。
|
|
42
|
+
- Office/PDF 操作需要 Python 3 及 `python-docx`、`openpyxl`、`python-pptx`、`PyMuPDF`;Markdown 不依赖 Python。可通过 `DSH_OFFICE_PYTHON` 指定解释器。
|
|
43
|
+
|
|
32
44
|
### 右侧栏入口
|
|
33
45
|
|
|
34
46
|
- **联动工作区目录**:只在联动工作区的会话中出现;点开后绑定该会话对应的联动工作区(不会打开另一个联动工作区),可编辑远程与本地文件。
|
package/docs/API.md
CHANGED
|
@@ -16,6 +16,16 @@ Codes: `BAD_REQUEST`, `NOT_FOUND`, `SSH_CONNECT`, `AUTH_FAILED`,
|
|
|
16
16
|
`HOST_KEY_MISMATCH`, `TIMEOUT`, `FS_NOT_FOUND`, `FS_PERMISSION`, `FS_IS_DIR`,
|
|
17
17
|
`FS_NOT_DIR`, `FS_TOO_LARGE`, `CONFLICT`, `INTERNAL`.
|
|
18
18
|
|
|
19
|
+
## Document APIs
|
|
20
|
+
|
|
21
|
+
| Method | Params | Result |
|
|
22
|
+
| --- | --- | --- |
|
|
23
|
+
| `docs.read` | `{ path, linkedId?, workspaceId? }` | kind-specific document model |
|
|
24
|
+
| `docs.write` | `{ path, data, expectedMtime?, linkedId?, workspaceId? }` | `{ kind, path, size, mtime }` |
|
|
25
|
+
| `docs.create` | `{ path, kind?, linkedId?, workspaceId? }` | `{ kind, path, size, mtime }` |
|
|
26
|
+
| `docs.mdPreview` | `{ path, text?, linkedId?, workspaceId? }` | `{ kind, html }` |
|
|
27
|
+
| `docs.mdPdf` | `{ path, text?, linkedId?, workspaceId? }` | `{ kind: "pdf", path, size, mtime }` |
|
|
28
|
+
|
|
19
29
|
## Records
|
|
20
30
|
|
|
21
31
|
```ts
|