kordweb 0.7.0 → 0.7.1

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/klib.d.ts CHANGED
@@ -54,59 +54,6 @@ export enum KordModifier {
54
54
  Diminished = 11,
55
55
  }
56
56
  /**
57
- * An enum representing the extension of a chord.
58
- *
59
- * Extensions are not really "special" in the sense that they do not change how the
60
- * chord is interpreted by the system. E.g., an `add2` just adds a 2 to the chord,
61
- * and the chord is still interpreted as a major chord.
62
- */
63
- export enum KordExtension {
64
- /**
65
- * Sus2 extension.
66
- */
67
- Sus2 = 0,
68
- /**
69
- * Sus4 extension.
70
- */
71
- Sus4 = 1,
72
- /**
73
- * Flat 11 extension.
74
- */
75
- Flat11 = 2,
76
- /**
77
- * Flat 13 extension.
78
- */
79
- Flat13 = 3,
80
- /**
81
- * Sharp 13 extension.
82
- */
83
- Sharp13 = 4,
84
- /**
85
- * Add2 extension.
86
- */
87
- Add2 = 5,
88
- /**
89
- * Add4 extension.
90
- */
91
- Add4 = 6,
92
- /**
93
- * Add6 extension.
94
- */
95
- Add6 = 7,
96
- /**
97
- * Add9 extension.
98
- */
99
- Add9 = 8,
100
- /**
101
- * Add11 extension.
102
- */
103
- Add11 = 9,
104
- /**
105
- * Add13 extension.
106
- */
107
- Add13 = 10,
108
- }
109
- /**
110
57
  * An enum representing the interval between two notes.
111
58
  */
112
59
  export enum KordInterval {
@@ -304,6 +251,59 @@ export enum KordInterval {
304
251
  ThreePerfectOctavesAndMajorSeventh = 47,
305
252
  }
306
253
  /**
254
+ * An enum representing the extension of a chord.
255
+ *
256
+ * Extensions are not really "special" in the sense that they do not change how the
257
+ * chord is interpreted by the system. E.g., an `add2` just adds a 2 to the chord,
258
+ * and the chord is still interpreted as a major chord.
259
+ */
260
+ export enum KordExtension {
261
+ /**
262
+ * Sus2 extension.
263
+ */
264
+ Sus2 = 0,
265
+ /**
266
+ * Sus4 extension.
267
+ */
268
+ Sus4 = 1,
269
+ /**
270
+ * Flat 11 extension.
271
+ */
272
+ Flat11 = 2,
273
+ /**
274
+ * Flat 13 extension.
275
+ */
276
+ Flat13 = 3,
277
+ /**
278
+ * Sharp 13 extension.
279
+ */
280
+ Sharp13 = 4,
281
+ /**
282
+ * Add2 extension.
283
+ */
284
+ Add2 = 5,
285
+ /**
286
+ * Add4 extension.
287
+ */
288
+ Add4 = 6,
289
+ /**
290
+ * Add6 extension.
291
+ */
292
+ Add6 = 7,
293
+ /**
294
+ * Add9 extension.
295
+ */
296
+ Add9 = 8,
297
+ /**
298
+ * Add11 extension.
299
+ */
300
+ Add11 = 9,
301
+ /**
302
+ * Add13 extension.
303
+ */
304
+ Add13 = 10,
305
+ }
306
+ /**
307
307
  * The [`Chord`] wrapper.
308
308
  */
309
309
  export class KordChord {
package/klib_bg.js CHANGED
@@ -25,28 +25,6 @@ function takeObject(idx) {
25
25
  return ret;
26
26
  }
27
27
 
28
- function isLikeNone(x) {
29
- return x === undefined || x === null;
30
- }
31
-
32
- let cachedFloat64Memory0 = null;
33
-
34
- function getFloat64Memory0() {
35
- if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
36
- cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
37
- }
38
- return cachedFloat64Memory0;
39
- }
40
-
41
- let cachedInt32Memory0 = null;
42
-
43
- function getInt32Memory0() {
44
- if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
45
- cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
46
- }
47
- return cachedInt32Memory0;
48
- }
49
-
50
28
  const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
