musicxml-io 0.2.5 → 0.2.7

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 CHANGED
@@ -154,6 +154,33 @@ import { transpose } from 'musicxml-io/operations';
154
154
  import { findNotes } from 'musicxml-io/query';
155
155
  ```
156
156
 
157
+ ## Unique Element IDs
158
+
159
+ All elements in the Score structure have a unique `_id` property that is automatically generated when:
160
+ - MusicXML is parsed/imported
161
+ - New elements are created via operations
162
+
163
+ The ID format is `"i" + nanoid(10)` (11 characters total), where:
164
+ - `"i"` prefix ensures XML ID compatibility (IDs must start with a letter or underscore)
165
+ - `nanoid(10)` generates a URL-safe unique identifier
166
+
167
+ ```typescript
168
+ import { parse, generateId } from 'musicxml-io';
169
+
170
+ const score = parse(xmlString);
171
+ console.log(score._id); // e.g., "iV1StGXR8_Z"
172
+ console.log(score.parts[0]._id); // e.g., "i2x4K9mL1Qp"
173
+
174
+ // Generate IDs manually for custom elements
175
+ const customId = generateId(); // e.g., "iAb3Cd5Ef7H"
176
+ ```
177
+
178
+ This feature enables:
179
+ - Tracking elements across transformations
180
+ - Building element references in external systems
181
+ - Implementing undo/redo functionality
182
+ - Diffing and merging scores
183
+
157
184
  ## Round-trip Fidelity
158
185
 
159
186
  | Metric | Score |
@@ -1,4 +1,4 @@
1
- import { M as Measure, N as NoteEntry, V as VoiceGroup, q as StaffGroup, r as NoteWithPosition, s as Chord, S as Score, t as NoteIteratorItem, g as MeasureEntry, x as VoiceToStaffMap, e as Part, C as Clef, G as StaffRange, H as PositionQueryOptions, I as VerticalSlice, J as VoiceLine, E as EntryWithContext, y as NoteWithContext, O as AdjacentNotes, z as DirectionWithContext, D as DirectionEntry, Q as DirectionKind, R as DynamicWithContext, U as TempoWithContext, W as PedalWithContext, X as WedgeWithContext, Y as OctaveShiftWithContext, Z as TiedNoteGroup, _ as SlurSpan, $ as TupletGroup, a0 as BeamGroup, a1 as NotationType, a2 as HarmonyWithContext, ac as HarmonyEntry, a3 as LyricWithContext, a4 as AssembledLyrics, a6 as RepeatInfo, a5 as BarlineWithContext, a7 as EndingInfo, a8 as KeyChangeInfo, a9 as TimeChangeInfo, aa as ClefChangeInfo, ab as StructuralChanges } from '../types-D3LhKCDK.mjs';
1
+ import { M as Measure, N as NoteEntry, V as VoiceGroup, q as StaffGroup, r as NoteWithPosition, s as Chord, S as Score, t as NoteIteratorItem, g as MeasureEntry, x as VoiceToStaffMap, e as Part, C as Clef, G as StaffRange, H as PositionQueryOptions, I as VerticalSlice, J as VoiceLine, E as EntryWithContext, y as NoteWithContext, O as AdjacentNotes, z as DirectionWithContext, D as DirectionEntry, Q as DirectionKind, R as DynamicWithContext, U as TempoWithContext, W as PedalWithContext, X as WedgeWithContext, Y as OctaveShiftWithContext, Z as TiedNoteGroup, _ as SlurSpan, $ as TupletGroup, a0 as BeamGroup, a1 as NotationType, a2 as HarmonyWithContext, ac as HarmonyEntry, a3 as LyricWithContext, a4 as AssembledLyrics, a6 as RepeatInfo, a5 as BarlineWithContext, a7 as EndingInfo, a8 as KeyChangeInfo, a9 as TimeChangeInfo, aa as ClefChangeInfo, ab as StructuralChanges } from '../types-CSI8kV28.mjs';
2
2
 
3
3
  /**
4
4
  * Filter options for voice/staff selection
@@ -1,4 +1,4 @@
1
- import { M as Measure, N as NoteEntry, V as VoiceGroup, q as StaffGroup, r as NoteWithPosition, s as Chord, S as Score, t as NoteIteratorItem, g as MeasureEntry, x as VoiceToStaffMap, e as Part, C as Clef, G as StaffRange, H as PositionQueryOptions, I as VerticalSlice, J as VoiceLine, E as EntryWithContext, y as NoteWithContext, O as AdjacentNotes, z as DirectionWithContext, D as DirectionEntry, Q as DirectionKind, R as DynamicWithContext, U as TempoWithContext, W as PedalWithContext, X as WedgeWithContext, Y as OctaveShiftWithContext, Z as TiedNoteGroup, _ as SlurSpan, $ as TupletGroup, a0 as BeamGroup, a1 as NotationType, a2 as HarmonyWithContext, ac as HarmonyEntry, a3 as LyricWithContext, a4 as AssembledLyrics, a6 as RepeatInfo, a5 as BarlineWithContext, a7 as EndingInfo, a8 as KeyChangeInfo, a9 as TimeChangeInfo, aa as ClefChangeInfo, ab as StructuralChanges } from '../types-D3LhKCDK.js';
1
+ import { M as Measure, N as NoteEntry, V as VoiceGroup, q as StaffGroup, r as NoteWithPosition, s as Chord, S as Score, t as NoteIteratorItem, g as MeasureEntry, x as VoiceToStaffMap, e as Part, C as Clef, G as StaffRange, H as PositionQueryOptions, I as VerticalSlice, J as VoiceLine, E as EntryWithContext, y as NoteWithContext, O as AdjacentNotes, z as DirectionWithContext, D as DirectionEntry, Q as DirectionKind, R as DynamicWithContext, U as TempoWithContext, W as PedalWithContext, X as WedgeWithContext, Y as OctaveShiftWithContext, Z as TiedNoteGroup, _ as SlurSpan, $ as TupletGroup, a0 as BeamGroup, a1 as NotationType, a2 as HarmonyWithContext, ac as HarmonyEntry, a3 as LyricWithContext, a4 as AssembledLyrics, a6 as RepeatInfo, a5 as BarlineWithContext, a7 as EndingInfo, a8 as KeyChangeInfo, a9 as TimeChangeInfo, aa as ClefChangeInfo, ab as StructuralChanges } from '../types-CSI8kV28.js';
2
2
 
3
3
  /**
4
4
  * Filter options for voice/staff selection
@@ -1,4 +1,4 @@
1
- import { S as Score, M as Measure, n as TimeSignature, e as Part, N as NoteEntry, K as KeySignature, P as Pitch, C as Clef, ad as ArticulationType, m as DynamicsValue, ae as OrnamentType, h as NoteType } from './types-D3LhKCDK.js';
1
+ import { S as Score, M as Measure, n as TimeSignature, e as Part, N as NoteEntry, K as KeySignature, P as Pitch, C as Clef, ad as ArticulationType, m as DynamicsValue, ae as OrnamentType, h as NoteType } from './types-CSI8kV28.js';
2
2
 
3
3
  type ValidationErrorCode = 'MISSING_DIVISIONS' | 'INVALID_DIVISIONS' | 'MEASURE_DURATION_MISMATCH' | 'MEASURE_DURATION_OVERFLOW' | 'MEASURE_DURATION_UNDERFLOW' | 'VOICE_INCOMPLETE' | 'VOICE_GAP' | 'NEGATIVE_POSITION' | 'BACKUP_EXCEEDS_POSITION' | 'TIE_START_WITHOUT_STOP' | 'TIE_STOP_WITHOUT_START' | 'TIE_PITCH_MISMATCH' | 'BEAM_BEGIN_WITHOUT_END' | 'BEAM_END_WITHOUT_BEGIN' | 'SLUR_START_WITHOUT_STOP' | 'SLUR_STOP_WITHOUT_START' | 'TUPLET_START_WITHOUT_STOP' | 'TUPLET_STOP_WITHOUT_START' | 'PART_ID_NOT_IN_PART_LIST' | 'PART_LIST_ID_NOT_IN_PARTS' | 'PART_MEASURE_COUNT_MISMATCH' | 'PART_MEASURE_NUMBER_MISMATCH' | 'PART_GROUP_START_WITHOUT_STOP' | 'PART_GROUP_STOP_WITHOUT_START' | 'DUPLICATE_PART_ID' | 'INVALID_VOICE_NUMBER' | 'INVALID_STAFF_NUMBER' | 'STAFF_EXCEEDS_STAVES' | 'MISSING_STAVES_DECLARATION' | 'STAVES_DECLARATION_MISMATCH' | 'MISSING_CLEF_FOR_STAFF' | 'CLEF_STAFF_EXCEEDS_STAVES' | 'INVALID_DURATION' | 'EMPTY_MEASURE';
4
4
  type ValidationLevel = 'error' | 'warning' | 'info';
@@ -1,4 +1,4 @@
1
- import { S as Score, M as Measure, n as TimeSignature, e as Part, N as NoteEntry, K as KeySignature, P as Pitch, C as Clef, ad as ArticulationType, m as DynamicsValue, ae as OrnamentType, h as NoteType } from './types-D3LhKCDK.mjs';
1
+ import { S as Score, M as Measure, n as TimeSignature, e as Part, N as NoteEntry, K as KeySignature, P as Pitch, C as Clef, ad as ArticulationType, m as DynamicsValue, ae as OrnamentType, h as NoteType } from './types-CSI8kV28.mjs';
2
2
 
3
3
  type ValidationErrorCode = 'MISSING_DIVISIONS' | 'INVALID_DIVISIONS' | 'MEASURE_DURATION_MISMATCH' | 'MEASURE_DURATION_OVERFLOW' | 'MEASURE_DURATION_UNDERFLOW' | 'VOICE_INCOMPLETE' | 'VOICE_GAP' | 'NEGATIVE_POSITION' | 'BACKUP_EXCEEDS_POSITION' | 'TIE_START_WITHOUT_STOP' | 'TIE_STOP_WITHOUT_START' | 'TIE_PITCH_MISMATCH' | 'BEAM_BEGIN_WITHOUT_END' | 'BEAM_END_WITHOUT_BEGIN' | 'SLUR_START_WITHOUT_STOP' | 'SLUR_STOP_WITHOUT_START' | 'TUPLET_START_WITHOUT_STOP' | 'TUPLET_STOP_WITHOUT_START' | 'PART_ID_NOT_IN_PART_LIST' | 'PART_LIST_ID_NOT_IN_PARTS' | 'PART_MEASURE_COUNT_MISMATCH' | 'PART_MEASURE_NUMBER_MISMATCH' | 'PART_GROUP_START_WITHOUT_STOP' | 'PART_GROUP_STOP_WITHOUT_START' | 'DUPLICATE_PART_ID' | 'INVALID_VOICE_NUMBER' | 'INVALID_STAFF_NUMBER' | 'STAFF_EXCEEDS_STAVES' | 'MISSING_STAVES_DECLARATION' | 'STAVES_DECLARATION_MISMATCH' | 'MISSING_CLEF_FOR_STAFF' | 'CLEF_STAFF_EXCEEDS_STAVES' | 'INVALID_DURATION' | 'EMPTY_MEASURE';
4
4
  type ValidationLevel = 'error' | 'warning' | 'info';
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
- import { S as Score, P as Pitch, M as Measure } from './types-D3LhKCDK.mjs';
2
- export { A as Accidental, i as AccidentalInfo, O as AdjacentNotes, a4 as AssembledLyrics, B as BackupEntry, p as Barline, a5 as BarlineWithContext, a0 as BeamGroup, j as BeamInfo, s as Chord, C as Clef, aa as ClefChangeInfo, w as Credit, v as Defaults, D as DirectionEntry, Q as DirectionKind, l as DirectionType, z as DirectionWithContext, R as DynamicWithContext, m as DynamicsValue, a7 as EndingInfo, E as EntryWithContext, F as ForwardEntry, a2 as HarmonyWithContext, a8 as KeyChangeInfo, K as KeySignature, L as Lyric, a3 as LyricWithContext, f as MeasureAttributes, g as MeasureEntry, k as Notation, a1 as NotationType, N as NoteEntry, t as NoteIteratorItem, h as NoteType, y as NoteWithContext, r as NoteWithPosition, Y as OctaveShiftWithContext, e as Part, c as PartGroup, b as PartInfo, d as PartListEntry, W as PedalWithContext, H as PositionQueryOptions, u as Print, a6 as RepeatInfo, a as ScoreMetadata, _ as SlurSpan, q as StaffGroup, G as StaffRange, ab as StructuralChanges, U as TempoWithContext, T as TieInfo, Z as TiedNoteGroup, a9 as TimeChangeInfo, n as TimeSignature, o as Transpose, $ as TupletGroup, I as VerticalSlice, V as VoiceGroup, J as VoiceLine, x as VoiceToStaffMap, X as WedgeWithContext } from './types-D3LhKCDK.mjs';
3
- import { V as ValidateOptions, a as ValidationResult } from './index-Hm73jOKD.mjs';
4
- export { L as LocalValidateOptions, M as MeasureValidationContext, G as ValidationError, I as ValidationErrorCode, C as ValidationException, J as ValidationLevel, H as ValidationLocation, g as addChordNote, b as addNote, F as assertMeasureValid, k as assertValid, c as changeKey, e as changeTime, f as deleteMeasure, d as deleteNote, B as formatLocation, E as getMeasureContext, i as insertMeasure, j as isValid, h as modifyNoteDuration, m as modifyNotePitch, t as transpose, v as validate, o as validateBackupForward, q as validateBeams, l as validateDivisions, n as validateMeasureDuration, D as validateMeasureLocal, u as validatePartReferences, w as validatePartStructure, r as validateSlurs, A as validateSlursAcrossMeasures, x as validateStaffStructure, p as validateTies, z as validateTiesAcrossMeasures, s as validateTuplets, y as validateVoiceStaff } from './index-Hm73jOKD.mjs';
1
+ import { S as Score, P as Pitch, M as Measure } from './types-CSI8kV28.mjs';
2
+ export { A as Accidental, i as AccidentalInfo, O as AdjacentNotes, a4 as AssembledLyrics, B as BackupEntry, p as Barline, a5 as BarlineWithContext, a0 as BeamGroup, j as BeamInfo, s as Chord, C as Clef, aa as ClefChangeInfo, w as Credit, v as Defaults, D as DirectionEntry, Q as DirectionKind, l as DirectionType, z as DirectionWithContext, R as DynamicWithContext, m as DynamicsValue, a7 as EndingInfo, E as EntryWithContext, F as ForwardEntry, a2 as HarmonyWithContext, a8 as KeyChangeInfo, K as KeySignature, L as Lyric, a3 as LyricWithContext, f as MeasureAttributes, g as MeasureEntry, k as Notation, a1 as NotationType, N as NoteEntry, t as NoteIteratorItem, h as NoteType, y as NoteWithContext, r as NoteWithPosition, Y as OctaveShiftWithContext, e as Part, c as PartGroup, b as PartInfo, d as PartListEntry, W as PedalWithContext, H as PositionQueryOptions, u as Print, a6 as RepeatInfo, a as ScoreMetadata, _ as SlurSpan, q as StaffGroup, G as StaffRange, ab as StructuralChanges, U as TempoWithContext, T as TieInfo, Z as TiedNoteGroup, a9 as TimeChangeInfo, n as TimeSignature, o as Transpose, $ as TupletGroup, I as VerticalSlice, V as VoiceGroup, J as VoiceLine, x as VoiceToStaffMap, X as WedgeWithContext } from './types-CSI8kV28.mjs';
3
+ import { V as ValidateOptions, a as ValidationResult } from './index-D4hW6ANJ.mjs';
4
+ export { L as LocalValidateOptions, M as MeasureValidationContext, G as ValidationError, I as ValidationErrorCode, C as ValidationException, J as ValidationLevel, H as ValidationLocation, g as addChordNote, b as addNote, F as assertMeasureValid, k as assertValid, c as changeKey, e as changeTime, f as deleteMeasure, d as deleteNote, B as formatLocation, E as getMeasureContext, i as insertMeasure, j as isValid, h as modifyNoteDuration, m as modifyNotePitch, t as transpose, v as validate, o as validateBackupForward, q as validateBeams, l as validateDivisions, n as validateMeasureDuration, D as validateMeasureLocal, u as validatePartReferences, w as validatePartStructure, r as validateSlurs, A as validateSlursAcrossMeasures, x as validateStaffStructure, p as validateTies, z as validateTiesAcrossMeasures, s as validateTuplets, y as validateVoiceStaff } from './index-D4hW6ANJ.mjs';
5
5
  export { NormalizedPositionOptions, VoiceFilter, buildVoiceToStaffMap, buildVoiceToStaffMapForPart, findBarlines, findDirectionsByType, findNotesWithNotation, getAbsolutePosition, getAdjacentNotes, getAllNotes, getBeamGroups, getChordProgression, getChords, getClefChanges, getClefForStaff, getDirections, getDirectionsAtPosition, getDynamics, getEffectiveStaff, getEndings, getEntriesAtPosition, getEntriesForStaff, getEntriesInRange, getHarmonies, getHarmonyAtPosition, getKeyChanges, getLyricText, getLyrics, getNextNote, getNormalizedDuration, getNormalizedPosition, getNotesAtPosition, getNotesForStaff, getNotesForVoice, getNotesInRange, getOctaveShifts, getPartByIndex, getPartCount, getPartIds, getPedalMarkings, getPrevNote, getRepeatStructure, getSlurSpans, getStaffRange, getStaves, getStructuralChanges, getTempoMarkings, getTiedNoteGroups, getTimeChanges, getTupletGroups, getVerseCount, getVerticalSlice, getVoiceLine, getVoiceLineInRange, getVoices, getVoicesForStaff, getWedges, groupByStaff, groupByVoice, hasNotes, inferStaff, isRestMeasure, iterateEntries, iterateNotes, withAbsolutePositions } from './accessors/index.mjs';
6
6
  export { FindNotesFilter, PitchRange, RoundtripMetrics, countNotes, findNotes, getAttributesAtMeasure, getDivisions, getDuration, getMeasure, getMeasureByIndex, getMeasureCount, getPartById, getPartIndex, getStaveCount, hasMultipleStaves, measureRoundtrip, scoresEqual } from './query/index.mjs';
7
7
 
@@ -104,4 +104,17 @@ declare function pitchToSemitone(pitch: Pitch): number;
104
104
  /** Get position at end of measure */
105
105
  declare function getMeasureEndPosition(measure: Measure): number;
106
106
 
107
- export { Measure, type MidiExportOptions, Pitch, STEPS, STEP_SEMITONES, Score, type SerializeOptions, ValidateOptions, ValidationResult, decodeBuffer, exportMidi, getMeasureEndPosition, isCompressed, parse, parseAuto, parseCompressed, parseFile, pitchToSemitone, serialize, serializeCompressed, serializeToFile };
107
+ /**
108
+ * Generates a unique ID for elements in the Score structure.
109
+ *
110
+ * The ID format is "i" + nanoid(10), where:
111
+ * - "i" prefix ensures XML ID compatibility (XML IDs must start with a letter or underscore)
112
+ * - nanoid(10) generates a 10-character URL-safe unique identifier
113
+ *
114
+ * Example: "iV1StGXR8_"
115
+ *
116
+ * @returns A unique 11-character ID string
117
+ */
118
+ declare function generateId(): string;
119
+
120
+ export { Measure, type MidiExportOptions, Pitch, STEPS, STEP_SEMITONES, Score, type SerializeOptions, ValidateOptions, ValidationResult, decodeBuffer, exportMidi, generateId, getMeasureEndPosition, isCompressed, parse, parseAuto, parseCompressed, parseFile, pitchToSemitone, serialize, serializeCompressed, serializeToFile };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { S as Score, P as Pitch, M as Measure } from './types-D3LhKCDK.js';
2
- export { A as Accidental, i as AccidentalInfo, O as AdjacentNotes, a4 as AssembledLyrics, B as BackupEntry, p as Barline, a5 as BarlineWithContext, a0 as BeamGroup, j as BeamInfo, s as Chord, C as Clef, aa as ClefChangeInfo, w as Credit, v as Defaults, D as DirectionEntry, Q as DirectionKind, l as DirectionType, z as DirectionWithContext, R as DynamicWithContext, m as DynamicsValue, a7 as EndingInfo, E as EntryWithContext, F as ForwardEntry, a2 as HarmonyWithContext, a8 as KeyChangeInfo, K as KeySignature, L as Lyric, a3 as LyricWithContext, f as MeasureAttributes, g as MeasureEntry, k as Notation, a1 as NotationType, N as NoteEntry, t as NoteIteratorItem, h as NoteType, y as NoteWithContext, r as NoteWithPosition, Y as OctaveShiftWithContext, e as Part, c as PartGroup, b as PartInfo, d as PartListEntry, W as PedalWithContext, H as PositionQueryOptions, u as Print, a6 as RepeatInfo, a as ScoreMetadata, _ as SlurSpan, q as StaffGroup, G as StaffRange, ab as StructuralChanges, U as TempoWithContext, T as TieInfo, Z as TiedNoteGroup, a9 as TimeChangeInfo, n as TimeSignature, o as Transpose, $ as TupletGroup, I as VerticalSlice, V as VoiceGroup, J as VoiceLine, x as VoiceToStaffMap, X as WedgeWithContext } from './types-D3LhKCDK.js';
3
- import { V as ValidateOptions, a as ValidationResult } from './index-CJUkJI2P.js';
4
- export { L as LocalValidateOptions, M as MeasureValidationContext, G as ValidationError, I as ValidationErrorCode, C as ValidationException, J as ValidationLevel, H as ValidationLocation, g as addChordNote, b as addNote, F as assertMeasureValid, k as assertValid, c as changeKey, e as changeTime, f as deleteMeasure, d as deleteNote, B as formatLocation, E as getMeasureContext, i as insertMeasure, j as isValid, h as modifyNoteDuration, m as modifyNotePitch, t as transpose, v as validate, o as validateBackupForward, q as validateBeams, l as validateDivisions, n as validateMeasureDuration, D as validateMeasureLocal, u as validatePartReferences, w as validatePartStructure, r as validateSlurs, A as validateSlursAcrossMeasures, x as validateStaffStructure, p as validateTies, z as validateTiesAcrossMeasures, s as validateTuplets, y as validateVoiceStaff } from './index-CJUkJI2P.js';
1
+ import { S as Score, P as Pitch, M as Measure } from './types-CSI8kV28.js';
2
+ export { A as Accidental, i as AccidentalInfo, O as AdjacentNotes, a4 as AssembledLyrics, B as BackupEntry, p as Barline, a5 as BarlineWithContext, a0 as BeamGroup, j as BeamInfo, s as Chord, C as Clef, aa as ClefChangeInfo, w as Credit, v as Defaults, D as DirectionEntry, Q as DirectionKind, l as DirectionType, z as DirectionWithContext, R as DynamicWithContext, m as DynamicsValue, a7 as EndingInfo, E as EntryWithContext, F as ForwardEntry, a2 as HarmonyWithContext, a8 as KeyChangeInfo, K as KeySignature, L as Lyric, a3 as LyricWithContext, f as MeasureAttributes, g as MeasureEntry, k as Notation, a1 as NotationType, N as NoteEntry, t as NoteIteratorItem, h as NoteType, y as NoteWithContext, r as NoteWithPosition, Y as OctaveShiftWithContext, e as Part, c as PartGroup, b as PartInfo, d as PartListEntry, W as PedalWithContext, H as PositionQueryOptions, u as Print, a6 as RepeatInfo, a as ScoreMetadata, _ as SlurSpan, q as StaffGroup, G as StaffRange, ab as StructuralChanges, U as TempoWithContext, T as TieInfo, Z as TiedNoteGroup, a9 as TimeChangeInfo, n as TimeSignature, o as Transpose, $ as TupletGroup, I as VerticalSlice, V as VoiceGroup, J as VoiceLine, x as VoiceToStaffMap, X as WedgeWithContext } from './types-CSI8kV28.js';
3
+ import { V as ValidateOptions, a as ValidationResult } from './index-CVGy8DJi.js';
4
+ export { L as LocalValidateOptions, M as MeasureValidationContext, G as ValidationError, I as ValidationErrorCode, C as ValidationException, J as ValidationLevel, H as ValidationLocation, g as addChordNote, b as addNote, F as assertMeasureValid, k as assertValid, c as changeKey, e as changeTime, f as deleteMeasure, d as deleteNote, B as formatLocation, E as getMeasureContext, i as insertMeasure, j as isValid, h as modifyNoteDuration, m as modifyNotePitch, t as transpose, v as validate, o as validateBackupForward, q as validateBeams, l as validateDivisions, n as validateMeasureDuration, D as validateMeasureLocal, u as validatePartReferences, w as validatePartStructure, r as validateSlurs, A as validateSlursAcrossMeasures, x as validateStaffStructure, p as validateTies, z as validateTiesAcrossMeasures, s as validateTuplets, y as validateVoiceStaff } from './index-CVGy8DJi.js';
5
5
  export { NormalizedPositionOptions, VoiceFilter, buildVoiceToStaffMap, buildVoiceToStaffMapForPart, findBarlines, findDirectionsByType, findNotesWithNotation, getAbsolutePosition, getAdjacentNotes, getAllNotes, getBeamGroups, getChordProgression, getChords, getClefChanges, getClefForStaff, getDirections, getDirectionsAtPosition, getDynamics, getEffectiveStaff, getEndings, getEntriesAtPosition, getEntriesForStaff, getEntriesInRange, getHarmonies, getHarmonyAtPosition, getKeyChanges, getLyricText, getLyrics, getNextNote, getNormalizedDuration, getNormalizedPosition, getNotesAtPosition, getNotesForStaff, getNotesForVoice, getNotesInRange, getOctaveShifts, getPartByIndex, getPartCount, getPartIds, getPedalMarkings, getPrevNote, getRepeatStructure, getSlurSpans, getStaffRange, getStaves, getStructuralChanges, getTempoMarkings, getTiedNoteGroups, getTimeChanges, getTupletGroups, getVerseCount, getVerticalSlice, getVoiceLine, getVoiceLineInRange, getVoices, getVoicesForStaff, getWedges, groupByStaff, groupByVoice, hasNotes, inferStaff, isRestMeasure, iterateEntries, iterateNotes, withAbsolutePositions } from './accessors/index.js';
6
6
  export { FindNotesFilter, PitchRange, RoundtripMetrics, countNotes, findNotes, getAttributesAtMeasure, getDivisions, getDuration, getMeasure, getMeasureByIndex, getMeasureCount, getPartById, getPartIndex, getStaveCount, hasMultipleStaves, measureRoundtrip, scoresEqual } from './query/index.js';
7
7
 
@@ -104,4 +104,17 @@ declare function pitchToSemitone(pitch: Pitch): number;
104
104
  /** Get position at end of measure */
105
105
  declare function getMeasureEndPosition(measure: Measure): number;
106
106
 
107
- export { Measure, type MidiExportOptions, Pitch, STEPS, STEP_SEMITONES, Score, type SerializeOptions, ValidateOptions, ValidationResult, decodeBuffer, exportMidi, getMeasureEndPosition, isCompressed, parse, parseAuto, parseCompressed, parseFile, pitchToSemitone, serialize, serializeCompressed, serializeToFile };
107
+ /**
108
+ * Generates a unique ID for elements in the Score structure.
109
+ *
110
+ * The ID format is "i" + nanoid(10), where:
111
+ * - "i" prefix ensures XML ID compatibility (XML IDs must start with a letter or underscore)
112
+ * - nanoid(10) generates a 10-character URL-safe unique identifier
113
+ *
114
+ * Example: "iV1StGXR8_"
115
+ *
116
+ * @returns A unique 11-character ID string
117
+ */
118
+ declare function generateId(): string;
119
+
120
+ export { Measure, type MidiExportOptions, Pitch, STEPS, STEP_SEMITONES, Score, type SerializeOptions, ValidateOptions, ValidationResult, decodeBuffer, exportMidi, generateId, getMeasureEndPosition, isCompressed, parse, parseAuto, parseCompressed, parseFile, pitchToSemitone, serialize, serializeCompressed, serializeToFile };
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ __export(src_exports, {
41
41
  findNotes: () => findNotes,
42
42
  findNotesWithNotation: () => findNotesWithNotation,
43
43
  formatLocation: () => formatLocation,
44
+ generateId: () => generateId,
44
45
  getAbsolutePosition: () => getAbsolutePosition,
45
46
  getAdjacentNotes: () => getAdjacentNotes,
46
47
  getAllNotes: () => getAllNotes,
@@ -147,6 +148,14 @@ module.exports = __toCommonJS(src_exports);
147
148
 
148
149
  // src/importers/musicxml.ts
149
150
  var import_fast_xml_parser = require("fast-xml-parser");
151
+
152
+ // src/id.ts
153
+ var import_nanoid = require("nanoid");
154
+ function generateId() {
155
+ return "i" + (0, import_nanoid.nanoid)(10);
156
+ }
157
+
158
+ // src/importers/musicxml.ts
150
159
  var xmlParser = new import_fast_xml_parser.XMLParser({
151
160
  ignoreAttributes: false,
152
161
  attributeNamePrefix: "@_",
@@ -233,6 +242,7 @@ function parseScorePartwise(elements) {
233
242
  const defaults = parseDefaults(elements);
234
243
  const credits = parseCredits(elements);
235
244
  return {
245
+ _id: generateId(),
236
246
  metadata,
237
247
  partList,
238
248
  parts,
@@ -434,7 +444,7 @@ function parseSystemLayout(elements) {
434
444
  }
435
445
  function parseCredits(elements) {
436
446
  const credits = collectElements(elements, "credit", (content, attrs) => {
437
- const credit = {};
447
+ const credit = { _id: generateId() };
438
448
  if (attrs["page"]) credit.page = parseInt(attrs["page"], 10);
439
449
  const types = collectElements(content, "credit-type", (c) => extractText(c));
440
450
  const words = collectElements(content, "credit-words", (c, a) => {
@@ -476,6 +486,7 @@ function parsePartList(elements) {
476
486
  const attrs = getAttributes(el);
477
487
  const content = el["score-part"];
478
488
  const partInfo = {
489
+ _id: generateId(),
479
490
  type: "score-part",
480
491
  id: attrs["id"] || ""
481
492
  };
@@ -568,6 +579,7 @@ function parsePartList(elements) {
568
579
  const attrs = getAttributes(el);
569
580
  const content = el["part-group"];
570
581
  const group = {
582
+ _id: generateId(),
571
583
  type: "part-group",
572
584
  groupType: attrs["type"] === "stop" ? "stop" : "start"
573
585
  };
@@ -603,6 +615,7 @@ function parseParts(elements) {
603
615
  const attrs = getAttributes(el);
604
616
  const content = el["part"];
605
617
  const part = {
618
+ _id: generateId(),
606
619
  id: attrs["id"] || "",
607
620
  measures: []
608
621
  };
@@ -620,6 +633,7 @@ function parseParts(elements) {
620
633
  }
621
634
  function parseMeasure(elements, attrs) {
622
635
  const measure = {
636
+ _id: generateId(),
623
637
  number: attrs["number"] || "0",
624
638
  // Keep as string per MusicXML spec (token type)
625
639
  entries: []
@@ -636,6 +650,7 @@ function parseMeasure(elements, attrs) {
636
650
  isFirstAttributes = false;
637
651
  } else {
638
652
  const attrEntry = {
653
+ _id: generateId(),
639
654
  type: "attributes",
640
655
  attributes: parsedAttrs
641
656
  };
@@ -861,6 +876,7 @@ function parseTranspose(elements) {
861
876
  }
862
877
  function parseNote(elements, attrs) {
863
878
  const note = {
879
+ _id: generateId(),
864
880
  type: "note",
865
881
  duration: getElementTextAsInt(elements, "duration", 0),
866
882
  voice: getElementTextAsInt(elements, "voice", 1)
@@ -1515,12 +1531,14 @@ function parseLyric(elements, attrs) {
1515
1531
  }
1516
1532
  function parseBackup(elements) {
1517
1533
  return {
1534
+ _id: generateId(),
1518
1535
  type: "backup",
1519
1536
  duration: parseInt(getElementText(elements, "duration") || "0", 10)
1520
1537
  };
1521
1538
  }
1522
1539
  function parseForward(elements) {
1523
1540
  const forward = {
1541
+ _id: generateId(),
1524
1542
  type: "forward",
1525
1543
  duration: parseInt(getElementText(elements, "duration") || "0", 10)
1526
1544
  };
@@ -1532,6 +1550,7 @@ function parseForward(elements) {
1532
1550
  }
1533
1551
  function parseDirection(elements, attrs) {
1534
1552
  const direction = {
1553
+ _id: generateId(),
1535
1554
  type: "direction",
1536
1555
  directionTypes: []
1537
1556
  };
@@ -1907,7 +1926,7 @@ function parseDirectionType(elements) {
1907
1926
  }
1908
1927
  function parseBarline(elements, attrs) {
1909
1928
  const location = attrs["location"] || "right";
1910
- const barline = { location };
1929
+ const barline = { _id: generateId(), location };
1911
1930
  const barStyle = getElementText(elements, "bar-style");
1912
1931
  if (barStyle && isValidBarStyle(barStyle)) {
1913
1932
  barline.barStyle = barStyle;
@@ -2123,6 +2142,7 @@ function parseMeasureStyle(elements, attrs) {
2123
2142
  }
2124
2143
  function parseHarmony(elements, attrs) {
2125
2144
  const harmony = {
2145
+ _id: generateId(),
2126
2146
  type: "harmony",
2127
2147
  root: { rootStep: "C" },
2128
2148
  kind: "major"
@@ -2246,6 +2266,7 @@ function parseHarmony(elements, attrs) {
2246
2266
  }
2247
2267
  function parseFiguredBass(elements, attrs) {
2248
2268
  const fb = {
2269
+ _id: generateId(),
2249
2270
  type: "figured-bass",
2250
2271
  figures: []
2251
2272
  };
@@ -2292,6 +2313,7 @@ function parseFiguredBass(elements, attrs) {
2292
2313
  }
2293
2314
  function parseSound(elements, attrs) {
2294
2315
  const sound = {
2316
+ _id: generateId(),
2295
2317
  type: "sound"
2296
2318
  };
2297
2319
  if (attrs["tempo"]) sound.tempo = parseFloat(attrs["tempo"]);
@@ -7140,6 +7162,7 @@ function hasNotesInRange(voiceEntries, startPos, endPos) {
7140
7162
  }
7141
7163
  function createRest(duration, voice, staff) {
7142
7164
  return {
7165
+ _id: generateId(),
7143
7166
  type: "note",
7144
7167
  rest: { displayStep: void 0, displayOctave: void 0 },
7145
7168
  duration,
@@ -7201,10 +7224,11 @@ function rebuildMeasureWithVoice(measure, voice, newEntries, measureDuration, st
7201
7224
  for (const { position: targetPos, entry } of allEntries) {
7202
7225
  const diff = targetPos - currentPosition;
7203
7226
  if (diff < 0) {
7204
- result.push({ type: "backup", duration: -diff });
7227
+ result.push({ _id: generateId(), type: "backup", duration: -diff });
7205
7228
  currentPosition = targetPos;
7206
7229
  } else if (diff > 0) {
7207
7230
  result.push({
7231
+ _id: generateId(),
7208
7232
  type: "forward",
7209
7233
  duration: diff,
7210
7234
  voice: entry.type === "note" ? entry.voice : 1,
@@ -7259,6 +7283,7 @@ function insertNote(score, options) {
7259
7283
  )]);
7260
7284
  }
7261
7285
  const newNote = {
7286
+ _id: generateId(),
7262
7287
  type: "note",
7263
7288
  pitch: options.pitch,
7264
7289
  duration: options.duration,
@@ -7365,6 +7390,7 @@ function addChord(score, options) {
7365
7390
  return failure([operationError("NOTE_NOT_FOUND", `Note index ${options.noteIndex} not found`, { partIndex: options.partIndex, measureIndex: options.measureIndex })]);
7366
7391
  }
7367
7392
  const chordNote = {
7393
+ _id: generateId(),
7368
7394
  type: "note",
7369
7395
  pitch: options.pitch,
7370
7396
  duration: targetEntry.duration,
@@ -7588,7 +7614,7 @@ function insertMeasure(score, options) {
7588
7614
  if (insertIndex === -1) continue;
7589
7615
  const numericPart = parseInt(targetMeasure, 10);
7590
7616
  const newMeasureNumber = String(isNaN(numericPart) ? insertIndex + 2 : numericPart + 1);
7591
- const newMeasure = { number: newMeasureNumber, entries: [] };
7617
+ const newMeasure = { _id: generateId(), number: newMeasureNumber, entries: [] };
7592
7618
  if (options.copyAttributes && part.measures[insertIndex].attributes) {
7593
7619
  newMeasure.attributes = { ...part.measures[insertIndex].attributes };
7594
7620
  }
@@ -7707,6 +7733,7 @@ async function serializeToFile(score, filePath, options = {}) {
7707
7733
  findNotes,
7708
7734
  findNotesWithNotation,
7709
7735
  formatLocation,
7736
+ generateId,
7710
7737
  getAbsolutePosition,
7711
7738
  getAdjacentNotes,
7712
7739
  getAllNotes,
package/dist/index.mjs CHANGED
@@ -1,5 +1,13 @@
1
1
  // src/importers/musicxml.ts
2
2
  import { XMLParser } from "fast-xml-parser";
3
+
4
+ // src/id.ts
5
+ import { nanoid } from "nanoid";
6
+ function generateId() {
7
+ return "i" + nanoid(10);
8
+ }
9
+
10
+ // src/importers/musicxml.ts
3
11
  var xmlParser = new XMLParser({
4
12
  ignoreAttributes: false,
5
13
  attributeNamePrefix: "@_",
@@ -86,6 +94,7 @@ function parseScorePartwise(elements) {
86
94
  const defaults = parseDefaults(elements);
87
95
  const credits = parseCredits(elements);
88
96
  return {
97
+ _id: generateId(),
89
98
  metadata,
90
99
  partList,
91
100
  parts,
@@ -287,7 +296,7 @@ function parseSystemLayout(elements) {
287
296
  }
288
297
  function parseCredits(elements) {
289
298
  const credits = collectElements(elements, "credit", (content, attrs) => {
290
- const credit = {};
299
+ const credit = { _id: generateId() };
291
300
  if (attrs["page"]) credit.page = parseInt(attrs["page"], 10);
292
301
  const types = collectElements(content, "credit-type", (c) => extractText(c));
293
302
  const words = collectElements(content, "credit-words", (c, a) => {
@@ -329,6 +338,7 @@ function parsePartList(elements) {
329
338
  const attrs = getAttributes(el);
330
339
  const content = el["score-part"];
331
340
  const partInfo = {
341
+ _id: generateId(),
332
342
  type: "score-part",
333
343
  id: attrs["id"] || ""
334
344
  };
@@ -421,6 +431,7 @@ function parsePartList(elements) {
421
431
  const attrs = getAttributes(el);
422
432
  const content = el["part-group"];
423
433
  const group = {
434
+ _id: generateId(),
424
435
  type: "part-group",
425
436
  groupType: attrs["type"] === "stop" ? "stop" : "start"
426
437
  };
@@ -456,6 +467,7 @@ function parseParts(elements) {
456
467
  const attrs = getAttributes(el);
457
468
  const content = el["part"];
458
469
  const part = {
470
+ _id: generateId(),
459
471
  id: attrs["id"] || "",
460
472
  measures: []
461
473
  };
@@ -473,6 +485,7 @@ function parseParts(elements) {
473
485
  }
474
486
  function parseMeasure(elements, attrs) {
475
487
  const measure = {
488
+ _id: generateId(),
476
489
  number: attrs["number"] || "0",
477
490
  // Keep as string per MusicXML spec (token type)
478
491
  entries: []
@@ -489,6 +502,7 @@ function parseMeasure(elements, attrs) {
489
502
  isFirstAttributes = false;
490
503
  } else {
491
504
  const attrEntry = {
505
+ _id: generateId(),
492
506
  type: "attributes",
493
507
  attributes: parsedAttrs
494
508
  };
@@ -714,6 +728,7 @@ function parseTranspose(elements) {
714
728
  }
715
729
  function parseNote(elements, attrs) {
716
730
  const note = {
731
+ _id: generateId(),
717
732
  type: "note",
718
733
  duration: getElementTextAsInt(elements, "duration", 0),
719
734
  voice: getElementTextAsInt(elements, "voice", 1)
@@ -1368,12 +1383,14 @@ function parseLyric(elements, attrs) {
1368
1383
  }
1369
1384
  function parseBackup(elements) {
1370
1385
  return {
1386
+ _id: generateId(),
1371
1387
  type: "backup",
1372
1388
  duration: parseInt(getElementText(elements, "duration") || "0", 10)
1373
1389
  };
1374
1390
  }
1375
1391
  function parseForward(elements) {
1376
1392
  const forward = {
1393
+ _id: generateId(),
1377
1394
  type: "forward",
1378
1395
  duration: parseInt(getElementText(elements, "duration") || "0", 10)
1379
1396
  };
@@ -1385,6 +1402,7 @@ function parseForward(elements) {
1385
1402
  }
1386
1403
  function parseDirection(elements, attrs) {
1387
1404
  const direction = {
1405
+ _id: generateId(),
1388
1406
  type: "direction",
1389
1407
  directionTypes: []
1390
1408
  };
@@ -1760,7 +1778,7 @@ function parseDirectionType(elements) {
1760
1778
  }
1761
1779
  function parseBarline(elements, attrs) {
1762
1780
  const location = attrs["location"] || "right";
1763
- const barline = { location };
1781
+ const barline = { _id: generateId(), location };
1764
1782
  const barStyle = getElementText(elements, "bar-style");
1765
1783
  if (barStyle && isValidBarStyle(barStyle)) {
1766
1784
  barline.barStyle = barStyle;
@@ -1976,6 +1994,7 @@ function parseMeasureStyle(elements, attrs) {
1976
1994
  }
1977
1995
  function parseHarmony(elements, attrs) {
1978
1996
  const harmony = {
1997
+ _id: generateId(),
1979
1998
  type: "harmony",
1980
1999
  root: { rootStep: "C" },
1981
2000
  kind: "major"
@@ -2099,6 +2118,7 @@ function parseHarmony(elements, attrs) {
2099
2118
  }
2100
2119
  function parseFiguredBass(elements, attrs) {
2101
2120
  const fb = {
2121
+ _id: generateId(),
2102
2122
  type: "figured-bass",
2103
2123
  figures: []
2104
2124
  };
@@ -2145,6 +2165,7 @@ function parseFiguredBass(elements, attrs) {
2145
2165
  }
2146
2166
  function parseSound(elements, attrs) {
2147
2167
  const sound = {
2168
+ _id: generateId(),
2148
2169
  type: "sound"
2149
2170
  };
2150
2171
  if (attrs["tempo"]) sound.tempo = parseFloat(attrs["tempo"]);
@@ -6993,6 +7014,7 @@ function hasNotesInRange(voiceEntries, startPos, endPos) {
6993
7014
  }
6994
7015
  function createRest(duration, voice, staff) {
6995
7016
  return {
7017
+ _id: generateId(),
6996
7018
  type: "note",
6997
7019
  rest: { displayStep: void 0, displayOctave: void 0 },
6998
7020
  duration,
@@ -7054,10 +7076,11 @@ function rebuildMeasureWithVoice(measure, voice, newEntries, measureDuration, st
7054
7076
  for (const { position: targetPos, entry } of allEntries) {
7055
7077
  const diff = targetPos - currentPosition;
7056
7078
  if (diff < 0) {
7057
- result.push({ type: "backup", duration: -diff });
7079
+ result.push({ _id: generateId(), type: "backup", duration: -diff });
7058
7080
  currentPosition = targetPos;
7059
7081
  } else if (diff > 0) {
7060
7082
  result.push({
7083
+ _id: generateId(),
7061
7084
  type: "forward",
7062
7085
  duration: diff,
7063
7086
  voice: entry.type === "note" ? entry.voice : 1,
@@ -7112,6 +7135,7 @@ function insertNote(score, options) {
7112
7135
  )]);
7113
7136
  }
7114
7137
  const newNote = {
7138
+ _id: generateId(),
7115
7139
  type: "note",
7116
7140
  pitch: options.pitch,
7117
7141
  duration: options.duration,
@@ -7218,6 +7242,7 @@ function addChord(score, options) {
7218
7242
  return failure([operationError("NOTE_NOT_FOUND", `Note index ${options.noteIndex} not found`, { partIndex: options.partIndex, measureIndex: options.measureIndex })]);
7219
7243
  }
7220
7244
  const chordNote = {
7245
+ _id: generateId(),
7221
7246
  type: "note",
7222
7247
  pitch: options.pitch,
7223
7248
  duration: targetEntry.duration,
@@ -7441,7 +7466,7 @@ function insertMeasure(score, options) {
7441
7466
  if (insertIndex === -1) continue;
7442
7467
  const numericPart = parseInt(targetMeasure, 10);
7443
7468
  const newMeasureNumber = String(isNaN(numericPart) ? insertIndex + 2 : numericPart + 1);
7444
- const newMeasure = { number: newMeasureNumber, entries: [] };
7469
+ const newMeasure = { _id: generateId(), number: newMeasureNumber, entries: [] };
7445
7470
  if (options.copyAttributes && part.measures[insertIndex].attributes) {
7446
7471
  newMeasure.attributes = { ...part.measures[insertIndex].attributes };
7447
7472
  }
@@ -7559,6 +7584,7 @@ export {
7559
7584
  findNotes,
7560
7585
  findNotesWithNotation,
7561
7586
  formatLocation,
7587
+ generateId,
7562
7588
  getAbsolutePosition,
7563
7589
  getAdjacentNotes,
7564
7590
  getAllNotes,
@@ -1,2 +1,2 @@
1
- import '../types-D3LhKCDK.mjs';
2
- export { ag as AddArticulationOptions, aA as AddBeamOptions, bW as AddBowingOptions, ca as AddBreathMarkOptions, cf as AddCaesuraOptions, br as AddCodaOptions, ak as AddDynamicsOptions, bj as AddEndingOptions, a_ as AddFermataOptions, bR as AddFingeringOptions, by as AddGraceNoteOptions, bL as AddHarmonyOptions, bE as AddLyricOptions, bt as AddNavigationOptions, c3 as AddOctaveShiftOptions, b2 as AddOrnamentOptions, a2 as AddPartOptions, b6 as AddPedalOptions, bc as AddRehearsalMarkOptions, bf as AddRepeatBarlineOptions, bp as AddSegnoOptions, ac as AddSlurOptions, b_ as AddStringNumberOptions, aS as AddTempoOptions, ba as AddTextDirectionOptions, a8 as AddTieOptions, aW as AddWedgeOptions, aE as AutoBeamOptions, be as BarStyle, bV as BowingType, c9 as BreathMarkValue, ce as CaesuraValue, bn as ChangeBarlineOptions, bC as ConvertToGraceOptions, aN as CopyNotesMultiMeasureOptions, aH as CopyNotesOptions, aw as CreateTupletOptions, aL as CutNotesOptions, bK as HarmonyKind, ao as InsertClefChangeOptions, N as InsertNoteOptions, $ as LowerAccidentalOptions, aO as MultiMeasureSelection, aG as NoteSelection, c2 as OctaveShiftType, K as OperationErrorCode, O as OperationResult, aQ as PasteNotesMultiMeasureOptions, aJ as PasteNotesOptions, Z as RaiseAccidentalOptions, ai as RemoveArticulationOptions, aC as RemoveBeamOptions, bY as RemoveBowingOptions, cc as RemoveBreathMarkOptions, ch as RemoveCaesuraOptions, am as RemoveDynamicsOptions, bl as RemoveEndingOptions, b0 as RemoveFermataOptions, bT as RemoveFingeringOptions, bA as RemoveGraceNoteOptions, bN as RemoveHarmonyOptions, bG as RemoveLyricOptions, c7 as RemoveOctaveShiftOptions, b4 as RemoveOrnamentOptions, b8 as RemovePedalOptions, bh as RemoveRepeatBarlineOptions, ae as RemoveSlurOptions, c0 as RemoveStringNumberOptions, aU as RemoveTempoOptions, aa as RemoveTieOptions, ay as RemoveTupletOptions, aY as RemoveWedgeOptions, U as SetNotePitchBySemitoneOptions, X as ShiftNotePitchOptions, c5 as StopOctaveShiftOptions, bP as UpdateHarmonyOptions, bI as UpdateLyricOptions, G as ValidationError, ah as addArticulation, aB as addBeam, bX as addBowing, cb as addBreathMark, cg as addCaesura, R as addChord, g as addChordNote, as as addChordNoteChecked, bs as addCoda, bu as addDaCapo, bv as addDalSegno, al as addDynamics, bk as addEnding, a$ as addFermata, bw as addFine, bS as addFingering, bz as addGraceNote, bM as addHarmony, bF as addLyric, b as addNote, aq as addNoteChecked, c4 as addOctaveShift, b3 as addOrnament, a3 as addPart, b7 as addPedal, bd as addRehearsalMark, bg as addRepeatBarline, bq as addSegno, ad as addSlur, b$ as addStringNumber, aT as addTempo, bb as addTextDirection, a9 as addTie, bx as addToCoda, a1 as addVoice, aX as addWedge, aF as autoBeam, bo as changeBarline, c as changeKey, S as changeNoteDuration, e as changeTime, bD as convertToGrace, aI as copyNotes, aP as copyNotesMultiMeasure, ax as createTuplet, aM as cutNotes, f as deleteMeasure, d as deleteNote, ar as deleteNoteChecked, a5 as duplicatePart, ap as insertClefChange, i as insertMeasure, P as insertNote, a0 as lowerAccidental, h as modifyNoteDuration, au as modifyNoteDurationChecked, m as modifyNotePitch, at as modifyNotePitchChecked, a7 as moveNoteToStaff, aK as pasteNotes, aR as pasteNotesMultiMeasure, _ as raiseAccidental, aj as removeArticulation, aD as removeBeam, bZ as removeBowing, cd as removeBreathMark, ci as removeCaesura, an as removeDynamics, bm as removeEnding, b1 as removeFermata, bU as removeFingering, bB as removeGraceNote, bO as removeHarmony, bH as removeLyric, Q as removeNote, c8 as removeOctaveShift, b5 as removeOrnament, a4 as removePart, b9 as removePedal, bi as removeRepeatBarline, af as removeSlur, c1 as removeStringNumber, aV as removeTempo, ab as removeTie, az as removeTuplet, aZ as removeWedge, T as setNotePitch, W as setNotePitchBySemitone, a6 as setStaves, Y as shiftNotePitch, c6 as stopOctaveShift, t as transpose, av as transposeChecked, bQ as updateHarmony, bJ as updateLyric } from '../index-Hm73jOKD.mjs';
1
+ import '../types-CSI8kV28.mjs';
2
+ export { ag as AddArticulationOptions, aA as AddBeamOptions, bW as AddBowingOptions, ca as AddBreathMarkOptions, cf as AddCaesuraOptions, br as AddCodaOptions, ak as AddDynamicsOptions, bj as AddEndingOptions, a_ as AddFermataOptions, bR as AddFingeringOptions, by as AddGraceNoteOptions, bL as AddHarmonyOptions, bE as AddLyricOptions, bt as AddNavigationOptions, c3 as AddOctaveShiftOptions, b2 as AddOrnamentOptions, a2 as AddPartOptions, b6 as AddPedalOptions, bc as AddRehearsalMarkOptions, bf as AddRepeatBarlineOptions, bp as AddSegnoOptions, ac as AddSlurOptions, b_ as AddStringNumberOptions, aS as AddTempoOptions, ba as AddTextDirectionOptions, a8 as AddTieOptions, aW as AddWedgeOptions, aE as AutoBeamOptions, be as BarStyle, bV as BowingType, c9 as BreathMarkValue, ce as CaesuraValue, bn as ChangeBarlineOptions, bC as ConvertToGraceOptions, aN as CopyNotesMultiMeasureOptions, aH as CopyNotesOptions, aw as CreateTupletOptions, aL as CutNotesOptions, bK as HarmonyKind, ao as InsertClefChangeOptions, N as InsertNoteOptions, $ as LowerAccidentalOptions, aO as MultiMeasureSelection, aG as NoteSelection, c2 as OctaveShiftType, K as OperationErrorCode, O as OperationResult, aQ as PasteNotesMultiMeasureOptions, aJ as PasteNotesOptions, Z as RaiseAccidentalOptions, ai as RemoveArticulationOptions, aC as RemoveBeamOptions, bY as RemoveBowingOptions, cc as RemoveBreathMarkOptions, ch as RemoveCaesuraOptions, am as RemoveDynamicsOptions, bl as RemoveEndingOptions, b0 as RemoveFermataOptions, bT as RemoveFingeringOptions, bA as RemoveGraceNoteOptions, bN as RemoveHarmonyOptions, bG as RemoveLyricOptions, c7 as RemoveOctaveShiftOptions, b4 as RemoveOrnamentOptions, b8 as RemovePedalOptions, bh as RemoveRepeatBarlineOptions, ae as RemoveSlurOptions, c0 as RemoveStringNumberOptions, aU as RemoveTempoOptions, aa as RemoveTieOptions, ay as RemoveTupletOptions, aY as RemoveWedgeOptions, U as SetNotePitchBySemitoneOptions, X as ShiftNotePitchOptions, c5 as StopOctaveShiftOptions, bP as UpdateHarmonyOptions, bI as UpdateLyricOptions, G as ValidationError, ah as addArticulation, aB as addBeam, bX as addBowing, cb as addBreathMark, cg as addCaesura, R as addChord, g as addChordNote, as as addChordNoteChecked, bs as addCoda, bu as addDaCapo, bv as addDalSegno, al as addDynamics, bk as addEnding, a$ as addFermata, bw as addFine, bS as addFingering, bz as addGraceNote, bM as addHarmony, bF as addLyric, b as addNote, aq as addNoteChecked, c4 as addOctaveShift, b3 as addOrnament, a3 as addPart, b7 as addPedal, bd as addRehearsalMark, bg as addRepeatBarline, bq as addSegno, ad as addSlur, b$ as addStringNumber, aT as addTempo, bb as addTextDirection, a9 as addTie, bx as addToCoda, a1 as addVoice, aX as addWedge, aF as autoBeam, bo as changeBarline, c as changeKey, S as changeNoteDuration, e as changeTime, bD as convertToGrace, aI as copyNotes, aP as copyNotesMultiMeasure, ax as createTuplet, aM as cutNotes, f as deleteMeasure, d as deleteNote, ar as deleteNoteChecked, a5 as duplicatePart, ap as insertClefChange, i as insertMeasure, P as insertNote, a0 as lowerAccidental, h as modifyNoteDuration, au as modifyNoteDurationChecked, m as modifyNotePitch, at as modifyNotePitchChecked, a7 as moveNoteToStaff, aK as pasteNotes, aR as pasteNotesMultiMeasure, _ as raiseAccidental, aj as removeArticulation, aD as removeBeam, bZ as removeBowing, cd as removeBreathMark, ci as removeCaesura, an as removeDynamics, bm as removeEnding, b1 as removeFermata, bU as removeFingering, bB as removeGraceNote, bO as removeHarmony, bH as removeLyric, Q as removeNote, c8 as removeOctaveShift, b5 as removeOrnament, a4 as removePart, b9 as removePedal, bi as removeRepeatBarline, af as removeSlur, c1 as removeStringNumber, aV as removeTempo, ab as removeTie, az as removeTuplet, aZ as removeWedge, T as setNotePitch, W as setNotePitchBySemitone, a6 as setStaves, Y as shiftNotePitch, c6 as stopOctaveShift, t as transpose, av as transposeChecked, bQ as updateHarmony, bJ as updateLyric } from '../index-D4hW6ANJ.mjs';
@@ -1,2 +1,2 @@
1
- import '../types-D3LhKCDK.js';
2
- export { ag as AddArticulationOptions, aA as AddBeamOptions, bW as AddBowingOptions, ca as AddBreathMarkOptions, cf as AddCaesuraOptions, br as AddCodaOptions, ak as AddDynamicsOptions, bj as AddEndingOptions, a_ as AddFermataOptions, bR as AddFingeringOptions, by as AddGraceNoteOptions, bL as AddHarmonyOptions, bE as AddLyricOptions, bt as AddNavigationOptions, c3 as AddOctaveShiftOptions, b2 as AddOrnamentOptions, a2 as AddPartOptions, b6 as AddPedalOptions, bc as AddRehearsalMarkOptions, bf as AddRepeatBarlineOptions, bp as AddSegnoOptions, ac as AddSlurOptions, b_ as AddStringNumberOptions, aS as AddTempoOptions, ba as AddTextDirectionOptions, a8 as AddTieOptions, aW as AddWedgeOptions, aE as AutoBeamOptions, be as BarStyle, bV as BowingType, c9 as BreathMarkValue, ce as CaesuraValue, bn as ChangeBarlineOptions, bC as ConvertToGraceOptions, aN as CopyNotesMultiMeasureOptions, aH as CopyNotesOptions, aw as CreateTupletOptions, aL as CutNotesOptions, bK as HarmonyKind, ao as InsertClefChangeOptions, N as InsertNoteOptions, $ as LowerAccidentalOptions, aO as MultiMeasureSelection, aG as NoteSelection, c2 as OctaveShiftType, K as OperationErrorCode, O as OperationResult, aQ as PasteNotesMultiMeasureOptions, aJ as PasteNotesOptions, Z as RaiseAccidentalOptions, ai as RemoveArticulationOptions, aC as RemoveBeamOptions, bY as RemoveBowingOptions, cc as RemoveBreathMarkOptions, ch as RemoveCaesuraOptions, am as RemoveDynamicsOptions, bl as RemoveEndingOptions, b0 as RemoveFermataOptions, bT as RemoveFingeringOptions, bA as RemoveGraceNoteOptions, bN as RemoveHarmonyOptions, bG as RemoveLyricOptions, c7 as RemoveOctaveShiftOptions, b4 as RemoveOrnamentOptions, b8 as RemovePedalOptions, bh as RemoveRepeatBarlineOptions, ae as RemoveSlurOptions, c0 as RemoveStringNumberOptions, aU as RemoveTempoOptions, aa as RemoveTieOptions, ay as RemoveTupletOptions, aY as RemoveWedgeOptions, U as SetNotePitchBySemitoneOptions, X as ShiftNotePitchOptions, c5 as StopOctaveShiftOptions, bP as UpdateHarmonyOptions, bI as UpdateLyricOptions, G as ValidationError, ah as addArticulation, aB as addBeam, bX as addBowing, cb as addBreathMark, cg as addCaesura, R as addChord, g as addChordNote, as as addChordNoteChecked, bs as addCoda, bu as addDaCapo, bv as addDalSegno, al as addDynamics, bk as addEnding, a$ as addFermata, bw as addFine, bS as addFingering, bz as addGraceNote, bM as addHarmony, bF as addLyric, b as addNote, aq as addNoteChecked, c4 as addOctaveShift, b3 as addOrnament, a3 as addPart, b7 as addPedal, bd as addRehearsalMark, bg as addRepeatBarline, bq as addSegno, ad as addSlur, b$ as addStringNumber, aT as addTempo, bb as addTextDirection, a9 as addTie, bx as addToCoda, a1 as addVoice, aX as addWedge, aF as autoBeam, bo as changeBarline, c as changeKey, S as changeNoteDuration, e as changeTime, bD as convertToGrace, aI as copyNotes, aP as copyNotesMultiMeasure, ax as createTuplet, aM as cutNotes, f as deleteMeasure, d as deleteNote, ar as deleteNoteChecked, a5 as duplicatePart, ap as insertClefChange, i as insertMeasure, P as insertNote, a0 as lowerAccidental, h as modifyNoteDuration, au as modifyNoteDurationChecked, m as modifyNotePitch, at as modifyNotePitchChecked, a7 as moveNoteToStaff, aK as pasteNotes, aR as pasteNotesMultiMeasure, _ as raiseAccidental, aj as removeArticulation, aD as removeBeam, bZ as removeBowing, cd as removeBreathMark, ci as removeCaesura, an as removeDynamics, bm as removeEnding, b1 as removeFermata, bU as removeFingering, bB as removeGraceNote, bO as removeHarmony, bH as removeLyric, Q as removeNote, c8 as removeOctaveShift, b5 as removeOrnament, a4 as removePart, b9 as removePedal, bi as removeRepeatBarline, af as removeSlur, c1 as removeStringNumber, aV as removeTempo, ab as removeTie, az as removeTuplet, aZ as removeWedge, T as setNotePitch, W as setNotePitchBySemitone, a6 as setStaves, Y as shiftNotePitch, c6 as stopOctaveShift, t as transpose, av as transposeChecked, bQ as updateHarmony, bJ as updateLyric } from '../index-CJUkJI2P.js';
1
+ import '../types-CSI8kV28.js';
2
+ export { ag as AddArticulationOptions, aA as AddBeamOptions, bW as AddBowingOptions, ca as AddBreathMarkOptions, cf as AddCaesuraOptions, br as AddCodaOptions, ak as AddDynamicsOptions, bj as AddEndingOptions, a_ as AddFermataOptions, bR as AddFingeringOptions, by as AddGraceNoteOptions, bL as AddHarmonyOptions, bE as AddLyricOptions, bt as AddNavigationOptions, c3 as AddOctaveShiftOptions, b2 as AddOrnamentOptions, a2 as AddPartOptions, b6 as AddPedalOptions, bc as AddRehearsalMarkOptions, bf as AddRepeatBarlineOptions, bp as AddSegnoOptions, ac as AddSlurOptions, b_ as AddStringNumberOptions, aS as AddTempoOptions, ba as AddTextDirectionOptions, a8 as AddTieOptions, aW as AddWedgeOptions, aE as AutoBeamOptions, be as BarStyle, bV as BowingType, c9 as BreathMarkValue, ce as CaesuraValue, bn as ChangeBarlineOptions, bC as ConvertToGraceOptions, aN as CopyNotesMultiMeasureOptions, aH as CopyNotesOptions, aw as CreateTupletOptions, aL as CutNotesOptions, bK as HarmonyKind, ao as InsertClefChangeOptions, N as InsertNoteOptions, $ as LowerAccidentalOptions, aO as MultiMeasureSelection, aG as NoteSelection, c2 as OctaveShiftType, K as OperationErrorCode, O as OperationResult, aQ as PasteNotesMultiMeasureOptions, aJ as PasteNotesOptions, Z as RaiseAccidentalOptions, ai as RemoveArticulationOptions, aC as RemoveBeamOptions, bY as RemoveBowingOptions, cc as RemoveBreathMarkOptions, ch as RemoveCaesuraOptions, am as RemoveDynamicsOptions, bl as RemoveEndingOptions, b0 as RemoveFermataOptions, bT as RemoveFingeringOptions, bA as RemoveGraceNoteOptions, bN as RemoveHarmonyOptions, bG as RemoveLyricOptions, c7 as RemoveOctaveShiftOptions, b4 as RemoveOrnamentOptions, b8 as RemovePedalOptions, bh as RemoveRepeatBarlineOptions, ae as RemoveSlurOptions, c0 as RemoveStringNumberOptions, aU as RemoveTempoOptions, aa as RemoveTieOptions, ay as RemoveTupletOptions, aY as RemoveWedgeOptions, U as SetNotePitchBySemitoneOptions, X as ShiftNotePitchOptions, c5 as StopOctaveShiftOptions, bP as UpdateHarmonyOptions, bI as UpdateLyricOptions, G as ValidationError, ah as addArticulation, aB as addBeam, bX as addBowing, cb as addBreathMark, cg as addCaesura, R as addChord, g as addChordNote, as as addChordNoteChecked, bs as addCoda, bu as addDaCapo, bv as addDalSegno, al as addDynamics, bk as addEnding, a$ as addFermata, bw as addFine, bS as addFingering, bz as addGraceNote, bM as addHarmony, bF as addLyric, b as addNote, aq as addNoteChecked, c4 as addOctaveShift, b3 as addOrnament, a3 as addPart, b7 as addPedal, bd as addRehearsalMark, bg as addRepeatBarline, bq as addSegno, ad as addSlur, b$ as addStringNumber, aT as addTempo, bb as addTextDirection, a9 as addTie, bx as addToCoda, a1 as addVoice, aX as addWedge, aF as autoBeam, bo as changeBarline, c as changeKey, S as changeNoteDuration, e as changeTime, bD as convertToGrace, aI as copyNotes, aP as copyNotesMultiMeasure, ax as createTuplet, aM as cutNotes, f as deleteMeasure, d as deleteNote, ar as deleteNoteChecked, a5 as duplicatePart, ap as insertClefChange, i as insertMeasure, P as insertNote, a0 as lowerAccidental, h as modifyNoteDuration, au as modifyNoteDurationChecked, m as modifyNotePitch, at as modifyNotePitchChecked, a7 as moveNoteToStaff, aK as pasteNotes, aR as pasteNotesMultiMeasure, _ as raiseAccidental, aj as removeArticulation, aD as removeBeam, bZ as removeBowing, cd as removeBreathMark, ci as removeCaesura, an as removeDynamics, bm as removeEnding, b1 as removeFermata, bU as removeFingering, bB as removeGraceNote, bO as removeHarmony, bH as removeLyric, Q as removeNote, c8 as removeOctaveShift, b5 as removeOrnament, a4 as removePart, b9 as removePedal, bi as removeRepeatBarline, af as removeSlur, c1 as removeStringNumber, aV as removeTempo, ab as removeTie, az as removeTuplet, aZ as removeWedge, T as setNotePitch, W as setNotePitchBySemitone, a6 as setStaves, Y as shiftNotePitch, c6 as stopOctaveShift, t as transpose, av as transposeChecked, bQ as updateHarmony, bJ as updateLyric } from '../index-CVGy8DJi.js';