@open-file-viewer/core 0.1.7 → 0.1.9

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 CHANGED
@@ -2,10 +2,12 @@
2
2
 
3
3
  Framework-agnostic browser file preview core for Open File Viewer.
4
4
 
5
- Open File Viewer renders files inside your own DOM container instead of opening a new window. It supports images, PDF, Office documents, audio, video, text/code, archives, email, drawings, CAD, 3D and GIS formats through a plugin-based pipeline.
5
+ Open File Viewer renders files inside your own DOM container instead of opening a new window. It supports images, PDF, Office documents, audio, video, text/code, archives, email, drawings, CAD, 3D, GIS, data and design asset formats through a plugin-based pipeline.
6
6
 
7
7
  DWG/DWF are proprietary binary CAD formats. `cadPlugin()` uses a two-layer model: it tries the built-in LibreDWG WASM DWG preview by default, then falls back to embedded thumbnails or metadata; applications can use `binaryRenderer` as the highest-priority override for custom renderers or server-side CAD conversion services.
8
8
 
9
+ Data/design asset previews are pure frontend where practical: SQLite shows header, schema and sample rows from common table leaf pages; PDF-compatible Illustrator files embed a browser PDF preview; PSD/PSB tries the Photoshop composite image; XPS/OXPS renders a lightweight FixedPage SVG view plus extracted text and package structure.
10
+
9
11
  - Website: https://open-file-viewer-workspace.void.app
10
12
  - GitHub: https://github.com/xushanpei/open-file-viewer
11
13
  - npm: https://www.npmjs.com/package/@open-file-viewer/core
@@ -34,6 +36,24 @@ Copy `libredwg-web.wasm` to a public directory and point `cadPlugin` to it:
34
36
  cadPlugin({ libreDwg: { wasmBaseUrl: "/vendor/libredwg-web" } });
35
37
  ```
36
38
 
39
+ Native browser video formats such as MP4, WebM and MOV do not need extra dependencies. HLS uses `hls.js`, which is bundled with the core package. FLV and MPEG-TS/M2TS playback is optional: install `mpegts.js` in your application only if you need those formats. If it is not installed, `videoPlugin()` shows the built-in download fallback for FLV/M2TS files.
40
+
41
+ ```bash
42
+ npm install mpegts.js
43
+ ```
44
+
45
+ `mpegts.js` currently depends on a git-based `webworkify-webpack` fork. pnpm 11 users with `blockExoticSubdeps` enabled can keep `@open-file-viewer/core` installed normally because `mpegts.js` is no longer a required dependency. If your app really needs FLV/M2TS playback, either allow that dependency in your app or override it to the npm release:
46
+
47
+ ```json
48
+ {
49
+ "pnpm": {
50
+ "overrides": {
51
+ "webworkify-webpack": "2.1.5"
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
37
57
  ## Quick Start
38
58
 
39
59
  ```ts