@mmds/wasm 1.1.0 → 1.2.0
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/mmdflux_wasm.d.ts +9 -0
- package/mmdflux_wasm.js +1 -1
- package/mmdflux_wasm_bg.js +24 -0
- package/mmdflux_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/mmdflux_wasm.d.ts
CHANGED
|
@@ -5,4 +5,13 @@ export function detect(input: string): string | undefined;
|
|
|
5
5
|
|
|
6
6
|
export function render(input: string, format: string, config_json: string): string;
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Validate Mermaid input and return structured parse diagnostics as JSON.
|
|
10
|
+
*
|
|
11
|
+
* Returns a JSON string with shape:
|
|
12
|
+
* - `{"valid": true}` on success
|
|
13
|
+
* - `{"valid": false, "diagnostics": [{"line": N, "column": N, ...}]}` on error
|
|
14
|
+
*/
|
|
15
|
+
export function validate(input: string): string;
|
|
16
|
+
|
|
8
17
|
export function version(): string;
|
package/mmdflux_wasm.js
CHANGED
package/mmdflux_wasm_bg.js
CHANGED
|
@@ -45,6 +45,30 @@ export function render(input, format, config_json) {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Validate Mermaid input and return structured parse diagnostics as JSON.
|
|
50
|
+
*
|
|
51
|
+
* Returns a JSON string with shape:
|
|
52
|
+
* - `{"valid": true}` on success
|
|
53
|
+
* - `{"valid": false, "diagnostics": [{"line": N, "column": N, ...}]}` on error
|
|
54
|
+
* @param {string} input
|
|
55
|
+
* @returns {string}
|
|
56
|
+
*/
|
|
57
|
+
export function validate(input) {
|
|
58
|
+
let deferred2_0;
|
|
59
|
+
let deferred2_1;
|
|
60
|
+
try {
|
|
61
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
62
|
+
const len0 = WASM_VECTOR_LEN;
|
|
63
|
+
const ret = wasm.validate(ptr0, len0);
|
|
64
|
+
deferred2_0 = ret[0];
|
|
65
|
+
deferred2_1 = ret[1];
|
|
66
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
67
|
+
} finally {
|
|
68
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
48
72
|
/**
|
|
49
73
|
* @returns {string}
|
|
50
74
|
*/
|
package/mmdflux_wasm_bg.wasm
CHANGED
|
Binary file
|