web-music-score 6.0.0-pre.5 → 6.0.0

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.
@@ -940,7 +940,9 @@ declare class ObjExtensionLine extends MusicObject {
940
940
  constructor(measure: ObjMeasure, line: ObjNotationLine, extension: Extension, cols: ExtensionObjectAll[]);
941
941
  get row(): ObjScoreRow;
942
942
  getMusicInterface(): MExtensionLine;
943
+ private getLeftObj;
943
944
  private getLineLeft;
945
+ private getRightObj;
944
946
  private getLineRight;
945
947
  layoutFitToMeasure(ctx: RenderContext): void;
946
948
  pick(x: number, y: number): MusicObject[];
@@ -1072,7 +1074,7 @@ declare class ObjMeasure extends MusicObject {
1072
1074
  private addRhythmSymbol;
1073
1075
  addNoteGroup(voiceId: VoiceId, notes: (Note | string)[], noteLength: NoteLength | NoteLengthStr, options?: NoteOptions, tupletRatio?: TupletRatio): ObjNoteGroup;
1074
1076
  addRest(voiceId: VoiceId, restLength: NoteLength | NoteLengthStr, options?: RestOptions, tupletRatio?: TupletRatio): ObjRest;
1075
- addLyrics(staffTabOrGroups: StaffTabOrGroups | undefined, verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText: string, lyricsOptions: LyricsOptions): void;
1077
+ addLyrics(staffTabOrGroups: StaffTabOrGroups | undefined, verse: VerseNumber, lyricsText: string, lyricsLength: NoteLength | NoteLengthStr, lyricsOptions: LyricsOptions): void;
1076
1078
  /**
1077
1079
  *
1078
1080
  * @param positionTicks - get ObjRhythmColumn with positionTicks. Insert new if necessary.
@@ -1,4 +1,4 @@
1
- import { M as MDocument } from '../music-objects-D-xO1oti.js';
1
+ import { M as MDocument } from '../music-objects-CHp-dh_J.js';
2
2
  import '../note-CJuq5aBy.js';
3
3
  import '../tempo-pCAa6qgo.js';
4
4
  import '@tspro/ts-utils-lib';
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.0 | (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;
@@ -50,7 +50,7 @@ function createFrereJacques() {
50
50
  return new import_score3.DocumentBuilder().setHeader("Fr\xE8re Jacques", "Traditional").setScoreConfiguration([
51
51
  { type: "staff", clef: "G", voiceId: 0, instrument: "!{Piano" },
52
52
  { type: "staff", clef: "F", voiceId: 1, instrument: "!{Piano" }
53
- ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "YES").addNote(0, "D4", "4n").addLyrics(1, "4n", "I'm").addNote(0, "F#4", "4n").addLyrics(1, "4n", "SLEEP", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ING").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addLyrics(1, "4n", "Please").addNote(0, "C#4", "8n").addLyrics(1, "8n", "GO").addNote(0, "C#4", "8n").addLyrics(1, "8n", "A", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "4n", "WAY!").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
53
+ ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "Bro", "4n", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "ther", "4n").addNote(0, "A4", "2n").addLyrics(1, "John?", "4n").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "Are", "4n").addNote(1, "E3", "4n").addLyricsTo(1, 1, "you", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "sleep", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing?", "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "Bro", "4n", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "ther", "4n").addNote(0, "A4", "2n").addLyrics(1, "John?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Are", "4n").addNote(1, "E3", "4n").addLyricsTo(1, 1, "you", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "sleep", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing?", "4n").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "Morn", "8n", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "ing", "8n").addNote(0, "A4", "8n").addLyrics(1, "bells", "8n").addNote(0, "G4", "8n").addLyrics(1, "are", "8n").addNote(0, "F#4", "4n").addLyrics(1, "ring", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing!", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "Bro", "4n", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "ther", "4n").addNote(1, "A3", "2n").addLyricsTo(1, 1, "John?", "2n").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "Morn", "8n", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "ing", "8n").addNote(0, "A4", "8n").addLyrics(1, "bells", "8n").addNote(0, "G4", "8n").addLyrics(1, "are", "8n").addNote(0, "F#4", "4n").addLyrics(1, "ring", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing!", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "Bro", "4n", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "ther", "4n").addNote(1, "A3", "2n").addLyricsTo(1, 1, "John?", "2n").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Ding", "4n").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "ding", "4n").addNote(0, "D4", "4n").addLyrics(1, "dong!", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "Morn", "8n", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "ing", "8n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "bells", "8n").addNote(1, "G3", "8n").addLyricsTo(1, 1, "are", "8n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "ring", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing!", "4n").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Ding", "4n").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "ding", "4n").addNote(0, "D4", "4n").addLyrics(1, "dong!", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "Morn", "8n", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "ing", "8n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "bells", "8n").addNote(1, "G3", "8n").addLyricsTo(1, 1, "are", "8n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "ring", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing!", "4n").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Ding", "4n").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "ding", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "dong!", "4n").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Ding", "4n").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "ding", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "dong!", "4n").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "YES", "4n").addNote(0, "D4", "4n").addLyrics(1, "I'm", "4n").addNote(0, "F#4", "4n").addLyrics(1, "SLEEP", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ING", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addLyrics(1, "Please", "4n").addNote(0, "C#4", "8n").addLyrics(1, "GO", "8n").addNote(0, "C#4", "8n").addLyrics(1, "A", "8n", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "WAY!", "4n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
54
54
  }
55
55
 
56
56
  // src/pieces/greensleeves.ts
@@ -1,5 +1,5 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
- import "../chunk-G3HIPFVF.mjs";
1
+ /* WebMusicScore v6.0.0 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
+ import "../chunk-ZAPOJP2K.mjs";
3
3
 
4
4
  // src/pieces/andante-diabelli.ts
5
5
  import { DocumentBuilder } from "web-music-score/score";
@@ -22,7 +22,7 @@ function createFrereJacques() {
22
22
  return new DocumentBuilder3().setHeader("Fr\xE8re Jacques", "Traditional").setScoreConfiguration([
23
23
  { type: "staff", clef: "G", voiceId: 0, instrument: "!{Piano" },
24
24
  { type: "staff", clef: "F", voiceId: 1, instrument: "!{Piano" }
25
- ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "Bro", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "4n", "ther").addNote(0, "A4", "2n").addLyrics(1, "4n", "John?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Are").addNote(1, "E3", "4n").addLyricsTo(1, 1, "4n", "you").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "sleep", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "8n", "Morn", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "8n", "ing").addNote(0, "A4", "8n").addLyrics(1, "8n", "bells").addNote(0, "G4", "8n").addLyrics(1, "8n", "are").addNote(0, "F#4", "4n").addLyrics(1, "4n", "ring", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing!").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "Bro", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "4n", "ther").addNote(1, "A3", "2n").addLyricsTo(1, 1, "2n", "John?").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "4n", "Ding").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "4n", "ding").addNote(0, "D4", "4n").addLyrics(1, "4n", "dong!").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "Morn", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "8n", "ing").addNote(1, "A3", "8n").addLyricsTo(1, 1, "8n", "bells").addNote(1, "G3", "8n").addLyricsTo(1, 1, "8n", "are").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "4n", "ring", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "ing!").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "4n", "Are").addNote(0, "E4", "4n").addLyrics(1, "4n", "you").addNote(0, "F#4", "4n").addLyrics(1, "4n", "sleep", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ing?").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "Ding").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "4n", "ding").addNote(1, "D3", "4n").addLyricsTo(1, 1, "4n", "dong!").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "4n", "YES").addNote(0, "D4", "4n").addLyrics(1, "4n", "I'm").addNote(0, "F#4", "4n").addLyrics(1, "4n", "SLEEP", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "4n", "ING").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addLyrics(1, "4n", "Please").addNote(0, "C#4", "8n").addLyrics(1, "8n", "GO").addNote(0, "C#4", "8n").addLyrics(1, "8n", "A", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "4n", "WAY!").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
25
+ ]).setMeasuresPerRow(2).addMeasure().setKeySignature("D Major").setTimeSignature("4/4").addNote(0, "D4", "4n", { stem: "up" }).addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addRest(1, "1n", { staffPos: "F3" }).addMeasure().addNavigation("startRepeat").addNote(0, "F#4", "4n").addLyrics(1, "Bro", "4n", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "ther", "4n").addNote(0, "A4", "2n").addLyrics(1, "John?", "4n").addNote(1, "D3", "4n", { stem: "down" }).addLyricsTo(1, 1, "Are", "4n").addNote(1, "E3", "4n").addLyricsTo(1, 1, "you", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "sleep", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing?", "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "Bro", "4n", { hyphen: "-" }).addNote(0, "G4", "4n").addLyrics(1, "ther", "4n").addNote(0, "A4", "2n").addLyrics(1, "John?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Are", "4n").addNote(1, "E3", "4n").addLyricsTo(1, 1, "you", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "sleep", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing?", "4n").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "Morn", "8n", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "ing", "8n").addNote(0, "A4", "8n").addLyrics(1, "bells", "8n").addNote(0, "G4", "8n").addLyrics(1, "are", "8n").addNote(0, "F#4", "4n").addLyrics(1, "ring", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing!", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "Bro", "4n", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "ther", "4n").addNote(1, "A3", "2n").addLyricsTo(1, 1, "John?", "2n").addMeasure().addNote(0, "A4", "8n").addLyrics(1, "Morn", "8n", { hyphen: "-" }).addNote(0, "B4", "8n").addLyrics(1, "ing", "8n").addNote(0, "A4", "8n").addLyrics(1, "bells", "8n").addNote(0, "G4", "8n").addLyrics(1, "are", "8n").addNote(0, "F#4", "4n").addLyrics(1, "ring", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing!", "4n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "Bro", "4n", { hyphen: "-" }).addNote(1, "G3", "4n").addLyricsTo(1, 1, "ther", "4n").addNote(1, "A3", "2n").addLyricsTo(1, 1, "John?", "2n").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Ding", "4n").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "ding", "4n").addNote(0, "D4", "4n").addLyrics(1, "dong!", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "Morn", "8n", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "ing", "8n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "bells", "8n").addNote(1, "G3", "8n").addLyricsTo(1, 1, "are", "8n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "ring", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing!", "4n").addMeasure().addNote(0, "D4", "4n").addLyrics(1, "Ding", "4n").addChord(0, ["C#4", "A4"], "4n").addLyrics(1, "ding", "4n").addNote(0, "D4", "4n").addLyrics(1, "dong!", "4n").addRest(0, "4n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "Morn", "8n", { hyphen: "-" }).addNote(1, "B3", "8n").addLyricsTo(1, 1, "ing", "8n").addNote(1, "A3", "8n").addLyricsTo(1, 1, "bells", "8n").addNote(1, "G3", "8n").addLyricsTo(1, 1, "are", "8n").addNote(1, "F#3", "4n").addLyricsTo(1, 1, "ring", "4n", { hyphen: "-" }).addNote(1, "D3", "4n").addLyricsTo(1, 1, "ing!", "4n").addMeasure().setMeasuresPerRow(4).addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Ding", "4n").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "ding", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "dong!", "4n").addRest(1, "4n").addMeasure().addNavigation("endRepeat").addNote(0, "D4", "4n").addLyrics(1, "Are", "4n").addNote(0, "E4", "4n").addLyrics(1, "you", "4n").addNote(0, "F#4", "4n").addLyrics(1, "sleep", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ing?", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "Ding", "4n").addChord(1, ["C#3", "A3"], "4n").addLyricsTo(1, 1, "ding", "4n").addNote(1, "D3", "4n").addLyricsTo(1, 1, "dong!", "4n").addRest(1, "4n").addMeasure().addNote(0, "F#4", "4n").addLyrics(1, "YES", "4n").addNote(0, "D4", "4n").addLyrics(1, "I'm", "4n").addNote(0, "F#4", "4n").addLyrics(1, "SLEEP", "4n", { hyphen: "-" }).addNote(0, "D4", "4n").addLyrics(1, "ING", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addNote(1, "A3", "4n").addNote(1, "F#3", "4n").addMeasure().addNote(0, "A3", "4n").addLyrics(1, "Please", "4n").addNote(0, "C#4", "8n").addLyrics(1, "GO", "8n").addNote(0, "C#4", "8n").addLyrics(1, "A", "8n", { hyphen: "-" }).addNote(0, "D4", "2n").addLyrics(1, "WAY!", "4n").addNote(1, "D3", "4n").addNote(1, "E3", "4n").addNote(1, "F#3", "2n").getDocument();
26
26
  }
27
27
 
28
28
  // src/pieces/greensleeves.ts
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { M as MDocument, a8 as Paint, o as ScoreEventListener, r as MPlaybackButtons } from '../music-objects-D-xO1oti.js';
3
+ import { M as MDocument, a8 as Paint, o as ScoreEventListener, r as MPlaybackButtons } from '../music-objects-CHp-dh_J.js';
4
4
  import '../note-CJuq5aBy.js';
5
5
  import '../tempo-pCAa6qgo.js';
6
6
  import '@tspro/ts-utils-lib';
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.0 | (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 __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -1,7 +1,7 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.0 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
2
2
  import {
3
3
  __publicField
4
- } from "../chunk-G3HIPFVF.mjs";
4
+ } from "../chunk-ZAPOJP2K.mjs";
5
5
 
6
6
  // src/react-ui/music-score-view.tsx
7
7
  import * as React from "react";
@@ -1,5 +1,5 @@
1
- import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, b as MeasureOptions, V as VoiceId, T as TupletOptions, c as VerseNumber, L as LyricsOptions, d as StaffTabOrGroups, F as Fermata, e as Navigation, A as AnnotationText, f as Annotation, g as Label, C as Connective, h as TieType, i as NoteAnchor, j as VerticalPosition } from '../music-objects-D-xO1oti.js';
2
- export { ao as Arpeggio, aa as BaseConfig, a9 as Clef, a5 as ColorKey, a7 as ColorKeyPart, as as DynamicsAnnotation, aq as LyricsAlign, ar as LyricsHyphen, t as MAccidental, v as MArpeggio, H as MBarLineLeft, G as MBarLineRight, w as MBeamGroup, u as MConnective, y as MEnding, a4 as MExtensionLine, z as MFermata, B as MHeader, D as MImage, a3 as MLyrics, E as MMeasure, J as MNoteGroup, r as MPlaybackButtons, p as MPlayer, q as MRenderContext, P as MRest, U as MRhythmColumn, W as MScoreRow, X as MScoreRowGroup, a1 as MSpecialText, Y as MStaff, I as MStaffBarLine, x as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, _ as MStaffSignature, Z as MTab, O as MTabNoteGroup, a0 as MTabRhythm, $ as MTabSignature, a2 as MText, s as MusicInterface, a8 as Paint, au as PlayState, av as PlayStateChangeListener, l as ScoreEvent, o as ScoreEventListener, k as ScoreEventType, n as ScoreObjectEvent, m as ScoreStaffPosEvent, ab as StaffConfig, ap as StaffTabOrGroup, an as Stem, ag as StringNumber, ac as TabConfig, at as TempoAnnotation, a6 as colorKey, ah as getStringNumbers, ak as getVerseNumbers, ad as getVoiceIds, ai as isStringNumber, al as isVerseNumber, ae as isVoiceId, aj as validateStringNumber, am as validateVerseNumber, af as validateVoiceId } from '../music-objects-D-xO1oti.js';
1
+ import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, b as MeasureOptions, V as VoiceId, T as TupletOptions, c as VerseNumber, L as LyricsOptions, d as StaffTabOrGroups, F as Fermata, e as Navigation, A as AnnotationText, f as Annotation, g as Label, C as Connective, h as TieType, i as NoteAnchor, j as VerticalPosition } from '../music-objects-CHp-dh_J.js';
2
+ export { ao as Arpeggio, aa as BaseConfig, a9 as Clef, a5 as ColorKey, a7 as ColorKeyPart, as as DynamicsAnnotation, aq as LyricsAlign, ar as LyricsHyphen, t as MAccidental, v as MArpeggio, H as MBarLineLeft, G as MBarLineRight, w as MBeamGroup, u as MConnective, y as MEnding, a4 as MExtensionLine, z as MFermata, B as MHeader, D as MImage, a3 as MLyrics, E as MMeasure, J as MNoteGroup, r as MPlaybackButtons, p as MPlayer, q as MRenderContext, P as MRest, U as MRhythmColumn, W as MScoreRow, X as MScoreRowGroup, a1 as MSpecialText, Y as MStaff, I as MStaffBarLine, x as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, _ as MStaffSignature, Z as MTab, O as MTabNoteGroup, a0 as MTabRhythm, $ as MTabSignature, a2 as MText, s as MusicInterface, a8 as Paint, au as PlayState, av as PlayStateChangeListener, l as ScoreEvent, o as ScoreEventListener, k as ScoreEventType, n as ScoreObjectEvent, m as ScoreStaffPosEvent, ab as StaffConfig, ap as StaffTabOrGroup, an as Stem, ag as StringNumber, ac as TabConfig, at as TempoAnnotation, a6 as colorKey, ah as getStringNumbers, ak as getVerseNumbers, ad as getVoiceIds, ai as isStringNumber, al as isVerseNumber, ae as isVoiceId, aj as validateStringNumber, am as validateVerseNumber, af as validateVoiceId } from '../music-objects-CHp-dh_J.js';
3
3
  import { N as Note } from '../note-CJuq5aBy.js';
4
4
  import { S as ScaleType, c as Scale } from '../scale-DxGqFxlv.js';
5
5
  import { N as NoteLength, h as NoteLengthStr, K as KeySignature, a as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-pCAa6qgo.js';
@@ -221,22 +221,22 @@ declare class DocumentBuilder {
221
221
  /**
222
222
  * Add lyrics to current measure.
223
223
  * @param verse - Verse number (e.g. 1).
224
- * @param lyricsLength - Lyrics text length (e.g. "2n").
225
224
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
225
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
226
226
  * @param lyricsOptions - Lyrics options.
227
227
  * @returns - This document builder instance.
228
228
  */
229
- addLyrics(verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText?: string | string[], lyricsOptions?: LyricsOptions): DocumentBuilder;
229
+ addLyrics(verse: VerseNumber, lyricsText: string | string[], lyricsLength: NoteLength | NoteLengthStr, lyricsOptions?: LyricsOptions): DocumentBuilder;
230
230
  /**
231
231
  * Add lyrics to current measure to given staff/tab/group.
232
232
  * @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name.
233
233
  * @param verse - Verse number (e.g. 1).
234
- * @param lyricsLength - Lyrics text length (e.g. "2n").
235
234
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
235
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
236
236
  * @param lyricsOptions - Lyrics options.
237
237
  * @returns - This document builder instance.
238
238
  */
239
- addLyricsTo(staffTabOrGroups: StaffTabOrGroups, verse: VerseNumber, lyricsLength: NoteLength | NoteLengthStr, lyricsText?: string | string[], lyricsOptions?: LyricsOptions): DocumentBuilder;
239
+ addLyricsTo(staffTabOrGroups: StaffTabOrGroups, verse: VerseNumber, lyricsText: string | string[], lyricsLength: NoteLength | NoteLengthStr, lyricsOptions?: LyricsOptions): DocumentBuilder;
240
240
  private addFermataInternal;
241
241
  /**
242
242
  * Add fermata to current measure.
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.0 | (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 __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -7022,17 +7022,15 @@ var _Extension = class _Extension extends MusicObjectLink {
7022
7022
  let range = new ExtensionRange(curColumn);
7023
7023
  let ticksLeft = length;
7024
7024
  while (true) {
7025
- if (ticksLeft <= 0) return range;
7025
+ if (!curColumn || ticksLeft <= 0) return range;
7026
7026
  const stopObject = this.whatStopped(curColumn);
7027
7027
  if (stopObject !== void 0) {
7028
7028
  range.setStopObject(stopObject);
7029
7029
  return range;
7030
7030
  }
7031
+ range.addColumn(curColumn);
7031
7032
  ticksLeft -= curColumn.getTicksToNextColumn();
7032
7033
  curColumn = curColumn.getNextColumn();
7033
- if (!curColumn) return range;
7034
- if (ticksLeft > 0)
7035
- range.addColumn(curColumn);
7036
7034
  }
7037
7035
  }
7038
7036
  };
@@ -7062,6 +7060,9 @@ function getNavigationString(navigation) {
7062
7060
  return navigation[0].toUpperCase() + navigation.substring(1);
7063
7061
  }
7064
7062
  }
7063
+ function isDynamicsText(text) {
7064
+ return guard_exports.isEnumValue(text, DynamicsAnnotation);
7065
+ }
7065
7066
  function getDynamicsVolume(text) {
7066
7067
  if (/^(p+|f+|m|mp|mf)$/.test(text)) {
7067
7068
  let volume = 0.5 - utils_exports.Str.charCount(text, "p") * 0.1 + utils_exports.Str.charCount(text, "f") * 0.1;
@@ -7070,6 +7071,9 @@ function getDynamicsVolume(text) {
7070
7071
  return void 0;
7071
7072
  }
7072
7073
  }
7074
+ function isTempoText(text) {
7075
+ return guard_exports.isEnumValue(text, TempoAnnotation);
7076
+ }
7073
7077
  function getAnnotation(text) {
7074
7078
  if (guard_exports.isEnumValue(text, DynamicsAnnotation)) {
7075
7079
  return "dynamics" /* Dynamics */;
@@ -7278,7 +7282,7 @@ var Player = class _Player {
7278
7282
  let volumeMap = new UniMap();
7279
7283
  const pushSpeed = (col, speed) => speedMap.getOrCreate(col, []).push(speed);
7280
7284
  const pushVolume = (col, volume) => volumeMap.getOrCreate(col, []).push(volume);
7281
- this.playerColumnSequence.forEach((col) => {
7285
+ this.playerColumnSequence.forEach((col, colId) => {
7282
7286
  if (!(col instanceof ObjRhythmColumn)) {
7283
7287
  return;
7284
7288
  }
@@ -7289,8 +7293,8 @@ var Player = class _Player {
7289
7293
  curSpeed = 1;
7290
7294
  } else if ((vol = getDynamicsVolume(text)) !== void 0) {
7291
7295
  curVolume = vol;
7292
- } else if (layoutObj.musicObj.getLink() instanceof Extension) {
7293
- let extension = layoutObj.musicObj.getLink();
7296
+ } else if (isTempoText(text) || isDynamicsText(text)) {
7297
+ let extension = layoutObj.musicObj.getLink() instanceof Extension ? layoutObj.musicObj.getLink() : new Extension(layoutObj, col, Infinity, false, "solid", "bottom");
7294
7298
  const range = extension.getRange();
7295
7299
  const stopText = range.stopObject ? getTextContent(range.stopObject) : "";
7296
7300
  let totalTicks = utils_exports.Math.sum(range.columnRange.map((c) => c.getTicksToNextColumn()));
@@ -8364,6 +8368,17 @@ var ObjFermata = class extends MusicObject {
8364
8368
  };
8365
8369
 
8366
8370
  // src/score/engine/obj-extension-line.ts
8371
+ function getRow(obj) {
8372
+ let o = obj;
8373
+ while (o) {
8374
+ if (o.row instanceof ObjScoreRow)
8375
+ return o.row;
8376
+ if (o.measure instanceof ObjMeasure)
8377
+ return o.measure.row;
8378
+ o = o.getParent();
8379
+ }
8380
+ return void 0;
8381
+ }
8367
8382
  function isExtensionStartObject(obj) {
8368
8383
  return obj instanceof ObjText || obj instanceof ObjSpecialText;
8369
8384
  }
@@ -8387,8 +8402,11 @@ var ObjExtensionLine = class extends MusicObject {
8387
8402
  getMusicInterface() {
8388
8403
  return this.mi;
8389
8404
  }
8405
+ getLeftObj() {
8406
+ return this.cols[0];
8407
+ }
8390
8408
  getLineLeft(ctx) {
8391
- let obj = this.cols[0];
8409
+ let obj = this.getLeftObj();
8392
8410
  if (isExtensionStartObject(obj))
8393
8411
  return obj.getRect().right + ctx.unitSize;
8394
8412
  if (obj instanceof ObjBarLineLeft)
@@ -8400,8 +8418,18 @@ var ObjExtensionLine = class extends MusicObject {
8400
8418
  }
8401
8419
  return obj.getRect().right;
8402
8420
  }
8421
+ getRightObj() {
8422
+ const obj = this.cols[this.cols.length - 1];
8423
+ if (isExtensionStopObject(obj)) {
8424
+ const objRow = getRow(obj);
8425
+ const prevObj = this.cols[this.cols.length - 2];
8426
+ const prevObjRow = getRow(prevObj);
8427
+ return objRow && prevObjRow && objRow !== prevObjRow ? prevObj : obj;
8428
+ }
8429
+ return obj;
8430
+ }
8403
8431
  getLineRight(ctx) {
8404
- let obj = this.cols[this.cols.length - 1];
8432
+ let obj = this.getRightObj();
8405
8433
  if (isExtensionStopObject(obj))
8406
8434
  return obj.getRect().left - ctx.unitSize;
8407
8435
  if (obj instanceof ObjRhythmColumn) {
@@ -8441,7 +8469,7 @@ var ObjExtensionLine = class extends MusicObject {
8441
8469
  ctx.setLineDash([]);
8442
8470
  let tails = this.extension.getTails();
8443
8471
  let last = tails[tails.length - 1];
8444
- if (this === last && !isExtensionStopObject(this.cols[this.cols.length - 1])) {
8472
+ if (this === last && !isExtensionStopObject(this.getRightObj())) {
8445
8473
  let tipH = rect.anchorY > this.line.getRect().anchorY ? -ctx.unitSize : ctx.unitSize;
8446
8474
  ctx.strokeLine(rect.right, rect.anchorY, rect.right, rect.anchorY + tipH);
8447
8475
  }
@@ -9708,7 +9736,7 @@ var ObjMeasure = class extends MusicObject {
9708
9736
  this.addRhythmSymbol(rest);
9709
9737
  return rest;
9710
9738
  }
9711
- addLyrics(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions) {
9739
+ addLyrics(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions) {
9712
9740
  this.forEachStaffGroup(staffTabOrGroups, 1 /* Below */, (line, vpos) => {
9713
9741
  var _a;
9714
9742
  let col = this.getRhythmColumn({ verse, line, vpos });
@@ -11551,7 +11579,7 @@ var import_theory13 = require("web-music-score/theory");
11551
11579
  var import_core16 = require("web-music-score/core");
11552
11580
  var assertingFunction = "";
11553
11581
  function setAssertFunction(fnName, ...fnArgs) {
11554
- let argsStr = fnArgs.map((arg) => JSON.stringify(arg)).join(", ");
11582
+ let argsStr = fnArgs.map((arg) => utils_exports.Str.stringify(arg)).join(", ");
11555
11583
  assertingFunction = `DocumentBuilder.${fnName}(${argsStr})`;
11556
11584
  }
11557
11585
  function assertArg(...conditions) {
@@ -11893,7 +11921,7 @@ var _DocumentBuilder = class _DocumentBuilder {
11893
11921
  ObjBeamGroup.createTuplet(tupletSymbols, tupletRatio);
11894
11922
  return this;
11895
11923
  }
11896
- addLyricsInternal(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions) {
11924
+ addLyricsInternal(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions) {
11897
11925
  var _a;
11898
11926
  assertStaffTabOrGRoups(staffTabOrGroups);
11899
11927
  assertArg(
@@ -11909,36 +11937,36 @@ var _DocumentBuilder = class _DocumentBuilder {
11909
11937
  (_a = lyricsOptions.align) != null ? _a : lyricsOptions.align = this.currentLyricsAlign;
11910
11938
  }
11911
11939
  if (guard_exports.isArray(lyricsText)) {
11912
- lyricsText.forEach((text) => this.getMeasure().addLyrics(staffTabOrGroups, verse, lyricsLength, text, lyricsOptions));
11940
+ lyricsText.forEach((text) => this.getMeasure().addLyrics(staffTabOrGroups, verse, text, lyricsLength, lyricsOptions));
11913
11941
  } else {
11914
- this.getMeasure().addLyrics(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions);
11942
+ this.getMeasure().addLyrics(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions);
11915
11943
  }
11916
11944
  return this;
11917
11945
  }
11918
11946
  /**
11919
11947
  * Add lyrics to current measure.
11920
11948
  * @param verse - Verse number (e.g. 1).
11921
- * @param lyricsLength - Lyrics text length (e.g. "2n").
11922
11949
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
11950
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
11923
11951
  * @param lyricsOptions - Lyrics options.
11924
11952
  * @returns - This document builder instance.
11925
11953
  */
11926
- addLyrics(verse, lyricsLength, lyricsText, lyricsOptions) {
11954
+ addLyrics(verse, lyricsText, lyricsLength, lyricsOptions) {
11927
11955
  setAssertFunction("addLyrics", verse, lyricsLength, lyricsText, lyricsOptions);
11928
- return this.addLyricsInternal(void 0, verse, lyricsLength, lyricsText != null ? lyricsText : "", lyricsOptions);
11956
+ return this.addLyricsInternal(void 0, verse, lyricsText, lyricsLength, lyricsOptions);
11929
11957
  }
11930
11958
  /**
11931
11959
  * Add lyrics to current measure to given staff/tab/group.
11932
11960
  * @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name.
11933
11961
  * @param verse - Verse number (e.g. 1).
11934
- * @param lyricsLength - Lyrics text length (e.g. "2n").
11935
11962
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
11963
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
11936
11964
  * @param lyricsOptions - Lyrics options.
11937
11965
  * @returns - This document builder instance.
11938
11966
  */
11939
- addLyricsTo(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions) {
11967
+ addLyricsTo(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions) {
11940
11968
  setAssertFunction("addLyricsTo", verse, lyricsLength, lyricsText, lyricsOptions);
11941
- return this.addLyricsInternal(staffTabOrGroups, verse, lyricsLength, lyricsText != null ? lyricsText : "", lyricsOptions);
11969
+ return this.addLyricsInternal(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions);
11942
11970
  }
11943
11971
  addFermataInternal(staffTabOrGroups, fermata) {
11944
11972
  assertStaffTabOrGRoups(staffTabOrGroups);
@@ -1,12 +1,12 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.0 | (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
- } from "../chunk-U2D4H5TI.mjs";
4
+ } from "../chunk-422QLXBR.mjs";
5
5
  import {
6
6
  NoteLengthProps,
7
7
  RhythmProps,
8
8
  validateNoteLength
9
- } from "../chunk-DQFQEO6F.mjs";
9
+ } from "../chunk-JOXUFYNU.mjs";
10
10
  import {
11
11
  AnchoredRect,
12
12
  BiMap,
@@ -20,12 +20,12 @@ import {
20
20
  device_exports,
21
21
  guard_exports,
22
22
  utils_exports
23
- } from "../chunk-JP3PJICN.mjs";
23
+ } from "../chunk-7N2CWRTL.mjs";
24
24
  import {
25
25
  __publicField,
26
26
  __spreadProps,
27
27
  __spreadValues
28
- } from "../chunk-G3HIPFVF.mjs";
28
+ } from "../chunk-ZAPOJP2K.mjs";
29
29
 
30
30
  // src/score/pub/types.ts
31
31
  var StaffPreset = /* @__PURE__ */ ((StaffPreset2) => {
@@ -3149,17 +3149,15 @@ var _Extension = class _Extension extends MusicObjectLink {
3149
3149
  let range = new ExtensionRange(curColumn);
3150
3150
  let ticksLeft = length;
3151
3151
  while (true) {
3152
- if (ticksLeft <= 0) return range;
3152
+ if (!curColumn || ticksLeft <= 0) return range;
3153
3153
  const stopObject = this.whatStopped(curColumn);
3154
3154
  if (stopObject !== void 0) {
3155
3155
  range.setStopObject(stopObject);
3156
3156
  return range;
3157
3157
  }
3158
+ range.addColumn(curColumn);
3158
3159
  ticksLeft -= curColumn.getTicksToNextColumn();
3159
3160
  curColumn = curColumn.getNextColumn();
3160
- if (!curColumn) return range;
3161
- if (ticksLeft > 0)
3162
- range.addColumn(curColumn);
3163
3161
  }
3164
3162
  }
3165
3163
  };
@@ -3189,6 +3187,9 @@ function getNavigationString(navigation) {
3189
3187
  return navigation[0].toUpperCase() + navigation.substring(1);
3190
3188
  }
3191
3189
  }
3190
+ function isDynamicsText(text) {
3191
+ return guard_exports.isEnumValue(text, DynamicsAnnotation);
3192
+ }
3192
3193
  function getDynamicsVolume(text) {
3193
3194
  if (/^(p+|f+|m|mp|mf)$/.test(text)) {
3194
3195
  let volume = 0.5 - utils_exports.Str.charCount(text, "p") * 0.1 + utils_exports.Str.charCount(text, "f") * 0.1;
@@ -3197,6 +3198,9 @@ function getDynamicsVolume(text) {
3197
3198
  return void 0;
3198
3199
  }
3199
3200
  }
3201
+ function isTempoText(text) {
3202
+ return guard_exports.isEnumValue(text, TempoAnnotation);
3203
+ }
3200
3204
  function getAnnotation(text) {
3201
3205
  if (guard_exports.isEnumValue(text, DynamicsAnnotation)) {
3202
3206
  return "dynamics" /* Dynamics */;
@@ -3405,7 +3409,7 @@ var Player = class _Player {
3405
3409
  let volumeMap = new UniMap();
3406
3410
  const pushSpeed = (col, speed) => speedMap.getOrCreate(col, []).push(speed);
3407
3411
  const pushVolume = (col, volume) => volumeMap.getOrCreate(col, []).push(volume);
3408
- this.playerColumnSequence.forEach((col) => {
3412
+ this.playerColumnSequence.forEach((col, colId) => {
3409
3413
  if (!(col instanceof ObjRhythmColumn)) {
3410
3414
  return;
3411
3415
  }
@@ -3416,8 +3420,8 @@ var Player = class _Player {
3416
3420
  curSpeed = 1;
3417
3421
  } else if ((vol = getDynamicsVolume(text)) !== void 0) {
3418
3422
  curVolume = vol;
3419
- } else if (layoutObj.musicObj.getLink() instanceof Extension) {
3420
- let extension = layoutObj.musicObj.getLink();
3423
+ } else if (isTempoText(text) || isDynamicsText(text)) {
3424
+ let extension = layoutObj.musicObj.getLink() instanceof Extension ? layoutObj.musicObj.getLink() : new Extension(layoutObj, col, Infinity, false, "solid", "bottom");
3421
3425
  const range = extension.getRange();
3422
3426
  const stopText = range.stopObject ? getTextContent(range.stopObject) : "";
3423
3427
  let totalTicks = utils_exports.Math.sum(range.columnRange.map((c) => c.getTicksToNextColumn()));
@@ -4491,6 +4495,17 @@ var ObjFermata = class extends MusicObject {
4491
4495
  };
4492
4496
 
4493
4497
  // src/score/engine/obj-extension-line.ts
4498
+ function getRow(obj) {
4499
+ let o = obj;
4500
+ while (o) {
4501
+ if (o.row instanceof ObjScoreRow)
4502
+ return o.row;
4503
+ if (o.measure instanceof ObjMeasure)
4504
+ return o.measure.row;
4505
+ o = o.getParent();
4506
+ }
4507
+ return void 0;
4508
+ }
4494
4509
  function isExtensionStartObject(obj) {
4495
4510
  return obj instanceof ObjText || obj instanceof ObjSpecialText;
4496
4511
  }
@@ -4514,8 +4529,11 @@ var ObjExtensionLine = class extends MusicObject {
4514
4529
  getMusicInterface() {
4515
4530
  return this.mi;
4516
4531
  }
4532
+ getLeftObj() {
4533
+ return this.cols[0];
4534
+ }
4517
4535
  getLineLeft(ctx) {
4518
- let obj = this.cols[0];
4536
+ let obj = this.getLeftObj();
4519
4537
  if (isExtensionStartObject(obj))
4520
4538
  return obj.getRect().right + ctx.unitSize;
4521
4539
  if (obj instanceof ObjBarLineLeft)
@@ -4527,8 +4545,18 @@ var ObjExtensionLine = class extends MusicObject {
4527
4545
  }
4528
4546
  return obj.getRect().right;
4529
4547
  }
4548
+ getRightObj() {
4549
+ const obj = this.cols[this.cols.length - 1];
4550
+ if (isExtensionStopObject(obj)) {
4551
+ const objRow = getRow(obj);
4552
+ const prevObj = this.cols[this.cols.length - 2];
4553
+ const prevObjRow = getRow(prevObj);
4554
+ return objRow && prevObjRow && objRow !== prevObjRow ? prevObj : obj;
4555
+ }
4556
+ return obj;
4557
+ }
4530
4558
  getLineRight(ctx) {
4531
- let obj = this.cols[this.cols.length - 1];
4559
+ let obj = this.getRightObj();
4532
4560
  if (isExtensionStopObject(obj))
4533
4561
  return obj.getRect().left - ctx.unitSize;
4534
4562
  if (obj instanceof ObjRhythmColumn) {
@@ -4568,7 +4596,7 @@ var ObjExtensionLine = class extends MusicObject {
4568
4596
  ctx.setLineDash([]);
4569
4597
  let tails = this.extension.getTails();
4570
4598
  let last = tails[tails.length - 1];
4571
- if (this === last && !isExtensionStopObject(this.cols[this.cols.length - 1])) {
4599
+ if (this === last && !isExtensionStopObject(this.getRightObj())) {
4572
4600
  let tipH = rect.anchorY > this.line.getRect().anchorY ? -ctx.unitSize : ctx.unitSize;
4573
4601
  ctx.strokeLine(rect.right, rect.anchorY, rect.right, rect.anchorY + tipH);
4574
4602
  }
@@ -5835,7 +5863,7 @@ var ObjMeasure = class extends MusicObject {
5835
5863
  this.addRhythmSymbol(rest);
5836
5864
  return rest;
5837
5865
  }
5838
- addLyrics(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions) {
5866
+ addLyrics(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions) {
5839
5867
  this.forEachStaffGroup(staffTabOrGroups, 1 /* Below */, (line, vpos) => {
5840
5868
  var _a;
5841
5869
  let col = this.getRhythmColumn({ verse, line, vpos });
@@ -7678,7 +7706,7 @@ import { BeamGrouping, isNoteLength, isTupletRatio, KeySignature as KeySignature
7678
7706
  import { MusicError as MusicError16, MusicErrorType as MusicErrorType16 } from "web-music-score/core";
7679
7707
  var assertingFunction = "";
7680
7708
  function setAssertFunction(fnName, ...fnArgs) {
7681
- let argsStr = fnArgs.map((arg) => JSON.stringify(arg)).join(", ");
7709
+ let argsStr = fnArgs.map((arg) => utils_exports.Str.stringify(arg)).join(", ");
7682
7710
  assertingFunction = `DocumentBuilder.${fnName}(${argsStr})`;
7683
7711
  }
7684
7712
  function assertArg(...conditions) {
@@ -8020,7 +8048,7 @@ var _DocumentBuilder = class _DocumentBuilder {
8020
8048
  ObjBeamGroup.createTuplet(tupletSymbols, tupletRatio);
8021
8049
  return this;
8022
8050
  }
8023
- addLyricsInternal(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions) {
8051
+ addLyricsInternal(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions) {
8024
8052
  var _a;
8025
8053
  assertStaffTabOrGRoups(staffTabOrGroups);
8026
8054
  assertArg(
@@ -8036,36 +8064,36 @@ var _DocumentBuilder = class _DocumentBuilder {
8036
8064
  (_a = lyricsOptions.align) != null ? _a : lyricsOptions.align = this.currentLyricsAlign;
8037
8065
  }
8038
8066
  if (guard_exports.isArray(lyricsText)) {
8039
- lyricsText.forEach((text) => this.getMeasure().addLyrics(staffTabOrGroups, verse, lyricsLength, text, lyricsOptions));
8067
+ lyricsText.forEach((text) => this.getMeasure().addLyrics(staffTabOrGroups, verse, text, lyricsLength, lyricsOptions));
8040
8068
  } else {
8041
- this.getMeasure().addLyrics(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions);
8069
+ this.getMeasure().addLyrics(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions);
8042
8070
  }
8043
8071
  return this;
8044
8072
  }
8045
8073
  /**
8046
8074
  * Add lyrics to current measure.
8047
8075
  * @param verse - Verse number (e.g. 1).
8048
- * @param lyricsLength - Lyrics text length (e.g. "2n").
8049
8076
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
8077
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
8050
8078
  * @param lyricsOptions - Lyrics options.
8051
8079
  * @returns - This document builder instance.
8052
8080
  */
8053
- addLyrics(verse, lyricsLength, lyricsText, lyricsOptions) {
8081
+ addLyrics(verse, lyricsText, lyricsLength, lyricsOptions) {
8054
8082
  setAssertFunction("addLyrics", verse, lyricsLength, lyricsText, lyricsOptions);
8055
- return this.addLyricsInternal(void 0, verse, lyricsLength, lyricsText != null ? lyricsText : "", lyricsOptions);
8083
+ return this.addLyricsInternal(void 0, verse, lyricsText, lyricsLength, lyricsOptions);
8056
8084
  }
8057
8085
  /**
8058
8086
  * Add lyrics to current measure to given staff/tab/group.
8059
8087
  * @param staffTabOrGroups - staff/tab index (0=top), staff/tab name, or staff group name.
8060
8088
  * @param verse - Verse number (e.g. 1).
8061
- * @param lyricsLength - Lyrics text length (e.g. "2n").
8062
8089
  * @param lyricsText - Lyrics text (empty space if omitted), single value or array.
8090
+ * @param lyricsLength - Lyrics text length (e.g. "2n").
8063
8091
  * @param lyricsOptions - Lyrics options.
8064
8092
  * @returns - This document builder instance.
8065
8093
  */
8066
- addLyricsTo(staffTabOrGroups, verse, lyricsLength, lyricsText, lyricsOptions) {
8094
+ addLyricsTo(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions) {
8067
8095
  setAssertFunction("addLyricsTo", verse, lyricsLength, lyricsText, lyricsOptions);
8068
- return this.addLyricsInternal(staffTabOrGroups, verse, lyricsLength, lyricsText != null ? lyricsText : "", lyricsOptions);
8096
+ return this.addLyricsInternal(staffTabOrGroups, verse, lyricsText, lyricsLength, lyricsOptions);
8069
8097
  }
8070
8098
  addFermataInternal(staffTabOrGroups, fermata) {
8071
8099
  assertStaffTabOrGRoups(staffTabOrGroups);
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
1
+ /* WebMusicScore v6.0.0 | (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;