@extend-ai/react-pptx 0.2.4 → 0.2.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @extend-ai/react-pptx
2
2
 
3
+ ## 0.2.5
4
+
5
+ - Refresh the shared Rust parser and OfficeArt renderer for cached SmartArt shapes, pictures, effects, and charts.
6
+ - Render saved SmartArt text frames independently, preserve authoritative cached labels, and resolve cached drawings across relationship scopes.
7
+ - Add the opt-in `include3dModels` parser option for original 3D model assets and scene metadata while retaining cached preview rendering.
8
+
3
9
  ## 0.2.3
4
10
 
5
11
  - Use the Rust Office crates by Extend and refresh the bundled WebAssembly.
package/README.md CHANGED
@@ -189,6 +189,12 @@ return (
189
189
  `usePptxViewer` exposes the reactive navigation/search/zoom controller. `onViewportReady`
190
190
  provides the internal slide surface for advanced integrations and test harnesses.
191
191
 
192
+ ## OfficeArt visuals
193
+
194
+ Pictures, supported shapes, connectors, and saved SmartArt drawings use the shared Rust OfficeArt renderer. SmartArt text retains its saved text frame separately from the shape frame, including independent offsets, dimensions, rotation, and flips. Semantic data without a supported saved drawing remains an explicit layout fallback.
195
+
196
+ `parsePresentation(source, { include3dModels: true })` includes original embedded 3D model bytes and content type, model and preview relationships, and scene XML in `ImageNode.model3d`. The option also works through `ReactPptxViewer`'s `parseOptions` and the parsing hook. It defaults to `false`; cached Office raster previews remain the rendered appearance. This metadata does not add an interactive 3D renderer.
197
+
192
198
  ## Cold-start thumbnails
193
199
 
194
200
  `createPptxThumbnailRenderer` renders directly from a `ParsedPresentation`; it does not mount or
@@ -0,0 +1,268 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
203
+
204
+
205
+ APACHE POI SUBCOMPONENTS:
206
+
207
+ Apache POI includes subcomponents with separate copyright notices and
208
+ license terms. Your use of these subcomponents is subject to the terms
209
+ and conditions of the following licenses:
210
+
211
+
212
+ Office Open XML schemas (poi-ooxml-full-*.jar)
213
+
214
+ The Office Open XML schema definitions used by Apache POI are
215
+ a part of the Office Open XML ECMA Specification (ECMA-376, [1]).
216
+ As defined in section 9.4 of the ECMA bylaws [2], this specification
217
+ is available to all interested parties without restriction:
218
+
219
+ 9.4 All documents when approved shall be made available to
220
+ all interested parties without restriction.
221
+
222
+ Furthermore, both Microsoft and Adobe have granted patent licenses
223
+ to this work [3,4,5].
224
+
225
+ [1] https://www.ecma-international.org/publications/standards/Ecma-376.htm
226
+ [2] https://www.ecma-international.org/memento/Ecmabylaws.htm
227
+ [3] https://www.microsoft.com/openspecifications/en/us/programs/osp/default.aspx
228
+ [4] https://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/
229
+ Patent%20statements%20ok/ECMA-376%20Edition%202%20Microsoft%20Patent%20Declaration.pdf
230
+ [5] https://www.ecma-international.org/publications/files/ECMA-ST/Ecma%20PATENT/
231
+ Patent%20statements%20ok/ECMA-376%20Adobe%20Patent%20Declaration.pdf
232
+
233
+
234
+ org.apache.poi.util.ReplacingInputStream is based on code from
235
+ inbot-utils (https://github.com/Inbot/inbot-utils)
236
+
237
+ The MIT License (MIT)
238
+
239
+ Copyright (c) 2015 Inbot
240
+
241
+ Permission is hereby granted, free of charge, to any person obtaining a copy
242
+ of this software and associated documentation files (the "Software"), to deal
243
+ in the Software without restriction, including without limitation the rights
244
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
245
+ copies of the Software, and to permit persons to whom the Software is
246
+ furnished to do so, subject to the following conditions:
247
+
248
+ The above copyright notice and this permission notice shall be included in all
249
+ copies or substantial portions of the Software.
250
+
251
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
252
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
253
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
254
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
255
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
256
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
257
+ SOFTWARE.
258
+
259
+ ExceptionUtils is derived from `scala.util.control.NonFatal` in scala-library
260
+ which was released under the Apache 2.0 license.
261
+ Copyright (c) 2002-2023 EPFL
262
+ Copyright (c) 2011-2023 Lightbend, Inc.
263
+
264
+ The POI Source Release bundles the Gradle Wrapper. (https://docs.gradle.org/current/userguide/gradle_wrapper.html)
265
+ This is released under the Apache License, v2.0.
266
+ Copyright © 2015-2021 the original authors.
267
+
268
+ The wrapper.gradle file was developed by the Apache Kafka project and is released under the Apache License, v2.0.
@@ -0,0 +1,36 @@
1
+ Apache POI
2
+ Copyright 2003-2025 The Apache Software Foundation
3
+
4
+ This product includes software developed at
5
+ The Apache Software Foundation (https://www.apache.org/).
6
+
7
+ This product contains parts that were originally based on software from BEA.
8
+ Copyright (c) 2000-2003, BEA Systems, <http://www.bea.com/> (dead link),
9
+ which was acquired by Oracle Corporation in 2008.
10
+ <http://www.oracle.com/us/corporate/Acquisitions/bea/index.html>
11
+ <https://en.wikipedia.org/wiki/BEA_Systems>
12
+ Note: The ASF Secretary has on hand a Software Grant Agreement (SGA) from
13
+ BEA Systems, Inc. dated 9 Sep 2003 for XMLBeans signed by their EVP/CFO.
14
+
15
+ This product contains W3C XML Schema documents. Copyright 2001-2003 (c)
16
+ World Wide Web Consortium (Massachusetts Institute of Technology, European
17
+ Research Consortium for Informatics and Mathematics, Keio University)
18
+
19
+ This product contains the chunks_parse_cmds.tbl file from the vsdump program.
20
+ Copyright (C) 2006-2007 Valek Filippov (frob@df.ru)
21
+
22
+ This product contains parts of the eID Applet project
23
+ <http://eid-applet.googlecode.com> and <https://github.com/e-Contract/eid-applet>.
24
+ Copyright (c) 2009-2018
25
+ FedICT (federal ICT department of Belgium), e-Contract.be BVBA (https://www.e-contract.be),
26
+ Bart Hanssens from FedICT
27
+
28
+ ExceptionUtils is derived from `scala.util.control.NonFatal` in scala-library
29
+ which was released under the Apache 2.0 license.
30
+
31
+ Copyright (c) 2002-2023 EPFL
32
+ Copyright (c) 2011-2023 Lightbend, Inc.
33
+
34
+ Scala includes software developed at
35
+ LAMP/EPFL (https://lamp.epfl.ch/) and
36
+ Lightbend, Inc. (https://www.lightbend.com/).
@@ -0,0 +1,13 @@
1
+ # Preset geometry data
2
+
3
+ Source: [Apache POI](https://github.com/apache/poi/blob/338882ac8898df5c13a7d15f533204c5dd8607d6/poi/src/main/resources/org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml), revision `338882ac8898df5c13a7d15f533204c5dd8607d6`.
4
+
5
+ Original path: `poi/src/main/resources/org/apache/poi/sl/draw/geom/presetShapeDefinitions.xml`.
6
+
7
+ The XML is retained unchanged. Apache POI license and notice are included alongside it.
8
+
9
+ SHA-256: `4a762444d8d85876881c02a5b1dedf6f73006fcd8acb7b4e393435615b37c780`.
10
+
11
+ The data contains 187 preset definitions. The evaluator accepts the standard guide operators, adjustment overrides, multiple paths, per-path fill and stroke modes, polar elliptical arcs, and quadratic/cubic segments. Geometry coordinates use EMUs unless a path declares its own coordinate dimensions. Bounds include Bézier control points and therefore can conservatively exceed the painted curve.
12
+
13
+ Evaluation limits are 1 MiB of supplied XML, 1,024 guide evaluations, 256 paths, and 8,192 path commands. Arc sweeps are limited to 16 revolutions; values must remain finite and rendered coordinates must not exceed 100,000,000 pixels. Invalid geometry returns no result. Adjustment handles, connection-site metadata, and inscribed text rectangles are retained in the preset data but are not part of the current path-returning API.
@@ -2,9 +2,17 @@
2
2
 
3
3
  ## PowerPoint parsing and chart rendering
4
4
 
5
- The browser runtime bundles the PowerPoint parser and chart renderer from
6
- [rust-office](https://github.com/extend-hq/rust-office). Its MIT license
7
- is included in the published package at `THIRD_PARTY_LICENSES/rust-office.txt`.
5
+ The browser runtime bundles the PowerPoint parser, shared OfficeArt renderer,
6
+ and chart renderer from [rust-office](https://github.com/extend-hq/rust-office).
7
+ Their MIT license is included in the published package at
8
+ `THIRD_PARTY_LICENSES/extend-office.txt`.
9
+
10
+ The shared OfficeArt renderer includes preset geometry definitions from
11
+ [Apache POI](https://poi.apache.org/) under the Apache License 2.0.
12
+ The published package includes the upstream license, notice, and source revision
13
+ information at `THIRD_PARTY_LICENSES/apache-poi-LICENSE.txt`,
14
+ `THIRD_PARTY_LICENSES/apache-poi-NOTICE.txt`, and
15
+ `THIRD_PARTY_LICENSES/apache-poi-SOURCE.md`.
8
16
 
9
17
  The React chart renderer and chart model builder used for fallback rendering
10
18
  are vendored from [`@extend-ai/react-xlsx`](https://github.com/extend-hq/react-xlsx) (MIT).
@@ -47,12 +47,12 @@ function detect_presentation_format(bytes) {
47
47
  wasm.__wbindgen_export3(deferred3_0, deferred3_1, 1);
48
48
  }
49
49
  }
50
- function parse_presentation(bytes) {
50
+ function parse_presentation(bytes, options) {
51
51
  try {
52
52
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
53
53
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
54
54
  const len0 = WASM_VECTOR_LEN;
55
- wasm.parse_presentation(retptr, ptr0, len0);
55
+ wasm.parse_presentation(retptr, ptr0, len0, isLikeNone(options) ? 0 : addHeapObject(options));
56
56
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
57
57
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
58
58
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -78,10 +78,57 @@ function __wbg_get_imports() {
78
78
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
79
79
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
80
80
  },
81
+ __wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
82
+ const v = getObject(arg0);
83
+ const ret = typeof v === "boolean" ? v : void 0;
84
+ return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
85
+ },
86
+ __wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
87
+ const ret = debugString(getObject(arg1));
88
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
89
+ const len1 = WASM_VECTOR_LEN;
90
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
91
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
92
+ },
93
+ __wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
94
+ const ret = getObject(arg0) in getObject(arg1);
95
+ return ret;
96
+ },
97
+ __wbg___wbindgen_is_null_ea9085d691f535d3: function(arg0) {
98
+ const ret = getObject(arg0) === null;
99
+ return ret;
100
+ },
101
+ __wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
102
+ const val = getObject(arg0);
103
+ const ret = typeof val === "object" && val !== null;
104
+ return ret;
105
+ },
81
106
  __wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
82
107
  const ret = typeof getObject(arg0) === "string";
83
108
  return ret;
84
109
  },
110
+ __wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
111
+ const ret = getObject(arg0) === void 0;
112
+ return ret;
113
+ },
114
+ __wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
115
+ const ret = getObject(arg0) == getObject(arg1);
116
+ return ret;
117
+ },
118
+ __wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
119
+ const obj = getObject(arg1);
120
+ const ret = typeof obj === "number" ? obj : void 0;
121
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
122
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
123
+ },
124
+ __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
125
+ const obj = getObject(arg1);
126
+ const ret = typeof obj === "string" ? obj : void 0;
127
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
128
+ var len1 = WASM_VECTOR_LEN;
129
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
130
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
131
+ },
85
132
  __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
86
133
  throw new Error(getStringFromWasm0(arg0, arg1));
87
134
  },
@@ -89,6 +136,34 @@ function __wbg_get_imports() {
89
136
  const ret = Array.from(getObject(arg0));
90
137
  return addHeapObject(ret);
91
138
  },
139
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
140
+ const ret = getObject(arg0)[getObject(arg1)];
141
+ return addHeapObject(ret);
142
+ },
143
+ __wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
144
+ let result;
145
+ try {
146
+ result = getObject(arg0) instanceof ArrayBuffer;
147
+ } catch (_) {
148
+ result = false;
149
+ }
150
+ const ret = result;
151
+ return ret;
152
+ },
153
+ __wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
154
+ let result;
155
+ try {
156
+ result = getObject(arg0) instanceof Uint8Array;
157
+ } catch (_) {
158
+ result = false;
159
+ }
160
+ const ret = result;
161
+ return ret;
162
+ },
163
+ __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
164
+ const ret = getObject(arg0).length;
165
+ return ret;
166
+ },
92
167
  __wbg_new_32b398fb48b6d94a: function() {
93
168
  const ret = new Array();
94
169
  return addHeapObject(ret);
@@ -105,6 +180,9 @@ function __wbg_get_imports() {
105
180
  const ret = new Object();
106
181
  return addHeapObject(ret);
107
182
  },
183
+ __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
184
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
185
+ },
108
186
  __wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
