filens-preview 0.1.0 → 0.1.2

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
@@ -4,6 +4,11 @@ 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.2 uses native HEIC/HEIF decoding first, with a small dedicated WASM
8
+ decoder as fallback. MOV plays through browser codecs; full FFmpeg is excluded.
9
+ Applications can supply an optional `mediaConverter` for unsupported MOV codecs.
10
+ Both builds preserve the same image and video support boundaries.
11
+
7
12
  ```sh
8
13
  npm install filens-preview
9
14
  ```
@@ -26,8 +31,8 @@ npm run build:preview
26
31
 
27
32
  | Build | Deploy | Approximate runtime size |
28
33
  | --- | --- | --- |
29
- | Split | Entire `packages/preview/dist/split/` directory | 12 MB raw / 3.5 MB gzip / 2.7 MB Brotli, across all files |
30
- | All in one | `packages/preview/dist/all-in-one/filens.js` | 14 MB raw / 4.3 MB gzip / 3.2 MB Brotli |
34
+ | Split | Entire `packages/preview/dist/split/` directory | 13.5 MB raw / 4.2 MB gzip / 3.3 MB Brotli, across all runtime files |
35
+ | All in one | `packages/preview/dist/all-in-one/filens.js` | 16.3 MB raw / 5.2 MB gzip / 3.9 MB Brotli |
31
36
 
32
37
  Both directories contain an `index.html` with a local file picker. Serve either
33
38
  directory over HTTP(S). To integrate into another page:
@@ -107,7 +112,7 @@ filens preview report.pdf --port 8080 --assets /path/to/preview/dist/all-in-one
107
112
  `FILENS_PREVIEW_DIR` overrides the default `<binary-directory>/preview` asset
108
113
  directory. Source npm packaging can include the assets with
109
114
  `node scripts/package-agent-npm.mjs --with-preview`; they are optional and add
110
- about 12 MB on disk, measured separately from the document-reading CLI.
115
+ about 13.5 MB on disk, measured separately from the document-reading CLI.
111
116
 
112
117
  The server exposes one selected file, not its parent directory. Models or media
113
118
  with external sidecars need a supported ZIP bundle or a host-provided resource
@@ -123,9 +128,9 @@ macOS; Windows/Linux browser launching still needs native validation.
123
128
  另附第三方许可文件。单文件部署更简单,初次下载也更大。
124
129
 
125
130
  `filens preview 文件路径` 会启动本地浏览器预览,由前端完成格式解析与渲染。
126
- CLI 0.4.0 首次预览时自动安装前端资源,也可先运行 `filens setup-preview`;
131
+ CLI 0.4.1 首次预览时自动安装 filens-preview 0.1.2,也可先运行 `filens setup-preview`;
127
132
  源码版先运行 `npm run build:agent:preview`。
128
- 独立前端包同时包含单文件和分包产物,完整安装约 26 MB,不混入 CLI 的
129
- 约 2 MB / Lite 8 MB / Full 30 多 MB 安装体积。源码仅附带分包时约 12 MB。`--no-open --json` 返回本地地址,`--assets` 可切换单文件或分包版,
133
+ 独立前端包同时包含单文件和分包产物,完整安装约 31 MB,包含专用 HEIC/HEIF 解码器,不含完整 FFmpeg,不混入 CLI 的
134
+ 约 2 MB / Lite 8 MB / Full 30 多 MB 安装体积。源码仅附带分包时约 13.5 MB。图片先尝试原生显示,分包版仅在失败时加载 HEIF 解码器;视频使用浏览器编解码器,不支持的编码可通过可选 mediaConverter 接入转换器。`--no-open --json` 返回本地地址,`--assets` 可切换单文件或分包版,
130
135
  Ctrl-C 退出。仅提供选中的文件,不开放整个父目录;伴随文件需要打成受支持的 ZIP
131
136
  或由宿主配置解析器。
