musicxml-io 0.12.1 → 0.12.2

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.
Files changed (44) hide show
  1. package/README.md +38 -9
  2. package/dist/browser.d.mts +1 -1
  3. package/dist/browser.d.ts +1 -1
  4. package/dist/browser.js +7 -5
  5. package/dist/browser.mjs +7 -5
  6. package/dist/{chunk-B2KMOLL4.js → chunk-2EH2MGBY.js} +37 -48
  7. package/dist/{chunk-L3OFLCMK.mjs → chunk-63UT3IEY.mjs} +17 -2
  8. package/dist/{chunk-GIP6COPL.js → chunk-7D4MLQKO.js} +4 -4
  9. package/dist/{chunk-M5YMLKTI.js → chunk-A2CGW2UF.js} +2 -2
  10. package/dist/{chunk-EBDEQMLT.mjs → chunk-BDHPMB7Q.mjs} +4 -4
  11. package/dist/{chunk-WUXG75HN.js → chunk-HP4DAUGT.js} +17 -2
  12. package/dist/{chunk-L2NY7YKF.mjs → chunk-LFQXT7PV.mjs} +1 -1
  13. package/dist/{chunk-UIYZ7YKU.mjs → chunk-MMIZQMIO.mjs} +1 -1
  14. package/dist/{chunk-VMCD32Z5.mjs → chunk-TCXDBRRT.mjs} +36 -47
  15. package/dist/{chunk-4EV76LCL.js → chunk-WNQIUYWY.js} +6 -6
  16. package/dist/core.d.mts +1 -1
  17. package/dist/core.d.ts +1 -1
  18. package/dist/core.js +7 -5
  19. package/dist/core.mjs +7 -5
  20. package/dist/file.d.mts +1 -1
  21. package/dist/file.d.ts +1 -1
  22. package/dist/file.js +4 -4
  23. package/dist/file.mjs +3 -3
  24. package/dist/index.d.mts +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +8 -6
  27. package/dist/index.mjs +8 -6
  28. package/dist/{musicxml-Clk_Vj4R.d.ts → musicxml-DWPClEqa.d.ts} +9 -2
  29. package/dist/{musicxml-CdXL6Vie.d.mts → musicxml-DzuFr2c3.d.mts} +9 -2
  30. package/dist/{musicxml-compressed-Z4FZUSXM.mjs → musicxml-compressed-7NUEGLSF.mjs} +2 -2
  31. package/dist/musicxml-compressed-7RL6QRF7.js +12 -0
  32. package/dist/musicxml-compressed-WPEIBOZ3.js +8 -0
  33. package/dist/{musicxml-compressed-Y3DMYWEO.mjs → musicxml-compressed-ZHZYFJ7H.mjs} +2 -2
  34. package/dist/musicxml-compressed.d.mts +1 -1
  35. package/dist/musicxml-compressed.d.ts +1 -1
  36. package/dist/musicxml-compressed.js +5 -5
  37. package/dist/musicxml-compressed.mjs +4 -4
  38. package/dist/musicxml.d.mts +1 -1
  39. package/dist/musicxml.d.ts +1 -1
  40. package/dist/musicxml.js +5 -3
  41. package/dist/musicxml.mjs +6 -4
  42. package/package.json +3 -2
  43. package/dist/musicxml-compressed-NWKKT32W.js +0 -12
  44. package/dist/musicxml-compressed-T5B6Z4IZ.js +0 -8
@@ -1,9 +1,11 @@
1
1
  import { S as Score } from './types-B-RGHY0c.mjs';
2
2
  import { z as ValidateOptions, u as ValidationResult } from './index-C9lLZwol.mjs';
3
3
 
