@scalable-vector-audio/sva-wasm 0.9.9 → 0.10.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/package.json CHANGED
@@ -2,7 +2,7 @@
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.9",
5
+ "version": "0.10.0",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
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
- __wbg_arrayBuffer_cf069365574ae596: function(arg0) {
616
+ __wbg_arrayBuffer_12ce4e37de1c4db4: 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
- __wbg_close_04872b8880df714d: function(arg0) {
610
- arg0.close();
611
- },
612
- __wbg_close_5a53a9b7dc3183d6: function(arg0) {
636
+ __wbg_close_70ab6190ca688c15: function(arg0) {
613
637
  const ret = arg0.close();
614
638
  return ret;
615
639
  },
640
+ __wbg_close_cc16ba1a3c2b5e5e: function(arg0) {
641
+ arg0.close();
642
+ },
616
643
  __wbg_composition_new: function(arg0) {
617
644
  const ret = Composition.__wrap(arg0);
618
645
  return ret;
619
646
  },
620
- __wbg_createWritable_bb4cc5683bcd33eb: function(arg0) {
647
+ __wbg_createWritable_f25f4ce345af2814: 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
- __wbg_getDirectoryHandle_de3567647101ea95: function(arg0, arg1, arg2, arg3) {
663
+ __wbg_getDirectoryHandle_cddc0f234540e1ed: function(arg0, arg1, arg2, arg3) {
637
664
  const ret = arg0.getDirectoryHandle(getStringFromWasm0(arg1, arg2), arg3);
638
665
  return ret;
639
666
  },
640
- __wbg_getFileHandle_d57cd7b80db88c5a: function(arg0, arg1, arg2, arg3) {
667
+ __wbg_getFileHandle_373e6b8ae214db45: function(arg0, arg1, arg2, arg3) {
641
668
  const ret = arg0.getFileHandle(getStringFromWasm0(arg1, arg2), arg3);
642
669
  return ret;
643
670
  },
644
- __wbg_getFile_19a5135ed11b0cc6: function(arg0) {
671
+ __wbg_getFile_90b9270549061b2f: 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
- __wbg_keys_e1a0f3ff7adae49d: function(arg0) {
715
+ __wbg_keys_75881e5ab8c61ad3: 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
- __wbg_move_a94ffb1c3b0246b4: function(arg0, arg1, arg2, arg3) {
731
+ __wbg_move_0aece0678174e9a9: function(arg0, arg1, arg2, arg3) {
705
732
  const ret = arg0.move(arg1, getStringFromWasm0(arg2, arg3));
706
733
  return ret;
707
734
  },
708
- __wbg_name_1e1b6f7786707bc7: function(arg0, arg1) {
735
+ __wbg_name_2ed4839f24a6295b: 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;
@@ -716,12 +743,16 @@ function __wbg_get_imports(memory) {
716
743
  const ret = new Int32Array(arg0);
717
744
  return ret;
718
745
  },
746
+ __wbg_new_18cbbd08f4a6d2e8: function() {
747
+ const ret = new MessageChannel();
748
+ return ret;
749
+ },
719
750
  __wbg_new_1da3429bc3c4541c: function(arg0) {
720
751
  const ret = new Uint8Array(arg0);
721
752
  return ret;
722
753
  },
723
- __wbg_new_55dda4767fe71f4d: function() {
724
- const ret = new MessageChannel();
754
+ __wbg_new_703f1fe8bcd48370: function(arg0, arg1) {
755
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
725
756
  return ret;
726
757
  },
727
758
  __wbg_new_8f72ed7c652bf5a2: function(arg0, arg1) {
@@ -746,8 +777,8 @@ function __wbg_get_imports(memory) {
746
777
  const ret = new Object();
747
778
  return ret;
748
779
  },
749
- __wbg_new_e937e83b97b169cc: function(arg0, arg1) {
750
- const ret = new Error(getStringFromWasm0(arg0, arg1));
780
+ __wbg_new_ffa92086ea89f79c: function() {
781
+ const ret = new Array();
751
782
  return ret;
752
783
  },
753
784
  __wbg_new_from_slice_4ee02165f9de919e: function(arg0, arg1) {
@@ -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
- __wbg_next_30c999a4c52f3047: function(arg0) {
810
+ __wbg_next_a8ae70f6bc3514c9: 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
- __wbg_parse_5cfad3badad598fe: function() { return handleError(function (arg0, arg1) {
818
+ __wbg_parse_e20d048d62acc1f3: function() { return handleError(function (arg0, arg1) {
788
819
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
789
820
  return ret;
790
821
  }, arguments); },
791
- __wbg_port1_8c17a3a40e49a6a2: function(arg0) {
822
+ __wbg_port1_6ac95516aebd6db3: function(arg0) {
792
823
  const ret = arg0.port1;
793
824
  return ret;
794
825
  },
795
- __wbg_port2_92342c6194c0d05d: function(arg0) {
826
+ __wbg_port2_54bf0bb57883624d: function(arg0) {
796
827
  const ret = arg0.port2;
797
828
  return ret;
798
829
  },
799
- __wbg_postMessage_11c12f7787ca4e07: function(arg0, arg1) {
830
+ __wbg_postMessage_18b65229ebdfd29e: 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
- __wbg_query_426182b2f0b57172: function(arg0) {
839
+ __wbg_push_bfdf956ba476f65b: function(arg0, arg1) {
840
+ const ret = arg0.push(arg1);
841
+ return ret;
842
+ },
843
+ __wbg_query_00b14a4c5adb7e9f: function(arg0) {
809
844
  const ret = arg0.query();
810
845
  return ret;
811
846
  },
@@ -820,19 +855,19 @@ function __wbg_get_imports(memory) {
820
855
  const ret = Math.random();
821
856
  return ret;
822
857
  },
823
- __wbg_removeEntry_3ccaebddb310a052: function(arg0, arg1, arg2, arg3) {
824
- const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
858
+ __wbg_removeEntry_430fd174b3b776a3: function(arg0, arg1, arg2) {
859
+ const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
825
860
  return ret;
826
861
  },
827
- __wbg_removeEntry_fae566ca9152e762: function(arg0, arg1, arg2) {
828
- const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2));
862
+ __wbg_removeEntry_6df7d1c81d973e6c: function(arg0, arg1, arg2, arg3) {
863
+ const ret = arg0.removeEntry(getStringFromWasm0(arg1, arg2), arg3);
829
864
  return ret;
830
865
  },
831
866
  __wbg_rendering_new: function(arg0) {
832
867
  const ret = Rendering.__wrap(arg0);
833
868
  return ret;
834
869
  },
835
- __wbg_request_d8e25d3054b09f6d: function(arg0, arg1, arg2, arg3) {
870
+ __wbg_request_bb3d5fc4b5185265: 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
- __wbg_set_name_04506456cc13550f: function(arg0, arg1, arg2) {
885
+ __wbg_set_name_7e73155b32c4abf5: 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
- __wbg_set_onmessage_5a8271dadd640af8: function(arg0, arg1) {
891
+ __wbg_set_onmessage_bff726a791376f7b: function(arg0, arg1) {
857
892
  arg0.onmessage = arg1;
858
893
  },
859
- __wbg_set_refusal_57cc626490cabd30: function(arg0, arg1) {
894
+ __wbg_set_refusal_da0e02e854645a43: function(arg0, arg1) {
860
895
  arg0.refusal = arg1;
861
896
  },
862
- __wbg_size_6b02c3d7d03f06be: function(arg0) {
897
+ __wbg_size_d9d3ed7fcabcbd7d: function(arg0) {
863
898
  const ret = arg0.size;
864
899
  return ret;
865
900
  },
866
- __wbg_slice_77f2cf768d231281: function(arg0, arg1, arg2) {
901
+ __wbg_slice_66d2a551909bbef9: 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
- __wbg_warn_1465d8eb8861b666: function(arg0, arg1) {
961
+ __wbg_warn_5d056027be3180fb: function(arg0, arg1) {
927
962
  console.warn(getStringFromWasm0(arg0, arg1));
928
963
  },
929
- __wbg_write_998a02122f24943d: function(arg0, arg1) {
964
+ __wbg_write_d9b048c7e53964ab: 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: 729, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
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: 731, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
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