chordsheetjs 6.0.0 → 6.2.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/README.md +477 -539
- package/lib/bundle.js +15353 -0
- package/lib/index.js +6253 -216
- package/lib/index.js.map +1 -0
- package/lib/main.d.ts +1062 -0
- package/lib/main.d.ts.map +1 -0
- package/package.json +50 -23
- package/d7b54993c4ea66c07a35bd36690482ab620f836e.patch +0 -105
- package/lib/chord.js +0 -496
- package/lib/chord_sheet/chord_lyrics_pair.js +0 -75
- package/lib/chord_sheet/chord_pro/composite.js +0 -54
- package/lib/chord_sheet/chord_pro/evaluation_error.js +0 -58
- package/lib/chord_sheet/chord_pro/literal.js +0 -42
- package/lib/chord_sheet/chord_pro/ternary.js +0 -126
- package/lib/chord_sheet/comment.js +0 -55
- package/lib/chord_sheet/line.js +0 -185
- package/lib/chord_sheet/metadata.js +0 -202
- package/lib/chord_sheet/paragraph.js +0 -88
- package/lib/chord_sheet/song.js +0 -353
- package/lib/chord_sheet/tag.js +0 -345
- package/lib/chord_sheet_serializer.js +0 -278
- package/lib/constants.js +0 -54
- package/lib/formatter/chord_pro_formatter.js +0 -184
- package/lib/formatter/html_div_formatter.js +0 -130
- package/lib/formatter/html_formatter.js +0 -44
- package/lib/formatter/html_table_formatter.js +0 -154
- package/lib/formatter/templates/html_div_formatter.js +0 -544
- package/lib/formatter/templates/html_table_formatter.js +0 -731
- package/lib/formatter/text_formatter.js +0 -184
- package/lib/helpers.js +0 -32
- package/lib/key.js +0 -386
- package/lib/normalize_mappings/enharmonic-normalize.js +0 -124
- package/lib/normalize_mappings/generate-suffix-normalize-mapping.js +0 -36
- package/lib/normalize_mappings/suffix-normalize-mapping.js +0 -914
- package/lib/note.js +0 -264
- package/lib/parser/chord_pro_parser.js +0 -64
- package/lib/parser/chord_pro_peg_parser.js +0 -2069
- package/lib/parser/chord_sheet_parser.js +0 -175
- package/lib/parser/parser_warning.js +0 -62
- package/lib/parser/ultimate_guitar_parser.js +0 -154
- package/lib/template_helpers.js +0 -98
- package/lib/utilities.js +0 -110
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _default = {
|
|
8
|
-
'Ab': {
|
|
9
|
-
'B': 'Cb'
|
|
10
|
-
},
|
|
11
|
-
'Cb': {
|
|
12
|
-
'B': 'Cb',
|
|
13
|
-
'A#': 'Bb',
|
|
14
|
-
'E': 'Fb'
|
|
15
|
-
},
|
|
16
|
-
'C': {
|
|
17
|
-
'C#': 'Db',
|
|
18
|
-
'D#': 'Eb',
|
|
19
|
-
'F#': 'Gb',
|
|
20
|
-
'G#': 'Ab',
|
|
21
|
-
'A#': 'Bb'
|
|
22
|
-
},
|
|
23
|
-
'C#': {
|
|
24
|
-
'D#': 'Eb',
|
|
25
|
-
'A#': 'Bb'
|
|
26
|
-
},
|
|
27
|
-
'Db': {
|
|
28
|
-
'B': 'Cb'
|
|
29
|
-
},
|
|
30
|
-
'D': {
|
|
31
|
-
'D#': 'Eb',
|
|
32
|
-
'A#': 'Bb'
|
|
33
|
-
},
|
|
34
|
-
'E': {
|
|
35
|
-
'Ab': 'G#',
|
|
36
|
-
'A#': 'Bb',
|
|
37
|
-
'D#': 'Eb'
|
|
38
|
-
},
|
|
39
|
-
'F': {
|
|
40
|
-
'A#': 'Bb',
|
|
41
|
-
'F#': 'Gb',
|
|
42
|
-
'C#': 'Db',
|
|
43
|
-
'D#': 'Eb',
|
|
44
|
-
'G#': 'Ab'
|
|
45
|
-
},
|
|
46
|
-
'F#': {
|
|
47
|
-
'A#': 'Bb',
|
|
48
|
-
'D#': 'Eb'
|
|
49
|
-
},
|
|
50
|
-
'Gb': {
|
|
51
|
-
'A#': 'Bb',
|
|
52
|
-
'D#': 'Eb',
|
|
53
|
-
'G#': 'Ab',
|
|
54
|
-
'B': 'Cb',
|
|
55
|
-
'E': 'Fb'
|
|
56
|
-
},
|
|
57
|
-
'G': {
|
|
58
|
-
'A#': 'Bb',
|
|
59
|
-
'D#': 'Eb',
|
|
60
|
-
'G#': 'Ab'
|
|
61
|
-
},
|
|
62
|
-
'G#': {
|
|
63
|
-
'A#': 'Bb',
|
|
64
|
-
'D#': 'Eb'
|
|
65
|
-
},
|
|
66
|
-
'Am': {
|
|
67
|
-
'Gb': 'G',
|
|
68
|
-
'G#': 'Ab',
|
|
69
|
-
'F#': 'Gb',
|
|
70
|
-
'C#': 'Db',
|
|
71
|
-
'D#': 'Eb',
|
|
72
|
-
'A#': 'Bb'
|
|
73
|
-
},
|
|
74
|
-
'Bbm': {
|
|
75
|
-
'Cb': 'B'
|
|
76
|
-
},
|
|
77
|
-
'Bm': {
|
|
78
|
-
'A#': 'Bb',
|
|
79
|
-
'D#': 'Eb'
|
|
80
|
-
},
|
|
81
|
-
'C#m': {
|
|
82
|
-
'A#': 'Bb',
|
|
83
|
-
'D#': 'Eb'
|
|
84
|
-
},
|
|
85
|
-
'Cm': {
|
|
86
|
-
'G#': 'Ab',
|
|
87
|
-
'A#': 'Bb',
|
|
88
|
-
'D#': 'Eb',
|
|
89
|
-
'F#': 'Gb',
|
|
90
|
-
'C#': 'Db'
|
|
91
|
-
},
|
|
92
|
-
'Dm': {
|
|
93
|
-
'A#': 'Bb',
|
|
94
|
-
'D#': 'Eb'
|
|
95
|
-
},
|
|
96
|
-
'Em': {
|
|
97
|
-
'A#': 'Bb',
|
|
98
|
-
'D#': 'Eb'
|
|
99
|
-
},
|
|
100
|
-
'F#m': {
|
|
101
|
-
'A#': 'Bb',
|
|
102
|
-
'D#': 'Eb',
|
|
103
|
-
'Gb': 'F#',
|
|
104
|
-
'Ab': 'G#',
|
|
105
|
-
'Db': 'C#'
|
|
106
|
-
},
|
|
107
|
-
'Fm': {
|
|
108
|
-
'G#': 'Ab',
|
|
109
|
-
'A#': 'Bb',
|
|
110
|
-
'D#': 'Eb',
|
|
111
|
-
'F#': 'Gb',
|
|
112
|
-
'C#': 'Db'
|
|
113
|
-
},
|
|
114
|
-
'Gm': {
|
|
115
|
-
'G#': 'Ab',
|
|
116
|
-
'A#': 'Bb',
|
|
117
|
-
'D#': 'Eb'
|
|
118
|
-
},
|
|
119
|
-
'G#m': {
|
|
120
|
-
'A#': 'Bb',
|
|
121
|
-
'D#': 'Eb'
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
exports["default"] = _default;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
|
|
9
|
-
var fs = require('fs');
|
|
10
|
-
|
|
11
|
-
console.warn('\x1b[34m', '👷 Building suffix normalize mapping from suffix-mapping.txt');
|
|
12
|
-
fs.readFile('src/normalize_mappings/suffix-mapping.txt', function (err, data) {
|
|
13
|
-
if (err) throw err;
|
|
14
|
-
var suffixs = [];
|
|
15
|
-
data.toString().split('\n').map(function (line) {
|
|
16
|
-
var items = line.split(',');
|
|
17
|
-
var cleanStringsArray = [];
|
|
18
|
-
items.forEach(function (item) {
|
|
19
|
-
cleanStringsArray.push(item.trim());
|
|
20
|
-
});
|
|
21
|
-
suffixs.push(cleanStringsArray);
|
|
22
|
-
return suffixs;
|
|
23
|
-
});
|
|
24
|
-
var flatObject = {};
|
|
25
|
-
suffixs.forEach(function (line) {
|
|
26
|
-
line.forEach(function (item) {
|
|
27
|
-
flatObject = _objectSpread(_defineProperty({}, item, line[0]), flatObject);
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
var suffixMappingJson = JSON.stringify(flatObject, null, 2);
|
|
31
|
-
var suffixMappingJs = "export default ".concat(suffixMappingJson, ";\n");
|
|
32
|
-
fs.writeFile('src/normalize_mappings/suffix-normalize-mapping.js', suffixMappingJs, 'utf-8', function (error) {
|
|
33
|
-
if (error) throw error;
|
|
34
|
-
console.warn('\x1b[32m', '✨ Sucessfully built suffix-normalize-mapping.js');
|
|
35
|
-
});
|
|
36
|
-
});
|