4
- interface SerializeOptions {
4
+ interface SerializeUncheckedOptions {
5
5
  version?: string;
6
6
  indent?: string;
7
+ }
8
+ interface SerializeOptions extends SerializeUncheckedOptions {
7
9
  /** Validate score before serializing (default: false) */
8
10
  validate?: boolean;
9
11
  /** Options for validation (if validate is true) */
@@ -14,5 +16,10 @@ interface SerializeOptions {
14
16
  onValidation?: (result: ValidationResult) => void;
15
17
  }
16
18
  declare function serialize(score: Score, options?: SerializeOptions): string;
19
+ /**
20
+ * Write MusicXML without validation. Import this instead of serialize when
21
+ * validation is handled separately, so bundlers can omit the validator.
22
+ */
23
+ declare function serializeUnchecked(score: Score, options?: SerializeUncheckedOptions): string;
17
24
 
18
- export { type SerializeOptions as S, serialize as s };
25
+ export { type SerializeOptions as S, serializeUnchecked as a, type SerializeUncheckedOptions as b, serialize as s };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  serializeCompressed
3
- } from "./chunk-UIYZ7YKU.mjs";
4
- import "./chunk-VMCD32Z5.mjs";
3
+ } from "./chunk-MMIZQMIO.mjs";
4
+ import "./chunk-TCXDBRRT.mjs";
5
5
  import "./chunk-SBT2RMUW.mjs";
6
6
  export {
7
7
  serializeCompressed
@@ -0,0 +1,12 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+ var _chunk7D4MLQKOjs = require('./chunk-7D4MLQKO.js');
6
+ require('./chunk-HP4DAUGT.js');
7
+ require('./chunk-5EK7K5X3.js');
8
+
9
+
10
+
11
+
12
+ exports.isCompressed = _chunk7D4MLQKOjs.isCompressed; exports.parseAuto = _chunk7D4MLQKOjs.parseAuto; exports.parseCompressed = _chunk7D4MLQKOjs.parseCompressed;
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkA2CGW2UFjs = require('./chunk-A2CGW2UF.js');
4
+ require('./chunk-2EH2MGBY.js');
5
+ require('./chunk-JF5TM534.js');
6
+
7
+
8
+ exports.serializeCompressed = _chunkA2CGW2UFjs.serializeCompressed;
@@ -2,8 +2,8 @@ import {
2
2
  isCompressed,
3
3
  parseAuto,
4
4
  parseCompressed
5
- } from "./chunk-L2NY7YKF.mjs";
6
- import "./chunk-L3OFLCMK.mjs";
5
+ } from "./chunk-LFQXT7PV.mjs";
6
+ import "./chunk-63UT3IEY.mjs";
7
7
  import "./chunk-5VF442RA.mjs";
