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
@@ -1,151 +1,151 @@
1
- import { SmoLyric } from '../../smo/data/noteModifiers';
2
- import { SmoNote } from '../../smo/data/note';
3
- import { SmoScore } from '../../smo/data/score';
4
- import { ScaledPageLayout } from '../../smo/data/scoreModifiers';
5
- import { SmoMeasure, ISmoBeamGroup } from '../../smo/data/measure';
6
- import { TimeSignature, SmoTempoText } from '../../smo/data//measureModifiers';
7
- import { SvgPageMap } from './svgPageMap';
8
- import { TextFormatter } from '../../common/textformatter';
9
- /**
10
- * @category SuiRender
11
- */
12
- export interface SuiTickContext {
13
- widths: number[];
14
- tickCounts: number[];
15
- }
16
- /**
17
- * Estimated x, y position of the measure
18
- * @category SuiRender
19
- */
20
- export interface MeasureEstimate {
21
- measures: SmoMeasure[];
22
- x: number;
23
- y: number;
24
- }
25
- /**
26
- * @category SuiRender
27
- */
28
- export interface LineRender {
29
- systems: Record<number, SmoMeasure[]>;
30
- }
31
- /**
32
- * Keep track of start/end measures on a page. If the page
33
- * content doesn't change, and the measures don't change, we don't
34
- * need to re-render the content
35
- * @category SuiRender
36
- */
37
- export interface RenderedPage {
38
- startMeasure: number;
39
- endMeasure: number;
40
- }
41
- /**
42
- * Utilities for estimating measure/system/page width and height
43
- * @category SuiRender
44
- */
45
- export declare class SuiLayoutFormatter {
46
- score: SmoScore;
47
- systems: Record<number, LineRender>;
48
- columnMeasureMap: Record<number, SmoMeasure[]>;
49
- currentPage: number;
50
- svg: SvgPageMap;
51
- renderedPages: Record<number, RenderedPage | null>;
52
- lines: number[];
53
- constructor(score: SmoScore, svg: SvgPageMap, renderedPages: Record<number, RenderedPage | null>);
54
- /**
55
- * Once we know which line a measure is going on, make a map for it for easy
56
- * looking during rendering
57
- * @param measures
58
- * @param lineIndex
59
- * @param systemIndex
60
- */
61
- updateSystemMap(measures: SmoMeasure[], lineIndex: number, systemIndex: number): void;
62
- trimPages(startPageCount: number): boolean;
63
- /**
64
- * see if page breaks this boundary. If it does, bump the current page and move the system down
65
- * to the new page
66
- * @param scoreLayout
67
- * @param currentLine
68
- * @param bottomMeasure
69
- * @returns
70
- */
71
- checkPageBreak(scoreLayout: ScaledPageLayout, currentLine: SmoMeasure[], bottomMeasure: SmoMeasure): ScaledPageLayout;
72
- measureToLeft(measure: SmoMeasure): SmoMeasure;
73
- measureAbove(measure: SmoMeasure): SmoMeasure;
74
- /**
75
- * Estimate the dimensions of a column when it's rendered.
76
- * @param scoreLayout
77
- * @param measureIx
78
- * @param systemIndex
79
- * @param lineIndex
80
- * @param x
81
- * @param y
82
- * @returns { MeasureEstimate } - the measures in the column and the x, y location
83
- */
84
- estimateColumn(scoreLayout: ScaledPageLayout, measureIx: number, systemIndex: number, lineIndex: number, x: number, y: number): MeasureEstimate;
85
- /**
86
- * return true if this is the last measure, taking into account multimeasure rest
87
- * @param measureIx
88
- * @returns
89
- */
90
- isLastVisibleMeasure(measureIx: number): boolean;
91
- /**
92
- * Calculate the geometry for the entire score, based on estimated measure width and height.
93
- * @returns
94
- */
95
- layout(): void;
96
- static estimateMusicWidth(smoMeasure: SmoMeasure, tickContexts: Record<number, SuiTickContext>): number;
97
- static estimateStartSymbolWidth(smoMeasure: SmoMeasure): number;
98
- static estimateEndSymbolWidth(smoMeasure: SmoMeasure): number;
99
- estimateMeasureWidth(measure: SmoMeasure, scoreLayout: ScaledPageLayout, tickContexts: Record<number, SuiTickContext>): void;
100
- static _beamGroupForNote(measure: SmoMeasure, note: SmoNote): ISmoBeamGroup | null;
101
- /**
102
- * Format a full system:
103
- * 1. Lop the last measure off the end and move it to the first measure of the
104
- * next system, if it doesn't fit
105
- * 2. Justify the measures vertically
106
- * 3. Justify the columns horizontally
107
- * 4. Hide lines if they don't contain music
108
- * @param scoreLayout
109
- * @param measureEstimate
110
- * @param currentLine
111
- * @param columnCount
112
- * @param lastSystem
113
- */
114
- justifyY(scoreLayout: ScaledPageLayout, rowCount: number, currentLine: SmoMeasure[], lastSystem: boolean): void;
115
- /**
116
- * highest value is actually the one lowest on the page
117
- * @param measure
118
- * @param note
119
- * @returns
120
- */
121
- static _highestLowestHead(measure: SmoMeasure, note: SmoNote): {
122
- hi: number;
123
- lo: number;
124
- };
125
- static textFont(lyric: SmoLyric): TextFormatter;
126
- /**
127
- * Calculate the dimensions of symbols based on where in a system we are, like whether we need to show
128
- * the key signature, clef etc.
129
- * @param systemIndex
130
- * @param measure
131
- * @param clefLast
132
- * @param keySigLast
133
- * @param timeSigLast
134
- * @param tempoLast
135
- * @param score
136
- */
137
- calculateBeginningSymbols(systemIndex: number, measure: SmoMeasure, clefLast: string, keySigLast: string, timeSigLast: TimeSignature, tempoLast: SmoTempoText): void;
138
- /**
139
- * The baseline is the top line of the staff. aboveBaseline is a negative number
140
- * that indicates how high above the baseline the measure goes. belowBaseline
141
- * is a positive number that indicates how far below the baseline the measure goes.
142
- * the height of the measure is below-above. Vex always renders a staff such that
143
- * the y coordinate passed in for the stave is on the baseline.
144
- *
145
- * Note to past self: this was a really useful comment. Thank you.
146
- * **/
147
- estimateMeasureHeight(measure: SmoMeasure): {
148
- aboveBaseline: number;
149
- belowBaseline: number;
150
- };
151
- }
1
+ import { SmoLyric } from '../../smo/data/noteModifiers';
2
+ import { SmoNote } from '../../smo/data/note';
3
+ import { SmoScore } from '../../smo/data/score';
4
+ import { ScaledPageLayout } from '../../smo/data/scoreModifiers';
5
+ import { SmoMeasure, ISmoBeamGroup } from '../../smo/data/measure';
6
+ import { TimeSignature, SmoTempoText } from '../../smo/data//measureModifiers';
7
+ import { SvgPageMap } from './svgPageMap';
8
+ import { TextFormatter } from '../../common/textformatter';
9
+ /**
10
+ * @category SuiRender
11
+ */
12
+ export interface SuiTickContext {
13
+ widths: number[];
14
+ tickCounts: number[];
15
+ }
16
+ /**
17
+ * Estimated x, y position of the measure
18
+ * @category SuiRender
19
+ */
20
+ export interface MeasureEstimate {
21
+ measures: SmoMeasure[];
22
+ x: number;
23
+ y: number;
24
+ }
25
+ /**
26
+ * @category SuiRender
27
+ */
28
+ export interface LineRender {
29
+ systems: Record<number, SmoMeasure[]>;
30
+ }
31
+ /**
32
+ * Keep track of start/end measures on a page. If the page
33
+ * content doesn't change, and the measures don't change, we don't
34
+ * need to re-render the content
35
+ * @category SuiRender
36
+ */
37
+ export interface RenderedPage {
38
+ startMeasure: number;
39
+ endMeasure: number;
40
+ }
41
+ /**
42
+ * Utilities for estimating measure/system/page width and height
43
+ * @category SuiRender
44
+ */
45
+ export declare class SuiLayoutFormatter {
46
+ score: SmoScore;
47
+ systems: Record<number, LineRender>;
48
+ columnMeasureMap: Record<number, SmoMeasure[]>;
49
+ currentPage: number;
50
+ svg: SvgPageMap;
51
+ renderedPages: Record<number, RenderedPage | null>;
52
+ lines: number[];
53
+ constructor(score: SmoScore, svg: SvgPageMap, renderedPages: Record<number, RenderedPage | null>);
54
+ /**
55
+ * Once we know which line a measure is going on, make a map for it for easy
56
+ * looking during rendering
57
+ * @param measures
58
+ * @param lineIndex
59
+ * @param systemIndex
60
+ */
61
+ updateSystemMap(measures: SmoMeasure[], lineIndex: number, systemIndex: number): void;
62
+ trimPages(startPageCount: number): boolean;
63
+ /**
64
+ * see if page breaks this boundary. If it does, bump the current page and move the system down
65
+ * to the new page
66
+ * @param scoreLayout
67
+ * @param currentLine
68
+ * @param bottomMeasure
69
+ * @returns
70
+ */
71
+ checkPageBreak(scoreLayout: ScaledPageLayout, currentLine: SmoMeasure[], bottomMeasure: SmoMeasure): ScaledPageLayout;
72
+ measureToLeft(measure: SmoMeasure): SmoMeasure;
73
+ measureAbove(measure: SmoMeasure): SmoMeasure;
74
+ /**
75
+ * Estimate the dimensions of a column when it's rendered.
76
+ * @param scoreLayout
77
+ * @param measureIx
78
+ * @param systemIndex
79
+ * @param lineIndex
80
+ * @param x
81
+ * @param y
82
+ * @returns { MeasureEstimate } - the measures in the column and the x, y location
83
+ */
84
+ estimateColumn(scoreLayout: ScaledPageLayout, measureIx: number, systemIndex: number, lineIndex: number, x: number, y: number): MeasureEstimate;
85
+ /**
86
+ * return true if this is the last measure, taking into account multimeasure rest
87
+ * @param measureIx
88
+ * @returns
89
+ */
90
+ isLastVisibleMeasure(measureIx: number): boolean;
91
+ /**
92
+ * Calculate the geometry for the entire score, based on estimated measure width and height.
93
+ * @returns
94
+ */
95
+ layout(): void;
96
+ static estimateMusicWidth(smoMeasure: SmoMeasure, tickContexts: Record<number, SuiTickContext>): number;
97
+ static estimateStartSymbolWidth(smoMeasure: SmoMeasure): number;
98
+ static estimateEndSymbolWidth(smoMeasure: SmoMeasure): number;
99
+ estimateMeasureWidth(measure: SmoMeasure, scoreLayout: ScaledPageLayout, tickContexts: Record<number, SuiTickContext>): void;
100
+ static _beamGroupForNote(measure: SmoMeasure, note: SmoNote): ISmoBeamGroup | null;
101
+ /**
102
+ * Format a full system:
103
+ * 1. Lop the last measure off the end and move it to the first measure of the
104
+ * next system, if it doesn't fit
105
+ * 2. Justify the measures vertically
106
+ * 3. Justify the columns horizontally
107
+ * 4. Hide lines if they don't contain music
108
+ * @param scoreLayout
109
+ * @param measureEstimate
110
+ * @param currentLine
111
+ * @param columnCount
112
+ * @param lastSystem
113
+ */
114
+ justifyY(scoreLayout: ScaledPageLayout, rowCount: number, currentLine: SmoMeasure[], lastSystem: boolean): void;
115
+ /**
116
+ * highest value is actually the one lowest on the page
117
+ * @param measure
118
+ * @param note
119
+ * @returns
120
+ */
121
+ static _highestLowestHead(measure: SmoMeasure, note: SmoNote): {
122
+ hi: number;
123
+ lo: number;
124
+ };
125
+ static textFont(lyric: SmoLyric): TextFormatter;
126
+ /**
127
+ * Calculate the dimensions of symbols based on where in a system we are, like whether we need to show
128
+ * the key signature, clef etc.
129
+ * @param systemIndex
130
+ * @param measure
131
+ * @param clefLast
132
+ * @param keySigLast
133
+ * @param timeSigLast
134
+ * @param tempoLast
135
+ * @param score
136
+ */
137
+ calculateBeginningSymbols(systemIndex: number, measure: SmoMeasure, clefLast: string, keySigLast: string, timeSigLast: TimeSignature, tempoLast: SmoTempoText): void;
138
+ /**
139
+ * The baseline is the top line of the staff. aboveBaseline is a negative number
140
+ * that indicates how high above the baseline the measure goes. belowBaseline
141
+ * is a positive number that indicates how far below the baseline the measure goes.
142
+ * the height of the measure is below-above. Vex always renders a staff such that
143
+ * the y coordinate passed in for the stave is on the baseline.
144
+ *
145
+ * Note to past self: this was a really useful comment. Thank you.
146
+ * **/
147
+ estimateMeasureHeight(measure: SmoMeasure): {
148
+ aboveBaseline: number;
149
+ belowBaseline: number;
150
+ };
151
+ }
@@ -1,43 +1,43 @@
1
- import { SvgBox, SvgPoint } from '../../smo/data/common';
2
- import { SmoMeasure } from '../../smo/data/measure';
3
- import { SmoSelector } from '../../smo/xform/selections';
4
- /**
5
- * SuiRender
6
- * @internal
7
- */
8
- export interface CodeRegion {
9
- time: number;
10
- percent: number;
11
- }
12
- /**
13
- * @category SuiRender
14
- */
15
- export declare class layoutDebug {
16
- static get values(): Record<string, number>;
17
- static get classes(): Record<number, string>;
18
- static get codeRegions(): Record<string, number>;
19
- static testThrow: boolean;
20
- static get codeRegionStrings(): string[];
21
- static mask: number;
22
- static _textDebug: number[];
23
- static timestampHash: Record<number, number>;
24
- static _dialogEvents: string[];
25
- static clearTimestamps(): void;
26
- static setTimestamp(region: number, millis: number): void;
27
- static printTimeReport(): void;
28
- static flagSet(value: number): number;
29
- static clearAll(): void;
30
- static setAll(): void;
31
- static setRenderFlags(): void;
32
- static clearDebugBoxes(value: number): void;
33
- static debugBox(svg: SVGSVGElement, box: SvgBox | null, flag: number): void;
34
- static setFlag(value: number): void;
35
- static setFlagDivs(): void;
36
- static updateScrollDebug(point: SvgPoint): void;
37
- static updateMouseDebug(client: SvgPoint, logical: SvgPoint, offset: SvgPoint): void;
38
- static updateDragDebug(client: SvgPoint, logical: SvgPoint, state: string): void;
39
- static updatePlayDebug(selector: SmoSelector, logical: SvgBox): void;
40
- static addTextDebug(value: number): void;
41
- static addDialogDebug(value: string): void;
42
- static measureHistory(measure: SmoMeasure, oldVal: string, newVal: any, description: string): void;
43
- }
1
+ import { SvgBox, SvgPoint } from '../../smo/data/common';
2
+ import { SmoMeasure } from '../../smo/data/measure';
3
+ import { SmoSelector } from '../../smo/xform/selections';
4
+ /**
5
+ * SuiRender
6
+ * @internal
7
+ */
8
+ export interface CodeRegion {
9
+ time: number;
10
+ percent: number;
11
+ }
12
+ /**
13
+ * @category SuiRender
14
+ */
15
+ export declare class layoutDebug {
16
+ static get values(): Record<string, number>;
17
+ static get classes(): Record<number, string>;
18
+ static get codeRegions(): Record<string, number>;
19
+ static testThrow: boolean;
20
+ static get codeRegionStrings(): string[];
21
+ static mask: number;
22
+ static _textDebug: number[];
23
+ static timestampHash: Record<number, number>;
24
+ static _dialogEvents: string[];
25
+ static clearTimestamps(): void;
26
+ static setTimestamp(region: number, millis: number): void;
27
+ static printTimeReport(): void;
28
+ static flagSet(value: number): number;
29
+ static clearAll(): void;
30
+ static setAll(): void;
31
+ static setRenderFlags(): void;
32
+ static clearDebugBoxes(value: number): void;
33
+ static debugBox(svg: SVGSVGElement, box: SvgBox | null, flag: number): void;
34
+ static setFlag(value: number): void;
35
+ static setFlagDivs(): void;
36
+ static updateScrollDebug(point: SvgPoint): void;
37
+ static updateMouseDebug(client: SvgPoint, logical: SvgPoint, offset: SvgPoint): void;
38
+ static updateDragDebug(client: SvgPoint, logical: SvgPoint, state: string): void;
39
+ static updatePlayDebug(selector: SmoSelector, logical: SvgBox): void;
40
+ static addTextDebug(value: number): void;
41
+ static addDialogDebug(value: string): void;
42
+ static measureHistory(measure: SmoMeasure, oldVal: string, newVal: any, description: string): void;
43
+ }
@@ -1,116 +1,116 @@
1
- import { SmoSelector, SmoSelection, ModifierTab } from '../../smo/xform/selections';
2
- import { OutlineInfo } from './svgHelpers';
3
- import { SuiScroller } from './scroller';
4
- import { SmoSystemStaff } from '../../smo/data/systemStaff';
5
- import { SmoMeasure } from '../../smo/data/measure';
6
- import { SmoNoteModifierBase } from '../../smo/data/noteModifiers';
7
- import { SvgBox } from '../../smo/data/common';
8
- import { SmoScore } from '../../smo/data/score';
9
- import { SvgPageMap } from './svgPageMap';
10
- /**
11
- * DI information about renderer, so we can notify renderer and it can contain
12
- * a tracker object
13
- * @param pageMap {@link SvgPageMap}: SvgPageMap - container of SVG elements and vex renderers
14
- * @param score {@link SmoScore}
15
- * @param dirty lets the caller know the display needs update
16
- * @param passState state machine in rendering part/all of the score
17
- * @param renderPromise awaits on render all
18
- * @param addToReplaceQueue adds a measure to the quick update queue
19
- * @param renderElement a little redundant with svg
20
- * @category SuiRender
21
- */
22
- export interface SuiRendererBase {
23
- pageMap: SvgPageMap;
24
- score: SmoScore | null;
25
- dirty: boolean;
26
- passState: number;
27
- renderPromise(): Promise<any>;
28
- addToReplaceQueue(mm: SmoSelection[]): void;
29
- renderElement: Element;
30
- }
31
- /**
32
- * used to perform highlights in the backgroundd
33
- * @category SuiRender
34
- */
35
- export interface HighlightQueue {
36
- selectionCount: number;
37
- deferred: boolean;
38
- }
39
- /**
40
- * Map the notes in the svg so they can respond to events and interact
41
- * with the mouse/keyboard
42
- * @category SuiRender
43
- */
44
- export declare abstract class SuiMapper {
45
- renderer: SuiRendererBase;
46
- scroller: SuiScroller;
47
- measureNoteMap: Record<string | number, SmoSelection>;
48
- modifierSelections: ModifierTab[];
49
- selections: SmoSelection[];
50
- localModifiers: ModifierTab[];
51
- modifierIndex: number;
52
- modifierSuggestion: ModifierTab | null;
53
- pitchIndex: number;
54
- deferHighlightMode: boolean;
55
- suggestion: SmoSelection | null;
56
- highlightQueue: HighlightQueue;
57
- mouseHintBox: OutlineInfo | null;
58
- selectionRects: Record<number, OutlineInfo[]>;
59
- outlines: Record<string, OutlineInfo>;
60
- mapping: boolean;
61
- constructor(renderer: SuiRendererBase, scroller: SuiScroller);
62
- abstract highlightSelection(): void;
63
- abstract _growSelectionRight(hold?: boolean): number;
64
- abstract _setModifierAsSuggestion(sel: ModifierTab): void;
65
- abstract _setArtifactAsSuggestion(sel: SmoSelection): void;
66
- abstract getIdleTime(): number;
67
- updateHighlight(): void;
68
- deferHighlight(): void;
69
- _createLocalModifiersList(): void;
70
- /**
71
- * When a modifier is selected graphically, update the selection list
72
- * and create a local modifier list
73
- * @param modifierTabs
74
- */
75
- createLocalModifiersFromModifierTabs(modifierTabs: ModifierTab[]): void;
76
- removeModifierSelectionBox(): void;
77
- clearModifierSelections(): void;
78
- loadScore(): void;
79
- clearMeasureMap(measure: SmoMeasure): void;
80
- _copySelectionsByMeasure(staffIndex: number, measureIndex: number): {
81
- ticks: number;
82
- selectors: SmoSelector[];
83
- };
84
- deleteMeasure(selection: SmoSelection): void;
85
- _updateNoteModifier(selection: SmoSelection, modMap: Record<string, boolean>, modifier: SmoNoteModifierBase, ix: number): number;
86
- _updateModifiers(): void;
87
- _getClosestTick(selector: SmoSelector): SmoSelection;
88
- _setModifierBoxes(measure: SmoMeasure): void;
89
- /**
90
- * returns true of the selections are adjacent
91
- * @param s1 a selections
92
- * @param s2 another election
93
- * @returns
94
- */
95
- isAdjacentSelection(s1: SmoSelection, s2: SmoSelection): boolean;
96
- areSelectionsAdjacent(): boolean;
97
- /**
98
- * This is the logic that stores the screen location of music after it's rendered
99
- */
100
- mapMeasure(staff: SmoSystemStaff, measure: SmoMeasure, printing: boolean): void;
101
- _getTicksFromSelections(): number;
102
- _copySelections(): SmoSelector[];
103
- getExtremeSelection(sign: number): SmoSelection;
104
- _selectClosest(selector: SmoSelector): void;
105
- updateMap(): void;
106
- createMousePositionBox(logicalBox: SvgBox): void;
107
- eraseMousePositionBox(): void;
108
- /**
109
- * Find any musical elements at the supplied screen coordinates and set them as the selection
110
- * @param bb
111
- * @returns
112
- */
113
- intersectingArtifact(bb: SvgBox): void;
114
- _getRectangleChain(selection: SmoSelection): number[];
115
- _updateMeasureNoteMap(artifact: SmoSelection, printing: boolean): void;
116
- }
1
+ import { SmoSelector, SmoSelection, ModifierTab } from '../../smo/xform/selections';
2
+ import { OutlineInfo } from './svgHelpers';
3
+ import { SuiScroller } from './scroller';
4
+ import { SmoSystemStaff } from '../../smo/data/systemStaff';
5
+ import { SmoMeasure } from '../../smo/data/measure';
6
+ import { SmoNoteModifierBase } from '../../smo/data/noteModifiers';
7
+ import { SvgBox } from '../../smo/data/common';
8
+ import { SmoScore } from '../../smo/data/score';
9
+ import { SvgPageMap } from './svgPageMap';
10
+ /**
11
+ * DI information about renderer, so we can notify renderer and it can contain
12
+ * a tracker object
13
+ * @param pageMap {@link SvgPageMap}: SvgPageMap - container of SVG elements and vex renderers
14
+ * @param score {@link SmoScore}
15
+ * @param dirty lets the caller know the display needs update
16
+ * @param passState state machine in rendering part/all of the score
17
+ * @param renderPromise awaits on render all
18
+ * @param addToReplaceQueue adds a measure to the quick update queue
19
+ * @param renderElement a little redundant with svg
20
+ * @category SuiRender
21
+ */
22
+ export interface SuiRendererBase {
23
+ pageMap: SvgPageMap;
24
+ score: SmoScore | null;
25
+ dirty: boolean;
26
+ passState: number;
27
+ renderPromise(): Promise<any>;
28
+ addToReplaceQueue(mm: SmoSelection[]): void;
29
+ renderElement: Element;
30
+ }
31
+ /**
32
+ * used to perform highlights in the backgroundd
33
+ * @category SuiRender
34
+ */
35
+ export interface HighlightQueue {
36
+ selectionCount: number;
37
+ deferred: boolean;
38
+ }
39
+ /**
40
+ * Map the notes in the svg so they can respond to events and interact
41
+ * with the mouse/keyboard
42
+ * @category SuiRender
43
+ */
44
+ export declare abstract class SuiMapper {
45
+ renderer: SuiRendererBase;
46
+ scroller: SuiScroller;
47
+ measureNoteMap: Record<string | number, SmoSelection>;
48
+ modifierSelections: ModifierTab[];
49
+ selections: SmoSelection[];
50
+ localModifiers: ModifierTab[];
51
+ modifierIndex: number;
52
+ modifierSuggestion: ModifierTab | null;
53
+ pitchIndex: number;
54
+ deferHighlightMode: boolean;
55
+ suggestion: SmoSelection | null;
56
+ highlightQueue: HighlightQueue;
57
+ mouseHintBox: OutlineInfo | null;
58
+ selectionRects: Record<number, OutlineInfo[]>;
59
+ outlines: Record<string, OutlineInfo>;
60
+ mapping: boolean;
61
+ constructor(renderer: SuiRendererBase, scroller: SuiScroller);
62
+ abstract highlightSelection(): void;
63
+ abstract _growSelectionRight(hold?: boolean): number;
64
+ abstract _setModifierAsSuggestion(sel: ModifierTab): void;
65
+ abstract _setArtifactAsSuggestion(sel: SmoSelection): void;
66
+ abstract getIdleTime(): number;
67
+ updateHighlight(): void;
68
+ deferHighlight(): void;
69
+ _createLocalModifiersList(): void;
70
+ /**
71
+ * When a modifier is selected graphically, update the selection list
72
+ * and create a local modifier list
73
+ * @param modifierTabs
74
+ */
75
+ createLocalModifiersFromModifierTabs(modifierTabs: ModifierTab[]): void;
76
+ removeModifierSelectionBox(): void;
77
+ clearModifierSelections(): void;
78
+ loadScore(): void;
79
+ clearMeasureMap(measure: SmoMeasure): void;
80
+ _copySelectionsByMeasure(staffIndex: number, measureIndex: number): {
81
+ ticks: number;
82
+ selectors: SmoSelector[];
83
+ };
84
+ deleteMeasure(selection: SmoSelection): void;
85
+ _updateNoteModifier(selection: SmoSelection, modMap: Record<string, boolean>, modifier: SmoNoteModifierBase, ix: number): number;
86
+ _updateModifiers(): void;
87
+ _getClosestTick(selector: SmoSelector): SmoSelection;
88
+ _setModifierBoxes(measure: SmoMeasure): void;
89
+ /**
90
+ * returns true of the selections are adjacent
91
+ * @param s1 a selections
92
+ * @param s2 another election
93
+ * @returns
94
+ */
95
+ isAdjacentSelection(s1: SmoSelection, s2: SmoSelection): boolean;
96
+ areSelectionsAdjacent(): boolean;
97
+ /**
98
+ * This is the logic that stores the screen location of music after it's rendered
99
+ */
100
+ mapMeasure(staff: SmoSystemStaff, measure: SmoMeasure, printing: boolean): void;
101
+ _getTicksFromSelections(): number;
102
+ _copySelections(): SmoSelector[];
103
+ getExtremeSelection(sign: number): SmoSelection;
104
+ _selectClosest(selector: SmoSelector): void;
105
+ updateMap(): void;
106
+ createMousePositionBox(logicalBox: SvgBox): void;
107
+ eraseMousePositionBox(): void;
108
+ /**
109
+ * Find any musical elements at the supplied screen coordinates and set them as the selection
110
+ * @param bb
111
+ * @returns
112
+ */
113
+ intersectingArtifact(bb: SvgBox): void;
114
+ _getRectangleChain(selection: SmoSelection): number[];
115
+ _updateMeasureNoteMap(artifact: SmoSelection, printing: boolean): void;
116
+ }