51
29
 
52
30
  let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
@@ -76,6 +54,28 @@ function addHeapObject(obj) {
76
54
  return idx;
77
55
  }
78
56
 
57
+ function isLikeNone(x) {
58
+ return x === undefined || x === null;
59
+ }
60
+
61
+ let cachedFloat64Memory0 = null;
62
+
63
+ function getFloat64Memory0() {
64
+ if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
65
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
66
+ }
67
+ return cachedFloat64Memory0;
68
+ }
69
+
70
+ let cachedInt32Memory0 = null;
71
+
72
+ function getInt32Memory0() {
73
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
74
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
75
+ }
76
+ return cachedInt32Memory0;
77
+ }
78
+
79
79
  let WASM_VECTOR_LEN = 0;
80
80
 
81
81
  const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
@@ -222,15 +222,15 @@ function makeMutClosure(arg0, arg1, dtor, f) {
222
222
 
223
223
  return real;
224
224
  }
225
- function __wbg_adapter_24(arg0, arg1, arg2) {
225
+ function __wbg_adapter_32(arg0, arg1, arg2) {
226
226
  wasm.wasm_bindgen__convert__closures__invoke1_mut__h7ae5fa43571d2d1a(arg0, arg1, addHeapObject(arg2));
227
227
  }
228
228
 
229
- function __wbg_adapter_27(arg0, arg1) {
229
+ function __wbg_adapter_35(arg0, arg1) {
230
230
  wasm.wasm_bindgen__convert__closures__invoke0_mut__h9a3cc0c6ffc8f26a(arg0, arg1);
231
231
  }
232
232
 
233
- function __wbg_adapter_30(arg0, arg1) {
233
+ function __wbg_adapter_38(arg0, arg1) {
234
234
  wasm.wasm_bindgen__convert__closures__invoke0_mut__hddbc9bcc7c6455be(arg0, arg1);
235
235
  }
236
236
 
@@ -269,7 +269,7 @@ function getArrayF32FromWasm0(ptr, len) {
269
269
  ptr = ptr >>> 0;
270
270
  return getFloat32Memory0().subarray(ptr / 4, ptr / 4 + len);
271
271
  }
272
- function __wbg_adapter_152(arg0, arg1, arg2, arg3) {
272
+ function __wbg_adapter_176(arg0, arg1, arg2, arg3) {
273
273
  wasm.wasm_bindgen__convert__closures__invoke2_mut__h1c849f10298b6e57(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
274
274
  }
275
275
 
@@ -326,58 +326,6 @@ Sharp11:10,"10":"Sharp11",
326
326
  */
327
327
  Diminished:11,"11":"Diminished", });
328
328
  /**
329
- * An enum representing the extension of a chord.
330
- *
331
- * Extensions are not really "special" in the sense that they do not change how the
332
- * chord is interpreted by the system. E.g., an `add2` just adds a 2 to the chord,
333
- * and the chord is still interpreted as a major chord.
334
- */
335
- export const KordExtension = Object.freeze({
336
- /**
337
- * Sus2 extension.
338
- */
339
- Sus2:0,"0":"Sus2",
340
- /**
341
- * Sus4 extension.
342
- */
343
- Sus4:1,"1":"Sus4",
344
- /**
345
- * Flat 11 extension.
346
- */
347
- Flat11:2,"2":"Flat11",
348
- /**
349
- * Flat 13 extension.
350
- */
351
- Flat13:3,"3":"Flat13",
352
- /**
353
- * Sharp 13 extension.
354
- */
355
- Sharp13:4,"4":"Sharp13",
356
- /**
357
- * Add2 extension.
358
- */
359
- Add2:5,"5":"Add2",
360
- /**
361
- * Add4 extension.
362
- */
363
- Add4:6,"6":"Add4",
364
- /**
365
- * Add6 extension.
366
- */
367
- Add6:7,"7":"Add6",
368
- /**
369
- * Add9 extension.
370
- */
371
- Add9:8,"8":"Add9",
372
- /**
373
- * Add11 extension.
374
- */
375
- Add11:9,"9":"Add11",
376
- /**
377
- * Add13 extension.
378
- */
379
- Add13:10,"10":"Add13", });
380
- /**
381
329
  * An enum representing the interval between two notes.
382
330
  */
383
331
  export const KordInterval = Object.freeze({
@@ -574,6 +522,58 @@ ThreePerfectOctavesAndMinorSeventh:46,"46":"ThreePerfectOctavesAndMinorSeventh",
574
522
  */
575
523
  ThreePerfectOctavesAndMajorSeventh:47,"47":"ThreePerfectOctavesAndMajorSeventh", });
576
524
  /**
525
+ * An enum representing the extension of a chord.
526
+ *
527
+ * Extensions are not really "special" in the sense that they do not change how the
528
+ * chord is interpreted by the system. E.g., an `add2` just adds a 2 to the chord,
529
+ * and the chord is still interpreted as a major chord.
530
+ */
531
+ export const KordExtension = Object.freeze({
532
+ /**
533
+ * Sus2 extension.
534
+ */
535
+ Sus2:0,"0":"Sus2",
536
+ /**
537
+ * Sus4 extension.
538
+ */
539
+ Sus4:1,"1":"Sus4",
540
+ /**
541
+ * Flat 11 extension.
542
+ */
543
+ Flat11:2,"2":"Flat11",
544
+ /**
545
+ * Flat 13 extension.
546
+ */
547
+ Flat13:3,"3":"Flat13",
548
+ /**
549
+ * Sharp 13 extension.
550
+ */
551
+ Sharp13:4,"4":"Sharp13",
552
+ /**
553
+ * Add2 extension.
554
+ */
555
+ Add2:5,"5":"Add2",
556
+ /**
557
+ * Add4 extension.
558
+ */
559
+ Add4:6,"6":"Add4",
560
+ /**
561
+ * Add6 extension.
562
+ */
563
+ Add6:7,"7":"Add6",
564
+ /**
565
+ * Add9 extension.
566
+ */
567
+ Add9:8,"8":"Add9",
568
+ /**
569
+ * Add11 extension.
570
+ */
571
+ Add11:9,"9":"Add11",
572
+ /**
573
+ * Add13 extension.
574
+ */
575
+ Add13:10,"10":"Add13", });
576
+ /**
577
577
  * The [`Chord`] wrapper.
578
578
  */
579
579
  export class KordChord {
@@ -1386,6 +1386,10 @@ export class KordPlaybackHandle {
1386
1386
  }
1387
1387
  }
1388
1388
 
1389
+ export function __wbindgen_object_drop_ref(arg0) {
1390
+ takeObject(arg0);
1391
+ };
1392
+
1389
1393
  export function __wbindgen_cb_drop(arg0) {
1390
1394
  const obj = takeObject(arg0).original;
1391
1395
  if (obj.cnt-- == 1) {
@@ -1396,8 +1400,9 @@ export function __wbindgen_cb_drop(arg0) {
1396
1400
  return ret;
1397
1401
  };
1398
1402
 
1399
- export function __wbindgen_object_drop_ref(arg0) {
1400
- takeObject(arg0);
1403
+ export function __wbindgen_string_new(arg0, arg1) {
1404
+ const ret = getStringFromWasm0(arg0, arg1);
1405
+ return addHeapObject(ret);
1401
1406
  };
1402
1407
 
1403
1408
  export function __wbindgen_number_get(arg0, arg1) {
@@ -1407,13 +1412,8 @@ export function __wbindgen_number_get(arg0, arg1) {
1407
1412
  getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
1408
1413
  };
1409
1414
 
1410
- export function __wbindgen_string_new(arg0, arg1) {
1411
- const ret = getStringFromWasm0(arg0, arg1);
1412
- return addHeapObject(ret);
1413
- };
1414
-
1415
- export function __wbindgen_number_new(arg0) {
1416
- const ret = arg0;
1415
+ export function __wbg_kordchord_new(arg0) {
1416
+ const ret = KordChord.__wrap(arg0);
1417
1417
  return addHeapObject(ret);
1418
1418
  };
1419
1419
 
@@ -1422,8 +1422,8 @@ export function __wbg_kordnote_new(arg0) {
1422
1422
  return addHeapObject(ret);
1423
1423
  };
1424
1424
 
1425
- export function __wbg_kordchord_new(arg0) {
1426
- const ret = KordChord.__wrap(arg0);
1425
+ export function __wbindgen_number_new(arg0) {
1426
+ const ret = arg0;
1427
1427
  return addHeapObject(ret);
1428
1428
  };
1429
1429
 
@@ -1437,6 +1437,60 @@ export function __wbg_setTimeout_75cb9b6991a4031d() { return handleError(functio
1437
1437
  return addHeapObject(ret);
1438
1438
  }, arguments) };
1439
1439
 
1440
+ export function __wbg_crypto_58f13aa23ffcb166(arg0) {
1441
+ const ret = getObject(arg0).crypto;
1442
+ return addHeapObject(ret);
1443
+ };
1444
+
1445
+ export function __wbindgen_is_object(arg0) {
1446
+ const val = getObject(arg0);
1447
+ const ret = typeof(val) === 'object' && val !== null;
1448
+ return ret;
1449
+ };
1450
+
1451
+ export function __wbg_process_5b786e71d465a513(arg0) {
1452
+ const ret = getObject(arg0).process;
1453
+ return addHeapObject(ret);
1454
+ };
1455
+
1456
+ export function __wbg_versions_c2ab80650590b6a2(arg0) {
1457
+ const ret = getObject(arg0).versions;
1458
+ return addHeapObject(ret);
1459
+ };
1460
+
1461
+ export function __wbg_node_523d7bd03ef69fba(arg0) {
1462
+ const ret = getObject(arg0).node;
1463
+ return addHeapObject(ret);
1464
+ };
1465
+
1466
+ export function __wbindgen_is_string(arg0) {
1467
+ const ret = typeof(getObject(arg0)) === 'string';
1468
+ return ret;
1469
+ };
1470
+
1471
+ export function __wbg_msCrypto_abcb1295e768d1f2(arg0) {
1472
+ const ret = getObject(arg0).msCrypto;
1473
+ return addHeapObject(ret);
1474
+ };
1475
+
1476
+ export function __wbg_require_2784e593a4674877() { return handleError(function () {
1477
+ const ret = module.require;
1478
+ return addHeapObject(ret);
1479
+ }, arguments) };
1480
+
1481
+ export function __wbindgen_is_function(arg0) {
1482
+ const ret = typeof(getObject(arg0)) === 'function';
1483
+ return ret;
1484
+ };
1485
+
1486
+ export function __wbg_randomFillSync_a0d98aa11c81fe89() { return handleError(function (arg0, arg1) {
1487
+ getObject(arg0).randomFillSync(takeObject(arg1));
1488
+ }, arguments) };
1489
+
1490
+ export function __wbg_getRandomValues_504510b5564925af() { return handleError(function (arg0, arg1) {
1491
+ getObject(arg0).getRandomValues(getObject(arg1));
1492
+ }, arguments) };
1493
+
1440
1494
  export function __wbindgen_boolean_get(arg0) {
1441
1495
  const v = getObject(arg0);
1442
1496
  const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
@@ -1632,7 +1686,7 @@ export function __wbg_new_60f57089c7563e81(arg0, arg1) {
1632
1686
  const a = state0.a;
1633
1687
  state0.a = 0;
1634
1688
  try {
1635
- return __wbg_adapter_152(a, state0.b, arg0, arg1);
1689
+ return __wbg_adapter_176(a, state0.b, arg0, arg1);
1636
1690
  } finally {
1637
1691
  state0.a = a;
1638
1692
  }
@@ -1654,6 +1708,35 @@ export function __wbg_then_3ab08cd4fbb91ae9(arg0, arg1) {
1654
1708
  return addHeapObject(ret);
1655
1709
  };
1656
1710
 
1711
+ export function __wbg_buffer_a448f833075b71ba(arg0) {
1712
+ const ret = getObject(arg0).buffer;
1713
+ return addHeapObject(ret);
1714
+ };
1715
+
1716
+ export function __wbg_newwithbyteoffsetandlength_d0482f893617af71(arg0, arg1, arg2) {
1717
+ const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
1718
+ return addHeapObject(ret);
1719
+ };
1720
+
1721
+ export function __wbg_new_8f67e318f15d7254(arg0) {
1722
+ const ret = new Uint8Array(getObject(arg0));
1723
+ return addHeapObject(ret);
1724
+ };
1725
+
1726
+ export function __wbg_set_2357bf09366ee480(arg0, arg1, arg2) {
1727
+ getObject(arg0).set(getObject(arg1), arg2 >>> 0);
1728
+ };
1729
+
1730
+ export function __wbg_newwithlength_6c2df9e2f3028c43(arg0) {
1731
+ const ret = new Uint8Array(arg0 >>> 0);
1732
+ return addHeapObject(ret);
1733
+ };
1734
+
1735
+ export function __wbg_subarray_2e940e41c0f5a1d9(arg0, arg1, arg2) {
1736
+ const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1737
+ return addHeapObject(ret);
1738
+ };
1739
+
1657
1740
  export function __wbg_set_759f75cd92b612d2() { return handleError(function (arg0, arg1, arg2) {
1658
1741
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1659
1742
  return ret;
@@ -1671,18 +1754,23 @@ export function __wbindgen_throw(arg0, arg1) {
1671
1754
  throw new Error(getStringFromWasm0(arg0, arg1));
1672
1755
  };
1673
1756
 
1674
- export function __wbindgen_closure_wrapper1156(arg0, arg1, arg2) {
1675
- const ret = makeMutClosure(arg0, arg1, 495, __wbg_adapter_24);
1757
+ export function __wbindgen_memory() {
1758
+ const ret = wasm.memory;
1759
+ return addHeapObject(ret);
1760
+ };
1761
+
1762
+ export function __wbindgen_closure_wrapper1192(arg0, arg1, arg2) {
1763
+ const ret = makeMutClosure(arg0, arg1, 510, __wbg_adapter_32);
1676
1764
  return addHeapObject(ret);
1677
1765
  };
1678
1766
 
1679
- export function __wbindgen_closure_wrapper1182(arg0, arg1, arg2) {
1680
- const ret = makeMutClosure(arg0, arg1, 508, __wbg_adapter_27);
1767
+ export function __wbindgen_closure_wrapper1218(arg0, arg1, arg2) {
1768
+ const ret = makeMutClosure(arg0, arg1, 523, __wbg_adapter_35);
1681
1769
  return addHeapObject(ret);
1682
1770
  };
1683
1771
 
1684
- export function __wbindgen_closure_wrapper1356(arg0, arg1, arg2) {
1685
- const ret = makeMutClosure(arg0, arg1, 554, __wbg_adapter_30);
1772
+ export function __wbindgen_closure_wrapper1562(arg0, arg1, arg2) {
1773
+ const ret = makeMutClosure(arg0, arg1, 631, __wbg_adapter_38);
1686
1774
  return addHeapObject(ret);
1687
1775
  };
1688
1776
 
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.7.0",
7
+ "version": "0.7.1",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",