math-core 0.6.1 → 0.6.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/dist/math_core.js +25 -27
- package/dist/math_core_bg.wasm +0 -0
- package/package.json +1 -1
package/dist/math_core.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* @ts-self-types="./math_core.d.ts" */
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
|
|
2
4
|
|
|
3
5
|
export class ConfigParseError {
|
|
4
6
|
static __wrap(ptr) {
|
|
5
|
-
ptr = ptr >>> 0;
|
|
6
7
|
const obj = Object.create(ConfigParseError.prototype);
|
|
7
8
|
obj.__wbg_ptr = ptr;
|
|
8
9
|
ConfigParseErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -30,7 +31,6 @@ if (Symbol.dispose) ConfigParseError.prototype[Symbol.dispose] = ConfigParseErro
|
|
|
30
31
|
|
|
31
32
|
export class LatexError {
|
|
32
33
|
static __wrap(ptr) {
|
|
33
|
-
ptr = ptr >>> 0;
|
|
34
34
|
const obj = Object.create(LatexError.prototype);
|
|
35
35
|
obj.__wbg_ptr = ptr;
|
|
36
36
|
LatexErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
@@ -143,7 +143,7 @@ export class LatexToMathML {
|
|
|
143
143
|
if (ret[2]) {
|
|
144
144
|
throw takeFromExternrefTable0(ret[1]);
|
|
145
145
|
}
|
|
146
|
-
this.__wbg_ptr = ret[0]
|
|
146
|
+
this.__wbg_ptr = ret[0];
|
|
147
147
|
LatexToMathMLFinalization.register(this, this.__wbg_ptr, this);
|
|
148
148
|
return this;
|
|
149
149
|
}
|
|
@@ -152,11 +152,10 @@ export class LatexToMathML {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
if (Symbol.dispose) LatexToMathML.prototype[Symbol.dispose] = LatexToMathML.prototype.free;
|
|
155
|
-
|
|
156
155
|
function __wbg_get_imports() {
|
|
157
156
|
const import0 = {
|
|
158
157
|
__proto__: null,
|
|
159
|
-
|
|
158
|
+
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(arg0, arg1) {
|
|
160
159
|
const obj = arg1;
|
|
161
160
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
162
161
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -164,14 +163,14 @@ function __wbg_get_imports() {
|
|
|
164
163
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
165
164
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
166
165
|
},
|
|
167
|
-
|
|
166
|
+
__wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
|
|
168
167
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
169
168
|
},
|
|
170
|
-
|
|
169
|
+
__wbg_allowUnreliableRendering_f578e9493c5ee42b: function(arg0) {
|
|
171
170
|
const ret = arg0.allowUnreliableRendering;
|
|
172
171
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
173
172
|
},
|
|
174
|
-
|
|
173
|
+
__wbg_annotation_a53850e7e0dfbbdd: function(arg0) {
|
|
175
174
|
const ret = arg0.annotation;
|
|
176
175
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
177
176
|
},
|
|
@@ -179,23 +178,23 @@ function __wbg_get_imports() {
|
|
|
179
178
|
const ret = ConfigParseError.__wrap(arg0);
|
|
180
179
|
return ret;
|
|
181
180
|
},
|
|
182
|
-
|
|
181
|
+
__wbg_done_60cf307fcc680536: function(arg0) {
|
|
183
182
|
const ret = arg0.done;
|
|
184
183
|
return ret;
|
|
185
184
|
},
|
|
186
|
-
|
|
185
|
+
__wbg_entries_206899f1a3dd30a8: function(arg0) {
|
|
187
186
|
const ret = arg0.entries();
|
|
188
187
|
return ret;
|
|
189
188
|
},
|
|
190
|
-
|
|
189
|
+
__wbg_get_2b48c7d0d006a781: function(arg0, arg1) {
|
|
191
190
|
const ret = arg0[arg1 >>> 0];
|
|
192
191
|
return ret;
|
|
193
192
|
},
|
|
194
|
-
|
|
193
|
+
__wbg_ignoreUnknownCommands_5c06f89ac9f1eaa3: function(arg0) {
|
|
195
194
|
const ret = arg0.ignoreUnknownCommands;
|
|
196
195
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
197
196
|
},
|
|
198
|
-
|
|
197
|
+
__wbg_isArray_67c2c9c4313f4448: function(arg0) {
|
|
199
198
|
const ret = Array.isArray(arg0);
|
|
200
199
|
return ret;
|
|
201
200
|
},
|
|
@@ -203,34 +202,34 @@ function __wbg_get_imports() {
|
|
|
203
202
|
const ret = LatexError.__wrap(arg0);
|
|
204
203
|
return ret;
|
|
205
204
|
},
|
|
206
|
-
|
|
205
|
+
__wbg_macros_bdc9bb0d856575a1: function(arg0) {
|
|
207
206
|
const ret = arg0.macros;
|
|
208
207
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
209
208
|
},
|
|
210
|
-
|
|
209
|
+
__wbg_next_eb8ca7351fa27906: function() { return handleError(function (arg0) {
|
|
211
210
|
const ret = arg0.next();
|
|
212
211
|
return ret;
|
|
213
212
|
}, arguments); },
|
|
214
|
-
|
|
213
|
+
__wbg_prettyPrint_11a1aec7a0aa6121: function(arg0, arg1) {
|
|
215
214
|
const ret = arg1.prettyPrint;
|
|
216
215
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
217
216
|
var len1 = WASM_VECTOR_LEN;
|
|
218
217
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
219
218
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
220
219
|
},
|
|
221
|
-
|
|
220
|
+
__wbg_size_5ef6bbbc4b6332a9: function(arg0) {
|
|
222
221
|
const ret = arg0.size;
|
|
223
222
|
return ret;
|
|
224
223
|
},
|
|
225
|
-
|
|
224
|
+
__wbg_throwOnError_a879b6d1b0b3007a: function(arg0) {
|
|
226
225
|
const ret = arg0.throwOnError;
|
|
227
226
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
228
227
|
},
|
|
229
|
-
|
|
228
|
+
__wbg_value_f3625092ee4b37f4: function(arg0) {
|
|
230
229
|
const ret = arg0.value;
|
|
231
230
|
return ret;
|
|
232
231
|
},
|
|
233
|
-
|
|
232
|
+
__wbg_xmlNamespace_7b1a4146ccfb1b6a: function(arg0) {
|
|
234
233
|
const ret = arg0.xmlNamespace;
|
|
235
234
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
236
235
|
},
|
|
@@ -257,13 +256,13 @@ function __wbg_get_imports() {
|
|
|
257
256
|
|
|
258
257
|
const ConfigParseErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
259
258
|
? { register: () => {}, unregister: () => {} }
|
|
260
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_configparseerror_free(ptr
|
|
259
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_configparseerror_free(ptr, 1));
|
|
261
260
|
const LatexErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
262
261
|
? { register: () => {}, unregister: () => {} }
|
|
263
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_latexerror_free(ptr
|
|
262
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_latexerror_free(ptr, 1));
|
|
264
263
|
const LatexToMathMLFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
265
264
|
? { register: () => {}, unregister: () => {} }
|
|
266
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_latextomathml_free(ptr
|
|
265
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_latextomathml_free(ptr, 1));
|
|
267
266
|
|
|
268
267
|
function addToExternrefTable0(obj) {
|
|
269
268
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -280,8 +279,7 @@ function getDataViewMemory0() {
|
|
|
280
279
|
}
|
|
281
280
|
|
|
282
281
|
function getStringFromWasm0(ptr, len) {
|
|
283
|
-
|
|
284
|
-
return decodeText(ptr, len);
|
|
282
|
+
return decodeText(ptr >>> 0, len);
|
|
285
283
|
}
|
|
286
284
|
|
|
287
285
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -369,9 +367,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
369
367
|
|
|
370
368
|
let WASM_VECTOR_LEN = 0;
|
|
371
369
|
|
|
372
|
-
import { readFileSync } from 'node:fs';
|
|
373
370
|
const wasmUrl = new URL('math_core_bg.wasm', import.meta.url);
|
|
374
371
|
const wasmBytes = readFileSync(wasmUrl);
|
|
375
372
|
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
376
|
-
|
|
373
|
+
let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
374
|
+
let wasm = wasmInstance.exports;
|
|
377
375
|
wasm.__wbindgen_start();
|
package/dist/math_core_bg.wasm
CHANGED
|
Binary file
|