filens-preview 0.1.3 → 0.1.4
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 +19 -9
- package/dist/all-in-one/THIRD-PARTY-NOTICES.txt +0 -1010
- package/dist/all-in-one/filens.js +38777 -39610
- package/dist/split/THIRD-PARTY-NOTICES.txt +0 -1010
- package/dist/split/chunks/model3d-DoNu7iyY.js +5093 -0
- package/dist/split/filens-step.wasm +0 -0
- package/dist/split/filens.js +1 -1
- package/package.json +1 -1
- package/dist/split/chunks/model3d-BBFXmxkf.js +0 -5926
- package/dist/split/occt-import-js.wasm +0 -0
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Build the same preview engines as a single JavaScript file or split modules. Bot
|
|
|
4
4
|
include Vue, styles, PDF/iWork workers and the document, image/RAW and STEP WASM
|
|
5
5
|
engines. No conversion server or host Vue installation is needed.
|
|
6
6
|
|
|
7
|
-
Version 0.1.
|
|
7
|
+
Version 0.1.4 uses native HEIC/HEIF decoding first, with a small dedicated WASM
|
|
8
8
|
decoder as fallback. MOV plays through browser codecs; full FFmpeg is excluded.
|
|
9
9
|
Applications can supply an optional `mediaConverter` for unsupported MOV codecs.
|
|
10
10
|
Both builds preserve the same image and video support boundaries.
|
|
@@ -31,8 +31,14 @@ npm run build:preview
|
|
|
31
31
|
|
|
32
32
|
| Build | Deploy | Approximate runtime size |
|
|
33
33
|
| --- | --- | --- |
|
|
34
|
-
| Split | Entire `packages/preview/dist/split/` directory |
|
|
35
|
-
| All in one | `packages/preview/dist/all-in-one/filens.js` |
|
|
34
|
+
| Split | Entire `packages/preview/dist/split/` directory | 10.82 MB raw / 3.11 MB gzip / 2.44 MB Brotli, across all runtime files |
|
|
35
|
+
| All in one | `packages/preview/dist/all-in-one/filens.js` | 12.70 MB raw / 3.79 MB gzip / 2.84 MB Brotli |
|
|
36
|
+
|
|
37
|
+
These are the 0.1.4 builds (MB = 1,000,000 bytes). STEP uses
|
|
38
|
+
the truck Rust core; neither build includes OCCT. The npm package contains
|
|
39
|
+
both directories, about **7.0 MB packed / 24.34 MB installed**, including notices,
|
|
40
|
+
types and documentation.
|
|
41
|
+
[Package measurements](https://github.com/IceWhaleTech/filens/blob/main/docs/preview-package-sizes.json).
|
|
36
42
|
|
|
37
43
|
Both directories contain an `index.html` with a local file picker. Serve either
|
|
38
44
|
directory over HTTP(S). To integrate into another page:
|
|
@@ -63,8 +69,8 @@ direct Vue component integration.
|
|
|
63
69
|
Split chunks can range from a few KB to hundreds of KB after compression. Those
|
|
64
70
|
figures exclude shared dependencies and engines; a chunk is not a complete
|
|
65
71
|
per-format download. The all-in-one file embeds CSS, base64 WASM and workers; it
|
|
66
|
-
needs no additional runtime files.
|
|
67
|
-
|
|
72
|
+
needs no additional runtime files. Both builds include only truck for STEP.
|
|
73
|
+
A separate notices file accompanies
|
|
68
74
|
both builds and should be distributed with them. [Exact measurements](https://github.com/IceWhaleTech/filens/blob/main/docs/preview-build-sizes.json).
|
|
69
75
|
|
|
70
76
|
Single-file embedding still requires browser support for WebAssembly and workers.
|
|
@@ -112,7 +118,7 @@ filens preview report.pdf --port 8080 --assets /path/to/preview/dist/all-in-one
|
|
|
112
118
|
`FILENS_PREVIEW_DIR` overrides the default `<binary-directory>/preview` asset
|
|
113
119
|
directory. Source npm packaging can include the assets with
|
|
114
120
|
`node scripts/package-agent-npm.mjs --with-preview`; they are optional and add
|
|
115
|
-
about
|
|
121
|
+
about 11.2 MB on disk for the current source build, measured separately from the document-reading CLI.
|
|
116
122
|
|
|
117
123
|
The server exposes one selected file, not its parent directory. Models or media
|
|
118
124
|
with external sidecars need a supported ZIP bundle or a host-provided resource
|
|
@@ -128,9 +134,13 @@ macOS; Windows/Linux browser launching still needs native validation.
|
|
|
128
134
|
另附第三方许可文件。单文件部署更简单,初次下载也更大。
|
|
129
135
|
|
|
130
136
|
`filens preview 文件路径` 会启动本地浏览器预览,由前端完成格式解析与渲染。
|
|
131
|
-
CLI 0.4.
|
|
137
|
+
CLI 0.4.2 首次预览时自动安装 filens-preview 0.1.4,也可先运行 `filens setup-preview`;
|
|
132
138
|
源码版先运行 `npm run build:agent:preview`。
|
|
133
|
-
|
|
134
|
-
|
|
139
|
+
0.1.4 默认使用 truck,已移除 OCCT,保留专用 HEIC/HEIF 解码器。
|
|
140
|
+
分包运行时合计 2.44 MB Brotli,单文件为 2.84 MB Brotli / 3.79 MB gzip / 12.70 MB 原始体积。
|
|
141
|
+
独立 npm 包同时包含两种产物,约 7.0 MB 压缩包 / 24.34 MB 安装体积。
|
|
142
|
+
CLI 的安装体积另计:Lite 7.7–8.1 MiB,Full 31.1–36.8 MiB(含 OCR 运行时与模型);
|
|
143
|
+
其中原生可执行文件为 1.8–2.2 MiB,不含 Node.js、缓存及预览包。
|
|
144
|
+
源码仅附带分包目录时约 11.2 MB(含许可文件与 HTML)。图片先尝试原生显示,分包版仅在失败时加载 HEIF 解码器;视频使用浏览器编解码器,不支持的编码可通过可选 mediaConverter 接入转换器。`--no-open --json` 返回本地地址,`--assets` 可切换单文件或分包版,
|
|
135
145
|
Ctrl-C 退出。仅提供选中的文件,不开放整个父目录;伴随文件需要打成受支持的 ZIP
|
|
136
146
|
或由宿主配置解析器。
|