@file-viewer/renderer-archive 2.1.20 → 2.1.21

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.en.md CHANGED
@@ -30,6 +30,7 @@ const options = {
30
30
  ## Capabilities
31
31
 
32
32
  - Previews ZIP, TAR, GZIP, RAR, 7z, and common archive directories.
33
+ - Decodes legacy ZIP entry names that omit the UTF-8 flag but are actually encoded as GBK/GB18030.
33
34
  - Supports encrypted archives: encrypted content is handled through the unified `libarchive.js` path, the built-in dialog asks for a password, and a correct password unlocks directory reading or nested entry previews.
34
35
  - Uses `libarchive.js` Worker + WASM first to keep large archive parsing off the main thread.
35
36
  - Falls back to ZIP / TAR / GZIP parsing when the Worker cannot be started, which helps mobile WebViews, local static servers, and private intranet deployments. Encrypted archives never use the fallback path and require the libarchive Worker/WASM assets.
@@ -44,6 +45,7 @@ Default asset paths are:
44
45
  - `vendor/libarchive/libarchive.wasm`
45
46
 
46
47
  For private deployments, override them with `options.archive.workerUrl` and `options.archive.wasmUrl`.
48
+ The Vue 3 / Vue 2.7 / Vue 2.6 full packages default their viewer asset root to `/file-viewer/` and automatically point to these libarchive files. When deploying under another static prefix, call the matching full package export `setDefaultFullAssetBaseUrl('/your-prefix/')` first.
47
49
 
48
50
  ```ts
49
51
  const options = {
package/README.md CHANGED
@@ -30,6 +30,7 @@ const options = {
30
30
  ## 能力边界
31
31
 
32
32
  - 支持 ZIP、TAR、GZIP、RAR、7z 等常见压缩包目录预览。
33
+ - 自动兼容未声明 UTF-8、实际使用 GBK/GB18030 编码的旧 ZIP 中文文件名。
33
34
  - 支持加密压缩包:检测到加密内容后使用 `libarchive.js` 统一解密,默认弹框要求用户输入密码,密码正确后继续读取目录或预览内部文件。
34
35
  - 优先使用 `libarchive.js` Worker + WASM,避免大压缩包阻塞主线程。
35
36
  - Worker 不可用时自动回退到 ZIP / TAR / GZIP 兼容模式,适合手机 WebView、本地临时服务器和内网静态部署排障;加密压缩包不会走 fallback,必须发布 libarchive Worker/WASM。
@@ -44,6 +45,7 @@ const options = {
44
45
  - `vendor/libarchive/libarchive.wasm`
45
46
 
46
47
  私有化部署时可以通过 `options.archive.workerUrl` 和 `options.archive.wasmUrl` 覆盖。
48
+ Vue 3 / Vue 2.7 / Vue 2.6 full 包默认把 viewer assets 根设为 `/file-viewer/`,会自动指向这两个 libarchive 文件;如果部署在其它静态前缀,先调用对应 full 包导出的 `setDefaultFullAssetBaseUrl('/your-prefix/')` 即可。
47
49
 
48
50
  ```ts
49
51
  const options = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@file-viewer/renderer-archive",
3
- "version": "2.1.20",
3
+ "version": "2.1.21",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Standalone archive renderer plugin for Flyfish File Viewer with libarchive worker, ZIP/TAR fallback, IndexedDB cache, and nested previews.",
@@ -56,7 +56,7 @@
56
56
  "LICENSE"
57
57
  ],
58
58
  "dependencies": {
59
- "@file-viewer/core": "^2.1.20",
59
+ "@file-viewer/core": "^2.1.21",
60
60
  "jszip": "^3.10.1",
61
61
  "libarchive.js": "^2.0.2"
62
62
  },