math-core 0.5.2 → 0.5.4
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 +3 -1
- package/dist/math_core.js +30 -10
- package/dist/math_core_bg.wasm +0 -0
- package/dist/math_core_bg.wasm.d.ts +5 -2
- package/package.json +2 -2
package/dist/math_core.d.ts
CHANGED
|
@@ -23,9 +23,11 @@ export class LatexError {
|
|
|
23
23
|
private constructor();
|
|
24
24
|
free(): void;
|
|
25
25
|
[Symbol.dispose](): void;
|
|
26
|
-
|
|
26
|
+
end: number;
|
|
27
|
+
start: number;
|
|
27
28
|
readonly context: string | undefined;
|
|
28
29
|
readonly message: string;
|
|
30
|
+
readonly report: string | undefined;
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
export class LatexToMathML {
|
package/dist/math_core.js
CHANGED
|
@@ -49,8 +49,15 @@ export class LatexError {
|
|
|
49
49
|
/**
|
|
50
50
|
* @returns {number}
|
|
51
51
|
*/
|
|
52
|
-
get
|
|
53
|
-
const ret = wasm.
|
|
52
|
+
get end() {
|
|
53
|
+
const ret = wasm.__wbg_get_latexerror_end(this.__wbg_ptr);
|
|
54
|
+
return ret >>> 0;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* @returns {number}
|
|
58
|
+
*/
|
|
59
|
+
get start() {
|
|
60
|
+
const ret = wasm.__wbg_get_latexerror_start(this.__wbg_ptr);
|
|
54
61
|
return ret >>> 0;
|
|
55
62
|
}
|
|
56
63
|
/**
|
|
@@ -67,11 +74,24 @@ export class LatexError {
|
|
|
67
74
|
const ret = wasm.latexerror_message(this.__wbg_ptr);
|
|
68
75
|
return ret;
|
|
69
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* @returns {string | undefined}
|
|
79
|
+
*/
|
|
80
|
+
get report() {
|
|
81
|
+
const ret = wasm.latexerror_report(this.__wbg_ptr);
|
|
82
|
+
return ret;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @param {number} arg0
|
|
86
|
+
*/
|
|
87
|
+
set end(arg0) {
|
|
88
|
+
wasm.__wbg_set_latexerror_end(this.__wbg_ptr, arg0);
|
|
89
|
+
}
|
|
70
90
|
/**
|
|
71
91
|
* @param {number} arg0
|
|
72
92
|
*/
|
|
73
|
-
set
|
|
74
|
-
wasm.
|
|
93
|
+
set start(arg0) {
|
|
94
|
+
wasm.__wbg_set_latexerror_start(this.__wbg_ptr, arg0);
|
|
75
95
|
}
|
|
76
96
|
}
|
|
77
97
|
if (Symbol.dispose) LatexError.prototype[Symbol.dispose] = LatexError.prototype.free;
|
|
@@ -147,7 +167,7 @@ function __wbg_get_imports() {
|
|
|
147
167
|
__wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
|
|
148
168
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
149
169
|
},
|
|
150
|
-
|
|
170
|
+
__wbg_annotation_0f240a9bc62ef511: function(arg0) {
|
|
151
171
|
const ret = arg0.annotation;
|
|
152
172
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
153
173
|
},
|
|
@@ -167,7 +187,7 @@ function __wbg_get_imports() {
|
|
|
167
187
|
const ret = arg0[arg1 >>> 0];
|
|
168
188
|
return ret;
|
|
169
189
|
},
|
|
170
|
-
|
|
190
|
+
__wbg_ignoreUnknownCommands_e2f38f95235accd2: function(arg0) {
|
|
171
191
|
const ret = arg0.ignoreUnknownCommands;
|
|
172
192
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
173
193
|
},
|
|
@@ -179,7 +199,7 @@ function __wbg_get_imports() {
|
|
|
179
199
|
const ret = LatexError.__wrap(arg0);
|
|
180
200
|
return ret;
|
|
181
201
|
},
|
|
182
|
-
|
|
202
|
+
__wbg_macros_4d915c0571da66e0: function(arg0) {
|
|
183
203
|
const ret = arg0.macros;
|
|
184
204
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
185
205
|
},
|
|
@@ -187,7 +207,7 @@ function __wbg_get_imports() {
|
|
|
187
207
|
const ret = arg0.next();
|
|
188
208
|
return ret;
|
|
189
209
|
}, arguments); },
|
|
190
|
-
|
|
210
|
+
__wbg_prettyPrint_50b3da85527dbcc4: function(arg0, arg1) {
|
|
191
211
|
const ret = arg1.prettyPrint;
|
|
192
212
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
193
213
|
var len1 = WASM_VECTOR_LEN;
|
|
@@ -198,7 +218,7 @@ function __wbg_get_imports() {
|
|
|
198
218
|
const ret = arg0.size;
|
|
199
219
|
return ret;
|
|
200
220
|
},
|
|
201
|
-
|
|
221
|
+
__wbg_throwOnError_48cbacea44678108: function(arg0) {
|
|
202
222
|
const ret = arg0.throwOnError;
|
|
203
223
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
204
224
|
},
|
|
@@ -206,7 +226,7 @@ function __wbg_get_imports() {
|
|
|
206
226
|
const ret = arg0.value;
|
|
207
227
|
return ret;
|
|
208
228
|
},
|
|
209
|
-
|
|
229
|
+
__wbg_xmlNamespace_87aeb5924c1bbfbe: function(arg0) {
|
|
210
230
|
const ret = arg0.xmlNamespace;
|
|
211
231
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
212
232
|
},
|
package/dist/math_core_bg.wasm
CHANGED
|
Binary file
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_configparseerror_free: (a: number, b: number) => void;
|
|
5
|
-
export const
|
|
5
|
+
export const __wbg_get_latexerror_end: (a: number) => number;
|
|
6
|
+
export const __wbg_get_latexerror_start: (a: number) => number;
|
|
6
7
|
export const __wbg_latexerror_free: (a: number, b: number) => void;
|
|
7
8
|
export const __wbg_latextomathml_free: (a: number, b: number) => void;
|
|
8
|
-
export const
|
|
9
|
+
export const __wbg_set_latexerror_end: (a: number, b: number) => void;
|
|
10
|
+
export const __wbg_set_latexerror_start: (a: number, b: number) => void;
|
|
9
11
|
export const configparseerror_message: (a: number) => any;
|
|
10
12
|
export const latexerror_context: (a: number) => any;
|
|
11
13
|
export const latexerror_message: (a: number) => any;
|
|
14
|
+
export const latexerror_report: (a: number) => any;
|
|
12
15
|
export const latextomathml_convert_with_global_counter: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
13
16
|
export const latextomathml_convert_with_local_counter: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
14
17
|
export const latextomathml_new: (a: any) => [number, number, number];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "math-core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Convert LaTeX to MathML Core",
|
|
5
5
|
"homepage": "https://github.com/tmke8/math-core#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"test": "mocha",
|
|
23
23
|
"build": "npm run build:cargo && npm run build:wasm-bindgen",
|
|
24
|
-
"build:cargo": "cargo build --release --target wasm32-unknown-unknown --package math-core-wasm",
|
|
24
|
+
"build:cargo": "cargo build --release --target wasm32-unknown-unknown --package math-core-wasm --features ariadne",
|
|
25
25
|
"build:wasm-bindgen": "wasm-bindgen ../target/wasm32-unknown-unknown/release/math_core_wasm.wasm --out-dir ./dist --out-name math_core --target experimental-nodejs-module"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|