el-diatonico-models 0.0.8 → 1.0.1

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 (192) hide show
  1. package/README.md +3 -3
  2. package/dist/Accordion/Accordion.d.ts +29 -4
  3. package/dist/Accordion/Accordion.d.ts.map +1 -1
  4. package/dist/Accordion/Accordion.js +21 -4
  5. package/dist/Accordion/Accordion.js.map +1 -1
  6. package/dist/Accordion/AccordionFactory.d.ts +19 -0
  7. package/dist/Accordion/AccordionFactory.d.ts.map +1 -1
  8. package/dist/Accordion/AccordionFactory.js +28 -6
  9. package/dist/Accordion/AccordionFactory.js.map +1 -1
  10. package/dist/Accordion/Accordions.d.ts +3 -1
  11. package/dist/Accordion/Accordions.d.ts.map +1 -1
  12. package/dist/Accordion/Accordions.js +5 -4
  13. package/dist/Accordion/Accordions.js.map +1 -1
  14. package/dist/Basses/Bass.d.ts +41 -0
  15. package/dist/Basses/Bass.d.ts.map +1 -0
  16. package/dist/Basses/Bass.js +24 -0
  17. package/dist/Basses/Bass.js.map +1 -0
  18. package/dist/Basses/BassChord.d.ts +32 -0
  19. package/dist/Basses/BassChord.d.ts.map +1 -0
  20. package/dist/Basses/BassChord.js +36 -0
  21. package/dist/Basses/BassChord.js.map +1 -0
  22. package/dist/Basses/BassNote.d.ts +37 -0
  23. package/dist/Basses/BassNote.d.ts.map +1 -0
  24. package/dist/Basses/BassNote.js +41 -0
  25. package/dist/Basses/BassNote.js.map +1 -0
  26. package/dist/Basses/index.d.ts +4 -0
  27. package/dist/Basses/index.d.ts.map +1 -0
  28. package/dist/Basses/index.js +4 -0
  29. package/dist/Basses/index.js.map +1 -0
  30. package/dist/Core/Errors.d.ts +59 -0
  31. package/dist/Core/Errors.d.ts.map +1 -0
  32. package/dist/Core/Errors.js +71 -0
  33. package/dist/Core/Errors.js.map +1 -0
  34. package/dist/Core/index.d.ts +6 -0
  35. package/dist/Core/index.d.ts.map +1 -0
  36. package/dist/Core/index.js +6 -0
  37. package/dist/Core/index.js.map +1 -0
  38. package/dist/Data/BassesData.d.ts +7 -0
  39. package/dist/Data/BassesData.d.ts.map +1 -0
  40. package/dist/Data/BassesData.js +79 -0
  41. package/dist/Data/BassesData.js.map +1 -0
  42. package/dist/{NotesKeyboard/NotesKeyboard.d.ts → Data/NotesKeyboardData.d.ts} +1 -1
  43. package/dist/Data/NotesKeyboardData.d.ts.map +1 -0
  44. package/dist/{NotesKeyboard/NotesKeyboard.js → Data/NotesKeyboardData.js} +1 -1
  45. package/dist/Data/NotesKeyboardData.js.map +1 -0
  46. package/dist/{Scale/ScalesPositions.d.ts → Data/ScalesPositionsData.d.ts} +1 -1
  47. package/dist/Data/ScalesPositionsData.d.ts.map +1 -0
  48. package/dist/{Scale/ScalesPositions.js → Data/ScalesPositionsData.js} +1 -1
  49. package/dist/{Scale/ScalesPositions.js.map → Data/ScalesPositionsData.js.map} +1 -1
  50. package/dist/Data/TonalitiesData.d.ts +3 -0
  51. package/dist/Data/TonalitiesData.d.ts.map +1 -0
  52. package/dist/{Tonality/Tonalities.js → Data/TonalitiesData.js} +2 -2
  53. package/dist/Data/TonalitiesData.js.map +1 -0
  54. package/dist/Data/index.d.ts +4 -0
  55. package/dist/Data/index.d.ts.map +1 -0
  56. package/dist/Data/index.js +4 -0
  57. package/dist/Data/index.js.map +1 -0
  58. package/dist/Enums/BassType.d.ts +5 -0
  59. package/dist/Enums/BassType.d.ts.map +1 -0
  60. package/dist/Enums/BassType.js +6 -0
  61. package/dist/Enums/BassType.js.map +1 -0
  62. package/dist/Enums/Notation.d.ts.map +1 -1
  63. package/dist/Enums/Notation.js.map +1 -1
  64. package/dist/Enums/index.d.ts +1 -1
  65. package/dist/Enums/index.d.ts.map +1 -1
  66. package/dist/Enums/index.js +1 -1
  67. package/dist/Enums/index.js.map +1 -1
  68. package/dist/Keyboard/KeyBoard.d.ts +50 -3
  69. package/dist/Keyboard/KeyBoard.d.ts.map +1 -1
  70. package/dist/Keyboard/KeyBoard.js +47 -5
  71. package/dist/Keyboard/KeyBoard.js.map +1 -1
  72. package/dist/Keyboard/KeyboardFactory.d.ts +24 -1
  73. package/dist/Keyboard/KeyboardFactory.d.ts.map +1 -1
  74. package/dist/Keyboard/KeyboardFactory.js +33 -2
  75. package/dist/Keyboard/KeyboardFactory.js.map +1 -1
  76. package/dist/Keyboard/index.d.ts +1 -0
  77. package/dist/Keyboard/index.d.ts.map +1 -1
  78. package/dist/Keyboard/index.js +1 -0
  79. package/dist/Keyboard/index.js.map +1 -1
  80. package/dist/Loaders/INotesKeyboardLoader.d.ts +7 -0
  81. package/dist/Loaders/INotesKeyboardLoader.d.ts.map +1 -0
  82. package/dist/Loaders/INotesKeyboardLoader.js +2 -0
  83. package/dist/Loaders/INotesKeyboardLoader.js.map +1 -0
  84. package/dist/Loaders/IScalesPositionsLoader.d.ts +7 -0
  85. package/dist/Loaders/IScalesPositionsLoader.d.ts.map +1 -0
  86. package/dist/Loaders/IScalesPositionsLoader.js +2 -0
  87. package/dist/Loaders/IScalesPositionsLoader.js.map +1 -0
  88. package/dist/Loaders/ITonalitiesLoader.d.ts +7 -0
  89. package/dist/Loaders/ITonalitiesLoader.d.ts.map +1 -0
  90. package/dist/Loaders/ITonalitiesLoader.js +2 -0
  91. package/dist/Loaders/ITonalitiesLoader.js.map +1 -0
  92. package/dist/Loaders/NotesKeyboardLoader.d.ts +8 -0
  93. package/dist/Loaders/NotesKeyboardLoader.d.ts.map +1 -0
  94. package/dist/Loaders/NotesKeyboardLoader.js +10 -0
  95. package/dist/Loaders/NotesKeyboardLoader.js.map +1 -0
  96. package/dist/Loaders/ScalesPositionsLoader.d.ts +8 -0
  97. package/dist/Loaders/ScalesPositionsLoader.d.ts.map +1 -0
  98. package/dist/Loaders/ScalesPositionsLoader.js +10 -0
  99. package/dist/Loaders/ScalesPositionsLoader.js.map +1 -0
  100. package/dist/Loaders/TonalitiesLoader.d.ts +8 -0
  101. package/dist/Loaders/TonalitiesLoader.d.ts.map +1 -0
  102. package/dist/Loaders/TonalitiesLoader.js +10 -0
  103. package/dist/Loaders/TonalitiesLoader.js.map +1 -0
  104. package/dist/Loaders/index.d.ts +7 -0
  105. package/dist/Loaders/index.d.ts.map +1 -0
  106. package/dist/Loaders/index.js +7 -0
  107. package/dist/Loaders/index.js.map +1 -0
  108. package/dist/Notes/Note.d.ts +25 -3
  109. package/dist/Notes/Note.d.ts.map +1 -1
  110. package/dist/Notes/Note.js +36 -20
  111. package/dist/Notes/Note.js.map +1 -1
  112. package/dist/NotesKeyboard/NoteKeyboard.d.ts +44 -5
  113. package/dist/NotesKeyboard/NoteKeyboard.d.ts.map +1 -1
  114. package/dist/NotesKeyboard/NoteKeyboard.js +30 -5
  115. package/dist/NotesKeyboard/NoteKeyboard.js.map +1 -1
  116. package/dist/NotesKeyboard/index.d.ts +0 -1
  117. package/dist/NotesKeyboard/index.d.ts.map +1 -1
  118. package/dist/NotesKeyboard/index.js +0 -1
  119. package/dist/NotesKeyboard/index.js.map +1 -1
  120. package/dist/Position/Position.d.ts +34 -2
  121. package/dist/Position/Position.d.ts.map +1 -1
  122. package/dist/Position/Position.js +19 -2
  123. package/dist/Position/Position.js.map +1 -1
  124. package/dist/Scale/Grade.d.ts +36 -5
  125. package/dist/Scale/Grade.d.ts.map +1 -1
  126. package/dist/Scale/Grade.js +29 -5
  127. package/dist/Scale/Grade.js.map +1 -1
  128. package/dist/Scale/Interval.d.ts +24 -2
  129. package/dist/Scale/Interval.d.ts.map +1 -1
  130. package/dist/Scale/Interval.js +23 -2
  131. package/dist/Scale/Interval.js.map +1 -1
  132. package/dist/Scale/IntervalsFactory.d.ts +24 -2
  133. package/dist/Scale/IntervalsFactory.d.ts.map +1 -1
  134. package/dist/Scale/IntervalsFactory.js +25 -1
  135. package/dist/Scale/IntervalsFactory.js.map +1 -1
  136. package/dist/Scale/ScaleFactory.d.ts +26 -1
  137. package/dist/Scale/ScaleFactory.d.ts.map +1 -1
  138. package/dist/Scale/ScaleFactory.js +34 -7
  139. package/dist/Scale/ScaleFactory.js.map +1 -1
  140. package/dist/Scale/ScalePositions.js +0 -3
  141. package/dist/Scale/ScalePositions.js.map +1 -1
  142. package/dist/Scale/index.d.ts +0 -1
  143. package/dist/Scale/index.d.ts.map +1 -1
  144. package/dist/Scale/index.js +0 -1
  145. package/dist/Scale/index.js.map +1 -1
  146. package/dist/Tonality/Tonality.d.ts +33 -4
  147. package/dist/Tonality/Tonality.d.ts.map +1 -1
  148. package/dist/Tonality/Tonality.js +30 -5
  149. package/dist/Tonality/Tonality.js.map +1 -1
  150. package/dist/Tonality/index.d.ts +0 -1
  151. package/dist/Tonality/index.d.ts.map +1 -1
  152. package/dist/Tonality/index.js +0 -1
  153. package/dist/Tonality/index.js.map +1 -1
  154. package/dist/Types/English_BassChord_Metric.d.ts +2 -0
  155. package/dist/Types/English_BassChord_Metric.d.ts.map +1 -0
  156. package/dist/Types/English_BassChord_Metric.js +2 -0
  157. package/dist/Types/English_BassChord_Metric.js.map +1 -0
  158. package/dist/Types/English_Note_Metrics.d.ts +2 -0
  159. package/dist/Types/English_Note_Metrics.d.ts.map +1 -0
  160. package/dist/Types/English_Note_Metrics.js +2 -0
  161. package/dist/Types/English_Note_Metrics.js.map +1 -0
  162. package/dist/Types/Spanish_BassChord_Metric.d.ts +2 -0
  163. package/dist/Types/Spanish_BassChord_Metric.d.ts.map +1 -0
  164. package/dist/Types/Spanish_BassChord_Metric.js +2 -0
  165. package/dist/Types/Spanish_BassChord_Metric.js.map +1 -0
  166. package/dist/Types/Spanish_Note_Metrics.d.ts +2 -0
  167. package/dist/Types/Spanish_Note_Metrics.d.ts.map +1 -0
  168. package/dist/Types/Spanish_Note_Metrics.js +2 -0
  169. package/dist/Types/Spanish_Note_Metrics.js.map +1 -0
  170. package/dist/Types/index.d.ts +5 -0
  171. package/dist/Types/index.d.ts.map +1 -0
  172. package/dist/Types/index.js +5 -0
  173. package/dist/Types/index.js.map +1 -0
  174. package/dist/Utils/GradeToIntervalConverter.d.ts +40 -1
  175. package/dist/Utils/GradeToIntervalConverter.d.ts.map +1 -1
  176. package/dist/Utils/GradeToIntervalConverter.js +55 -8
  177. package/dist/Utils/GradeToIntervalConverter.js.map +1 -1
  178. package/dist/index.d.ts +2 -0
  179. package/dist/index.d.ts.map +1 -1
  180. package/dist/index.js +2 -0
  181. package/dist/index.js.map +1 -1
  182. package/package.json +4 -2
  183. package/dist/Enums/NoteMetrics.d.ts +0 -69
  184. package/dist/Enums/NoteMetrics.d.ts.map +0 -1
  185. package/dist/Enums/NoteMetrics.js +0 -86
  186. package/dist/Enums/NoteMetrics.js.map +0 -1
  187. package/dist/NotesKeyboard/NotesKeyboard.d.ts.map +0 -1
  188. package/dist/NotesKeyboard/NotesKeyboard.js.map +0 -1
  189. package/dist/Scale/ScalesPositions.d.ts.map +0 -1
  190. package/dist/Tonality/Tonalities.d.ts +0 -3
  191. package/dist/Tonality/Tonalities.d.ts.map +0 -1
  192. package/dist/Tonality/Tonalities.js.map +0 -1
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # el-diatonico-models
2
-
3
- Models used inside the el-diatonico site.
1
+ # el-diatonico-models
2
+
3
+ Models used inside the el-diatonico site.
@@ -2,11 +2,36 @@ import type { IAccordion } from "@Accordion";
2
2
  import type { AccordionTuning } from "@Enums";
