chordsheetjs 9.0.1 → 9.0.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.
package/lib/index.js CHANGED
@@ -19048,7 +19048,6 @@ var $376e205ced98486b$export$2e2bcd8739ae039 = {
19048
19048
  var $8906a355dee27f2c$export$2e2bcd8739ae039 = $8906a355dee27f2c$var$ChordsOverWordsFormatter;
19049
19049
 
19050
19050
 
19051
-
19052
19051
  // eslint-disable-next-line import/prefer-default-export
19053
19052
  function $9e2fd0525d9e4483$export$9f6ee93f4e2fb3d2(string) {
19054
19053
  const result = /(\s+)(\S+)/.exec(string);
@@ -31287,6 +31286,8 @@ function $3df1df9cc0f1cab9$var$peg$parse(input, options) {
31287
31286
  const $3df1df9cc0f1cab9$export$98e6a39c04603d36 = $3df1df9cc0f1cab9$var$peg$parse;
31288
31287
 
31289
31288
 
31289
+
31290
+
31290
31291
  /**
31291
31292
  * Parses a chords over words sheet into a song
31292
31293
  *
@@ -31324,13 +31325,24 @@ const $3df1df9cc0f1cab9$export$98e6a39c04603d36 = $3df1df9cc0f1cab9$var$peg$pars
31324
31325
  * Whisper words of wisdom, let it be
31325
31326
  *
31326
31327
  * `ChordsOverWordsParser` is the better version of `ChordSheetParser`, which is deprecated.
31327
- */ class $c5e7c9181f4c1376$var$ChordsOverWordsParser extends (0, $6af2b7a7ad6b2cba$export$2e2bcd8739ae039) {
31328
+ */ class $c5e7c9181f4c1376$var$ChordsOverWordsParser {
31329
+ /**
31330
+ * All warnings raised during parsing the chord sheet
31331
+ * @member
31332
+ * @type {ParserWarning[]}
31333
+ */ get warnings() {
31334
+ return this.song?.warnings || [];
31335
+ }
31328
31336
  /**
31329
31337
  * Parses a chords over words sheet into a song
31330
- * @param {string} chordsOverWordsSheet the chords over words sheet
31338
+ * @param {string} chordSheet the chords over words sheet
31339
+ * @param {ParseOptions} options Parser options.
31340
+ * @see https://peggyjs.org/documentation.html#using-the-parser
31331
31341
  * @returns {Song} The parsed song
31332
- */ parse(chordsOverWordsSheet) {
31333
- return this.parseWithParser(`${chordsOverWordsSheet}`, (0, $3df1df9cc0f1cab9$export$98e6a39c04603d36));
31342
+ */ parse(chordSheet, options) {
31343
+ const ast = (0, $3df1df9cc0f1cab9$export$98e6a39c04603d36)((0, $21a34a464e7bc609$export$ba13e0e2f19e61a1)(chordSheet), options);
31344
+ this.song = new (0, $1c14afc274b727b7$export$2e2bcd8739ae039)().deserialize(ast);
31345
+ return this.song;
31334
31346
  }
31335
31347
  }
31336
31348
  var $c5e7c9181f4c1376$export$2e2bcd8739ae039 = $c5e7c9181f4c1376$var$ChordsOverWordsParser;