8
8
  export {
9
9
  isCompressed,
@@ -1,5 +1,5 @@
1
1
  import { S as Score } from './types-B-RGHY0c.mjs';
2
- import { S as SerializeOptions } from './musicxml-CdXL6Vie.mjs';
2
+ import { S as SerializeOptions } from './musicxml-DzuFr2c3.mjs';
3
3
  import './index-C9lLZwol.mjs';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { S as Score } from './types-B-RGHY0c.js';
2
- import { S as SerializeOptions } from './musicxml-Clk_Vj4R.js';
2
+ import { S as SerializeOptions } from './musicxml-DWPClEqa.js';
3
3
  import './index-DNA970t1.js';
4
4
 
5
5
  /**
@@ -2,12 +2,12 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkGIP6COPLjs = require('./chunk-GIP6COPL.js');
5
+ var _chunk7D4MLQKOjs = require('./chunk-7D4MLQKO.js');
6
6
 
7
7
 
8
- var _chunkM5YMLKTIjs = require('./chunk-M5YMLKTI.js');
9
- require('./chunk-WUXG75HN.js');
10
- require('./chunk-B2KMOLL4.js');
8
+ var _chunkA2CGW2UFjs = require('./chunk-A2CGW2UF.js');
9
+ require('./chunk-HP4DAUGT.js');
10
+ require('./chunk-2EH2MGBY.js');
11
11
  require('./chunk-JF5TM534.js');
12
12
  require('./chunk-5EK7K5X3.js');
13
13
 
@@ -15,4 +15,4 @@ require('./chunk-5EK7K5X3.js');
15
15
 
16
16
 
17
17
 
18
- exports.isCompressed = _chunkGIP6COPLjs.isCompressed; exports.parseAuto = _chunkGIP6COPLjs.parseAuto; exports.parseCompressed = _chunkGIP6COPLjs.parseCompressed; exports.serializeCompressed = _chunkM5YMLKTIjs.serializeCompressed;
18
+ exports.isCompressed = _chunk7D4MLQKOjs.isCompressed; exports.parseAuto = _chunk7D4MLQKOjs.parseAuto; exports.parseCompressed = _chunk7D4MLQKOjs.parseCompressed; exports.serializeCompressed = _chunkA2CGW2UFjs.serializeCompressed;
@@ -2,12 +2,12 @@ import {
2
2
  isCompressed,
3
3
  parseAuto,
4
4
  parseCompressed
5
- } from "./chunk-L2NY7YKF.mjs";
5
+ } from "./chunk-LFQXT7PV.mjs";
6
6
  import {
7
7
  serializeCompressed
8
- } from "./chunk-UIYZ7YKU.mjs";
9
- import "./chunk-L3OFLCMK.mjs";
10
- import "./chunk-VMCD32Z5.mjs";
8
+ } from "./chunk-MMIZQMIO.mjs";
9
+ import "./chunk-63UT3IEY.mjs";
10
+ import "./chunk-TCXDBRRT.mjs";
11
11
  import "./chunk-SBT2RMUW.mjs";
12
12
  import "./chunk-5VF442RA.mjs";
13
13
  export {
@@ -1,6 +1,6 @@
1
1
  import { S as Score } from './types-B-RGHY0c.mjs';
2
2
  export { A as Accidental, i as AccidentalInfo, j as AccidentalMarkInfo, b1 as AccidentalMarkNotation, b5 as Accord, a2 as AdjacentNotes, a$ as ArpeggiateNotation, aS as ArticulationNotation, ao as ArticulationType, ag as AssembledLyrics, aH as AttributesEntry, B as BackupEntry, y as Barline, ah as BarlineWithContext, aR as BaseNotation, ac as BeamGroup, m as BeamInfo, G as Chord, w as Clef, am as ClefChangeInfo, C as Color, aq as Creator, Q as Credit, U as CreditImage, R as CreditWords, O as Defaults, D as DirectionEntry, a3 as DirectionKind, aI as DirectionSound, o as DirectionType, Z as DirectionWithContext, u as DisplayText, a4 as DynamicWithContext, aZ as DynamicsNotation, p as DynamicsValue, ar as Encoding, aj as EndingInfo, Y as EntryWithContext, a_ as FermataNotation, aO as Figure, s as FiguredBassEntry, az as FontInfo, F as ForwardEntry, aN as FrameNote, b2 as GlissandoNotation, aL as GroupingEntry, aM as HarmonyDegree, H as HarmonyEntry, r as HarmonyFrame, ae as HarmonyWithContext, ak as KeyChangeInfo, aG as KeyOctave, K as KeySignature, L as Lyric, au as LyricFontInfo, av as LyricLanguageInfo, q as LyricTextElement, af as LyricWithContext, M as Measure, e as MeasureAttributes, f as MeasureEntry, aD as MeasureNumbering, t as MeasureStyle, aB as MidiDevice, aC as MidiInstrument, at as MiscellaneousField, b0 as NonArpeggiateNotation, n as Notation, ad as NotationType, N as NoteEntry, I as NoteIteratorItem, h as NoteType, X as NoteWithContext, E as NoteWithPosition, k as NoteheadInfo, aQ as NoteheadValue, a8 as OctaveShiftWithContext, aT as OrnamentNotation, ap as OrnamentType, b4 as OtherNotation, aw as PageLayout, ax as PageMargins, d as Part, b as PartGroup, P as PartInfo, c as PartListEntry, b6 as PedalTuning, a6 as PedalWithContext, g as Pitch, $ as PositionQueryOptions, J as Print, ai as RepeatInfo, aP as RestInfo, aA as ScoreInstrument, a as ScoreMetadata, b3 as SlideNotation, aW as SlurNotation, aa as SlurSpan, aK as SoundEntry, aE as StaffDetails, z as StaffGroup, _ as StaffRange, aF as StaffTuning, l as StemInfo, an as StructuralChanges, as as Support, aJ as Swing, ay as SystemLayout, aU as TechnicalNotation, aV as TechnicalType, a5 as TempoWithContext, T as TieInfo, aX as TiedNotation, a9 as TiedNoteGroup, al as TimeChangeInfo, v as TimeSignature, x as Transpose, ab as TupletGroup, aY as TupletNotation, a0 as VerticalSlice, V as VoiceGroup, a1 as VoiceLine, W as VoiceToStaffMap, a7 as WedgeWithContext } from './types-B-RGHY0c.mjs';
3
- export { S as SerializeOptions, s as serialize } from './musicxml-CdXL6Vie.mjs';
3
+ export { S as SerializeOptions, b as SerializeUncheckedOptions, s as serialize, a as serializeUnchecked } from './musicxml-DzuFr2c3.mjs';
4
4
  import './index-C9lLZwol.mjs';
5
5
 
6
6
  declare function parse(input: string | Uint8Array): Score;
@@ -1,6 +1,6 @@
1
1
  import { S as Score } from './types-B-RGHY0c.js';
2
2
  export { A as Accidental, i as AccidentalInfo, j as AccidentalMarkInfo, b1 as AccidentalMarkNotation, b5 as Accord, a2 as AdjacentNotes, a$ as ArpeggiateNotation, aS as ArticulationNotation, ao as ArticulationType, ag as AssembledLyrics, aH as AttributesEntry, B as BackupEntry, y as Barline, ah as BarlineWithContext, aR as BaseNotation, ac as BeamGroup, m as BeamInfo, G as Chord, w as Clef, am as ClefChangeInfo, C as Color, aq as Creator, Q as Credit, U as CreditImage, R as CreditWords, O as Defaults, D as DirectionEntry, a3 as DirectionKind, aI as DirectionSound, o as DirectionType, Z as DirectionWithContext, u as DisplayText, a4 as DynamicWithContext, aZ as DynamicsNotation, p as DynamicsValue, ar as Encoding, aj as EndingInfo, Y as EntryWithContext, a_ as FermataNotation, aO as Figure, s as FiguredBassEntry, az as FontInfo, F as ForwardEntry, aN as FrameNote, b2 as GlissandoNotation, aL as GroupingEntry, aM as HarmonyDegree, H as HarmonyEntry, r as HarmonyFrame, ae as HarmonyWithContext, ak as KeyChangeInfo, aG as KeyOctave, K as KeySignature, L as Lyric, au as LyricFontInfo, av as LyricLanguageInfo, q as LyricTextElement, af as LyricWithContext, M as Measure, e as MeasureAttributes, f as MeasureEntry, aD as MeasureNumbering, t as MeasureStyle, aB as MidiDevice, aC as MidiInstrument, at as MiscellaneousField, b0 as NonArpeggiateNotation, n as Notation, ad as NotationType, N as NoteEntry, I as NoteIteratorItem, h as NoteType, X as NoteWithContext, E as NoteWithPosition, k as NoteheadInfo, aQ as NoteheadValue, a8 as OctaveShiftWithContext, aT as OrnamentNotation, ap as OrnamentType, b4 as OtherNotation, aw as PageLayout, ax as PageMargins, d as Part, b as PartGroup, P as PartInfo, c as PartListEntry, b6 as PedalTuning, a6 as PedalWithContext, g as Pitch, $ as PositionQueryOptions, J as Print, ai as RepeatInfo, aP as RestInfo, aA as ScoreInstrument, a as ScoreMetadata, b3 as SlideNotation, aW as SlurNotation, aa as SlurSpan, aK as SoundEntry, aE as StaffDetails, z as StaffGroup, _ as StaffRange, aF as StaffTuning, l as StemInfo, an as StructuralChanges, as as Support, aJ as Swing, ay as SystemLayout, aU as TechnicalNotation, aV as TechnicalType, a5 as TempoWithContext, T as TieInfo, aX as TiedNotation, a9 as TiedNoteGroup, al as TimeChangeInfo, v as TimeSignature, x as Transpose, ab as TupletGroup, aY as TupletNotation, a0 as VerticalSlice, V as VoiceGroup, a1 as VoiceLine, W as VoiceToStaffMap, a7 as WedgeWithContext } from './types-B-RGHY0c.js';
3
- export { S as SerializeOptions, s as serialize } from './musicxml-Clk_Vj4R.js';
3
+ export { S as SerializeOptions, b as SerializeUncheckedOptions, s as serialize, a as serializeUnchecked } from './musicxml-DWPClEqa.js';
4
4
  import './index-DNA970t1.js';
5
5
 
6
6
  declare function parse(input: string | Uint8Array): Score;
package/dist/musicxml.js CHANGED
@@ -1,12 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWUXG75HNjs = require('./chunk-WUXG75HN.js');
3
+ var _chunkHP4DAUGTjs = require('./chunk-HP4DAUGT.js');
4
4
 
5
5
 
6
- var _chunkB2KMOLL4js = require('./chunk-B2KMOLL4.js');
6
+
7
+ var _chunk2EH2MGBYjs = require('./chunk-2EH2MGBY.js');
7
8
  require('./chunk-JF5TM534.js');
8
9
  require('./chunk-5EK7K5X3.js');
9
10
 
10
11
 
11
12
 
12
- exports.parse = _chunkWUXG75HNjs.parse; exports.serialize = _chunkB2KMOLL4js.serialize;
13
+
14
+ exports.parse = _chunkHP4DAUGTjs.parse; exports.serialize = _chunk2EH2MGBYjs.serialize; exports.serializeUnchecked = _chunk2EH2MGBYjs.serializeUnchecked;
package/dist/musicxml.mjs CHANGED
@@ -1,12 +1,14 @@
1
1
  import {
2
2
  parse
3
- } from "./chunk-L3OFLCMK.mjs";
3
+ } from "./chunk-63UT3IEY.mjs";
4
4
  import {
5
- serialize
6
- } from "./chunk-VMCD32Z5.mjs";
5
+ serialize,
6
+ serializeUnchecked
7
+ } from "./chunk-TCXDBRRT.mjs";
7
8
  import "./chunk-SBT2RMUW.mjs";
8
9
  import "./chunk-5VF442RA.mjs";
9
10
  export {
10
11
  parse,
11
- serialize
12
+ serialize,
13
+ serializeUnchecked
12
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musicxml-io",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "Parse and serialize MusicXML (.xml/.mxl) and ABC notation with high round-trip fidelity",
5
5
  "author": "tan-z-tan",
6
6
  "license": "MIT",
@@ -95,7 +95,8 @@
95
95
  "release:minor": "bash scripts/release.sh minor",
96
96
  "release:major": "bash scripts/release.sh major",
97
97
  "check:bundle": "npm run build && node scripts/check-bundle.mjs",
98
- "bench:loading": "npm run build && node scripts/bench-loading.mjs"
98
+ "bench:loading": "npm run build && node scripts/bench-loading.mjs",
99
+ "bench:io": "npm run build && node scripts/bench-io.mjs"
99
100
  },
100
101
  "keywords": [
101
102
  "musicxml",
@@ -1,12 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
- var _chunkGIP6COPLjs = require('./chunk-GIP6COPL.js');
6
- require('./chunk-WUXG75HN.js');
7
- require('./chunk-5EK7K5X3.js');
8
-
9
-
10
-
11
-
12
- exports.isCompressed = _chunkGIP6COPLjs.isCompressed; exports.parseAuto = _chunkGIP6COPLjs.parseAuto; exports.parseCompressed = _chunkGIP6COPLjs.parseCompressed;
@@ -1,8 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkM5YMLKTIjs = require('./chunk-M5YMLKTI.js');
4
- require('./chunk-B2KMOLL4.js');
5
- require('./chunk-JF5TM534.js');
6
-
7
-
8
- exports.serializeCompressed = _chunkM5YMLKTIjs.serializeCompressed;