109
187
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
110
188
  return addHeapObject(ret);
@@ -155,6 +233,62 @@ function addHeapObject(obj) {
155
233
  heap[idx] = obj;
156
234
  return idx;
157
235
  }
236
+ function debugString(val) {
237
+ const type = typeof val;
238
+ if (type == "number" || type == "boolean" || val == null) {
239
+ return `${val}`;
240
+ }
241
+ if (type == "string") {
242
+ return `"${val}"`;
243
+ }
244
+ if (type == "symbol") {
245
+ const description = val.description;
246
+ if (description == null) {
247
+ return "Symbol";
248
+ } else {
249
+ return `Symbol(${description})`;
250
+ }
251
+ }
252
+ if (type == "function") {
253
+ const name = val.name;
254
+ if (typeof name == "string" && name.length > 0) {
255
+ return `Function(${name})`;
256
+ } else {
257
+ return "Function";
258
+ }
259
+ }
260
+ if (Array.isArray(val)) {
261
+ const length = val.length;
262
+ let debug = "[";
263
+ if (length > 0) {
264
+ debug += debugString(val[0]);
265
+ }
266
+ for (let i = 1; i < length; i++) {
267
+ debug += ", " + debugString(val[i]);
268
+ }
269
+ debug += "]";
270
+ return debug;
271
+ }
272
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
273
+ let className;
274
+ if (builtInMatches && builtInMatches.length > 1) {
275
+ className = builtInMatches[1];
276
+ } else {
277
+ return toString.call(val);
278
+ }
279
+ if (className == "Object") {
280
+ try {
281
+ return "Object(" + JSON.stringify(val) + ")";
282
+ } catch (_) {
283
+ return "Object";
284
+ }
285
+ }
286
+ if (val instanceof Error) {
287
+ return `${val.name}: ${val.message}
288
+ ${val.stack}`;
289
+ }
290
+ return className;
291
+ }
158
292
  function dropObject(idx) {
159
293
  if (idx < 1028) return;
160
294
  heap[idx] = heap_next;
@@ -182,6 +316,9 @@ function getUint8ArrayMemory0() {
182
316
  function getObject(idx) {
183
317
  return heap[idx];
184
318
  }
319
+ function isLikeNone(x) {
320
+ return x === void 0 || x === null;
321
+ }
185
322
  function passArray8ToWasm0(arg, malloc) {
186
323
  const ptr = malloc(arg.length * 1, 1) >>> 0;
187
324
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -357,10 +494,10 @@ async function initWasm(nextSource) {
357
494
  })();
358
495
  await runtimePromise;
359
496
  }
360
- async function parsePresentation(bytes) {
497
+ async function parsePresentation(bytes, options) {
361
498
  await initWasm();
362
499
  const runtime = await runtimePromise;
363
- return runtime.parse_presentation(bytes);
500
+ return runtime.parse_presentation(bytes, options);
364
501
  }
365
502
  async function detectPresentationFormat(bytes) {
366
503
  await initWasm();
@@ -369,5 +506,5 @@ async function detectPresentationFormat(bytes) {
369
506
  }
370
507
 
371
508
  export { detectPresentationFormat, initWasm, parsePresentation, parsePresentation as parse_presentation, setWasmSource };
372
- //# sourceMappingURL=dist-NDTOVNYD.js.map
373
- //# sourceMappingURL=dist-NDTOVNYD.js.map
509
+ //# sourceMappingURL=dist-KIHNMEH5.js.map
510
+ //# sourceMappingURL=dist-KIHNMEH5.js.map