notations 0.0.46 → 0.0.49

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.
Files changed (113) hide show
  1. package/lib/cjs/beats.d.ts +34 -69
  2. package/lib/cjs/beats.js +178 -439
  3. package/lib/cjs/beats.js.map +1 -1
  4. package/lib/cjs/beatutils.d.ts +3 -0
  5. package/lib/cjs/beatutils.js +64 -0
  6. package/lib/cjs/beatutils.js.map +1 -0
  7. package/lib/cjs/beatview.d.ts +18 -0
  8. package/lib/cjs/beatview.js +62 -0
  9. package/lib/cjs/beatview.js.map +1 -0
  10. package/lib/cjs/carnatic/LineView.d.ts +2 -7
  11. package/lib/cjs/carnatic/LineView.js +13 -31
  12. package/lib/cjs/carnatic/LineView.js.map +1 -1
  13. package/lib/cjs/carnatic/NotationView.d.ts +8 -7
  14. package/lib/cjs/carnatic/NotationView.js +76 -153
  15. package/lib/cjs/carnatic/NotationView.js.map +1 -1
  16. package/lib/cjs/carnatic/atomviews.js +149 -287
  17. package/lib/cjs/carnatic/atomviews.js.map +1 -1
  18. package/lib/cjs/carnatic/beatviews.d.ts +4 -13
  19. package/lib/cjs/carnatic/beatviews.js +23 -118
  20. package/lib/cjs/carnatic/beatviews.js.map +1 -1
  21. package/lib/cjs/carnatic/embelishments.d.ts +1 -1
  22. package/lib/cjs/carnatic/embelishments.js +189 -283
  23. package/lib/cjs/carnatic/embelishments.js.map +1 -1
  24. package/lib/cjs/carnatic/gamakas.js +15 -47
  25. package/lib/cjs/carnatic/gamakas.js.map +1 -1
  26. package/lib/cjs/commands.js +111 -271
  27. package/lib/cjs/commands.js.map +1 -1
  28. package/lib/cjs/core.d.ts +14 -1
  29. package/lib/cjs/core.js +291 -477
  30. package/lib/cjs/core.js.map +1 -1
  31. package/lib/cjs/cycle.js +175 -367
  32. package/lib/cjs/cycle.js.map +1 -1
  33. package/lib/cjs/entity.js +48 -102
  34. package/lib/cjs/entity.js.map +1 -1
  35. package/lib/cjs/grids.d.ts +125 -0
  36. package/lib/cjs/grids.js +550 -0
  37. package/lib/cjs/grids.js.map +1 -0
  38. package/lib/cjs/iterators.js +96 -234
  39. package/lib/cjs/iterators.js.map +1 -1
  40. package/lib/cjs/layouts.d.ts +1 -1
  41. package/lib/cjs/layouts.js +62 -98
  42. package/lib/cjs/layouts.js.map +1 -1
  43. package/lib/cjs/loader.d.ts +2 -2
  44. package/lib/cjs/loader.js +23 -123
  45. package/lib/cjs/loader.js.map +1 -1
  46. package/lib/cjs/notation.d.ts +0 -3
  47. package/lib/cjs/notation.js +139 -241
  48. package/lib/cjs/notation.js.map +1 -1
  49. package/lib/cjs/parser.d.ts +2 -0
  50. package/lib/cjs/parser.js +225 -214
  51. package/lib/cjs/parser.js.map +1 -1
  52. package/lib/cjs/shapes.js +149 -283
  53. package/lib/cjs/shapes.js.map +1 -1
  54. package/lib/cjs/utils.d.ts +8 -0
  55. package/lib/cjs/utils.js +60 -55
  56. package/lib/cjs/utils.js.map +1 -1
  57. package/lib/esm/beats.d.ts +34 -69
  58. package/lib/esm/beats.js +172 -438
  59. package/lib/esm/beats.js.map +1 -1
  60. package/lib/esm/beatutils.d.ts +3 -0
  61. package/lib/esm/beatutils.js +37 -0
  62. package/lib/esm/beatutils.js.map +1 -0
  63. package/lib/esm/beatview.d.ts +18 -0
  64. package/lib/esm/beatview.js +35 -0
  65. package/lib/esm/beatview.js.map +1 -0
  66. package/lib/esm/carnatic/LineView.d.ts +2 -7
  67. package/lib/esm/carnatic/LineView.js +12 -31
  68. package/lib/esm/carnatic/LineView.js.map +1 -1
  69. package/lib/esm/carnatic/NotationView.d.ts +8 -7
  70. package/lib/esm/carnatic/NotationView.js +74 -152
  71. package/lib/esm/carnatic/NotationView.js.map +1 -1
  72. package/lib/esm/carnatic/atomviews.js +144 -284
  73. package/lib/esm/carnatic/atomviews.js.map +1 -1
  74. package/lib/esm/carnatic/beatviews.d.ts +4 -13
  75. package/lib/esm/carnatic/beatviews.js +21 -94
  76. package/lib/esm/carnatic/beatviews.js.map +1 -1
  77. package/lib/esm/carnatic/embelishments.d.ts +1 -1
  78. package/lib/esm/carnatic/embelishments.js +187 -296
  79. package/lib/esm/carnatic/embelishments.js.map +1 -1
  80. package/lib/esm/carnatic/gamakas.js +14 -48
  81. package/lib/esm/carnatic/gamakas.js.map +1 -1
  82. package/lib/esm/commands.js +100 -271
  83. package/lib/esm/commands.js.map +1 -1
  84. package/lib/esm/core.d.ts +14 -1
  85. package/lib/esm/core.js +287 -484
  86. package/lib/esm/core.js.map +1 -1
  87. package/lib/esm/cycle.js +172 -367
  88. package/lib/esm/cycle.js.map +1 -1
  89. package/lib/esm/entity.js +48 -104
  90. package/lib/esm/entity.js.map +1 -1
  91. package/lib/esm/grids.d.ts +125 -0
  92. package/lib/esm/grids.js +517 -0
  93. package/lib/esm/grids.js.map +1 -0
  94. package/lib/esm/iterators.js +93 -235
  95. package/lib/esm/iterators.js.map +1 -1
  96. package/lib/esm/layouts.d.ts +1 -1
  97. package/lib/esm/layouts.js +60 -97
  98. package/lib/esm/layouts.js.map +1 -1
  99. package/lib/esm/loader.d.ts +2 -2
  100. package/lib/esm/loader.js +20 -120
  101. package/lib/esm/loader.js.map +1 -1
  102. package/lib/esm/notation.d.ts +0 -3
  103. package/lib/esm/notation.js +135 -242
  104. package/lib/esm/notation.js.map +1 -1
  105. package/lib/esm/parser.d.ts +2 -0
  106. package/lib/esm/parser.js +220 -210
  107. package/lib/esm/parser.js.map +1 -1
  108. package/lib/esm/shapes.js +148 -288
  109. package/lib/esm/shapes.js.map +1 -1
  110. package/lib/esm/utils.d.ts +8 -0
  111. package/lib/esm/utils.js +55 -51
  112. package/lib/esm/utils.js.map +1 -1
  113. package/package.json +18 -17
