math-core 0.5.1 → 0.5.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.
@@ -23,9 +23,11 @@ export class LatexError {
23
23
  private constructor();
24
24
  free(): void;
25
25
  [Symbol.dispose](): void;
26
- location: number;
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 location() {
53
- const ret = wasm.__wbg_get_latexerror_location(this.__wbg_ptr);
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 location(arg0) {
74
- wasm.__wbg_set_latexerror_location(this.__wbg_ptr, arg0);
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
- __wbg_annotation_2b4826c133600104: function(arg0) {
170
+ __wbg_annotation_acbd896e899b0a15: 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
- __wbg_ignoreUnknownCommands_b587f55aa6f8db28: function(arg0) {
190
+ __wbg_ignoreUnknownCommands_0f6fdbc2c482c409: 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
- __wbg_macros_9d7da40da8cd3e66: function(arg0) {
202
+ __wbg_macros_cc4000ac63ef482b: 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
- __wbg_prettyPrint_ccab778054855b0a: function(arg0, arg1) {
210
+ __wbg_prettyPrint_56253c023957b955: 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
- __wbg_throwOnError_a9295ce23a8b2b54: function(arg0) {
221
+ __wbg_throwOnError_2ddb3cc73dad8cfe: 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
- __wbg_xmlNamespace_a6647f78c46784b4: function(arg0) {
229
+ __wbg_xmlNamespace_cd8cc589279e1d68: function(arg0) {
210
230
  const ret = arg0.xmlNamespace;
211
231
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
212
232
  },
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 __wbg_get_latexerror_location: (a: number) => number;
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 __wbg_set_latexerror_location: (a: number, b: number) => void;
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.1",
3
+ "version": "0.5.3",
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": {