@@ -8753,6 +8753,175 @@ copy of the Program in return for a fee.
8753
8753
  END OF TERMS AND CONDITIONS
8754
8754
 
8755
8755
 
8756
+ libheif-js@1.23.5 (LGPL-3.0)
8757
+
8758
+ GNU LESSER GENERAL PUBLIC LICENSE
8759
+ Version 3, 29 June 2007
8760
+
8761
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
8762
+ Everyone is permitted to copy and distribute verbatim copies
8763
+ of this license document, but changing it is not allowed.
8764
+
8765
+
8766
+ This version of the GNU Lesser General Public License incorporates
8767
+ the terms and conditions of version 3 of the GNU General Public
8768
+ License, supplemented by the additional permissions listed below.
8769
+
8770
+ 0. Additional Definitions.
8771
+
8772
+ As used herein, "this License" refers to version 3 of the GNU Lesser
8773
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
8774
+ General Public License.
8775
+
8776
+ "The Library" refers to a covered work governed by this License,
8777
+ other than an Application or a Combined Work as defined below.
8778
+
8779
+ An "Application" is any work that makes use of an interface provided
8780
+ by the Library, but which is not otherwise based on the Library.
8781
+ Defining a subclass of a class defined by the Library is deemed a mode
8782
+ of using an interface provided by the Library.
8783
+
8784
+ A "Combined Work" is a work produced by combining or linking an
8785
+ Application with the Library. The particular version of the Library
8786
+ with which the Combined Work was made is also called the "Linked
8787
+ Version".
8788
+
8789
+ The "Minimal Corresponding Source" for a Combined Work means the
8790
+ Corresponding Source for the Combined Work, excluding any source code
8791
+ for portions of the Combined Work that, considered in isolation, are
8792
+ based on the Application, and not on the Linked Version.
8793
+
8794
+ The "Corresponding Application Code" for a Combined Work means the
8795
+ object code and/or source code for the Application, including any data
8796
+ and utility programs needed for reproducing the Combined Work from the
8797
+ Application, but excluding the System Libraries of the Combined Work.
8798
+
8799
+ 1. Exception to Section 3 of the GNU GPL.
8800
+
8801
+ You may convey a covered work under sections 3 and 4 of this License
8802
+ without being bound by section 3 of the GNU GPL.
8803
+
8804
+ 2. Conveying Modified Versions.
8805
+
8806
+ If you modify a copy of the Library, and, in your modifications, a
8807
+ facility refers to a function or data to be supplied by an Application
8808
+ that uses the facility (other than as an argument passed when the
8809
+ facility is invoked), then you may convey a copy of the modified
8810
+ version:
8811
+
8812
+ a) under this License, provided that you make a good faith effort to
8813
+ ensure that, in the event an Application does not supply the
8814
+ function or data, the facility still operates, and performs
8815
+ whatever part of its purpose remains meaningful, or
8816
+
8817
+ b) under the GNU GPL, with none of the additional permissions of
8818
+ this License applicable to that copy.
8819
+
8820
+ 3. Object Code Incorporating Material from Library Header Files.
8821
+
8822
+ The object code form of an Application may incorporate material from
8823
+ a header file that is part of the Library. You may convey such object
8824
+ code under terms of your choice, provided that, if the incorporated
8825
+ material is not limited to numerical parameters, data structure
8826
+ layouts and accessors, or small macros, inline functions and templates
8827
+ (ten or fewer lines in length), you do both of the following:
8828
+
8829
+ a) Give prominent notice with each copy of the object code that the
8830
+ Library is used in it and that the Library and its use are
8831
+ covered by this License.
8832
+
8833
+ b) Accompany the object code with a copy of the GNU GPL and this license
8834
+ document.
8835
+
8836
+ 4. Combined Works.
8837
+
8838
+ You may convey a Combined Work under terms of your choice that,
8839
+ taken together, effectively do not restrict modification of the
8840
+ portions of the Library contained in the Combined Work and reverse
8841
+ engineering for debugging such modifications, if you also do each of
8842
+ the following:
8843
+
8844
+ a) Give prominent notice with each copy of the Combined Work that
8845
+ the Library is used in it and that the Library and its use are
8846
+ covered by this License.
8847
+
8848
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
8849
+ document.
8850
+
8851
+ c) For a Combined Work that displays copyright notices during
8852
+ execution, include the copyright notice for the Library among
8853
+ these notices, as well as a reference directing the user to the
8854
+ copies of the GNU GPL and this license document.
8855
+
8856
+ d) Do one of the following:
8857
+
8858
+ 0) Convey the Minimal Corresponding Source under the terms of this
8859
+ License, and the Corresponding Application Code in a form
8860
+ suitable for, and under terms that permit, the user to
8861
+ recombine or relink the Application with a modified version of
8862
+ the Linked Version to produce a modified Combined Work, in the
8863
+ manner specified by section 6 of the GNU GPL for conveying
8864
+ Corresponding Source.
8865
+
8866
+ 1) Use a suitable shared library mechanism for linking with the
8867
+ Library. A suitable mechanism is one that (a) uses at run time
8868
+ a copy of the Library already present on the user's computer
8869
+ system, and (b) will operate properly with a modified version
8870
+ of the Library that is interface-compatible with the Linked
8871
+ Version.
8872
+
8873
+ e) Provide Installation Information, but only if you would otherwise
8874
+ be required to provide such information under section 6 of the
8875
+ GNU GPL, and only to the extent that such information is
8876
+ necessary to install and execute a modified version of the
8877
+ Combined Work produced by recombining or relinking the
8878
+ Application with a modified version of the Linked Version. (If
8879
+ you use option 4d0, the Installation Information must accompany
8880
+ the Minimal Corresponding Source and Corresponding Application
8881
+ Code. If you use option 4d1, you must provide the Installation
8882
+ Information in the manner specified by section 6 of the GNU GPL
8883
+ for conveying Corresponding Source.)
8884
+
8885
+ 5. Combined Libraries.
8886
+
8887
+ You may place library facilities that are a work based on the
8888
+ Library side by side in a single library together with other library
8889
+ facilities that are not Applications and are not covered by this
8890
+ License, and convey such a combined library under terms of your
8891
+ choice, if you do both of the following:
8892
+
8893
+ a) Accompany the combined library with a copy of the same work based
8894
+ on the Library, uncombined with any other library facilities,
8895
+ conveyed under the terms of this License.
8896
+
8897
+ b) Give prominent notice with the combined library that part of it
8898
+ is a work based on the Library, and explaining where to find the
8899
+ accompanying uncombined form of the same work.
8900
+
8901
+ 6. Revised Versions of the GNU Lesser General Public License.
8902
+
8903
+ The Free Software Foundation may publish revised and/or new versions
8904
+ of the GNU Lesser General Public License from time to time. Such new
8905
+ versions will be similar in spirit to the present version, but may
8906
+ differ in detail to address new problems or concerns.
8907
+
8908
+ Each version is given a distinguishing version number. If the
8909
+ Library as you received it specifies that a certain numbered version
8910
+ of the GNU Lesser General Public License "or any later version"
8911
+ applies to it, you have the option of following the terms and
8912
+ conditions either of that published version or of any later version
8913
+ published by the Free Software Foundation. If the Library as you
8914
+ received it does not specify a version number of the GNU Lesser
8915
+ General Public License, you may choose any version of the GNU Lesser
8916
+ General Public License ever published by the Free Software Foundation.
8917
+
8918
+ If the Library as you received it specifies that a proxy can decide
8919
+ whether future versions of the GNU Lesser General Public License shall
8920
+ apply, that proxy's public statement of acceptance of any version is
8921
+ permanent authorization for you to choose that version for the
8922
+ Library.
8923
+
8924
+
8756
8925
  pako@1.0.11 ((MIT AND Zlib))
8757
8926
 
8758
8927
  (The MIT License)