math-core 0.1.1 → 0.2.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/dist/math_core.d.ts +9 -2
- package/dist/math_core_bg.js +53 -12
- package/dist/math_core_bg.wasm +0 -0
- package/dist/math_core_bg.wasm.d.ts +4 -2
- package/package.json +1 -1
package/dist/math_core.d.ts
CHANGED
|
@@ -5,15 +5,22 @@ interface MathCoreOptions {
|
|
|
5
5
|
prettyPrint?: "never" | "always" | "auto";
|
|
6
6
|
macros?: Map<string, string>;
|
|
7
7
|
xmlNamespace?: boolean;
|
|
8
|
-
|
|
8
|
+
throwOnError?: boolean;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
|
|
12
|
+
export class ConfigParseError {
|
|
13
|
+
private constructor();
|
|
14
|
+
free(): void;
|
|
15
|
+
[Symbol.dispose](): void;
|
|
16
|
+
readonly message: string;
|
|
17
|
+
}
|
|
12
18
|
export class LatexError {
|
|
13
19
|
private constructor();
|
|
14
20
|
free(): void;
|
|
15
21
|
[Symbol.dispose](): void;
|
|
16
|
-
|
|
22
|
+
readonly context: string | undefined;
|
|
23
|
+
readonly message: string;
|
|
17
24
|
location: number;
|
|
18
25
|
}
|
|
19
26
|
export class LatexToMathML {
|
package/dist/math_core_bg.js
CHANGED
|
@@ -116,6 +116,41 @@ function takeFromExternrefTable0(idx) {
|
|
|
116
116
|
return value;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
const ConfigParseErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
120
|
+
? { register: () => {}, unregister: () => {} }
|
|
121
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_configparseerror_free(ptr >>> 0, 1));
|
|
122
|
+
|
|
123
|
+
export class ConfigParseError {
|
|
124
|
+
|
|
125
|
+
static __wrap(ptr) {
|
|
126
|
+
ptr = ptr >>> 0;
|
|
127
|
+
const obj = Object.create(ConfigParseError.prototype);
|
|
128
|
+
obj.__wbg_ptr = ptr;
|
|
129
|
+
ConfigParseErrorFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
130
|
+
return obj;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
__destroy_into_raw() {
|
|
134
|
+
const ptr = this.__wbg_ptr;
|
|
135
|
+
this.__wbg_ptr = 0;
|
|
136
|
+
ConfigParseErrorFinalization.unregister(this);
|
|
137
|
+
return ptr;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
free() {
|
|
141
|
+
const ptr = this.__destroy_into_raw();
|
|
142
|
+
wasm.__wbg_configparseerror_free(ptr, 0);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @returns {string}
|
|
146
|
+
*/
|
|
147
|
+
get message() {
|
|
148
|
+
const ret = wasm.configparseerror_message(this.__wbg_ptr);
|
|
149
|
+
return ret;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (Symbol.dispose) ConfigParseError.prototype[Symbol.dispose] = ConfigParseError.prototype.free;
|
|
153
|
+
|
|
119
154
|
const LatexErrorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
120
155
|
? { register: () => {}, unregister: () => {} }
|
|
121
156
|
: new FinalizationRegistry(ptr => wasm.__wbg_latexerror_free(ptr >>> 0, 1));
|
|
@@ -142,17 +177,18 @@ export class LatexError {
|
|
|
142
177
|
wasm.__wbg_latexerror_free(ptr, 0);
|
|
143
178
|
}
|
|
144
179
|
/**
|
|
145
|
-
* @returns {
|
|
180
|
+
* @returns {string | undefined}
|
|
146
181
|
*/
|
|
147
|
-
get
|
|
148
|
-
const ret = wasm.
|
|
182
|
+
get context() {
|
|
183
|
+
const ret = wasm.latexerror_context(this.__wbg_ptr);
|
|
149
184
|
return ret;
|
|
150
185
|
}
|
|
151
186
|
/**
|
|
152
|
-
* @
|
|
187
|
+
* @returns {string}
|
|
153
188
|
*/
|
|
154
|
-
|
|
155
|
-
wasm.
|
|
189
|
+
get message() {
|
|
190
|
+
const ret = wasm.latexerror_message(this.__wbg_ptr);
|
|
191
|
+
return ret;
|
|
156
192
|
}
|
|
157
193
|
/**
|
|
158
194
|
* @returns {number}
|
|
@@ -246,9 +282,9 @@ export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
|
|
|
246
282
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
247
283
|
};
|
|
248
284
|
|
|
249
|
-
export function
|
|
250
|
-
const ret = arg0
|
|
251
|
-
return
|
|
285
|
+
export function __wbg_configparseerror_new(arg0) {
|
|
286
|
+
const ret = ConfigParseError.__wrap(arg0);
|
|
287
|
+
return ret;
|
|
252
288
|
};
|
|
253
289
|
|
|
254
290
|
export function __wbg_done_2042aa2670fb1db1(arg0) {
|
|
@@ -276,7 +312,7 @@ export function __wbg_latexerror_new(arg0) {
|
|
|
276
312
|
return ret;
|
|
277
313
|
};
|
|
278
314
|
|
|
279
|
-
export function
|
|
315
|
+
export function __wbg_macros_38df9cac34aa8bf6(arg0) {
|
|
280
316
|
const ret = arg0.macros;
|
|
281
317
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
282
318
|
};
|
|
@@ -286,7 +322,7 @@ export function __wbg_next_020810e0ae8ebcb0() { return handleError(function (arg
|
|
|
286
322
|
return ret;
|
|
287
323
|
}, arguments) };
|
|
288
324
|
|
|
289
|
-
export function
|
|
325
|
+
export function __wbg_prettyPrint_5873d87487bb2a40(arg0, arg1) {
|
|
290
326
|
const ret = arg1.prettyPrint;
|
|
291
327
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
292
328
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -299,12 +335,17 @@ export function __wbg_size_252e34f77ca59a74(arg0) {
|
|
|
299
335
|
return ret;
|
|
300
336
|
};
|
|
301
337
|
|
|
338
|
+
export function __wbg_throwOnError_188181ed0b353483(arg0) {
|
|
339
|
+
const ret = arg0.throwOnError;
|
|
340
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
341
|
+
};
|
|
342
|
+
|
|
302
343
|
export function __wbg_value_692627309814bb8c(arg0) {
|
|
303
344
|
const ret = arg0.value;
|
|
304
345
|
return ret;
|
|
305
346
|
};
|
|
306
347
|
|
|
307
|
-
export function
|
|
348
|
+
export function __wbg_xmlNamespace_ecd0677f1ea29434(arg0) {
|
|
308
349
|
const ret = arg0.xmlNamespace;
|
|
309
350
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
310
351
|
};
|
package/dist/math_core_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_configparseerror_free: (a: number, b: number) => void;
|
|
4
5
|
export const __wbg_get_latexerror_location: (a: number) => number;
|
|
5
|
-
export const __wbg_get_latexerror_message: (a: number) => any;
|
|
6
6
|
export const __wbg_latexerror_free: (a: number, b: number) => void;
|
|
7
7
|
export const __wbg_latextomathml_free: (a: number, b: number) => void;
|
|
8
8
|
export const __wbg_set_latexerror_location: (a: number, b: number) => void;
|
|
9
|
-
export const
|
|
9
|
+
export const configparseerror_message: (a: number) => any;
|
|
10
|
+
export const latexerror_context: (a: number) => any;
|
|
11
|
+
export const latexerror_message: (a: number) => any;
|
|
10
12
|
export const latextomathml_convert_with_global_counter: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
11
13
|
export const latextomathml_convert_with_local_counter: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
12
14
|
export const latextomathml_new: (a: any) => [number, number, number];
|