@file-viewer/assets-ppt 3.3.0 → 3.3.3
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 +3 -1
- package/README.md +3 -1
- package/README.zh-CN.md +3 -1
- package/package.json +96 -9
- package/viewer/THIRD_PARTY_LICENSES.assets.json +837 -54
- package/viewer/file-viewer-asset-pack.json +20 -31
- package/viewer/vendor/ppt/LICENSE +160 -122
- package/viewer/vendor/ppt/NOTICE.md +30 -0
- package/viewer/vendor/ppt/README.md +86 -0
- package/viewer/vendor/ppt/dist/core/binary.d.ts +31 -0
- package/viewer/vendor/ppt/dist/core/binary.js +102 -0
- package/viewer/vendor/ppt/dist/core/cfb.d.ts +38 -0
- package/viewer/vendor/ppt/dist/core/cfb.js +208 -0
- package/viewer/vendor/ppt/dist/core/crypto.d.ts +12 -0
- package/viewer/vendor/ppt/dist/core/crypto.js +64 -0
- package/viewer/vendor/ppt/dist/core/errors.d.ts +5 -0
- package/viewer/vendor/ppt/dist/core/errors.js +5 -0
- package/viewer/vendor/ppt/dist/core/inflate.d.ts +11 -0
- package/viewer/vendor/ppt/dist/core/inflate.js +337 -0
- package/viewer/vendor/ppt/dist/core/pict.d.ts +14 -0
- package/viewer/vendor/ppt/dist/core/pict.js +472 -0
- package/viewer/vendor/ppt/dist/core/raster.d.ts +7 -0
- package/viewer/vendor/ppt/dist/core/raster.js +101 -0
- package/viewer/vendor/ppt/dist/core/tiff.d.ts +20 -0
- package/viewer/vendor/ppt/dist/core/tiff.js +254 -0
- package/viewer/vendor/ppt/dist/core/utils.d.ts +9 -0
- package/viewer/vendor/ppt/dist/core/utils.js +13 -0
- package/viewer/vendor/ppt/dist/core/vector-font.d.ts +12 -0
- package/viewer/vendor/ppt/dist/core/vector-font.js +29 -0
- package/viewer/vendor/ppt/dist/core/vector.d.ts +19 -0
- package/viewer/vendor/ppt/dist/core/vector.js +1570 -0
- package/viewer/vendor/ppt/dist/core/xml-text.d.ts +1 -0
- package/viewer/vendor/ppt/dist/core/xml-text.js +6 -0
- package/viewer/vendor/ppt/dist/index.d.ts +12 -0
- package/viewer/vendor/ppt/dist/index.js +8 -0
- package/viewer/vendor/ppt/dist/layout/measure.d.ts +15 -0
- package/viewer/vendor/ppt/dist/layout/measure.js +54 -0
- package/viewer/vendor/ppt/dist/layout/text-layout.d.ts +48 -0
- package/viewer/vendor/ppt/dist/layout/text-layout.js +272 -0
- package/viewer/vendor/ppt/dist/manifest.json +13 -0
- package/viewer/vendor/ppt/dist/playback/media.d.ts +11 -0
- package/viewer/vendor/ppt/dist/playback/media.js +37 -0
- package/viewer/vendor/ppt/dist/playback/navigation.d.ts +2 -0
- package/viewer/vendor/ppt/dist/playback/navigation.js +14 -0
- package/viewer/vendor/ppt/dist/playback/timeline.d.ts +47 -0
- package/viewer/vendor/ppt/dist/playback/timeline.js +154 -0
- package/viewer/vendor/ppt/dist/playback/transitions.d.ts +14 -0
- package/viewer/vendor/ppt/dist/playback/transitions.js +41 -0
- package/viewer/vendor/ppt/dist/ppt/animation.d.ts +3 -0
- package/viewer/vendor/ppt/dist/ppt/animation.js +67 -0
- package/viewer/vendor/ppt/dist/ppt/constants.d.ts +72 -0
- package/viewer/vendor/ppt/dist/ppt/constants.js +21 -0
- package/viewer/vendor/ppt/dist/ppt/drawing.d.ts +15 -0
- package/viewer/vendor/ppt/dist/ppt/drawing.js +508 -0
- package/viewer/vendor/ppt/dist/ppt/encryption.d.ts +14 -0
- package/viewer/vendor/ppt/dist/ppt/encryption.js +241 -0
- package/viewer/vendor/ppt/dist/ppt/extras.d.ts +14 -0
- package/viewer/vendor/ppt/dist/ppt/extras.js +225 -0
- package/viewer/vendor/ppt/dist/ppt/geometry.d.ts +29 -0
- package/viewer/vendor/ppt/dist/ppt/geometry.js +448 -0
- package/viewer/vendor/ppt/dist/ppt/headers-footers.d.ts +11 -0
- package/viewer/vendor/ppt/dist/ppt/headers-footers.js +97 -0
- package/viewer/vendor/ppt/dist/ppt/interactions.d.ts +12 -0
- package/viewer/vendor/ppt/dist/ppt/interactions.js +104 -0
- package/viewer/vendor/ppt/dist/ppt/parser.d.ts +12 -0
- package/viewer/vendor/ppt/dist/ppt/parser.js +356 -0
- package/viewer/vendor/ppt/dist/ppt/pictures.d.ts +10 -0
- package/viewer/vendor/ppt/dist/ppt/pictures.js +215 -0
- package/viewer/vendor/ppt/dist/ppt/records.d.ts +13 -0
- package/viewer/vendor/ppt/dist/ppt/records.js +49 -0
- package/viewer/vendor/ppt/dist/ppt/text.d.ts +19 -0
- package/viewer/vendor/ppt/dist/ppt/text.js +789 -0
- package/viewer/vendor/ppt/dist/pptjs.browser.js +9651 -0
- package/viewer/vendor/ppt/dist/pptjs.mjs +9663 -0
- package/viewer/vendor/ppt/dist/pptjs.worker.js +9650 -0
- package/viewer/vendor/ppt/dist/render/effects.d.ts +23 -0
- package/viewer/vendor/ppt/dist/render/effects.js +125 -0
- package/viewer/vendor/ppt/dist/render/fields.d.ts +11 -0
- package/viewer/vendor/ppt/dist/render/fields.js +176 -0
- package/viewer/vendor/ppt/dist/render/geometry.d.ts +11 -0
- package/viewer/vendor/ppt/dist/render/geometry.js +131 -0
- package/viewer/vendor/ppt/dist/render/safe.d.ts +12 -0
- package/viewer/vendor/ppt/dist/render/safe.js +48 -0
- package/viewer/vendor/ppt/dist/render/svg.d.ts +4 -0
- package/viewer/vendor/ppt/dist/render/svg.js +279 -0
- package/viewer/vendor/ppt/dist/render/text.d.ts +9 -0
- package/viewer/vendor/ppt/dist/render/text.js +181 -0
- package/viewer/vendor/ppt/dist/render/three-d.d.ts +32 -0
- package/viewer/vendor/ppt/dist/render/three-d.js +219 -0
- package/viewer/vendor/ppt/dist/render/wordart.d.ts +16 -0
- package/viewer/vendor/ppt/dist/render/wordart.js +214 -0
- package/viewer/vendor/ppt/dist/runtime.d.ts +125 -0
- package/viewer/vendor/ppt/dist/runtime.js +226 -0
- package/viewer/vendor/ppt/dist/types.d.ts +546 -0
- package/viewer/vendor/ppt/dist/types.js +1 -0
- package/viewer/vendor/ppt/dist/viewer.d.ts +3 -0
- package/viewer/vendor/ppt/dist/viewer.js +264 -0
- package/viewer/vendor/ppt/dist/worker-client.d.ts +25 -0
- package/viewer/vendor/ppt/dist/worker-client.js +61 -0
- package/viewer/vendor/ppt/dist/worker.d.ts +1 -0
- package/viewer/vendor/ppt/dist/worker.js +25 -0
- package/viewer/vendor/ppt/package.json +40 -52
- package/viewer/vendor/ppt/NOTICE +0 -229
- package/viewer/vendor/ppt/frame-cache.mjs +0 -731
- package/viewer/vendor/ppt/index.mjs +0 -941
- package/viewer/vendor/ppt/manifest.json +0 -44
- package/viewer/vendor/ppt/ppt-font-cjk.otf +0 -0
- package/viewer/vendor/ppt/ppt-native.wasm +0 -0
- package/viewer/vendor/ppt/worker.mjs +0 -1720
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"packageName": "@file-viewer/assets-ppt",
|
|
4
|
-
"packageVersion": "3.3.
|
|
4
|
+
"packageVersion": "3.3.3",
|
|
5
5
|
"copyGroups": [
|
|
6
6
|
"office-presentation-binary"
|
|
7
7
|
],
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"kind": "script",
|
|
17
17
|
"target": "public",
|
|
18
18
|
"required": true,
|
|
19
|
-
"defaultPath": "vendor/ppt/
|
|
19
|
+
"defaultPath": "vendor/ppt/dist/pptjs.mjs",
|
|
20
20
|
"optionPath": "presentation.pptModuleUrl",
|
|
21
|
-
"description": "
|
|
21
|
+
"description": "Self-hosted TypeScript PPT standalone module for PowerPoint 97–2003 preview."
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"id": "ppt-worker",
|
|
@@ -26,38 +26,18 @@
|
|
|
26
26
|
"kind": "worker",
|
|
27
27
|
"target": "public",
|
|
28
28
|
"required": true,
|
|
29
|
-
"defaultPath": "vendor/ppt/worker.
|
|
29
|
+
"defaultPath": "vendor/ppt/dist/pptjs.worker.js",
|
|
30
30
|
"optionPath": "presentation.pptWorkerUrl",
|
|
31
|
-
"description": "
|
|
31
|
+
"description": "TypeScript PPT parsing Worker; layout and Canvas rendering use the main thread."
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"id": "ppt-
|
|
34
|
+
"id": "ppt-runtime-dist",
|
|
35
35
|
"rendererId": "office-presentation-binary",
|
|
36
|
-
"kind": "
|
|
36
|
+
"kind": "directory",
|
|
37
37
|
"target": "public",
|
|
38
38
|
"required": true,
|
|
39
|
-
"defaultPath": "vendor/ppt/
|
|
40
|
-
"description": "
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"id": "ppt-wasm",
|
|
44
|
-
"rendererId": "office-presentation-binary",
|
|
45
|
-
"kind": "wasm",
|
|
46
|
-
"target": "public",
|
|
47
|
-
"required": true,
|
|
48
|
-
"defaultPath": "vendor/ppt/ppt-native.wasm",
|
|
49
|
-
"optionPath": "presentation.pptWasmUrl",
|
|
50
|
-
"description": "Official @file-viewer/ppt 0.3 native WebAssembly parser and renderer."
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"id": "ppt-cjk-font",
|
|
54
|
-
"rendererId": "office-presentation-binary",
|
|
55
|
-
"kind": "font",
|
|
56
|
-
"target": "public",
|
|
57
|
-
"required": true,
|
|
58
|
-
"defaultPath": "vendor/ppt/ppt-font-cjk.otf",
|
|
59
|
-
"optionPath": "presentation.pptFontUrl",
|
|
60
|
-
"description": "CJK font pack verified and loaded by the binary-PPT runtime."
|
|
39
|
+
"defaultPath": "vendor/ppt/dist",
|
|
40
|
+
"description": "Unmodified compiled JavaScript and declarations from the installed PPT package."
|
|
61
41
|
},
|
|
62
42
|
{
|
|
63
43
|
"id": "ppt-runtime-manifest",
|
|
@@ -65,7 +45,7 @@
|
|
|
65
45
|
"kind": "metadata",
|
|
66
46
|
"target": "public",
|
|
67
47
|
"required": true,
|
|
68
|
-
"defaultPath": "vendor/ppt/manifest.json",
|
|
48
|
+
"defaultPath": "vendor/ppt/dist/manifest.json",
|
|
69
49
|
"description": "Integrity and edition metadata for the official binary-PPT runtime."
|
|
70
50
|
},
|
|
71
51
|
{
|
|
@@ -77,6 +57,15 @@
|
|
|
77
57
|
"defaultPath": "vendor/ppt/package.json",
|
|
78
58
|
"description": "Package identity metadata for the official binary-PPT runtime."
|
|
79
59
|
},
|
|
60
|
+
{
|
|
61
|
+
"id": "ppt-runtime-readme",
|
|
62
|
+
"rendererId": "office-presentation-binary",
|
|
63
|
+
"kind": "metadata",
|
|
64
|
+
"target": "public",
|
|
65
|
+
"required": true,
|
|
66
|
+
"defaultPath": "vendor/ppt/README.md",
|
|
67
|
+
"description": "Usage and supported-format limits shipped with the PPT runtime."
|
|
68
|
+
},
|
|
80
69
|
{
|
|
81
70
|
"id": "ppt-runtime-license",
|
|
82
71
|
"rendererId": "office-presentation-binary",
|
|
@@ -92,7 +81,7 @@
|
|
|
92
81
|
"kind": "license",
|
|
93
82
|
"target": "public",
|
|
94
83
|
"required": true,
|
|
95
|
-
"defaultPath": "vendor/ppt/NOTICE",
|
|
84
|
+
"defaultPath": "vendor/ppt/NOTICE.md",
|
|
96
85
|
"description": "Notices shipped by the independently versioned @file-viewer/ppt package."
|
|
97
86
|
}
|
|
98
87
|
]
|
|
@@ -1,122 +1,160 @@
|
|
|
1
|
-
|
|
2
|
-
Version 2.0,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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
|
+
Copyright 2026 Flyfish Viewer
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Source and distribution notice
|
|
2
|
+
|
|
3
|
+
Copyright 2026 Flyfish. The published TypeScript PPT runtime is distributed under Apache-2.0. The development source repository remains private. The public npm archive contains compiled JavaScript, declarations, this notice and the license; it does not contain TypeScript implementation files, source maps, private QA reports, documents or fonts. This grant does not apply to previous native/WASM package versions, which retain their original licenses.
|
|
4
|
+
|
|
5
|
+
The following foundation originated in the user's `flyfish-dev/msdoc-viewer` repository, main commit `a42f4a28cad75db19021ef70eaa8c10548e0eb26`, retrieved for this task:
|
|
6
|
+
|
|
7
|
+
- Binary reader and utility conventions used by `src/core/binary.ts`, `utils.ts`, `xml-text.ts`.
|
|
8
|
+
- Pure TypeScript DEFLATE code used by `src/core/inflate.ts`, with explicit output limits and exact-size/checksum validation added in this delivery.
|
|
9
|
+
- WMF/EMF-to-SVG conversion and vector font helpers used by `src/core/vector.ts` and `vector-font.ts`, with additional record, allocation and output bounds, bitmap transforms, alpha handling and SVG image-link compatibility in this delivery. The reused converter and its new extensions remain partial implementations of the metafile formats.
|
|
10
|
+
- Architecture and small geometry conventions from the project's container, worker, model, preset and shape-geometry modules. The new PPT container/persist/text/drawing logic was not copied from a legacy PowerPoint engine.
|
|
11
|
+
|
|
12
|
+
Exact origin paths, destination paths and local hashes are recorded in `docs/provenance.json`. The reuse is intentional and authorized by the user's instruction to base this work on msdoc-viewer; it is not presented as independently authored foundation code.
|
|
13
|
+
|
|
14
|
+
Microsoft Open Specifications are the normative PPT/CFB/OfficeArt/crypto format sources. TIFF and PICT use the original Aldus TIFF 6.0 and Apple Inside Macintosh QuickDraw specifications. SVG output follows the relevant W3C SVG specification; the Base64 encoder was independently authored from RFC 4648's alphabet, bit grouping and padding rules and checked against its standard test vectors. Links and field notes appear in `docs/spec-notes.md`, `docs/officeart.md`, `docs/renderer.md`, `docs/images.md` and `docs/encryption.md`. The specifications and their reference implementations are not redistributed as part of this source bundle.
|
|
15
|
+
|
|
16
|
+
Independent test documents from the Apache POI test-data collection were used as black-box inputs. No POI parser source files were fetched or used to implement this parser, and no third-party parser code was copied or translated. Their original document bytes are excluded from this delivery; provenance identifiers and validation outcomes are retained. Authorized private inputs include native binary `.ppt` and `.pot` files and a larger binary `.ppt` produced by LibreOffice from a PPTX solely for testing. This converted case is identified separately from native inputs; it does not add PPTX support to the product. Original and converted private documents, their page images and full requested-to-resolved font manifests remain outside the repository and package. `fixtures/showcase.ppt`, `fixtures/playback.ppt`, their PNG/PCM media, raster patterns and handcrafted encrypted fixtures were authored by the included independent fixture writers.
|
|
17
|
+
|
|
18
|
+
## External QA tools and distribution boundary
|
|
19
|
+
|
|
20
|
+
The following tools operate outside the production TypeScript implementation:
|
|
21
|
+
|
|
22
|
+
- **LibreOffice** is a black-box executable for test conversion and independent reference exports. Its implementation source was not read, copied or translated into this parser or renderer.
|
|
23
|
+
- **`@napi-rs/canvas`** supplies native Canvas measurements only to an explicitly selected external Node QA adapter. The adapter and native package are not bundled or required by the viewer.
|
|
24
|
+
- **Noto CJK, other system fallback fonts and Fontconfig** provide the QA environment's actual font files and family resolution. These fonts can differ from the document's requested fonts and PowerPoint's environment. No font binaries are shipped with the product.
|
|
25
|
+
- **Inkscape** exports SVG to PNG for limited visual inspection. Its consumer-specific rendering limitations, including the observed nested SVG clipping issue, are not browser or PowerPoint acceptance evidence.
|
|
26
|
+
- **Pillow** is an independent TIFF test encoder and pixel reference. It is not runtime code or a runtime dependency.
|
|
27
|
+
|
|
28
|
+
`package.json` declares no production, optional, peer or bundled dependencies. TypeScript, Playwright and the consumer build tools are development dependencies only. The public package allowlist contains compiled modules, declarations, README and license notices. It excludes development tools, source maps, TypeScript implementation files, QA adapters, native libraries, font binaries, private inputs, reference images and internal documentation. The private repository retains the engineering provenance and regression records.
|
|
29
|
+
|
|
30
|
+
This project's production runtime does not include or depend on the existing pptjs native/WASM engine, third-party PowerPoint parsers, proprietary Office binaries, external QA tools or font binaries. The cleanroom engineering claim is limited to independently implementing PPT-specific logic from documented format information, with the above reused foundation and black-box validation disclosed. It is not a legal certification or a separately audited two-team cleanroom process. Source provenance, successful parsing and agreement with an external QA renderer do not establish complete specification coverage or PowerPoint pixel equivalence; the implementation and evidence boundaries are tracked in `docs/spec-coverage.json` and `docs/spec-coverage.md`.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# @file-viewer/ppt
|
|
2
|
+
|
|
3
|
+
浏览器内预览 PowerPoint 97–2003 二进制 `.ppt` / `.pot`。纯 TypeScript 实现,运行时零 npm 依赖,支持自托管和离线使用,无需 WASM、Office 或服务端转换。
|
|
4
|
+
|
|
5
|
+
公共 npm 包采用 Apache-2.0,可免费用于个人、商业和生产项目。源码仓库暂时保持私有;[公开分发仓](https://github.com/flyfish-dev/pptjs)只提供编译包与发布工作流。包内提供编译后的 JavaScript、类型声明和许可证,不包含 TypeScript 源文件、源映射、客户文件或字体。此许可只适用于本 TypeScript 实现,不改变旧版原生 WASM 包的许可。
|
|
6
|
+
|
|
7
|
+
Browser preview for legacy binary PowerPoint files. The published runtime is freely usable under Apache-2.0; the development repository remains private. This is a preview engine with documented limits, not a complete PowerPoint implementation.
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @file-viewer/ppt
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Vanilla / 浏览器预览
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createSlideViewer } from '@file-viewer/ppt';
|
|
19
|
+
|
|
20
|
+
const viewer = createSlideViewer(document.querySelector('#presentation')!, {
|
|
21
|
+
worker: true,
|
|
22
|
+
onError: error => console.error(error),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
await viewer.load(file); // File / Blob / ArrayBuffer / ArrayBufferView
|
|
26
|
+
viewer.goTo(0); // 从 0 开始
|
|
27
|
+
viewer.next();
|
|
28
|
+
viewer.previous();
|
|
29
|
+
viewer.destroy(); // SPA 卸载时释放资源
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
宿主需要明确尺寸,例如 `width:100%; height:70vh`。直接部署 ESM 时保留完整 `dist/`;解析 Worker 使用相邻的独立 `pptjs.worker.js`。自定义部署可显式设置 `workerUrl`,使用导出入口 `@file-viewer/ppt/worker.mjs`。不使用公共 CDN 或远程字体。
|
|
33
|
+
|
|
34
|
+
`createPptViewer(container, options)` 也保留此单页 SVG 接口。`play()`、`pause()`、`advance()` 和 `setPlaybackEnabled()` 提供受支持的旧式动画、过渡和手动媒体播放;现代完整动画时间线尚不支持。
|
|
35
|
+
|
|
36
|
+
## 兼容现有 Canvas 接口
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { createPptViewer } from '@file-viewer/ppt';
|
|
40
|
+
|
|
41
|
+
const runtime = await createPptViewer({ worker: 'auto' });
|
|
42
|
+
const mounted = await runtime.mount('#presentation', bytes, {
|
|
43
|
+
virtualize: true,
|
|
44
|
+
scale: 1,
|
|
45
|
+
pixelRatio: 1,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
await mounted.renderSlide(0);
|
|
49
|
+
const png = mounted.canvases[0].toDataURL('image/png');
|
|
50
|
+
await mounted.close();
|
|
51
|
+
await runtime.close();
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`loadPptViewer(options)` 与 options-only 的 `createPptViewer(options)` 等价。也可使用 `runtime.open(bytes)`,再调用 `document.renderSlide(index, canvas, {scale, pixelRatio})`、`releaseSlide(index)` 和 `close()`。默认不分离调用者的输入缓冲区;仅显式设置 `transferInputOwnership: true` 才转移完整 ArrayBuffer 的所有权。
|
|
55
|
+
|
|
56
|
+
Worker 负责解析,SVG 布局和 Canvas 快照使用浏览器字体与主线程绘图。`mode: 'worker'` 描述解析方式。运行时提供取消、虚拟滚动、离屏 Canvas 释放和 PNG 导出;不使用旧版原生引擎或其持久帧缓存。`cacheStats()` 如实返回禁用缓存和零 WASM 内存。
|
|
57
|
+
|
|
58
|
+
## 从 0.3.x 原生包迁移
|
|
59
|
+
|
|
60
|
+
1.0.x 替换了底层引擎。现有 `open` / `mount` / Canvas 生命周期接口保留,同时新增模型解析和单页 SVG 查看接口。
|
|
61
|
+
|
|
62
|
+
- 移除旧部署中的 WASM、内置字体与原生许可证配置。`wasmUrl`、`fontUrl` 和 `cache` 参数暂时接受,但新引擎不加载这些资源。
|
|
63
|
+
- 旧的 `ppt-native.wasm` 和 `ppt-font-cjk.otf` 导出不再提供。`worker.mjs` 导出现在指向纯 JavaScript Worker。
|
|
64
|
+
- 不要求旧原生包的水印。不得据此修改或移除旧包已有的水印或许可限制。
|
|
65
|
+
- 公共类型 `PptDocument` 表示兼容 Canvas 文档;解析模型类型为 `ParsedPptDocument`。
|
|
66
|
+
|
|
67
|
+
## 解析与 SVG 输出
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
import { parsePpt, renderSlide } from '@file-viewer/ppt';
|
|
71
|
+
|
|
72
|
+
const model = parsePpt(bytes, { password: suppliedPassword });
|
|
73
|
+
const { html, css, warnings } = renderSlide(model, 0);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
仅处理调用者传入的本地字节。外部链接不会自动加载,嵌入的 OLE 程序不会执行。加密文件仅尝试调用者提供的打开密码。错误及未支持的内容通过结构化错误或诊断返回。
|
|
77
|
+
|
|
78
|
+
## 支持范围
|
|
79
|
+
|
|
80
|
+
支持幻灯片顺序、母版与主题颜色、文本和段落、图片裁剪与透明度、嵌套组、常用预设几何、自定义路径和圆弧、渐变、部分阴影、EMF/WMF 预览,以及部分旧式播放效果。复合路径按各次绘制的填充、描边状态输出,组内的普通描边保留物理宽度。图案填充按前景/背景色绘制,使用原始像素周期平铺。
|
|
81
|
+
|
|
82
|
+
字体由宿主提供。缺失字体会改变字重、换行和基线。复杂艺术字、3D 材质、部分形状公式、现代动画、复杂脚本及嵌入应用行为仍有限制;不能将成功解析或测试通过解释为完整保真。PPTX 和编辑保存不属于此包范围。诊断可从解析模型或 `renderSlide()` 返回值读取。
|
|
83
|
+
|
|
84
|
+
支持现代浏览器;Worker、Canvas 与所用字体的实际支持取决于宿主环境。辅助阅读、搜索可使用解析模型,静态预览可使用 SVG 查看接口,打印和截图可使用 Canvas 接口。
|
|
85
|
+
|
|
86
|
+
文档与集成说明:[File Viewer 文档](https://doc.file-viewer.app/guide/on-demand-renderers)。支持入口:[Flyfish](https://dev.flyfish.group/shop)。
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { BinaryInput } from '../types.js';
|
|
2
|
+
type ReaderMethod = ((offset: number) => number) & {
|
|
3
|
+
byteWidth?: number;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Lightweight little-endian binary reader used across the MS-DOC parser.
|
|
7
|
+
* The implementation intentionally returns neutral defaults for out-of-range
|
|
8
|
+
* reads so upper layers can stay resilient to slightly malformed documents.
|
|
9
|
+
*/
|
|
10
|
+
export declare class BinaryReader {
|
|
11
|
+
readonly bytes: Uint8Array;
|
|
12
|
+
readonly view: DataView;
|
|
13
|
+
readonly length: number;
|
|
14
|
+
constructor(input: BinaryInput);
|
|
15
|
+
ensure(offset: number, size?: number): boolean;
|
|
16
|
+
u8(offset: number): number;
|
|
17
|
+
i8(offset: number): number;
|
|
18
|
+
u16(offset: number): number;
|
|
19
|
+
i16(offset: number): number;
|
|
20
|
+
u32(offset: number): number;
|
|
21
|
+
i32(offset: number): number;
|
|
22
|
+
u64(offset: number): number;
|
|
23
|
+
slice(offset: number, length: number): Uint8Array;
|
|
24
|
+
array(offset: number, count: number, readFn: ReaderMethod): number[];
|
|
25
|
+
utf16le(offset: number, byteLength: number): string;
|
|
26
|
+
latin1(offset: number, byteLength: number): string;
|
|
27
|
+
ascii(offset: number, byteLength: number): string;
|
|
28
|
+
utf16z(offset: number, byteLength: number): string;
|
|
29
|
+
}
|
|
30
|
+
export declare function toUint8Array(input: BinaryInput): Uint8Array;
|
|
31
|
+
export {};
|