kordweb 0.5.9 → 0.5.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.
Files changed (3) hide show
  1. package/klib.js +27 -27
  2. package/klib_bg.wasm +0 -0
  3. package/package.json +1 -1
package/klib.js CHANGED
@@ -1,26 +1,6 @@
1
1
  const lAudioContext = (typeof AudioContext !== 'undefined' ? AudioContext : (typeof webkitAudioContext !== 'undefined' ? webkitAudioContext : undefined));
2
2
  let wasm;
3
3
 
4
- const heap = new Array(128).fill(undefined);
5
-
6
- heap.push(undefined, null, true, false);
7
-
8
- function getObject(idx) { return heap[idx]; }
9
-
10
- let heap_next = heap.length;
11
-
12
- function dropObject(idx) {
13
- if (idx < 132) return;
14
- heap[idx] = heap_next;
15
- heap_next = idx;
16
- }
17
-
18
- function takeObject(idx) {
19
- const ret = getObject(idx);
20
- dropObject(idx);
21
- return ret;
22
- }
23
-
24
4
  const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
25
5
 
26
6
  cachedTextDecoder.decode();
@@ -38,6 +18,12 @@ function getStringFromWasm0(ptr, len) {
38
18
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
39
19
  }
40
20
 
21
+ const heap = new Array(128).fill(undefined);
22
+
23
+ heap.push(undefined, null, true, false);
24
+
25
+ let heap_next = heap.length;
26
+
41
27
  function addHeapObject(obj) {
42
28
  if (heap_next === heap.length) heap.push(heap.length + 1);
43
29
  const idx = heap_next;
@@ -47,6 +33,20 @@ function addHeapObject(obj) {
47
33
  return idx;
48
34
  }
49
35
 
36
+ function getObject(idx) { return heap[idx]; }
37
+
38
+ function dropObject(idx) {
39
+ if (idx < 132) return;
40
+ heap[idx] = heap_next;
41
+ heap_next = idx;
42
+ }
43
+
44
+ function takeObject(idx) {
45
+ const ret = getObject(idx);
46
+ dropObject(idx);
47
+ return ret;
48
+ }
49
+
50
50
  function isLikeNone(x) {
51
51
  return x === undefined || x === null;
52
52
  }
@@ -1345,13 +1345,13 @@ async function load(module, imports) {
1345
1345
  function getImports() {
1346
1346
  const imports = {};
1347
1347
  imports.wbg = {};
1348
- imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1349
- takeObject(arg0);
1350
- };
1351
1348
  imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1352
1349
  const ret = getStringFromWasm0(arg0, arg1);
1353
1350
  return addHeapObject(ret);
1354
1351
  };
1352
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1353
+ takeObject(arg0);
1354
+ };
1355
1355
  imports.wbg.__wbg_kordnote_new = function(arg0) {
1356
1356
  const ret = KordNote.__wrap(arg0);
1357
1357
  return addHeapObject(ret);
@@ -1590,12 +1590,12 @@ function getImports() {
1590
1590
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
1591
1591
  throw new Error(getStringFromWasm0(arg0, arg1));
1592
1592
  };
1593
- imports.wbg.__wbindgen_closure_wrapper1088 = function(arg0, arg1, arg2) {
1594
- const ret = makeMutClosure(arg0, arg1, 476, __wbg_adapter_24);
1593
+ imports.wbg.__wbindgen_closure_wrapper1089 = function(arg0, arg1, arg2) {
1594
+ const ret = makeMutClosure(arg0, arg1, 477, __wbg_adapter_24);
1595
1595
  return addHeapObject(ret);
1596
1596
  };
1597
- imports.wbg.__wbindgen_closure_wrapper1467 = function(arg0, arg1, arg2) {
1598
- const ret = makeMutClosure(arg0, arg1, 674, __wbg_adapter_27);
1597
+ imports.wbg.__wbindgen_closure_wrapper1468 = function(arg0, arg1, arg2) {
1598
+ const ret = makeMutClosure(arg0, arg1, 675, __wbg_adapter_27);
1599
1599
  return addHeapObject(ret);
1600
1600
  };
1601
1601
 
package/klib_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "Aaron Roney <twitchax@gmail.com>"
5
5
  ],
6
6
  "description": "A tool to easily explore music theory principles.",
7
- "version": "0.5.9",
7
+ "version": "0.5.10",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",