@scalable-vector-audio/sva-wasm 0.9.8 → 0.9.10
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/package.json +2 -2
- package/sva_wasm.d.ts +12 -0
- package/sva_wasm.js +72 -37
- package/sva_wasm_bg.wasm +0 -0
package/package.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"name": "@scalable-vector-audio/sva-wasm",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "JS bindings: a composition a page fills node by node, rendered in the browser",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.10",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/
|
|
9
|
+
"url": "https://github.com/fredrikryden/scalable-vector-audio"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"snippets",
|
package/sva_wasm.d.ts
CHANGED
|
@@ -293,6 +293,16 @@ export class Stream {
|
|
|
293
293
|
|
|
294
294
|
export function initThreadPool(num_threads: number): Promise<any>;
|
|
295
295
|
|
|
296
|
+
/**
|
|
297
|
+
* `sva-cli outline` of a node's body; spans count from the body.
|
|
298
|
+
*/
|
|
299
|
+
export function outline(text: string): any;
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Each reading `render` answers: `name`, `takes`, `reads`, `help`.
|
|
303
|
+
*/
|
|
304
|
+
export function readings(): Array<any>;
|
|
305
|
+
|
|
296
306
|
/**
|
|
297
307
|
* Once, from a worker of a cross-origin isolated page. The module's subscriber hears it start
|
|
298
308
|
* as an `EngineBoot`.
|
|
@@ -335,6 +345,8 @@ export interface InitOutput {
|
|
|
335
345
|
readonly composition_subscribe: (a: number, b: any) => void;
|
|
336
346
|
readonly composition_unsubscribe: (a: number) => void;
|
|
337
347
|
readonly initThreadPool: (a: number) => any;
|
|
348
|
+
readonly outline: (a: number, b: number) => [number, number, number];
|
|
349
|
+
readonly readings: () => [number, number, number];
|
|
338
350
|
readonly rendering_channels: (a: number) => number;
|
|
339
351
|
readonly rendering_duration_secs: (a: number) => number;
|
|
340
352
|
readonly rendering_representations: (a: number) => [number, number, number];
|
package/sva_wasm.js
CHANGED
|
@@ -452,6 +452,33 @@ export function initThreadPool(num_threads) {
|
|
|
452
452
|
return ret;
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
+
/**
|
|
456
|
+
* `sva-cli outline` of a node's body; spans count from the body.
|
|
457
|
+
* @param {string} text
|
|
458
|
+
* @returns {any}
|
|
459
|
+
*/
|
|
460
|
+
export function outline(text) {
|
|
461
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
462
|
+
const len0 = WASM_VECTOR_LEN;
|
|
463
|
+
const ret = wasm.outline(ptr0, len0);
|
|
464
|
+
if (ret[2]) {
|
|
465
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
466
|
+
}
|
|
467
|
+
return takeFromExternrefTable0(ret[0]);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Each reading `render` answers: `name`, `takes`, `reads`, `help`.
|
|
472
|
+
* @returns {Array<any>}
|
|
473
|
+
*/
|
|
474
|
+
export function readings() {
|
|
475
|
+
const ret = wasm.readings();
|
|
476
|
+
if (ret[2]) {
|
|
477
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
478
|
+
}
|
|
479
|
+
return takeFromExternrefTable0(ret[0]);
|
|
480
|
+
}
|
|
481
|
+
|
|
455
482
|
/**
|
|
456
483
|
* Once, from a worker of a cross-origin isolated page. The module's subscriber hears it start
|
|
457
484
|
* as an `EngineBoot`.
|
|
@@ -586,7 +613,7 @@ function __wbg_get_imports(memory) {
|
|
|
586
613
|
__wbg__wbg_cb_unref_997e73d32238e655: function(arg0) {
|
|
587
614
|
arg0._wbg_cb_unref();
|
|
588
615
|
},
|
|
589
|
-
|
|
616
|
+
__wbg_arrayBuffer_fa4f9eef3fe6db1a: function(arg0) {
|
|
590
617
|
const ret = arg0.arrayBuffer();
|
|
591
618
|
return ret;
|
|
592
619
|
},
|
|
@@ -606,18 +633,18 @@ function __wbg_get_imports(memory) {
|
|
|
606
633
|
const ret = arg0.call(arg1, arg2);
|
|
607
634
|
return ret;
|
|
608
635
|
}, arguments); },
|
|
609
|
-
|
|
636
|
+
__wbg_close_2c07c6d294bc782d: function(arg0) {
|
|
610
637
|
const ret = arg0.close();
|
|
611
638
|
return ret;
|
|
612
639
|
},
|
|
613
|
-
|
|
640
|
+
__wbg_close_498eecd7de00b4ae: function(arg0) {
|
|
614
641
|
arg0.close();
|
|
615
642
|
},
|
|
616
643
|
__wbg_composition_new: function(arg0) {
|
|
617
644
|
const ret = Composition.__wrap(arg0);
|
|
618
645
|
return ret;
|
|
619
646
|
},
|
|
620
|
-
|
|
647
|
+
__wbg_createWritable_aa99006249bf21fd: function(arg0) {
|
|
621
648
|
const ret = arg0.createWritable();
|
|
622
649
|
return ret;
|
|
623
650
|
},
|
|
@@ -633,15 +660,15 @@ function __wbg_get_imports(memory) {
|
|
|
633
660
|
const ret = Array.from(arg0);
|
|
634
661
|
return ret;
|
|
635
662
|
},
|
|
636
|
-
|
|
663
|
+
__wbg_getDirectoryHandle_2013ccb0c026bf01: function(arg0, arg1, arg2, arg3) {
|
|
637
664
|
const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
638
665
|
return ret;
|
|
639
666
|
},
|
|
640
|
-
|
|
667
|
+
__wbg_getFileHandle_db5fbbd3b4697e4c: function(arg0, arg1, arg2, arg3) {
|
|
641
668
|
const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
|
|
642
669
|
return ret;
|
|
643
670
|
},
|
|
644
|
-
|
|
671
|
+
__wbg_getFile_3710e702a5c03309: function(arg0) {
|
|
645
672
|
const ret = arg0.getFile();
|
|
646
673
|
return ret;
|
|
647
674
|
},
|
|
@@ -685,7 +712,7 @@ function __wbg_get_imports(memory) {
|
|
|
685
712
|
const ret = Array.isArray(arg0);
|
|
686
713
|
return ret;
|
|
687
714
|
},
|
|
688
|
-
|
|
715
|
+
__wbg_keys_bf5bd581827721a1: function(arg0) {
|
|
689
716
|
const ret = arg0.keys();
|
|
690
717
|
return ret;
|
|
691
718
|
},
|
|
@@ -701,11 +728,11 @@ function __wbg_get_imports(memory) {
|
|
|
701
728
|
const ret = arg0.length;
|
|
702
729
|
return ret;
|
|
703
730
|
},
|
|
704
|
-
|
|
731
|
+
__wbg_move_d6a292920bb5843a: function(arg0, arg1, arg2, arg3) {
|
|
705
732
|
const ret = arg0.move(arg1, getStringFromWasm0(arg2, arg3));
|
|
706
733
|
return ret;
|
|
707
734
|
},
|
|
708
|
-
|
|
735
|
+
__wbg_name_5fee576e2030ee81: function(arg0, arg1) {
|
|
709
736
|
const ret = arg1.name;
|
|
710
737
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
711
738
|
const len1 = WASM_VECTOR_LEN;
|
|
@@ -720,6 +747,14 @@ function __wbg_get_imports(memory) {
|
|
|
720
747
|
const ret = new Uint8Array(arg0);
|
|
721
748
|
return ret;
|
|
722
749
|
},
|
|
750
|
+
__wbg_new_2922b525a5cf43cc: function() {
|
|
751
|
+
const ret = new MessageChannel();
|
|
752
|
+
return ret;
|
|
753
|
+
},
|
|
754
|
+
__wbg_new_348091abf2beed22: function(arg0, arg1) {
|
|
755
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
756
|
+
return ret;
|
|
757
|
+
},
|
|
723
758
|
__wbg_new_8f72ed7c652bf5a2: function(arg0, arg1) {
|
|
724
759
|
try {
|
|
725
760
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -738,18 +773,14 @@ function __wbg_get_imports(memory) {
|
|
|
738
773
|
state0.a = 0;
|
|
739
774
|
}
|
|
740
775
|
},
|
|
741
|
-
__wbg_new_aab9b8b0e938eced: function(arg0, arg1) {
|
|
742
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
743
|
-
return ret;
|
|
744
|
-
},
|
|
745
|
-
__wbg_new_ae8fd63555276850: function() {
|
|
746
|
-
const ret = new MessageChannel();
|
|
747
|
-
return ret;
|
|
748
|
-
},
|
|
749
776
|
__wbg_new_bebc3f4757acf305: function() {
|
|
750
777
|
const ret = new Object();
|
|
751
778
|
return ret;
|
|
752
779
|
},
|
|
780
|
+
__wbg_new_ffa92086ea89f79c: function() {
|
|
781
|
+
const ret = new Array();
|
|
782
|
+
return ret;
|
|
783
|
+
},
|
|
753
784
|
__wbg_new_from_slice_4ee02165f9de919e: function(arg0, arg1) {
|
|
754
785
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
755
786
|
return ret;
|
|
@@ -776,7 +807,7 @@ function __wbg_get_imports(memory) {
|
|
|
776
807
|
const ret = new Worker(getStringFromWasm0(arg0, arg1));
|
|
777
808
|
return ret;
|
|
778
809
|
},
|
|
779
|
-
|
|
810
|
+
__wbg_next_ba447ad2661a68ee: function(arg0) {
|
|
780
811
|
const ret = arg0.next();
|
|
781
812
|
return ret;
|
|
782
813
|
},
|
|
@@ -784,19 +815,19 @@ function __wbg_get_imports(memory) {
|
|
|
784
815
|
const ret = Array.of(arg0, arg1, arg2);
|
|
785
816
|
return ret;
|
|
786
817
|
},
|
|
787
|
-
|
|
818
|
+
__wbg_parse_e560dc941db3c4d5: function() { return handleError(function (arg0, arg1) {
|
|
788
819
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
789
820
|
return ret;
|
|
790
821
|
}, arguments); },
|
|
791
|
-
|
|
822
|
+
__wbg_port1_1b89b9c31ae2da72: function(arg0) {
|
|
792
823
|
const ret = arg0.port1;
|
|
793
824
|
return ret;
|
|
794
825
|
},
|
|
795
|
-
|
|
826
|
+
__wbg_port2_6fe98871c9650eec: function(arg0) {
|
|
796
827
|
const ret = arg0.port2;
|
|
797
828
|
return ret;
|
|
798
829
|
},
|
|
799
|
-
|
|
830
|
+
__wbg_postMessage_2b397069af3ef6c6: function(arg0, arg1) {
|
|
800
831
|
arg0.postMessage(arg1);
|
|
801
832
|
},
|
|
802
833
|
__wbg_postMessage_8105a302ed002474: function() { return handleError(function (arg0, arg1) {
|
|
@@ -805,7 +836,11 @@ function __wbg_get_imports(memory) {
|
|
|
805
836
|
__wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
|
|
806
837
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
807
838
|
},
|
|
808
|
-
|
|
839
|
+
__wbg_push_bfdf956ba476f65b: function(arg0, arg1) {
|
|
840
|
+
const ret = arg0.push(arg1);
|
|
841
|
+
return ret;
|
|
842
|
+
},
|
|
843
|
+
__wbg_query_ff2fbff36b6b829e: function(arg0) {
|
|
809
844
|
const ret = arg0.query();
|
|
810
845
|
return ret;
|
|
811
846
|
},
|
|
@@ -820,11 +855,11 @@ function __wbg_get_imports(memory) {
|
|
|
820
855
|
const ret = Math.random();
|
|
821
856
|
return ret;
|
|
822
857
|
},
|
|
823
|
-
|
|
858
|
+
__wbg_removeEntry_50f2da8eff624b94: function(arg0, arg1, arg2) {
|
|
824
859
|
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
|
|
825
860
|
return ret;
|
|
826
861
|
},
|
|
827
|
-
|
|
862
|
+
__wbg_removeEntry_fb4647b2ebb4adef: function(arg0, arg1, arg2, arg3) {
|
|
828
863
|
const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
|
|
829
864
|
return ret;
|
|
830
865
|
},
|
|
@@ -832,7 +867,7 @@ function __wbg_get_imports(memory) {
|
|
|
832
867
|
const ret = Rendering.__wrap(arg0);
|
|
833
868
|
return ret;
|
|
834
869
|
},
|
|
835
|
-
|
|
870
|
+
__wbg_request_6f353732912fdd12: function(arg0, arg1, arg2, arg3) {
|
|
836
871
|
const ret = arg0.request(getStringFromWasm0(arg1, arg2), arg3);
|
|
837
872
|
return ret;
|
|
838
873
|
},
|
|
@@ -847,23 +882,23 @@ function __wbg_get_imports(memory) {
|
|
|
847
882
|
__wbg_set_c41f8dbc07a2190f: function(arg0, arg1, arg2) {
|
|
848
883
|
arg0.set(getArrayF32FromWasm0(arg1, arg2));
|
|
849
884
|
},
|
|
850
|
-
|
|
885
|
+
__wbg_set_name_69f7fc9e0992cd23: function(arg0, arg1, arg2) {
|
|
851
886
|
arg0.name = getStringFromWasm0(arg1, arg2);
|
|
852
887
|
},
|
|
853
|
-
|
|
888
|
+
__wbg_set_onmessage_2244c2525c4e0c38: function(arg0, arg1) {
|
|
854
889
|
arg0.onmessage = arg1;
|
|
855
890
|
},
|
|
856
|
-
|
|
891
|
+
__wbg_set_onmessage_56c454b5666bbd7d: function(arg0, arg1) {
|
|
857
892
|
arg0.onmessage = arg1;
|
|
858
893
|
},
|
|
859
|
-
|
|
894
|
+
__wbg_set_refusal_55ae5923cdf3486c: function(arg0, arg1) {
|
|
860
895
|
arg0.refusal = arg1;
|
|
861
896
|
},
|
|
862
|
-
|
|
897
|
+
__wbg_size_6ac94791f75cdb31: function(arg0) {
|
|
863
898
|
const ret = arg0.size;
|
|
864
899
|
return ret;
|
|
865
900
|
},
|
|
866
|
-
|
|
901
|
+
__wbg_slice_3b3ced05c77e20c4: function(arg0, arg1, arg2) {
|
|
867
902
|
const ret = arg0.slice(arg1, arg2);
|
|
868
903
|
return ret;
|
|
869
904
|
},
|
|
@@ -923,10 +958,10 @@ function __wbg_get_imports(memory) {
|
|
|
923
958
|
const ret = Atomics.waitAsync;
|
|
924
959
|
return ret;
|
|
925
960
|
},
|
|
926
|
-
|
|
961
|
+
__wbg_warn_6d1b8c55143bc300: function(arg0, arg1) {
|
|
927
962
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
928
963
|
},
|
|
929
|
-
|
|
964
|
+
__wbg_write_fa19ea81ac94ab9b: function(arg0, arg1) {
|
|
930
965
|
const ret = arg0.write(arg1);
|
|
931
966
|
return ret;
|
|
932
967
|
},
|
|
@@ -936,12 +971,12 @@ function __wbg_get_imports(memory) {
|
|
|
936
971
|
return ret;
|
|
937
972
|
},
|
|
938
973
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
939
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
974
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 543, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
940
975
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d3a5247b0aa3f0ac___convert__closures_____invoke___wasm_bindgen_d3a5247b0aa3f0ac___JsValue__core_ea519e494776717c___result__Result_____wasm_bindgen_d3a5247b0aa3f0ac___JsError___true_);
|
|
941
976
|
return ret;
|
|
942
977
|
},
|
|
943
978
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
944
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
979
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 545, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
945
980
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_d3a5247b0aa3f0ac___convert__closures_____invoke___js_sys_2b088e2931f41c5___futures__task__wait_async_polyfill__MessageEvent______true_);
|
|
946
981
|
return ret;
|
|
947
982
|
},
|
package/sva_wasm_bg.wasm
CHANGED
|
Binary file
|