@file-viewer/assets-chm 3.0.1

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/LICENSE ADDED
@@ -0,0 +1,196 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction, and
10
+ distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
13
+ owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and configuration
27
+ files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object code,
31
+ generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work.
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link (or bind by
42
+ name) to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original version
45
+ of the Work and any modifications or additions to that Work or Derivative Works
46
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work by
47
+ the copyright owner or by an individual or Legal Entity authorized to submit on
48
+ behalf of the copyright owner. For the purposes of this definition, "submitted"
49
+ means any form of electronic, verbal, or written communication sent to the
50
+ Licensor or its representatives, including but not limited to communication on
51
+ electronic mailing lists, source code control systems, and issue tracking systems
52
+ that are managed by, or on behalf of, the Licensor for the purpose of discussing
53
+ and improving the Work, but excluding communication that is conspicuously marked
54
+ or otherwise designated in writing by the copyright owner as "Not a
55
+ Contribution."
56
+
57
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58
+ of whom a Contribution has been received by Licensor and subsequently
59
+ incorporated within the Work.
60
+
61
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
62
+ License, each Contributor hereby grants to You a perpetual, worldwide,
63
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
64
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
65
+ sublicense, and distribute the Work and such Derivative Works in Source or
66
+ Object form.
67
+
68
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
69
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
70
+ no-charge, royalty-free, irrevocable (except as stated in this section) patent
71
+ license to make, have made, use, offer to sell, sell, import, and otherwise
72
+ transfer the Work, where such license applies only to those patent claims
73
+ licensable by such Contributor that are necessarily infringed by their
74
+ Contribution(s) alone or by combination of their Contribution(s) with the Work to
75
+ which such Contribution(s) was submitted. If You institute patent litigation
76
+ against any entity (including a cross-claim or counterclaim in a lawsuit)
77
+ alleging that the Work or a Contribution incorporated within the Work
78
+ constitutes direct or contributory patent infringement, then any patent licenses
79
+ granted to You under this License for that Work shall terminate as of the date
80
+ such litigation is filed.
81
+
82
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
83
+ Derivative Works thereof in any medium, with or without modifications, and in
84
+ Source or Object form, provided that You meet the following conditions:
85
+
86
+ (a) You must give any other recipients of the Work or Derivative Works a copy of
87
+ this License; and
88
+
89
+ (b) You must cause any modified files to carry prominent notices stating that
90
+ You changed the files; and
91
+
92
+ (c) You must retain, in the Source form of any Derivative Works that You
93
+ distribute, all copyright, patent, trademark, and attribution notices from the
94
+ Source form of the Work, excluding those notices that do not pertain to any part
95
+ of the Derivative Works; and
96
+
97
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
98
+ any Derivative Works that You distribute must include a readable copy of the
99
+ attribution notices contained within such NOTICE file, excluding those notices
100
+ that do not pertain to any part of the Derivative Works, in at least one of the
101
+ following places: within a NOTICE text file distributed as part of the Derivative
102
+ Works; within the Source form or documentation, if provided along with the
103
+ Derivative Works; or, within a display generated by the Derivative Works, if and
104
+ wherever such third-party notices normally appear. The contents of the NOTICE
105
+ file are for informational purposes only and do not modify the License. You may
106
+ add Your own attribution notices within Derivative Works that You distribute,
107
+ alongside or as an addendum to the NOTICE text from the Work, provided that such
108
+ additional attribution notices cannot be construed as modifying the License.
109
+
110
+ You may add Your own copyright statement to Your modifications and may provide
111
+ additional or different license terms and conditions for use, reproduction, or
112
+ distribution of Your modifications, or for any such Derivative Works as a whole,
113
+ provided Your use, reproduction, and distribution of the Work otherwise complies
114
+ with the conditions stated in this License.
115
+
116
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
117
+ Contribution intentionally submitted for inclusion in the Work by You to the
118
+ Licensor shall be under the terms and conditions of this License, without any
119
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
120
+ supersede or modify the terms of any separate license agreement you may have
121
+ executed with Licensor regarding such Contributions.
122
+
123
+ 6. Trademarks. This License does not grant permission to use the trade names,
124
+ trademarks, service marks, or product names of the Licensor, except as required
125
+ for reasonable and customary use in describing the origin of the Work and
126
+ reproducing the content of the NOTICE file.
127
+
128
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
129
+ writing, Licensor provides the Work (and each Contributor provides its
130
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
131
+ KIND, either express or implied, including, without limitation, any warranties or
132
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
133
+ PARTICULAR PURPOSE. You are solely responsible for determining the
134
+ appropriateness of using or redistributing the Work and assume any risks
135
+ associated with Your exercise of permissions under this License.
136
+
137
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
138
+ tort (including negligence), contract, or otherwise, unless required by
139
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
140
+ writing, shall any Contributor be liable to You for damages, including any
141
+ direct, indirect, special, incidental, or consequential damages of any character
142
+ arising as a result of this License or out of the use or inability to use the
143
+ Work (including but not limited to damages for loss of goodwill, work stoppage,
144
+ computer failure or malfunction, or any and all other commercial damages or
145
+ losses), even if such Contributor has been advised of the possibility of such
146
+ damages.
147
+
148
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
149
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
150
+ acceptance of support, warranty, indemnity, or other liability obligations and/or
151
+ rights consistent with this License. However, in accepting such obligations, You
152
+ may act only on Your own behalf and on Your sole responsibility, not on behalf of
153
+ any other Contributor, and only if You agree to indemnify, defend, and hold each
154
+ Contributor harmless for any liability incurred by, or claims asserted against,
155
+ such Contributor by reason of your accepting any such warranty or additional
156
+ liability.
157
+
158
+ END OF TERMS AND CONDITIONS
159
+
160
+ APPENDIX: How to apply the Apache License to your work.
161
+
162
+ To apply the Apache License to your work, attach the following boilerplate
163
+ notice, with the fields enclosed by brackets "[]" replaced with your own
164
+ identifying information. (Don't include the brackets!) The text should be
165
+ enclosed in the appropriate comment syntax for the file format. We also
166
+ recommend that a file or class name and description of purpose be included on
167
+ the same "printed page" as the copyright notice for easier identification
168
+ within third-party archives.
169
+
170
+ Copyright [yyyy] [name of copyright owner]
171
+
172
+ Licensed under the Apache License, Version 2.0 (the "License");
173
+ you may not use this file except in compliance with the License.
174
+ You may obtain a copy of the License at
175
+
176
+ http://www.apache.org/licenses/LICENSE-2.0
177
+
178
+ Unless required by applicable law or agreed to in writing, software
179
+ distributed under the License is distributed on an "AS IS" BASIS,
180
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
181
+ See the License for the specific language governing permissions and
182
+ limitations under the License.
183
+
184
+ Copyright 2026 Flyfish Viewer
185
+
186
+ Licensed under the Apache License, Version 2.0 (the "License");
187
+ you may not use this file except in compliance with the License.
188
+ You may obtain a copy of the License at
189
+
190
+ http://www.apache.org/licenses/LICENSE-2.0
191
+
192
+ Unless required by applicable law or agreed to in writing, software
193
+ distributed under the License is distributed on an "AS IS" BASIS,
194
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
195
+ See the License for the specific language governing permissions and
196
+ limitations under the License.
package/README.en.md ADDED
@@ -0,0 +1,5 @@
1
+ # @file-viewer/assets-chm
2
+
3
+ Self-hosted Worker and Rust/WebAssembly assets for the opt-in CHM renderer. The installer merges files transactionally and records a per-file SHA-256 receipt.
4
+
5
+ The package and installed `vendor/chm` directory include the Apache-2.0 license, parser provenance, and the complete locked Rust dependency license inventory required for binary redistribution.
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @file-viewer/assets-chm
2
+
3
+ CHM Worker 与 Rust/WASM 离线运行时。该包用于按需安装 CHM 能力所需的自托管资源;安装器会事务化复制文件,并写入逐文件 SHA-256 收据。
4
+
5
+ 包根目录和安装后的 `vendor/chm` 均附带 Apache-2.0 许可证、解析器来源声明,以及按 Cargo.lock 固定的完整 Rust 依赖许可证清单。
package/RUST_NOTICE.md ADDED
@@ -0,0 +1,47 @@
1
+ # CHM Rust/WASM notices
2
+
3
+ The File Viewer-specific wrapper, limits, metadata model, and browser API are licensed
4
+ under Apache License 2.0; see `LICENSE`.
5
+
6
+ The ITSF/ITSP reader and LZX decoder were adapted and hardened from these permissively
7
+ licensed clean-room projects:
8
+
9
+ 1. RustChm 0.1.2
10
+ - Source: https://github.com/yeroo/RustChm
11
+ - Commit: `5418439a40812079b479acec40719cddedcb583c`
12
+ - Files studied/adapted: `src/chmreader.rs`, `src/lzxdecode.rs`,
13
+ `src/sitemap.rs`, and format writers used as independent test oracles.
14
+ - License: MIT
15
+ - Copyright (c) 2026 yeroo
16
+
17
+ 2. FastChm
18
+ - Source: https://github.com/yeroo/FastChm
19
+ - Commit: `2c22935ba0a1fc7a5a3d3d9785c970058c4d00f0`
20
+ - Files studied: `src/chmreader.cpp`, `src/lzxdecode.cpp`, and binary navigation
21
+ writers used to corroborate RustChm's documented clean-room format behavior.
22
+ - License: MIT
23
+ - Copyright (c) 2026 yeroo
24
+
25
+ The full upstream MIT notice follows and applies to both projects:
26
+
27
+ > MIT License
28
+ >
29
+ > Copyright (c) 2026 yeroo
30
+ >
31
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
32
+ > of this software and associated documentation files (the "Software"), to deal
33
+ > in the Software without restriction, including without limitation the rights
34
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
+ > copies of the Software, and to permit persons to whom the Software is
36
+ > furnished to do so, subject to the following conditions:
37
+ >
38
+ > The above copyright notice and this permission notice shall be included in all
39
+ > copies or substantial portions of the Software.
40
+ >
41
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47
+ > SOFTWARE.
@@ -0,0 +1,365 @@
1
+ # Rust/WASM third-party licenses
2
+
3
+ This document is the binary-distribution license inventory for the Rust crates
4
+ resolved by `rust/Cargo.lock` and used to build `chm_wasm_bg.wasm`.
5
+
6
+ - Cargo.lock SHA-256: `8a81680e7a32a1d88656a148834dc24eb6bf866bd1366d836abac1c95e6b86ea`
7
+ - Inventory command: `cargo metadata --locked --format-version 1`
8
+ - Audit date: 2026-09-01
9
+ - Registry source: the exact crate versions named below from crates.io.
10
+ - For `MIT OR Apache-2.0` packages this distribution elects Apache-2.0.
11
+ The complete Apache-2.0 text is reproduced in section A.
12
+ - Build/procedural dependencies are included as well as runtime dependencies so
13
+ the inventory is a conservative superset of code that can affect the WASM artifact.
14
+ - No crate in this lockfile has an upstream `NOTICE` file.
15
+
16
+ The “upstream attribution” column is copied from Cargo package metadata unless a
17
+ packaged license or copyright file supplies a more specific copyright notice.
18
+
19
+ ## Locked crate inventory
20
+
21
+ | Crate | Version | Cargo SPDX expression | License text used here | Upstream attribution / copyright |
22
+ | --- | ---: | --- | --- | --- |
23
+ | bumpalo | 3.20.3 | MIT OR Apache-2.0 | Apache-2.0 (A) | Nick Fitzgerald; https://github.com/fitzgen/bumpalo |
24
+ | cfg-if | 1.0.4 | MIT OR Apache-2.0 | Apache-2.0 (A) | Alex Crichton; https://github.com/rust-lang/cfg-if |
25
+ | encoding_rs | 0.8.35 | (Apache-2.0 OR MIT) AND BSD-3-Clause | Apache-2.0 (A) and BSD-3-Clause (B) | Copyright Mozilla Foundation; derived WHATWG data copyright © WHATWG (Apple, Google, Mozilla, Microsoft) |
26
+ | futures-core | 0.3.34 | MIT OR Apache-2.0 | Apache-2.0 (A) | rust-lang/futures-rs; https://github.com/rust-lang/futures-rs |
27
+ | futures-task | 0.3.34 | MIT OR Apache-2.0 | Apache-2.0 (A) | rust-lang/futures-rs; https://github.com/rust-lang/futures-rs |
28
+ | futures-util | 0.3.34 | MIT OR Apache-2.0 | Apache-2.0 (A) | rust-lang/futures-rs; https://github.com/rust-lang/futures-rs |
29
+ | js-sys | 0.3.104 | MIT OR Apache-2.0 | Apache-2.0 (A) | The wasm-bindgen Developers; https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/js-sys |
30
+ | once_cell | 1.21.4 | MIT OR Apache-2.0 | Apache-2.0 (A) | Aleksey Kladov; https://github.com/matklad/once_cell |
31
+ | pin-project-lite | 0.2.17 | Apache-2.0 OR MIT | Apache-2.0 (A) | taiki-e/pin-project-lite; https://github.com/taiki-e/pin-project-lite |
32
+ | proc-macro2 | 1.0.107 | MIT OR Apache-2.0 | Apache-2.0 (A) | David Tolnay and Alex Crichton; https://github.com/dtolnay/proc-macro2 |
33
+ | quote | 1.0.47 | MIT OR Apache-2.0 | Apache-2.0 (A) | David Tolnay; https://github.com/dtolnay/quote |
34
+ | rustversion | 1.0.23 | MIT OR Apache-2.0 | Apache-2.0 (A) | David Tolnay; https://github.com/dtolnay/rustversion |
35
+ | serde | 1.0.229 | MIT OR Apache-2.0 | Apache-2.0 (A) | Erick Tryzelaar and David Tolnay; https://github.com/serde-rs/serde |
36
+ | serde_core | 1.0.229 | MIT OR Apache-2.0 | Apache-2.0 (A) | Erick Tryzelaar and David Tolnay; https://github.com/serde-rs/serde |
37
+ | serde_derive | 1.0.229 | MIT OR Apache-2.0 | Apache-2.0 (A) | Erick Tryzelaar and David Tolnay; https://github.com/serde-rs/serde |
38
+ | serde-wasm-bindgen | 0.6.5 | MIT | MIT (C) | Copyright (c) 2019 Cloudflare, Inc.; https://github.com/RReverser/serde-wasm-bindgen |
39
+ | slab | 0.4.12 | MIT | MIT (D) | Copyright (c) 2019 Carl Lerche; https://github.com/tokio-rs/slab |
40
+ | syn | 2.0.119 | MIT OR Apache-2.0 | Apache-2.0 (A) | David Tolnay; https://github.com/dtolnay/syn |
41
+ | syn | 3.0.4 | MIT OR Apache-2.0 | Apache-2.0 (A) | David Tolnay; https://github.com/dtolnay/syn |
42
+ | thiserror | 2.0.20 | MIT OR Apache-2.0 | Apache-2.0 (A) | David Tolnay; https://github.com/dtolnay/thiserror |
43
+ | thiserror-impl | 2.0.20 | MIT OR Apache-2.0 | Apache-2.0 (A) | David Tolnay; https://github.com/dtolnay/thiserror |
44
+ | unicode-ident | 1.0.24 | (MIT OR Apache-2.0) AND Unicode-3.0 | Apache-2.0 (A) and Unicode-3.0 (E) | Copyright © 1991-2023 Unicode, Inc.; https://github.com/dtolnay/unicode-ident |
45
+ | wasm-bindgen | 0.2.127 | MIT OR Apache-2.0 | Apache-2.0 (A) | The wasm-bindgen Developers; https://github.com/wasm-bindgen/wasm-bindgen |
46
+ | wasm-bindgen-macro | 0.2.127 | MIT OR Apache-2.0 | Apache-2.0 (A) | The wasm-bindgen Developers; https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/macro |
47
+ | wasm-bindgen-macro-support | 0.2.127 | MIT OR Apache-2.0 | Apache-2.0 (A) | The wasm-bindgen Developers; https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/macro-support |
48
+ | wasm-bindgen-shared | 0.2.127 | MIT OR Apache-2.0 | Apache-2.0 (A) | The wasm-bindgen Developers; https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/shared |
49
+
50
+ The CHM parser source adaptations from RustChm and FastChm are separately
51
+ documented with exact commits and full MIT terms in `rust/NOTICE.md`.
52
+
53
+ ## A. Apache License 2.0
54
+
55
+ Apache License
56
+ Version 2.0, January 2004
57
+ http://www.apache.org/licenses/
58
+
59
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
60
+
61
+ 1. Definitions.
62
+
63
+ "License" shall mean the terms and conditions for use, reproduction, and
64
+ distribution as defined by Sections 1 through 9 of this document.
65
+
66
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
67
+ owner that is granting the License.
68
+
69
+ "Legal Entity" shall mean the union of the acting entity and all other entities
70
+ that control, are controlled by, or are under common control with that entity.
71
+ For the purposes of this definition, "control" means (i) the power, direct or
72
+ indirect, to cause the direction or management of such entity, whether by
73
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
74
+ outstanding shares, or (iii) beneficial ownership of such entity.
75
+
76
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
77
+ permissions granted by this License.
78
+
79
+ "Source" form shall mean the preferred form for making modifications, including
80
+ but not limited to software source code, documentation source, and configuration
81
+ files.
82
+
83
+ "Object" form shall mean any form resulting from mechanical transformation or
84
+ translation of a Source form, including but not limited to compiled object code,
85
+ generated documentation, and conversions to other media types.
86
+
87
+ "Work" shall mean the work of authorship, whether in Source or Object form,
88
+ made available under the License, as indicated by a copyright notice that is
89
+ included in or attached to the work.
90
+
91
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
92
+ is based on (or derived from) the Work and for which the editorial revisions,
93
+ annotations, elaborations, or other modifications represent, as a whole, an
94
+ original work of authorship. For the purposes of this License, Derivative Works
95
+ shall not include works that remain separable from, or merely link (or bind by
96
+ name) to the interfaces of, the Work and Derivative Works thereof.
97
+
98
+ "Contribution" shall mean any work of authorship, including the original version
99
+ of the Work and any modifications or additions to that Work or Derivative Works
100
+ thereof, that is intentionally submitted to Licensor for inclusion in the Work by
101
+ the copyright owner or by an individual or Legal Entity authorized to submit on
102
+ behalf of the copyright owner. For the purposes of this definition, "submitted"
103
+ means any form of electronic, verbal, or written communication sent to the
104
+ Licensor or its representatives, including but not limited to communication on
105
+ electronic mailing lists, source code control systems, and issue tracking systems
106
+ that are managed by, or on behalf of, the Licensor for the purpose of discussing
107
+ and improving the Work, but excluding communication that is conspicuously marked
108
+ or otherwise designated in writing by the copyright owner as "Not a
109
+ Contribution."
110
+
111
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
112
+ of whom a Contribution has been received by Licensor and subsequently
113
+ incorporated within the Work.
114
+
115
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
116
+ License, each Contributor hereby grants to You a perpetual, worldwide,
117
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
118
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
119
+ sublicense, and distribute the Work and such Derivative Works in Source or
120
+ Object form.
121
+
122
+ 3. Grant of Patent License. Subject to the terms and conditions of this License,
123
+ each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
124
+ no-charge, royalty-free, irrevocable (except as stated in this section) patent
125
+ license to make, have made, use, offer to sell, sell, import, and otherwise
126
+ transfer the Work, where such license applies only to those patent claims
127
+ licensable by such Contributor that are necessarily infringed by their
128
+ Contribution(s) alone or by combination of their Contribution(s) with the Work to
129
+ which such Contribution(s) was submitted. If You institute patent litigation
130
+ against any entity (including a cross-claim or counterclaim in a lawsuit)
131
+ alleging that the Work or a Contribution incorporated within the Work
132
+ constitutes direct or contributory patent infringement, then any patent licenses
133
+ granted to You under this License for that Work shall terminate as of the date
134
+ such litigation is filed.
135
+
136
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
137
+ Derivative Works thereof in any medium, with or without modifications, and in
138
+ Source or Object form, provided that You meet the following conditions:
139
+
140
+ (a) You must give any other recipients of the Work or Derivative Works a copy of
141
+ this License; and
142
+
143
+ (b) You must cause any modified files to carry prominent notices stating that
144
+ You changed the files; and
145
+
146
+ (c) You must retain, in the Source form of any Derivative Works that You
147
+ distribute, all copyright, patent, trademark, and attribution notices from the
148
+ Source form of the Work, excluding those notices that do not pertain to any part
149
+ of the Derivative Works; and
150
+
151
+ (d) If the Work includes a "NOTICE" text file as part of its distribution, then
152
+ any Derivative Works that You distribute must include a readable copy of the
153
+ attribution notices contained within such NOTICE file, excluding those notices
154
+ that do not pertain to any part of the Derivative Works, in at least one of the
155
+ following places: within a NOTICE text file distributed as part of the Derivative
156
+ Works; within the Source form or documentation, if provided along with the
157
+ Derivative Works; or, within a display generated by the Derivative Works, if and
158
+ wherever such third-party notices normally appear. The contents of the NOTICE
159
+ file are for informational purposes only and do not modify the License. You may
160
+ add Your own attribution notices within Derivative Works that You distribute,
161
+ alongside or as an addendum to the NOTICE text from the Work, provided that such
162
+ additional attribution notices cannot be construed as modifying the License.
163
+
164
+ You may add Your own copyright statement to Your modifications and may provide
165
+ additional or different license terms and conditions for use, reproduction, or
166
+ distribution of Your modifications, or for any such Derivative Works as a whole,
167
+ provided Your use, reproduction, and distribution of the Work otherwise complies
168
+ with the conditions stated in this License.
169
+
170
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
171
+ Contribution intentionally submitted for inclusion in the Work by You to the
172
+ Licensor shall be under the terms and conditions of this License, without any
173
+ additional terms or conditions. Notwithstanding the above, nothing herein shall
174
+ supersede or modify the terms of any separate license agreement you may have
175
+ executed with Licensor regarding such Contributions.
176
+
177
+ 6. Trademarks. This License does not grant permission to use the trade names,
178
+ trademarks, service marks, or product names of the Licensor, except as required
179
+ for reasonable and customary use in describing the origin of the Work and
180
+ reproducing the content of the NOTICE file.
181
+
182
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
183
+ writing, Licensor provides the Work (and each Contributor provides its
184
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
185
+ KIND, either express or implied, including, without limitation, any warranties or
186
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
187
+ PARTICULAR PURPOSE. You are solely responsible for determining the
188
+ appropriateness of using or redistributing the Work and assume any risks
189
+ associated with Your exercise of permissions under this License.
190
+
191
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
192
+ tort (including negligence), contract, or otherwise, unless required by
193
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
194
+ writing, shall any Contributor be liable to You for damages, including any
195
+ direct, indirect, special, incidental, or consequential damages of any character
196
+ arising as a result of this License or out of the use or inability to use the
197
+ Work (including but not limited to damages for loss of goodwill, work stoppage,
198
+ computer failure or malfunction, or any and all other commercial damages or
199
+ losses), even if such Contributor has been advised of the possibility of such
200
+ damages.
201
+
202
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
203
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
204
+ acceptance of support, warranty, indemnity, or other liability obligations and/or
205
+ rights consistent with this License. However, in accepting such obligations, You
206
+ may act only on Your own behalf and on Your sole responsibility, not on behalf of
207
+ any other Contributor, and only if You agree to indemnify, defend, and hold each
208
+ Contributor harmless for any liability incurred by, or claims asserted against,
209
+ such Contributor by reason of your accepting any such warranty or additional
210
+ liability.
211
+
212
+ END OF TERMS AND CONDITIONS
213
+
214
+ APPENDIX: How to apply the Apache License to your work.
215
+
216
+ To apply the Apache License to your work, attach the following boilerplate
217
+ notice, with the fields enclosed by brackets "[]" replaced with your own
218
+ identifying information. (Don't include the brackets!) The text should be
219
+ enclosed in the appropriate comment syntax for the file format. We also
220
+ recommend that a file or class name and description of purpose be included on
221
+ the same "printed page" as the copyright notice for easier identification
222
+ within third-party archives.
223
+
224
+ Copyright [yyyy] [name of copyright owner]
225
+
226
+ Licensed under the Apache License, Version 2.0 (the "License");
227
+ you may not use this file except in compliance with the License.
228
+ You may obtain a copy of the License at
229
+
230
+ http://www.apache.org/licenses/LICENSE-2.0
231
+
232
+ Unless required by applicable law or agreed to in writing, software
233
+ distributed under the License is distributed on an "AS IS" BASIS,
234
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
235
+ See the License for the specific language governing permissions and
236
+ limitations under the License.
237
+
238
+ ## B. encoding_rs WHATWG-derived data — BSD 3-Clause
239
+
240
+ Upstream files: `encoding_rs-0.8.35/COPYRIGHT` and
241
+ `encoding_rs-0.8.35/LICENSE-WHATWG`.
242
+
243
+ encoding_rs is copyright Mozilla Foundation. Its WHATWG-derived data carries
244
+ the following notice:
245
+
246
+ Copyright © WHATWG (Apple, Google, Mozilla, Microsoft).
247
+
248
+ Redistribution and use in source and binary forms, with or without
249
+ modification, are permitted provided that the following conditions are met:
250
+
251
+ 1. Redistributions of source code must retain the above copyright notice, this
252
+ list of conditions and the following disclaimer.
253
+
254
+ 2. Redistributions in binary form must reproduce the above copyright notice,
255
+ this list of conditions and the following disclaimer in the documentation
256
+ and/or other materials provided with the distribution.
257
+
258
+ 3. Neither the name of the copyright holder nor the names of its
259
+ contributors may be used to endorse or promote products derived from
260
+ this software without specific prior written permission.
261
+
262
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
263
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
264
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
265
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
266
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
267
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
268
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
269
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
270
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
271
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272
+
273
+ ## C. serde-wasm-bindgen 0.6.5 — MIT
274
+
275
+ MIT License
276
+
277
+ Copyright (c) 2019 Cloudflare, Inc.
278
+
279
+ Permission is hereby granted, free of charge, to any person obtaining a copy
280
+ of this software and associated documentation files (the "Software"), to deal
281
+ in the Software without restriction, including without limitation the rights
282
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
283
+ copies of the Software, and to permit persons to whom the Software is
284
+ furnished to do so, subject to the following conditions:
285
+
286
+ The above copyright notice and this permission notice shall be included in all
287
+ copies or substantial portions of the Software.
288
+
289
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
290
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
291
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
292
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
293
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
294
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
295
+ SOFTWARE.
296
+
297
+ ## D. slab 0.4.12 — MIT
298
+
299
+ Copyright (c) 2019 Carl Lerche
300
+
301
+ Permission is hereby granted, free of charge, to any
302
+ person obtaining a copy of this software and associated
303
+ documentation files (the "Software"), to deal in the
304
+ Software without restriction, including without
305
+ limitation the rights to use, copy, modify, merge,
306
+ publish, distribute, sublicense, and/or sell copies of
307
+ the Software, and to permit persons to whom the Software
308
+ is furnished to do so, subject to the following
309
+ conditions:
310
+
311
+ The above copyright notice and this permission notice
312
+ shall be included in all copies or substantial portions
313
+ of the Software.
314
+
315
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
316
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
317
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
318
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
319
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
320
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
321
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
322
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
323
+ DEALINGS IN THE SOFTWARE.
324
+
325
+ ## E. unicode-ident 1.0.24 data — Unicode License v3
326
+
327
+ UNICODE LICENSE V3
328
+
329
+ COPYRIGHT AND PERMISSION NOTICE
330
+
331
+ Copyright © 1991-2023 Unicode, Inc.
332
+
333
+ NOTICE TO USER: Carefully read the following legal agreement. BY
334
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
335
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
336
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
337
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
338
+
339
+ Permission is hereby granted, free of charge, to any person obtaining a
340
+ copy of data files and any associated documentation (the "Data Files") or
341
+ software and any associated documentation (the "Software") to deal in the
342
+ Data Files or Software without restriction, including without limitation
343
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
344
+ copies of the Data Files or Software, and to permit persons to whom the
345
+ Data Files or Software are furnished to do so, provided that either (a)
346
+ this copyright and permission notice appear with all copies of the Data
347
+ Files or Software, or (b) this copyright and permission notice appear in
348
+ associated Documentation.
349
+
350
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
351
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
352
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
353
+ THIRD PARTY RIGHTS.
354
+
355
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
356
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
357
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
358
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
359
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
360
+ FILES OR SOFTWARE.
361
+
362
+ Except as contained in this notice, the name of a copyright holder shall
363
+ not be used in advertising or otherwise to promote the sale, use or other
364
+ dealings in these Data Files or Software without prior written
365
+ authorization of the copyright holder.
@@ -0,0 +1,12 @@
1
+ # Third-party notices
2
+
3
+ The File Viewer integration around the CHM parser is released under Apache-2.0. The Rust/WASM implementation is based only on permissively licensed source and format research from:
4
+
5
+ - RustChm, commit `5418439a40812079b479acec40719cddedcb583c`, MIT License, Copyright (c) 2026 yeroo.
6
+ - FastChm, commit `2c22935ba0a1fc7a5a3d3d9785c970058c4d00f0`, MIT License, Copyright (c) 2026 yeroo.
7
+
8
+ The retained upstream MIT notice and detailed file provenance are recorded in
9
+ `rust/NOTICE.md` in the renderer package and as `RUST_NOTICE.md` beside the
10
+ Worker/WASM files in redistributed `vendor/chm` bundles.
11
+
12
+ No CHMLib, libmspack, chmlib-ts, libchm 0.3.0 LZX port, or other LGPL-derived implementation is distributed by this package.
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import { dirname, resolve } from 'node:path'
3
+ import { fileURLToPath } from 'node:url'
4
+ import { runFileViewerAssetPackCli } from '@file-viewer/asset-installer'
5
+
6
+ const outcome = await runFileViewerAssetPackCli(
7
+ resolve(dirname(fileURLToPath(import.meta.url)), '..'),
8
+ process.argv.slice(2)
9
+ )
10
+ process.stdout.write(
11
+ outcome.help
12
+ ? outcome.text
13
+ : `[file-viewer] Installed @file-viewer/assets-chm assets in ${outcome.result.targetDir}.\n`
14
+ )
@@ -0,0 +1,7 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "chm",
4
+ "packageName": "@file-viewer/assets-chm",
5
+ "copyGroups": ["chm"],
6
+ "receiptFilename": "file-viewer-assets-chm.receipt.json"
7
+ }