chordsheetjs 4.8.1 → 5.1.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.
@@ -1,13 +1,11 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
3
  var Handlebars = require("handlebars");
6
4
 
7
5
  var template = Handlebars.template,
8
6
  templates = Handlebars.templates = Handlebars.templates || {};
9
7
  templates['html_div_formatter'] = template({
10
- "1": function _(container, depth0, helpers, partials, data, blockParams, depths) {
8
+ "1": function _(container, depth0, helpers, partials, data, blockParams) {
11
9
  var stack1,
12
10
  alias1 = depth0 != null ? depth0 : container.nullContext || {},
13
11
  lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -21,7 +19,7 @@ templates['html_div_formatter'] = template({
21
19
  return ((stack1 = lookupProperty(helpers, "if").call(alias1, depth0 != null ? lookupProperty(depth0, "title") : depth0, {
22
20
  "name": "if",
23
21
  "hash": {},
24
- "fn": container.program(2, data, 0, blockParams, depths),
22
+ "fn": container.program(2, data, 0, blockParams),
25
23
  "inverse": container.noop,
26
24
  "data": data,
27
25
  "blockParams": blockParams,
@@ -38,7 +36,7 @@ templates['html_div_formatter'] = template({
38
36
  })) != null ? stack1 : "") + ((stack1 = lookupProperty(helpers, "if").call(alias1, depth0 != null ? lookupProperty(depth0, "subtitle") : depth0, {
39
37
  "name": "if",
40
38
  "hash": {},
41
- "fn": container.program(4, data, 0, blockParams, depths),
39
+ "fn": container.program(4, data, 0, blockParams),
42
40
  "inverse": container.noop,
43
41
  "data": data,
44
42
  "blockParams": blockParams,
@@ -55,7 +53,7 @@ templates['html_div_formatter'] = template({
55
53
  })) != null ? stack1 : "") + "<div class=\"chord-sheet\">" + ((stack1 = lookupProperty(helpers, "each").call(alias1, depth0 != null ? lookupProperty(depth0, "bodyParagraphs") : depth0, {
56
54
  "name": "each",
57
55
  "hash": {},
58
- "fn": container.program(6, data, 1, blockParams, depths),
56
+ "fn": container.program(6, data, 1, blockParams),
59
57
  "inverse": container.noop,
60
58
  "data": data,
61
59
  "blockParams": blockParams,
@@ -123,7 +121,7 @@ templates['html_div_formatter'] = template({
123
121
  }
124
122
  }) : helper)) + "</h2>";
125
123
  },
126
- "6": function _(container, depth0, helpers, partials, data, blockParams, depths) {
124
+ "6": function _(container, depth0, helpers, partials, data, blockParams) {
127
125
  var stack1,
128
126
  alias1 = depth0 != null ? depth0 : container.nullContext || {},
129
127
  lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -152,7 +150,7 @@ templates['html_div_formatter'] = template({
152
150
  })) + "\">" + ((stack1 = lookupProperty(helpers, "each").call(alias1, depth0 != null ? lookupProperty(depth0, "lines") : depth0, {
153
151
  "name": "each",
154
152
  "hash": {},
155
- "fn": container.program(7, data, 1, blockParams, depths),
153
+ "fn": container.program(7, data, 1, blockParams),
156
154
  "inverse": container.noop,
157
155
  "data": data,
158
156
  "blockParams": blockParams,
@@ -168,7 +166,7 @@ templates['html_div_formatter'] = template({
168
166
  }
169
167
  })) != null ? stack1 : "") + "</div>";
170
168
  },
171
- "7": function _(container, depth0, helpers, partials, data, blockParams, depths) {
169
+ "7": function _(container, depth0, helpers, partials, data, blockParams) {
172
170
  var stack1,
173
171
  alias1 = depth0 != null ? depth0 : container.nullContext || {},
174
172
  lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -197,7 +195,7 @@ templates['html_div_formatter'] = template({
197
195
  }), {
198
196
  "name": "if",
199
197
  "hash": {},
200
- "fn": container.program(8, data, 0, blockParams, depths),
198
+ "fn": container.program(8, data, 0, blockParams),
201
199
  "inverse": container.noop,
202
200
  "data": data,
203
201
  "blockParams": blockParams,
@@ -213,7 +211,7 @@ templates['html_div_formatter'] = template({
213
211
  }
214
212
  })) != null ? stack1 : "";
215
213
  },
216
- "8": function _(container, depth0, helpers, partials, data, blockParams, depths) {
214
+ "8": function _(container, depth0, helpers, partials, data, blockParams) {
217
215
  var stack1,
218
216
  alias1 = depth0 != null ? depth0 : container.nullContext || {},
219
217
  lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -242,7 +240,7 @@ templates['html_div_formatter'] = template({
242
240
  })) + "\">" + ((stack1 = lookupProperty(helpers, "each").call(alias1, depth0 != null ? lookupProperty(depth0, "items") : depth0, {
243
241
  "name": "each",
244
242
  "hash": {},
245
- "fn": container.program(9, data, 1, blockParams, depths),
243
+ "fn": container.program(9, data, 1, blockParams),
246
244
  "inverse": container.noop,
247
245
  "data": data,
248
246
  "blockParams": blockParams,
@@ -258,7 +256,7 @@ templates['html_div_formatter'] = template({
258
256
  }
259
257
  })) != null ? stack1 : "") + "</div>";
260
258
  },
261
- "9": function _(container, depth0, helpers, partials, data, blockParams, depths) {
259
+ "9": function _(container, depth0, helpers, partials, data, blockParams) {
262
260
  var stack1,
263
261
  alias1 = depth0 != null ? depth0 : container.nullContext || {},
264
262
  lookupProperty = container.lookupProperty || function (parent, propertyName) {
@@ -287,7 +285,7 @@ templates['html_div_formatter'] = template({
287
285
  }), {
288
286
  "name": "if",
289
287
  "hash": {},
290
- "fn": container.program(10, data, 0, blockParams, depths),
288
+ "fn": container.program(10, data, 0, blockParams),
291
289
  "inverse": container.noop,
292
290
  "data": data,
293
291
  "blockParams": blockParams,
@@ -319,7 +317,7 @@ templates['html_div_formatter'] = template({
319
317
  }), {
320
318
  "name": "if",
321
319
  "hash": {},
322
- "fn": container.program(12, data, 0, blockParams, depths),
320
+ "fn": container.program(12, data, 0, blockParams),
323
321
  "inverse": container.noop,
324
322
  "data": data,
325
323
  "blockParams": blockParams,
@@ -351,7 +349,7 @@ templates['html_div_formatter'] = template({
351
349
  }), {
352
350
  "name": "if",
353
351
  "hash": {},
354
- "fn": container.program(15, data, 0, blockParams, depths),
352
+ "fn": container.program(15, data, 0, blockParams),
355
353
  "inverse": container.noop,
356
354
  "data": data,
357
355
  "blockParams": blockParams,
@@ -367,12 +365,12 @@ templates['html_div_formatter'] = template({
367
365
  }
368
366
  })) != null ? stack1 : "");
369
367
  },
370
- "10": function _(container, depth0, helpers, partials, data) {
371
- var helper,
368
+ "10": function _(container, depth0, helpers, partials, data, blockParams) {
369
+ var stack1,
370
+ helper,
372
371
  alias1 = depth0 != null ? depth0 : container.nullContext || {},
373
372
  alias2 = container.hooks.helperMissing,
374
- alias3 = "function",
375
- alias4 = container.escapeExpression,
373
+ alias3 = container.escapeExpression,
376
374
  lookupProperty = container.lookupProperty || function (parent, propertyName) {
377
375
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
378
376
  return parent[propertyName];
@@ -381,10 +379,11 @@ templates['html_div_formatter'] = template({
381
379
  return undefined;
382
380
  };
383
381
 
384
- return "<div class=\"column\"><div class=\"chord\">" + alias4((helper = (helper = lookupProperty(helpers, "chords") || (depth0 != null ? lookupProperty(depth0, "chords") : depth0)) != null ? helper : alias2, _typeof(helper) === alias3 ? helper.call(alias1, {
385
- "name": "chords",
382
+ return "<div class=\"column\"><div class=\"chord\">" + alias3((lookupProperty(helpers, "renderChord") || depth0 && lookupProperty(depth0, "renderChord") || alias2).call(alias1, depth0 != null ? lookupProperty(depth0, "chords") : depth0, (stack1 = blockParams[3][0]) != null ? lookupProperty(stack1, "key") : stack1, (stack1 = (stack1 = data && lookupProperty(data, "root")) && lookupProperty(stack1, "song")) && lookupProperty(stack1, "key"), {
383
+ "name": "renderChord",
386
384
  "hash": {},
387
385
  "data": data,
386
+ "blockParams": blockParams,
388
387
  "loc": {
389
388
  "start": {
390
389
  "line": 18,
@@ -392,21 +391,22 @@ templates['html_div_formatter'] = template({
392
391
  },
393
392
  "end": {
394
393
  "line": 18,
395
- "column": 67
394
+ "column": 103
396
395
  }
397
396
  }
398
- }) : helper)) + "</div><div class=\"lyrics\">" + alias4((helper = (helper = lookupProperty(helpers, "lyrics") || (depth0 != null ? lookupProperty(depth0, "lyrics") : depth0)) != null ? helper : alias2, _typeof(helper) === alias3 ? helper.call(alias1, {
397
+ })) + "</div><div class=\"lyrics\">" + alias3((helper = (helper = lookupProperty(helpers, "lyrics") || (depth0 != null ? lookupProperty(depth0, "lyrics") : depth0)) != null ? helper : alias2, typeof helper === "function" ? helper.call(alias1, {
399
398
  "name": "lyrics",
400
399
  "hash": {},
401
400
  "data": data,
401
+ "blockParams": blockParams,
402
402
  "loc": {
403
403
  "start": {
404
404
  "line": 18,
405
- "column": 93
405
+ "column": 129
406
406
  },
407
407
  "end": {
408
408
  "line": 18,
409
- "column": 103
409
+ "column": 139
410
410
  }
411
411
  }
412
412
  }) : helper)) + "</div></div>";
@@ -482,7 +482,7 @@ templates['html_div_formatter'] = template({
482
482
  }
483
483
  }) : helper)) + "</div>";
484
484
  },
485
- "15": function _(container, depth0, helpers, partials, data, blockParams, depths) {
485
+ "15": function _(container, depth0, helpers, partials, data, blockParams) {
486
486
  var stack1,
487
487
  lookupProperty = container.lookupProperty || function (parent, propertyName) {
488
488
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -492,7 +492,7 @@ templates['html_div_formatter'] = template({
492
492
  return undefined;
493
493
  };
494
494
 
495
- return "<div class=\"column\"><div class=\"chord\"></div><div class=\"lyrics\">" + container.escapeExpression((lookupProperty(helpers, "evaluate") || depth0 && lookupProperty(depth0, "evaluate") || container.hooks.helperMissing).call(depth0 != null ? depth0 : container.nullContext || {}, blockParams[1][0], (stack1 = depths[4] != null ? lookupProperty(depths[4], "song") : depths[4]) != null ? lookupProperty(stack1, "metadata") : stack1, {
495
+ return "<div class=\"column\"><div class=\"chord\"></div><div class=\"lyrics\">" + container.escapeExpression((lookupProperty(helpers, "evaluate") || depth0 && lookupProperty(depth0, "evaluate") || container.hooks.helperMissing).call(depth0 != null ? depth0 : container.nullContext || {}, blockParams[1][0], (stack1 = (stack1 = data && lookupProperty(data, "root")) && lookupProperty(stack1, "song")) && lookupProperty(stack1, "metadata"), {
496
496
  "name": "evaluate",
497
497
  "hash": {},
498
498
  "data": data,
@@ -504,13 +504,13 @@ templates['html_div_formatter'] = template({
504
504
  },
505
505
  "end": {
506
506
  "line": 28,
507
- "column": 126
507
+ "column": 120
508
508
  }
509
509
  }
510
510
  })) + "</div></div>";
511
511
  },
512
512
  "compiler": [8, ">= 4.3.0"],
513
- "main": function main(container, depth0, helpers, partials, data, blockParams, depths) {
513
+ "main": function main(container, depth0, helpers, partials, data, blockParams) {
514
514
  var stack1,
515
515
  lookupProperty = container.lookupProperty || function (parent, propertyName) {
516
516
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
@@ -523,7 +523,7 @@ templates['html_div_formatter'] = template({
523
523
  return (stack1 = lookupProperty(helpers, "with").call(depth0 != null ? depth0 : container.nullContext || {}, depth0 != null ? lookupProperty(depth0, "song") : depth0, {
524
524
  "name": "with",
525
525
  "hash": {},
526
- "fn": container.program(1, data, 0, blockParams, depths),
526
+ "fn": container.program(1, data, 0, blockParams),
527
527
  "inverse": container.noop,
528
528
  "data": data,
529
529
  "blockParams": blockParams,
@@ -540,6 +540,5 @@ templates['html_div_formatter'] = template({
540
540
  })) != null ? stack1 : "";
541
541
  },
542
542
  "useData": true,
543
- "useDepths": true,
544
543
  "useBlockParams": true
545
544
  });
@@ -406,8 +406,8 @@ templates['html_table_formatter'] = template({
406
406
  }
407
407
  })) != null ? stack1 : "";
408
408
  },
409
- "12": function _(container, depth0, helpers, partials, data) {
410
- var helper,
409
+ "12": function _(container, depth0, helpers, partials, data, blockParams) {
410
+ var stack1,
411
411
  lookupProperty = container.lookupProperty || function (parent, propertyName) {
412
412
  if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
413
413
  return parent[propertyName];
@@ -416,10 +416,11 @@ templates['html_table_formatter'] = template({
416
416
  return undefined;
417
417
  };
418
418
 
419
- return "<td class=\"chord\">" + container.escapeExpression((helper = (helper = lookupProperty(helpers, "chords") || (depth0 != null ? lookupProperty(depth0, "chords") : depth0)) != null ? helper : container.hooks.helperMissing, typeof helper === "function" ? helper.call(depth0 != null ? depth0 : container.nullContext || {}, {
420
- "name": "chords",
419
+ return "<td class=\"chord\">" + container.escapeExpression((lookupProperty(helpers, "renderChord") || depth0 && lookupProperty(depth0, "renderChord") || container.hooks.helperMissing).call(depth0 != null ? depth0 : container.nullContext || {}, depth0 != null ? lookupProperty(depth0, "chords") : depth0, (stack1 = blockParams[4][0]) != null ? lookupProperty(stack1, "key") : stack1, (stack1 = (stack1 = data && lookupProperty(data, "root")) && lookupProperty(stack1, "song")) && lookupProperty(stack1, "key"), {
420
+ "name": "renderChord",
421
421
  "hash": {},
422
422
  "data": data,
423
+ "blockParams": blockParams,
423
424
  "loc": {
424
425
  "start": {
425
426
  "line": 21,
@@ -427,10 +428,10 @@ templates['html_table_formatter'] = template({
427
428
  },
428
429
  "end": {
429
430
  "line": 21,
430
- "column": 52
431
+ "column": 88
431
432
  }
432
433
  }
433
- }) : helper)) + "</td>";
434
+ })) + "</td>";
434
435
  },
435
436
  "14": function _(container, depth0, helpers, partials, data, blockParams, depths) {
436
437
  var stack1,
@@ -9,6 +9,8 @@ var _chord_lyrics_pair = _interopRequireDefault(require("../chord_sheet/chord_ly
9
9
 
10
10
  var _tag = _interopRequireDefault(require("../chord_sheet/tag"));
11
11
 
12
+ var _helpers = require("../helpers");
13
+
12
14
  var _utilities = require("../utilities");
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -36,23 +38,26 @@ var TextFormatter = /*#__PURE__*/function () {
36
38
  * @returns {string} the chord sheet
37
39
  */
38
40
  function format(song) {
39
- return [this.formatHeader(song), this.formatParagraphs(song)].join('');
41
+ this.song = song;
42
+ return [this.formatHeader(), this.formatParagraphs()].join('');
40
43
  }
41
44
  }, {
42
45
  key: "formatHeader",
43
- value: function formatHeader(song) {
44
- var title = song.title,
45
- subtitle = song.subtitle;
46
+ value: function formatHeader() {
47
+ var _this$song = this.song,
48
+ title = _this$song.title,
49
+ subtitle = _this$song.subtitle;
46
50
  var separator = title || subtitle ? '\n' : '';
47
51
  return [this.formatTitle(title), this.formatSubTitle(subtitle), separator].join('');
48
52
  }
49
53
  }, {
50
54
  key: "formatParagraphs",
51
- value: function formatParagraphs(song) {
55
+ value: function formatParagraphs() {
52
56
  var _this = this;
53
57
 
54
- var bodyParagraphs = song.bodyParagraphs,
55
- metadata = song.metadata;
58
+ var _this$song2 = this.song,
59
+ bodyParagraphs = _this$song2.bodyParagraphs,
60
+ metadata = _this$song2.metadata;
56
61
  return bodyParagraphs.map(function (paragraph) {
57
62
  return _this.formatParagraph(paragraph, metadata);
58
63
  }).join('\n\n');
@@ -107,9 +112,9 @@ var TextFormatter = /*#__PURE__*/function () {
107
112
  }
108
113
  }, {
109
114
  key: "chordLyricsPairLength",
110
- value: function chordLyricsPairLength(chordLyricsPair) {
111
- var chords = chordLyricsPair.chords,
112
- lyrics = chordLyricsPair.lyrics;
115
+ value: function chordLyricsPairLength(chordLyricsPair, line) {
116
+ var chords = (0, _helpers.renderChord)(chordLyricsPair.chords, line.key, this.song.key);
117
+ var lyrics = chordLyricsPair.lyrics;
113
118
  var chordsLength = (chords || '').length;
114
119
  var lyricsLength = (lyrics || '').length;
115
120
 
@@ -121,13 +126,14 @@ var TextFormatter = /*#__PURE__*/function () {
121
126
  }
122
127
  }, {
123
128
  key: "formatItemTop",
124
- value: function formatItemTop(item) {
129
+ value: function formatItemTop(item, metadata, line) {
125
130
  if (item instanceof _tag["default"] && item.isRenderable()) {
126
131
  return (0, _utilities.padLeft)('', item.value);
127
132
  }
128
133
 
129
134
  if (item instanceof _chord_lyrics_pair["default"]) {
130
- return (0, _utilities.padLeft)(item.chords || '', this.chordLyricsPairLength(item));
135
+ var chords = (0, _helpers.renderChord)(item.chords, line.key, this.song.key);
136
+ return (0, _utilities.padLeft)(chords, this.chordLyricsPairLength(item, line));
131
137
  }
132
138
 
133
139
  return '';
@@ -147,18 +153,18 @@ var TextFormatter = /*#__PURE__*/function () {
147
153
  var _this3 = this;
148
154
 
149
155
  return line.items.map(function (item) {
150
- return formatter.call(_this3, item, metadata);
156
+ return formatter.call(_this3, item, metadata, line);
151
157
  }).join('');
152
158
  }
153
159
  }, {
154
160
  key: "formatItemBottom",
155
- value: function formatItemBottom(item, metadata) {
161
+ value: function formatItemBottom(item, metadata, line) {
156
162
  if (item instanceof _tag["default"] && item.isRenderable()) {
157
163
  return item.value;
158
164
  }
159
165
 
160
166
  if (item instanceof _chord_lyrics_pair["default"]) {
161
- return (0, _utilities.padLeft)(item.lyrics, this.chordLyricsPairLength(item));
167
+ return (0, _utilities.padLeft)(item.lyrics, this.chordLyricsPairLength(item, line));
162
168
  }
163
169
 
164
170
  if (typeof item.evaluate === 'function') {
@@ -8,6 +8,8 @@ var _tag = _interopRequireDefault(require("./chord_sheet/tag"));
8
8
 
9
9
  var _constants = require("./constants");
10
10
 
11
+ var _helpers = require("./helpers");
12
+
11
13
  var _utilities = require("./utilities");
12
14
 
13
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -76,4 +78,6 @@ _handlebars["default"].registerHelper('evaluate', function (item, metadata) {
76
78
  }
77
79
 
78
80
  return item.evaluate(metadata);
79
- });
81
+ });
82
+
83
+ _handlebars["default"].registerHelper('renderChord', _helpers.renderChord);
package/lib/helpers.js ADDED
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderChord = renderChord;
7
+
8
+ var _chord = _interopRequireDefault(require("./chord"));
9
+
10
+ var _utilities = require("./utilities");
11
+
12
+ var _key = _interopRequireDefault(require("./key"));
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ function transposeDistance(lineKey, songKey) {
17
+ if (/^\d+$/.test(lineKey)) {
18
+ return parseInt(lineKey, 10);
19
+ }
20
+
21
+ return _key["default"].distance(songKey, lineKey);
22
+ }
23
+ /* eslint import/prefer-default-export: 0 */
24
+
25
+
26
+ function renderChord(chord, lineKey, songKey) {
27
+ if ((0, _utilities.presence)(chord) && (0, _utilities.presence)(lineKey) && (0, _utilities.presence)(songKey)) {
28
+ return _chord["default"].parse(chord).transpose(transposeDistance(lineKey, songKey)).useModifier(lineKey.modifier).toString();
29
+ }
30
+
31
+ return chord;
32
+ }
package/lib/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -75,6 +77,12 @@ Object.defineProperty(exports, "INDETERMINATE", {
75
77
  return _constants.INDETERMINATE;
76
78
  }
77
79
  });
80
+ Object.defineProperty(exports, "Key", {
81
+ enumerable: true,
82
+ get: function get() {
83
+ return _key["default"];
84
+ }
85
+ });
78
86
  Object.defineProperty(exports, "Line", {
79
87
  enumerable: true,
80
88
  get: function get() {
@@ -99,18 +107,36 @@ Object.defineProperty(exports, "NONE", {
99
107
  return _constants.NONE;
100
108
  }
101
109
  });
110
+ Object.defineProperty(exports, "NUMERIC", {
111
+ enumerable: true,
112
+ get: function get() {
113
+ return _constants.NUMERIC;
114
+ }
115
+ });
102
116
  Object.defineProperty(exports, "Paragraph", {
103
117
  enumerable: true,
104
118
  get: function get() {
105
119
  return _paragraph["default"];
106
120
  }
107
121
  });
122
+ Object.defineProperty(exports, "SYMBOL", {
123
+ enumerable: true,
124
+ get: function get() {
125
+ return _constants.SYMBOL;
126
+ }
127
+ });
108
128
  Object.defineProperty(exports, "Song", {
109
129
  enumerable: true,
110
130
  get: function get() {
111
131
  return _song["default"];
112
132
  }
113
133
  });
134
+ Object.defineProperty(exports, "TAB", {
135
+ enumerable: true,
136
+ get: function get() {
137
+ return _constants.TAB;
138
+ }
139
+ });
114
140
  Object.defineProperty(exports, "Tag", {
115
141
  enumerable: true,
116
142
  get: function get() {
@@ -145,13 +171,7 @@ exports["default"] = void 0;
145
171
  Object.defineProperty(exports, "parseChord", {
146
172
  enumerable: true,
147
173
  get: function get() {
148
- return _parse_chord["default"];
149
- }
150
- });
151
- Object.defineProperty(exports, "toChordSymbol", {
152
- enumerable: true,
153
- get: function get() {
154
- return _to_chord_symbol["default"];
174
+ return _chord.parseChord;
155
175
  }
156
176
  });
157
177
 
@@ -193,11 +213,13 @@ var _chord_sheet_serializer = _interopRequireDefault(require("./chord_sheet_seri
193
213
 
194
214
  var _constants = require("./constants");
195
215
 
196
- var _chord = _interopRequireDefault(require("./chord"));
216
+ var _chord = _interopRequireWildcard(require("./chord"));
217
+
218
+ var _key = _interopRequireDefault(require("./key"));
197
219
 
198
- var _parse_chord = _interopRequireDefault(require("./parse_chord"));
220
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
199
221
 
200
- var _to_chord_symbol = _interopRequireDefault(require("./to_chord_symbol"));
222
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
201
223
 
202
224
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
203
225
 
@@ -222,6 +244,7 @@ var _default = {
222
244
  ChordSheetSerializer: _chord_sheet_serializer["default"],
223
245
  CHORUS: _constants.CHORUS,
224
246
  INDETERMINATE: _constants.INDETERMINATE,
247
+ TAB: _constants.TAB,
225
248
  VERSE: _constants.VERSE,
226
249
  NONE: _constants.NONE
227
250
  };