office-oxide-wasm 0.1.3 → 0.1.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.
@@ -1,7 +1,7 @@
1
1
  /* @ts-self-types="./office_oxide.d.ts" */
2
-
3
2
  import * as wasm from "./office_oxide_bg.wasm";
4
3
  import { __wbg_set_wasm } from "./office_oxide_bg.js";
4
+
5
5
  __wbg_set_wasm(wasm);
6
6
 
7
7
  export {
@@ -51,7 +51,7 @@ export class WasmDocument {
51
51
  if (r2) {
52
52
  throw takeObject(r1);
53
53
  }
54
- this.__wbg_ptr = r0 >>> 0;
54
+ this.__wbg_ptr = r0;
55
55
  WasmDocumentFinalization.register(this, this.__wbg_ptr, this);
56
56
  return this;
57
57
  } finally {
@@ -139,7 +139,7 @@ export class WasmDocument {
139
139
  }
140
140
  }
141
141
  if (Symbol.dispose) WasmDocument.prototype[Symbol.dispose] = WasmDocument.prototype.free;
142
- export function __wbg_Error_83742b46f01ce22d(arg0, arg1) {
142
+ export function __wbg_Error_92b29b0548f8b746(arg0, arg1) {
143
143
  const ret = Error(getStringFromWasm0(arg0, arg1));
144
144
  return addHeapObject(ret);
145
145
  }
@@ -150,23 +150,23 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
150
150
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
151
151
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
152
152
  }
153
- export function __wbg___wbindgen_throw_6ddd609b62940d55(arg0, arg1) {
153
+ export function __wbg___wbindgen_throw_344f42d3211c4765(arg0, arg1) {
154
154
  throw new Error(getStringFromWasm0(arg0, arg1));
155
155
  }
156
- export function __wbg_new_a70fbab9066b301f() {
156
+ export function __wbg_new_32b398fb48b6d94a() {
157
157
  const ret = new Array();
158
158
  return addHeapObject(ret);
159
159
  }
160
- export function __wbg_new_ab79df5bd7c26067() {
160
+ export function __wbg_new_da52cf8fe3429cb2() {
161
161
  const ret = new Object();
162
162
  return addHeapObject(ret);
163
163
  }
164
- export function __wbg_set_282384002438957f(arg0, arg1, arg2) {
165
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
166
- }
167
164
  export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
168
165
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
169
166
  }
167
+ export function __wbg_set_8a16b38e4805b298(arg0, arg1, arg2) {
168
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
169
+ }
170
170
  export function __wbindgen_cast_0000000000000001(arg0) {
171
171
  // Cast intrinsic for `F64 -> Externref`.
172
172
  const ret = arg0;
@@ -196,7 +196,7 @@ export function __wbindgen_object_drop_ref(arg0) {
196
196
  }
197
197
  const WasmDocumentFinalization = (typeof FinalizationRegistry === 'undefined')
198
198
  ? { register: () => {}, unregister: () => {} }
199
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmdocument_free(ptr >>> 0, 1));
199
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmdocument_free(ptr, 1));
200
200
 
201
201
  function addHeapObject(obj) {
202
202
  if (heap_next === heap.length) heap.push(heap.length + 1);
@@ -222,8 +222,7 @@ function getDataViewMemory0() {
222
222
  }
223
223
 
224
224
  function getStringFromWasm0(ptr, len) {
225
- ptr = ptr >>> 0;
226
- return decodeText(ptr, len);
225
+ return decodeText(ptr >>> 0, len);
227
226
  }
228
227
 
229
228
  let cachedUint8ArrayMemory0 = null;
Binary file
@@ -53,7 +53,7 @@ class WasmDocument {
53
53
  if (r2) {
54
54
  throw takeObject(r1);
55
55
  }
56
- this.__wbg_ptr = r0 >>> 0;
56
+ this.__wbg_ptr = r0;
57
57
  WasmDocumentFinalization.register(this, this.__wbg_ptr, this);
58
58
  return this;
59
59
  } finally {
@@ -142,11 +142,10 @@ class WasmDocument {
142
142
  }
143
143
  if (Symbol.dispose) WasmDocument.prototype[Symbol.dispose] = WasmDocument.prototype.free;
144
144
  exports.WasmDocument = WasmDocument;
145
-
146
145
  function __wbg_get_imports() {
147
146
  const import0 = {
148
147
  __proto__: null,
149
- __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
148
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
150
149
  const ret = Error(getStringFromWasm0(arg0, arg1));
151
150
  return addHeapObject(ret);
152
151
  },
@@ -157,23 +156,23 @@ function __wbg_get_imports() {
157
156
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
158
157
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
159
158
  },
160
- __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
159
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
161
160
  throw new Error(getStringFromWasm0(arg0, arg1));
162
161
  },
163
- __wbg_new_a70fbab9066b301f: function() {
162
+ __wbg_new_32b398fb48b6d94a: function() {
164
163
  const ret = new Array();
165
164
  return addHeapObject(ret);
166
165
  },
167
- __wbg_new_ab79df5bd7c26067: function() {
166
+ __wbg_new_da52cf8fe3429cb2: function() {
168
167
  const ret = new Object();
169
168
  return addHeapObject(ret);
170
169
  },
171
- __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
172
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
173
- },
174
170
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
175
171
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
176
172
  },
173
+ __wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
174
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
175
+ },
177
176
  __wbindgen_cast_0000000000000001: function(arg0) {
178
177
  // Cast intrinsic for `F64 -> Externref`.
179
178
  const ret = arg0;
@@ -210,7 +209,7 @@ function __wbg_get_imports() {
210
209
 
211
210
  const WasmDocumentFinalization = (typeof FinalizationRegistry === 'undefined')
212
211
  ? { register: () => {}, unregister: () => {} }
213
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmdocument_free(ptr >>> 0, 1));
212
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmdocument_free(ptr, 1));
214
213
 
215
214
  function addHeapObject(obj) {
216
215
  if (heap_next === heap.length) heap.push(heap.length + 1);
@@ -236,8 +235,7 @@ function getDataViewMemory0() {
236
235
  }
237
236
 
238
237
  function getStringFromWasm0(ptr, len) {
239
- ptr = ptr >>> 0;
240
- return decodeText(ptr, len);
238
+ return decodeText(ptr >>> 0, len);
241
239
  }
242
240
 
243
241
  let cachedUint8ArrayMemory0 = null;
@@ -329,4 +327,5 @@ let WASM_VECTOR_LEN = 0;
329
327
  const wasmPath = `${__dirname}/office_oxide_bg.wasm`;
330
328
  const wasmBytes = require('fs').readFileSync(wasmPath);
331
329
  const wasmModule = new WebAssembly.Module(wasmBytes);
332
- let wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
330
+ let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
331
+ let wasm = wasmInstance.exports;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "office-oxide-wasm",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Fast Office document processing (DOCX/XLSX/PPTX/DOC/XLS/PPT) compiled to WebAssembly. Rust core, zero JS dependencies. Works in Node.js, bundlers, and browsers.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "author": "Yury Fedoseev",
@@ -53,7 +53,7 @@ export class WasmDocument {
53
53
  if (r2) {
54
54
  throw takeObject(r1);
55
55
  }
56
- this.__wbg_ptr = r0 >>> 0;
56
+ this.__wbg_ptr = r0;
57
57
  WasmDocumentFinalization.register(this, this.__wbg_ptr, this);
58
58
  return this;
59
59
  } finally {
@@ -141,11 +141,10 @@ export class WasmDocument {
141
141
  }
142
142
  }
143
143
  if (Symbol.dispose) WasmDocument.prototype[Symbol.dispose] = WasmDocument.prototype.free;
144
-
145
144
  function __wbg_get_imports() {
146
145
  const import0 = {
147
146
  __proto__: null,
148
- __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
147
+ __wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
149
148
  const ret = Error(getStringFromWasm0(arg0, arg1));
150
149
  return addHeapObject(ret);
151
150
  },
@@ -156,23 +155,23 @@ function __wbg_get_imports() {
156
155
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
157
156
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
158
157
  },
159
- __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
158
+ __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
160
159
  throw new Error(getStringFromWasm0(arg0, arg1));
161
160
  },
162
- __wbg_new_a70fbab9066b301f: function() {
161
+ __wbg_new_32b398fb48b6d94a: function() {
163
162
  const ret = new Array();
164
163
  return addHeapObject(ret);
165
164
  },
166
- __wbg_new_ab79df5bd7c26067: function() {
165
+ __wbg_new_da52cf8fe3429cb2: function() {
167
166
  const ret = new Object();
168
167
  return addHeapObject(ret);
169
168
  },
170
- __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
171
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
172
- },
173
169
  __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
174
170
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
175
171
  },
172
+ __wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
173
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
174
+ },
176
175
  __wbindgen_cast_0000000000000001: function(arg0) {
177
176
  // Cast intrinsic for `F64 -> Externref`.
178
177
  const ret = arg0;
@@ -209,7 +208,7 @@ function __wbg_get_imports() {
209
208
 
210
209
  const WasmDocumentFinalization = (typeof FinalizationRegistry === 'undefined')
211
210
  ? { register: () => {}, unregister: () => {} }
212
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmdocument_free(ptr >>> 0, 1));
211
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmdocument_free(ptr, 1));
213
212
 
214
213
  function addHeapObject(obj) {
215
214
  if (heap_next === heap.length) heap.push(heap.length + 1);
@@ -235,8 +234,7 @@ function getDataViewMemory0() {
235
234
  }
236
235
 
237
236
  function getStringFromWasm0(ptr, len) {
238
- ptr = ptr >>> 0;
239
- return decodeText(ptr, len);
237
+ return decodeText(ptr >>> 0, len);
240
238
  }
241
239
 
242
240
  let cachedUint8ArrayMemory0 = null;
@@ -333,8 +331,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
333
331
 
334
332
  let WASM_VECTOR_LEN = 0;
335
333
 
336
- let wasmModule, wasm;
334
+ let wasmModule, wasmInstance, wasm;
337
335
  function __wbg_finalize_init(instance, module) {
336
+ wasmInstance = instance;
338
337
  wasm = instance.exports;
339
338
  wasmModule = module;
340
339
  cachedDataViewMemory0 = null;
Binary file