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