notations 0.0.26 → 0.0.30

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.
@@ -49,8 +49,8 @@ exports.BeatView = void 0;
49
49
  var TSU = __importStar(require("@panyam/tsutils"));
50
50
  var core_1 = require("../core");
51
51
  var shapes_1 = require("../shapes");
52
- var AtomViews_1 = require("./AtomViews");
53
- var Embelishments_1 = require("./Embelishments");
52
+ var atomviews_1 = require("./atomviews");
53
+ var embelishments_1 = require("./embelishments");
54
54
  var BeatView = (function (_super) {
55
55
  __extends(BeatView, _super);
56
56
  function BeatView(beat, rootElement, cycle, config) {
@@ -98,7 +98,7 @@ var BeatView = (function (_super) {
98
98
  }
99
99
  flatAtom.atom.beforeRest = lit.beforeRest;
100
100
  }
101
- var atomView = (0, AtomViews_1.createAtomView)(_this.rootElement, flatAtom);
101
+ var atomView = (0, atomviews_1.createAtomView)(_this.rootElement, flatAtom);
102
102
  atomView.depth = flatAtom.depth;
103
103
  _this.atomViews.push(atomView);
104
104
  }
@@ -195,7 +195,7 @@ var BeatView = (function (_super) {
195
195
  var beat = this.beat;
196
196
  var rootElement = this.rootElement.parentElement;
197
197
  if (beat.beatIndex == 0 && beat.barIndex == 0 && beat.instance == 0) {
198
- var emb = new Embelishments_1.BeatStartLines(this, rootElement);
198
+ var emb = new embelishments_1.BeatStartLines(this, rootElement);
199
199
  this._embelishments = [emb];
200
200
  }
201
201
  else {
@@ -203,11 +203,11 @@ var BeatView = (function (_super) {
203
203
  var bar = cycle.bars[beat.barIndex];
204
204
  if (beat.beatIndex == bar.beatCount - 1) {
205
205
  if (beat.barIndex == cycle.bars.length - 1) {
206
- var emb = new Embelishments_1.BeatEndLines(this, rootElement, 2);
206
+ var emb = new embelishments_1.BeatEndLines(this, rootElement, 2);
207
207
  this._embelishments = [emb];
208
208
  }
209
209
  else {
210
- var emb = new Embelishments_1.BeatEndLines(this, rootElement);
210
+ var emb = new embelishments_1.BeatEndLines(this, rootElement);
211
211
  this._embelishments = [emb];
212
212
  }
213
213
  }
@@ -4,5 +4,6 @@ export * from "./layouts";
4
4
  export * from "./notation";
5
5
  export * from "./parser";
6
6
  export * from "./shapes";
7
+ export * from "./loader";
7
8
  export * as Utils from "./utils";
8
9
  export * as Carnatic from "./carnatic";
package/lib/cjs/index.js CHANGED
@@ -29,6 +29,7 @@ __exportStar(require("./layouts"), exports);
29
29
  __exportStar(require("./notation"), exports);
30
30
  __exportStar(require("./parser"), exports);
31
31
  __exportStar(require("./shapes"), exports);
32
+ __exportStar(require("./loader"), exports);
32
33
  exports.Utils = __importStar(require("./utils"));
33
34
  exports.Carnatic = __importStar(require("./carnatic"));
34
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,iDAAiC;AACjC,uDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,2CAAyB;AACzB,2CAAyB;AACzB,iDAAiC;AACjC,uDAAuC"}
@@ -0,0 +1,4 @@
1
+ import * as G from "galore";
2
+ import { BeatLayout, Beat } from "./layouts";
3
+ import { Notation } from "./notation";
4
+ export declare function load(codeText: string, config?: any): [Notation, Map<number, Beat[][]>, Map<number, BeatLayout>, G.ParseError[]];
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
11
+ }) : function(o, v) {
12
+ o["default"] = v;
13
+ });
14
+ var __importStar = (this && this.__importStar) || function (mod) {
15
+ if (mod && mod.__esModule) return mod;
16
+ var result = {};
17
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
+ __setModuleDefault(result, mod);
19
+ return result;
20
+ };
21
+ var __values = (this && this.__values) || function(o) {
22
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
23
+ if (m) return m.call(o);
24
+ if (o && typeof o.length === "number") return {
25
+ next: function () {
26
+ if (o && i >= o.length) o = void 0;
27
+ return { value: o && o[i++], done: !o };
28
+ }
29
+ };
30
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
31
+ };
32
+ var __read = (this && this.__read) || function (o, n) {
33
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
34
+ if (!m) return o;
35
+ var i = m.call(o), r, ar = [], e;
36
+ try {
37
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
38
+ }
39
+ catch (error) { e = { error: error }; }
40
+ finally {
41
+ try {
42
+ if (r && !r.done && (m = i["return"])) m.call(i);
43
+ }
44
+ finally { if (e) throw e.error; }
45
+ }
46
+ return ar;
47
+ };
48
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
49
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
50
+ if (ar || !(i in from)) {
51
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
52
+ ar[i] = from[i];
53
+ }
54
+ }
55
+ return to.concat(ar || Array.prototype.slice.call(from));
56
+ };
57
+ Object.defineProperty(exports, "__esModule", { value: true });
58
+ exports.load = void 0;
59
+ var TSU = __importStar(require("@panyam/tsutils"));
60
+ var layouts_1 = require("./layouts");
61
+ var parser_1 = require("./parser");
62
+ var notation_1 = require("./notation");
63
+ function load(codeText, config) {
64
+ var e_1, _a, e_2, _b, e_3, _c, e_4, _d;
65
+ if (config === void 0) { config = {}; }
66
+ var beatsByLineRole = new Map();
67
+ var beatLayouts = new Map();
68
+ var errors = [];
69
+ var startTime = performance.now();
70
+ var notation = new notation_1.Notation();
71
+ var parser = new parser_1.Parser();
72
+ parser.parse(codeText);
73
+ var parseTime = performance.now();
74
+ try {
75
+ for (var _e = __values(parser.commands), _f = _e.next(); !_f.done; _f = _e.next()) {
76
+ var cmd = _f.value;
77
+ cmd.applyToNotation(notation);
78
+ }
79
+ }
80
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
81
+ finally {
82
+ try {
83
+ if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
84
+ }
85
+ finally { if (e_1) throw e_1.error; }
86
+ }
87
+ try {
88
+ for (var _g = __values(notation.blocks), _h = _g.next(); !_h.done; _h = _g.next()) {
89
+ var block = _h.value;
90
+ if (block.type == "Line") {
91
+ var line = block;
92
+ var layoutParams = notation.layoutParamsForLine(line) || null;
93
+ if (!line.isEmpty) {
94
+ TSU.assert(layoutParams != null, "Layout params for a non empty line *should* exist");
95
+ var beatLayout = beatLayouts.get(layoutParams.uuid) || null;
96
+ if (beatLayout == null) {
97
+ beatLayout = new layouts_1.BeatLayout(layoutParams);
98
+ beatLayouts.set(layoutParams.uuid, beatLayout);
99
+ }
100
+ var roleBeats = [];
101
+ beatsByLineRole.set(line.uuid, roleBeats);
102
+ var lineOffset = line.offset.divbyNum(layoutParams.beatDuration);
103
+ try {
104
+ for (var _j = (e_3 = void 0, __values(line.roles)), _k = _j.next(); !_k.done; _k = _j.next()) {
105
+ var role = _k.value;
106
+ var bb = new layouts_1.BeatsBuilder(role, layoutParams, lineOffset);
107
+ bb.addAtoms.apply(bb, __spreadArray([], __read(role.atoms), false));
108
+ roleBeats.push(bb.beats);
109
+ try {
110
+ for (var _l = (e_4 = void 0, __values(bb.beats)), _m = _l.next(); !_m.done; _m = _l.next()) {
111
+ var beat = _m.value;
112
+ beat.ensureUniformSpaces(layoutParams.beatDuration);
113
+ beatLayout.addBeat(beat);
114
+ }
115
+ }
116
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
117
+ finally {
118
+ try {
119
+ if (_m && !_m.done && (_d = _l.return)) _d.call(_l);
120
+ }
121
+ finally { if (e_4) throw e_4.error; }
122
+ }
123
+ }
124
+ }
125
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
126
+ finally {
127
+ try {
128
+ if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
129
+ }
130
+ finally { if (e_3) throw e_3.error; }
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
137
+ finally {
138
+ try {
139
+ if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
140
+ }
141
+ finally { if (e_2) throw e_2.error; }
142
+ }
143
+ if (config.log) {
144
+ var buildTime = performance.now();
145
+ console.log("V4 Document, Parse Time: " + (parseTime - startTime) + "ms, Build Time: " + (buildTime - parseTime) + "ms");
146
+ }
147
+ return [notation, beatsByLineRole, beatLayouts, errors];
148
+ }
149
+ exports.load = load;
150
+ //# sourceMappingURL=loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAuC;AAGvC,qCAA2D;AAC3D,mCAAkC;AAClC,uCAAsC;AAEtC,SAAgB,IAAI,CAClB,QAAgB,EAChB,MAAgB;;IAAhB,uBAAA,EAAA,WAAgB;IAEhB,IAAM,eAAe,GAAG,IAAI,GAAG,EAAoB,CAAC;IACpD,IAAM,WAAW,GAAG,IAAI,GAAG,EAAsB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,IAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;;wBACnE,KAAmB,IAAA,oBAAA,SAAA,IAAI,CAAC,KAAK,CAAA,CAAA,gBAAA,4BAAE;4BAA1B,IAAM,IAAI,WAAA;4BACb,IAAM,EAAE,GAAG,IAAI,sBAAY,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;4BAC5D,EAAE,CAAC,QAAQ,OAAX,EAAE,2BAAa,IAAI,CAAC,KAAK,WAAE;4BAC3B,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;;gCAGzB,KAAmB,IAAA,oBAAA,SAAA,EAAE,CAAC,KAAK,CAAA,CAAA,gBAAA,4BAAE;oCAAxB,IAAM,IAAI,WAAA;oCACb,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;oCACpD,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iCAC1B;;;;;;;;;yBACF;;;;;;;;;iBACF;aACF;SACF;;;;;;;;;IACD,IAAI,MAAM,CAAC,GAAG,EAAE;QACd,IAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,+BAA4B,SAAS,GAAG,SAAS,0BAAmB,SAAS,GAAG,SAAS,QAAI,CAAC,CAAC;KAC5G;IACD,OAAO,CAAC,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAC1D,CAAC;AAnDD,oBAmDC"}
@@ -27,8 +27,8 @@ var __values = (this && this.__values) || function(o) {
27
27
  import * as TSU from "@panyam/tsutils";
28
28
  import { AtomType, Syllable, Note } from "../core";
29
29
  import { Shape } from "../shapes";
30
- import { createAtomView } from "./AtomViews";
31
- import { BeatStartLines, BeatEndLines } from "./Embelishments";
30
+ import { createAtomView } from "./atomviews";
31
+ import { BeatStartLines, BeatEndLines } from "./embelishments";
32
32
  var BeatView = (function (_super) {
33
33
  __extends(BeatView, _super);
34
34
  function BeatView(beat, rootElement, cycle, config) {
@@ -4,5 +4,6 @@ export * from "./layouts";
4
4
  export * from "./notation";
5
5
  export * from "./parser";
6
6
  export * from "./shapes";
7
+ export * from "./loader";
7
8
  export * as Utils from "./utils";
8
9
  export * as Carnatic from "./carnatic";
package/lib/esm/index.js CHANGED
@@ -4,6 +4,7 @@ export * from "./layouts";
4
4
  export * from "./notation";
5
5
  export * from "./parser";
6
6
  export * from "./shapes";
7
+ export * from "./loader";
7
8
  export * as Utils from "./utils";
8
9
  export * as Carnatic from "./carnatic";
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as G from "galore";
2
+ import { BeatLayout, Beat } from "./layouts";
3
+ import { Notation } from "./notation";
4
+ export declare function load(codeText: string, config?: any): [Notation, Map<number, Beat[][]>, Map<number, BeatLayout>, G.ParseError[]];
@@ -0,0 +1,127 @@
1
+ var __values = (this && this.__values) || function(o) {
2
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
3
+ if (m) return m.call(o);
4
+ if (o && typeof o.length === "number") return {
5
+ next: function () {
6
+ if (o && i >= o.length) o = void 0;
7
+ return { value: o && o[i++], done: !o };
8
+ }
9
+ };
10
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
11
+ };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
28
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
29
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
30
+ if (ar || !(i in from)) {
31
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
32
+ ar[i] = from[i];
33
+ }
34
+ }
35
+ return to.concat(ar || Array.prototype.slice.call(from));
36
+ };
37
+ import * as TSU from "@panyam/tsutils";
38
+ import { BeatLayout, BeatsBuilder } from "./layouts";
39
+ import { Parser } from "./parser";
40
+ import { Notation } from "./notation";
41
+ export function load(codeText, config) {
42
+ var e_1, _a, e_2, _b, e_3, _c, e_4, _d;
43
+ if (config === void 0) { config = {}; }
44
+ var beatsByLineRole = new Map();
45
+ var beatLayouts = new Map();
46
+ var errors = [];
47
+ var startTime = performance.now();
48
+ var notation = new Notation();
49
+ var parser = new Parser();
50
+ parser.parse(codeText);
51
+ var parseTime = performance.now();
52
+ try {
53
+ for (var _e = __values(parser.commands), _f = _e.next(); !_f.done; _f = _e.next()) {
54
+ var cmd = _f.value;
55
+ cmd.applyToNotation(notation);
56
+ }
57
+ }
58
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
59
+ finally {
60
+ try {
61
+ if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
62
+ }
63
+ finally { if (e_1) throw e_1.error; }
64
+ }
65
+ try {
66
+ for (var _g = __values(notation.blocks), _h = _g.next(); !_h.done; _h = _g.next()) {
67
+ var block = _h.value;
68
+ if (block.type == "Line") {
69
+ var line = block;
70
+ var layoutParams = notation.layoutParamsForLine(line) || null;
71
+ if (!line.isEmpty) {
72
+ TSU.assert(layoutParams != null, "Layout params for a non empty line *should* exist");
73
+ var beatLayout = beatLayouts.get(layoutParams.uuid) || null;
74
+ if (beatLayout == null) {
75
+ beatLayout = new BeatLayout(layoutParams);
76
+ beatLayouts.set(layoutParams.uuid, beatLayout);
77
+ }
78
+ var roleBeats = [];
79
+ beatsByLineRole.set(line.uuid, roleBeats);
80
+ var lineOffset = line.offset.divbyNum(layoutParams.beatDuration);
81
+ try {
82
+ for (var _j = (e_3 = void 0, __values(line.roles)), _k = _j.next(); !_k.done; _k = _j.next()) {
83
+ var role = _k.value;
84
+ var bb = new BeatsBuilder(role, layoutParams, lineOffset);
85
+ bb.addAtoms.apply(bb, __spreadArray([], __read(role.atoms), false));
86
+ roleBeats.push(bb.beats);
87
+ try {
88
+ for (var _l = (e_4 = void 0, __values(bb.beats)), _m = _l.next(); !_m.done; _m = _l.next()) {
89
+ var beat = _m.value;
90
+ beat.ensureUniformSpaces(layoutParams.beatDuration);
91
+ beatLayout.addBeat(beat);
92
+ }
93
+ }
94
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
95
+ finally {
96
+ try {
97
+ if (_m && !_m.done && (_d = _l.return)) _d.call(_l);
98
+ }
99
+ finally { if (e_4) throw e_4.error; }
100
+ }
101
+ }
102
+ }
103
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
104
+ finally {
105
+ try {
106
+ if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
107
+ }
108
+ finally { if (e_3) throw e_3.error; }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
115
+ finally {
116
+ try {
117
+ if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
118
+ }
119
+ finally { if (e_2) throw e_2.error; }
120
+ }
121
+ if (config.log) {
122
+ var buildTime = performance.now();
123
+ console.log("V4 Document, Parse Time: " + (parseTime - startTime) + "ms, Build Time: " + (buildTime - parseTime) + "ms");
124
+ }
125
+ return [notation, beatsByLineRole, beatLayouts, errors];
126
+ }
127
+ //# sourceMappingURL=loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,GAAG,MAAM,iBAAiB,CAAC;AAGvC,OAAO,EAAE,UAAU,EAAQ,YAAY,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,UAAU,IAAI,CAClB,QAAgB,EAChB,MAAgB;;IAAhB,uBAAA,EAAA,WAAgB;IAEhB,IAAM,eAAe,GAAG,IAAI,GAAG,EAAoB,CAAC;IACpD,IAAM,WAAW,GAAG,IAAI,GAAG,EAAsB,CAAC;IAClD,IAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,IAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IACpC,IAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IAChC,IAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;IAC5B,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACvB,IAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;;QACpC,KAAkB,IAAA,KAAA,SAAA,MAAM,CA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E;4BAC3B,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;;gCAGzB,KAAmB,IAAA,oBAAA,SAAA,EAAE,CAAC,KAAK,CAAA,CAAA,gBAAA,4BAAE;oCAAxB,IAAM,IAAI,WAAA;oCACb,IAAI,CAAC,mBAAmB,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;oCACpD,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;iCAC1B;;;;;;;;;yBACF;;;;;;;;;iBACF;aACF;SACF;;;;;;;;;IACD,IAAI,MAAM,CAAC,GAAG,EAAE;QACd,IAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,+BAA4B,SAAS,GAAG,SAAS,0BAAmB,SAAS,GAAG,SAAS,QAAI,CAAC,CAAC;KAC5G;IACD,OAAO,CAAC,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAC1D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notations",
3
- "version": "0.0.26",
3
+ "version": "0.0.30",
4
4
  "author": "Sriram Panyam",
5
5
  "description": "A package for modelling, parsing, laying out carnatic musical notation",
6
6
  "homepage": "https://github.com/panyam/notations#readme",