web-music-score 6.0.0-pre.2 → 6.0.0-pre.3

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 (35) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/audio/index.d.ts +1 -1
  3. package/dist/audio/index.js +1 -1
  4. package/dist/audio/index.mjs +4 -4
  5. package/dist/audio-cg/index.js +1 -1
  6. package/dist/audio-cg/index.mjs +4 -4
  7. package/dist/audio-synth/index.js +1 -1
  8. package/dist/audio-synth/index.mjs +4 -4
  9. package/dist/{chunk-3L3RBNBV.mjs → chunk-7OA6ZYVA.mjs} +3 -3
  10. package/dist/{chunk-5W6ROWBC.mjs → chunk-AMTQ5XLI.mjs} +2 -2
  11. package/dist/{chunk-OXLTN43T.mjs → chunk-QJ3X3GQ6.mjs} +2 -2
  12. package/dist/{chunk-7PNMM2PM.mjs → chunk-S5PIZUF6.mjs} +3 -3
  13. package/dist/{chunk-5P4O5YX2.mjs → chunk-SCF6ZZFQ.mjs} +3 -3
  14. package/dist/{chunk-GNFWJCFN.mjs → chunk-TM46RT77.mjs} +4 -4
  15. package/dist/core/index.js +94 -2
  16. package/dist/core/index.mjs +96 -4
  17. package/dist/iife/audio-cg.js +1 -1
  18. package/dist/iife/index.js +90 -10
  19. package/dist/{music-objects-CiIS8yPn.d.ts → music-objects-DLmp5uL6.d.ts} +2 -2
  20. package/dist/{note-CJuq5aBy.d.ts → note-RVXvpfyV.d.ts} +1 -1
  21. package/dist/pieces/index.d.ts +3 -3
  22. package/dist/pieces/index.js +1 -1
  23. package/dist/pieces/index.mjs +2 -2
  24. package/dist/react-ui/index.d.ts +5 -3
  25. package/dist/react-ui/index.js +41 -10
  26. package/dist/react-ui/index.mjs +42 -11
  27. package/dist/{scale-DxGqFxlv.d.ts → scale-B1M10_fu.d.ts} +2 -2
  28. package/dist/score/index.d.ts +5 -5
  29. package/dist/score/index.js +3 -2
  30. package/dist/score/index.mjs +7 -6
  31. package/dist/{tempo-pCAa6qgo.d.ts → tempo-D-JF-8b_.d.ts} +1 -1
  32. package/dist/theory/index.d.ts +5 -5
  33. package/dist/theory/index.js +1 -1
  34. package/dist/theory/index.mjs +4 -4
  35. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v6.0.0-pre.2 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.0-pre.3 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -29,6 +29,98 @@ __export(core_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(core_exports);
31
31
 
32
+ // src/core/custom-css.ts
33
+ function injectCss(styleId, styleCss) {
34
+ if (styleId === "" || styleCss === "") return;
35
+ if (typeof document === "undefined") return;
36
+ if (document.getElementById(styleId)) return;
37
+ const style = document.createElement("style");
38
+ style.id = styleId;
39
+ style.textContent = styleCss;
40
+ document.head.appendChild(style);
41
+ }
42
+ injectCss("wms-custom-css", `
43
+ /* Add custom wms-button and wms-button-group styles */
44
+
45
+ .wms-button {
46
+ display: inline-flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ padding: 0.4rem 0.8rem; /* medium size */
50
+ font-size: 1rem; /* readable */
51
+ font-weight: 600; /* semi-bold for clarity */
52
+ cursor: pointer;
53
+ border: 1px solid #444; /* subtle border */
54
+ border-radius: 4px; /* slight rounding */
55
+ background-color: #1e88e5; /* primary color (blue) */
56
+ color: white; /* text color */
57
+ transition: background 0.2s ease, transform 0.1s ease;
58
+ }
59
+
60
+ .wms-button:disabled,
61
+ .wms-button.disabled {
62
+ background-color: #b0bec5; /* grayish color */
63
+ border-color: #90a4ae; /* subtle border */
64
+ color: #eceff1; /* light text */
65
+ cursor: not-allowed; /* indicates disabled */
66
+ opacity: 0.7; /* slightly faded */
67
+ pointer-events: none; /* prevent clicks */
68
+ transform: none; /* no press effect */
69
+ }
70
+
71
+ .wms-button:hover {
72
+ background-color: #1565c0; /* slightly darker */
73
+ }
74
+
75
+ .wms-button:active {
76
+ transform: scale(0.97); /* subtle press effect */
77
+ }
78
+
79
+ .wms-button--sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
80
+ .wms-button--lg { padding: 0.5rem 1rem; font-size: 1.125rem; }
81
+
82
+ .wms-button-group {
83
+ display: inline-flex;
84
+ }
85
+
86
+ .wms-button-group > .wms-button {
87
+ border-radius: 0;
88
+ margin: 0;
89
+ }
90
+
91
+ .wms-button-group > .wms-button:first-child {
92
+ border-top-left-radius: 4px;
93
+ border-bottom-left-radius: 4px;
94
+ }
95
+
96
+ .wms-button-group > .wms-button:last-child {
97
+ border-top-right-radius: 4px;
98
+ border-bottom-right-radius: 4px;
99
+ }
100
+
101
+ /* Add ifm-button-group for infima (for Docusaurus) */
102
+
103
+ .ifm-button-group {
104
+ display: inline-flex;
105
+ align-items: stretch;
106
+ }
107
+
108
+ .ifm-button-group > .button {
109
+ border-radius: 0;
110
+ margin: 0;
111
+ }
112
+
113
+ .ifm-button-group > .button:first-child {
114
+ border-top-left-radius: var(--ifm-button-border-radius);
115
+ border-bottom-left-radius: var(--ifm-button-border-radius);
116
+ }
117
+
118
+ .ifm-button-group > .button:last-child {
119
+ border-top-right-radius: var(--ifm-button-border-radius);
120
+ border-bottom-right-radius: var(--ifm-button-border-radius);
121
+ }
122
+ `);
123
+
32
124
  // src/core/error.ts
33
125
  var MusicErrorType = /* @__PURE__ */ ((MusicErrorType2) => {
34
126
  MusicErrorType2[MusicErrorType2["Unknown"] = 0] = "Unknown";
@@ -63,7 +155,7 @@ function init() {
63
155
  return;
64
156
  }
65
157
  initialized = true;
66
- console.log("%cWebMusicScore v6.0.0-pre.2 (cjs) initialized.", "background: black; color: white; padding: 2px;");
158
+ console.log("%cWebMusicScore v6.0.0-pre.3 (cjs) initialized.", "background: black; color: white; padding: 2px;");
67
159
  }
68
160
  // Annotate the CommonJS export names for ESM import in node:
69
161
  0 && (module.exports = {
@@ -1,9 +1,101 @@
1
- /* WebMusicScore v6.0.0-pre.2 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.0-pre.3 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
2
  import {
3
3
  MusicError,
4
4
  MusicErrorType
5
- } from "../chunk-5P4O5YX2.mjs";
6
- import "../chunk-OXLTN43T.mjs";
5
+ } from "../chunk-SCF6ZZFQ.mjs";
6
+ import "../chunk-QJ3X3GQ6.mjs";
7
+
8
+ // src/core/custom-css.ts
9
+ function injectCss(styleId, styleCss) {
10
+ if (styleId === "" || styleCss === "") return;
11
+ if (typeof document === "undefined") return;
12
+ if (document.getElementById(styleId)) return;
13
+ const style = document.createElement("style");
14
+ style.id = styleId;
15
+ style.textContent = styleCss;
16
+ document.head.appendChild(style);
17
+ }
18
+ injectCss("wms-custom-css", `
19
+ /* Add custom wms-button and wms-button-group styles */
20
+
21
+ .wms-button {
22
+ display: inline-flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ padding: 0.4rem 0.8rem; /* medium size */
26
+ font-size: 1rem; /* readable */
27
+ font-weight: 600; /* semi-bold for clarity */
28
+ cursor: pointer;
29
+ border: 1px solid #444; /* subtle border */
30
+ border-radius: 4px; /* slight rounding */
31
+ background-color: #1e88e5; /* primary color (blue) */
32
+ color: white; /* text color */
33
+ transition: background 0.2s ease, transform 0.1s ease;
34
+ }
35
+
36
+ .wms-button:disabled,
37
+ .wms-button.disabled {
38
+ background-color: #b0bec5; /* grayish color */
39
+ border-color: #90a4ae; /* subtle border */
40
+ color: #eceff1; /* light text */
41
+ cursor: not-allowed; /* indicates disabled */
42
+ opacity: 0.7; /* slightly faded */
43
+ pointer-events: none; /* prevent clicks */
44
+ transform: none; /* no press effect */
45
+ }
46
+
47
+ .wms-button:hover {
48
+ background-color: #1565c0; /* slightly darker */
49
+ }
50
+
51
+ .wms-button:active {
52
+ transform: scale(0.97); /* subtle press effect */
53
+ }
54
+
55
+ .wms-button--sm { padding: 0.25rem 0.5rem; font-size: 0.875rem; }
56
+ .wms-button--lg { padding: 0.5rem 1rem; font-size: 1.125rem; }
57
+
58
+ .wms-button-group {
59
+ display: inline-flex;
60
+ }
61
+
62
+ .wms-button-group > .wms-button {
63
+ border-radius: 0;
64
+ margin: 0;
65
+ }
66
+
67
+ .wms-button-group > .wms-button:first-child {
68
+ border-top-left-radius: 4px;
69
+ border-bottom-left-radius: 4px;
70
+ }
71
+
72
+ .wms-button-group > .wms-button:last-child {
73
+ border-top-right-radius: 4px;
74
+ border-bottom-right-radius: 4px;
75
+ }
76
+
77
+ /* Add ifm-button-group for infima (for Docusaurus) */
78
+
79
+ .ifm-button-group {
80
+ display: inline-flex;
81
+ align-items: stretch;
82
+ }
83
+
84
+ .ifm-button-group > .button {
85
+ border-radius: 0;
86
+ margin: 0;
87
+ }
88
+
89
+ .ifm-button-group > .button:first-child {
90
+ border-top-left-radius: var(--ifm-button-border-radius);
91
+ border-bottom-left-radius: var(--ifm-button-border-radius);
92
+ }
93
+
94
+ .ifm-button-group > .button:last-child {
95
+ border-top-right-radius: var(--ifm-button-border-radius);
96
+ border-bottom-right-radius: var(--ifm-button-border-radius);
97
+ }
98
+ `);
7
99
 
8
100
  // src/core/index.ts
9
101
  var initialized = false;
@@ -12,7 +104,7 @@ function init() {
12
104
  return;
13
105
  }
14
106
  initialized = true;
15
- console.log("%cWebMusicScore v6.0.0-pre.2 (esm) initialized.", "background: black; color: white; padding: 2px;");
107
+ console.log("%cWebMusicScore v6.0.0-pre.3 (esm) initialized.", "background: black; color: white; padding: 2px;");
16
108
  }
17
109
  export {
18
110
  MusicError,