web-music-score 0.0.1 → 6.0.0-pre.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +200 -0
  2. package/LICENSE +62 -1
  3. package/README.md +46 -2
  4. package/dist/audio/index.d.ts +50 -0
  5. package/dist/audio/index.js +1858 -0
  6. package/dist/audio/index.mjs +92 -0
  7. package/dist/audio-cg/index.d.ts +21 -0
  8. package/dist/audio-cg/index.js +17568 -0
  9. package/dist/audio-cg/index.mjs +90 -0
  10. package/dist/audio-synth/index.d.ts +15 -0
  11. package/dist/audio-synth/index.js +18497 -0
  12. package/dist/audio-synth/index.mjs +63 -0
  13. package/dist/chunk-A7C2G7OG.mjs +101 -0
  14. package/dist/chunk-GNT3ECDB.mjs +267 -0
  15. package/dist/chunk-LO4NI4AU.mjs +18381 -0
  16. package/dist/chunk-PW2SO6EZ.mjs +37 -0
  17. package/dist/chunk-VHB57TXT.mjs +11 -0
  18. package/dist/chunk-X7BMJX7E.mjs +3867 -0
  19. package/dist/core/index.d.ts +31 -0
  20. package/dist/core/index.js +74 -0
  21. package/dist/core/index.mjs +22 -0
  22. package/dist/iife/audio-cg.global.js +220 -0
  23. package/dist/iife/index.global.js +228 -0
  24. package/dist/instrument-DS-9C6_8.d.ts +44 -0
  25. package/dist/music-objects-DLmp5uL6.d.ts +2398 -0
  26. package/dist/note-RVXvpfyV.d.ts +306 -0
  27. package/dist/pieces/index.d.ts +46 -0
  28. package/dist/pieces/index.js +79 -0
  29. package/dist/pieces/index.mjs +50 -0
  30. package/dist/react-ui/index.d.ts +86 -0
  31. package/dist/react-ui/index.js +132 -0
  32. package/dist/react-ui/index.mjs +96 -0
  33. package/dist/scale-B1M10_fu.d.ts +230 -0
  34. package/dist/score/index.d.ts +466 -0
  35. package/dist/score/index.js +13964 -0
  36. package/dist/score/index.mjs +10092 -0
  37. package/dist/tempo-D-JF-8b_.d.ts +409 -0
  38. package/dist/theory/index.d.ts +78 -0
  39. package/dist/theory/index.js +4842 -0
  40. package/dist/theory/index.mjs +1986 -0
  41. package/package.json +131 -3
  42. package/workspace.code-workspace +0 -9
@@ -0,0 +1,31 @@
1
+ /** Enum of music error types. */
2
+ declare enum MusicErrorType {
3
+ Unknown = 0,
4
+ InvalidArg = 1,
5
+ Note = 2,
6
+ Scale = 3,
7
+ KeySignature = 4,
8
+ Timesignature = 5,
9
+ Score = 6,
10
+ Audio = 7
11
+ }
12
+ /** Music error class. */
13
+ declare class MusicError extends Error {
14
+ /** Music error type. */
15
+ readonly type: MusicErrorType;
16
+ /**
17
+ * Create new music error instance.
18
+ * @param message - Error message.
19
+ */
20
+ constructor(message: string);
21
+ /**
22
+ * Create new musicerror instance.
23
+ * @param type - Music error type.
24
+ * @param message - Error message.
25
+ */
26
+ constructor(type: MusicErrorType, message: string);
27
+ }
28
+
29
+ declare function init(): void;
30
+
31
+ export { MusicError, MusicErrorType, init };
@@ -0,0 +1,74 @@
1
+ /* WebMusicScore v6.0.0-pre.1 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
22
+
23
+ // src/core/index.ts
24
+ var core_exports = {};
25
+ __export(core_exports, {
26
+ MusicError: () => MusicError,
27
+ MusicErrorType: () => MusicErrorType,
28
+ init: () => init
29
+ });
30
+ module.exports = __toCommonJS(core_exports);
31
+
32
+ // src/core/error.ts
33
+ var MusicErrorType = /* @__PURE__ */ ((MusicErrorType2) => {
34
+ MusicErrorType2[MusicErrorType2["Unknown"] = 0] = "Unknown";
35
+ MusicErrorType2[MusicErrorType2["InvalidArg"] = 1] = "InvalidArg";
36
+ MusicErrorType2[MusicErrorType2["Note"] = 2] = "Note";
37
+ MusicErrorType2[MusicErrorType2["Scale"] = 3] = "Scale";
38
+ MusicErrorType2[MusicErrorType2["KeySignature"] = 4] = "KeySignature";
39
+ MusicErrorType2[MusicErrorType2["Timesignature"] = 5] = "Timesignature";
40
+ MusicErrorType2[MusicErrorType2["Score"] = 6] = "Score";
41
+ MusicErrorType2[MusicErrorType2["Audio"] = 7] = "Audio";
42
+ return MusicErrorType2;
43
+ })(MusicErrorType || {});
44
+ function formatType(type) {
45
+ return type === void 0 ? "" : `[${MusicErrorType[type]}] `;
46
+ }
47
+ var MusicError = class extends Error {
48
+ constructor(...args) {
49
+ const [type, msg] = args.length === 1 ? [0 /* Unknown */, args[0]] : args;
50
+ super(formatType(type) + msg);
51
+ /** Music error type. */
52
+ __publicField(this, "type");
53
+ Object.setPrototypeOf(this, new.target.prototype);
54
+ this.name = "MusicError";
55
+ this.type = type;
56
+ }
57
+ };
58
+
59
+ // src/core/index.ts
60
+ var initialized = false;
61
+ function init() {
62
+ if (initialized) {
63
+ return;
64
+ }
65
+ initialized = true;
66
+ console.log("%cWebMusicScore v6.0.0-pre.1 (cjs) initialized.", "background: black; color: white; padding: 2px;");
67
+ }
68
+ // Annotate the CommonJS export names for ESM import in node:
69
+ 0 && (module.exports = {
70
+ MusicError,
71
+ MusicErrorType,
72
+ init
73
+ });
74
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,22 @@
1
+ /* WebMusicScore v6.0.0-pre.1 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
+ import {
3
+ MusicError,
4
+ MusicErrorType
5
+ } from "../chunk-PW2SO6EZ.mjs";
6
+ import "../chunk-A7C2G7OG.mjs";
7
+
8
+ // src/core/index.ts
9
+ var initialized = false;
10
+ function init() {
11
+ if (initialized) {
12
+ return;
13
+ }
14
+ initialized = true;
15
+ console.log("%cWebMusicScore v6.0.0-pre.1 (esm) initialized.", "background: black; color: white; padding: 2px;");
16
+ }
17
+ export {
18
+ MusicError,
19
+ MusicErrorType,
20
+ init
21
+ };
22
+ //# sourceMappingURL=index.mjs.map