@tspro/web-music-score 5.5.0 → 5.5.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/CHANGELOG.md +4 -0
- package/README.md +8 -553
- package/dist/audio/index.js +163 -52
- package/dist/audio/index.mjs +4 -4
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +4 -4
- package/dist/audio-synth/index.js +1 -1
- package/dist/audio-synth/index.mjs +4 -4
- package/dist/{chunk-BMKUAUSJ.mjs → chunk-7GVRGM3N.mjs} +3 -3
- package/dist/{chunk-T6TYLAJE.mjs → chunk-AUOH7S2E.mjs} +165 -54
- package/dist/{chunk-2DCCUAGC.mjs → chunk-BZE5UGTJ.mjs} +3 -3
- package/dist/{chunk-2PEB4HWS.mjs → chunk-FLBNOYUN.mjs} +2 -2
- package/dist/{chunk-33HIE3HR.mjs → chunk-KKIFSIFK.mjs} +4 -4
- package/dist/{chunk-PCQGQM63.mjs → chunk-L7VPSGMT.mjs} +3 -3
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +4 -4
- package/dist/iife/audio-cg.global.js +1 -1
- package/dist/iife/index.global.js +13 -13
- package/dist/pieces/index.js +1 -1
- package/dist/pieces/index.mjs +2 -2
- package/dist/react-ui/index.js +163 -52
- package/dist/react-ui/index.mjs +3 -3
- package/dist/score/index.js +168 -55
- package/dist/score/index.mjs +9 -7
- package/dist/theory/index.js +164 -53
- package/dist/theory/index.mjs +4 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* WebMusicScore v5.5.
|
|
1
|
+
/* WebMusicScore v5.5.1 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__yieldStar
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7GVRGM3N.mjs";
|
|
5
5
|
|
|
6
6
|
// node_modules/@tspro/ts-utils-lib/dist/index.mjs
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
@@ -67,6 +67,11 @@ __export(assert_exports, {
|
|
|
67
67
|
isNumber: () => isNumber2,
|
|
68
68
|
isNumberBetween: () => isNumberBetween2,
|
|
69
69
|
isNumberBetweenExclusive: () => isNumberBetweenExclusive2,
|
|
70
|
+
isNumberEq: () => isNumberEq2,
|
|
71
|
+
isNumberGt: () => isNumberGt2,
|
|
72
|
+
isNumberGte: () => isNumberGte2,
|
|
73
|
+
isNumberLt: () => isNumberLt2,
|
|
74
|
+
isNumberLte: () => isNumberLte2,
|
|
70
75
|
isNumberOrUndefined: () => isNumberOrUndefined2,
|
|
71
76
|
isNumericString: () => isNumericString2,
|
|
72
77
|
isObject: () => isObject2,
|
|
@@ -78,6 +83,7 @@ __export(assert_exports, {
|
|
|
78
83
|
isPosZero: () => isPosZero2,
|
|
79
84
|
isPowerOfTwo: () => isPowerOfTwo2,
|
|
80
85
|
isSafeInteger: () => isSafeInteger2,
|
|
86
|
+
isSafeNumber: () => isSafeNumber2,
|
|
81
87
|
isStrictEqual: () => isStrictEqual2,
|
|
82
88
|
isString: () => isString2,
|
|
83
89
|
isStringOrUndefined: () => isStringOrUndefined2,
|
|
@@ -101,6 +107,9 @@ __export(str_exports, {
|
|
|
101
107
|
removeAt: () => removeAt,
|
|
102
108
|
repeatString: () => repeatString,
|
|
103
109
|
replaceAt: () => replaceAt,
|
|
110
|
+
splitByCaps: () => splitByCaps,
|
|
111
|
+
splitByChars: () => splitByChars,
|
|
112
|
+
splitByStrings: () => splitByStrings,
|
|
104
113
|
stringify: () => stringify,
|
|
105
114
|
toCharArray: () => toCharArray
|
|
106
115
|
});
|
|
@@ -165,6 +174,11 @@ __export(guard_exports, {
|
|
|
165
174
|
isNumber: () => isNumber,
|
|
166
175
|
isNumberBetween: () => isNumberBetween,
|
|
167
176
|
isNumberBetweenExclusive: () => isNumberBetweenExclusive,
|
|
177
|
+
isNumberEq: () => isNumberEq,
|
|
178
|
+
isNumberGt: () => isNumberGt,
|
|
179
|
+
isNumberGte: () => isNumberGte,
|
|
180
|
+
isNumberLt: () => isNumberLt,
|
|
181
|
+
isNumberLte: () => isNumberLte,
|
|
168
182
|
isNumberOrUndefined: () => isNumberOrUndefined,
|
|
169
183
|
isNumericString: () => isNumericString,
|
|
170
184
|
isObject: () => isObject,
|
|
@@ -176,6 +190,7 @@ __export(guard_exports, {
|
|
|
176
190
|
isPosZero: () => isPosZero,
|
|
177
191
|
isPowerOfTwo: () => isPowerOfTwo,
|
|
178
192
|
isSafeInteger: () => isSafeInteger,
|
|
193
|
+
isSafeNumber: () => isSafeNumber,
|
|
179
194
|
isStrictEqual: () => isStrictEqual,
|
|
180
195
|
isString: () => isString,
|
|
181
196
|
isStringOrUndefined: () => isStringOrUndefined,
|
|
@@ -327,9 +342,33 @@ function isBigInt(val) {
|
|
|
327
342
|
function isNumber(val) {
|
|
328
343
|
return typeof val === "number";
|
|
329
344
|
}
|
|
345
|
+
function isSafeNumber(val) {
|
|
346
|
+
return isNumber(val) && Number.isSafeInteger(val);
|
|
347
|
+
}
|
|
330
348
|
function isNumberOrUndefined(val) {
|
|
331
349
|
return typeof val === "number" || val === void 0;
|
|
332
350
|
}
|
|
351
|
+
function isNumberEq(val, ref) {
|
|
352
|
+
return isNumber(val) && val === ref;
|
|
353
|
+
}
|
|
354
|
+
function isNumberGt(val, ref) {
|
|
355
|
+
return isNumber(val) && isNumber(ref) && val > ref;
|
|
356
|
+
}
|
|
357
|
+
function isNumberGte(val, ref) {
|
|
358
|
+
return isNumber(val) && isNumber(ref) && val >= ref;
|
|
359
|
+
}
|
|
360
|
+
function isNumberLt(val, ref) {
|
|
361
|
+
return isNumber(val) && isNumber(ref) && val < ref;
|
|
362
|
+
}
|
|
363
|
+
function isNumberLte(val, ref) {
|
|
364
|
+
return isNumber(val) && isNumber(ref) && val <= ref;
|
|
365
|
+
}
|
|
366
|
+
function isNumberBetween(val, min, max) {
|
|
367
|
+
return isNumber(val) && isNumber(min) && isNumber(max) && val >= min && val <= max;
|
|
368
|
+
}
|
|
369
|
+
function isNumberBetweenExclusive(val, min, max) {
|
|
370
|
+
return isNumber(val) && isNumber(min) && isNumber(max) && val > min && val < max;
|
|
371
|
+
}
|
|
333
372
|
function isFinite2(val) {
|
|
334
373
|
return typeof val === "number" && Number.isFinite(val);
|
|
335
374
|
}
|
|
@@ -366,12 +405,6 @@ function isIntegerBetween(val, min, max) {
|
|
|
366
405
|
function isIntegerBetweenExclusive(val, min, max) {
|
|
367
406
|
return isInteger(val) && isNumber(min) && isNumber(max) && val > min && val < max;
|
|
368
407
|
}
|
|
369
|
-
function isNumberBetween(val, min, max) {
|
|
370
|
-
return isNumber(val) && isNumber(min) && isNumber(max) && val >= min && val <= max;
|
|
371
|
-
}
|
|
372
|
-
function isNumberBetweenExclusive(val, min, max) {
|
|
373
|
-
return isNumber(val) && isNumber(min) && isNumber(max) && val > min && val < max;
|
|
374
|
-
}
|
|
375
408
|
function isNaNValue(val) {
|
|
376
409
|
return typeof val === "number" && Number.isNaN(val);
|
|
377
410
|
}
|
|
@@ -637,6 +670,18 @@ function stringify(value, maxDepth = 5, seen = /* @__PURE__ */ new WeakSet()) {
|
|
|
637
670
|
}
|
|
638
671
|
return String(value);
|
|
639
672
|
}
|
|
673
|
+
function splitByCaps(str2) {
|
|
674
|
+
return str2.split(/(?=[A-Z])/).filter((x) => !!x);
|
|
675
|
+
}
|
|
676
|
+
function splitByStrings(str2, ...splitters) {
|
|
677
|
+
if (splitters.length === 0) return [str2];
|
|
678
|
+
const escaped = splitters.map((s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
679
|
+
const regex = new RegExp(escaped.join("|"), "g");
|
|
680
|
+
return str2.split(regex);
|
|
681
|
+
}
|
|
682
|
+
function splitByChars(str2, splitters) {
|
|
683
|
+
return splitByStrings(str2, ...splitters.split(""));
|
|
684
|
+
}
|
|
640
685
|
var fmt = stringify;
|
|
641
686
|
var errorConstructor = Error;
|
|
642
687
|
function setErrorClass(errorClass) {
|
|
@@ -854,11 +899,51 @@ function isNumber2(val, msg) {
|
|
|
854
899
|
_fail(`Expected ${fmt(val)} to be number`, msg);
|
|
855
900
|
return val;
|
|
856
901
|
}
|
|
902
|
+
function isSafeNumber2(val, msg) {
|
|
903
|
+
if (!guard_exports.isSafeNumber(val))
|
|
904
|
+
_fail(`Expected ${fmt(val)} to be safe number`, msg);
|
|
905
|
+
return val;
|
|
906
|
+
}
|
|
857
907
|
function isNumberOrUndefined2(val, msg) {
|
|
858
908
|
if (!guard_exports.isNumberOrUndefined(val))
|
|
859
909
|
_fail(`Expected ${fmt(val)} to be number or undefined`, msg);
|
|
860
910
|
return val;
|
|
861
911
|
}
|
|
912
|
+
function isNumberEq2(val, ref, msg) {
|
|
913
|
+
if (!guard_exports.isNumberEq(val, ref))
|
|
914
|
+
_fail(`Expected ${fmt(val)} to be number equal to ${fmt(ref)}`, msg);
|
|
915
|
+
return val;
|
|
916
|
+
}
|
|
917
|
+
function isNumberGt2(val, ref, msg) {
|
|
918
|
+
if (!guard_exports.isNumberGt(val, ref))
|
|
919
|
+
_fail(`Expected ${fmt(val)} to be number > ${fmt(ref)}`, msg);
|
|
920
|
+
return val;
|
|
921
|
+
}
|
|
922
|
+
function isNumberGte2(val, ref, msg) {
|
|
923
|
+
if (!guard_exports.isNumberGte(val, ref))
|
|
924
|
+
_fail(`Expected ${fmt(val)} to be number >= ${fmt(ref)}`, msg);
|
|
925
|
+
return val;
|
|
926
|
+
}
|
|
927
|
+
function isNumberLt2(val, ref, msg) {
|
|
928
|
+
if (!guard_exports.isNumberLt(val, ref))
|
|
929
|
+
_fail(`Expected ${fmt(val)} to be number < ${fmt(ref)}`, msg);
|
|
930
|
+
return val;
|
|
931
|
+
}
|
|
932
|
+
function isNumberLte2(val, ref, msg) {
|
|
933
|
+
if (!guard_exports.isNumberLte(val, ref))
|
|
934
|
+
_fail(`Expected ${fmt(val)} to be number <= ${fmt(ref)}`, msg);
|
|
935
|
+
return val;
|
|
936
|
+
}
|
|
937
|
+
function isNumberBetween2(val, min, max, msg) {
|
|
938
|
+
if (!guard_exports.isNumberBetween(val, min, max))
|
|
939
|
+
_fail(`Expected number ${fmt(min)} <= ${fmt(val)} <= ${fmt(max)}`, msg);
|
|
940
|
+
return val;
|
|
941
|
+
}
|
|
942
|
+
function isNumberBetweenExclusive2(val, min, max, msg) {
|
|
943
|
+
if (!guard_exports.isNumberBetweenExclusive(val, min, max))
|
|
944
|
+
_fail(`Expected number ${fmt(min)} < ${fmt(val)} < ${fmt(max)}`, msg);
|
|
945
|
+
return val;
|
|
946
|
+
}
|
|
862
947
|
function isFinite3(val, msg) {
|
|
863
948
|
if (!guard_exports.isFinite(val))
|
|
864
949
|
_fail(`Expected ${fmt(val)} to be finite`, msg);
|
|
@@ -919,16 +1004,6 @@ function isIntegerBetweenExclusive2(val, min, max, msg) {
|
|
|
919
1004
|
_fail(`Expected integer ${fmt(min)} < ${fmt(val)} < ${fmt(max)}`, msg);
|
|
920
1005
|
return val;
|
|
921
1006
|
}
|
|
922
|
-
function isNumberBetween2(val, min, max, msg) {
|
|
923
|
-
if (!guard_exports.isNumberBetween(val, min, max))
|
|
924
|
-
_fail(`Expected number ${fmt(min)} <= ${fmt(val)} <= ${fmt(max)}`, msg);
|
|
925
|
-
return val;
|
|
926
|
-
}
|
|
927
|
-
function isNumberBetweenExclusive2(val, min, max, msg) {
|
|
928
|
-
if (!guard_exports.isNumberBetweenExclusive(val, min, max))
|
|
929
|
-
_fail(`Expected number ${fmt(min)} < ${fmt(val)} < ${fmt(max)}`, msg);
|
|
930
|
-
return val;
|
|
931
|
-
}
|
|
932
1007
|
function isNaNValue2(val, msg) {
|
|
933
1008
|
if (!guard_exports.isNaNValue(val))
|
|
934
1009
|
_fail(`Expected ${fmt(val)} to be NaN`, msg);
|
|
@@ -1049,7 +1124,9 @@ var _consent;
|
|
|
1049
1124
|
var _expires;
|
|
1050
1125
|
var str = _read(ConsentCookieName);
|
|
1051
1126
|
_consent = str === "accept" || str === "decline" ? str : void 0;
|
|
1052
|
-
function
|
|
1127
|
+
function _getCookieList() {
|
|
1128
|
+
if (typeof document === "undefined")
|
|
1129
|
+
return [];
|
|
1053
1130
|
let s = document.cookie;
|
|
1054
1131
|
return s.split(";").map((c) => c.trim());
|
|
1055
1132
|
}
|
|
@@ -1058,15 +1135,17 @@ function _save(name, value) {
|
|
|
1058
1135
|
if (_expires) {
|
|
1059
1136
|
cookie += "expires=" + _expires.toUTCString() + ";";
|
|
1060
1137
|
}
|
|
1061
|
-
document
|
|
1138
|
+
if (typeof document !== "undefined")
|
|
1139
|
+
document.cookie = cookie;
|
|
1062
1140
|
return value;
|
|
1063
1141
|
}
|
|
1064
1142
|
function _read(name, defaultValue) {
|
|
1065
|
-
let str2 =
|
|
1143
|
+
let str2 = _getCookieList().find((c) => c.startsWith(name + "="));
|
|
1066
1144
|
return str2 === void 0 ? defaultValue : str2.substring(name.length + 1);
|
|
1067
1145
|
}
|
|
1068
1146
|
function _erase(name) {
|
|
1069
|
-
|
|
1147
|
+
if (typeof document !== "undefined")
|
|
1148
|
+
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 UTC;";
|
|
1070
1149
|
}
|
|
1071
1150
|
function setExpireDays(days) {
|
|
1072
1151
|
_expires = /* @__PURE__ */ new Date();
|
|
@@ -1116,7 +1195,8 @@ function erase(name) {
|
|
|
1116
1195
|
_erase(name);
|
|
1117
1196
|
}
|
|
1118
1197
|
function eraseAll() {
|
|
1119
|
-
|
|
1198
|
+
if (typeof document !== "undefined")
|
|
1199
|
+
document.cookie.split(";").forEach((c) => erase(c.trim().split("=")[0]));
|
|
1120
1200
|
}
|
|
1121
1201
|
var device_exports = {};
|
|
1122
1202
|
__export(device_exports, {
|
|
@@ -1132,12 +1212,16 @@ __export(device_exports, {
|
|
|
1132
1212
|
toPx: () => toPx
|
|
1133
1213
|
});
|
|
1134
1214
|
function getDPI() {
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1215
|
+
try {
|
|
1216
|
+
let el = document.createElement("div");
|
|
1217
|
+
el.style.width = "1in";
|
|
1218
|
+
document.body.appendChild(el);
|
|
1219
|
+
let dpi = el.offsetWidth;
|
|
1220
|
+
el.remove();
|
|
1221
|
+
return dpi || 96;
|
|
1222
|
+
} catch (e) {
|
|
1223
|
+
return 96;
|
|
1224
|
+
}
|
|
1141
1225
|
}
|
|
1142
1226
|
function getScrollBarWidth() {
|
|
1143
1227
|
try {
|
|
@@ -1160,18 +1244,23 @@ function getScrollBarWidth() {
|
|
|
1160
1244
|
}
|
|
1161
1245
|
}
|
|
1162
1246
|
function getSystemFontSize() {
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1247
|
+
try {
|
|
1248
|
+
let tmpDiv = document.createElement("div");
|
|
1249
|
+
tmpDiv.style.cssText = "display:inline-block; padding:0; line-height:1; position:absolute; visibility:hidden; font-size:1em";
|
|
1250
|
+
tmpDiv.appendChild(document.createTextNode("M"));
|
|
1251
|
+
document.body.appendChild(tmpDiv);
|
|
1252
|
+
let fontsize = tmpDiv.offsetHeight;
|
|
1253
|
+
document.body.removeChild(tmpDiv);
|
|
1254
|
+
return fontsize;
|
|
1255
|
+
} catch (e) {
|
|
1256
|
+
return 16;
|
|
1257
|
+
}
|
|
1170
1258
|
}
|
|
1171
1259
|
function getIsTouchDevice() {
|
|
1172
|
-
if (
|
|
1260
|
+
if (typeof window === "undefined")
|
|
1261
|
+
return false;
|
|
1262
|
+
if ("ontouchstart" in window || "DocumentTouch" in window || "createTouch" in document && "createTouchList" in document)
|
|
1173
1263
|
return true;
|
|
1174
|
-
}
|
|
1175
1264
|
var prefixes = " -webkit- -moz- -o- -ms- ".split(" ");
|
|
1176
1265
|
var mq = function(query2) {
|
|
1177
1266
|
return window.matchMedia(query2).matches;
|
|
@@ -1184,7 +1273,10 @@ function getIsMobileDevice() {
|
|
|
1184
1273
|
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4));
|
|
1185
1274
|
}
|
|
1186
1275
|
function getHostAddress() {
|
|
1187
|
-
|
|
1276
|
+
if (typeof location === "undefined" || !location.host) {
|
|
1277
|
+
return "localhost";
|
|
1278
|
+
}
|
|
1279
|
+
return `${location.protocol}//${location.host}`;
|
|
1188
1280
|
}
|
|
1189
1281
|
var UnitRegExp = /^(mm|cm|in|inch|px|em)$/;
|
|
1190
1282
|
var ValueUnitRegExp = /^([0-9\\.]+)(.*)$/;
|
|
@@ -1330,6 +1422,7 @@ __export(dom_exports, {
|
|
|
1330
1422
|
getPadding: () => getPadding,
|
|
1331
1423
|
getWidth: () => getWidth,
|
|
1332
1424
|
hasClass: () => hasClass,
|
|
1425
|
+
injectCss: () => injectCss,
|
|
1333
1426
|
removeClass: () => removeClass,
|
|
1334
1427
|
removeFromParent: () => removeFromParent,
|
|
1335
1428
|
setHeight: () => setHeight,
|
|
@@ -1339,6 +1432,10 @@ __export(dom_exports, {
|
|
|
1339
1432
|
setWidth: () => setWidth,
|
|
1340
1433
|
styleLayoutChanged: () => styleLayoutChanged
|
|
1341
1434
|
});
|
|
1435
|
+
function _getElemById(id) {
|
|
1436
|
+
var _a;
|
|
1437
|
+
return typeof document === "undefined" ? void 0 : (_a = document.getElementById(id)) != null ? _a : void 0;
|
|
1438
|
+
}
|
|
1342
1439
|
function toPx2(value) {
|
|
1343
1440
|
return value === void 0 ? void 0 : device_exports.toPx(value);
|
|
1344
1441
|
}
|
|
@@ -1375,12 +1472,17 @@ function setOffset(el, left, top, unit = "px") {
|
|
|
1375
1472
|
el.style.top = top + unit;
|
|
1376
1473
|
}
|
|
1377
1474
|
function getOffset(el) {
|
|
1378
|
-
let
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
top
|
|
1382
|
-
|
|
1383
|
-
|
|
1475
|
+
let { left, top } = el.getBoundingClientRect();
|
|
1476
|
+
if (typeof window !== "undefined") {
|
|
1477
|
+
left += window.pageXOffset;
|
|
1478
|
+
top += window.pageYOffset;
|
|
1479
|
+
}
|
|
1480
|
+
if (typeof document !== "undefined") {
|
|
1481
|
+
let de = document.documentElement;
|
|
1482
|
+
left -= de.clientLeft;
|
|
1483
|
+
top -= de.clientTop;
|
|
1484
|
+
}
|
|
1485
|
+
return { left, top };
|
|
1384
1486
|
}
|
|
1385
1487
|
function getWidth(el) {
|
|
1386
1488
|
if (el instanceof Window) {
|
|
@@ -1420,11 +1522,11 @@ function setRect(el, left, top, width, height, unit = "px") {
|
|
|
1420
1522
|
el.style.height = height + unit;
|
|
1421
1523
|
}
|
|
1422
1524
|
function getButton(btn) {
|
|
1423
|
-
let el = typeof btn === "string" ?
|
|
1525
|
+
let el = typeof btn === "string" ? _getElemById(btn) : btn;
|
|
1424
1526
|
return el instanceof HTMLButtonElement ? el : void 0;
|
|
1425
1527
|
}
|
|
1426
1528
|
function getCanvas(canvas2) {
|
|
1427
|
-
let el = typeof canvas2 === "string" ?
|
|
1529
|
+
let el = typeof canvas2 === "string" ? _getElemById(canvas2) : canvas2;
|
|
1428
1530
|
return el instanceof HTMLCanvasElement ? el : void 0;
|
|
1429
1531
|
}
|
|
1430
1532
|
function getPadding(style) {
|
|
@@ -1498,14 +1600,23 @@ function styleLayoutChanged(style1, style2) {
|
|
|
1498
1600
|
}
|
|
1499
1601
|
var canvas;
|
|
1500
1602
|
function getCanvasTextWidth(text, font) {
|
|
1501
|
-
canvas
|
|
1502
|
-
|
|
1503
|
-
|
|
1603
|
+
if (!canvas && typeof document !== "undefined")
|
|
1604
|
+
canvas = document.createElement("canvas");
|
|
1605
|
+
let ctx = canvas == null ? void 0 : canvas.getContext("2d");
|
|
1606
|
+
if (!ctx)
|
|
1504
1607
|
return 0;
|
|
1505
|
-
}
|
|
1506
1608
|
ctx.font = font;
|
|
1507
1609
|
return ctx.measureText(text).width;
|
|
1508
1610
|
}
|
|
1611
|
+
function injectCss(styleId, styleCss) {
|
|
1612
|
+
if (styleId === "" || styleCss === "") return;
|
|
1613
|
+
if (typeof document === "undefined") return;
|
|
1614
|
+
if (document.getElementById(styleId)) return;
|
|
1615
|
+
const style = document.createElement("style");
|
|
1616
|
+
style.id = styleId;
|
|
1617
|
+
style.textContent = styleCss;
|
|
1618
|
+
document.head.appendChild(style);
|
|
1619
|
+
}
|
|
1509
1620
|
var math_exports = {};
|
|
1510
1621
|
__export(math_exports, {
|
|
1511
1622
|
avg: () => avg,
|
|
@@ -3758,9 +3869,9 @@ export {
|
|
|
3758
3869
|
|
|
3759
3870
|
@tspro/ts-utils-lib/dist/index.mjs:
|
|
3760
3871
|
(*!
|
|
3761
|
-
* TsUtilsLib v2.
|
|
3762
|
-
* (c) 2023
|
|
3872
|
+
* TsUtilsLib v2.3.0 (esm)
|
|
3873
|
+
* (c) 2023-2025 PahkaSoft
|
|
3763
3874
|
* Licensed under the MIT License
|
|
3764
3875
|
*)
|
|
3765
3876
|
*/
|
|
3766
|
-
//# sourceMappingURL=chunk-
|
|
3877
|
+
//# sourceMappingURL=chunk-AUOH7S2E.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* WebMusicScore v5.5.
|
|
1
|
+
/* WebMusicScore v5.5.1 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7GVRGM3N.mjs";
|
|
5
5
|
|
|
6
6
|
// src/core/error.ts
|
|
7
7
|
var MusicErrorType = /* @__PURE__ */ ((MusicErrorType2) => {
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
MusicErrorType,
|
|
35
35
|
MusicError
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-BZE5UGTJ.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v5.5.
|
|
1
|
+
/* WebMusicScore v5.5.1 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
|
|
3
3
|
// src/audio/instrument.ts
|
|
4
4
|
function linearToDecibels(linearVolume) {
|
|
@@ -8,4 +8,4 @@ function linearToDecibels(linearVolume) {
|
|
|
8
8
|
export {
|
|
9
9
|
linearToDecibels
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-FLBNOYUN.mjs.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/* WebMusicScore v5.5.
|
|
1
|
+
/* WebMusicScore v5.5.1 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
IndexArray,
|
|
4
4
|
UniMap,
|
|
5
5
|
guard_exports,
|
|
6
6
|
utils_exports
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AUOH7S2E.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__publicField
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7GVRGM3N.mjs";
|
|
11
11
|
|
|
12
12
|
// src/theory/rhythm.ts
|
|
13
13
|
import { MusicError, MusicErrorType } from "@tspro/web-music-score/core";
|
|
@@ -265,4 +265,4 @@ export {
|
|
|
265
265
|
Tuplet,
|
|
266
266
|
RhythmProps
|
|
267
267
|
};
|
|
268
|
-
//# sourceMappingURL=chunk-
|
|
268
|
+
//# sourceMappingURL=chunk-KKIFSIFK.mjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/* WebMusicScore v5.5.
|
|
1
|
+
/* WebMusicScore v5.5.1 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__async,
|
|
4
4
|
__objRest,
|
|
5
5
|
__pow,
|
|
6
6
|
__spreadProps,
|
|
7
7
|
__spreadValues
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7GVRGM3N.mjs";
|
|
9
9
|
|
|
10
10
|
// node_modules/tone/build/esm/core/type/Conversions.js
|
|
11
11
|
function dbToGain(db) {
|
|
@@ -18378,4 +18378,4 @@ tone/build/esm/core/Tone.js:
|
|
|
18378
18378
|
* @copyright 2014-2024 Yotam Mann
|
|
18379
18379
|
*)
|
|
18380
18380
|
*/
|
|
18381
|
-
//# sourceMappingURL=chunk-
|
|
18381
|
+
//# sourceMappingURL=chunk-L7VPSGMT.mjs.map
|
package/dist/core/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v5.5.
|
|
1
|
+
/* WebMusicScore v5.5.1 | (c) 2023-2025 PahkaSoft | 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;
|
|
@@ -63,7 +63,7 @@ function init() {
|
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
65
|
initialized = true;
|
|
66
|
-
console.log("%cWebMusicScore v5.5.
|
|
66
|
+
console.log("%cWebMusicScore v5.5.1 (cjs) initialized.", "background: black; color: white; padding: 2px;");
|
|
67
67
|
}
|
|
68
68
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
69
|
0 && (module.exports = {
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* WebMusicScore v5.5.
|
|
1
|
+
/* WebMusicScore v5.5.1 | (c) 2023-2025 PahkaSoft | 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-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-BZE5UGTJ.mjs";
|
|
6
|
+
import "../chunk-7GVRGM3N.mjs";
|
|
7
7
|
|
|
8
8
|
// src/core/index.ts
|
|
9
9
|
var initialized = false;
|
|
@@ -12,7 +12,7 @@ function init() {
|
|
|
12
12
|
return;
|
|
13
13
|
}
|
|
14
14
|
initialized = true;
|
|
15
|
-
console.log("%cWebMusicScore v5.5.
|
|
15
|
+
console.log("%cWebMusicScore v5.5.1 (esm) initialized.", "background: black; color: white; padding: 2px;");
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
18
|
MusicError,
|