@mermanjs/web-analysis 0.9.3 → 0.10.0-alpha.2
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/README.md +7 -3
- package/THIRD_PARTY_LICENSES/rust-cargo-dependencies.json +24 -112
- package/THIRD_PARTY_NOTICES.md +6 -6
- package/artifacts/provenance.json +128 -98
- package/artifacts/wasm/merman_wasm.d.ts +18 -3
- package/artifacts/wasm/merman_wasm.js +296 -105
- package/artifacts/wasm/merman_wasm_bg.wasm +0 -0
- package/artifacts/wasm/merman_wasm_bg.wasm.d.ts +5 -1
- package/dist/generated/binding-contract.d.ts +384 -0
- package/dist/generated/binding-contract.d.ts.map +1 -0
- package/dist/generated/binding-contract.js +18 -12
- package/dist/generated/binding-contract.js.map +1 -1
- package/dist/generated/capability-surface.d.ts +56 -3
- package/dist/generated/capability-surface.d.ts.map +1 -1
- package/dist/generated/capability-surface.js +64 -1
- package/dist/generated/capability-surface.js.map +1 -1
- package/dist/generated/resource-contract.d.ts +3 -3
- package/dist/generated/resource-contract.d.ts.map +1 -1
- package/dist/generated/resource-contract.js +36 -10
- package/dist/generated/resource-contract.js.map +1 -1
- package/dist/generated/text-measurement-abi.d.ts +5 -0
- package/dist/generated/text-measurement-abi.d.ts.map +1 -1
- package/dist/generated/text-measurement-abi.js +1 -0
- package/dist/generated/text-measurement-abi.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/json-input.js +13 -0
- package/dist/json-input.js.map +1 -0
- package/dist/package-entries/analysis.d.ts +6 -6
- package/dist/package-entries/analysis.d.ts.map +1 -1
- package/dist/package-entries/analysis.js +6 -6
- package/dist/package-entries/analysis.js.map +1 -1
- package/dist/public-catalog.d.ts +7 -7
- package/dist/public-catalog.d.ts.map +1 -1
- package/dist/public-catalog.js +6 -15
- package/dist/public-catalog.js.map +1 -1
- package/dist/public-types.d.ts +736 -59
- package/dist/public-types.d.ts.map +1 -1
- package/dist/runtime-analysis.d.ts.map +1 -1
- package/dist/runtime-analysis.js +43 -7
- package/dist/runtime-analysis.js.map +1 -1
- package/dist/runtime-core.d.ts +5 -3
- package/dist/runtime-core.d.ts.map +1 -1
- package/dist/runtime-core.js +222 -75
- package/dist/runtime-core.js.map +1 -1
- package/dist/runtime-mount.d.ts +4 -0
- package/dist/runtime-mount.d.ts.map +1 -0
- package/dist/runtime-render-session.d.ts.map +1 -1
- package/dist/runtime-render.d.ts +12 -10
- package/dist/runtime-render.d.ts.map +1 -1
- package/dist/runtime-state.d.ts +4 -3
- package/dist/runtime-state.d.ts.map +1 -1
- package/dist/runtime-state.js +3 -2
- package/dist/runtime-state.js.map +1 -1
- package/dist/surface-runtime.js +2 -2
- package/dist/surface-runtime.js.map +1 -1
- package/package.json +3 -2
|
@@ -6,10 +6,17 @@
|
|
|
6
6
|
* @returns {any}
|
|
7
7
|
*/
|
|
8
8
|
export function analysisFacts(source, options_json) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
let ptr0, len0, ptr1, len1;
|
|
10
|
+
try {
|
|
11
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
12
|
+
len0 = WASM_VECTOR_LEN;
|
|
13
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
14
|
+
len1 = WASM_VECTOR_LEN;
|
|
15
|
+
} catch (e) {
|
|
16
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
17
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
18
|
+
throw e;
|
|
19
|
+
}
|
|
13
20
|
const ret = wasm.analysisFacts(ptr0, len0, ptr1, len1);
|
|
14
21
|
if (ret[2]) {
|
|
15
22
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -23,10 +30,17 @@ export function analysisFacts(source, options_json) {
|
|
|
23
30
|
* @returns {any}
|
|
24
31
|
*/
|
|
25
32
|
export function analyze(source, options_json) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
33
|
+
let ptr0, len0, ptr1, len1;
|
|
34
|
+
try {
|
|
35
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
36
|
+
len0 = WASM_VECTOR_LEN;
|
|
37
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
38
|
+
len1 = WASM_VECTOR_LEN;
|
|
39
|
+
} catch (e) {
|
|
40
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
41
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
42
|
+
throw e;
|
|
43
|
+
}
|
|
30
44
|
const ret = wasm.analyze(ptr0, len0, ptr1, len1);
|
|
31
45
|
if (ret[2]) {
|
|
32
46
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -41,12 +55,20 @@ export function analyze(source, options_json) {
|
|
|
41
55
|
* @returns {any}
|
|
42
56
|
*/
|
|
43
57
|
export function analyzeDocument(source, uri, options_json) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
58
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
59
|
+
try {
|
|
60
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
61
|
+
len0 = WASM_VECTOR_LEN;
|
|
62
|
+
ptr1 = passStringToWasm0(uri, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
63
|
+
len1 = WASM_VECTOR_LEN;
|
|
64
|
+
ptr2 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
65
|
+
len2 = WASM_VECTOR_LEN;
|
|
66
|
+
} catch (e) {
|
|
67
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
68
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
69
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
70
|
+
throw e;
|
|
71
|
+
}
|
|
50
72
|
const ret = wasm.analyzeDocument(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
51
73
|
if (ret[2]) {
|
|
52
74
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -61,12 +83,20 @@ export function analyzeDocument(source, uri, options_json) {
|
|
|
61
83
|
* @returns {any}
|
|
62
84
|
*/
|
|
63
85
|
export function analyzeDocumentFacts(source, uri, options_json) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
86
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
87
|
+
try {
|
|
88
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
89
|
+
len0 = WASM_VECTOR_LEN;
|
|
90
|
+
ptr1 = passStringToWasm0(uri, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
91
|
+
len1 = WASM_VECTOR_LEN;
|
|
92
|
+
ptr2 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
93
|
+
len2 = WASM_VECTOR_LEN;
|
|
94
|
+
} catch (e) {
|
|
95
|
+
if (ptr2) { wasm.__wbindgen_free(ptr2, len2 * 1, 1); }
|
|
96
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
97
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
98
|
+
throw e;
|
|
99
|
+
}
|
|
70
100
|
const ret = wasm.analyzeDocumentFacts(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
71
101
|
if (ret[2]) {
|
|
72
102
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -80,10 +110,17 @@ export function analyzeDocumentFacts(source, uri, options_json) {
|
|
|
80
110
|
* @returns {any}
|
|
81
111
|
*/
|
|
82
112
|
export function analyzeJson(source, options_json) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
113
|
+
let ptr0, len0, ptr1, len1;
|
|
114
|
+
try {
|
|
115
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
116
|
+
len0 = WASM_VECTOR_LEN;
|
|
117
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
118
|
+
len1 = WASM_VECTOR_LEN;
|
|
119
|
+
} catch (e) {
|
|
120
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
121
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
122
|
+
throw e;
|
|
123
|
+
}
|
|
87
124
|
const ret = wasm.analyzeJson(ptr0, len0, ptr1, len1);
|
|
88
125
|
if (ret[2]) {
|
|
89
126
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -113,6 +150,30 @@ export function asciiSupportedDiagrams() {
|
|
|
113
150
|
return takeFromExternrefTable0(ret[0]);
|
|
114
151
|
}
|
|
115
152
|
|
|
153
|
+
/**
|
|
154
|
+
* @param {string} query_json
|
|
155
|
+
* @param {string | null} [options_json]
|
|
156
|
+
* @returns {any}
|
|
157
|
+
*/
|
|
158
|
+
export function describeThemeSupport(query_json, options_json) {
|
|
159
|
+
let ptr0, len0, ptr1, len1;
|
|
160
|
+
try {
|
|
161
|
+
ptr0 = passStringToWasm0(query_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
162
|
+
len0 = WASM_VECTOR_LEN;
|
|
163
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
164
|
+
len1 = WASM_VECTOR_LEN;
|
|
165
|
+
} catch (e) {
|
|
166
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
167
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
168
|
+
throw e;
|
|
169
|
+
}
|
|
170
|
+
const ret = wasm.describeThemeSupport(ptr0, len0, ptr1, len1);
|
|
171
|
+
if (ret[2]) {
|
|
172
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
173
|
+
}
|
|
174
|
+
return takeFromExternrefTable0(ret[0]);
|
|
175
|
+
}
|
|
176
|
+
|
|
116
177
|
/**
|
|
117
178
|
* @returns {any}
|
|
118
179
|
*/
|
|
@@ -133,10 +194,17 @@ export function edgeGeometryJson(source, options_json) {
|
|
|
133
194
|
let deferred4_0;
|
|
134
195
|
let deferred4_1;
|
|
135
196
|
try {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
197
|
+
let ptr0, len0, ptr1, len1;
|
|
198
|
+
try {
|
|
199
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
200
|
+
len0 = WASM_VECTOR_LEN;
|
|
201
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
202
|
+
len1 = WASM_VECTOR_LEN;
|
|
203
|
+
} catch (e) {
|
|
204
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
205
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
206
|
+
throw e;
|
|
207
|
+
}
|
|
140
208
|
const ret = wasm.edgeGeometryJson(ptr0, len0, ptr1, len1);
|
|
141
209
|
var ptr3 = ret[0];
|
|
142
210
|
var len3 = ret[1];
|
|
@@ -152,6 +220,30 @@ export function edgeGeometryJson(source, options_json) {
|
|
|
152
220
|
}
|
|
153
221
|
}
|
|
154
222
|
|
|
223
|
+
/**
|
|
224
|
+
* @param {string} preset_id
|
|
225
|
+
* @param {string | null} [options_json]
|
|
226
|
+
* @returns {any}
|
|
227
|
+
*/
|
|
228
|
+
export function exportThemePreset(preset_id, options_json) {
|
|
229
|
+
let ptr0, len0, ptr1, len1;
|
|
230
|
+
try {
|
|
231
|
+
ptr0 = passStringToWasm0(preset_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
232
|
+
len0 = WASM_VECTOR_LEN;
|
|
233
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
234
|
+
len1 = WASM_VECTOR_LEN;
|
|
235
|
+
} catch (e) {
|
|
236
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
237
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
238
|
+
throw e;
|
|
239
|
+
}
|
|
240
|
+
const ret = wasm.exportThemePreset(ptr0, len0, ptr1, len1);
|
|
241
|
+
if (ret[2]) {
|
|
242
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
243
|
+
}
|
|
244
|
+
return takeFromExternrefTable0(ret[0]);
|
|
245
|
+
}
|
|
246
|
+
|
|
155
247
|
/**
|
|
156
248
|
* @param {string} source
|
|
157
249
|
* @param {string | null} [options_json]
|
|
@@ -161,10 +253,17 @@ export function layoutJson(source, options_json) {
|
|
|
161
253
|
let deferred4_0;
|
|
162
254
|
let deferred4_1;
|
|
163
255
|
try {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
256
|
+
let ptr0, len0, ptr1, len1;
|
|
257
|
+
try {
|
|
258
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
259
|
+
len0 = WASM_VECTOR_LEN;
|
|
260
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
261
|
+
len1 = WASM_VECTOR_LEN;
|
|
262
|
+
} catch (e) {
|
|
263
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
264
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
265
|
+
throw e;
|
|
266
|
+
}
|
|
168
267
|
const ret = wasm.layoutJson(ptr0, len0, ptr1, len1);
|
|
169
268
|
var ptr3 = ret[0];
|
|
170
269
|
var len3 = ret[1];
|
|
@@ -191,6 +290,30 @@ export function lintRuleCatalog() {
|
|
|
191
290
|
return takeFromExternrefTable0(ret[0]);
|
|
192
291
|
}
|
|
193
292
|
|
|
293
|
+
/**
|
|
294
|
+
* @param {string} design_json
|
|
295
|
+
* @param {string | null} [options_json]
|
|
296
|
+
* @returns {any}
|
|
297
|
+
*/
|
|
298
|
+
export function materializeTheme(design_json, options_json) {
|
|
299
|
+
let ptr0, len0, ptr1, len1;
|
|
300
|
+
try {
|
|
301
|
+
ptr0 = passStringToWasm0(design_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
302
|
+
len0 = WASM_VECTOR_LEN;
|
|
303
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
304
|
+
len1 = WASM_VECTOR_LEN;
|
|
305
|
+
} catch (e) {
|
|
306
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
307
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
308
|
+
throw e;
|
|
309
|
+
}
|
|
310
|
+
const ret = wasm.materializeTheme(ptr0, len0, ptr1, len1);
|
|
311
|
+
if (ret[2]) {
|
|
312
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
313
|
+
}
|
|
314
|
+
return takeFromExternrefTable0(ret[0]);
|
|
315
|
+
}
|
|
316
|
+
|
|
194
317
|
/**
|
|
195
318
|
* @returns {string}
|
|
196
319
|
*/
|
|
@@ -216,10 +339,17 @@ export function parseJson(source, options_json) {
|
|
|
216
339
|
let deferred4_0;
|
|
217
340
|
let deferred4_1;
|
|
218
341
|
try {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
342
|
+
let ptr0, len0, ptr1, len1;
|
|
343
|
+
try {
|
|
344
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
345
|
+
len0 = WASM_VECTOR_LEN;
|
|
346
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
347
|
+
len1 = WASM_VECTOR_LEN;
|
|
348
|
+
} catch (e) {
|
|
349
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
350
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
351
|
+
throw e;
|
|
352
|
+
}
|
|
223
353
|
const ret = wasm.parseJson(ptr0, len0, ptr1, len1);
|
|
224
354
|
var ptr3 = ret[0];
|
|
225
355
|
var len3 = ret[1];
|
|
@@ -235,17 +365,6 @@ export function parseJson(source, options_json) {
|
|
|
235
365
|
}
|
|
236
366
|
}
|
|
237
367
|
|
|
238
|
-
/**
|
|
239
|
-
* @returns {any}
|
|
240
|
-
*/
|
|
241
|
-
export function presentationCatalog() {
|
|
242
|
-
const ret = wasm.presentationCatalog();
|
|
243
|
-
if (ret[2]) {
|
|
244
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
245
|
-
}
|
|
246
|
-
return takeFromExternrefTable0(ret[0]);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
368
|
/**
|
|
250
369
|
* @param {string} source
|
|
251
370
|
* @param {string | null} [options_json]
|
|
@@ -255,10 +374,17 @@ export function renderAscii(source, options_json) {
|
|
|
255
374
|
let deferred4_0;
|
|
256
375
|
let deferred4_1;
|
|
257
376
|
try {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
377
|
+
let ptr0, len0, ptr1, len1;
|
|
378
|
+
try {
|
|
379
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
380
|
+
len0 = WASM_VECTOR_LEN;
|
|
381
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
382
|
+
len1 = WASM_VECTOR_LEN;
|
|
383
|
+
} catch (e) {
|
|
384
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
385
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
386
|
+
throw e;
|
|
387
|
+
}
|
|
262
388
|
const ret = wasm.renderAscii(ptr0, len0, ptr1, len1);
|
|
263
389
|
var ptr3 = ret[0];
|
|
264
390
|
var len3 = ret[1];
|
|
@@ -283,10 +409,17 @@ export function renderSvg(source, options_json) {
|
|
|
283
409
|
let deferred4_0;
|
|
284
410
|
let deferred4_1;
|
|
285
411
|
try {
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
412
|
+
let ptr0, len0, ptr1, len1;
|
|
413
|
+
try {
|
|
414
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
415
|
+
len0 = WASM_VECTOR_LEN;
|
|
416
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
417
|
+
len1 = WASM_VECTOR_LEN;
|
|
418
|
+
} catch (e) {
|
|
419
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
420
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
421
|
+
throw e;
|
|
422
|
+
}
|
|
290
423
|
const ret = wasm.renderSvg(ptr0, len0, ptr1, len1);
|
|
291
424
|
var ptr3 = ret[0];
|
|
292
425
|
var len3 = ret[1];
|
|
@@ -302,6 +435,31 @@ export function renderSvg(source, options_json) {
|
|
|
302
435
|
}
|
|
303
436
|
}
|
|
304
437
|
|
|
438
|
+
/**
|
|
439
|
+
* Renders once and retains the execution metadata for the returned SVG.
|
|
440
|
+
* @param {string} source
|
|
441
|
+
* @param {string | null} [options_json]
|
|
442
|
+
* @returns {any}
|
|
443
|
+
*/
|
|
444
|
+
export function renderSvgResult(source, options_json) {
|
|
445
|
+
let ptr0, len0, ptr1, len1;
|
|
446
|
+
try {
|
|
447
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
|
+
len0 = WASM_VECTOR_LEN;
|
|
449
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
450
|
+
len1 = WASM_VECTOR_LEN;
|
|
451
|
+
} catch (e) {
|
|
452
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
453
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
454
|
+
throw e;
|
|
455
|
+
}
|
|
456
|
+
const ret = wasm.renderSvgResult(ptr0, len0, ptr1, len1);
|
|
457
|
+
if (ret[2]) {
|
|
458
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
459
|
+
}
|
|
460
|
+
return takeFromExternrefTable0(ret[0]);
|
|
461
|
+
}
|
|
462
|
+
|
|
305
463
|
/**
|
|
306
464
|
* @returns {any}
|
|
307
465
|
*/
|
|
@@ -345,10 +503,17 @@ export function supportedThemes() {
|
|
|
345
503
|
* @returns {any}
|
|
346
504
|
*/
|
|
347
505
|
export function svgPlanJson(source, options_json) {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
506
|
+
let ptr0, len0, ptr1, len1;
|
|
507
|
+
try {
|
|
508
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
509
|
+
len0 = WASM_VECTOR_LEN;
|
|
510
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
511
|
+
len1 = WASM_VECTOR_LEN;
|
|
512
|
+
} catch (e) {
|
|
513
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
514
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
515
|
+
throw e;
|
|
516
|
+
}
|
|
352
517
|
const ret = wasm.svgPlanJson(ptr0, len0, ptr1, len1);
|
|
353
518
|
if (ret[2]) {
|
|
354
519
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -356,6 +521,17 @@ export function svgPlanJson(source, options_json) {
|
|
|
356
521
|
return takeFromExternrefTable0(ret[0]);
|
|
357
522
|
}
|
|
358
523
|
|
|
524
|
+
/**
|
|
525
|
+
* @returns {any}
|
|
526
|
+
*/
|
|
527
|
+
export function themeCatalog() {
|
|
528
|
+
const ret = wasm.themeCatalog();
|
|
529
|
+
if (ret[2]) {
|
|
530
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
531
|
+
}
|
|
532
|
+
return takeFromExternrefTable0(ret[0]);
|
|
533
|
+
}
|
|
534
|
+
|
|
359
535
|
/**
|
|
360
536
|
* @returns {number}
|
|
361
537
|
*/
|
|
@@ -370,10 +546,17 @@ export function transportApiVersion() {
|
|
|
370
546
|
* @returns {any}
|
|
371
547
|
*/
|
|
372
548
|
export function validate(source, options_json) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
549
|
+
let ptr0, len0, ptr1, len1;
|
|
550
|
+
try {
|
|
551
|
+
ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
552
|
+
len0 = WASM_VECTOR_LEN;
|
|
553
|
+
ptr1 = isLikeNone(options_json) ? 0 : passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
554
|
+
len1 = WASM_VECTOR_LEN;
|
|
555
|
+
} catch (e) {
|
|
556
|
+
if (ptr1) { wasm.__wbindgen_free(ptr1, len1 * 1, 1); }
|
|
557
|
+
if (ptr0) { wasm.__wbindgen_free(ptr0, len0 * 1, 1); }
|
|
558
|
+
throw e;
|
|
559
|
+
}
|
|
377
560
|
const ret = wasm.validate(ptr0, len0, ptr1, len1);
|
|
378
561
|
if (ret[2]) {
|
|
379
562
|
throw takeFromExternrefTable0(ret[1]);
|
|
@@ -383,7 +566,7 @@ export function validate(source, options_json) {
|
|
|
383
566
|
function __wbg_get_imports() {
|
|
384
567
|
const import0 = {
|
|
385
568
|
__proto__: null,
|
|
386
|
-
|
|
569
|
+
__wbg_Error_208446807d0d1e30: function(arg0, arg1) {
|
|
387
570
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
388
571
|
return ret;
|
|
389
572
|
},
|
|
@@ -391,18 +574,18 @@ function __wbg_get_imports() {
|
|
|
391
574
|
const ret = String(arg1);
|
|
392
575
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
393
576
|
const len1 = WASM_VECTOR_LEN;
|
|
394
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
395
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
577
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
578
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
396
579
|
},
|
|
397
|
-
|
|
580
|
+
__wbg___wbindgen_is_string_fc456fee5d3317de: function(arg0) {
|
|
398
581
|
const ret = typeof(arg0) === 'string';
|
|
399
582
|
return ret;
|
|
400
583
|
},
|
|
401
|
-
|
|
584
|
+
__wbg___wbindgen_is_undefined_be5b34249ff1fc15: function(arg0) {
|
|
402
585
|
const ret = arg0 === undefined;
|
|
403
586
|
return ret;
|
|
404
587
|
},
|
|
405
|
-
|
|
588
|
+
__wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
|
|
406
589
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
407
590
|
},
|
|
408
591
|
__wbg_error_757e9472f8410341: function(arg0, arg1) {
|
|
@@ -416,61 +599,61 @@ function __wbg_get_imports() {
|
|
|
416
599
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
417
600
|
}
|
|
418
601
|
},
|
|
419
|
-
|
|
420
|
-
const ret = new
|
|
602
|
+
__wbg_new_37eb45aaf5eeb820: function() {
|
|
603
|
+
const ret = new Array();
|
|
421
604
|
return ret;
|
|
422
605
|
},
|
|
423
|
-
|
|
606
|
+
__wbg_new_7075786089b89c5e: function() {
|
|
424
607
|
const ret = new Map();
|
|
425
608
|
return ret;
|
|
426
609
|
},
|
|
427
|
-
|
|
428
|
-
const ret = new
|
|
610
|
+
__wbg_new_bb74001155cb8ca8: function() {
|
|
611
|
+
const ret = new Error();
|
|
429
612
|
return ret;
|
|
430
613
|
},
|
|
431
|
-
|
|
432
|
-
const ret = new
|
|
614
|
+
__wbg_new_cd4348290afae586: function() {
|
|
615
|
+
const ret = new Object();
|
|
433
616
|
return ret;
|
|
434
617
|
},
|
|
435
618
|
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
436
619
|
const ret = arg0.now();
|
|
437
620
|
return ret;
|
|
438
621
|
},
|
|
439
|
-
|
|
622
|
+
__wbg_performance_7e4e4494fdc9d07a: function(arg0) {
|
|
440
623
|
const ret = arg0.performance;
|
|
441
624
|
return ret;
|
|
442
625
|
},
|
|
443
|
-
|
|
626
|
+
__wbg_set_8282f7e0d2d01336: function(arg0, arg1, arg2) {
|
|
444
627
|
const ret = arg0.set(arg1, arg2);
|
|
445
628
|
return ret;
|
|
446
629
|
},
|
|
447
|
-
|
|
448
|
-
arg0[arg1] = arg2;
|
|
449
|
-
},
|
|
450
|
-
__wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
|
|
630
|
+
__wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
|
|
451
631
|
arg0[arg1 >>> 0] = arg2;
|
|
452
632
|
},
|
|
453
|
-
|
|
633
|
+
__wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
|
|
634
|
+
arg0[arg1] = arg2;
|
|
635
|
+
},
|
|
636
|
+
__wbg_stack_575c4e0918581b9c: function(arg0, arg1) {
|
|
454
637
|
const ret = arg1.stack;
|
|
455
638
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
456
639
|
const len1 = WASM_VECTOR_LEN;
|
|
457
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
458
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
640
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
641
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
459
642
|
},
|
|
460
|
-
|
|
461
|
-
const ret = typeof
|
|
643
|
+
__wbg_static_accessor_GLOBAL_THIS_003ee833af9699fc: function() {
|
|
644
|
+
const ret = typeof globalThis === 'undefined' ? undefined : globalThis;
|
|
462
645
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
463
646
|
},
|
|
464
|
-
|
|
465
|
-
const ret = typeof
|
|
647
|
+
__wbg_static_accessor_GLOBAL_e4293fb22cbe77da: function() {
|
|
648
|
+
const ret = typeof global === 'undefined' ? undefined : global;
|
|
466
649
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
467
650
|
},
|
|
468
|
-
|
|
469
|
-
const ret = typeof self === 'undefined' ?
|
|
651
|
+
__wbg_static_accessor_SELF_53bb20457401453d: function() {
|
|
652
|
+
const ret = typeof self === 'undefined' ? undefined : self;
|
|
470
653
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
471
654
|
},
|
|
472
|
-
|
|
473
|
-
const ret = typeof window === 'undefined' ?
|
|
655
|
+
__wbg_static_accessor_WINDOW_b5e0810bfecb7feb: function() {
|
|
656
|
+
const ret = typeof window === 'undefined' ? undefined : window;
|
|
474
657
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
475
658
|
},
|
|
476
659
|
__wbindgen_generic_0000000000000001: function(arg0) {
|
|
@@ -495,12 +678,11 @@ function __wbg_get_imports() {
|
|
|
495
678
|
},
|
|
496
679
|
__wbindgen_init_externref_table: function() {
|
|
497
680
|
const table = wasm.__wbindgen_externrefs;
|
|
498
|
-
const offset = table.grow(4);
|
|
499
681
|
table.set(0, undefined);
|
|
500
|
-
table.set(
|
|
501
|
-
table.set(
|
|
502
|
-
table.set(
|
|
503
|
-
table.set(
|
|
682
|
+
table.set(1024, undefined);
|
|
683
|
+
table.set(1025, null);
|
|
684
|
+
table.set(1026, true);
|
|
685
|
+
table.set(1027, false);
|
|
504
686
|
},
|
|
505
687
|
};
|
|
506
688
|
return {
|
|
@@ -524,7 +706,8 @@ function getDataViewMemory0() {
|
|
|
524
706
|
}
|
|
525
707
|
|
|
526
708
|
function getStringFromWasm0(ptr, len) {
|
|
527
|
-
|
|
709
|
+
ptr = ptr >>> 0;
|
|
710
|
+
return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
528
711
|
}
|
|
529
712
|
|
|
530
713
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -582,18 +765,18 @@ function takeFromExternrefTable0(idx) {
|
|
|
582
765
|
return value;
|
|
583
766
|
}
|
|
584
767
|
|
|
585
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
768
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
586
769
|
cachedTextDecoder.decode();
|
|
587
770
|
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
588
771
|
let numBytesDecoded = 0;
|
|
589
|
-
function decodeText(
|
|
590
|
-
numBytesDecoded +=
|
|
772
|
+
function decodeText(bytes) {
|
|
773
|
+
numBytesDecoded += bytes.length;
|
|
591
774
|
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
592
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
775
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
593
776
|
cachedTextDecoder.decode();
|
|
594
|
-
numBytesDecoded =
|
|
777
|
+
numBytesDecoded = bytes.length;
|
|
595
778
|
}
|
|
596
|
-
return cachedTextDecoder.decode(
|
|
779
|
+
return cachedTextDecoder.decode(bytes);
|
|
597
780
|
}
|
|
598
781
|
|
|
599
782
|
const cachedTextEncoder = new TextEncoder();
|
|
@@ -681,9 +864,17 @@ function initSync(module) {
|
|
|
681
864
|
return __wbg_finalize_init(instance, module);
|
|
682
865
|
}
|
|
683
866
|
|
|
867
|
+
let __wbg_init_promise;
|
|
684
868
|
async function __wbg_init(module_or_path) {
|
|
685
869
|
if (wasm !== undefined) return wasm;
|
|
870
|
+
if (__wbg_init_promise === undefined) {
|
|
871
|
+
__wbg_init_promise = __wbg_init_once(module_or_path);
|
|
872
|
+
__wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
|
|
873
|
+
}
|
|
874
|
+
return __wbg_init_promise;
|
|
875
|
+
}
|
|
686
876
|
|
|
877
|
+
async function __wbg_init_once(module_or_path) {
|
|
687
878
|
|
|
688
879
|
if (module_or_path !== undefined) {
|
|
689
880
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
Binary file
|
|
@@ -8,20 +8,24 @@ export const analyzeDocumentFacts: (a: number, b: number, c: number, d: number,
|
|
|
8
8
|
export const analyzeJson: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
9
9
|
export const asciiCapabilities: () => [number, number, number];
|
|
10
10
|
export const asciiSupportedDiagrams: () => [number, number, number];
|
|
11
|
+
export const describeThemeSupport: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
11
12
|
export const diagramFamilyCapabilities: () => [number, number, number];
|
|
12
13
|
export const edgeGeometryJson: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
14
|
+
export const exportThemePreset: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
13
15
|
export const layoutJson: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
14
16
|
export const lintRuleCatalog: () => [number, number, number];
|
|
17
|
+
export const materializeTheme: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
15
18
|
export const packageVersion: () => [number, number];
|
|
16
19
|
export const parseJson: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
17
|
-
export const presentationCatalog: () => [number, number, number];
|
|
18
20
|
export const renderAscii: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
19
21
|
export const renderSvg: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
22
|
+
export const renderSvgResult: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
20
23
|
export const runtimeCatalog: () => [number, number, number];
|
|
21
24
|
export const start: () => void;
|
|
22
25
|
export const supportedDiagrams: () => [number, number, number];
|
|
23
26
|
export const supportedThemes: () => [number, number, number];
|
|
24
27
|
export const svgPlanJson: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
28
|
+
export const themeCatalog: () => [number, number, number];
|
|
25
29
|
export const transportApiVersion: () => number;
|
|
26
30
|
export const validate: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
27
31
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|