chordsheetjs 10.0.1 → 10.1.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.
package/lib/bundle.js CHANGED
@@ -12034,6 +12034,65 @@ var ChordSheetJS = (() => {
12034
12034
  }
12035
12035
  };
12036
12036
  var $c6abce5a8855cc55$export$2e2bcd8739ae039 = $c6abce5a8855cc55$var$enharmonics;
12037
+ var $551a223fc13b5c10$var$ChordLyricsPair = class _$551a223fc13b5c10$var$ChordLyricsPair {
12038
+ /**
12039
+ * Initialises a ChordLyricsPair
12040
+ * @param {string} chords The chords
12041
+ * @param {string | null} lyrics The lyrics
12042
+ * @param {string | null} annotation The annotation
12043
+ */
12044
+ constructor(chords = "", lyrics = null, annotation = null) {
12045
+ this.chords = chords || "";
12046
+ this.lyrics = lyrics || "";
12047
+ this.annotation = annotation || "";
12048
+ }
12049
+ /**
12050
+ * Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets)
12051
+ * @returns {boolean}
12052
+ */
12053
+ isRenderable() {
12054
+ return true;
12055
+ }
12056
+ /**
12057
+ * Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song
12058
+ * @returns {ChordLyricsPair}
12059
+ */
12060
+ clone() {
12061
+ return new _$551a223fc13b5c10$var$ChordLyricsPair(this.chords, this.lyrics, this.annotation);
12062
+ }
12063
+ toString() {
12064
+ return `ChordLyricsPair(chords=${this.chords}, lyrics=${this.lyrics})`;
12065
+ }
12066
+ set({ chords, lyrics, annotation }) {
12067
+ return new _$551a223fc13b5c10$var$ChordLyricsPair(chords || this.chords, lyrics || this.lyrics, annotation || this.annotation);
12068
+ }
12069
+ setLyrics(lyrics) {
12070
+ return this.set({
12071
+ lyrics
12072
+ });
12073
+ }
12074
+ setAnnotation(annotation) {
12075
+ return this.set({
12076
+ annotation
12077
+ });
12078
+ }
12079
+ transpose(delta, key = null, { normalizeChordSuffix } = {
12080
+ normalizeChordSuffix: false
12081
+ }) {
12082
+ const chordObj = (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(this.chords.trim());
12083
+ if (chordObj) {
12084
+ let transposedChord = chordObj.transpose(delta);
12085
+ if (key) transposedChord = transposedChord.normalize(key, {
12086
+ normalizeSuffix: normalizeChordSuffix
12087
+ });
12088
+ return this.set({
12089
+ chords: transposedChord.toString()
12090
+ });
12091
+ }
12092
+ return this.clone();
12093
+ }
12094
+ };
12095
+ var $551a223fc13b5c10$export$2e2bcd8739ae039 = $551a223fc13b5c10$var$ChordLyricsPair;
12037
12096
  var $5f19a6aa6bc347f1$var$mapping = {
12038
12097
  "2": "2",
12039
12098
  "4": "sus",
@@ -13812,65 +13871,6 @@ to a key`);
13812
13871
  }
13813
13872
  };
13814
13873
  var $177a605b8569b31c$export$2e2bcd8739ae039 = $177a605b8569b31c$var$Chord;
13815
- var $551a223fc13b5c10$var$ChordLyricsPair = class _$551a223fc13b5c10$var$ChordLyricsPair {
13816
- /**
13817
- * Initialises a ChordLyricsPair
13818
- * @param {string} chords The chords
13819
- * @param {string | null} lyrics The lyrics
13820
- * @param {string | null} annotation The annotation
13821
- */
13822
- constructor(chords = "", lyrics = null, annotation = null) {
13823
- this.chords = chords || "";
13824
- this.lyrics = lyrics || "";
13825
- this.annotation = annotation || "";
13826
- }
13827
- /**
13828
- * Indicates whether a ChordLyricsPair should be visible in a formatted chord sheet (except for ChordPro sheets)
13829
- * @returns {boolean}
13830
- */
13831
- isRenderable() {
13832
- return true;
13833
- }
13834
- /**
13835
- * Returns a deep copy of the ChordLyricsPair, useful when programmatically transforming a song
13836
- * @returns {ChordLyricsPair}
13837
- */
13838
- clone() {
13839
- return new _$551a223fc13b5c10$var$ChordLyricsPair(this.chords, this.lyrics, this.annotation);
13840
- }
13841
- toString() {
13842
- return `ChordLyricsPair(chords=${this.chords}, lyrics=${this.lyrics})`;
13843
- }
13844
- set({ chords, lyrics, annotation }) {
13845
- return new _$551a223fc13b5c10$var$ChordLyricsPair(chords || this.chords, lyrics || this.lyrics, annotation || this.annotation);
13846
- }
13847
- setLyrics(lyrics) {
13848
- return this.set({
13849
- lyrics
13850
- });
13851
- }
13852
- setAnnotation(annotation) {
13853
- return this.set({
13854
- annotation
13855
- });
13856
- }
13857
- transpose(delta, key = null, { normalizeChordSuffix } = {
13858
- normalizeChordSuffix: false
13859
- }) {
13860
- const chordObj = (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(this.chords.trim());
13861
- if (chordObj) {
13862
- let transposedChord = chordObj.transpose(delta);
13863
- if (key) transposedChord = transposedChord.normalize(key, {
13864
- normalizeSuffix: normalizeChordSuffix
13865
- });
13866
- return this.set({
13867
- chords: transposedChord.toString()
13868
- });
13869
- }
13870
- return this.clone();
13871
- }
13872
- };
13873
- var $551a223fc13b5c10$export$2e2bcd8739ae039 = $551a223fc13b5c10$var$ChordLyricsPair;
13874
13874
  var $f1e1976743ced067$export$a014e67b549cbef4 = {
13875
13875
  separator: ","
13876
13876
  };
@@ -31249,6 +31249,7 @@ Or set the song key before changing key:
31249
31249
  var $a5a21ced491ea51f$export$2e2bcd8739ae039 = $a5a21ced491ea51f$var$UltimateGuitarParser;
31250
31250
  var $892913528e7f60f9$export$2e2bcd8739ae039 = {
31251
31251
  CHORUS: $dce48cb70c4120bb$export$8db6c706fc9142b2,
31252
+ Chord: $177a605b8569b31c$export$2e2bcd8739ae039,
31252
31253
  ChordLyricsPair: $551a223fc13b5c10$export$2e2bcd8739ae039,
31253
31254
  ChordProFormatter: $244a67400187e14e$export$2e2bcd8739ae039,
31254
31255
  ChordProParser: $957f29f677b8d58d$export$2e2bcd8739ae039,