@dsebastien/music-notation 0.19.0 → 0.19.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/index.js CHANGED
@@ -8335,7 +8335,7 @@ function chordDiagram(doc, shown, definition, semitones, drawing) {
8335
8335
  const known = parseChord(shown) !== null && chordNoteSet(shown) !== null;
8336
8336
  const capo = drawing.capo && drawing.capo > 0 ? drawing.capo : 0;
8337
8337
  const sounding = capo ? soundingChord(shown, capo) : shown;
8338
- let el = null;
8338
+ let el;
8339
8339
  if (drawing.instrument === "piano") {
8340
8340
  const set = definition?.keys ? keysNoteSet(sounding, definition.keys) : known ? pianoPitches(sounding) : null;
8341
8341
  if (!set)
@@ -8387,7 +8387,7 @@ function renderChordsUsed(doc, song, options) {
8387
8387
  skipped++;
8388
8388
  continue;
8389
8389
  }
8390
- let el = null;
8390
+ let el;
8391
8391
  try {
8392
8392
  el = chordDiagram(doc, shown, definition, semitones, {
8393
8393
  ...options,
@@ -8602,7 +8602,7 @@ function renderChart(doc, song, options = {}) {
8602
8602
  const known = sounds.get(shown);
8603
8603
  if (known !== undefined)
8604
8604
  return known;
8605
- let pitches = null;
8605
+ let pitches;
8606
8606
  try {
8607
8607
  pitches = chordDiagram(doc, shown, findDefinition(song.definitions, written), semitones, {
8608
8608
  ...drawing,
@@ -8667,7 +8667,7 @@ function renderChart(doc, song, options = {}) {
8667
8667
  const moved = definition.transposable ? semitones : 0;
8668
8668
  const shown = transposeChord(definition.name, moved, spelling);
8669
8669
  const inline = html(doc, "div", "mn-line mn-chart-chord");
8670
- let diagram = null;
8670
+ let diagram;
8671
8671
  try {
8672
8672
  diagram = chordDiagram(doc, shown, definition, moved, {
8673
8673
  ...drawing,
@@ -10705,7 +10705,7 @@ function playSettingsOf(fields) {
10705
10705
  parseStrum(`${time ? `time: ${time}
10706
10706
  ` : ""}${strum}`);
10707
10707
  } catch (e) {
10708
- throw new Error(`strum: write beats, bar, arpeggio or a strumming pattern (D DU UDU): ${e instanceof Error ? e.message : String(e)}`);
10708
+ throw new Error(`strum: write beats, bar, arpeggio or a strumming pattern (D DU UDU): ${e instanceof Error ? e.message : String(e)}`, { cause: e });
10709
10709
  }
10710
10710
  }
10711
10711
  settings.push([
@@ -12430,7 +12430,7 @@ function renderBlock(language, source, host, given = {}) {
12430
12430
  el.setAttribute("data-mn-root-mark", rootMark);
12431
12431
  const quoted = (e) => quoteAsWritten(messageOf(e), reading.changes);
12432
12432
  const draw = () => {
12433
- let parts = null;
12433
+ let parts;
12434
12434
  try {
12435
12435
  if ((language === "fretboard" || language === "keyboard") && !splitParts(text))
12436
12436
  text = resolveScalesFor(text);
@@ -15569,5 +15569,5 @@ export {
15569
15569
  withTonicizations
15570
15570
  };
15571
15571
 
15572
- //# debugId=880A0EE8B60C215264756E2164756E21
15572
+ //# debugId=C140B6C3DE3C556464756E2164756E21
15573
15573
  //# sourceMappingURL=index.js.map