@dsebastien/music-notation 0.26.0 → 0.26.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/README.md +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +4 -4
- package/dist/music-notation.publish.min.js +33 -33
- package/dist/music-notation.tab.min.js +2 -2
- package/dist/publish/index.js +8 -3
- package/dist/publish/index.js.map +4 -4
- package/dist/tab/index.js +8 -4
- package/dist/tab/index.js.map +5 -5
- package/dist/theory/suffix.d.ts +6 -0
- package/dist/voicings/index.js +8 -3
- package/dist/voicings/index.js.map +4 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -192,7 +192,7 @@ Add this to your site's `publish.js`. It loads the bundle only on pages that hav
|
|
|
192
192
|
|
|
193
193
|
```js
|
|
194
194
|
;(() => {
|
|
195
|
-
const VERSION = '0.
|
|
195
|
+
const VERSION = '0.26.0'
|
|
196
196
|
const CDN = `https://cdn.jsdelivr.net/npm/@dsebastien/music-notation@${VERSION}/dist`
|
|
197
197
|
const selector = (languages) => languages.map((l) => `pre > code.language-${l}`).join(', ')
|
|
198
198
|
const BLOCKS = selector([
|
package/dist/index.js
CHANGED
|
@@ -95,7 +95,11 @@ function withoutParentheses(suffix) {
|
|
|
95
95
|
return null;
|
|
96
96
|
return suffix.replace(/[(),\s]/g, "");
|
|
97
97
|
}
|
|
98
|
+
var leadSheetSuffix = (suffix) => suffix.replace(/^(?:mi|MI|min|MIN)(?![A-Za-z])/, "m").replace(/^(?:ma|MA)(?![A-Za-z])/, "maj");
|
|
98
99
|
function canonicalSuffix(suffix) {
|
|
100
|
+
const lead = leadSheetSuffix(suffix);
|
|
101
|
+
if (lead !== suffix)
|
|
102
|
+
return canonicalSuffix(lead);
|
|
99
103
|
const direct = CANONICAL.get(suffix);
|
|
100
104
|
if (direct !== undefined)
|
|
101
105
|
return direct;
|
|
@@ -1523,9 +1527,10 @@ function parseChord(symbol) {
|
|
|
1523
1527
|
return null;
|
|
1524
1528
|
const trimmed = symbol.trim();
|
|
1525
1529
|
const { root, bass } = parts;
|
|
1526
|
-
const
|
|
1530
|
+
const lead = leadSheetSuffix(parts.suffix);
|
|
1531
|
+
const suffix = withoutParentheses(lead);
|
|
1527
1532
|
let quality = null;
|
|
1528
|
-
for (const written of suffix === null || suffix ===
|
|
1533
|
+
for (const written of suffix === null || suffix === lead ? [lead] : [lead, suffix]) {
|
|
1529
1534
|
for (const [re, label] of QUALITY_SUFFIXES) {
|
|
1530
1535
|
const hit = re.exec(written);
|
|
1531
1536
|
if (hit) {
|
|
@@ -18898,5 +18903,5 @@ export {
|
|
|
18898
18903
|
withTonicizations
|
|
18899
18904
|
};
|
|
18900
18905
|
|
|
18901
|
-
//# debugId=
|
|
18906
|
+
//# debugId=A93BDCD6EB2011A264756E2164756E21
|
|
18902
18907
|
//# sourceMappingURL=index.js.map
|