@jaxzhou/dsh-file-explorer 0.1.7 → 0.1.9

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm](https://img.shields.io/npm/v/@jaxzhou/dsh-file-explorer.svg)](https://www.npmjs.com/package/@jaxzhou/dsh-file-explorer)
4
4
  [![license](https://img.shields.io/npm/l/@jaxzhou/dsh-file-explorer.svg)](LICENSE)
5
5
 
6
- English | [中文](README.zh.md)
6
+ English | [中文](docs/README.zh.md)
7
7
 
8
8
  > Published on npm as **`@jaxzhou/dsh-file-explorer`** — the unscoped name
9
9
  > `dsh-file-explorer` belongs to a different author's plugin.
@@ -55,7 +55,7 @@ The right pane picks each tab's body from the file:
55
55
  | **Source code** | Syntax highlighting, line numbers, and a copy button for 24 grammars: TypeScript/JavaScript, shell, Python, Ruby, Go, Rust, Java, C, C++, C#, Kotlin, Swift, PHP, YAML, TOML, INI, HTML, CSS, SCSS, Less, SQL, XML, Lua, MDX |
56
56
  | **Images** | PNG, JPEG, GIF, WebP, AVIF, BMP, ICO and SVG, drawn to the pane. An SVG goes through `<img>`, so its scripts never run |
57
57
  | **PDF** | Drawn by the browser's own PDF reader, from the file's bytes — so its text is real text |
58
- | **Word, Excel, PowerPoint** | `.docx`, `.xlsx` and `.pptx` unpacked in the page: a document's headings, lists, tables, pictures and code; a workbook's sheets as a grid, with the dates it stores as numbers shown as dates; a deck's slides as an outline of their text and pictures |
58
+ | **Word, Excel, PowerPoint** | `.docx`, `.xlsx` and `.pptx` unpacked in the page: a document's headings, lists, quotes, tables, pictures and code, drawn with the formatting the document itself carries — each run's **font, size**, bold, italic, underline, strikethrough, super- and subscript, colour and highlight, and each paragraph's alignment, indents and spacing, all read through its style chain rather than off the run; a workbook's sheets as a grid, with the dates it stores as numbers shown as dates; a deck's slides as an outline of their text and pictures |
59
59
  | **Anything else** | Numbered plain text — an unmapped suffix (`.vue`, `.proto`, `.txt`) stays plain rather than guessing a wrong grammar. The legacy binary Office formats (`.doc`, `.xls`, `.ppt`) are not previewed: the pane says so and offers the download |
60
60
 
61
61
  A **Mermaid** code fence (` ```mermaid `) is a diagram, not source, so the pane
@@ -82,6 +82,9 @@ others alone.
82
82
  Every text body carries **Copy**, which copies the file's own text — a rendered
83
83
  Markdown document copies its Markdown source.
84
84
 
85
+ Every control in the pane is an icon rather than a word: its tooltip and its
86
+ accessible label name it, and a toggle states itself by its fill.
87
+
85
88
  A rendered Markdown or HTML document adds two rows to that menu — **PDF** and
86
89
  **Word** — and each **downloads a file directly**, with no print dialog:
87
90
 
@@ -199,11 +202,17 @@ restart the profile.
199
202
  diagram types Mermaid 11 carries; a malformed one keeps its source and names
200
203
  the failure above it.
201
204
  - **An Office preview is content, not layout.** A `.docx` shows its headings,
202
- text, lists, tables and pictures; a `.xlsx` shows its cells' values; a `.pptx`
203
- shows each slide's text and pictures. What is *not* there is everything that
204
- needs a layout engine and the fonts the file names: colours and themes, column
205
- widths, page breaks, headers and footers, charts, SmartArt, and animations.
206
- Formulas show the value the file cached, not a recalculation.
205
+ lists, quotes, tables and pictures, and the formatting the document carries:
206
+ each run's font, size, weight, underline, strikethrough, super- and subscript,
207
+ colour and highlight, and each paragraph's alignment, indents and spacing —
208
+ resolved through the document's style chain, so text that is styled by a
209
+ *style* rather than by the run is drawn the way the document means it. What is
210
+ *not* there is everything that needs a layout engine: columns and page breaks,
211
+ headers and footers, table borders and shading, text boxes, charts, SmartArt,
212
+ and animations. A *theme* font is not resolved either — a run that names a
213
+ theme gets the page's own default rather than a guess at what the theme says.
214
+ A `.xlsx` shows its cells' values; a `.pptx` shows each slide's text and
215
+ pictures. Formulas show the value the file cached, not a recalculation.
207
216
  - **Only the OOXML formats are read.** `.doc`, `.xls` and `.ppt` are the older
208
217
  binary container, which this pane does not parse — it says so and offers the
209
218
  download instead.
@@ -1,9 +1,9 @@
1
1
  # dsh-file-explorer
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@jaxzhou/dsh-file-explorer.svg)](https://www.npmjs.com/package/@jaxzhou/dsh-file-explorer)
4
- [![license](https://img.shields.io/npm/l/@jaxzhou/dsh-file-explorer.svg)](LICENSE)
4
+ [![license](https://img.shields.io/npm/l/@jaxzhou/dsh-file-explorer.svg)](../LICENSE)
5
5
 
6
- [English](README.md) | 中文
6
+ [English](../README.md) | 中文
7
7
 
8
8
  > npm 包名是 **`@jaxzhou/dsh-file-explorer`** —— 无作用域的 `dsh-file-explorer`
9
9
  > 属于另一位作者的插件。
@@ -21,7 +21,7 @@ dsh --profile web
21
21
 
22
22
  ## 演示
23
23
 
24
- [![文件标签与对话、轨迹并列:左侧是工作区目录树,右侧是渲染后的 Markdown 文档](media/demo.gif)](media/demo.mp4)
24
+ [![文件标签与对话、轨迹并列:左侧是工作区目录树,右侧是渲染后的 Markdown 文档](../media/demo.gif)](../media/demo.mp4)
25
25
 
26
26
  *15 秒录屏 —— 点击可打开完整画质的 MP4。* 一个小数学工作区:渲染后的讲义文档
27
27
  (含表格)、切到 **源码** 看它背后的 Markdown、在旁边用另一个标签打开第二份文档,
@@ -49,7 +49,7 @@ dsh --profile web
49
49
  | **源码** | 24 种语法的语法高亮、行号与复制按钮:TypeScript/JavaScript、shell、Python、Ruby、Go、Rust、Java、C、C++、C#、Kotlin、Swift、PHP、YAML、TOML、INI、HTML、CSS、SCSS、Less、SQL、XML、Lua、MDX |
50
50
  | **图片** | PNG、JPEG、GIF、WebP、AVIF、BMP、ICO、SVG,自动适配窗格。SVG 经 `<img>` 绘制,其中的脚本不会执行 |
51
51
  | **PDF** | 交由浏览器自带的 PDF 阅读器绘制,用的是文件自身的字节 —— 因此其中的文字是真文字 |
52
- | **Word / Excel / PowerPoint** | `.docx`、`.xlsx`、`.pptx` 在页面内解包:文档的标题、列表、表格、图片与代码;工作簿按工作表显示为网格,并以日期显示它按数字存储的日期;演示文稿按幻灯片显示其文字与图片的提纲 |
52
+ | **Word / Excel / PowerPoint** | `.docx`、`.xlsx`、`.pptx` 在页面内解包:文档的标题、列表、引用、表格、图片与代码,并按**文档自身的格式**绘制——每段文字的**字体、字号**、粗体、斜体、下划线、删除线、上/下标、颜色与高亮,以及每个段落的对齐、缩进与间距,全部经**样式级联**解析而不是只看 run 上写了什么;工作簿按工作表显示为网格,并以日期显示它按数字存储的日期;演示文稿按幻灯片显示其文字与图片的提纲 |
53
53
  | **其它** | 带行号的纯文本 —— 未映射的后缀(`.vue`、`.proto`、`.txt`)保持纯文本,而不是猜测一个错误的高亮。旧版二进制 Office 格式(`.doc`、`.xls`、`.ppt`)不做预览:窗格会说明原因并提供下载 |
54
54
 
55
55
  **Mermaid** 代码围栏(` ```mermaid `)是图表而不是源码,窗格会把它画出来:
@@ -69,6 +69,9 @@ dsh --profile web
69
69
  每一种文本预览还有 **复制**,复制的是文件自身的文本——渲染态的 Markdown 复制的是它的
70
70
  Markdown 源码。
71
71
 
72
+ 窗格里的每个控件都是图标而不是文字:名称由悬浮提示与无障碍标签给出,开关状态由填充
73
+ 色表示。
74
+
72
75
  渲染态的 Markdown 与 HTML 会在该菜单里再加两行 —— **PDF** 与 **Word** ——
73
76
  各自 **直接下载文件**(不走打印对话框):
74
77
 
@@ -170,10 +173,13 @@ profile。
170
173
  其中的标签不可选中,且始终以白底绘制:PDF 页面与 Word 文档都是白底,为深色窗格
171
174
  绘制的图在它们上面会看不见。绘制范围是 Mermaid 11 支持的图表类型;语法错误的
172
175
  图表会保留源码,并在上方说明失败原因。
173
- - **Office 预览是内容,不是排版**:`.docx` 显示标题、正文、列表、表格与图片;
174
- `.xlsx` 显示单元格的值;`.pptx` 显示每页的文字与图片。**没有**的是所有需要排版
175
- 引擎和文件所指定字体的东西:颜色与主题、列宽、分页、页眉页脚、图表、SmartArt、
176
- 动画。公式显示文件缓存的值,不做重算。
176
+ - **Office 预览是内容,不是排版**:`.docx` 显示标题、列表、引用、表格、图片,以及文档
177
+ 自身携带的格式 —— 每段文字的字体、字号、字重、下划线、删除线、上/下标、颜色与高亮,
178
+ 每个段落的对齐、缩进与间距 —— 这些都经**样式级联**解析,所以「格式定义在样式里而不是
179
+ 写在 run 上」的文字也会按文档的本意绘制。**没有**的是所有需要排版引擎的东西:分栏与
180
+ 分页、页眉页脚、表格边框与底纹、文本框、图表、SmartArt、动画。**主题字体**同样不解析
181
+ —— 引用主题的 run 使用页面自身的默认字体,而不是去猜主题是什么。`.xlsx` 显示单元格的
182
+ 值;`.pptx` 显示每页的文字与图片。公式显示文件缓存的值,不做重算。
177
183
  - **只读取 OOXML 格式**:`.doc`、`.xls`、`.ppt` 是更早的二进制容器,本窗格不解析
178
184
  —— 会说明这一点并提供下载。
179
185
  - **预览受「完整读取」上限约束**:官方 Web 组合默认 32 MiB,超过的 PDF 或 Office
@@ -187,8 +193,8 @@ profile。
187
193
  ## 参与开发
188
194
 
189
195
  构建、检查、产物模型,以及客户端 bundle 如何抵达浏览器:
190
- [CONTRIBUTING.md](CONTRIBUTING.md)。
196
+ [CONTRIBUTING.md](../CONTRIBUTING.md)。
191
197
 
192
198
  ## 许可证
193
199
 
194
- MIT —— 见 [LICENSE](LICENSE)。
200
+ MIT —— 见 [LICENSE](../LICENSE)。