chordsheetjs 14.6.0 → 14.6.1
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 +22 -4
- package/lib/bundle.min.js +67 -67
- package/lib/index.js +23 -4
- package/lib/index.js.map +1 -1
- package/lib/main.d.ts +134 -131
- package/lib/main.d.ts.map +1 -1
- package/lib/module.js +23 -4
- package/lib/module.js.map +1 -1
- package/package.json +2 -1
package/lib/bundle.js
CHANGED
|
@@ -33871,6 +33871,7 @@ var ChordSheetJS = (() => {
|
|
|
33871
33871
|
* @param {boolean} isRhythmSymbol Whether this pair represents a rhythm symbol
|
|
33872
33872
|
*/
|
|
33873
33873
|
constructor(chords = "", lyrics = null, annotation = null, chordObj = null, isRhythmSymbol = false) {
|
|
33874
|
+
this.parentLine = null;
|
|
33874
33875
|
this._chordObj = null;
|
|
33875
33876
|
this.chords = chords || "";
|
|
33876
33877
|
this.lyrics = lyrics || "";
|
|
@@ -38044,6 +38045,7 @@ ${error.stack}`);
|
|
|
38044
38045
|
var $6c1ed1378c3b5965$export$2e2bcd8739ae039 = $6c1ed1378c3b5965$var$ChordDefinition;
|
|
38045
38046
|
var $0bd084786477abba$var$Comment = class _$0bd084786477abba$var$Comment {
|
|
38046
38047
|
constructor(content) {
|
|
38048
|
+
this.parentLine = null;
|
|
38047
38049
|
this.content = content;
|
|
38048
38050
|
}
|
|
38049
38051
|
/**
|
|
@@ -38067,6 +38069,7 @@ ${error.stack}`);
|
|
|
38067
38069
|
var $0bd084786477abba$export$2e2bcd8739ae039 = $0bd084786477abba$var$Comment;
|
|
38068
38070
|
var $c5ce4fc4f57fe810$var$AstComponent = class {
|
|
38069
38071
|
constructor(traceInfo = null) {
|
|
38072
|
+
this.parentLine = null;
|
|
38070
38073
|
this.line = null;
|
|
38071
38074
|
this.column = null;
|
|
38072
38075
|
this.offset = null;
|
|
@@ -39627,7 +39630,11 @@ ${formattedContentLines}`;
|
|
|
39627
39630
|
if (item instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039)) this.addTag(item);
|
|
39628
39631
|
else if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) this.addChordLyricsPair(item);
|
|
39629
39632
|
else if (item instanceof (0, $0bd084786477abba$export$2e2bcd8739ae039)) this.addComment(item);
|
|
39630
|
-
else
|
|
39633
|
+
else {
|
|
39634
|
+
const addedItem = item;
|
|
39635
|
+
addedItem.parentLine = this;
|
|
39636
|
+
this.items.push(addedItem);
|
|
39637
|
+
}
|
|
39631
39638
|
}
|
|
39632
39639
|
/**
|
|
39633
39640
|
* Indicates whether the line contains items that are renderable
|
|
@@ -39705,6 +39712,7 @@ ${formattedContentLines}`;
|
|
|
39705
39712
|
addChordLyricsPair(chords = null, lyrics = null) {
|
|
39706
39713
|
if (chords instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) this.currentChordLyricsPair = chords;
|
|
39707
39714
|
else this.currentChordLyricsPair = new (0, $551a223fc13b5c10$export$2e2bcd8739ae039)(chords || "", lyrics || "");
|
|
39715
|
+
this.currentChordLyricsPair.parentLine = this;
|
|
39708
39716
|
this.items.push(this.currentChordLyricsPair);
|
|
39709
39717
|
return this.currentChordLyricsPair;
|
|
39710
39718
|
}
|
|
@@ -39721,11 +39729,13 @@ ${formattedContentLines}`;
|
|
|
39721
39729
|
}
|
|
39722
39730
|
addTag(nameOrTag, value = null) {
|
|
39723
39731
|
const tag = nameOrTag instanceof (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039) ? nameOrTag : new (0, $7251dad5f4a4c35f$export$2e2bcd8739ae039)(nameOrTag, value);
|
|
39732
|
+
tag.parentLine = this;
|
|
39724
39733
|
this.items.push(tag);
|
|
39725
39734
|
return tag;
|
|
39726
39735
|
}
|
|
39727
39736
|
addComment(content) {
|
|
39728
39737
|
const comment = content instanceof (0, $0bd084786477abba$export$2e2bcd8739ae039) ? content : new (0, $0bd084786477abba$export$2e2bcd8739ae039)(content);
|
|
39738
|
+
comment.parentLine = this;
|
|
39729
39739
|
this.items.push(comment);
|
|
39730
39740
|
return comment;
|
|
39731
39741
|
}
|
|
@@ -40964,7 +40974,7 @@ ${formattedContentLines}`;
|
|
|
40964
40974
|
});
|
|
40965
40975
|
}
|
|
40966
40976
|
if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) return _$c53141c05fae8382$var$Song.transposeChordLyricsPair(item, delta, transposedKey, normalizeChordSuffix, accidental);
|
|
40967
|
-
if (item instanceof (0, $11953cb6035032a3$export$2e2bcd8739ae039)) return _$c53141c05fae8382$var$Song.transposeLiteral(item, delta, transposedKey, normalizeChordSuffix, accidental);
|
|
40977
|
+
if (item instanceof (0, $11953cb6035032a3$export$2e2bcd8739ae039) && _$c53141c05fae8382$var$Song.isMusicalSection(item.parentLine)) return _$c53141c05fae8382$var$Song.transposeLiteral(item, delta, transposedKey, normalizeChordSuffix, accidental);
|
|
40968
40978
|
return item;
|
|
40969
40979
|
});
|
|
40970
40980
|
}
|
|
@@ -41075,10 +41085,18 @@ ${formattedContentLines}`;
|
|
|
41075
41085
|
changeChords(func) {
|
|
41076
41086
|
return this.mapItems((item) => {
|
|
41077
41087
|
if (item instanceof (0, $551a223fc13b5c10$export$2e2bcd8739ae039)) return item.changeChord(func);
|
|
41078
|
-
if (item instanceof (0, $11953cb6035032a3$export$2e2bcd8739ae039)) return _$c53141c05fae8382$var$Song.mapChordsInLiteral(item, func);
|
|
41088
|
+
if (item instanceof (0, $11953cb6035032a3$export$2e2bcd8739ae039) && _$c53141c05fae8382$var$Song.isMusicalSection(item.parentLine)) return _$c53141c05fae8382$var$Song.mapChordsInLiteral(item, func);
|
|
41079
41089
|
return item;
|
|
41080
41090
|
});
|
|
41081
41091
|
}
|
|
41092
|
+
static isMusicalSection(line) {
|
|
41093
|
+
return line === null || ![
|
|
41094
|
+
(0, $dce48cb70c4120bb$export$92249c36c213e508),
|
|
41095
|
+
(0, $dce48cb70c4120bb$export$6a5a2eab72b6e3d),
|
|
41096
|
+
(0, $dce48cb70c4120bb$export$13f4b12aafeba5d6),
|
|
41097
|
+
(0, $dce48cb70c4120bb$export$5a2cf64ea612936a)
|
|
41098
|
+
].includes(line.type);
|
|
41099
|
+
}
|
|
41082
41100
|
static mapChordsInLiteral(item, func) {
|
|
41083
41101
|
const changedString = item.string.replace(/(\s|^)(\S+)(?=\s|$)/g, (_match, space, token) => {
|
|
41084
41102
|
const chord = (0, $177a605b8569b31c$export$2e2bcd8739ae039).parse(token);
|
|
@@ -70213,7 +70231,7 @@ AjwCRQJ5AAAAAAABAAAAANpTmfAAAAAA0e+yRgAAAADR77JG
|
|
|
70213
70231
|
}
|
|
70214
70232
|
};
|
|
70215
70233
|
var $a5a21ced491ea51f$export$2e2bcd8739ae039 = $a5a21ced491ea51f$var$UltimateGuitarParser;
|
|
70216
|
-
var $ae92e002ce14f11a$export$2e2bcd8739ae039 = "14.6.
|
|
70234
|
+
var $ae92e002ce14f11a$export$2e2bcd8739ae039 = "14.6.1";
|
|
70217
70235
|
var $a3816b486f741c00$exports = {};
|
|
70218
70236
|
var $892913528e7f60f9$export$2e2bcd8739ae039 = {
|
|
70219
70237
|
CHORUS: $dce48cb70c4120bb$export$8db6c706fc9142b2,
|