merong-docs 0.1.11 → 1.0.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/OVERVIEW.md +19 -19
- package/OVERVIEW.zh-CN.md +19 -22
- package/README.md +77 -77
- package/README.zh-CN.md +81 -81
- package/client/android-file-share.ts +25 -25
- package/client/controls.tsx +163 -163
- package/client/document-panel.tsx +166 -166
- package/client/external-file.tsx +78 -78
- package/client/file-reader.tsx +43 -43
- package/client/markdown-panel.tsx +737 -737
- package/client/markdown-scroll.ts +122 -122
- package/client/messages.ts +224 -224
- package/client/native-contacts.ts +145 -145
- package/client/page-render-queue.ts +12 -12
- package/client/page-selection.tsx +227 -227
- package/client/page-tools.tsx +72 -72
- package/client/pdf-geometry.ts +96 -96
- package/client/pdf-panel.tsx +477 -477
- package/client/reader-find.tsx +190 -190
- package/client/reader-notice.tsx +46 -46
- package/client/settings.tsx +143 -143
- package/client/syntax.tsx +55 -55
- package/client/viewport-geometry.ts +61 -61
- package/client/web.ts +462 -462
- package/client/worksheet-panel.tsx +631 -631
- package/client/zoom-controls.tsx +140 -140
- package/index.client.tsx +36 -36
- package/index.server.ts +73 -73
- package/node_modules/markdown-it/bin/markdown-it.mjs +0 -0
- package/node_modules/yaml/bin.mjs +0 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/scripts/prepare-office.mjs +20 -20
- package/server/engine.ts +89 -89
- package/server/external-file.ts +42 -42
- package/server/generated/document-worker.ts +1 -1
- package/server/generated/rust-reader_bg.wasm +0 -0
- package/server/markdown-index.ts +305 -305
- package/server/markdown-links.ts +51 -51
- package/server/markdown-page.ts +120 -120
- package/server/office-fonts.cjs +824 -824
- package/server/office-location.ts +41 -41
- package/server/office-preview.ts +186 -186
- package/server/office-worker.cjs +49 -49
- package/server/office-xml.ts +79 -79
- package/server/pdf-engine.ts +168 -168
- package/server/pdf-text-geometry.ts +60 -60
- package/server/rust-reader.ts +40 -40
- package/server/structured-document.ts +69 -69
- package/server/text-search.ts +15 -15
- package/server/worker-entry.ts +42 -42
- package/server/worker-protocol.ts +38 -38
- package/server/worksheet.ts +67 -67
- package/server/workspace-file.ts +63 -63
- package/shared/contracts.ts +187 -187
- package/shared/file-limits.ts +5 -5
- package/shared/markdown-constants.ts +4 -4
- package/shared/markdown-math.ts +198 -198
- package/shared/markdown-references.ts +83 -83
- package/shared/markdown-source-location.ts +8 -8
- package/shared/reader-settings.ts +15 -15
- package/shared/reader-shortcuts.ts +132 -132
- package/vendor/office2pdf/office2pdf_bg.wasm +2 -2
package/OVERVIEW.md
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
# Merong Docs
|
|
2
|
-
|
|
3
|
-
Open workspace documents inside Paseo.
|
|
4
|
-
|
|
5
|
-
## File previews
|
|
6
|
-
|
|
7
|
-
- **Markdown** offers syntax highlighting, whole-file search, and a split view with synchronized, numbered source.
|
|
8
|
-
- **PDF, Word, and PowerPoint** offer continuous pages, zoom, page jumps, and search and selection where there’s a text layer. PowerPoint includes slide thumbnails.
|
|
9
|
-
- **Excel** offers wrapped cells, sheet tabs, cell address search, and separate row and column freezing.
|
|
10
|
-
|
|
11
|
-
The Paseo host reads supported workspace files and sends locally rendered previews over the Paseo connection. Word and PowerPoint can use fonts installed on that host, with a bundled Simplified Chinese fallback. The plugin uses no external rendering service.
|
|
12
|
-
|
|
13
|
-
In Paseo Desktop, **Open externally** opens the original file in the system’s default app for local workspaces. Browsers and remote desktop workspaces offer **Download**. On iOS and Android, **Open externally** uses the system share sheet when available.
|
|
14
|
-
|
|
15
|
-
## Keyboard shortcuts
|
|
16
|
-
|
|
17
|
-
On desktop, hold **Space** and drag over text to pan, or use **Ctrl / ⌘ + wheel** to zoom around the pointer. Change, disable, or restore bindings under **Reader → Keyboard shortcuts**.
|
|
18
|
-
|
|
19
|
-
Requires Paseo 0.17.5 or later on the client and daemon. Markdown, PDF, and Office previews work on desktop, web, iOS, and Android. File size limits are 192 MiB for PDF, 64 MiB for Excel, and 48 MiB for formatted Word and PowerPoint.
|
|
1
|
+
# Merong Docs
|
|
2
|
+
|
|
3
|
+
Open workspace documents inside Paseo.
|
|
4
|
+
|
|
5
|
+
## File previews
|
|
6
|
+
|
|
7
|
+
- **Markdown** offers syntax highlighting, whole-file search, and a split view with synchronized, numbered source.
|
|
8
|
+
- **PDF, Word, and PowerPoint** offer continuous pages, zoom, page jumps, and search and selection where there’s a text layer. PowerPoint includes slide thumbnails.
|
|
9
|
+
- **Excel** offers wrapped cells, sheet tabs, cell address search, and separate row and column freezing.
|
|
10
|
+
|
|
11
|
+
The Paseo host reads supported workspace files and sends locally rendered previews over the Paseo connection. Word and PowerPoint can use fonts installed on that host, with a bundled Simplified Chinese fallback. The plugin uses no external rendering service.
|
|
12
|
+
|
|
13
|
+
In Paseo Desktop, **Open externally** opens the original file in the system’s default app for local workspaces. Browsers and remote desktop workspaces offer **Download**. On iOS and Android, **Open externally** uses the system share sheet when available.
|
|
14
|
+
|
|
15
|
+
## Keyboard shortcuts
|
|
16
|
+
|
|
17
|
+
On desktop, hold **Space** and drag over text to pan, or use **Ctrl / ⌘ + wheel** to zoom around the pointer. Change, disable, or restore bindings under **Reader → Keyboard shortcuts**.
|
|
18
|
+
|
|
19
|
+
Requires Paseo 0.17.5 or later on the client and daemon. Markdown, PDF, and Office previews work on desktop, web, iOS, and Android. File size limits are 192 MiB for PDF, 64 MiB for Excel, and 48 MiB for formatted Word and PowerPoint.
|
package/OVERVIEW.zh-CN.md
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
# Merong Docs
|
|
2
|
-
|
|
3
|
-
在 Paseo 里直接打开工作区文档。
|
|
4
|
-
|
|
5
|
-
## 文件预览
|
|
6
|
-
|
|
7
|
-
- **Markdown** 支持语法高亮、全文查找,以及与带行号的源码分屏联动。
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
桌面端按住 **空格键** 可在文字上拖动页面,按住 **Ctrl / ⌘** 滚动可围绕指针缩放。在「阅读器 → 键盘快捷键」里可改键、禁用或恢复默认。
|
|
21
|
-
|
|
22
|
-
客户端和守护进程均需 Paseo 0.17.5 或更新版本。Markdown、PDF 和 Office 预览支持桌面、浏览器、iOS 和 Android。PDF 文件上限为 192 MiB,Excel 为 64 MiB,Word 和 PowerPoint 排版预览为 48 MiB。
|
|
1
|
+
# Merong Docs
|
|
2
|
+
|
|
3
|
+
在 Paseo 里直接打开工作区文档。
|
|
4
|
+
|
|
5
|
+
## 文件预览
|
|
6
|
+
|
|
7
|
+
- **Markdown** 支持语法高亮、全文查找,以及与带行号的源码分屏联动。
|
|
8
|
+
- **PDF、Word 和 PowerPoint** 支持连续翻页、缩放和跳页。有文字层时可以选字和查找。PowerPoint 提供幻灯片缩略图。
|
|
9
|
+
- **Excel** 支持单元格换行、切换工作表、按地址查找,以及分别冻结行和列。
|
|
10
|
+
|
|
11
|
+
Paseo 主机读取受支持的工作区文件,在本机生成预览,并通过 Paseo 连接发送给客户端。Word 和 PowerPoint 可使用主机已安装的字体,并以内置简体中文字体兜底。插件不使用外部渲染服务。
|
|
12
|
+
|
|
13
|
+
在 Paseo 桌面客户端中,本机工作区的文件可通过「在外部打开」交给系统默认应用直接打开原件。浏览器和桌面端的远程工作区提供「下载」。在 iOS 和 Android 上,「在外部打开」会在系统分享可用时调起分享面板。
|
|
14
|
+
|
|
15
|
+
## 键盘快捷键
|
|
16
|
+
|
|
17
|
+
桌面端按住 **空格键** 可在文字上拖动页面,按住 **Ctrl / ⌘** 滚动可围绕指针缩放。在「阅读器 → 键盘快捷键」里可改键、禁用或恢复默认。
|
|
18
|
+
|
|
19
|
+
客户端和守护进程均需 Paseo 0.17.5 或更新版本。Markdown、PDF 和 Office 预览支持桌面、浏览器、iOS 和 Android。PDF 文件上限为 192 MiB,Excel 为 64 MiB,Word 和 PowerPoint 排版预览为 48 MiB。
|
package/README.md
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
<img src="assets/icon.png" alt="" width="96">
|
|
2
|
-
|
|
3
|
-
# Merong Docs
|
|
4
|
-
|
|
5
|
-
[简体中文](README.zh-CN.md)
|
|
6
|
-
|
|
7
|
-
Merong Docs adds read-only document previews to Paseo.
|
|
8
|
-
|
|
9
|
-
## What you can read
|
|
10
|
-
|
|
11
|
-
- **Workspace files.** Open Markdown (`.md`, `.markdown`, `.mdown`, `.mkd`, `.mkdn`, `.mdwn`), `.pdf`, `.docx`, `.xlsx`, and `.pptx` from chat links or the file tree. Paseo’s **Open location** settings let you choose the main panel or side pane separately for chat links and file tree selections. Each viewer shows the file size above the controls, and Markdown also shows the line count. On desktop, rendered Markdown follows Paseo’s **Appearance → Content width** setting.
|
|
12
|
-
- **Continuous pages.** PDF and formatted Office pages stack vertically. At 100%, each entire page fits the preview with either its width or height filling the available space. Drag the zoom slider or enter a percentage from 25% to 400%. Hover over toolbar icons for labels. Scroll with the mouse wheel and drag to pan. Hold `Ctrl` or `⌘` while scrolling to zoom around the pointer. Press `+`, `-`, or `0` with the preview focused to zoom in, zoom out, or fit the page. The same keys work with `Ctrl` or `⌘` while the pointer is over the preview. With the preview focused, use the arrow keys to pan or `Page Up` and `Page Down` to scroll vertically. On native clients, pinch to zoom and pan with one finger.
|
|
13
|
-
- **Excel worksheets.** Read sheets in a scrollable grid with row and column headings, workbook tabs, merged cells, and basic cell styling. Columns expand to fit their contents and long text wraps onto taller rows. The same desktop zoom and scrolling shortcuts work here, with `0` restoring 100%. Turn on **Pan worksheet** to drag in any direction, or drag with the middle mouse button. Pinch to zoom and drag with one finger on a phone.
|
|
14
|
-
- **External editing.** In Paseo Desktop, **Open externally** opens the original file in the system’s default app when the workspace is on the local daemon. Browsers and remote desktop workspaces download a copy. On iOS and Android, the action hands a copy to the system share sheet. On Android builds where sharing is unavailable, use **Download** from Paseo’s file menu.
|
|
15
|
-
|
|
16
|
-
Fenced code blocks in rendered Markdown use syntax highlighting for languages such as Bash, PowerShell, Python, TypeScript, and Rust. Use `console` or `terminal` for shell transcripts. Very long blocks and blocks with unknown language labels display as plain text.
|
|
17
|
-
|
|
18
|
-
Markdown supports in-document links and a numbered, read-only source view. Wide desktop and tablet panels open with the preview on the left and the source on the right. On phones and in narrow panels, select **Split preview and source** to show the preview above the source. An open split adapts as the panel resizes. Scroll either pane to move the other with it. A block’s source button briefly highlights its original lines and scrolls to them when they are outside the view. Select source text directly to copy it. The preview also shows YAML front matter and respects the author’s table alignment.
|
|
19
|
-
|
|
20
|
-
Use **Find** or press `Ctrl+F` or `Cmd+F` while working in the Markdown panel. Find stays in the current view, marks the matching block in the preview and highlights the exact text in source. Search shows the current match and total, with options for case, whole words, and regular expressions. Press `Enter` or `Shift+Enter` to navigate and `Escape` to close. Search includes portions of the file you have yet to load.
|
|
21
|
-
|
|
22
|
-
PDF and formatted Office previews share the Markdown find controls and highlight matches on the page or slide as you type. Find floats over the content and preserves the current page fit. Drag across text on desktop or touch and hold on a phone, then copy the selection. PDF selection and search require a text layer. PowerPoint opens with slide thumbnails on the left. Use the toolbar to hide them and give the slide more space. In Excel, entering `X604` in Find includes that address and any matching cell text in the active sheet. Enable **Cell address only** to jump directly. Select cell text directly or tap a cell on a phone to copy its full value. Right-click a cell or touch and hold to independently freeze or unfreeze its row and column.
|
|
23
|
-
|
|
24
|
-
### Desktop shortcuts
|
|
25
|
-
|
|
26
|
-
Set each shortcut under **Settings → Plugins → Merong Docs → Reader → Keyboard shortcuts**. Choose a preset, enter a custom keyboard combination, or select **No shortcut**. Restore a single binding with **Default** or all bindings with **Restore all shortcuts**. The wheel and held-drag actions use a choice of modifier keys. Panning also offers `Space`.
|
|
27
|
-
|
|
28
|
-
| Action | Default | Where it works |
|
|
29
|
-
| --- | --- | --- |
|
|
30
|
-
| Drag without selecting text | Hold `Space` and left-drag | PDF, Word, PowerPoint, Excel |
|
|
31
|
-
| Zoom in / out / reset | `+` or `=`, `-`, `0`. Also with `Ctrl` or `⌘` | PDF, Word, PowerPoint, Excel |
|
|
32
|
-
| Zoom around the pointer | `Ctrl` / `⌘` + wheel | PDF, Word, PowerPoint, Excel |
|
|
33
|
-
| Pan / scroll a screen | Arrow keys / `Page Up`, `Page Down` | Focused PDF, Word, PowerPoint, Excel viewport |
|
|
34
|
-
| Open / close find | `Ctrl+F` or `⌘+F` / `Esc` | Markdown, PDF, Word, PowerPoint, Excel |
|
|
35
|
-
| Next / previous match | `Enter` / `Shift+Enter` | Find field |
|
|
36
|
-
| Close cell menu | `Esc` | Excel cell menu |
|
|
37
|
-
|
|
38
|
-
Standard control keys still work. For example, `Enter` commits a page number or percentage and the focused zoom slider uses arrows and `Home` / `End`.
|
|
39
|
-
|
|
40
|
-
## Install
|
|
41
|
-
|
|
42
|
-
Use Paseo 0.17.5 or newer on the client and daemon. Install **Merong Docs** from npm:
|
|
43
|
-
|
|
44
|
-
```sh
|
|
45
|
-
paseo plugin install merong-docs
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Or install a local checkout directly:
|
|
49
|
-
|
|
50
|
-
```sh
|
|
51
|
-
paseo plugin install /path/to/merong-docs
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
To build and install from GitHub, set up Node.js 22 or later, npm and the Rust tools listed below on the daemon host.
|
|
55
|
-
|
|
56
|
-
Paseo uses your saved file associations for chat links and the file tree. When Paseo asks which viewer to use, choose Merong Docs and remember the choice. Plugin controls are in Simplified Chinese when Paseo uses Simplified Chinese, and in English for other locales.
|
|
57
|
-
|
|
58
|
-
On a phone, previews open in Paseo’s file panel. Use Paseo’s × to close the preview.
|
|
59
|
-
|
|
60
|
-
## Data and limits
|
|
61
|
-
|
|
62
|
-
The Paseo daemon reads files inside the active workspace and sends rendered document content to the connected client. The package includes a Simplified Chinese font for Word and PowerPoint previews. Formatted Word and PowerPoint previews can use installed fonts on the daemon host, including compatible alternatives when a family is missing or has fewer styles. Font availability can change line breaks or page layout. The first formatted preview converts the whole document to PDF, so large presentations can take longer. The conversion process exits before page rendering begins. Turning pages, searching, and selecting text reuse the cached PDF. Some embedded charts may render differently or appear blank. Word and PowerPoint offer a basic text preview when formatted layout is unavailable.
|
|
63
|
-
|
|
64
|
-
| Format | File size | Other limits |
|
|
65
|
-
| --- | --- | --- |
|
|
66
|
-
| Markdown | No fixed file-size cap. Regression tested at about 128 MiB. | Preview and source load in batches. The line count and whole-file index finish separately. |
|
|
67
|
-
| PDF | 192 MiB | Rasterizes individual visible pages. |
|
|
68
|
-
| Word and PowerPoint | 48 MiB | Formatted preview allows up to 256 MiB expanded contents and a 64 MiB generated PDF. |
|
|
69
|
-
| Excel | 64 MiB | Per sheet up to 8,192 rows, 256 columns, 80,000 populated cells and 400,000 text bytes. A selected XML part can be up to 4 MiB. |
|
|
70
|
-
|
|
71
|
-
The file size and line count follow Paseo’s interface font size. In the browser and desktop client, Markdown source follows Paseo’s code font, code size, and syntax colors. The native source view uses the platform monospace font and follows system text scaling.
|
|
72
|
-
|
|
73
|
-
For development, run `npm ci --include=dev --ignore-scripts`, `npm run typecheck`, `npm test`, and `npm run test:office`. `npm run test:large` generates near-limit documents and checks first content and subsequent navigation timings.
|
|
74
|
-
|
|
75
|
-
Source builds require Rust 1.92 or later with the `wasm32-unknown-unknown` target and `wasm-bindgen-cli` 0.2.115. `npm run pack:release` builds the npm archive with the compiled workers and locked dependencies. `npm run check:package` installs the archive offline with lifecycle scripts disabled and exercises the packaged readers. Running from the npm package requires no Rust toolchain or Office installation.
|
|
76
|
-
|
|
77
|
-
Rust handles worksheet XML, styles and sizing, Markdown headings, references and table boundaries, and page JPEG encoding. Markdown stays interactive in the client through the streaming parser. PDFium draws PDF pages and provides the text positions used to select, copy, and find text. Word and PowerPoint share the [office2pdf 0.11.1](https://github.com/developer0hye/office2pdf/tree/v0.11.1) layout engine.
|
|
1
|
+
<img src="assets/icon.png" alt="" width="96">
|
|
2
|
+
|
|
3
|
+
# Merong Docs
|
|
4
|
+
|
|
5
|
+
[简体中文](README.zh-CN.md)
|
|
6
|
+
|
|
7
|
+
Merong Docs adds read-only document previews to Paseo.
|
|
8
|
+
|
|
9
|
+
## What you can read
|
|
10
|
+
|
|
11
|
+
- **Workspace files.** Open Markdown (`.md`, `.markdown`, `.mdown`, `.mkd`, `.mkdn`, `.mdwn`), `.pdf`, `.docx`, `.xlsx`, and `.pptx` from chat links or the file tree. Paseo’s **Open location** settings let you choose the main panel or side pane separately for chat links and file tree selections. Each viewer shows the file size above the controls, and Markdown also shows the line count. On desktop, rendered Markdown follows Paseo’s **Appearance → Content width** setting.
|
|
12
|
+
- **Continuous pages.** PDF and formatted Office pages stack vertically. At 100%, each entire page fits the preview with either its width or height filling the available space. Drag the zoom slider or enter a percentage from 25% to 400%. Hover over toolbar icons for labels. Scroll with the mouse wheel and drag to pan. Hold `Ctrl` or `⌘` while scrolling to zoom around the pointer. Press `+`, `-`, or `0` with the preview focused to zoom in, zoom out, or fit the page. The same keys work with `Ctrl` or `⌘` while the pointer is over the preview. With the preview focused, use the arrow keys to pan or `Page Up` and `Page Down` to scroll vertically. On native clients, pinch to zoom and pan with one finger.
|
|
13
|
+
- **Excel worksheets.** Read sheets in a scrollable grid with row and column headings, workbook tabs, merged cells, and basic cell styling. Columns expand to fit their contents and long text wraps onto taller rows. The same desktop zoom and scrolling shortcuts work here, with `0` restoring 100%. Turn on **Pan worksheet** to drag in any direction, or drag with the middle mouse button. Pinch to zoom and drag with one finger on a phone.
|
|
14
|
+
- **External editing.** In Paseo Desktop, **Open externally** opens the original file in the system’s default app when the workspace is on the local daemon. Browsers and remote desktop workspaces download a copy. On iOS and Android, the action hands a copy to the system share sheet. On Android builds where sharing is unavailable, use **Download** from Paseo’s file menu.
|
|
15
|
+
|
|
16
|
+
Fenced code blocks in rendered Markdown use syntax highlighting for languages such as Bash, PowerShell, Python, TypeScript, and Rust. Use `console` or `terminal` for shell transcripts. Very long blocks and blocks with unknown language labels display as plain text.
|
|
17
|
+
|
|
18
|
+
Markdown supports in-document links and a numbered, read-only source view. Wide desktop and tablet panels open with the preview on the left and the source on the right. On phones and in narrow panels, select **Split preview and source** to show the preview above the source. An open split adapts as the panel resizes. Scroll either pane to move the other with it. A block’s source button briefly highlights its original lines and scrolls to them when they are outside the view. Select source text directly to copy it. The preview also shows YAML front matter and respects the author’s table alignment.
|
|
19
|
+
|
|
20
|
+
Use **Find** or press `Ctrl+F` or `Cmd+F` while working in the Markdown panel. Find stays in the current view, marks the matching block in the preview and highlights the exact text in source. Search shows the current match and total, with options for case, whole words, and regular expressions. Press `Enter` or `Shift+Enter` to navigate and `Escape` to close. Search includes portions of the file you have yet to load.
|
|
21
|
+
|
|
22
|
+
PDF and formatted Office previews share the Markdown find controls and highlight matches on the page or slide as you type. Find floats over the content and preserves the current page fit. Drag across text on desktop or touch and hold on a phone, then copy the selection. PDF selection and search require a text layer. PowerPoint opens with slide thumbnails on the left. Use the toolbar to hide them and give the slide more space. In Excel, entering `X604` in Find includes that address and any matching cell text in the active sheet. Enable **Cell address only** to jump directly. Select cell text directly or tap a cell on a phone to copy its full value. Right-click a cell or touch and hold to independently freeze or unfreeze its row and column.
|
|
23
|
+
|
|
24
|
+
### Desktop shortcuts
|
|
25
|
+
|
|
26
|
+
Set each shortcut under **Settings → Plugins → Merong Docs → Reader → Keyboard shortcuts**. Choose a preset, enter a custom keyboard combination, or select **No shortcut**. Restore a single binding with **Default** or all bindings with **Restore all shortcuts**. The wheel and held-drag actions use a choice of modifier keys. Panning also offers `Space`.
|
|
27
|
+
|
|
28
|
+
| Action | Default | Where it works |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| Drag without selecting text | Hold `Space` and left-drag | PDF, Word, PowerPoint, Excel |
|
|
31
|
+
| Zoom in / out / reset | `+` or `=`, `-`, `0`. Also with `Ctrl` or `⌘` | PDF, Word, PowerPoint, Excel |
|
|
32
|
+
| Zoom around the pointer | `Ctrl` / `⌘` + wheel | PDF, Word, PowerPoint, Excel |
|
|
33
|
+
| Pan / scroll a screen | Arrow keys / `Page Up`, `Page Down` | Focused PDF, Word, PowerPoint, Excel viewport |
|
|
34
|
+
| Open / close find | `Ctrl+F` or `⌘+F` / `Esc` | Markdown, PDF, Word, PowerPoint, Excel |
|
|
35
|
+
| Next / previous match | `Enter` / `Shift+Enter` | Find field |
|
|
36
|
+
| Close cell menu | `Esc` | Excel cell menu |
|
|
37
|
+
|
|
38
|
+
Standard control keys still work. For example, `Enter` commits a page number or percentage and the focused zoom slider uses arrows and `Home` / `End`.
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
Use Paseo 0.17.5 or newer on the client and daemon. Install **Merong Docs** from [npm](https://www.npmjs.com/package/merong-docs):
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
paseo plugin install merong-docs
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Or install a local checkout directly:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
paseo plugin install /path/to/merong-docs
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
To build and install from GitHub, set up Node.js 22 or later, npm and the Rust tools listed below on the daemon host.
|
|
55
|
+
|
|
56
|
+
Paseo uses your saved file associations for chat links and the file tree. When Paseo asks which viewer to use, choose Merong Docs and remember the choice. Plugin controls are in Simplified Chinese when Paseo uses Simplified Chinese, and in English for other locales.
|
|
57
|
+
|
|
58
|
+
On a phone, previews open in Paseo’s file panel. Use Paseo’s × to close the preview.
|
|
59
|
+
|
|
60
|
+
## Data and limits
|
|
61
|
+
|
|
62
|
+
The Paseo daemon reads files inside the active workspace and sends rendered document content to the connected client. The package includes a Simplified Chinese font for Word and PowerPoint previews. Formatted Word and PowerPoint previews can use installed fonts on the daemon host, including compatible alternatives when a family is missing or has fewer styles. Font availability can change line breaks or page layout. The first formatted preview converts the whole document to PDF, so large presentations can take longer. The conversion process exits before page rendering begins. Turning pages, searching, and selecting text reuse the cached PDF. Some embedded charts may render differently or appear blank. Word and PowerPoint offer a basic text preview when formatted layout is unavailable.
|
|
63
|
+
|
|
64
|
+
| Format | File size | Other limits |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| Markdown | No fixed file-size cap. Regression tested at about 128 MiB. | Preview and source load in batches. The line count and whole-file index finish separately. |
|
|
67
|
+
| PDF | 192 MiB | Rasterizes individual visible pages. |
|
|
68
|
+
| Word and PowerPoint | 48 MiB | Formatted preview allows up to 256 MiB expanded contents and a 64 MiB generated PDF. |
|
|
69
|
+
| Excel | 64 MiB | Per sheet up to 8,192 rows, 256 columns, 80,000 populated cells and 400,000 text bytes. A selected XML part can be up to 4 MiB. |
|
|
70
|
+
|
|
71
|
+
The file size and line count follow Paseo’s interface font size. In the browser and desktop client, Markdown source follows Paseo’s code font, code size, and syntax colors. The native source view uses the platform monospace font and follows system text scaling.
|
|
72
|
+
|
|
73
|
+
For development, run `npm ci --include=dev --ignore-scripts`, `npm run typecheck`, `npm test`, and `npm run test:office`. `npm run test:large` generates near-limit documents and checks first content and subsequent navigation timings.
|
|
74
|
+
|
|
75
|
+
Source builds require Rust 1.92 or later with the `wasm32-unknown-unknown` target and `wasm-bindgen-cli` 0.2.115. `npm run pack:release` builds the npm archive with the compiled workers and locked dependencies. `npm run check:package` installs the archive offline with lifecycle scripts disabled and exercises the packaged readers. Running from the npm package requires no Rust toolchain or Office installation.
|
|
76
|
+
|
|
77
|
+
Rust handles worksheet XML, styles and sizing, Markdown headings, references and table boundaries, and page JPEG encoding. Markdown stays interactive in the client through the streaming parser. PDFium draws PDF pages and provides the text positions used to select, copy, and find text. Word and PowerPoint share the [office2pdf 0.11.1](https://github.com/developer0hye/office2pdf/tree/v0.11.1) layout engine.
|
package/README.zh-CN.md
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
<img src="assets/icon.png" alt="" width="96">
|
|
2
|
-
|
|
3
|
-
# Merong Docs
|
|
4
|
-
|
|
5
|
-
[English](README.md)
|
|
6
|
-
|
|
7
|
-
Merong Docs 为 Paseo 提供只读文档预览。
|
|
8
|
-
|
|
9
|
-
## 阅览体验
|
|
10
|
-
|
|
11
|
-
- **工作区文件。** 从聊天链接或文件树打开 Markdown(`.md`、`.markdown`、`.mdown`、`.mkd`、`.mkdn`、`.mdwn`)、`.pdf`、`.docx`、`.xlsx` 和 `.pptx`。在 Paseo 的「打开位置」里,可分别设置聊天链接和文件树打开在主面板还是侧边。各预览器在操作区上方显示文件大小,Markdown 还显示行数。桌面端的 Markdown 排版宽度跟随 Paseo 的「外观 → 内容宽度」。
|
|
12
|
-
- **连续页面。** PDF 和带排版的 Office 预览按页上下排列。100% 时每页完整显示,宽度或高度贴合可用区域。拖动滑杆或输入 25% 至 400% 的百分比可调整缩放,鼠标悬停工具栏图标可查看提示。滚轮上下滚动,按住左键拖动平移。按住 `Ctrl` 或 `⌘` 滚动可围绕指针缩放。点击预览后按 `+`、`-`、`0` 放大、缩小或恢复适合页面,鼠标停在预览区时也可按住 `Ctrl` 或 `⌘` 使用这三个按键。点击预览后还可以用方向键平移,或按 `Page Up`、`Page Down` 上下滚动。原生 App 支持双指缩放和单指平移。
|
|
13
|
-
- **Excel 工作表。** 在网格中双向滚动,按底部标签切换工作表。网格显示行号和列标,保留合并单元格和基础样式。列宽随内容扩展,长文本换行并增加行高。桌面端可使用同样的缩放和滚动快捷键,按 `0` 恢复 100%。开启「拖动表格」后可用左键向任意方向拖动,也可直接用鼠标中键拖动。手机上可双指缩放、单指平移。
|
|
14
|
-
- **外部编辑。** 在 Paseo 桌面客户端中,本机守护进程上的文件可通过「在外部打开」交给系统默认应用打开原件。浏览器和桌面端的远程工作区下载副本。iOS 和 Android 通过系统分享交给其他 App。Android 系统分享不可用时,可从 Paseo 文件菜单下载副本。
|
|
15
|
-
|
|
16
|
-
Markdown 排版预览中的围栏代码块支持 Bash、PowerShell、Python、TypeScript、Rust 等语言的语法高亮。终端会话可标记为 `console` 或 `terminal`。过长或语言标记无法识别的代码块按纯文本显示。
|
|
17
|
-
|
|
18
|
-
Markdown 支持文档内链接和带行号的只读源码。桌面与平板的宽面板默认左侧显示排版预览,右侧显示源码。手机和窄面板可手动开启「分屏显示预览和源码」,上方为预览,下方为源码。已打开的分屏会随预览面板宽度自动调整排列。滚动任意一侧时另一侧会跟随。点预览块旁的源码按钮会短暂高亮对应原文,原文在视野外时会滚动到对应位置。源码可直接选择并复制文字。预览也会显示 YAML 文件头,并遵循表格的列对齐设置。
|
|
19
|
-
|
|
20
|
-
在 Markdown 面板中点「查找」或按 `Ctrl+F` / `Cmd+F`,即可搜索全文,包括尚未加载的部分。查找保持当前视图,在预览里标出命中区块,在源码里高亮具体文字。查找栏显示当前匹配与总数,提供区分大小写、全词和正则选项。按 `Enter` 或 `Shift+Enter` 切换匹配,按 `Escape` 关闭。
|
|
21
|
-
|
|
22
|
-
PDF 和 Office 排版预览使用与 Markdown 一致的查找控件,输入时直接在页面或幻灯片上高亮匹配内容。查找栏浮在内容区上方,页面保持原缩放。可用鼠标拖选或手指长按选取并复制文字。PDF 的选取和查找需要文件含有文字层。PowerPoint 默认在左侧显示缩略图,可点击跳页,也可用工具栏按钮收起以腾出阅读空间。Excel 查找栏输入 `X604` 等地址可同时定位该单元格并查找匹配文本,也可开启「仅查找单元格地址」直接跳转。可直接选取单元格内的文字,手机上也可点选单元格复制完整内容。右键或长按单元格,可以分别冻结或解除冻结该行、该列。
|
|
23
|
-
|
|
24
|
-
### 桌面快捷键
|
|
25
|
-
|
|
26
|
-
在「设置 → 插件 → Merong Docs → 阅读器 → 键盘快捷键」中,可逐项选择预设、输入自定义组合键或选择「不设置」。「默认」恢复单项键位,「恢复全部快捷键」仅恢复快捷键设置。滚轮缩放和强制拖动可选择修饰键,强制拖动也可选空格键。
|
|
27
|
-
|
|
28
|
-
| 操作 | 默认键位 | 适用范围 |
|
|
29
|
-
| --- | --- | --- |
|
|
30
|
-
| 强制拖动 | 按住空格键并用左键拖动 | PDF、Word、PowerPoint、Excel |
|
|
31
|
-
| 放大 / 缩小 / 重置 | `+` 或 `=`、`-`、`0`,也可配合 `Ctrl` 或 `⌘` | PDF、Word、PowerPoint、Excel |
|
|
32
|
-
| 围绕指针缩放 | `Ctrl` / `⌘` + 滚轮 | PDF、Word、PowerPoint、Excel |
|
|
33
|
-
| 平移 / 滚动一屏 | 方向键 / `Page Up`、`Page Down` | 已聚焦的 PDF、Word、PowerPoint、Excel 预览区 |
|
|
34
|
-
| 打开 / 关闭查找 | `Ctrl+F` 或 `⌘+F` / `Esc` | Markdown、PDF、Word、PowerPoint、Excel |
|
|
35
|
-
| 下一个 / 上一个匹配 | `Enter` / `Shift+Enter` | 查找框 |
|
|
36
|
-
| 关闭单元格菜单 | `Esc` | Excel 单元格菜单 |
|
|
37
|
-
|
|
38
|
-
控件仍保留标准按键。例如在页码或倍率框按 `Enter` 确认,聚焦缩放滑杆后可使用方向键及 `Home` / `End`。
|
|
39
|
-
|
|
40
|
-
| Markdown 预览与源码 | PDF、Office 与快捷键 |
|
|
41
|
-
| --- | --- |
|
|
42
|
-
|  |  |
|
|
43
|
-
|
|
44
|
-
## 安装
|
|
45
|
-
|
|
46
|
-
Paseo 客户端和守护进程均需 0.17.5 或更新版本。通过 npm 安装 **Merong Docs**:
|
|
47
|
-
|
|
48
|
-
```sh
|
|
49
|
-
paseo plugin install merong-docs
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
或直接安装本检出的目录:
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
paseo plugin install /path/to/merong-docs
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
从 GitHub 构建并安装时,守护进程主机需要 Node.js 22 或更高版本、npm 及下文列出的 Rust 工具。
|
|
59
|
-
|
|
60
|
-
聊天链接和文件树都使用 Paseo 已保存的文件关联。如果 Paseo 询问打开方式,选择 Merong Docs 并记住。Paseo 使用简体中文时显示中文插件控件,其余语言使用英文。
|
|
61
|
-
|
|
62
|
-
在手机上,文件直接在 Paseo 的文件面板内预览。点击 Paseo 的 × 关闭预览。
|
|
63
|
-
|
|
64
|
-
## 数据和限制
|
|
65
|
-
|
|
66
|
-
插件读取当前工作区内的文件,守护进程通过 Paseo 连接发送预览结果。npm 包内置 WebAssembly 引擎和一份简体中文字体,Word 和 PowerPoint 共用。Word 和 PowerPoint 排版可使用守护进程主机上已安装的字体。原字体缺失或字形不全时可使用兼容字体,内置简体中文字体用于兜底。主机字体差异可能影响换行和分页。首次打开排版预览时,会把整个文件转成 PDF,图片较多的演示文稿可能需要多等几秒。转换进程在开始绘制页面前退出,翻页、搜索和选取文字复用缓存的 PDF。部分嵌入图表可能与原件显示不同或留白。排版不可用时,Word 和 PowerPoint 可查看基本文本。
|
|
67
|
-
|
|
68
|
-
| 格式 | 文件大小 | 其他限制 |
|
|
69
|
-
| --- | --- | --- |
|
|
70
|
-
| Markdown | 无固定文件体积上限,回归测试覆盖约 128 MiB | 预览和源码分批读取,行数与全文索引独立加载。 |
|
|
71
|
-
| PDF | 192 MiB | 可见页面逐页渲染。 |
|
|
72
|
-
| Word 和 PowerPoint | 48 MiB | 排版预览允许解压后 256 MiB,生成的 PDF 上限 64 MiB。 |
|
|
73
|
-
| Excel | 64 MiB | 每张表最多 8,192 行、256 列、80,000 个非空单元格和 400,000 字节文本。读取的单个 XML 部件最多 4 MiB。 |
|
|
74
|
-
|
|
75
|
-
文件大小和行数跟随 Paseo 的界面字号。浏览器和桌面客户端的 Markdown 源码跟随 Paseo 的代码字体、代码字号和语法配色。原生 App 源码使用平台等宽字体并随系统文字缩放。
|
|
76
|
-
|
|
77
|
-
开发时可运行 `npm ci --include=dev --ignore-scripts`、`npm run typecheck`、`npm test` 和 `npm run test:office`。`npm run test:large` 现场生成接近上限的文件,检查首屏和后续阅读耗时。从源码构建需 Rust 1.92 或更高版本、`wasm32-unknown-unknown` 编译目标及 `wasm-bindgen-cli` 0.2.115。GitHub Actions 在 Linux 上使用 Node.js 22 和 24 验证发布包,测试使用隔离的用户目录、空的命令路径和离线 npm 安装。使用 npm 包时无需另装 Rust 或 Office。
|
|
78
|
-
|
|
79
|
-
Rust 负责工作簿的 XML、样式和尺寸,Markdown 的标题、引用和表格边界,以及页面 JPEG 编码。客户端通过流式解析保持 Markdown 的交互。PDFium 负责绘制 PDF 页面,并提供选择、复制和搜索用的文字坐标。Word 和 PowerPoint 共用 [office2pdf 0.11.1](https://github.com/developer0hye/office2pdf/tree/v0.11.1)。插件市场介绍备有[简体中文](OVERVIEW.zh-CN.md)与 [English](OVERVIEW.md) 版本。
|
|
80
|
-
|
|
81
|
-
`npm run pack:release` 生成包含渲染进程和锁定依赖的 npm 压缩包。`npm run check:package` 还会在临时目录安装该包,验证关闭生命周期脚本后仍可安装。
|
|
1
|
+
<img src="assets/icon.png" alt="" width="96">
|
|
2
|
+
|
|
3
|
+
# Merong Docs
|
|
4
|
+
|
|
5
|
+
[English](README.md)
|
|
6
|
+
|
|
7
|
+
Merong Docs 为 Paseo 提供只读文档预览。
|
|
8
|
+
|
|
9
|
+
## 阅览体验
|
|
10
|
+
|
|
11
|
+
- **工作区文件。** 从聊天链接或文件树打开 Markdown(`.md`、`.markdown`、`.mdown`、`.mkd`、`.mkdn`、`.mdwn`)、`.pdf`、`.docx`、`.xlsx` 和 `.pptx`。在 Paseo 的「打开位置」里,可分别设置聊天链接和文件树打开在主面板还是侧边。各预览器在操作区上方显示文件大小,Markdown 还显示行数。桌面端的 Markdown 排版宽度跟随 Paseo 的「外观 → 内容宽度」。
|
|
12
|
+
- **连续页面。** PDF 和带排版的 Office 预览按页上下排列。100% 时每页完整显示,宽度或高度贴合可用区域。拖动滑杆或输入 25% 至 400% 的百分比可调整缩放,鼠标悬停工具栏图标可查看提示。滚轮上下滚动,按住左键拖动平移。按住 `Ctrl` 或 `⌘` 滚动可围绕指针缩放。点击预览后按 `+`、`-`、`0` 放大、缩小或恢复适合页面,鼠标停在预览区时也可按住 `Ctrl` 或 `⌘` 使用这三个按键。点击预览后还可以用方向键平移,或按 `Page Up`、`Page Down` 上下滚动。原生 App 支持双指缩放和单指平移。
|
|
13
|
+
- **Excel 工作表。** 在网格中双向滚动,按底部标签切换工作表。网格显示行号和列标,保留合并单元格和基础样式。列宽随内容扩展,长文本换行并增加行高。桌面端可使用同样的缩放和滚动快捷键,按 `0` 恢复 100%。开启「拖动表格」后可用左键向任意方向拖动,也可直接用鼠标中键拖动。手机上可双指缩放、单指平移。
|
|
14
|
+
- **外部编辑。** 在 Paseo 桌面客户端中,本机守护进程上的文件可通过「在外部打开」交给系统默认应用打开原件。浏览器和桌面端的远程工作区下载副本。iOS 和 Android 通过系统分享交给其他 App。Android 系统分享不可用时,可从 Paseo 文件菜单下载副本。
|
|
15
|
+
|
|
16
|
+
Markdown 排版预览中的围栏代码块支持 Bash、PowerShell、Python、TypeScript、Rust 等语言的语法高亮。终端会话可标记为 `console` 或 `terminal`。过长或语言标记无法识别的代码块按纯文本显示。
|
|
17
|
+
|
|
18
|
+
Markdown 支持文档内链接和带行号的只读源码。桌面与平板的宽面板默认左侧显示排版预览,右侧显示源码。手机和窄面板可手动开启「分屏显示预览和源码」,上方为预览,下方为源码。已打开的分屏会随预览面板宽度自动调整排列。滚动任意一侧时另一侧会跟随。点预览块旁的源码按钮会短暂高亮对应原文,原文在视野外时会滚动到对应位置。源码可直接选择并复制文字。预览也会显示 YAML 文件头,并遵循表格的列对齐设置。
|
|
19
|
+
|
|
20
|
+
在 Markdown 面板中点「查找」或按 `Ctrl+F` / `Cmd+F`,即可搜索全文,包括尚未加载的部分。查找保持当前视图,在预览里标出命中区块,在源码里高亮具体文字。查找栏显示当前匹配与总数,提供区分大小写、全词和正则选项。按 `Enter` 或 `Shift+Enter` 切换匹配,按 `Escape` 关闭。
|
|
21
|
+
|
|
22
|
+
PDF 和 Office 排版预览使用与 Markdown 一致的查找控件,输入时直接在页面或幻灯片上高亮匹配内容。查找栏浮在内容区上方,页面保持原缩放。可用鼠标拖选或手指长按选取并复制文字。PDF 的选取和查找需要文件含有文字层。PowerPoint 默认在左侧显示缩略图,可点击跳页,也可用工具栏按钮收起以腾出阅读空间。Excel 查找栏输入 `X604` 等地址可同时定位该单元格并查找匹配文本,也可开启「仅查找单元格地址」直接跳转。可直接选取单元格内的文字,手机上也可点选单元格复制完整内容。右键或长按单元格,可以分别冻结或解除冻结该行、该列。
|
|
23
|
+
|
|
24
|
+
### 桌面快捷键
|
|
25
|
+
|
|
26
|
+
在「设置 → 插件 → Merong Docs → 阅读器 → 键盘快捷键」中,可逐项选择预设、输入自定义组合键或选择「不设置」。「默认」恢复单项键位,「恢复全部快捷键」仅恢复快捷键设置。滚轮缩放和强制拖动可选择修饰键,强制拖动也可选空格键。
|
|
27
|
+
|
|
28
|
+
| 操作 | 默认键位 | 适用范围 |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| 强制拖动 | 按住空格键并用左键拖动 | PDF、Word、PowerPoint、Excel |
|
|
31
|
+
| 放大 / 缩小 / 重置 | `+` 或 `=`、`-`、`0`,也可配合 `Ctrl` 或 `⌘` | PDF、Word、PowerPoint、Excel |
|
|
32
|
+
| 围绕指针缩放 | `Ctrl` / `⌘` + 滚轮 | PDF、Word、PowerPoint、Excel |
|
|
33
|
+
| 平移 / 滚动一屏 | 方向键 / `Page Up`、`Page Down` | 已聚焦的 PDF、Word、PowerPoint、Excel 预览区 |
|
|
34
|
+
| 打开 / 关闭查找 | `Ctrl+F` 或 `⌘+F` / `Esc` | Markdown、PDF、Word、PowerPoint、Excel |
|
|
35
|
+
| 下一个 / 上一个匹配 | `Enter` / `Shift+Enter` | 查找框 |
|
|
36
|
+
| 关闭单元格菜单 | `Esc` | Excel 单元格菜单 |
|
|
37
|
+
|
|
38
|
+
控件仍保留标准按键。例如在页码或倍率框按 `Enter` 确认,聚焦缩放滑杆后可使用方向键及 `Home` / `End`。
|
|
39
|
+
|
|
40
|
+
| Markdown 预览与源码 | PDF、Office 与快捷键 |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
|  |  |
|
|
43
|
+
|
|
44
|
+
## 安装
|
|
45
|
+
|
|
46
|
+
Paseo 客户端和守护进程均需 0.17.5 或更新版本。通过 [npm](https://www.npmjs.com/package/merong-docs) 安装 **Merong Docs**:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
paseo plugin install merong-docs
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
或直接安装本检出的目录:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
paseo plugin install /path/to/merong-docs
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
从 GitHub 构建并安装时,守护进程主机需要 Node.js 22 或更高版本、npm 及下文列出的 Rust 工具。
|
|
59
|
+
|
|
60
|
+
聊天链接和文件树都使用 Paseo 已保存的文件关联。如果 Paseo 询问打开方式,选择 Merong Docs 并记住。Paseo 使用简体中文时显示中文插件控件,其余语言使用英文。
|
|
61
|
+
|
|
62
|
+
在手机上,文件直接在 Paseo 的文件面板内预览。点击 Paseo 的 × 关闭预览。
|
|
63
|
+
|
|
64
|
+
## 数据和限制
|
|
65
|
+
|
|
66
|
+
插件读取当前工作区内的文件,守护进程通过 Paseo 连接发送预览结果。npm 包内置 WebAssembly 引擎和一份简体中文字体,Word 和 PowerPoint 共用。Word 和 PowerPoint 排版可使用守护进程主机上已安装的字体。原字体缺失或字形不全时可使用兼容字体,内置简体中文字体用于兜底。主机字体差异可能影响换行和分页。首次打开排版预览时,会把整个文件转成 PDF,图片较多的演示文稿可能需要多等几秒。转换进程在开始绘制页面前退出,翻页、搜索和选取文字复用缓存的 PDF。部分嵌入图表可能与原件显示不同或留白。排版不可用时,Word 和 PowerPoint 可查看基本文本。
|
|
67
|
+
|
|
68
|
+
| 格式 | 文件大小 | 其他限制 |
|
|
69
|
+
| --- | --- | --- |
|
|
70
|
+
| Markdown | 无固定文件体积上限,回归测试覆盖约 128 MiB | 预览和源码分批读取,行数与全文索引独立加载。 |
|
|
71
|
+
| PDF | 192 MiB | 可见页面逐页渲染。 |
|
|
72
|
+
| Word 和 PowerPoint | 48 MiB | 排版预览允许解压后 256 MiB,生成的 PDF 上限 64 MiB。 |
|
|
73
|
+
| Excel | 64 MiB | 每张表最多 8,192 行、256 列、80,000 个非空单元格和 400,000 字节文本。读取的单个 XML 部件最多 4 MiB。 |
|
|
74
|
+
|
|
75
|
+
文件大小和行数跟随 Paseo 的界面字号。浏览器和桌面客户端的 Markdown 源码跟随 Paseo 的代码字体、代码字号和语法配色。原生 App 源码使用平台等宽字体并随系统文字缩放。
|
|
76
|
+
|
|
77
|
+
开发时可运行 `npm ci --include=dev --ignore-scripts`、`npm run typecheck`、`npm test` 和 `npm run test:office`。`npm run test:large` 现场生成接近上限的文件,检查首屏和后续阅读耗时。从源码构建需 Rust 1.92 或更高版本、`wasm32-unknown-unknown` 编译目标及 `wasm-bindgen-cli` 0.2.115。GitHub Actions 在 Linux 上使用 Node.js 22 和 24 验证发布包,测试使用隔离的用户目录、空的命令路径和离线 npm 安装。使用 npm 包时无需另装 Rust 或 Office。
|
|
78
|
+
|
|
79
|
+
Rust 负责工作簿的 XML、样式和尺寸,Markdown 的标题、引用和表格边界,以及页面 JPEG 编码。客户端通过流式解析保持 Markdown 的交互。PDFium 负责绘制 PDF 页面,并提供选择、复制和搜索用的文字坐标。Word 和 PowerPoint 共用 [office2pdf 0.11.1](https://github.com/developer0hye/office2pdf/tree/v0.11.1)。插件市场介绍备有[简体中文](OVERVIEW.zh-CN.md)与 [English](OVERVIEW.md) 版本。
|
|
80
|
+
|
|
81
|
+
`npm run pack:release` 生成包含渲染进程和锁定依赖的 npm 压缩包。`npm run check:package` 还会在临时目录安装该包,验证关闭生命周期脚本后仍可安装。
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type { PluginFile } from "@getpaseo/plugin/client";
|
|
2
|
-
|
|
3
|
-
interface ExpoSharingModule {
|
|
4
|
-
shareAsync(url: string, options: { dialogTitle: string; mimeType?: string }): Promise<void>;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export async function shareAndroidFile(
|
|
8
|
-
file: Pick<PluginFile, "url" | "mimeType">,
|
|
9
|
-
dialogTitle: string,
|
|
10
|
-
): Promise<boolean> {
|
|
11
|
-
const { expo } = globalThis as typeof globalThis & {
|
|
12
|
-
expo?: { modules?: { ExpoSharing?: ExpoSharingModule } };
|
|
13
|
-
};
|
|
14
|
-
const sharing = expo?.modules?.ExpoSharing;
|
|
15
|
-
if (typeof sharing?.shareAsync !== "function") return false;
|
|
16
|
-
|
|
17
|
-
const url = await file.url();
|
|
18
|
-
if (!url.startsWith("file:///")) return false;
|
|
19
|
-
const mimeType = file.mimeType.trim().toLowerCase();
|
|
20
|
-
await sharing.shareAsync(url, {
|
|
21
|
-
dialogTitle,
|
|
22
|
-
mimeType: mimeType && mimeType !== "application/octet-stream" ? mimeType : undefined,
|
|
23
|
-
});
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
1
|
+
import type { PluginFile } from "@getpaseo/plugin/client";
|
|
2
|
+
|
|
3
|
+
interface ExpoSharingModule {
|
|
4
|
+
shareAsync(url: string, options: { dialogTitle: string; mimeType?: string }): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export async function shareAndroidFile(
|
|
8
|
+
file: Pick<PluginFile, "url" | "mimeType">,
|
|
9
|
+
dialogTitle: string,
|
|
10
|
+
): Promise<boolean> {
|
|
11
|
+
const { expo } = globalThis as typeof globalThis & {
|
|
12
|
+
expo?: { modules?: { ExpoSharing?: ExpoSharingModule } };
|
|
13
|
+
};
|
|
14
|
+
const sharing = expo?.modules?.ExpoSharing;
|
|
15
|
+
if (typeof sharing?.shareAsync !== "function") return false;
|
|
16
|
+
|
|
17
|
+
const url = await file.url();
|
|
18
|
+
if (!url.startsWith("file:///")) return false;
|
|
19
|
+
const mimeType = file.mimeType.trim().toLowerCase();
|
|
20
|
+
await sharing.shareAsync(url, {
|
|
21
|
+
dialogTitle,
|
|
22
|
+
mimeType: mimeType && mimeType !== "application/octet-stream" ? mimeType : undefined,
|
|
23
|
+
});
|
|
24
|
+
return true;
|
|
25
|
+
}
|