dsh-doc-anchor-viewer 0.2.0 → 0.3.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/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "dsh-doc-anchor-viewer",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
- "description": "文档锚点视图:用 docx-preview 按 Word 版式渲染 docx,并把大纲/自定义锚点做成可跳转的定位点,供任意会话复用。",
5
+ "description": "文档锚点视图:用 docx-preview / PDF.js 按原版式渲染 docx 与 pdf,并把大纲/自定义锚点做成可跳转的定位点,供任意会话复用。",
6
6
  "icon": "./icon.svg",
7
7
  "license": "MIT",
8
8
  "author": {
@@ -23,6 +23,7 @@
23
23
  "deepseek-harness",
24
24
  "docx",
25
25
  "word",
26
+ "pdf",
26
27
  "anchor",
27
28
  "outline",
28
29
  "document-review",
@@ -43,8 +44,10 @@
43
44
  "LICENSE"
44
45
  ],
45
46
  "scripts": {
46
- "build:client": "node scripts/build-docx-preview.mjs",
47
- "test": "node --test test/run.mjs test/client-load.mjs test/render-smoke.mjs test/summary.mjs test/judge.mjs test/jump.mjs test/sidebar-tab.mjs test/zip.mjs"
47
+ "build:client": "node scripts/build-docx-preview.mjs && node scripts/build-pdfjs.mjs",
48
+ "build:docx": "node scripts/build-docx-preview.mjs",
49
+ "build:pdf": "node scripts/build-pdfjs.mjs",
50
+ "test": "node --test test/run.mjs test/client-load.mjs test/render-smoke.mjs test/summary.mjs test/judge.mjs test/jump.mjs test/sidebar-tab.mjs test/zip.mjs test/pdf.mjs"
48
51
  },
49
52
  "dsh": {
50
53
  "bundle": {
@@ -55,7 +58,8 @@
55
58
  }
56
59
  },
57
60
  "dependencies": {
58
- "docx-preview": "^0.4.1"
61
+ "docx-preview": "^0.4.1",
62
+ "pdfjs-dist": "^6.5.438"
59
63
  },
60
64
  "devDependencies": {
61
65
  "esbuild": "^0.28.2"