3
3
  import type { IKeyBoard } from "@Keyboard";
4
4
  import type { ITonality } from "@Tonality";
5
+ /**
6
+ * Represents a physical accordion instrument.
7
+ *
8
+ * An accordion consists of two keyboards (opening and closing bellows directions),
9
+ * a specific tuning system, and a collection of available tonalities.
10
+ *
11
+ * @example
12
+ * ```typescript
13
+ * const accordion = AccordionFactory.createAccordion(AccordionTuning.FA);
14
+ * console.log(accordion.tuning); // AccordionTuning.FA
15
+ * console.log(accordion.tones.length); // List of available tonalities
16
+ * ```
17
+ */
5
18
  export declare class Accordion implements IAccordion {
6
- tuning: AccordionTuning;
7
- keyboardClosing: IKeyBoard;
8
- keyboardOpening: IKeyBoard;
9
- tones: ITonality[];
19
+ /** The tuning system of this accordion */
20
+ readonly tuning: AccordionTuning;
21
+ /** The keyboard for closing bellows (Cerrando) */
22
+ readonly keyboardClosing: IKeyBoard;
23
+ /** The keyboard for opening bellows (Abriendo) */
24
+ readonly keyboardOpening: IKeyBoard;
25
+ /** The available tonalities for this accordion */
26
+ readonly tones: ITonality[];
27
+ /**
28
+ * Creates a new Accordion instance.
29
+ *
30
+ * @param tuning - The accordion tuning (FA, SOL)
31
+ * @param keyboardClosing - The closing bellows keyboard
32
+ * @param keyboardOpening - The opening bellows keyboard
33
+ * @param tones - Available tonalities
34
+ */
10
35
  constructor(tuning: AccordionTuning, keyboardClosing: IKeyBoard, keyboardOpening: IKeyBoard, tones: ITonality[]);
11
36
  }