@@ -1,19 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
3
  if (k2 === undefined) k2 = k;
19
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -37,178 +22,153 @@ var __importStar = (this && this.__importStar) || function (mod) {
37
22
  __setModuleDefault(result, mod);
38
23
  return result;
39
24
  };
40
- var __values = (this && this.__values) || function(o) {
41
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
42
- if (m) return m.call(o);
43
- if (o && typeof o.length === "number") return {
44
- next: function () {
45
- if (o && i >= o.length) o = void 0;
46
- return { value: o && o[i++], done: !o };
47
- }
48
- };
49
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
50
- };
51
25
  Object.defineProperty(exports, "__esModule", { value: true });
52
26
  exports.Jaaru = exports.Orikkai = exports.Odukkal = exports.Vaali = exports.Kandippu = exports.Raavi = exports.Spuritham = exports.Prathyagatham = exports.Nokku = exports.Kampitham = exports.BeatEndLines = exports.BeatStartLines = exports.LabelEmbelishment = exports.OctaveIndicator = exports.LeafAtomViewEmbelishment = void 0;
53
- var TSU = __importStar(require("@panyam/tsutils"));
54
- var shapes_1 = require("../shapes");
55
- var LeafAtomViewEmbelishment = (function (_super) {
56
- __extends(LeafAtomViewEmbelishment, _super);
57
- function LeafAtomViewEmbelishment(atomView) {
58
- var _this = _super.call(this) || this;
59
- _this.atomView = atomView;
60
- return _this;
61
- }
62
- return LeafAtomViewEmbelishment;
63
- }(shapes_1.Embelishment));
27
+ const TSU = __importStar(require("@panyam/tsutils"));
28
+ const shapes_1 = require("../shapes");
29
+ class LeafAtomViewEmbelishment extends shapes_1.Embelishment {
30
+ constructor(atomView) {
31
+ super();
32
+ this.atomView = atomView;
33
+ }
34
+ }
64
35
  exports.LeafAtomViewEmbelishment = LeafAtomViewEmbelishment;
