smoosic 1.0.25 → 1.0.26

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 (187) hide show
  1. package/build/smoosic.js +1 -1
  2. package/package.json +1 -1
  3. package/release/smoosic.js +1 -1
  4. package/src/application/exports.ts +1 -0
  5. package/types/src/application/application.d.ts +102 -102
  6. package/types/src/application/common.d.ts +74 -74
  7. package/types/src/application/configuration.d.ts +74 -74
  8. package/types/src/application/dom.d.ts +8 -8
  9. package/types/src/application/dynamicInit.d.ts +1 -1
  10. package/types/src/application/eventHandler.d.ts +78 -78
  11. package/types/src/application/exports.d.ts +494 -493
  12. package/types/src/application/generateVexTests.d.ts +10 -10
  13. package/types/src/application/keyCommands.d.ts +90 -90
  14. package/types/src/common/bootstrap.bundle.d.ts +1138 -1138
  15. package/types/src/common/htmlHelpers.d.ts +105 -105
  16. package/types/src/common/jszip.d.ts +2 -2
  17. package/types/src/common/midi-parser.d.ts +38 -38
  18. package/types/src/common/promiseHelpers.d.ts +30 -30
  19. package/types/src/common/serializationHelpers.d.ts +29 -29
  20. package/types/src/common/textformatter.d.ts +140 -140
  21. package/types/src/common/vex.d.ts +222 -222
  22. package/types/src/render/audio/musicCursor.d.ts +25 -25
  23. package/types/src/render/audio/oscillator.d.ts +98 -98
  24. package/types/src/render/audio/player.d.ts +141 -141
  25. package/types/src/render/audio/samples.d.ts +56 -56
  26. package/types/src/render/sui/configuration.d.ts +12 -12
  27. package/types/src/render/sui/formatter.d.ts +151 -151
  28. package/types/src/render/sui/layoutDebug.d.ts +43 -43
  29. package/types/src/render/sui/mapper.d.ts +116 -116
  30. package/types/src/render/sui/piano.d.ts +46 -46
  31. package/types/src/render/sui/renderState.d.ts +88 -88
  32. package/types/src/render/sui/scoreRender.d.ts +93 -93
  33. package/types/src/render/sui/scoreView.d.ts +267 -267
  34. package/types/src/render/sui/scoreViewOperations.d.ts +594 -594
  35. package/types/src/render/sui/scroller.d.ts +34 -34
  36. package/types/src/render/sui/svgHelpers.d.ts +85 -85
  37. package/types/src/render/sui/svgPageMap.d.ts +318 -318
  38. package/types/src/render/sui/textEdit.d.ts +310 -310
  39. package/types/src/render/sui/textRender.d.ts +189 -189
  40. package/types/src/render/sui/tracker.d.ts +90 -90
  41. package/types/src/render/vex/glyphDimensions.d.ts +23 -23
  42. package/types/src/render/vex/smoAdapter.d.ts +46 -46
  43. package/types/src/render/vex/toVex.d.ts +13 -13
  44. package/types/src/render/vex/vxMeasure.d.ts +95 -95
  45. package/types/src/render/vex/vxNote.d.ts +55 -55
  46. package/types/src/render/vex/vxSystem.d.ts +64 -64
  47. package/types/src/smo/data/common.d.ts +220 -220
  48. package/types/src/smo/data/measure.d.ts +510 -510
  49. package/types/src/smo/data/measureModifiers.d.ts +506 -506
  50. package/types/src/smo/data/music.d.ts +438 -438
  51. package/types/src/smo/data/note.d.ts +485 -485
  52. package/types/src/smo/data/noteModifiers.d.ts +590 -590
  53. package/types/src/smo/data/partInfo.d.ts +162 -162
  54. package/types/src/smo/data/score.d.ts +395 -395
  55. package/types/src/smo/data/scoreModifiers.d.ts +433 -433
  56. package/types/src/smo/data/scoreText.d.ts +277 -277
  57. package/types/src/smo/data/staffModifiers.d.ts +767 -767
  58. package/types/src/smo/data/systemStaff.d.ts +238 -238
  59. package/types/src/smo/data/tuplet.d.ts +146 -146
  60. package/types/src/smo/midi/midiToSmo.d.ts +198 -198
  61. package/types/src/smo/midi/smoToMidi.d.ts +23 -23
  62. package/types/src/smo/mxml/smoToXml.d.ts +165 -165
  63. package/types/src/smo/mxml/xmlHelpers.d.ts +140 -140
  64. package/types/src/smo/mxml/xmlState.d.ts +257 -257
  65. package/types/src/smo/mxml/xmlToSmo.d.ts +92 -92
  66. package/types/src/smo/xform/beamers.d.ts +46 -46
  67. package/types/src/smo/xform/copypaste.d.ts +99 -99
  68. package/types/src/smo/xform/operations.d.ts +127 -127
  69. package/types/src/smo/xform/roadmap.d.ts +70 -70
  70. package/types/src/smo/xform/selections.d.ts +153 -153
  71. package/types/src/smo/xform/tickDuration.d.ts +155 -155
  72. package/types/src/smo/xform/tickMap.d.ts +34 -34
  73. package/types/src/smo/xform/undo.d.ts +142 -142
  74. package/types/src/smo/xform/updateAudio.d.ts +9 -9
  75. package/types/src/styles/font_metrics/Commissioner-Medium-Metrics.d.ts +871 -871
  76. package/types/src/styles/font_metrics/ConcertOne-Regular.d.ts +871 -871
  77. package/types/src/styles/font_metrics/Merriweather-Regular.d.ts +871 -871
  78. package/types/src/styles/font_metrics/arial_metrics.d.ts +870 -870
  79. package/types/src/styles/font_metrics/ssp-sans-metrics.d.ts +871 -871
  80. package/types/src/styles/font_metrics/ssp-serif-metrics.d.ts +871 -871
  81. package/types/src/styles/font_metrics/times_metrics.d.ts +870 -870
  82. package/types/src/ui/buttons/button.d.ts +95 -95
  83. package/types/src/ui/buttons/collapsable.d.ts +42 -42
  84. package/types/src/ui/buttons/display.d.ts +23 -23
  85. package/types/src/ui/buttons/ribbon.d.ts +76 -76
  86. package/types/src/ui/common.d.ts +45 -45
  87. package/types/src/ui/composable/draggable.d.ts +12 -12
  88. package/types/src/ui/configuration.d.ts +31 -31
  89. package/types/src/ui/dialogs/adapter.d.ts +107 -107
  90. package/types/src/ui/dialogs/addMeasure.d.ts +20 -20
  91. package/types/src/ui/dialogs/arpeggio.d.ts +2 -2
  92. package/types/src/ui/dialogs/articulation.d.ts +2 -2
  93. package/types/src/ui/dialogs/audioSettings.d.ts +32 -32
  94. package/types/src/ui/dialogs/chordChange.d.ts +35 -35
  95. package/types/src/ui/dialogs/clefChange.d.ts +2 -2
  96. package/types/src/ui/dialogs/components/baseComponent.d.ts +158 -158
  97. package/types/src/ui/dialogs/components/button.d.ts +54 -54
  98. package/types/src/ui/dialogs/components/buttonArray.d.ts +101 -101
  99. package/types/src/ui/dialogs/components/checkdrop.d.ts +27 -27
  100. package/types/src/ui/dialogs/components/dragText.d.ts +27 -27
  101. package/types/src/ui/dialogs/components/dropdown.d.ts +78 -78
  102. package/types/src/ui/dialogs/components/fileDownload.d.ts +28 -28
  103. package/types/src/ui/dialogs/components/fontComponent.d.ts +32 -32
  104. package/types/src/ui/dialogs/components/noteText.d.ts +98 -98
  105. package/types/src/ui/dialogs/components/pitch.d.ts +95 -95
  106. package/types/src/ui/dialogs/components/rocker.d.ts +66 -66
  107. package/types/src/ui/dialogs/components/staffComponents.d.ts +77 -77
  108. package/types/src/ui/dialogs/components/textCheck.d.ts +38 -38
  109. package/types/src/ui/dialogs/components/textInPlace.d.ts +90 -90
  110. package/types/src/ui/dialogs/components/textInput.d.ts +58 -58
  111. package/types/src/ui/dialogs/components/tie.d.ts +41 -41
  112. package/types/src/ui/dialogs/components/toggle.d.ts +53 -53
  113. package/types/src/ui/dialogs/components/tree.d.ts +46 -46
  114. package/types/src/ui/dialogs/customTuplets.d.ts +25 -25
  115. package/types/src/ui/dialogs/dialog.d.ts +201 -201
  116. package/types/src/ui/dialogs/durations.d.ts +2 -2
  117. package/types/src/ui/dialogs/dynamics.d.ts +37 -37
  118. package/types/src/ui/dialogs/endings.d.ts +61 -61
  119. package/types/src/ui/dialogs/factory.d.ts +15 -15
  120. package/types/src/ui/dialogs/fileDialogs.d.ts +4 -4
  121. package/types/src/ui/dialogs/fonts.d.ts +2 -2
  122. package/types/src/ui/dialogs/globalLayout.d.ts +2 -2
  123. package/types/src/ui/dialogs/gracenote.d.ts +2 -2
  124. package/types/src/ui/dialogs/hairpin.d.ts +35 -35
  125. package/types/src/ui/dialogs/instrument.d.ts +3 -3
  126. package/types/src/ui/dialogs/keySignature.d.ts +33 -33
  127. package/types/src/ui/dialogs/library.d.ts +70 -70
  128. package/types/src/ui/dialogs/lyric.d.ts +39 -39
  129. package/types/src/ui/dialogs/measureFormat.d.ts +52 -52
  130. package/types/src/ui/dialogs/microtones.d.ts +2 -2
  131. package/types/src/ui/dialogs/noteHead.d.ts +2 -2
  132. package/types/src/ui/dialogs/ornament.d.ts +2 -2
  133. package/types/src/ui/dialogs/pageLayout.d.ts +2 -2
  134. package/types/src/ui/dialogs/partInfo.d.ts +2 -2
  135. package/types/src/ui/dialogs/pedalMarking.d.ts +35 -35
  136. package/types/src/ui/dialogs/pitch.d.ts +2 -2
  137. package/types/src/ui/dialogs/preferences.d.ts +2 -2
  138. package/types/src/ui/dialogs/scoreId.d.ts +2 -2
  139. package/types/src/ui/dialogs/scoreView.d.ts +2 -2
  140. package/types/src/ui/dialogs/slur.d.ts +57 -57
  141. package/types/src/ui/dialogs/staffGroup.d.ts +2 -2
  142. package/types/src/ui/dialogs/tabNote.d.ts +32 -32
  143. package/types/src/ui/dialogs/tabStave.d.ts +43 -43
  144. package/types/src/ui/dialogs/tempo.d.ts +50 -50
  145. package/types/src/ui/dialogs/textBlock.d.ts +61 -61
  146. package/types/src/ui/dialogs/textBracket.d.ts +35 -35
  147. package/types/src/ui/dialogs/tie.d.ts +41 -41
  148. package/types/src/ui/dialogs/timeSignature.d.ts +34 -34
  149. package/types/src/ui/dialogs/transposeScore.d.ts +2 -2
  150. package/types/src/ui/dialogs/volta.d.ts +40 -40
  151. package/types/src/ui/eventSource.d.ts +63 -63
  152. package/types/src/ui/exceptions.d.ts +12 -12
  153. package/types/src/ui/fileio/fileInput.d.ts +12 -12
  154. package/types/src/ui/fileio/library.d.ts +40 -40
  155. package/types/src/ui/fileio/xhrLoader.d.ts +18 -18
  156. package/types/src/ui/help.d.ts +22 -22
  157. package/types/src/ui/i18n/language.d.ts +37 -37
  158. package/types/src/ui/i18n/language_ar.d.ts +5 -5
  159. package/types/src/ui/i18n/language_de.d.ts +1 -1
  160. package/types/src/ui/i18n/language_en.d.ts +18 -18
  161. package/types/src/ui/i18n/translationEditor.d.ts +14 -14
  162. package/types/src/ui/keyBindings/default/editorKeys.d.ts +7 -7
  163. package/types/src/ui/keyBindings/default/trackerKeys.d.ts +7 -7
  164. package/types/src/ui/menus/beams.d.ts +13 -13
  165. package/types/src/ui/menus/edit.d.ts +8 -8
  166. package/types/src/ui/menus/file.d.ts +26 -26
  167. package/types/src/ui/menus/help.d.ts +8 -8
  168. package/types/src/ui/menus/keySignature.d.ts +13 -13
  169. package/types/src/ui/menus/language.d.ts +12 -12
  170. package/types/src/ui/menus/manager.d.ts +57 -57
  171. package/types/src/ui/menus/measure.d.ts +8 -8
  172. package/types/src/ui/menus/menu.d.ts +136 -136
  173. package/types/src/ui/menus/note.d.ts +8 -8
  174. package/types/src/ui/menus/partSelection.d.ts +19 -19
  175. package/types/src/ui/menus/parts.d.ts +50 -50
  176. package/types/src/ui/menus/score.d.ts +20 -20
  177. package/types/src/ui/menus/staffModifier.d.ts +21 -21
  178. package/types/src/ui/menus/text.d.ts +8 -8
  179. package/types/src/ui/menus/timeSignature.d.ts +12 -12
  180. package/types/src/ui/menus/tuplets.d.ts +13 -13
  181. package/types/src/ui/menus/voices.d.ts +8 -8
  182. package/types/src/ui/modalDialogs.d.ts +1 -1
  183. package/types/src/ui/navigation.d.ts +15 -15
  184. package/types/src/ui/qwerty.d.ts +41 -41
  185. package/types/src/ui/ribbonLayout/default/defaultRibbon.d.ts +15 -15
  186. package/types/src/ui/ribbonLayout/default/tabletRibbon.d.ts +22 -22
  187. package/types/typedoc.d.ts +158 -158
