runmat 0.2.9 → 0.2.11
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 +1 -0
- package/dist/index.d.ts +61 -35
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +134 -75
- package/dist/index.js.map +1 -1
- package/dist/lsp/runmat_lsp.js +8 -0
- package/dist/lsp/runmat_lsp_bg.wasm +0 -0
- package/dist/pkg/runmat_wasm.d.ts +11 -6
- package/dist/pkg/runmat_wasm_bg.js +110 -52
- package/dist/pkg/runmat_wasm_bg.wasm +0 -0
- package/dist/pkg/runmat_wasm_bg.wasm.d.ts +13 -8
- package/dist/pkg-web/runmat_wasm_web.d.ts +24 -14
- package/dist/pkg-web/runmat_wasm_web.js +107 -51
- package/dist/pkg-web/runmat_wasm_web_bg.wasm +0 -0
- package/dist/pkg-web/runmat_wasm_web_bg.wasm.d.ts +13 -8
- package/package.json +1 -1
|
@@ -233,7 +233,7 @@ export function registerFsProvider(bindings) {
|
|
|
233
233
|
}
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
|
-
* @param {
|
|
236
|
+
* @param {any} canvas
|
|
237
237
|
* @returns {Promise<void>}
|
|
238
238
|
*/
|
|
239
239
|
export function registerPlotCanvas(canvas) {
|
|
@@ -243,7 +243,7 @@ export function registerPlotCanvas(canvas) {
|
|
|
243
243
|
|
|
244
244
|
/**
|
|
245
245
|
* @param {number} handle
|
|
246
|
-
* @param {
|
|
246
|
+
* @param {any} canvas
|
|
247
247
|
* @returns {Promise<void>}
|
|
248
248
|
*/
|
|
249
249
|
export function registerFigureCanvas(handle, canvas) {
|
|
@@ -284,6 +284,66 @@ export function renderCurrentFigureScene(handle) {
|
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
+
/**
|
|
288
|
+
* @param {any} canvas
|
|
289
|
+
* @returns {Promise<number>}
|
|
290
|
+
*/
|
|
291
|
+
export function createPlotSurface(canvas) {
|
|
292
|
+
const ret = wasm.createPlotSurface(canvas);
|
|
293
|
+
return ret;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* @param {number} surface_id
|
|
298
|
+
*/
|
|
299
|
+
export function destroyPlotSurface(surface_id) {
|
|
300
|
+
wasm.destroyPlotSurface(surface_id);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* @param {number} surface_id
|
|
305
|
+
* @param {number} width
|
|
306
|
+
* @param {number} height
|
|
307
|
+
*/
|
|
308
|
+
export function resizePlotSurface(surface_id, width, height) {
|
|
309
|
+
const ret = wasm.resizePlotSurface(surface_id, width, height);
|
|
310
|
+
if (ret[1]) {
|
|
311
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* @param {number} surface_id
|
|
317
|
+
* @param {number} handle
|
|
318
|
+
*/
|
|
319
|
+
export function bindSurfaceToFigure(surface_id, handle) {
|
|
320
|
+
const ret = wasm.bindSurfaceToFigure(surface_id, handle);
|
|
321
|
+
if (ret[1]) {
|
|
322
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* @param {number} surface_id
|
|
328
|
+
*/
|
|
329
|
+
export function presentSurface(surface_id) {
|
|
330
|
+
const ret = wasm.presentSurface(surface_id);
|
|
331
|
+
if (ret[1]) {
|
|
332
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* @param {number} surface_id
|
|
338
|
+
* @param {number} handle
|
|
339
|
+
*/
|
|
340
|
+
export function presentFigureOnSurface(surface_id, handle) {
|
|
341
|
+
const ret = wasm.presentFigureOnSurface(surface_id, handle);
|
|
342
|
+
if (ret[1]) {
|
|
343
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
287
347
|
/**
|
|
288
348
|
* @returns {number}
|
|
289
349
|
*/
|
|
@@ -423,6 +483,18 @@ export function subscribeRuntimeLog(callback) {
|
|
|
423
483
|
return ret[0] >>> 0;
|
|
424
484
|
}
|
|
425
485
|
|
|
486
|
+
/**
|
|
487
|
+
* @param {string} filter
|
|
488
|
+
*/
|
|
489
|
+
export function setLogFilter(filter) {
|
|
490
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
491
|
+
const len0 = WASM_VECTOR_LEN;
|
|
492
|
+
const ret = wasm.setLogFilter(ptr0, len0);
|
|
493
|
+
if (ret[1]) {
|
|
494
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
426
498
|
/**
|
|
427
499
|
* @param {number} id
|
|
428
500
|
*/
|
|
@@ -459,15 +531,15 @@ export function initRunMat(options) {
|
|
|
459
531
|
}
|
|
460
532
|
|
|
461
533
|
function __wbg_adapter_54(arg0, arg1, arg2) {
|
|
462
|
-
wasm.
|
|
534
|
+
wasm.closure5503_externref_shim(arg0, arg1, arg2);
|
|
463
535
|
}
|
|
464
536
|
|
|
465
537
|
function __wbg_adapter_57(arg0, arg1, arg2) {
|
|
466
|
-
wasm.
|
|
538
|
+
wasm.closure5510_externref_shim(arg0, arg1, arg2);
|
|
467
539
|
}
|
|
468
540
|
|
|
469
|
-
function
|
|
470
|
-
wasm.
|
|
541
|
+
function __wbg_adapter_556(arg0, arg1, arg2, arg3) {
|
|
542
|
+
wasm.closure5554_externref_shim(arg0, arg1, arg2, arg3);
|
|
471
543
|
}
|
|
472
544
|
|
|
473
545
|
const __wbindgen_enum_GpuErrorFilter = ["validation", "out-of-memory", "internal"];
|
|
@@ -505,16 +577,13 @@ export class RunMatWasm {
|
|
|
505
577
|
}
|
|
506
578
|
/**
|
|
507
579
|
* @param {string} source
|
|
508
|
-
* @returns {any}
|
|
580
|
+
* @returns {Promise<any>}
|
|
509
581
|
*/
|
|
510
582
|
execute(source) {
|
|
511
583
|
const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
512
584
|
const len0 = WASM_VECTOR_LEN;
|
|
513
585
|
const ret = wasm.runmatwasm_execute(this.__wbg_ptr, ptr0, len0);
|
|
514
|
-
|
|
515
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
516
|
-
}
|
|
517
|
-
return takeFromExternrefTable0(ret[0]);
|
|
586
|
+
return ret;
|
|
518
587
|
}
|
|
519
588
|
resetSession() {
|
|
520
589
|
const ret = wasm.runmatwasm_resetSession(this.__wbg_ptr);
|
|
@@ -545,30 +614,6 @@ export class RunMatWasm {
|
|
|
545
614
|
throw takeFromExternrefTable0(ret[0]);
|
|
546
615
|
}
|
|
547
616
|
}
|
|
548
|
-
/**
|
|
549
|
-
* @param {string} request_id
|
|
550
|
-
* @param {any} value
|
|
551
|
-
* @returns {any}
|
|
552
|
-
*/
|
|
553
|
-
resumeInput(request_id, value) {
|
|
554
|
-
const ptr0 = passStringToWasm0(request_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
555
|
-
const len0 = WASM_VECTOR_LEN;
|
|
556
|
-
const ret = wasm.runmatwasm_resumeInput(this.__wbg_ptr, ptr0, len0, value);
|
|
557
|
-
if (ret[2]) {
|
|
558
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
559
|
-
}
|
|
560
|
-
return takeFromExternrefTable0(ret[0]);
|
|
561
|
-
}
|
|
562
|
-
/**
|
|
563
|
-
* @returns {any}
|
|
564
|
-
*/
|
|
565
|
-
pendingStdinRequests() {
|
|
566
|
-
const ret = wasm.runmatwasm_pendingStdinRequests(this.__wbg_ptr);
|
|
567
|
-
if (ret[2]) {
|
|
568
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
569
|
-
}
|
|
570
|
-
return takeFromExternrefTable0(ret[0]);
|
|
571
|
-
}
|
|
572
617
|
/**
|
|
573
618
|
* @param {boolean} enabled
|
|
574
619
|
*/
|
|
@@ -592,14 +637,11 @@ export class RunMatWasm {
|
|
|
592
637
|
/**
|
|
593
638
|
* @param {any} selector
|
|
594
639
|
* @param {any} options
|
|
595
|
-
* @returns {any}
|
|
640
|
+
* @returns {Promise<any>}
|
|
596
641
|
*/
|
|
597
642
|
materializeVariable(selector, options) {
|
|
598
643
|
const ret = wasm.runmatwasm_materializeVariable(this.__wbg_ptr, selector, options);
|
|
599
|
-
|
|
600
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
601
|
-
}
|
|
602
|
-
return takeFromExternrefTable0(ret[0]);
|
|
644
|
+
return ret;
|
|
603
645
|
}
|
|
604
646
|
/**
|
|
605
647
|
* @returns {any}
|
|
@@ -880,10 +922,6 @@ function __wbg_get_imports() {
|
|
|
880
922
|
imports.wbg.__wbg_end_9cc33f189e27f3fd = function(arg0) {
|
|
881
923
|
arg0.end();
|
|
882
924
|
};
|
|
883
|
-
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
884
|
-
const ret = Object.entries(arg0);
|
|
885
|
-
return ret;
|
|
886
|
-
};
|
|
887
925
|
imports.wbg.__wbg_error_15b28e2be7953dc9 = function(arg0) {
|
|
888
926
|
const ret = arg0.error;
|
|
889
927
|
return ret;
|
|
@@ -1022,6 +1060,10 @@ function __wbg_get_imports() {
|
|
|
1022
1060
|
const ret = arg0.height;
|
|
1023
1061
|
return ret;
|
|
1024
1062
|
};
|
|
1063
|
+
imports.wbg.__wbg_height_e3c322f23d99ad2f = function(arg0) {
|
|
1064
|
+
const ret = arg0.height;
|
|
1065
|
+
return ret;
|
|
1066
|
+
};
|
|
1025
1067
|
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
1026
1068
|
let result;
|
|
1027
1069
|
try {
|
|
@@ -1082,10 +1124,10 @@ function __wbg_get_imports() {
|
|
|
1082
1124
|
const ret = result;
|
|
1083
1125
|
return ret;
|
|
1084
1126
|
};
|
|
1085
|
-
imports.wbg.
|
|
1127
|
+
imports.wbg.__wbg_instanceof_HtmlCanvasElement_2ea67072a7624ac5 = function(arg0) {
|
|
1086
1128
|
let result;
|
|
1087
1129
|
try {
|
|
1088
|
-
result = arg0 instanceof
|
|
1130
|
+
result = arg0 instanceof HTMLCanvasElement;
|
|
1089
1131
|
} catch (_) {
|
|
1090
1132
|
result = false;
|
|
1091
1133
|
}
|
|
@@ -1112,6 +1154,16 @@ function __wbg_get_imports() {
|
|
|
1112
1154
|
const ret = result;
|
|
1113
1155
|
return ret;
|
|
1114
1156
|
};
|
|
1157
|
+
imports.wbg.__wbg_instanceof_OffscreenCanvas_d55760945f91bf51 = function(arg0) {
|
|
1158
|
+
let result;
|
|
1159
|
+
try {
|
|
1160
|
+
result = arg0 instanceof OffscreenCanvas;
|
|
1161
|
+
} catch (_) {
|
|
1162
|
+
result = false;
|
|
1163
|
+
}
|
|
1164
|
+
const ret = result;
|
|
1165
|
+
return ret;
|
|
1166
|
+
};
|
|
1115
1167
|
imports.wbg.__wbg_instanceof_Promise_935168b8f4b49db3 = function(arg0) {
|
|
1116
1168
|
let result;
|
|
1117
1169
|
try {
|
|
@@ -1370,7 +1422,7 @@ function __wbg_get_imports() {
|
|
|
1370
1422
|
const a = state0.a;
|
|
1371
1423
|
state0.a = 0;
|
|
1372
1424
|
try {
|
|
1373
|
-
return
|
|
1425
|
+
return __wbg_adapter_556(a, state0.b, arg0, arg1);
|
|
1374
1426
|
} finally {
|
|
1375
1427
|
state0.a = a;
|
|
1376
1428
|
}
|
|
@@ -1722,6 +1774,10 @@ function __wbg_get_imports() {
|
|
|
1722
1774
|
const ret = arg0.width;
|
|
1723
1775
|
return ret;
|
|
1724
1776
|
};
|
|
1777
|
+
imports.wbg.__wbg_width_8fe4e8f77479c2a6 = function(arg0) {
|
|
1778
|
+
const ret = arg0.width;
|
|
1779
|
+
return ret;
|
|
1780
|
+
};
|
|
1725
1781
|
imports.wbg.__wbg_width_f0759bd8bad335bd = function(arg0) {
|
|
1726
1782
|
const ret = arg0.width;
|
|
1727
1783
|
return ret;
|
|
@@ -1767,12 +1823,12 @@ function __wbg_get_imports() {
|
|
|
1767
1823
|
const ret = false;
|
|
1768
1824
|
return ret;
|
|
1769
1825
|
};
|
|
1770
|
-
imports.wbg.
|
|
1771
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1826
|
+
imports.wbg.__wbindgen_closure_wrapper16193 = function(arg0, arg1, arg2) {
|
|
1827
|
+
const ret = makeMutClosure(arg0, arg1, 5504, __wbg_adapter_54);
|
|
1772
1828
|
return ret;
|
|
1773
1829
|
};
|
|
1774
|
-
imports.wbg.
|
|
1775
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1830
|
+
imports.wbg.__wbindgen_closure_wrapper16667 = function(arg0, arg1, arg2) {
|
|
1831
|
+
const ret = makeMutClosure(arg0, arg1, 5511, __wbg_adapter_57);
|
|
1776
1832
|
return ret;
|
|
1777
1833
|
};
|
|
1778
1834
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_runmatwasm_free: (a: number, b: number) => void;
|
|
5
|
-
export const runmatwasm_execute: (a: number, b: number, c: number) =>
|
|
5
|
+
export const runmatwasm_execute: (a: number, b: number, c: number) => any;
|
|
6
6
|
export const runmatwasm_resetSession: (a: number) => [number, number];
|
|
7
7
|
export const runmatwasm_cancelExecution: (a: number) => void;
|
|
8
8
|
export const runmatwasm_cancelPendingRequests: (a: number) => void;
|
|
9
9
|
export const runmatwasm_setLanguageCompat: (a: number, b: number, c: number) => void;
|
|
10
10
|
export const runmatwasm_setInputHandler: (a: number, b: any) => [number, number];
|
|
11
|
-
export const runmatwasm_resumeInput: (a: number, b: number, c: number, d: any) => [number, number, number];
|
|
12
|
-
export const runmatwasm_pendingStdinRequests: (a: number) => [number, number, number];
|
|
13
11
|
export const runmatwasm_setFusionPlanEnabled: (a: number, b: number) => void;
|
|
14
12
|
export const runmatwasm_fusionPlanForSource: (a: number, b: number, c: number) => [number, number, number];
|
|
15
|
-
export const runmatwasm_materializeVariable: (a: number, b: any, c: any) =>
|
|
13
|
+
export const runmatwasm_materializeVariable: (a: number, b: any, c: any) => any;
|
|
16
14
|
export const runmatwasm_stats: (a: number) => [number, number, number];
|
|
17
15
|
export const runmatwasm_clearWorkspace: (a: number) => void;
|
|
18
16
|
export const runmatwasm_telemetryConsent: (a: number) => number;
|
|
@@ -23,8 +21,14 @@ export const runmatwasm_dispose: (a: number) => void;
|
|
|
23
21
|
export const registerFsProvider: (a: any) => [number, number];
|
|
24
22
|
export const registerPlotCanvas: (a: any) => any;
|
|
25
23
|
export const registerFigureCanvas: (a: number, b: any) => any;
|
|
24
|
+
export const deregisterFigureCanvas: (a: number) => void;
|
|
26
25
|
export const resizeFigureCanvas: (a: number, b: number, c: number) => [number, number];
|
|
27
26
|
export const renderCurrentFigureScene: (a: number) => [number, number];
|
|
27
|
+
export const createPlotSurface: (a: any) => any;
|
|
28
|
+
export const resizePlotSurface: (a: number, b: number, c: number) => [number, number];
|
|
29
|
+
export const bindSurfaceToFigure: (a: number, b: number) => [number, number];
|
|
30
|
+
export const presentSurface: (a: number) => [number, number];
|
|
31
|
+
export const presentFigureOnSurface: (a: number, b: number) => [number, number];
|
|
28
32
|
export const configureSubplot: (a: number, b: number, c: number) => [number, number];
|
|
29
33
|
export const setHoldMode: (a: any) => [number, number, number];
|
|
30
34
|
export const clearFigure: (a: any) => [number, number, number];
|
|
@@ -36,6 +40,7 @@ export const onFigureEvent: (a: any) => [number, number];
|
|
|
36
40
|
export const subscribeStdout: (a: any) => [number, number, number];
|
|
37
41
|
export const unsubscribeStdout: (a: number) => void;
|
|
38
42
|
export const subscribeRuntimeLog: (a: any) => [number, number, number];
|
|
43
|
+
export const setLogFilter: (a: number, b: number) => [number, number];
|
|
39
44
|
export const unsubscribeRuntimeLog: (a: number) => void;
|
|
40
45
|
export const subscribeTraceEvents: (a: any) => [number, number, number];
|
|
41
46
|
export const unsubscribeTraceEvents: (a: number) => void;
|
|
@@ -44,7 +49,7 @@ export const deregisterPlotCanvas: () => void;
|
|
|
44
49
|
export const newFigureHandle: () => number;
|
|
45
50
|
export const currentFigureHandle: () => number;
|
|
46
51
|
export const selectFigure: (a: number) => void;
|
|
47
|
-
export const
|
|
52
|
+
export const destroyPlotSurface: (a: number) => void;
|
|
48
53
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
49
54
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
50
55
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
@@ -53,7 +58,7 @@ export const __wbindgen_export_4: WebAssembly.Table;
|
|
|
53
58
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
54
59
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
55
60
|
export const __externref_table_dealloc: (a: number) => void;
|
|
56
|
-
export const
|
|
57
|
-
export const
|
|
58
|
-
export const
|
|
61
|
+
export const closure5503_externref_shim: (a: number, b: number, c: any) => void;
|
|
62
|
+
export const closure5510_externref_shim: (a: number, b: number, c: any) => void;
|
|
63
|
+
export const closure5554_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
59
64
|
export const __wbindgen_start: () => void;
|