smoosic 1.0.34 → 1.0.35
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.
- package/build/html/smoosic.html +1 -0
- package/build/smoosic.js +36 -14
- package/package.json +1 -1
- package/release/html/smoosic.html +4 -3
- package/release/smoosic.js +36 -14
- package/release/styles/general.css +15 -0
- package/src/application/common.ts +20 -0
- package/src/application/eventHandler.ts +44 -8
- package/src/render/sui/NoteEntryCaret.ts +739 -0
- package/src/render/sui/NoteEntryMediator.ts +58 -0
- package/src/render/sui/mapper.ts +22 -4
- package/src/render/sui/scoreRender.ts +7 -7
- package/src/render/sui/scoreViewOperations.ts +46 -0
- package/src/render/sui/tracker.ts +93 -47
- package/src/render/vex/vxMeasure.ts +2 -1
- package/src/render/vex/vxNote.ts +1 -0
- package/src/smo/data/music.ts +17 -0
- package/src/smo/data/note.ts +3 -1
- package/src/smo/data/noteModifiers.ts +2 -0
- package/src/smo/data/scoreModifiers.ts +0 -3
- package/src/styles/general.css +22 -0
- package/src/ui/components/dialogs/scorePreferences.vue +1 -11
- package/types/src/application/application.d.ts +102 -102
- package/types/src/application/configuration.d.ts +74 -74
- package/types/src/application/dynamicInit.d.ts +1 -1
- package/types/src/application/eventHandler.d.ts +78 -78
- package/types/src/application/exports.d.ts +494 -494
- package/types/src/render/audio/oscillator.d.ts +98 -98
- package/types/src/render/audio/player.d.ts +141 -141
- package/types/src/render/audio/samples.d.ts +56 -56
- package/types/src/render/sui/configuration.d.ts +12 -12
- package/types/src/render/sui/formatter.d.ts +151 -151
- package/types/src/render/sui/layoutDebug.d.ts +43 -43
- package/types/src/render/sui/mapper.d.ts +116 -116
- package/types/src/render/sui/renderState.d.ts +88 -88
- package/types/src/render/sui/scoreRender.d.ts +93 -93
- package/types/src/render/sui/scoreView.d.ts +267 -267
- package/types/src/render/sui/scoreViewOperations.d.ts +594 -594
- package/types/src/render/sui/scroller.d.ts +34 -34
- package/types/src/render/sui/svgPageMap.d.ts +318 -318
- package/types/src/render/sui/textEdit.d.ts +310 -310
- package/types/src/render/vex/vxMeasure.d.ts +95 -95
- package/types/src/smo/data/common.d.ts +220 -220
- package/types/src/smo/data/measure.d.ts +510 -510
- package/types/src/smo/data/measureModifiers.d.ts +506 -506
- package/types/src/smo/data/scoreModifiers.d.ts +433 -433
- package/types/src/smo/xform/selections.d.ts +153 -153
- package/types/src/ui/common.d.ts +45 -45
- package/types/src/ui/configuration.d.ts +31 -31
- package/types/src/ui/dialogs/chordChange.d.ts +35 -35
- package/types/src/ui/dialogs/components/baseComponent.d.ts +158 -158
- package/types/src/ui/dialogs/components/button.d.ts +54 -54
- package/types/src/ui/dialogs/components/dropdown.d.ts +78 -78
- package/types/src/ui/dialogs/components/pitch.d.ts +95 -95
- package/types/src/ui/dialogs/components/rocker.d.ts +66 -66
- package/types/src/ui/dialogs/components/textInPlace.d.ts +90 -90
- package/types/src/ui/dialogs/components/textInput.d.ts +58 -58
- package/types/src/ui/dialogs/components/toggle.d.ts +53 -53
- package/types/src/ui/dialogs/dialog.d.ts +201 -201
- package/types/src/ui/dialogs/endings.d.ts +61 -61
- package/types/src/ui/dialogs/lyric.d.ts +39 -39
- package/types/src/ui/dialogs/measureFormat.d.ts +52 -52
- package/types/src/ui/dialogs/textBlock.d.ts +61 -61
- package/types/src/ui/exceptions.d.ts +12 -12
- package/types/src/ui/menus/manager.d.ts +57 -57
- package/types/src/ui/navigation.d.ts +15 -15
- package/types/typedoc.d.ts +158 -158
- package/release/styles/styles.css +0 -0
- package/src/styles/fonts/Roboto-Italic-VariableFont_wdth,wght.ttf +0 -0
- package/src/styles/fonts/Roboto-VariableFont_wdth,wght.ttf +0 -0
- package/src/styles/styles.css +0 -0
|
@@ -1,153 +1,153 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Editing operations are performed on selections. A selection can be different things, from a single pitch
|
|
3
|
-
* to many notes. These classes standardize some standard selection operations.
|
|
4
|
-
* SmoSelector
|
|
5
|
-
* @module /smo/xform/selections
|
|
6
|
-
*/
|
|
7
|
-
import { SmoScore, SmoModifier } from '../data/score';
|
|
8
|
-
import { SmoMeasure } from '../data/measure';
|
|
9
|
-
import { SmoNote } from '../data/note';
|
|
10
|
-
import { SmoSystemStaff } from '../data/systemStaff';
|
|
11
|
-
import { SvgBox, SvgPoint } from '../data/common';
|
|
12
|
-
/**
|
|
13
|
-
* Modifier tab is a modifier and its bounding box, that can be tabbed to with the keyboard
|
|
14
|
-
* @category SmoTransform
|
|
15
|
-
*/
|
|
16
|
-
export interface ModifierTab {
|
|
17
|
-
modifier: SmoModifier;
|
|
18
|
-
selection: SmoSelection | null;
|
|
19
|
-
box: SvgBox;
|
|
20
|
-
index: number;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* There are 2 parts to a selection: the actual musical bits that are selected, and the
|
|
24
|
-
* indices that define what was selected. This is the latter. The actual object does not
|
|
25
|
-
* have any methods so there is no constructor.
|
|
26
|
-
* @category SmoTransform
|
|
27
|
-
* */
|
|
28
|
-
export declare class SmoSelector {
|
|
29
|
-
static get default(): SmoSelector;
|
|
30
|
-
staff: number;
|
|
31
|
-
measure: number;
|
|
32
|
-
voice: number;
|
|
33
|
-
tick: number;
|
|
34
|
-
pitches: number[];
|
|
35
|
-
static measureSelector(staff: number, measure: number): SmoSelector;
|
|
36
|
-
static fromMeasure(measure: SmoMeasure): SmoSelector;
|
|
37
|
-
static sameNote(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
38
|
-
static sameMeasure(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
39
|
-
static sameStaff(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Return gt, not considering the voice (e.g. gt in time)
|
|
42
|
-
* @param sel1
|
|
43
|
-
* @param sel2
|
|
44
|
-
*/
|
|
45
|
-
static gtInTime(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* return true if sel1 > sel2
|
|
48
|
-
*/
|
|
49
|
-
static gt(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
50
|
-
static eq(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
51
|
-
static neq(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
52
|
-
/**
|
|
53
|
-
* return true if sel1 < sel2
|
|
54
|
-
*/
|
|
55
|
-
static lt(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* return true if sel1 >= sel2
|
|
58
|
-
*/
|
|
59
|
-
static gteq(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
60
|
-
/**
|
|
61
|
-
* return true if sel1 <= sel2
|
|
62
|
-
*/
|
|
63
|
-
static lteq(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
64
|
-
static order(a: SmoSelector, b: SmoSelector): SmoSelector[];
|
|
65
|
-
static getNoteKey(selector: SmoSelector): string;
|
|
66
|
-
static getMeasureKey(selector: SmoSelector): string;
|
|
67
|
-
static contains(testSel: SmoSelector, selStart: SmoSelector, selEnd: SmoSelector): boolean;
|
|
68
|
-
static overlaps(start1: SmoSelector, end1: SmoSelector, start2: SmoSelector, end2: SmoSelector): boolean;
|
|
69
|
-
static selectorNoteKey(selector: SmoSelector): string;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* The fields in a selection. We have the 5 musical cardinal directions of staff, measure, note, pitches,
|
|
73
|
-
* and a selector. The pitches are indices
|
|
74
|
-
* @category SmoTransform
|
|
75
|
-
* */
|
|
76
|
-
export interface SmoSelectionParams {
|
|
77
|
-
selector: SmoSelector;
|
|
78
|
-
_staff: SmoSystemStaff;
|
|
79
|
-
_measure: SmoMeasure;
|
|
80
|
-
_note?: SmoNote;
|
|
81
|
-
_pitches?: number[];
|
|
82
|
-
type?: string;
|
|
83
|
-
box?: SvgBox;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* A selection is a {@link SmoSelector} and a set of references to musical elements, like measure etc.
|
|
87
|
-
* The staff and measure are always a part of the selection, and possible a voice and note,
|
|
88
|
-
* and one or more pitches. Selections can also be made from the UI by clicking on an element
|
|
89
|
-
* or navigating to an element with the keyboard.
|
|
90
|
-
* @category SmoTransform
|
|
91
|
-
* */
|
|
92
|
-
export declare class SmoSelection {
|
|
93
|
-
selector: SmoSelector;
|
|
94
|
-
_staff: SmoSystemStaff;
|
|
95
|
-
_measure: SmoMeasure;
|
|
96
|
-
_note: SmoNote | null;
|
|
97
|
-
_pitches: number[];
|
|
98
|
-
box: SvgBox | null;
|
|
99
|
-
scrollBox: SvgPoint | null;
|
|
100
|
-
static measureSelection(score: SmoScore, staffIndex: number, measureIndex: number): SmoSelection | null;
|
|
101
|
-
static measuresInColumn(score: SmoScore, staffIndex: number): SmoSelection[];
|
|
102
|
-
static noteSelection(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
103
|
-
static noteFromSelector(score: SmoScore, selector: SmoSelector): SmoSelection | null;
|
|
104
|
-
static selectionsToEnd(score: SmoScore, staff: number, startMeasure: number): SmoSelection[];
|
|
105
|
-
static selectionFromSelector(score: SmoScore, selector: SmoSelector): SmoSelection | null;
|
|
106
|
-
static pitchSelection(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number, pitches: number[]): SmoSelection;
|
|
107
|
-
/**
|
|
108
|
-
* Return the selection that is tickCount ticks after the current selection.
|
|
109
|
-
* @param score
|
|
110
|
-
* @param selection
|
|
111
|
-
* @param tickCount
|
|
112
|
-
* @returns
|
|
113
|
-
*/
|
|
114
|
-
static advanceTicks(score: SmoScore, selection: SmoSelection, tickCount: number): SmoSelection | null;
|
|
115
|
-
/**
|
|
116
|
-
* Count the number of tick indices between selector 1 and selector 2;
|
|
117
|
-
* @param score
|
|
118
|
-
* @param sel1
|
|
119
|
-
* @param sel2
|
|
120
|
-
* @returns
|
|
121
|
-
*/
|
|
122
|
-
static countTickIndices(score: SmoScore, sel1: SmoSelector, sel2: SmoSelector): number;
|
|
123
|
-
/**
|
|
124
|
-
* Count the number of tick indices between selector 1 and selector 2;
|
|
125
|
-
* @param score
|
|
126
|
-
* @param sel1
|
|
127
|
-
* @param sel2
|
|
128
|
-
* @returns
|
|
129
|
-
*/
|
|
130
|
-
static countTicks(score: SmoScore, sel1: SmoSelector, sel2: SmoSelector): number;
|
|
131
|
-
static nextNoteSelection(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
132
|
-
/**
|
|
133
|
-
*
|
|
134
|
-
* @param score
|
|
135
|
-
* @param selector
|
|
136
|
-
* @returns
|
|
137
|
-
*/
|
|
138
|
-
static innerSelections(score: SmoScore, startSelector: SmoSelector, endSelector: SmoSelector): SmoSelection[];
|
|
139
|
-
static nextNoteSelectionFromSelector(score: SmoScore, selector: SmoSelector): SmoSelection | null;
|
|
140
|
-
static lastNoteSelectionFromSelector(score: SmoScore, selector: SmoSelector): SmoSelection | null;
|
|
141
|
-
static lastNoteSelection(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
142
|
-
static lastNoteSelectionNonRest(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
143
|
-
static nextNoteSelectionNonRest(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
144
|
-
static getMeasureList(selections: SmoSelection[]): SmoSelection[];
|
|
145
|
-
static getMeasuresBetween(score: SmoScore, fromSelector: SmoSelector, toSelector: SmoSelector): SmoSelection[];
|
|
146
|
-
static selectionsSameMeasure(selections: SmoSelection[]): boolean;
|
|
147
|
-
static selectionsSameStaff(selections: SmoSelection[]): boolean;
|
|
148
|
-
constructor(params: SmoSelectionParams);
|
|
149
|
-
get staff(): SmoSystemStaff;
|
|
150
|
-
get measure(): SmoMeasure;
|
|
151
|
-
get note(): SmoNote | null;
|
|
152
|
-
get pitches(): number[];
|
|
153
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Editing operations are performed on selections. A selection can be different things, from a single pitch
|
|
3
|
+
* to many notes. These classes standardize some standard selection operations.
|
|
4
|
+
* SmoSelector
|
|
5
|
+
* @module /smo/xform/selections
|
|
6
|
+
*/
|
|
7
|
+
import { SmoScore, SmoModifier } from '../data/score';
|
|
8
|
+
import { SmoMeasure } from '../data/measure';
|
|
9
|
+
import { SmoNote } from '../data/note';
|
|
10
|
+
import { SmoSystemStaff } from '../data/systemStaff';
|
|
11
|
+
import { SvgBox, SvgPoint } from '../data/common';
|
|
12
|
+
/**
|
|
13
|
+
* Modifier tab is a modifier and its bounding box, that can be tabbed to with the keyboard
|
|
14
|
+
* @category SmoTransform
|
|
15
|
+
*/
|
|
16
|
+
export interface ModifierTab {
|
|
17
|
+
modifier: SmoModifier;
|
|
18
|
+
selection: SmoSelection | null;
|
|
19
|
+
box: SvgBox;
|
|
20
|
+
index: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* There are 2 parts to a selection: the actual musical bits that are selected, and the
|
|
24
|
+
* indices that define what was selected. This is the latter. The actual object does not
|
|
25
|
+
* have any methods so there is no constructor.
|
|
26
|
+
* @category SmoTransform
|
|
27
|
+
* */
|
|
28
|
+
export declare class SmoSelector {
|
|
29
|
+
static get default(): SmoSelector;
|
|
30
|
+
staff: number;
|
|
31
|
+
measure: number;
|
|
32
|
+
voice: number;
|
|
33
|
+
tick: number;
|
|
34
|
+
pitches: number[];
|
|
35
|
+
static measureSelector(staff: number, measure: number): SmoSelector;
|
|
36
|
+
static fromMeasure(measure: SmoMeasure): SmoSelector;
|
|
37
|
+
static sameNote(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
38
|
+
static sameMeasure(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
39
|
+
static sameStaff(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Return gt, not considering the voice (e.g. gt in time)
|
|
42
|
+
* @param sel1
|
|
43
|
+
* @param sel2
|
|
44
|
+
*/
|
|
45
|
+
static gtInTime(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* return true if sel1 > sel2
|
|
48
|
+
*/
|
|
49
|
+
static gt(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
50
|
+
static eq(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
51
|
+
static neq(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* return true if sel1 < sel2
|
|
54
|
+
*/
|
|
55
|
+
static lt(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* return true if sel1 >= sel2
|
|
58
|
+
*/
|
|
59
|
+
static gteq(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* return true if sel1 <= sel2
|
|
62
|
+
*/
|
|
63
|
+
static lteq(sel1: SmoSelector, sel2: SmoSelector): boolean;
|
|
64
|
+
static order(a: SmoSelector, b: SmoSelector): SmoSelector[];
|
|
65
|
+
static getNoteKey(selector: SmoSelector): string;
|
|
66
|
+
static getMeasureKey(selector: SmoSelector): string;
|
|
67
|
+
static contains(testSel: SmoSelector, selStart: SmoSelector, selEnd: SmoSelector): boolean;
|
|
68
|
+
static overlaps(start1: SmoSelector, end1: SmoSelector, start2: SmoSelector, end2: SmoSelector): boolean;
|
|
69
|
+
static selectorNoteKey(selector: SmoSelector): string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The fields in a selection. We have the 5 musical cardinal directions of staff, measure, note, pitches,
|
|
73
|
+
* and a selector. The pitches are indices
|
|
74
|
+
* @category SmoTransform
|
|
75
|
+
* */
|
|
76
|
+
export interface SmoSelectionParams {
|
|
77
|
+
selector: SmoSelector;
|
|
78
|
+
_staff: SmoSystemStaff;
|
|
79
|
+
_measure: SmoMeasure;
|
|
80
|
+
_note?: SmoNote;
|
|
81
|
+
_pitches?: number[];
|
|
82
|
+
type?: string;
|
|
83
|
+
box?: SvgBox;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* A selection is a {@link SmoSelector} and a set of references to musical elements, like measure etc.
|
|
87
|
+
* The staff and measure are always a part of the selection, and possible a voice and note,
|
|
88
|
+
* and one or more pitches. Selections can also be made from the UI by clicking on an element
|
|
89
|
+
* or navigating to an element with the keyboard.
|
|
90
|
+
* @category SmoTransform
|
|
91
|
+
* */
|
|
92
|
+
export declare class SmoSelection {
|
|
93
|
+
selector: SmoSelector;
|
|
94
|
+
_staff: SmoSystemStaff;
|
|
95
|
+
_measure: SmoMeasure;
|
|
96
|
+
_note: SmoNote | null;
|
|
97
|
+
_pitches: number[];
|
|
98
|
+
box: SvgBox | null;
|
|
99
|
+
scrollBox: SvgPoint | null;
|
|
100
|
+
static measureSelection(score: SmoScore, staffIndex: number, measureIndex: number): SmoSelection | null;
|
|
101
|
+
static measuresInColumn(score: SmoScore, staffIndex: number): SmoSelection[];
|
|
102
|
+
static noteSelection(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
103
|
+
static noteFromSelector(score: SmoScore, selector: SmoSelector): SmoSelection | null;
|
|
104
|
+
static selectionsToEnd(score: SmoScore, staff: number, startMeasure: number): SmoSelection[];
|
|
105
|
+
static selectionFromSelector(score: SmoScore, selector: SmoSelector): SmoSelection | null;
|
|
106
|
+
static pitchSelection(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number, pitches: number[]): SmoSelection;
|
|
107
|
+
/**
|
|
108
|
+
* Return the selection that is tickCount ticks after the current selection.
|
|
109
|
+
* @param score
|
|
110
|
+
* @param selection
|
|
111
|
+
* @param tickCount
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
static advanceTicks(score: SmoScore, selection: SmoSelection, tickCount: number): SmoSelection | null;
|
|
115
|
+
/**
|
|
116
|
+
* Count the number of tick indices between selector 1 and selector 2;
|
|
117
|
+
* @param score
|
|
118
|
+
* @param sel1
|
|
119
|
+
* @param sel2
|
|
120
|
+
* @returns
|
|
121
|
+
*/
|
|
122
|
+
static countTickIndices(score: SmoScore, sel1: SmoSelector, sel2: SmoSelector): number;
|
|
123
|
+
/**
|
|
124
|
+
* Count the number of tick indices between selector 1 and selector 2;
|
|
125
|
+
* @param score
|
|
126
|
+
* @param sel1
|
|
127
|
+
* @param sel2
|
|
128
|
+
* @returns
|
|
129
|
+
*/
|
|
130
|
+
static countTicks(score: SmoScore, sel1: SmoSelector, sel2: SmoSelector): number;
|
|
131
|
+
static nextNoteSelection(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @param score
|
|
135
|
+
* @param selector
|
|
136
|
+
* @returns
|
|
137
|
+
*/
|
|
138
|
+
static innerSelections(score: SmoScore, startSelector: SmoSelector, endSelector: SmoSelector): SmoSelection[];
|
|
139
|
+
static nextNoteSelectionFromSelector(score: SmoScore, selector: SmoSelector): SmoSelection | null;
|
|
140
|
+
static lastNoteSelectionFromSelector(score: SmoScore, selector: SmoSelector): SmoSelection | null;
|
|
141
|
+
static lastNoteSelection(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
142
|
+
static lastNoteSelectionNonRest(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
143
|
+
static nextNoteSelectionNonRest(score: SmoScore, staffIndex: number, measureIndex: number, voiceIndex: number, tickIndex: number): SmoSelection | null;
|
|
144
|
+
static getMeasureList(selections: SmoSelection[]): SmoSelection[];
|
|
145
|
+
static getMeasuresBetween(score: SmoScore, fromSelector: SmoSelector, toSelector: SmoSelector): SmoSelection[];
|
|
146
|
+
static selectionsSameMeasure(selections: SmoSelection[]): boolean;
|
|
147
|
+
static selectionsSameStaff(selections: SmoSelection[]): boolean;
|
|
148
|
+
constructor(params: SmoSelectionParams);
|
|
149
|
+
get staff(): SmoSystemStaff;
|
|
150
|
+
get measure(): SmoMeasure;
|
|
151
|
+
get note(): SmoNote | null;
|
|
152
|
+
get pitches(): number[];
|
|
153
|
+
}
|
package/types/src/ui/common.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { ButtonDefinition } from '../ui/buttons/button';
|
|
2
|
-
import { KeyEvent } from '../smo/data/common';
|
|
3
|
-
/**
|
|
4
|
-
* Define the base class for a modal component that resolves a promise when it is dismissed
|
|
5
|
-
* @category SuiButton
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class ModalComponent {
|
|
8
|
-
abstract closeModalPromise: Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
export type keyEventCallback = (ke: KeyEvent) => void;
|
|
11
|
-
/**
|
|
12
|
-
* Define an interface that gives up event handling when a modal is active
|
|
13
|
-
* @category SuiButton
|
|
14
|
-
*/
|
|
15
|
-
export declare abstract class CompleteNotifier {
|
|
16
|
-
abstract unbindKeyboardForModal(component: ModalComponent): void;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @category SuiButton
|
|
20
|
-
*/
|
|
21
|
-
export interface RibbonLayout {
|
|
22
|
-
left: string[];
|
|
23
|
-
top: string[];
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @category SuiButton
|
|
27
|
-
*/
|
|
28
|
-
export interface RibbonDefinition {
|
|
29
|
-
ribbon: RibbonLayout;
|
|
30
|
-
ribbonButtons: ButtonDefinition[];
|
|
31
|
-
}
|
|
32
|
-
export interface SelectOption {
|
|
33
|
-
label: string;
|
|
34
|
-
value: string;
|
|
35
|
-
classes?: string;
|
|
36
|
-
icon?: string;
|
|
37
|
-
active?: boolean;
|
|
38
|
-
}
|
|
39
|
-
export declare const modalContainerId = "#vue-modal-container";
|
|
40
|
-
/**
|
|
41
|
-
* Remove and replace an element, so we can reattach Vue to it
|
|
42
|
-
* @param element the ID or element we are replacing
|
|
43
|
-
* @returns the new element id
|
|
44
|
-
*/
|
|
45
|
-
export declare const replaceVueRoot: (element: string | HTMLElement) => string;
|
|
1
|
+
import { ButtonDefinition } from '../ui/buttons/button';
|
|
2
|
+
import { KeyEvent } from '../smo/data/common';
|
|
3
|
+
/**
|
|
4
|
+
* Define the base class for a modal component that resolves a promise when it is dismissed
|
|
5
|
+
* @category SuiButton
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class ModalComponent {
|
|
8
|
+
abstract closeModalPromise: Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export type keyEventCallback = (ke: KeyEvent) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Define an interface that gives up event handling when a modal is active
|
|
13
|
+
* @category SuiButton
|
|
14
|
+
*/
|
|
15
|
+
export declare abstract class CompleteNotifier {
|
|
16
|
+
abstract unbindKeyboardForModal(component: ModalComponent): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @category SuiButton
|
|
20
|
+
*/
|
|
21
|
+
export interface RibbonLayout {
|
|
22
|
+
left: string[];
|
|
23
|
+
top: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @category SuiButton
|
|
27
|
+
*/
|
|
28
|
+
export interface RibbonDefinition {
|
|
29
|
+
ribbon: RibbonLayout;
|
|
30
|
+
ribbonButtons: ButtonDefinition[];
|
|
31
|
+
}
|
|
32
|
+
export interface SelectOption {
|
|
33
|
+
label: string;
|
|
34
|
+
value: string;
|
|
35
|
+
classes?: string;
|
|
36
|
+
icon?: string;
|
|
37
|
+
active?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare const modalContainerId = "#vue-modal-container";
|
|
40
|
+
/**
|
|
41
|
+
* Remove and replace an element, so we can reattach Vue to it
|
|
42
|
+
* @param element the ID or element we are replacing
|
|
43
|
+
* @returns the new element id
|
|
44
|
+
*/
|
|
45
|
+
export declare const replaceVueRoot: (element: string | HTMLElement) => string;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ButtonDefinition } from './buttons/button';
|
|
2
|
-
import { RibbonLayout } from './common';
|
|
3
|
-
import { KeyBinding } from '../application/common';
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/
|
|
7
|
-
export interface KeyBindingConfiguration {
|
|
8
|
-
editorKeys: KeyBinding[];
|
|
9
|
-
trackerKeys: KeyBinding[];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export interface RibbonConfiguration {
|
|
15
|
-
layout: RibbonLayout;
|
|
16
|
-
buttons: ButtonDefinition[];
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Configurable elements for the UI
|
|
20
|
-
* @category SuiUiBase
|
|
21
|
-
*/
|
|
22
|
-
export interface SmoUiConfiguration {
|
|
23
|
-
keys?: KeyBindingConfiguration;
|
|
24
|
-
libraryUrl?: string;
|
|
25
|
-
language: string;
|
|
26
|
-
demonPollTime: number;
|
|
27
|
-
idleRedrawTime: number;
|
|
28
|
-
leftControls?: HTMLElement | string;
|
|
29
|
-
topControls?: HTMLElement | string;
|
|
30
|
-
scoreDomContainer: string | HTMLElement;
|
|
31
|
-
}
|
|
1
|
+
import { ButtonDefinition } from './buttons/button';
|
|
2
|
+
import { RibbonLayout } from './common';
|
|
3
|
+
import { KeyBinding } from '../application/common';
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface KeyBindingConfiguration {
|
|
8
|
+
editorKeys: KeyBinding[];
|
|
9
|
+
trackerKeys: KeyBinding[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export interface RibbonConfiguration {
|
|
15
|
+
layout: RibbonLayout;
|
|
16
|
+
buttons: ButtonDefinition[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Configurable elements for the UI
|
|
20
|
+
* @category SuiUiBase
|
|
21
|
+
*/
|
|
22
|
+
export interface SmoUiConfiguration {
|
|
23
|
+
keys?: KeyBindingConfiguration;
|
|
24
|
+
libraryUrl?: string;
|
|
25
|
+
language: string;
|
|
26
|
+
demonPollTime: number;
|
|
27
|
+
idleRedrawTime: number;
|
|
28
|
+
leftControls?: HTMLElement | string;
|
|
29
|
+
topControls?: HTMLElement | string;
|
|
30
|
+
scoreDomContainer: string | HTMLElement;
|
|
31
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { DialogDefinition, SuiDialogBase, SuiDialogParams } from './dialog';
|
|
2
|
-
import { SuiChordComponent } from './components/noteText';
|
|
3
|
-
import { SuiDropdownComponent } from './components/dropdown';
|
|
4
|
-
import { SuiToggleComponent } from './components/toggle';
|
|
5
|
-
import { SuiRockerComponent } from './components/rocker';
|
|
6
|
-
import { SmoLyric } from '../../smo/data/noteModifiers';
|
|
7
|
-
import { SmoSelector } from '../../smo/xform/selections';
|
|
8
|
-
import { SuiFontComponent } from './components/fontComponent';
|
|
9
|
-
import { EventHandler } from '../eventSource';
|
|
10
|
-
/**
|
|
11
|
-
* Complex dialog for running a chord change editing session.
|
|
12
|
-
* @category SuiDialog
|
|
13
|
-
*/
|
|
14
|
-
export declare class SuiChordChangeDialog extends SuiDialogBase {
|
|
15
|
-
static dialogElements: DialogDefinition;
|
|
16
|
-
lyric: SmoLyric | null;
|
|
17
|
-
selector: SmoSelector | null;
|
|
18
|
-
mouseMoveHandler: EventHandler | null;
|
|
19
|
-
mouseClickHandler: EventHandler | null;
|
|
20
|
-
constructor(parameters: SuiDialogParams);
|
|
21
|
-
get chordEditorCtrl(): SuiChordComponent;
|
|
22
|
-
get chordSymbolCtrl(): SuiDropdownComponent;
|
|
23
|
-
get translateYCtrl(): SuiRockerComponent;
|
|
24
|
-
get textPositionCtrl(): SuiRockerComponent;
|
|
25
|
-
get adjustWidthCtrl(): SuiToggleComponent;
|
|
26
|
-
get fontCtrl(): SuiFontComponent;
|
|
27
|
-
changed(): void;
|
|
28
|
-
setLyric(selector: SmoSelector, lyric: SmoLyric): void;
|
|
29
|
-
display(): void;
|
|
30
|
-
bindElements(): void;
|
|
31
|
-
evKey(evdata: any): Promise<void>;
|
|
32
|
-
_complete(): void;
|
|
33
|
-
mouseMove(ev: any): void;
|
|
34
|
-
mouseClick(ev: any): void;
|
|
35
|
-
}
|
|
1
|
+
import { DialogDefinition, SuiDialogBase, SuiDialogParams } from './dialog';
|
|
2
|
+
import { SuiChordComponent } from './components/noteText';
|
|
3
|
+
import { SuiDropdownComponent } from './components/dropdown';
|
|
4
|
+
import { SuiToggleComponent } from './components/toggle';
|
|
5
|
+
import { SuiRockerComponent } from './components/rocker';
|
|
6
|
+
import { SmoLyric } from '../../smo/data/noteModifiers';
|
|
7
|
+
import { SmoSelector } from '../../smo/xform/selections';
|
|
8
|
+
import { SuiFontComponent } from './components/fontComponent';
|
|
9
|
+
import { EventHandler } from '../eventSource';
|
|
10
|
+
/**
|
|
11
|
+
* Complex dialog for running a chord change editing session.
|
|
12
|
+
* @category SuiDialog
|
|
13
|
+
*/
|
|
14
|
+
export declare class SuiChordChangeDialog extends SuiDialogBase {
|
|
15
|
+
static dialogElements: DialogDefinition;
|
|
16
|
+
lyric: SmoLyric | null;
|
|
17
|
+
selector: SmoSelector | null;
|
|
18
|
+
mouseMoveHandler: EventHandler | null;
|
|
19
|
+
mouseClickHandler: EventHandler | null;
|
|
20
|
+
constructor(parameters: SuiDialogParams);
|
|
21
|
+
get chordEditorCtrl(): SuiChordComponent;
|
|
22
|
+
get chordSymbolCtrl(): SuiDropdownComponent;
|
|
23
|
+
get translateYCtrl(): SuiRockerComponent;
|
|
24
|
+
get textPositionCtrl(): SuiRockerComponent;
|
|
25
|
+
get adjustWidthCtrl(): SuiToggleComponent;
|
|
26
|
+
get fontCtrl(): SuiFontComponent;
|
|
27
|
+
changed(): void;
|
|
28
|
+
setLyric(selector: SmoSelector, lyric: SmoLyric): void;
|
|
29
|
+
display(): void;
|
|
30
|
+
bindElements(): void;
|
|
31
|
+
evKey(evdata: any): Promise<void>;
|
|
32
|
+
_complete(): void;
|
|
33
|
+
mouseMove(ev: any): void;
|
|
34
|
+
mouseClick(ev: any): void;
|
|
35
|
+
}
|