65
- var OctaveIndicator = (function (_super) {
66
- __extends(OctaveIndicator, _super);
67
- function OctaveIndicator(noteView, note) {
68
- var _this = _super.call(this, noteView) || this;
69
- _this.noteView = noteView;
70
- _this.note = note;
71
- _this.dotRadius = 1;
72
- _this.dotSpacing = 2.5;
73
- var rootElem = _this.noteView.embRoot();
74
- var numDots = Math.abs(note.octave);
75
- _this.dotsElem = TSU.DOM.createSVGNode("g", {
36
+ class OctaveIndicator extends LeafAtomViewEmbelishment {
37
+ constructor(noteView, note) {
38
+ super(noteView);
39
+ this.noteView = noteView;
40
+ this.note = note;
41
+ this.dotRadius = 1;
42
+ this.dotSpacing = 2.5;
43
+ const rootElem = this.noteView.embRoot();
44
+ const numDots = Math.abs(note.octave);
45
+ this.dotsElem = TSU.DOM.createSVGNode("g", {
76
46
  doc: document,
77
47
  parent: rootElem,
78
48
  attrs: {
79
- width: _this.dotRadius * 2 * numDots + (numDots - 1) * _this.dotSpacing,
80
- height: _this.dotRadius * 2,
81
- source: "atom" + _this.noteView.leafAtom.uuid,
49
+ width: this.dotRadius * 2 * numDots + (numDots - 1) * this.dotSpacing,
50
+ height: this.dotRadius * 2,
51
+ source: "atom" + this.noteView.leafAtom.uuid,
82
52
  },
83
53
  });
84
- var cx = 0;
85
- for (var i = 0; i < numDots; i++) {
54
+ let cx = 0;
55
+ for (let i = 0; i < numDots; i++) {
86
56
  TSU.DOM.createSVGNode("circle", {
87
57
  doc: document,
88
- parent: _this.dotsElem,
58
+ parent: this.dotsElem,
89
59
  attrs: {
90
60
  cx: cx,
91
61
  cy: 0,
92
- r: _this.dotRadius,
62
+ r: this.dotRadius,
93
63
  stroke: "black",
94
64
  "stroke-width": "1",
95
65
  },
96
66
  });
97
- cx += _this.dotRadius + _this.dotRadius + _this.dotSpacing;
67
+ cx += this.dotRadius + this.dotRadius + this.dotSpacing;
98
68
  }
99
- return _this;
100
69
  }
101
- OctaveIndicator.prototype.refreshBBox = function () {
70
+ refreshBBox() {
102
71
  return TSU.DOM.svgBBox(this.dotsElem);
103
- };
104
- OctaveIndicator.prototype.refreshMinSize = function () {
105
- var numDots = Math.abs(this.note.octave);
72
+ }
73
+ refreshMinSize() {
74
+ const numDots = Math.abs(this.note.octave);
106
75
  return {
107
76
  width: this.dotRadius * 2 * numDots + (numDots - 1) * this.dotSpacing,
108
77
  height: this.dotRadius * 2,
109
78
  };
110
- };
111
- OctaveIndicator.prototype.updateBounds = function (x, y, w, h) {
79
+ }
80
+ updateBounds(x, y, w, h) {
112
81
  if (x == null)
113
82
  x = this.x;
114
83
  if (y == null)
115
84
  y = this.y;
116
85
  return [x, y, null, null];
117
- };
118
- OctaveIndicator.prototype.refreshLayout = function () {
86
+ }
87
+ refreshLayout() {
119
88
  this.dotsElem.setAttribute("transform", "translate(" + this.x + "," + this.y + ")");
120
- };
121
- return OctaveIndicator;
122
- }(LeafAtomViewEmbelishment));
89
+ }
90
+ }
123
91
  exports.OctaveIndicator = OctaveIndicator;
124
- var LabelEmbelishment = (function (_super) {
125
- __extends(LabelEmbelishment, _super);
126
- function LabelEmbelishment(label, atomView) {
127
- var _this = _super.call(this, atomView) || this;
128
- _this.label = label;
129
- _this.atomView = atomView;
130
- var rootElem = _this.atomView.embRoot();
131
- _this.labelElem = TSU.DOM.createSVGNode("text", {
92
+ class LabelEmbelishment extends LeafAtomViewEmbelishment {
93
+ constructor(label, atomView) {
94
+ super(atomView);
95
+ this.label = label;
96
+ this.atomView = atomView;
97
+ const rootElem = this.atomView.embRoot();
98
+ this.labelElem = TSU.DOM.createSVGNode("text", {
132
99
  doc: document,
133
100
  parent: rootElem,
134
101
  text: label,
135
102
  attrs: {
136
- source: "atom" + _this.atomView.leafAtom.uuid,
103
+ source: "atom" + this.atomView.leafAtom.uuid,
137
104
  "dominant-baseline": "hanging",
138
105
  },
139
106
  });
140
- return _this;
141
107
  }
142
- LabelEmbelishment.prototype.refreshBBox = function () {
108
+ refreshBBox() {
143
109
  return TSU.DOM.svgBBox(this.labelElem);
144
- };
145
- LabelEmbelishment.prototype.refreshMinSize = function () {
110
+ }
111
+ refreshMinSize() {
146
112
  return TSU.DOM.svgBBox(this.labelElem);
147
- };
148
- LabelEmbelishment.prototype.updateBounds = function (x, y, w, h) {
113
+ }
114
+ updateBounds(x, y, w, h) {
149
115
  return [x, y, w, h];
150
- };
151
- LabelEmbelishment.prototype.refreshLayout = function () {
116
+ }
117
+ refreshLayout() {
152
118
  this.labelElem.setAttribute("x", "" + this.x);
153
119
  this.labelElem.setAttribute("y", "" + this.y);
154
- };
155
- return LabelEmbelishment;
156
- }(LeafAtomViewEmbelishment));
120
+ }
121
+ }
157
122
  exports.LabelEmbelishment = LabelEmbelishment;
158
- var BeatStartLines = (function (_super) {
159
- __extends(BeatStartLines, _super);
160
- function BeatStartLines(source, rootElement) {
161
- var _this = _super.call(this) || this;
162
- _this.source = source;
163
- _this.rootElement = rootElement;
164
- _this.barSpacing = 10;
165
- _this.line = TSU.DOM.createSVGNode("line", {
123
+ class BeatStartLines extends shapes_1.Embelishment {
124
+ constructor(source, rootElement) {
125
+ super();
126
+ this.source = source;
127
+ this.rootElement = rootElement;
128
+ this.barSpacing = 10;
129
+ this.line = TSU.DOM.createSVGNode("line", {
166
130
  doc: document,
167
- parent: _this.rootElement,
131
+ parent: this.rootElement,
168
132
  attrs: {
169
133
  stroke: "black",
170
134
  "stroke-width": "1",
171
135
  class: "bar-start-line",
172
136
  },
173
137
  });
174
- return _this;
175
138
  }
176
- BeatStartLines.prototype.refreshBBox = function () {
139
+ refreshBBox() {
177
140
  return new TSU.Geom.Rect(0, 0, 0, 0);
178
- };
179
- BeatStartLines.prototype.refreshMinSize = function () {
141
+ }
142
+ refreshMinSize() {
180
143
  return new TSU.Geom.Rect(0, 0, 0, 0);
181
- };
182
- BeatStartLines.prototype.refreshLayout = function () {
183
- var line = this.line;
184
- var x = this.source.x - this.barSpacing;
144
+ }
145
+ refreshLayout() {
146
+ const line = this.line;
147
+ const x = this.source.x - this.barSpacing;
185
148
  line.setAttribute("x1", "" + x);
186
149
  line.setAttribute("x2", "" + x);
187
- var y = this.source.y + this.source.bbox.y;
188
- var h = this.source.bbox.height;
150
+ const y = this.source.y + this.source.bbox.y;
151
+ const h = this.source.bbox.height;
189
152
  line.setAttribute("y1", "" + y);
190
153
  line.setAttribute("y2", "" + (y + h));
191
- };
192
- BeatStartLines.prototype.updateBounds = function (x, y, w, h) {
154
+ }
155
+ updateBounds(x, y, w, h) {
193
156
  return [x, y, null, h];
194
- };
195
- return BeatStartLines;
196
- }(shapes_1.Embelishment));
157
+ }
158
+ }
197
159
  exports.BeatStartLines = BeatStartLines;
198
- var BeatEndLines = (function (_super) {
199
- __extends(BeatEndLines, _super);
200
- function BeatEndLines(source, rootElement, nLines) {
201
- if (nLines === void 0) { nLines = 1; }
202
- var _this = _super.call(this) || this;
203
- _this.source = source;
204
- _this.rootElement = rootElement;
205
- _this.lineSpacing = 2;
206
- _this.barSpacing = 15;
207
- _this.lines = [];
208
- for (var i = 0; i < nLines; i++) {
209
- _this.lines.push(TSU.DOM.createSVGNode("line", {
160
+ class BeatEndLines extends shapes_1.Embelishment {
161
+ constructor(source, rootElement, nLines = 1) {
162
+ super();
163
+ this.source = source;
164
+ this.rootElement = rootElement;
165
+ this.lineSpacing = 2;
166
+ this.barSpacing = 15;
167
+ this.lines = [];
168
+ for (let i = 0; i < nLines; i++) {
169
+ this.lines.push(TSU.DOM.createSVGNode("line", {
210
170
  doc: document,
211
- parent: _this.rootElement,
171
+ parent: this.rootElement,
212
172
  attrs: {
213
173
  stroke: "black",
214
174
  "stroke-width": "1",
@@ -216,176 +176,123 @@ var BeatEndLines = (function (_super) {
216
176
  },
217
177
  }));
218
178
  }
219
- return _this;
220
179
  }
221
- BeatEndLines.prototype.refreshBBox = function () {
180
+ refreshBBox() {
222
181
  return new TSU.Geom.Rect(0, 0, 0, 0);
223
- };
224
- BeatEndLines.prototype.refreshMinSize = function () {
182
+ }
183
+ refreshMinSize() {
225
184
  return new TSU.Geom.Rect(0, 0, 0, 0);
226
- };
227
- BeatEndLines.prototype.updatePosition = function (x, y) {
185
+ }
186
+ updatePosition(x, y) {
228
187
  return [x, y];
229
- };
230
- BeatEndLines.prototype.refreshLayout = function () {
231
- var e_1, _a, e_2, _b;
232
- var x = this.source.x + this.source.width + this.barSpacing;
233
- var y = this.source.y + this.source.bbox.y;
234
- var h = this.source.bbox.height;
235
- var currX = x;
236
- try {
237
- for (var _c = __values(this.lines), _d = _c.next(); !_d.done; _d = _c.next()) {
238
- var line = _d.value;
239
- var lx = "" + currX;
240
- line.setAttribute("x1", lx);
241
- line.setAttribute("x2", lx);
242
- currX += 4;
243
- }
244
- }
245
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
246
- finally {
247
- try {
248
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
249
- }
250
- finally { if (e_1) throw e_1.error; }
251
- }
252
- try {
253
- for (var _e = __values(this.lines), _f = _e.next(); !_f.done; _f = _e.next()) {
254
- var line = _f.value;
255
- line.setAttribute("y1", "" + y);
256
- line.setAttribute("y2", "" + (y + h));
257
- }
188
+ }
189
+ refreshLayout() {
190
+ const x = this.source.x + this.source.width + this.barSpacing;
191
+ const y = this.source.y + this.source.bbox.y;
192
+ const h = this.source.bbox.height;
193
+ let currX = x;
194
+ for (const line of this.lines) {
195
+ const lx = "" + currX;
196
+ line.setAttribute("x1", lx);
197
+ line.setAttribute("x2", lx);
198
+ currX += 4;
258
199
  }
259
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
260
- finally {
261
- try {
262
- if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
263
- }
264
- finally { if (e_2) throw e_2.error; }
200
+ for (const line of this.lines) {
201
+ line.setAttribute("y1", "" + y);
202
+ line.setAttribute("y2", "" + (y + h));
265
203
  }
266
- };
267
- BeatEndLines.prototype.updateBounds = function (x, y, w, h) {
204
+ }
205
+ updateBounds(x, y, w, h) {
268
206
  return [null, null, null, null];
269
- };
270
- return BeatEndLines;
271
- }(shapes_1.Embelishment));
207
+ }
208
+ }
272
209
  exports.BeatEndLines = BeatEndLines;
273
- var Kampitham = (function (_super) {
274
- __extends(Kampitham, _super);
275
- function Kampitham(atomView) {
276
- var _this = _super.call(this, "~", atomView) || this;
277
- _this.atomView = atomView;
278
- return _this;
279
- }
280
- return Kampitham;
281
- }(LabelEmbelishment));
210
+ class Kampitham extends LabelEmbelishment {
211
+ constructor(atomView) {
212
+ super("~", atomView);
213
+ this.atomView = atomView;
214
+ }
215
+ }
282
216
  exports.Kampitham = Kampitham;
283
- var Nokku = (function (_super) {
284
- __extends(Nokku, _super);
285
- function Nokku(atomView) {
286
- var _this = _super.call(this, "w", atomView) || this;
287
- _this.atomView = atomView;
288
- return _this;
289
- }
290
- return Nokku;
291
- }(LabelEmbelishment));
217
+ class Nokku extends LabelEmbelishment {
218
+ constructor(atomView) {
219
+ super("w", atomView);
220
+ this.atomView = atomView;
221
+ }
222
+ }
292
223
  exports.Nokku = Nokku;
293
- var Prathyagatham = (function (_super) {
294
- __extends(Prathyagatham, _super);
295
- function Prathyagatham(atomView) {
296
- var _this = _super.call(this, "∵", atomView) || this;
297
- _this.atomView = atomView;
298
- return _this;
299
- }
300
- return Prathyagatham;
301
- }(LabelEmbelishment));
224
+ class Prathyagatham extends LabelEmbelishment {
225
+ constructor(atomView) {
226
+ super("∵", atomView);
227
+ this.atomView = atomView;
228
+ }
229
+ }
302
230
  exports.Prathyagatham = Prathyagatham;
303
- var Spuritham = (function (_super) {
304
- __extends(Spuritham, _super);
305
- function Spuritham(atomView) {
306
- var _this = _super.call(this, "∴", atomView) || this;
307
- _this.atomView = atomView;
308
- return _this;
309
- }
310
- return Spuritham;
311
- }(LabelEmbelishment));
231
+ class Spuritham extends LabelEmbelishment {
232
+ constructor(atomView) {
233
+ super("∴", atomView);
234
+ this.atomView = atomView;
235
+ }
236
+ }
312
237
  exports.Spuritham = Spuritham;
313
- var Raavi = (function (_super) {
314
- __extends(Raavi, _super);
315
- function Raavi(atomView) {
316
- var _this = _super.call(this, "^", atomView) || this;
317
- _this.atomView = atomView;
318
- return _this;
319
- }
320
- return Raavi;
321
- }(LabelEmbelishment));
238
+ class Raavi extends LabelEmbelishment {
239
+ constructor(atomView) {
240
+ super("^", atomView);
241
+ this.atomView = atomView;
242
+ }
243
+ }
322
244
  exports.Raavi = Raavi;
323
- var Kandippu = (function (_super) {
324
- __extends(Kandippu, _super);
325
- function Kandippu(atomView) {
326
- var _this = _super.call(this, "✓", atomView) || this;
327
- _this.atomView = atomView;
328
- return _this;
329
- }
330
- return Kandippu;
331
- }(LabelEmbelishment));
245
+ class Kandippu extends LabelEmbelishment {
246
+ constructor(atomView) {
247
+ super("✓", atomView);
248
+ this.atomView = atomView;
249
+ }
250
+ }
332
251
  exports.Kandippu = Kandippu;
333
- var Vaali = (function (_super) {
334
- __extends(Vaali, _super);
335
- function Vaali(atomView) {
336
- var _this = _super.call(this, "⌒", atomView) || this;
337
- _this.atomView = atomView;
338
- return _this;
339
- }
340
- return Vaali;
341
- }(LabelEmbelishment));
252
+ class Vaali extends LabelEmbelishment {
253
+ constructor(atomView) {
254
+ super("⌒", atomView);
255
+ this.atomView = atomView;
256
+ }
257
+ }
342
258
  exports.Vaali = Vaali;
343
- var Odukkal = (function (_super) {
344
- __extends(Odukkal, _super);
345
- function Odukkal(atomView) {
346
- var _this = _super.call(this, "x", atomView) || this;
347
- _this.atomView = atomView;
348
- return _this;
349
- }
350
- return Odukkal;
351
- }(LabelEmbelishment));
259
+ class Odukkal extends LabelEmbelishment {
260
+ constructor(atomView) {
261
+ super("x", atomView);
262
+ this.atomView = atomView;
263
+ }
264
+ }
352
265
  exports.Odukkal = Odukkal;
353
- var Orikkai = (function (_super) {
354
- __extends(Orikkai, _super);
355
- function Orikkai(atomView) {
356
- var _this = _super.call(this, "γ", atomView) || this;
357
- _this.atomView = atomView;
358
- return _this;
359
- }
360
- return Orikkai;
361
- }(LabelEmbelishment));
266
+ class Orikkai extends LabelEmbelishment {
267
+ constructor(atomView) {
268
+ super("γ", atomView);
269
+ this.atomView = atomView;
270
+ }
271
+ }
362
272
  exports.Orikkai = Orikkai;
363
- var Jaaru = (function (_super) {
364
- __extends(Jaaru, _super);
365
- function Jaaru(jaaru, atomView) {
366
- var _this = _super.call(this, atomView) || this;
367
- _this.jaaru = jaaru;
368
- _this.atomView = atomView;
369
- var rootElem = _this.atomView.embRoot();
370
- _this.pathElem = TSU.DOM.createSVGNode("path", {
273
+ class Jaaru extends LeafAtomViewEmbelishment {
274
+ constructor(jaaru, atomView) {
275
+ super(atomView);
276
+ this.jaaru = jaaru;
277
+ this.atomView = atomView;
278
+ const rootElem = this.atomView.embRoot();
279
+ this.pathElem = TSU.DOM.createSVGNode("path", {
371
280
  doc: document,
372
281
  parent: rootElem,
373
282
  attrs: {
374
- source: "atom" + _this.atomView.leafAtom.uuid,
283
+ source: "atom" + this.atomView.leafAtom.uuid,
375
284
  stroke: "black",
376
285
  fill: "transparent",
377
- d: _this.pathAttribute(),
286
+ d: this.pathAttribute(),
378
287
  },
379
288
  });
380
- return _this;
381
- }
382
- Jaaru.prototype.pathAttribute = function (x) {
383
- if (x === void 0) { x = 0; }
384
- var avbbox = this.atomView.glyph.minSize;
385
- var y2 = 0;
386
- var h2 = avbbox.height / 2;
387
- var x2 = x + h2;
388
- var y = this.atomView.y;
289
+ }
290
+ pathAttribute(x = 0) {
291
+ const avbbox = this.atomView.glyph.minSize;
292
+ let y2 = 0;
293
+ const h2 = avbbox.height / 2;
294
+ const x2 = x + h2;
295
+ let y = this.atomView.y;
389
296
  if (this.jaaru.ascending) {
390
297
  y += avbbox.height;
391
298
  y2 = y - h2;
@@ -394,21 +301,20 @@ var Jaaru = (function (_super) {
394
301
  y -= h2;
395
302
  y2 = y + h2;
396
303
  }
397
- return ["M ".concat(x, " ").concat(y), "Q ".concat(x2, " ").concat(y, " ").concat(x2, " ").concat(y2)].join(" ");
398
- };
399
- Jaaru.prototype.refreshMinSize = function () {
304
+ return [`M ${x} ${y}`, `Q ${x2} ${y} ${x2} ${y2}`].join(" ");
305
+ }
306
+ refreshMinSize() {
400
307
  return TSU.DOM.svgBBox(this.pathElem);
401
- };
402
- Jaaru.prototype.refreshBBox = function () {
308
+ }
309
+ refreshBBox() {
403
310
  return TSU.DOM.svgBBox(this.pathElem);
404
- };
405
- Jaaru.prototype.updateBounds = function (x, y, w, h) {
311
+ }
312
+ updateBounds(x, y, w, h) {
406
313
  return [x, null, null, null];
407
- };
408
- Jaaru.prototype.refreshLayout = function () {
314
+ }
315
+ refreshLayout() {
409
316
  this.pathElem.setAttribute("d", this.pathAttribute(this.x));
410
- };
411
- return Jaaru;
412
- }(LeafAtomViewEmbelishment));
317
+ }
318
+ }
413
319
  exports.Jaaru = Jaaru;
414
320
  //# sourceMappingURL=embelishments.js.map