Render saved Web Archive (MHTML) pages — the "single file" saves from Chrome/IE — via mhtml-to-html (MIT, gildas-lormeau). The library unpacks the MIME container and inlines every resource as a data: URI; the result renders in a sandboxed iframe (allow-scripts intentionally omitted) so the page's own CSS can't leak into the app and nothing executes or touches the network. - New src/renderers/mhtml-renderer.js, lazy-loaded; wired into EXT_MAP and RENDERER_LOADERS for .mht/.mhtml, plus the file-picker accept list - README / CREDITS / EMBEDDING updated; mhtml-to-html stays permissive (MIT) - Removed dead .odf-frame CSS (an abandoned, unreferenced iframe rule) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
38 lines
1.2 KiB
JSON
38 lines
1.2 KiB
JSON
{
|
|
"name": "preview-js",
|
|
"version": "1.0.0",
|
|
"description": "Client-side universal document viewer — PDF, DjVu, ODF, Office, e-books, comics and images — permissive, no server, no upload",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build",
|
|
"build:embed:app": "vite build --config vite.config.app.js",
|
|
"build:embed:loader": "vite build --config vite.config.embed.js",
|
|
"build:embed": "npm run build:embed:app && npm run build:embed:loader",
|
|
"preview": "vite preview",
|
|
"docs": "jsdoc src -r -d docs"
|
|
},
|
|
"dependencies": {
|
|
"chart.js": "^4.5.1",
|
|
"dejaview": "github:Alpaq92/dejaview#ae7aed28a7e9f1ef9658d421471ffb66336ada09",
|
|
"diff": "^9.0.0",
|
|
"exifr": "^7.1.3",
|
|
"foliate-js": "github:johnfactotum/foliate-js#78914aef4466eb960965702401634c2cb348e9b1",
|
|
"highlight.js": "^11.11.1",
|
|
"jszip": "^3.10.1",
|
|
"libarchive.js": "^2.0.2",
|
|
"mammoth": "^1.8.0",
|
|
"marked": "^18.0.5",
|
|
"mhtml-to-html": "^2.0.1",
|
|
"papaparse": "^5.5.4",
|
|
"pdfjs-dist": "^6.0.227",
|
|
"pptxviewjs": "^1.1.9",
|
|
"rtf.js": "^3.0.9",
|
|
"utif": "^3.1.0",
|
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
|
},
|
|
"devDependencies": {
|
|
"vite": "^8.1.0"
|
|
}
|
|
}
|