revert: PDF回退原生阅读器(自绘抓手不可行) + feat: 视图选项改名设置并直接内嵌排序+管理列表 + 变更视图(内容自动迁入新拓扑)

This commit is contained in:
Aisland
2026-08-17 23:00:55 +08:00
parent b86b2361e8
commit 3a085e8bca
12 changed files with 145 additions and 652 deletions
+1 -8
View File
@@ -14,15 +14,8 @@ import { fileURLToPath } from 'node:url'
const here = dirname(fileURLToPath(import.meta.url))
mkdirSync(join(here, 'lib'), { recursive: true })
// pdf.js 工作线程源码(legacy ESM 构建)注入客户端全局,避免任何服务端依赖
const pdfWorkerSrc = readFileSync(
join(here, 'node_modules', 'pdfjs-dist', 'legacy', 'build', 'pdf.worker.min.mjs'),
'utf8',
)
const clientBanner = {
js: "var __WT_PDF_WORKER__ = " + JSON.stringify(pdfWorkerSrc) + ";\n" +
"window.__ModuleLoader__.load({ id: 'dsh-worktable', factory: (require) => { var module = { exports: {} }; var exports = module.exports;",
js: "window.__ModuleLoader__.load({ id: 'dsh-worktable', factory: (require) => { var module = { exports: {} }; var exports = module.exports;",
}
const clientFooter = { js: 'return module.exports; } });' }