@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/dist/tab/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 suffix = withoutParentheses(parts.suffix);
1530
+ const lead = leadSheetSuffix(parts.suffix);
1531
+ const suffix = withoutParentheses(lead);
1527
1532
  let quality = null;
1528
- for (const written of suffix === null || suffix === parts.suffix ? [parts.suffix] : [parts.suffix, 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) {
@@ -4873,7 +4878,6 @@ function renderTab(language, source, host, options) {
4873
4878
  enableLazyLoading: false
4874
4879
  },
4875
4880
  display: {
4876
- staveProfile: "Default",
4877
4881
  resources: colorsOf(el),
4878
4882
  ...line ? { layoutMode: at.LayoutMode?.Horizontal ?? 1 } : {}
4879
4883
  },
@@ -5350,5 +5354,5 @@ export {
5350
5354
  textTabToAlphaTex
5351
5355
  };
5352
5356
 
5353
- //# debugId=33BEEC591056A9AB64756E2164756E21
5357
+ //# debugId=DF52191A0D0F48AC64756E2164756E21
5354
5358
  //# sourceMappingURL=index.js.map