12
37
  //# sourceMappingURL=Accordion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../src/Accordion/Accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C,qBAAa,SAAU,YAAW,UAAU;IAC1C,MAAM,EAAE,eAAe,CAAC;IACxB,eAAe,EAAE,SAAS,CAAC;IAC3B,eAAe,EAAE,SAAS,CAAC;IAC3B,KAAK,EAAE,SAAS,EAAE,CAAC;gBAGjB,MAAM,EAAE,eAAe,EACvB,eAAe,EAAE,SAAS,EAC1B,eAAe,EAAE,SAAS,EAC1B,KAAK,EAAE,SAAS,EAAE;CAOrB"}
1
+ {"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../src/Accordion/Accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;;;;;;;;;GAYG;AACH,qBAAa,SAAU,YAAW,UAAU;IAC1C,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,kDAAkD;IAClD,QAAQ,CAAC,eAAe,EAAE,SAAS,CAAC;IACpC,kDAAkD;IAClD,QAAQ,CAAC,eAAe,EAAE,SAAS,CAAC;IACpC,kDAAkD;IAClD,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC;IAE5B;;;;;;;OAOG;gBAED,MAAM,EAAE,eAAe,EACvB,eAAe,EAAE,SAAS,EAC1B,eAAe,EAAE,SAAS,EAC1B,KAAK,EAAE,SAAS,EAAE;CAOrB"}
@@ -1,8 +1,25 @@
1
+ /**
2
+ * Represents a physical accordion instrument.
3
+ *
4
+ * An accordion consists of two keyboards (opening and closing bellows directions),
5
+ * a specific tuning system, and a collection of available tonalities.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * const accordion = AccordionFactory.createAccordion(AccordionTuning.FA);
10
+ * console.log(accordion.tuning); // AccordionTuning.FA
11
+ * console.log(accordion.tones.length); // List of available tonalities
12
+ * ```
13
+ */
1
14
  export class Accordion {
2
- tuning;
3
- keyboardClosing;
4
- keyboardOpening;
5
- tones;
15
+ /**
16
+ * Creates a new Accordion instance.
17
+ *
18
+ * @param tuning - The accordion tuning (FA, SOL)
19
+ * @param keyboardClosing - The closing bellows keyboard
20
+ * @param keyboardOpening - The opening bellows keyboard
21
+ * @param tones - Available tonalities
22
+ */
6
23
  constructor(tuning, keyboardClosing, keyboardOpening, tones) {
7
24
  this.tuning = tuning;
8
25
  this.keyboardClosing = keyboardClosing;
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../src/Accordion/Accordion.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,SAAS;IACpB,MAAM,CAAkB;IACxB,eAAe,CAAY;IAC3B,eAAe,CAAY;IAC3B,KAAK,CAAc;IAEnB,YACE,MAAuB,EACvB,eAA0B,EAC1B,eAA0B,EAC1B,KAAkB;QAElB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
1
+ {"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../src/Accordion/Accordion.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,SAAS;IAUpB;;;;;;;OAOG;IACH,YACE,MAAuB,EACvB,eAA0B,EAC1B,eAA0B,EAC1B,KAAkB;QAElB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;CACF"}
@@ -1,6 +1,25 @@
1
1
  import { Accordion } from "@Accordion";
2
2
  import { type AccordionTuning } from "@Enums";
3
+ /**
4
+ * Factory for creating Accordion instances.
5
+ *
6
+ * Handles the creation of complete accordion objects with all required keyboards
7
+ * (closing/cerrando and opening/abriendo) and tonalities for a given tuning.
8
+ */
3
9
  export declare class AccordionFactory {
10
+ private static tonalitiesLoader;
11
+ /**
12
+ * Creates an Accordion with both keyboard configurations.
13
+ *
14
+ * @param tuning - The accordion tuning (e.g., FA, SOL)
15
+ * @returns A fully initialized Accordion instance
16
+ * @throws {ConfigurationError} If no tonalities are found for the specified tuning
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * const accordion = AccordionFactory.createAccordion(AccordionTuning.FA);
21
+ * ```
22
+ */
4
23
  static createAccordion(tuning: AccordionTuning): Accordion;
5
24
  }
6
25
  //# sourceMappingURL=AccordionFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionFactory.d.ts","sourceRoot":"","sources":["../../src/Accordion/AccordionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAW,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAIvD,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe;CAgB/C"}
1
+ {"version":3,"file":"AccordionFactory.d.ts","sourceRoot":"","sources":["../../src/Accordion/AccordionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAW,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AAKvD;;;;;GAKG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAA0B;IAEzD;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS;CAmB3D"}
@@ -1,13 +1,35 @@
1
1
  import { Accordion } from "@Accordion";
2
2
  import { Bellows } from "@Enums";
3
- import { tonalities as TonalitiesCollection } from "@Tonality";
4
- import { KeyboardFactory } from "../Keyboard/KeyboardFactory";
3
+ import { TonalitiesLoader } from "@Loaders";
4
+ import { KeyboardFactory } from "@Keyboard";
5
+ import { ConfigurationError } from "@Core";
6
+ /**
7
+ * Factory for creating Accordion instances.
8
+ *
9
+ * Handles the creation of complete accordion objects with all required keyboards
10
+ * (closing/cerrando and opening/abriendo) and tonalities for a given tuning.
11
+ */
5
12
  export class AccordionFactory {
13
+ /**
14
+ * Creates an Accordion with both keyboard configurations.
15
+ *
16
+ * @param tuning - The accordion tuning (e.g., FA, SOL)
17
+ * @returns A fully initialized Accordion instance
18
+ * @throws {ConfigurationError} If no tonalities are found for the specified tuning
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * const accordion = AccordionFactory.createAccordion(AccordionTuning.FA);
23
+ * ```
24
+ */
6
25
  static createAccordion(tuning) {
7
- const tonalities = TonalitiesCollection.filter((tonality) => tonality.accordionTuning == tuning) || [];
8
- const keyboarClosing = KeyboardFactory.createKeyboard(tuning, Bellows.CERRANDO);
9
- const keyboarOpening = KeyboardFactory.createKeyboard(tuning, Bellows.ABRIENDO);
10
- return new Accordion(tuning, keyboarClosing, keyboarOpening, tonalities);
26
+ const tonalities = this.tonalitiesLoader.loadByTuning(tuning);
27
+ if (tonalities.length == 0)
28
+ throw new ConfigurationError(`No tonalities found for accordion tuning: ${tuning}`);
29
+ const keyboardClosing = KeyboardFactory.createKeyboard(tuning, Bellows.CERRANDO);
30
+ const keyboardOpening = KeyboardFactory.createKeyboard(tuning, Bellows.ABRIENDO);
31
+ return new Accordion(tuning, keyboardClosing, keyboardOpening, tonalities);
11
32
  }
12
33
  }
34
+ AccordionFactory.tonalitiesLoader = new TonalitiesLoader();
13
35
  //# sourceMappingURL=AccordionFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccordionFactory.js","sourceRoot":"","sources":["../../src/Accordion/AccordionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,OAAO,EAAwB,MAAM,QAAQ,CAAC;AACvD,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAkB,MAAM,WAAW,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,OAAO,gBAAgB;IAC3B,MAAM,CAAC,eAAe,CAAC,MAAuB;QAC5C,MAAM,UAAU,GACd,oBAAoB,CAAC,MAAM,CACzB,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAe,IAAI,MAAM,CACjD,IAAK,EAAkB,CAAC;QAC3B,MAAM,cAAc,GAAG,eAAe,CAAC,cAAc,CACnD,MAAM,EACN,OAAO,CAAC,QAAQ,CACjB,CAAC;QACF,MAAM,cAAc,GAAG,eAAe,CAAC,cAAc,CACnD,MAAM,EACN,OAAO,CAAC,QAAQ,CACjB,CAAC;QAEF,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC;IAC3E,CAAC;CACF"}
1
+ {"version":3,"file":"AccordionFactory.js","sourceRoot":"","sources":["../../src/Accordion/AccordionFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,OAAO,EAAwB,MAAM,QAAQ,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,OAAO,gBAAgB;IAG3B;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,eAAe,CAAC,MAAuB;QAC5C,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAE9D,IAAI,UAAU,CAAC,MAAM,IAAI,CAAC;YACxB,MAAM,IAAI,kBAAkB,CAC1B,6CAA6C,MAAM,EAAE,CACtD,CAAC;QAEJ,MAAM,eAAe,GAAG,eAAe,CAAC,cAAc,CACpD,MAAM,EACN,OAAO,CAAC,QAAQ,CACjB,CAAC;QACF,MAAM,eAAe,GAAG,eAAe,CAAC,cAAc,CACpD,MAAM,EACN,OAAO,CAAC,QAAQ,CACjB,CAAC;QAEF,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,CAAC,CAAC;IAC7E,CAAC;;AAhCc,iCAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
@@ -1,2 +1,4 @@
1
- export declare const accordions: import("@Accordion").Accordion[];
1
+ import { Accordion } from "@Accordion";
2
+ import { AccordionTuning } from "@Enums";
3
+ export declare const accordions: Record<AccordionTuning, Accordion>;
2
4
  //# sourceMappingURL=Accordions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordions.d.ts","sourceRoot":"","sources":["../../src/Accordion/Accordions.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,kCAA2B,CAAC"}
1
+ {"version":3,"file":"Accordions.d.ts","sourceRoot":"","sources":["../../src/Accordion/Accordions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,eAAe,EAAE,SAAS,CAGzD,CAAC"}
@@ -1,6 +1,7 @@
1
- import { AccordionFactory } from "@Accordion";
1
+ import { Accordion, AccordionFactory } from "@Accordion";
2
2
  import { AccordionTuning } from "@Enums";
3
- const fAccordion = AccordionFactory.createAccordion(AccordionTuning.FA);
4
- const gAccordion = AccordionFactory.createAccordion(AccordionTuning.SOL);
5
- export const accordions = [fAccordion, gAccordion];
3
+ export const accordions = {
4
+ [AccordionTuning.FA]: AccordionFactory.createAccordion(AccordionTuning.FA),
5
+ [AccordionTuning.SOL]: AccordionFactory.createAccordion(AccordionTuning.SOL),
6
+ };
6
7
  //# sourceMappingURL=Accordions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordions.js","sourceRoot":"","sources":["../../src/Accordion/Accordions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,MAAM,UAAU,GAAG,gBAAgB,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;AACxE,MAAM,UAAU,GAAG,gBAAgB,CAAC,eAAe,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"Accordions.js","sourceRoot":"","sources":["../../src/Accordion/Accordions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,MAAM,CAAC,MAAM,UAAU,GAAuC;IAC5D,CAAC,eAAe,CAAC,EAAE,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,CAAC;IAC1E,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,eAAe,CAAC,GAAG,CAAC;CAC7E,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { AccordionTuning, BassType, Bellows } from "@Enums";
2
+ import type { IPosition } from "@Position";
3
+ /**
4
+ * Abstract base class representing a bass button on a diatonic accordion.
5
+ *
6
+ * Bass buttons produce different sounds depending on bellows direction and provide
7
+ * the harmonic foundation for accordion music. This class defines the common properties
8
+ * and behavior that all bass types must implement.
9
+ */
10
+ export declare abstract class Bass {
11
+ /** The bellows direction (opening or closing) for this bass button */
12
+ bellows: Bellows;
13
+ /** The accordion tuning system (e.g., GCF, ADG) that defines this bass */
14
+ accordionTunning: AccordionTuning;
15
+ /** The type of bass button (fundamental note or chord) */
16
+ type: BassType;
17
+ /** The physical position of the bass button on the accordion */
18
+ position: IPosition;
19
+ /**
20
+ * Creates a new Bass instance.
21
+ *
22
+ * @param bellows - The bellows direction for this bass button
23
+ * @param accordionTunning - The accordion tuning system
24
+ * @param type - The type of bass (note or chord)
25
+ * @param position - The physical position on the accordion
26
+ */
27
+ constructor(bellows: Bellows, accordionTunning: AccordionTuning, type: BassType, position: IPosition);
28
+ /**
29
+ * Gets the English notation representation of this bass.
30
+ *
31
+ * @returns The bass notation using English music theory conventions
32
+ */
33
+ abstract get englishMetric(): string;
34
+ /**
35
+ * Gets the Spanish notation representation of this bass.
36
+ *
37
+ * @returns The bass notation using Spanish music theory conventions
38
+ */
39
+ abstract get spanishMetric(): string;
40
+ }
41
+ //# sourceMappingURL=Bass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bass.d.ts","sourceRoot":"","sources":["../../src/Basses/Bass.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;;;GAMG;AACH,8BAAsB,IAAI;IACxB,sEAAsE;IACtE,OAAO,EAAE,OAAO,CAAC;IAEjB,0EAA0E;IAC1E,gBAAgB,EAAE,eAAe,CAAC;IAElC,0DAA0D;IAC1D,IAAI,EAAE,QAAQ,CAAC;IAEf,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;OAOG;gBAED,OAAO,EAAE,OAAO,EAChB,gBAAgB,EAAE,eAAe,EACjC,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,SAAS;IAQrB;;;;OAIG;IACH,QAAQ,KAAK,aAAa,IAAI,MAAM,CAAC;IAErC;;;;OAIG;IACH,QAAQ,KAAK,aAAa,IAAI,MAAM,CAAC;CACtC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Abstract base class representing a bass button on a diatonic accordion.
3
+ *
4
+ * Bass buttons produce different sounds depending on bellows direction and provide
5
+ * the harmonic foundation for accordion music. This class defines the common properties
6
+ * and behavior that all bass types must implement.
7
+ */
8
+ export class Bass {
9
+ /**
10
+ * Creates a new Bass instance.
11
+ *
12
+ * @param bellows - The bellows direction for this bass button
13
+ * @param accordionTunning - The accordion tuning system
14
+ * @param type - The type of bass (note or chord)
15
+ * @param position - The physical position on the accordion
16
+ */
17
+ constructor(bellows, accordionTunning, type, position) {
18
+ this.bellows = bellows;
19
+ this.accordionTunning = accordionTunning;
20
+ this.type = type;
21
+ this.position = position;
22
+ }
23
+ }
24
+ //# sourceMappingURL=Bass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bass.js","sourceRoot":"","sources":["../../src/Basses/Bass.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,MAAM,OAAgB,IAAI;IAaxB;;;;;;;OAOG;IACH,YACE,OAAgB,EAChB,gBAAiC,EACjC,IAAc,EACd,QAAmB;QAEnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CAeF"}
@@ -0,0 +1,32 @@
1
+ import { type AccordionTuning, type Bellows } from "@Enums";
2
+ import type { IPosition } from "@Position";
3
+ import type { EnglishBassChordMetric, SpanishBassChordMetric } from "@Types";
4
+ import { Bass } from "./Bass";
5
+ /**
6
+ * Represents a bass chord button on an accordion.
7
+ * Extends the Bass class to provide chord-specific functionality with both English and Spanish metric notations.
8
+ */
9
+ export declare class BassChord extends Bass {
10
+ private _englishMetric;
11
+ private _spanishMetric;
12
+ /**
13
+ * Creates a new BassChord instance.
14
+ * @param bellows - The bellows direction (opening or closing) for this bass chord.
15
+ * @param accordionTuning - The tuning system of the accordion.
16
+ * @param position - The physical position of the bass chord button on the accordion.
17
+ * @param englishMetric - The English notation for the chord metric.
18
+ * @param spanishMetric - The Spanish notation for the chord metric.
19
+ */
20
+ constructor(bellows: Bellows, accordionTuning: AccordionTuning, position: IPosition, englishMetric: EnglishBassChordMetric, spanishMetric: SpanishBassChordMetric);
21
+ /**
22
+ * Gets the English metric notation for this bass chord.
23
+ * @returns The English metric notation string.
24
+ */
25
+ get englishMetric(): string;
26
+ /**
27
+ * Gets the Spanish metric notation for this bass chord.
28
+ * @returns The Spanish metric notation string.
29
+ */
30
+ get spanishMetric(): string;
31
+ }
32
+ //# sourceMappingURL=BassChord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BassChord.d.ts","sourceRoot":"","sources":["../../src/Basses/BassChord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,eAAe,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,qBAAa,SAAU,SAAQ,IAAI;IACjC,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,cAAc,CAAS;IAE/B;;;;;;;OAOG;gBAED,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,SAAS,EACnB,aAAa,EAAE,sBAAsB,EACrC,aAAa,EAAE,sBAAsB;IAOvC;;;OAGG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;CACF"}
@@ -0,0 +1,36 @@
1
+ import { BassType } from "@Enums";
2
+ import { Bass } from "./Bass";
3
+ /**
4
+ * Represents a bass chord button on an accordion.
5
+ * Extends the Bass class to provide chord-specific functionality with both English and Spanish metric notations.
6
+ */
7
+ export class BassChord extends Bass {
8
+ /**
9
+ * Creates a new BassChord instance.
10
+ * @param bellows - The bellows direction (opening or closing) for this bass chord.
11
+ * @param accordionTuning - The tuning system of the accordion.
12
+ * @param position - The physical position of the bass chord button on the accordion.
13
+ * @param englishMetric - The English notation for the chord metric.
14
+ * @param spanishMetric - The Spanish notation for the chord metric.
15
+ */
16
+ constructor(bellows, accordionTuning, position, englishMetric, spanishMetric) {
17
+ super(bellows, accordionTuning, BassType.Chord, position);
18
+ this._englishMetric = englishMetric;
19
+ this._spanishMetric = spanishMetric;
20
+ }
21
+ /**
22
+ * Gets the English metric notation for this bass chord.
23
+ * @returns The English metric notation string.
24
+ */
25
+ get englishMetric() {
26
+ return this._englishMetric;
27
+ }
28
+ /**
29
+ * Gets the Spanish metric notation for this bass chord.
30
+ * @returns The Spanish metric notation string.
31
+ */
32
+ get spanishMetric() {
33
+ return this._spanishMetric;
34
+ }
35
+ }
36
+ //# sourceMappingURL=BassChord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BassChord.js","sourceRoot":"","sources":["../../src/Basses/BassChord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsC,MAAM,QAAQ,CAAC;AAGtE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B;;;GAGG;AACH,MAAM,OAAO,SAAU,SAAQ,IAAI;IAIjC;;;;;;;OAOG;IACH,YACE,OAAgB,EAChB,eAAgC,EAChC,QAAmB,EACnB,aAAqC,EACrC,aAAqC;QAErC,KAAK,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACtC,CAAC;IAED;;;OAGG;IACH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF"}
@@ -0,0 +1,37 @@
1
+ import { Bass } from "./Bass";
2
+ import { type AccordionTuning, type Bellows } from "@Enums";
3
+ import type { INote } from "@Notes";
4
+ import type { IPosition } from "@Position";
5
+ /**
6
+ * Represents a bass note on a diatonic accordion.
7
+ *
8
+ * A bass note is a single note played on the bass side of the accordion,
9
+ * as opposed to a bass chord which plays multiple notes simultaneously.
10
+ *
11
+ * @extends Bass
12
+ */
13
+ export declare class BassNote extends Bass {
14
+ private _note;
15
+ /**
16
+ * Creates a new bass note instance.
17
+ *
18
+ * @param bellows - The bellows direction (push or pull) for this bass note
19
+ * @param accordionTuning - The tuning system of the accordion
20
+ * @param position - The physical position of this bass note on the keyboard
21
+ * @param note - The musical note that this bass note represents
22
+ */
23
+ constructor(bellows: Bellows, accordionTuning: AccordionTuning, position: IPosition, note: INote);
24
+ /**
25
+ * Gets the English metric notation for this bass note.
26
+ *
27
+ * @returns The English notation representation of the note
28
+ */
29
+ get englishMetric(): string;
30
+ /**
31
+ * Gets the Spanish metric notation for this bass note.
32
+ *
33
+ * @returns The Spanish notation representation of the note
34
+ */
35
+ get spanishMetric(): string;
36
+ }
37
+ //# sourceMappingURL=BassNote.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BassNote.d.ts","sourceRoot":"","sources":["../../src/Basses/BassNote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAY,KAAK,eAAe,EAAE,KAAK,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;;;;GAOG;AACH,qBAAa,QAAS,SAAQ,IAAI;IAChC,OAAO,CAAC,KAAK,CAAQ;IAErB;;;;;;;OAOG;gBAED,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,SAAS,EACnB,IAAI,EAAE,KAAK;IAMb;;;;OAIG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;;;OAIG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;CACF"}
@@ -0,0 +1,41 @@
1
+ import { Bass } from "./Bass"; //Avoid circular dependency by importing only the base class
2
+ import { BassType } from "@Enums";
3
+ /**
4
+ * Represents a bass note on a diatonic accordion.
5
+ *
6
+ * A bass note is a single note played on the bass side of the accordion,
7
+ * as opposed to a bass chord which plays multiple notes simultaneously.
8
+ *
9
+ * @extends Bass
10
+ */
11
+ export class BassNote extends Bass {
12
+ /**
13
+ * Creates a new bass note instance.
14
+ *
15
+ * @param bellows - The bellows direction (push or pull) for this bass note
16
+ * @param accordionTuning - The tuning system of the accordion
17
+ * @param position - The physical position of this bass note on the keyboard
18
+ * @param note - The musical note that this bass note represents
19
+ */
20
+ constructor(bellows, accordionTuning, position, note) {
21
+ super(bellows, accordionTuning, BassType.Note, position);
22
+ this._note = note;
23
+ }
24
+ /**
25
+ * Gets the English metric notation for this bass note.
26
+ *
27
+ * @returns The English notation representation of the note
28
+ */
29
+ get englishMetric() {
30
+ return this._note.englishMetric;
31
+ }
32
+ /**
33
+ * Gets the Spanish metric notation for this bass note.
34
+ *
35
+ * @returns The Spanish notation representation of the note
36
+ */
37
+ get spanishMetric() {
38
+ return this._note.spanishMetric;
39
+ }
40
+ }
41
+ //# sourceMappingURL=BassNote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BassNote.js","sourceRoot":"","sources":["../../src/Basses/BassNote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC,CAAC,4DAA4D;AAC3F,OAAO,EAAE,QAAQ,EAAsC,MAAM,QAAQ,CAAC;AAItE;;;;;;;GAOG;AACH,MAAM,OAAO,QAAS,SAAQ,IAAI;IAGhC;;;;;;;OAOG;IACH,YACE,OAAgB,EAChB,eAAgC,EAChC,QAAmB,EACnB,IAAW;QAEX,KAAK,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACzD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED;;;;OAIG;IACH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,IAAI,aAAa;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;IAClC,CAAC;CACF"}
@@ -0,0 +1,4 @@
1
+ export * from "./Bass";
2
+ export * from "./BassChord";
3
+ export * from "./BassNote";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Basses/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./Bass";
2
+ export * from "./BassChord";
3
+ export * from "./BassNote";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Basses/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Custom error types for the diatonico models library.
3
+ * Enables precise error handling and better error categorization.
4
+ */
5
+ /**
6
+ * Base error class for all domain-specific errors.
7
+ * Extends Error to maintain stack traces and standard error behavior.
8
+ */
9
+ export declare class DiatonicoError extends Error {
10
+ /**
11
+ * Creates a new DiatonicoError instance.
12
+ * @param message - The error message
13
+ */
14
+ constructor(message: string);
15
+ }
16
+ /**
17
+ * Thrown when a requested resource (note, scale, tonality) cannot be found.
18
+ *
19
+ * @example
20
+ * ```typescript
21
+ * try {
22
+ * const note = findNote(tuning, bellows, position);
23
+ * } catch (error) {
24
+ * if (error instanceof NotFoundError) {
25
+ * console.log("Note not available for this configuration");
26
+ * }
27
+ * }
28
+ * ```
29
+ */
30
+ export declare class NotFoundError extends DiatonicoError {
31
+ /**
32
+ * Creates a new NotFoundError instance.
33
+ * @param resourceType - The type of resource that wasn't found (e.g., "Note", "Scale")
34
+ * @param details - Additional context about what was being searched for
35
+ */
36
+ constructor(resourceType: string, details: string);
37
+ }
38
+ /**
39
+ * Thrown when an operation cannot be completed due to missing or incompatible configuration.
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * try {
44
+ * const keyboard = KeyboardFactory.createKeyboard(tuning, bellows);
45
+ * } catch (error) {
46
+ * if (error instanceof ConfigurationError) {
47
+ * console.log("Configuration not available");
48
+ * }
49
+ * }
50
+ * ```
51
+ */
52
+ export declare class ConfigurationError extends DiatonicoError {
53
+ /**
54
+ * Creates a new ConfigurationError instance.
55
+ * @param message - Description of the configuration problem
56
+ */
57
+ constructor(message: string);
58
+ }
59
+ //# sourceMappingURL=Errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../src/Core/Errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;OAGG;gBACS,OAAO,EAAE,MAAM;CAK5B;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,aAAc,SAAQ,cAAc;IAC/C;;;;OAIG;gBACS,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAKlD;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,kBAAmB,SAAQ,cAAc;IACpD;;;OAGG;gBACS,OAAO,EAAE,MAAM;CAK5B"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Custom error types for the diatonico models library.
3
+ * Enables precise error handling and better error categorization.
4
+ */
5
+ /**
6
+ * Base error class for all domain-specific errors.
7
+ * Extends Error to maintain stack traces and standard error behavior.
8
+ */
9
+ export class DiatonicoError extends Error {
10
+ /**
11
+ * Creates a new DiatonicoError instance.
12
+ * @param message - The error message
13
+ */
14
+ constructor(message) {
15
+ super(message);
16
+ this.name = "DiatonicoError";
17
+ Object.setPrototypeOf(this, DiatonicoError.prototype);
18
+ }
19
+ }
20
+ /**
21
+ * Thrown when a requested resource (note, scale, tonality) cannot be found.
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * try {
26
+ * const note = findNote(tuning, bellows, position);
27
+ * } catch (error) {
28
+ * if (error instanceof NotFoundError) {
29
+ * console.log("Note not available for this configuration");
30
+ * }
31
+ * }
32
+ * ```
33
+ */
34
+ export class NotFoundError extends DiatonicoError {
35
+ /**
36
+ * Creates a new NotFoundError instance.
37
+ * @param resourceType - The type of resource that wasn't found (e.g., "Note", "Scale")
38
+ * @param details - Additional context about what was being searched for
39
+ */
40
+ constructor(resourceType, details) {
41
+ super(`${resourceType} not found: ${details}`);
42
+ this.name = "NotFoundError";
43
+ Object.setPrototypeOf(this, NotFoundError.prototype);
44
+ }
45
+ }
46
+ /**
47
+ * Thrown when an operation cannot be completed due to missing or incompatible configuration.
48
+ *
49
+ * @example
50
+ * ```typescript
51
+ * try {
52
+ * const keyboard = KeyboardFactory.createKeyboard(tuning, bellows);
53
+ * } catch (error) {
54
+ * if (error instanceof ConfigurationError) {
55
+ * console.log("Configuration not available");
56
+ * }
57
+ * }
58
+ * ```
59
+ */
60
+ export class ConfigurationError extends DiatonicoError {
61
+ /**
62
+ * Creates a new ConfigurationError instance.
63
+ * @param message - Description of the configuration problem
64
+ */
65
+ constructor(message) {
66
+ super(message);
67
+ this.name = "ConfigurationError";
68
+ Object.setPrototypeOf(this, ConfigurationError.prototype);
69
+ }
70
+ }
71
+ //# sourceMappingURL=Errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/Core/Errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,KAAK;IACvC;;;OAGG;IACH,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACxD,CAAC;CACF;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAc;IAC/C;;;;OAIG;IACH,YAAY,YAAoB,EAAE,OAAe;QAC/C,KAAK,CAAC,GAAG,YAAY,eAAe,OAAO,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACvD,CAAC;CACF;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IACpD;;;OAGG;IACH,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Core module providing shared utilities, patterns, and type definitions
3
+ * used throughout the diatonico models library.
4
+ */
5
+ export * from "./Errors";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,UAAU,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Core module providing shared utilities, patterns, and type definitions
3
+ * used throughout the diatonico models library.
4
+ */
5
+ export * from "./Errors";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,UAAU,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type Bass } from "@Basses";
2
+ import { AccordionTuning, Bellows } from "@Enums";
3
+ type BassesByBellows = Record<Bellows, Bass[]>;
4
+ type BassesByTuning = Record<AccordionTuning, BassesByBellows>;
5
+ export declare const BassesData: BassesByTuning;
6
+ export {};
7
+ //# sourceMappingURL=BassesData.d.ts.map