kordweb 0.5.10 → 0.5.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.
Files changed (3) hide show
  1. package/klib.js +30 -30
  2. package/klib_bg.wasm +0 -0
  3. package/package.json +1 -1
package/klib.js CHANGED
@@ -1,6 +1,26 @@
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
+
4
24
  const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
5
25
 
6
26
  cachedTextDecoder.decode();
@@ -18,12 +38,6 @@ function getStringFromWasm0(ptr, len) {
18
38
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
19
39
  }
20
40
 
21
- const heap = new Array(128).fill(undefined);
22
-
23
- heap.push(undefined, null, true, false);
24
-
25
- let heap_next = heap.length;
26
-
27
41
  function addHeapObject(obj) {
28
42
  if (heap_next === heap.length) heap.push(heap.length + 1);
29
43
  const idx = heap_next;
@@ -33,20 +47,6 @@ function addHeapObject(obj) {
33
47
  return idx;
34
48
  }
35
49
 
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,21 +1345,21 @@ async function load(module, imports) {
1345
1345
  function getImports() {
1346
1346
  const imports = {};
1347
1347
  imports.wbg = {};
1348
- imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1349
- const ret = getStringFromWasm0(arg0, arg1);
1350
- return addHeapObject(ret);
1351
- };
1352
1348
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
1353
1349
  takeObject(arg0);
1354
1350
  };
1355
- imports.wbg.__wbg_kordnote_new = function(arg0) {
1356
- const ret = KordNote.__wrap(arg0);
1351
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
1352
+ const ret = getStringFromWasm0(arg0, arg1);
1357
1353
  return addHeapObject(ret);
1358
1354
  };
1359
1355
  imports.wbg.__wbg_kordchord_new = function(arg0) {
1360
1356
  const ret = KordChord.__wrap(arg0);
1361
1357
  return addHeapObject(ret);
1362
1358
  };
1359
+ imports.wbg.__wbg_kordnote_new = function(arg0) {
1360
+ const ret = KordNote.__wrap(arg0);
1361
+ return addHeapObject(ret);
1362
+ };
1363
1363
  imports.wbg.__wbindgen_cb_drop = function(arg0) {
1364
1364
  const obj = takeObject(arg0).original;
1365
1365
  if (obj.cnt-- == 1) {
@@ -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_wrapper1089 = function(arg0, arg1, arg2) {
1594
- const ret = makeMutClosure(arg0, arg1, 477, __wbg_adapter_24);
1593
+ imports.wbg.__wbindgen_closure_wrapper1082 = function(arg0, arg1, arg2) {
1594
+ const ret = makeMutClosure(arg0, arg1, 475, __wbg_adapter_24);
1595
1595
  return addHeapObject(ret);
1596
1596
  };
1597
- imports.wbg.__wbindgen_closure_wrapper1468 = function(arg0, arg1, arg2) {
1598
- const ret = makeMutClosure(arg0, arg1, 675, __wbg_adapter_27);
1597
+ imports.wbg.__wbindgen_closure_wrapper1421 = function(arg0, arg1, arg2) {
1598
+ const ret = makeMutClosure(arg0, arg1, 656, __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.10",
7
+ "version": "0.5.11",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",