@@ -309,6 +309,7 @@ export * from '../ui/fileio/xhrLoader';
309
309
  export * from '../ui/help';
310
310
  export * from '../ui/common';
311
311
  export * from '../ui/i18n/language';
312
+ export * from '../ui/i18n/language_en';
312
313
  export * from '../ui/i18n/translationEditor';
313
314
  export * from '../ui/keyBindings/default/editorKeys';
314
315
  export * from '../ui/keyBindings/default/trackerKeys';
@@ -1,102 +1,102 @@
1
- import { SmoConfiguration, SmoConfigurationParams } from './configuration';
2
- import { SmoScore } from '../smo/data/score';
3
- import { UndoBuffer } from '../smo/xform/undo';
4
- import { SuiRenderState } from '../render/sui/renderState';
5
- import { SuiScoreViewOperations } from '../render/sui/scoreViewOperations';
6
- import { SuiTracker } from '../render/sui/tracker';
7
- import { SuiMenuManager } from '../ui/menus/manager';
8
- import { BrowserEventSource } from '../ui/eventSource';
9
- import { RibbonButtons } from '../ui/buttons/ribbon';
10
- import { SuiKeyCommands } from './keyCommands';
11
- import { SuiEventHandler } from './eventHandler';
12
- import { KeyBinding } from './common';
13
- export interface pairType {
14
- [key: string]: string;
15
- }
16
- /**
17
- * Score renderer instance
18
- * @internal
19
- */
20
- export interface SuiRendererInstance {
21
- view: SuiScoreViewOperations;
22
- eventSource: BrowserEventSource;
23
- undoBuffer: UndoBuffer;
24
- renderer: SuiRenderState;
25
- }
26
- /**
27
- * Global instance for debugging
28
- * @internal
29
- */
30
- export interface SuiInstance {
31
- view: SuiScoreViewOperations;
32
- eventSource: BrowserEventSource;
33
- undoBuffer: UndoBuffer;
34
- tracker: SuiTracker;
35
- keyCommands: SuiKeyCommands;
36
- menus: SuiMenuManager;
37
- eventHandler: SuiEventHandler;
38
- ribbon: RibbonButtons;
39
- }
40
- /**
41
- * Parse query string for application
42
- * @category SuiApplication
43
- */
44
- export declare class QueryParser {
45
- pairs: pairType[];
46
- queryPair(str: string): pairType;
47
- constructor();
48
- }
49
- /** SuiApplication
50
- * main entry point of application. Based on the configuration,
51
- * either start the default UI, or initialize library mode and
52
- * await further instructions.
53
- * @category SuiApplication
54
- */
55
- export declare class SuiApplication {
56
- scoreLibrary: any;
57
- instance: SuiInstance | null;
58
- config: SmoConfiguration;
59
- score: SmoScore | null;
60
- view: SuiScoreViewOperations | null;
61
- domElement: HTMLElement;
62
- static configure(params: Partial<SmoConfigurationParams>): Promise<SuiApplication>;
63
- constructor(config: SmoConfiguration);
64
- _getDomContainer(): HTMLElement;
65
- static instance: SuiInstance;
66
- static initSync(): void;
67
- /**
68
- // Different applications can create their own key bindings, these are the defaults.
69
- // Many editor commands can be reached by a single keystroke. For more advanced things there
70
- // are menus.
71
- */
72
- static get keyBindingDefaults(): KeyBinding[];
73
- /**
74
- * Initialize the library according to instruction in config object:
75
- * 1. Try to load a new score
76
- * 2. If in application mode, start the UI. If in translation mode, start translation
77
- * @returns
78
- */
79
- initialize(): Promise<SuiApplication>;
80
- /**
81
- * Create the initial score we use to populate the UI etc:
82
- * 0. if translation mode, return empty promise, it won't be used anyway
83
- * 1. if remoteScore is set in config, try to load from remote
84
- * 2. if initialScore is set, use that
85
- * 3. if a score is saved locally with quick save (browser local cache), use that
86
- * 4. if all else fails, return an 'empty' score.
87
- * @returns promise for a remote load. If a local load, will resolve immediately
88
- */
89
- createScore(): Promise<SmoScore | null>;
90
- _tryParse(scoreJson: string): SmoScore;
91
- _startApplication(): void;
92
- createView(score: SmoScore): SuiRendererInstance | null;
93
- /**
94
- * Convenience constructor, take the score and render it in the
95
- * configured rendering space.
96
- */
97
- createUi(): void;
98
- static loadMusicFont(face: string, url: string): Promise<void>;
99
- static registerFonts(): Promise<void>;
100
- _deferCreateTranslator(): void;
101
- static _deferLanguageSelection(lang: string): void;
102
- }
1
+ import { SmoConfiguration, SmoConfigurationParams } from './configuration';
2
+ import { SmoScore } from '../smo/data/score';
3
+ import { UndoBuffer } from '../smo/xform/undo';
4
+ import { SuiRenderState } from '../render/sui/renderState';
5
+ import { SuiScoreViewOperations } from '../render/sui/scoreViewOperations';
6
+ import { SuiTracker } from '../render/sui/tracker';
7
+ import { SuiMenuManager } from '../ui/menus/manager';
8
+ import { BrowserEventSource } from '../ui/eventSource';
9
+ import { RibbonButtons } from '../ui/buttons/ribbon';
10
+ import { SuiKeyCommands } from './keyCommands';
11
+ import { SuiEventHandler } from './eventHandler';
12
+ import { KeyBinding } from './common';
13
+ export interface pairType {
14
+ [key: string]: string;
15
+ }
16
+ /**
17
+ * Score renderer instance
18
+ * @internal
19
+ */
20
+ export interface SuiRendererInstance {
21
+ view: SuiScoreViewOperations;
22
+ eventSource: BrowserEventSource;
23
+ undoBuffer: UndoBuffer;
24
+ renderer: SuiRenderState;
25
+ }
26
+ /**
27
+ * Global instance for debugging
28
+ * @internal
29
+ */
30
+ export interface SuiInstance {
31
+ view: SuiScoreViewOperations;
32
+ eventSource: BrowserEventSource;
33
+ undoBuffer: UndoBuffer;
34
+ tracker: SuiTracker;
35
+ keyCommands: SuiKeyCommands;
36
+ menus: SuiMenuManager;
37
+ eventHandler: SuiEventHandler;
38
+ ribbon: RibbonButtons;
39
+ }
40
+ /**
41
+ * Parse query string for application
42
+ * @category SuiApplication
43
+ */
44
+ export declare class QueryParser {
45
+ pairs: pairType[];
46
+ queryPair(str: string): pairType;
47
+ constructor();
48
+ }
49
+ /** SuiApplication
50
+ * main entry point of application. Based on the configuration,
51
+ * either start the default UI, or initialize library mode and
52
+ * await further instructions.
53
+ * @category SuiApplication
54
+ */
55
+ export declare class SuiApplication {
56
+ scoreLibrary: any;
57
+ instance: SuiInstance | null;
58
+ config: SmoConfiguration;
59
+ score: SmoScore | null;
60
+ view: SuiScoreViewOperations | null;
61
+ domElement: HTMLElement;
62
+ static configure(params: Partial<SmoConfigurationParams>): Promise<SuiApplication>;
63
+ constructor(config: SmoConfiguration);
64
+ _getDomContainer(): HTMLElement;
65
+ static instance: SuiInstance;
66
+ static initSync(): void;
67
+ /**
68
+ // Different applications can create their own key bindings, these are the defaults.
69
+ // Many editor commands can be reached by a single keystroke. For more advanced things there
70
+ // are menus.
71
+ */
72
+ static get keyBindingDefaults(): KeyBinding[];
73
+ /**
74
+ * Initialize the library according to instruction in config object:
75
+ * 1. Try to load a new score
76
+ * 2. If in application mode, start the UI. If in translation mode, start translation
77
+ * @returns
78
+ */
79
+ initialize(): Promise<SuiApplication>;
80
+ /**
81
+ * Create the initial score we use to populate the UI etc:
82
+ * 0. if translation mode, return empty promise, it won't be used anyway
83
+ * 1. if remoteScore is set in config, try to load from remote
84
+ * 2. if initialScore is set, use that
85
+ * 3. if a score is saved locally with quick save (browser local cache), use that
86
+ * 4. if all else fails, return an 'empty' score.
87
+ * @returns promise for a remote load. If a local load, will resolve immediately
88
+ */
89
+ createScore(): Promise<SmoScore | null>;
90
+ _tryParse(scoreJson: string): SmoScore;
91
+ _startApplication(): void;
92
+ createView(score: SmoScore): SuiRendererInstance | null;
93
+ /**
94
+ * Convenience constructor, take the score and render it in the
95
+ * configured rendering space.
96
+ */
97
+ createUi(): void;
98
+ static loadMusicFont(face: string, url: string): Promise<void>;
99
+ static registerFonts(): Promise<void>;
100
+ _deferCreateTranslator(): void;
101
+ static _deferLanguageSelection(lang: string): void;
102
+ }
@@ -1,74 +1,74 @@
1
- import { SuiScoreViewOperations } from "../render/sui/scoreViewOperations";
2
- import { SuiTracker } from "../render/sui/tracker";
3
- import { CompleteNotifier } from "../ui/common";
4
- import { ModalComponent } from "../ui/common";
5
- import { BrowserEventSource, EventHandler } from "../ui/eventSource";
6
- export type trackerKeyAction = "moveHome" | "moveEnd" | "moveSelectionRight" | "moveSelectionLeft" | "moveSelectionUp" | "moveSelectionDown" | "moveSelectionRightMeasure" | "moveSelectionLeftMeasure" | "advanceModifierSelection" | "growSelectionRight" | "growSelectionLeft" | "growSelectionRightMeasure" | "growSelectionRightMeasure" | "moveSelectionPitchUp" | "moveSelectionPitchDown";
7
- export declare const trackerKeyActions: string[];
8
- export type editorKeyAction = "transposeUp" | "transposeDown" | "upOctave" | "downOctave" | "toggleCourtesyAccidental" | "toggleEnharmonic" | "doubleDuration" | "halveDuration" | "dotDuration" | "undotDuration" | "setPitch" | "slashGraceNotes" | "addGraceNote" | "removeGraceNote" | "playScore" | "stopPlayer" | "pausePlayer" | "togglePlayer" | "undo" | "copy" | "paste" | "makeTuplet" | "interval" | "unmakeTuplet" | "addMeasure" | "deleteNote" | "makeRest" | "unbeamSelections" | "beamSelections" | "toggleBeamDirection" | "addRemoveAccent" | "addRemoveTenuto" | "addRemoveStaccato" | "addRemovePizzicato" | "addRemoveMarcato";
9
- export declare const editorKeyActions: string[];
10
- export declare function isEditorKeyAction(action: string): boolean;
11
- export declare function isTrackerKeyAction(action: string): boolean;
12
- /**
13
- * A binding of a key to some action performed by a module
14
- * @category SuiApplication
15
- */
16
- export interface KeyBinding {
17
- event: string;
18
- key: string;
19
- ctrlKey: boolean;
20
- altKey: boolean;
21
- shiftKey: boolean;
22
- action: string;
23
- module?: string;
24
- }
25
- /**
26
- * parameters for the key handlers
27
- * @param view
28
- * @param slashMode indicates that the dreaded 'slash' menus are up
29
- * @param completeNotifier notified when modals close
30
- * @param tracker
31
- * @param eventSource register for event handlers
32
- * @category SuiApplication
33
- */
34
- export interface KeyCommandParams {
35
- view: SuiScoreViewOperations;
36
- slashMode: boolean;
37
- completeNotifier: CompleteNotifier;
38
- tracker: SuiTracker;
39
- eventSource: BrowserEventSource;
40
- }
41
- /**
42
- * Shared interface for menus, dialogs, etc that can
43
- * accept UI events
44
- * @category SuiApplication
45
- */
46
- export declare abstract class ModalEventHandler {
47
- abstract mouseMove(ev: any): void;
48
- abstract mouseClick(ev: any): Promise<void>;
49
- abstract evKey(evdata: any): Promise<void>;
50
- abstract keyUp(evdata: any): void;
51
- }
52
- export type handler = (ev: any) => void;
53
- /**
54
- * Dependency injection, sends events to a proxy object, gets around some
55
- * cyclic dependencies when bootstrapping the application.
56
- * @category SuiApplication
57
- */
58
- export declare class ModalEventHandlerProxy {
59
- _handler: ModalEventHandler | null;
60
- eventSource: BrowserEventSource;
61
- unbound: boolean;
62
- keydownHandler: EventHandler | null;
63
- keyupHandler: EventHandler | null;
64
- mouseMoveHandler: EventHandler | null;
65
- mouseClickHandler: EventHandler | null;
66
- constructor(evSource: BrowserEventSource);
67
- set handler(value: ModalEventHandler);
68
- evKey(ev: any): Promise<void>;
69
- keyUp(ev: any): void;
70
- mouseMove(ev: any): void;
71
- mouseClick(ev: any): Promise<void>;
72
- bindEvents(): void;
73
- unbindKeyboardForModal(dialog: ModalComponent): void;
74
- }
1
+ import { SuiScoreViewOperations } from "../render/sui/scoreViewOperations";
2
+ import { SuiTracker } from "../render/sui/tracker";
3
+ import { CompleteNotifier } from "../ui/common";
4
+ import { ModalComponent } from "../ui/common";
5
+ import { BrowserEventSource, EventHandler } from "../ui/eventSource";
6
+ export type trackerKeyAction = "moveHome" | "moveEnd" | "moveSelectionRight" | "moveSelectionLeft" | "moveSelectionUp" | "moveSelectionDown" | "moveSelectionRightMeasure" | "moveSelectionLeftMeasure" | "advanceModifierSelection" | "growSelectionRight" | "growSelectionLeft" | "growSelectionRightMeasure" | "growSelectionRightMeasure" | "moveSelectionPitchUp" | "moveSelectionPitchDown";
7
+ export declare const trackerKeyActions: string[];
8
+ export type editorKeyAction = "transposeUp" | "transposeDown" | "upOctave" | "downOctave" | "toggleCourtesyAccidental" | "toggleEnharmonic" | "doubleDuration" | "halveDuration" | "dotDuration" | "undotDuration" | "setPitch" | "slashGraceNotes" | "addGraceNote" | "removeGraceNote" | "playScore" | "stopPlayer" | "pausePlayer" | "togglePlayer" | "undo" | "copy" | "paste" | "makeTuplet" | "interval" | "unmakeTuplet" | "addMeasure" | "deleteNote" | "makeRest" | "unbeamSelections" | "beamSelections" | "toggleBeamDirection" | "addRemoveAccent" | "addRemoveTenuto" | "addRemoveStaccato" | "addRemovePizzicato" | "addRemoveMarcato";
9
+ export declare const editorKeyActions: string[];
10
+ export declare function isEditorKeyAction(action: string): boolean;
11
+ export declare function isTrackerKeyAction(action: string): boolean;
12
+ /**
13
+ * A binding of a key to some action performed by a module
14
+ * @category SuiApplication
15
+ */
16
+ export interface KeyBinding {
17
+ event: string;
18
+ key: string;
19
+ ctrlKey: boolean;
20
+ altKey: boolean;
21
+ shiftKey: boolean;
22
+ action: string;
23
+ module?: string;
24
+ }
25
+ /**
26
+ * parameters for the key handlers
27
+ * @param view
28
+ * @param slashMode indicates that the dreaded 'slash' menus are up
29
+ * @param completeNotifier notified when modals close
30
+ * @param tracker
31
+ * @param eventSource register for event handlers
32
+ * @category SuiApplication
33
+ */
34
+ export interface KeyCommandParams {
35
+ view: SuiScoreViewOperations;
36
+ slashMode: boolean;
37
+ completeNotifier: CompleteNotifier;
38
+ tracker: SuiTracker;
39
+ eventSource: BrowserEventSource;
40
+ }
41
+ /**
42
+ * Shared interface for menus, dialogs, etc that can
43
+ * accept UI events
44
+ * @category SuiApplication
45
+ */
46
+ export declare abstract class ModalEventHandler {
47
+ abstract mouseMove(ev: any): void;
48
+ abstract mouseClick(ev: any): Promise<void>;
49
+ abstract evKey(evdata: any): Promise<void>;
50
+ abstract keyUp(evdata: any): void;
51
+ }
52
+ export type handler = (ev: any) => void;
53
+ /**
54
+ * Dependency injection, sends events to a proxy object, gets around some
55
+ * cyclic dependencies when bootstrapping the application.
56
+ * @category SuiApplication
57
+ */
58
+ export declare class ModalEventHandlerProxy {
59
+ _handler: ModalEventHandler | null;
60
+ eventSource: BrowserEventSource;
61
+ unbound: boolean;
62
+ keydownHandler: EventHandler | null;
63
+ keyupHandler: EventHandler | null;
64
+ mouseMoveHandler: EventHandler | null;
65
+ mouseClickHandler: EventHandler | null;
66
+ constructor(evSource: BrowserEventSource);
67
+ set handler(value: ModalEventHandler);
68
+ evKey(ev: any): Promise<void>;
69
+ keyUp(ev: any): void;
70
+ mouseMove(ev: any): void;
71
+ mouseClick(ev: any): Promise<void>;
72
+ bindEvents(): void;
73
+ unbindKeyboardForModal(dialog: ModalComponent): void;
74
+ }
@@ -1,74 +1,74 @@
1
- /**
2
- * Superset of configuration required to initialize Smoosic, either the appliation or library.
3
- * @module configuration
4
- */
5
- import { SmoRenderConfiguration } from "../render/sui/configuration";
6
- import { SmoScore } from "../smo/data/score";
7
- import { ModalEventHandler } from "./common";
8
- import { KeyBindingConfiguration, SmoUiConfiguration } from "../ui/configuration";
9
- import { RibbonLayout } from "../ui/common";
10
- import { ButtonDefinition } from "../ui/buttons/button";
11
- import { SuiAudioAnimationParams } from "../render/audio/musicCursor";
12
- export type SmoMode = 'library' | 'application' | 'translate';
13
- export type ConfigurationStringOption = 'language' | 'libraryUrl' | 'remoteScore';
14
- export type ConfigurationNumberOption = 'demonPollTime' | 'idleRedrawTime';
15
- export declare var ConfigurationStringOptions: ConfigurationStringOption[];
16
- export declare var ConfigurationNumberOptions: ConfigurationNumberOption[];
17
- /**
18
- * Application configuration parameters, can be referenced by the running application or changed
19
- * @category SuiApplication
20
- */
21
- export interface SmoConfigurationParams {
22
- mode: SmoMode;
23
- smoPath?: string;
24
- language: string;
25
- initialScore?: string | SmoScore;
26
- remoteScore?: string;
27
- domContainer: string | HTMLElement;
28
- scoreDomContainer: string | HTMLElement;
29
- leftControls?: string | HTMLElement;
30
- topControls?: string | HTMLElement;
31
- libraryUrl?: string;
32
- demonPollTime: number;
33
- idleRedrawTime: number;
34
- ribbonLayout?: RibbonLayout;
35
- buttonDefinition?: ButtonDefinition[];
36
- audioAnimation: SuiAudioAnimationParams;
37
- }
38
- /**
39
- * Configures smoosic library or application. It is a union of UI, rendering and application configuration parameters
40
- * @param mode - score mode `'library' | 'application' | 'translate'`
41
- * Library mode starts the view but not the UI. application mode starts the UI and expects UI parameters.
42
- * translation mode is the translation editor, for creating translations for dialog/menu components
43
- * @param language - startup language
44
- * @param initialScore? - the library score JSON, if you are loading from a JSON string, or a SmoScore object
45
- * @param remoteScore? - path to a remote score, if loading from an URL
46
- * @param scoreDomContainer - the parent of the svg container (required)
47
- * @param leftControls - the location of the vertical button control, applies if mode is 'application'
48
- * @param topControls - the location of the horizontal button control, applies if mode is 'application'
49
- * @param libraryUrl - loader URL for Smo libraries, applies if application mode
50
- * @param demonPollTime - how often we poll the score to see if it's changed
51
- * @param idleRedrawTime - how often the entire score re-renders
52
- * @category SuiApplication
53
- */
54
- export declare class SmoConfiguration implements SmoRenderConfiguration, SmoUiConfiguration {
55
- mode: SmoMode;
56
- language: string;
57
- domContainer?: string | HTMLElement;
58
- initialScore?: string | SmoScore;
59
- remoteScore?: string;
60
- leftControls?: string | HTMLElement;
61
- topControls?: string | HTMLElement;
62
- scoreDomContainer: string | HTMLElement;
63
- libraryUrl?: string;
64
- demonPollTime: number;
65
- idleRedrawTime: number;
66
- keys?: KeyBindingConfiguration;
67
- eventHandler?: ModalEventHandler;
68
- ribbonLayout: RibbonLayout;
69
- audioAnimation: SuiAudioAnimationParams;
70
- buttonDefinition: ButtonDefinition[];
71
- static get defaults(): SmoConfiguration;
72
- static get keyBindingDefaults(): KeyBindingConfiguration;
73
- constructor(params: Partial<SmoConfigurationParams>);
74
- }
1
+ /**
2
+ * Superset of configuration required to initialize Smoosic, either the appliation or library.
3
+ * @module configuration
4
+ */
5
+ import { SmoRenderConfiguration } from "../render/sui/configuration";
6
+ import { SmoScore } from "../smo/data/score";
7
+ import { ModalEventHandler } from "./common";
8
+ import { KeyBindingConfiguration, SmoUiConfiguration } from "../ui/configuration";
9
+ import { RibbonLayout } from "../ui/common";
10
+ import { ButtonDefinition } from "../ui/buttons/button";
11
+ import { SuiAudioAnimationParams } from "../render/audio/musicCursor";
12
+ export type SmoMode = 'library' | 'application' | 'translate';
13
+ export type ConfigurationStringOption = 'language' | 'libraryUrl' | 'remoteScore';
14
+ export type ConfigurationNumberOption = 'demonPollTime' | 'idleRedrawTime';
15
+ export declare var ConfigurationStringOptions: ConfigurationStringOption[];
16
+ export declare var ConfigurationNumberOptions: ConfigurationNumberOption[];
17
+ /**
18
+ * Application configuration parameters, can be referenced by the running application or changed
19
+ * @category SuiApplication
20
+ */
21
+ export interface SmoConfigurationParams {
22
+ mode: SmoMode;
23
+ smoPath?: string;
24
+ language: string;
25
+ initialScore?: string | SmoScore;
26
+ remoteScore?: string;
27
+ domContainer: string | HTMLElement;
28
+ scoreDomContainer: string | HTMLElement;
29
+ leftControls?: string | HTMLElement;
30
+ topControls?: string | HTMLElement;
31
+ libraryUrl?: string;
32
+ demonPollTime: number;
33
+ idleRedrawTime: number;
34
+ ribbonLayout?: RibbonLayout;
35
+ buttonDefinition?: ButtonDefinition[];
36
+ audioAnimation: SuiAudioAnimationParams;
37
+ }
38
+ /**
39
+ * Configures smoosic library or application. It is a union of UI, rendering and application configuration parameters
40
+ * @param mode - score mode `'library' | 'application' | 'translate'`
41
+ * Library mode starts the view but not the UI. application mode starts the UI and expects UI parameters.
42
+ * translation mode is the translation editor, for creating translations for dialog/menu components
43
+ * @param language - startup language
44
+ * @param initialScore? - the library score JSON, if you are loading from a JSON string, or a SmoScore object
45
+ * @param remoteScore? - path to a remote score, if loading from an URL
46
+ * @param scoreDomContainer - the parent of the svg container (required)
47
+ * @param leftControls - the location of the vertical button control, applies if mode is 'application'
48
+ * @param topControls - the location of the horizontal button control, applies if mode is 'application'
49
+ * @param libraryUrl - loader URL for Smo libraries, applies if application mode
50
+ * @param demonPollTime - how often we poll the score to see if it's changed
51
+ * @param idleRedrawTime - how often the entire score re-renders
52
+ * @category SuiApplication
53
+ */
54
+ export declare class SmoConfiguration implements SmoRenderConfiguration, SmoUiConfiguration {
55
+ mode: SmoMode;
56
+ language: string;
57
+ domContainer?: string | HTMLElement;
58
+ initialScore?: string | SmoScore;
59
+ remoteScore?: string;
60
+ leftControls?: string | HTMLElement;
61
+ topControls?: string | HTMLElement;
62
+ scoreDomContainer: string | HTMLElement;
63
+ libraryUrl?: string;
64
+ demonPollTime: number;
65
+ idleRedrawTime: number;
66
+ keys?: KeyBindingConfiguration;
67
+ eventHandler?: ModalEventHandler;
68
+ ribbonLayout: RibbonLayout;
69
+ audioAnimation: SuiAudioAnimationParams;
70
+ buttonDefinition: ButtonDefinition[];
71
+ static get defaults(): SmoConfiguration;
72
+ static get keyBindingDefaults(): KeyBindingConfiguration;
73
+ constructor(params: Partial<SmoConfigurationParams>);
74
+ }
@@ -1,8 +1,8 @@
1
- /**
2
- * Construct the DOM scaffolding for the application
3
- * @category SuiApplication
4
- */
5
- export declare class SuiDom {
6
- static get scrollRegionId(): string;
7
- static createUiDom(uiDomContainer: HTMLElement | string | undefined): HTMLElement;
8
- }
1
+ /**
2
+ * Construct the DOM scaffolding for the application
3
+ * @category SuiApplication
4
+ */
5
+ export declare class SuiDom {
6
+ static get scrollRegionId(): string;
7
+ static createUiDom(uiDomContainer: HTMLElement | string | undefined): HTMLElement;
8
+ }
@@ -1 +1 @@
1
- export declare const dynamicCtorInit: () => void;
1
+ export declare const dynamicCtorInit: () => void;