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.
Files changed (71) hide show
  1. package/build/html/smoosic.html +1 -0
  2. package/build/smoosic.js +36 -14
  3. package/package.json +1 -1
  4. package/release/html/smoosic.html +4 -3
  5. package/release/smoosic.js +36 -14
  6. package/release/styles/general.css +15 -0
  7. package/src/application/common.ts +20 -0
  8. package/src/application/eventHandler.ts +44 -8
  9. package/src/render/sui/NoteEntryCaret.ts +739 -0
  10. package/src/render/sui/NoteEntryMediator.ts +58 -0
  11. package/src/render/sui/mapper.ts +22 -4
  12. package/src/render/sui/scoreRender.ts +7 -7
  13. package/src/render/sui/scoreViewOperations.ts +46 -0
  14. package/src/render/sui/tracker.ts +93 -47
  15. package/src/render/vex/vxMeasure.ts +2 -1
  16. package/src/render/vex/vxNote.ts +1 -0
  17. package/src/smo/data/music.ts +17 -0
  18. package/src/smo/data/note.ts +3 -1
  19. package/src/smo/data/noteModifiers.ts +2 -0
  20. package/src/smo/data/scoreModifiers.ts +0 -3
  21. package/src/styles/general.css +22 -0
  22. package/src/ui/components/dialogs/scorePreferences.vue +1 -11
  23. package/types/src/application/application.d.ts +102 -102
  24. package/types/src/application/configuration.d.ts +74 -74
  25. package/types/src/application/dynamicInit.d.ts +1 -1
  26. package/types/src/application/eventHandler.d.ts +78 -78
  27. package/types/src/application/exports.d.ts +494 -494
  28. package/types/src/render/audio/oscillator.d.ts +98 -98
  29. package/types/src/render/audio/player.d.ts +141 -141
  30. package/types/src/render/audio/samples.d.ts +56 -56
  31. package/types/src/render/sui/configuration.d.ts +12 -12
  32. package/types/src/render/sui/formatter.d.ts +151 -151
  33. package/types/src/render/sui/layoutDebug.d.ts +43 -43
  34. package/types/src/render/sui/mapper.d.ts +116 -116
  35. package/types/src/render/sui/renderState.d.ts +88 -88
  36. package/types/src/render/sui/scoreRender.d.ts +93 -93
  37. package/types/src/render/sui/scoreView.d.ts +267 -267
  38. package/types/src/render/sui/scoreViewOperations.d.ts +594 -594
  39. package/types/src/render/sui/scroller.d.ts +34 -34
  40. package/types/src/render/sui/svgPageMap.d.ts +318 -318
  41. package/types/src/render/sui/textEdit.d.ts +310 -310
  42. package/types/src/render/vex/vxMeasure.d.ts +95 -95
  43. package/types/src/smo/data/common.d.ts +220 -220
  44. package/types/src/smo/data/measure.d.ts +510 -510
  45. package/types/src/smo/data/measureModifiers.d.ts +506 -506
  46. package/types/src/smo/data/scoreModifiers.d.ts +433 -433
  47. package/types/src/smo/xform/selections.d.ts +153 -153
  48. package/types/src/ui/common.d.ts +45 -45
  49. package/types/src/ui/configuration.d.ts +31 -31
  50. package/types/src/ui/dialogs/chordChange.d.ts +35 -35
  51. package/types/src/ui/dialogs/components/baseComponent.d.ts +158 -158
  52. package/types/src/ui/dialogs/components/button.d.ts +54 -54
  53. package/types/src/ui/dialogs/components/dropdown.d.ts +78 -78
  54. package/types/src/ui/dialogs/components/pitch.d.ts +95 -95
  55. package/types/src/ui/dialogs/components/rocker.d.ts +66 -66
  56. package/types/src/ui/dialogs/components/textInPlace.d.ts +90 -90
  57. package/types/src/ui/dialogs/components/textInput.d.ts +58 -58
  58. package/types/src/ui/dialogs/components/toggle.d.ts +53 -53
  59. package/types/src/ui/dialogs/dialog.d.ts +201 -201
  60. package/types/src/ui/dialogs/endings.d.ts +61 -61
  61. package/types/src/ui/dialogs/lyric.d.ts +39 -39
  62. package/types/src/ui/dialogs/measureFormat.d.ts +52 -52
  63. package/types/src/ui/dialogs/textBlock.d.ts +61 -61
  64. package/types/src/ui/exceptions.d.ts +12 -12
  65. package/types/src/ui/menus/manager.d.ts +57 -57
  66. package/types/src/ui/navigation.d.ts +15 -15
  67. package/types/typedoc.d.ts +158 -158
  68. package/release/styles/styles.css +0 -0
  69. package/src/styles/fonts/Roboto-Italic-VariableFont_wdth,wght.ttf +0 -0
  70. package/src/styles/fonts/Roboto-VariableFont_wdth,wght.ttf +0 -0
  71. package/src/styles/styles.css +0 -0
@@ -1,95 +1,95 @@
1
- import { SmoNote } from '../../smo/data/note';
2
- import { SmoDynamicText, SmoNoteModifierBase } from '../../smo/data/noteModifiers';
3
- import { SmoSelection } from '../../smo/xform/selections';
4
- import { SmoMeasure, MeasureTickmaps } from '../../smo/data/measure';
5
- import { Pitch } from '../../smo/data/common';
6
- import { SvgPage } from '../sui/svgPageMap';
7
- import { SmoTabStave } from '../../smo/data/staffModifiers';
8
- import { Stave, Note, Beam, Tuplet, Voice, Formatter, TabStave } from '../../common/vex';
9
- import { VxMeasureIf, VxNote } from './vxNote';
10
- /**
11
- * This is the interface for VexFlow library that actually does the engraving.
12
- * @category SuiRender
13
- */
14
- export declare class VxMeasure implements VxMeasureIf {
15
- context: SvgPage;
16
- printing: boolean;
17
- selection: SmoSelection;
18
- softmax: number;
19
- smoMeasure: SmoMeasure;
20
- smoTabStave?: SmoTabStave;
21
- tabStave?: TabStave;
22
- rendered: boolean;
23
- firstInColumn: boolean;
24
- noteToVexMap: Record<string, Note>;
25
- beamToVexMap: Record<string, Beam>;
26
- tupletToVexMap: Record<string, Tuplet>;
27
- multimeasureRest: any | null;
28
- vexNotes: Note[];
29
- vexBeamGroups: Beam[];
30
- vexTuplets: Tuplet[];
31
- tickmapObject: MeasureTickmaps | null;
32
- stave: Stave | null;
33
- voiceNotes: Note[];
34
- tabNotes: Note[];
35
- voiceAr: Voice[];
36
- tabVoice: Voice | null;
37
- formatter: Formatter | null;
38
- allCues: boolean;
39
- modifiersToBox: SmoNoteModifierBase[];
40
- collisionMap: Record<number, SmoNote[]>;
41
- dbgLeftX: number;
42
- dbgWidth: number;
43
- hideAccidentals: boolean;
44
- tiedOverPitches: Pitch[];
45
- constructor(context: SvgPage, selection: SmoSelection, printing: boolean, softmax: number, tiedOverPitches: Pitch[]);
46
- static get fillStyle(): string;
47
- setFirstInColumn(val: boolean): void;
48
- isWholeRest(): boolean;
49
- createCollisionTickmap(): void;
50
- isCollision(voiceIx: number, tickIx: number): boolean;
51
- /**
52
- * convert a smoNote into a vxNote so it can be rasterized
53
- * @param smoNote
54
- * @param tickIndex - used to calculate accidental
55
- * @param voiceIx
56
- * @returns
57
- */
58
- createVexNote(smoNote: SmoNote, tickIndex: number, voiceIx: number): VxNote;
59
- renderNoteGlyph(smoNote: SmoNote, textObj: SmoDynamicText): void;
60
- renderDynamics(): void;
61
- createRepeatSymbol(): void;
62
- /**
63
- * create an a array of VF.StaveNote objects to render the active voice.
64
- * @param voiceIx
65
- */
66
- createVexNotes(voiceIx: number): void;
67
- /**
68
- * Group the notes for beaming and create Vex beam objects
69
- * @param vix - voice index
70
- * @returns
71
- */
72
- createVexBeamGroups(vix: number): void;
73
- createVexTuplets(vix: number): void;
74
- /**
75
- * create the modifiers for the stave itself, bar lines etc.
76
- */
77
- createMeasureModifiers(): void;
78
- /**
79
- * Create all Vex notes and modifiers. We defer the format and rendering so
80
- * we can align across multiple staves
81
- */
82
- preFormat(): void;
83
- /**
84
- * Create the Vex formatter that calculates the X and Y positions of the notes. A formatter
85
- * may actually span multiple staves for justified staves. The notes are drawn in their
86
- * individual vxMeasure objects but formatting is done once for all justified staves
87
- * @param voices Voice objects from VexFlow
88
- * @returns
89
- */
90
- format(voices: Voice[]): void;
91
- /**
92
- * render is called after format. Actually draw the things.
93
- */
94
- render(): void;
95
- }
1
+ import { SmoNote } from '../../smo/data/note';
2
+ import { SmoDynamicText, SmoNoteModifierBase } from '../../smo/data/noteModifiers';
3
+ import { SmoSelection } from '../../smo/xform/selections';
4
+ import { SmoMeasure, MeasureTickmaps } from '../../smo/data/measure';
5
+ import { Pitch } from '../../smo/data/common';
6
+ import { SvgPage } from '../sui/svgPageMap';
7
+ import { SmoTabStave } from '../../smo/data/staffModifiers';
8
+ import { Stave, Note, Beam, Tuplet, Voice, Formatter, TabStave } from '../../common/vex';
9
+ import { VxMeasureIf, VxNote } from './vxNote';
10
+ /**
11
+ * This is the interface for VexFlow library that actually does the engraving.
12
+ * @category SuiRender
13
+ */
14
+ export declare class VxMeasure implements VxMeasureIf {
15
+ context: SvgPage;
16
+ printing: boolean;
17
+ selection: SmoSelection;
18
+ softmax: number;
19
+ smoMeasure: SmoMeasure;
20
+ smoTabStave?: SmoTabStave;
21
+ tabStave?: TabStave;
22
+ rendered: boolean;
23
+ firstInColumn: boolean;
24
+ noteToVexMap: Record<string, Note>;
25
+ beamToVexMap: Record<string, Beam>;
26
+ tupletToVexMap: Record<string, Tuplet>;
27
+ multimeasureRest: any | null;
28
+ vexNotes: Note[];
29
+ vexBeamGroups: Beam[];
30
+ vexTuplets: Tuplet[];
31
+ tickmapObject: MeasureTickmaps | null;
32
+ stave: Stave | null;
33
+ voiceNotes: Note[];
34
+ tabNotes: Note[];
35
+ voiceAr: Voice[];
36
+ tabVoice: Voice | null;
37
+ formatter: Formatter | null;
38
+ allCues: boolean;
39
+ modifiersToBox: SmoNoteModifierBase[];
40
+ collisionMap: Record<number, SmoNote[]>;
41
+ dbgLeftX: number;
42
+ dbgWidth: number;
43
+ hideAccidentals: boolean;
44
+ tiedOverPitches: Pitch[];
45
+ constructor(context: SvgPage, selection: SmoSelection, printing: boolean, softmax: number, tiedOverPitches: Pitch[]);
46
+ static get fillStyle(): string;
47
+ setFirstInColumn(val: boolean): void;
48
+ isWholeRest(): boolean;
49
+ createCollisionTickmap(): void;
50
+ isCollision(voiceIx: number, tickIx: number): boolean;
51
+ /**
52
+ * convert a smoNote into a vxNote so it can be rasterized
53
+ * @param smoNote
54
+ * @param tickIndex - used to calculate accidental
55
+ * @param voiceIx
56
+ * @returns
57
+ */
58
+ createVexNote(smoNote: SmoNote, tickIndex: number, voiceIx: number): VxNote;
59
+ renderNoteGlyph(smoNote: SmoNote, textObj: SmoDynamicText): void;
60
+ renderDynamics(): void;
61
+ createRepeatSymbol(): void;
62
+ /**
63
+ * create an a array of VF.StaveNote objects to render the active voice.
64
+ * @param voiceIx
65
+ */
66
+ createVexNotes(voiceIx: number): void;
67
+ /**
68
+ * Group the notes for beaming and create Vex beam objects
69
+ * @param vix - voice index
70
+ * @returns
71
+ */
72
+ createVexBeamGroups(vix: number): void;
73
+ createVexTuplets(vix: number): void;
74
+ /**
75
+ * create the modifiers for the stave itself, bar lines etc.
76
+ */
77
+ createMeasureModifiers(): void;
78
+ /**
79
+ * Create all Vex notes and modifiers. We defer the format and rendering so
80
+ * we can align across multiple staves
81
+ */
82
+ preFormat(): void;
83
+ /**
84
+ * Create the Vex formatter that calculates the X and Y positions of the notes. A formatter
85
+ * may actually span multiple staves for justified staves. The notes are drawn in their
86
+ * individual vxMeasure objects but formatting is done once for all justified staves
87
+ * @param voices Voice objects from VexFlow
88
+ * @returns
89
+ */
90
+ format(voices: Voice[]): void;
91
+ /**
92
+ * render is called after format. Actually draw the things.
93
+ */
94
+ render(): void;
95
+ }
@@ -1,220 +1,220 @@
1
- /**
2
- * definitions shared by all SMO types
3
- * @module /smo/data/common
4
- */
5
- export declare const SmoNamespace: {
6
- value: string;
7
- };
8
- export type dynamicCtor = (params: any) => any;
9
- export declare const SmoDynamicCtor: Record<string, dynamicCtor>;
10
- /**
11
- * Same as attrs object in Vex objects.
12
- * @category SmoObject
13
- * @param id - unique identifier, can be used in DOM elements
14
- * @param type - a little bit redundate with `ctor` in `SmoObjectParams`
15
- */
16
- export interface SmoAttrs {
17
- id: string;
18
- type: string;
19
- }
20
- /**
21
- * @internal
22
- */
23
- export interface SmoXmlSerializable {
24
- serializeXml: (namespace: string, parentElement: Element, tag: string) => Element;
25
- ctor: string;
26
- }
27
- export declare function createXmlAttributes(element: Element, obj: any): void;
28
- export declare function createXmlAttribute(element: Element, name: string, value: any): void;
29
- export declare const getId: () => string;
30
- /**
31
- * All note, measure, staff, and score objects have
32
- * a serialize method and are deserializable with constructor `ctor`
33
- * @category SmoObject
34
- */
35
- export interface SmoObjectParams {
36
- ctor: string;
37
- attrs?: SmoAttrs;
38
- }
39
- /**
40
- * Note duration. The same abstraction used by vex, except here denominator is
41
- * always 1. remainder is used to reconstruct non-tuplets from tuplets.
42
- * @category SmoObject
43
- * @param numerator - duration, 4096 is 1/4 note
44
- * @param denominator - always 1 for SMO objects
45
- * @param remainder - used for tuplets whose duration doesn't divide evenly
46
- */
47
- export interface Ticks {
48
- numerator: number;
49
- denominator: number;
50
- remainder: number;
51
- }
52
- export type ElementLike = SVGSVGElement | SVGGElement | SVGGraphicsElement | null;
53
- export declare const RemoveElementLike: (e: ElementLike) => void;
54
- /**
55
- * constraint for SmoPitch.letter value, in lower case
56
- */
57
- export type PitchLetter = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g';
58
- export declare function IsPitchLetter(letter: PitchLetter | string): letter is PitchLetter;
59
- /**
60
- * PitchKey is a SmoPitch, without the octave
61
- * @category SmoObject
62
- * @param letter - letter note
63
- * @param accidental - an accidental or microtone
64
- */
65
- export interface PitchKey {
66
- letter: PitchLetter;
67
- accidental: string;
68
- }
69
- /**
70
- * Represents a single pitch in Smo object model.
71
- * @category SmoObject
72
- * @param letter - letter note
73
- * @param accidental - an accidental or microtone
74
- * @param octave - standard octave
75
- * @param cautionary? - can be used for courtesy accidental
76
- */
77
- export interface Pitch {
78
- letter: PitchLetter;
79
- accidental: string;
80
- octave: number;
81
- cautionary?: boolean;
82
- forced?: boolean;
83
- role?: string;
84
- }
85
- /**
86
- * A tuple indicating measure location in the score:
87
- * @category SmoObject
88
- * @param measureIndex - the actual offset from the first measure
89
- * @param localIndex - the index as shown to the user, considers renumbering
90
- * @param sytemIndex - which bar (column) of a system this measure is
91
- * @param staffId - which staff (row) of a system this measure is
92
- */
93
- export interface MeasureNumber {
94
- measureIndex: number;
95
- localIndex: number;
96
- systemIndex: number;
97
- staffId: number;
98
- }
99
- /**
100
- * musical artifacts can contain temporary svg information for
101
- * mapping the UI.
102
- * @internal
103
- */
104
- export declare class SvgPoint {
105
- x: number;
106
- y: number;
107
- static get default(): {
108
- x: number;
109
- y: number;
110
- };
111
- constructor();
112
- }
113
- /**
114
- * musical artifacts can contain temporary svg information for
115
- * mapping the UI.
116
- * @internal
117
- */
118
- export declare class SvgBox {
119
- x: number;
120
- y: number;
121
- width: number;
122
- height: number;
123
- static get default(): SvgBox;
124
- constructor();
125
- }
126
- /**
127
- * kind of a pointless class...
128
- * @internal
129
- */
130
- export interface SvgDimensions {
131
- width: number;
132
- height: number;
133
- }
134
- /**
135
- * A `Transposable` is an abstraction of a note.
136
- * Can be passed into methods that transform pitches for both
137
- * grace notes and normal notes.
138
- * @category SmoObject
139
- * @param pitches - SMO pitch type
140
- * @param noteType - same convention as VexFlow, 'n' for note, 'r' for rest
141
- * @param renderId - ID for the containing SVG group, used to map UI elements
142
- * @param renderedBox - bounding box in client coordinates
143
- * @param logicalBox - bounding box in SVG coordinates
144
- */
145
- export interface Transposable {
146
- pitches: Pitch[];
147
- noteType: string;
148
- renderId: string | null;
149
- logicalBox: SvgBox | null;
150
- }
151
- /**
152
- * All note, measure etc. modifiers have these attributes. The SVG info
153
- * is for the tracker to track the artifacts in the UI (mouse events, etc)
154
- * @category SmoObject
155
- * @param ctor - constructor name for deserialize
156
- * @param logicalBox - bounding box in SVG coordinates
157
- * @param attr - unique ID, simlar to vex object attrs field
158
- */
159
- export interface SmoModifierBase {
160
- ctor: string;
161
- logicalBox: SvgBox | null;
162
- attrs: SmoAttrs;
163
- serialize: () => any;
164
- }
165
- /**
166
- * Renderable is just a thing that has a bounding box
167
- * @internal
168
- */
169
- export interface Renderable {
170
- logicalBox: SvgBox | null | undefined;
171
- }
172
- /**
173
- * Restriction from string to supported clefs
174
- */
175
- export type Clef = 'treble' | 'bass' | 'tenor' | 'alto' | 'soprano' | 'percussion' | 'mezzo-soprano' | 'baritone-c' | 'baritone-f' | 'subbass' | 'french';
176
- export declare var Clefs: Clef[];
177
- export declare function IsClef(clef: Clef | string): clef is Clef;
178
- /**
179
- * Most event handling in SMO is an 'any' from jquery, but
180
- * key events are sometimes narrowed to the common browser key event
181
- * @internal
182
- */
183
- export interface KeyEvent {
184
- type: string;
185
- shiftKey: boolean;
186
- ctrlKey: boolean;
187
- altKey: boolean;
188
- key: string;
189
- keyCode: number | string;
190
- code: string;
191
- event: string | null;
192
- }
193
- export declare function defaultKeyEvent(): KeyEvent;
194
- export declare function keyEventMatch(ev1: KeyEvent, ev2: KeyEvent): boolean;
195
- export type keyHandler = (key?: KeyEvent) => void;
196
- /**
197
- * @internal
198
- */
199
- export interface TickAccidental {
200
- duration: number;
201
- pitch: Pitch;
202
- }
203
- /**
204
- * @internal
205
- * Used to create {@link MeasureTickmaps}
206
- */
207
- export interface AccidentalArray {
208
- duration: string | number;
209
- pitches: Record<string, TickAccidental>;
210
- }
211
- /**
212
- * @internal
213
- */
214
- export interface AccidentalDisplay {
215
- symbol: string;
216
- courtesy: boolean;
217
- forced: boolean;
218
- }
219
- export declare const reverseStaticMaps: Record<string, Record<string, string>>;
220
- export declare function reverseStaticMap(name: string, o: Record<string, string>): Record<string, string>;
1
+ /**
2
+ * definitions shared by all SMO types
3
+ * @module /smo/data/common
4
+ */
5
+ export declare const SmoNamespace: {
6
+ value: string;
7
+ };
8
+ export type dynamicCtor = (params: any) => any;
9
+ export declare const SmoDynamicCtor: Record<string, dynamicCtor>;
10
+ /**
11
+ * Same as attrs object in Vex objects.
12
+ * @category SmoObject
13
+ * @param id - unique identifier, can be used in DOM elements
14
+ * @param type - a little bit redundate with `ctor` in `SmoObjectParams`
15
+ */
16
+ export interface SmoAttrs {
17
+ id: string;
18
+ type: string;
19
+ }
20
+ /**
21
+ * @internal
22
+ */
23
+ export interface SmoXmlSerializable {
24
+ serializeXml: (namespace: string, parentElement: Element, tag: string) => Element;
25
+ ctor: string;
26
+ }
27
+ export declare function createXmlAttributes(element: Element, obj: any): void;
28
+ export declare function createXmlAttribute(element: Element, name: string, value: any): void;
29
+ export declare const getId: () => string;
30
+ /**
31
+ * All note, measure, staff, and score objects have
32
+ * a serialize method and are deserializable with constructor `ctor`
33
+ * @category SmoObject
34
+ */
35
+ export interface SmoObjectParams {
36
+ ctor: string;
37
+ attrs?: SmoAttrs;
38
+ }
39
+ /**
40
+ * Note duration. The same abstraction used by vex, except here denominator is
41
+ * always 1. remainder is used to reconstruct non-tuplets from tuplets.
42
+ * @category SmoObject
43
+ * @param numerator - duration, 4096 is 1/4 note
44
+ * @param denominator - always 1 for SMO objects
45
+ * @param remainder - used for tuplets whose duration doesn't divide evenly
46
+ */
47
+ export interface Ticks {
48
+ numerator: number;
49
+ denominator: number;
50
+ remainder: number;
51
+ }
52
+ export type ElementLike = SVGSVGElement | SVGGElement | SVGGraphicsElement | null;
53
+ export declare const RemoveElementLike: (e: ElementLike) => void;
54
+ /**
55
+ * constraint for SmoPitch.letter value, in lower case
56
+ */
57
+ export type PitchLetter = 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g';
58
+ export declare function IsPitchLetter(letter: PitchLetter | string): letter is PitchLetter;
59
+ /**
60
+ * PitchKey is a SmoPitch, without the octave
61
+ * @category SmoObject
62
+ * @param letter - letter note
63
+ * @param accidental - an accidental or microtone
64
+ */
65
+ export interface PitchKey {
66
+ letter: PitchLetter;
67
+ accidental: string;
68
+ }
69
+ /**
70
+ * Represents a single pitch in Smo object model.
71
+ * @category SmoObject
72
+ * @param letter - letter note
73
+ * @param accidental - an accidental or microtone
74
+ * @param octave - standard octave
75
+ * @param cautionary? - can be used for courtesy accidental
76
+ */
77
+ export interface Pitch {
78
+ letter: PitchLetter;
79
+ accidental: string;
80
+ octave: number;
81
+ cautionary?: boolean;
82
+ forced?: boolean;
83
+ role?: string;
84
+ }
85
+ /**
86
+ * A tuple indicating measure location in the score:
87
+ * @category SmoObject
88
+ * @param measureIndex - the actual offset from the first measure
89
+ * @param localIndex - the index as shown to the user, considers renumbering
90
+ * @param sytemIndex - which bar (column) of a system this measure is
91
+ * @param staffId - which staff (row) of a system this measure is
92
+ */
93
+ export interface MeasureNumber {
94
+ measureIndex: number;
95
+ localIndex: number;
96
+ systemIndex: number;
97
+ staffId: number;
98
+ }
99
+ /**
100
+ * musical artifacts can contain temporary svg information for
101
+ * mapping the UI.
102
+ * @internal
103
+ */
104
+ export declare class SvgPoint {
105
+ x: number;
106
+ y: number;
107
+ static get default(): {
108
+ x: number;
109
+ y: number;
110
+ };
111
+ constructor();
112
+ }
113
+ /**
114
+ * musical artifacts can contain temporary svg information for
115
+ * mapping the UI.
116
+ * @internal
117
+ */
118
+ export declare class SvgBox {
119
+ x: number;
120
+ y: number;
121
+ width: number;
122
+ height: number;
123
+ static get default(): SvgBox;
124
+ constructor();
125
+ }
126
+ /**
127
+ * kind of a pointless class...
128
+ * @internal
129
+ */
130
+ export interface SvgDimensions {
131
+ width: number;
132
+ height: number;
133
+ }
134
+ /**
135
+ * A `Transposable` is an abstraction of a note.
136
+ * Can be passed into methods that transform pitches for both
137
+ * grace notes and normal notes.
138
+ * @category SmoObject
139
+ * @param pitches - SMO pitch type
140
+ * @param noteType - same convention as VexFlow, 'n' for note, 'r' for rest
141
+ * @param renderId - ID for the containing SVG group, used to map UI elements
142
+ * @param renderedBox - bounding box in client coordinates
143
+ * @param logicalBox - bounding box in SVG coordinates
144
+ */
145
+ export interface Transposable {
146
+ pitches: Pitch[];
147
+ noteType: string;
148
+ renderId: string | null;
149
+ logicalBox: SvgBox | null;
150
+ }
151
+ /**
152
+ * All note, measure etc. modifiers have these attributes. The SVG info
153
+ * is for the tracker to track the artifacts in the UI (mouse events, etc)
154
+ * @category SmoObject
155
+ * @param ctor - constructor name for deserialize
156
+ * @param logicalBox - bounding box in SVG coordinates
157
+ * @param attr - unique ID, simlar to vex object attrs field
158
+ */
159
+ export interface SmoModifierBase {
160
+ ctor: string;
161
+ logicalBox: SvgBox | null;
162
+ attrs: SmoAttrs;
163
+ serialize: () => any;
164
+ }
165
+ /**
166
+ * Renderable is just a thing that has a bounding box
167
+ * @internal
168
+ */
169
+ export interface Renderable {
170
+ logicalBox: SvgBox | null | undefined;
171
+ }
172
+ /**
173
+ * Restriction from string to supported clefs
174
+ */
175
+ export type Clef = 'treble' | 'bass' | 'tenor' | 'alto' | 'soprano' | 'percussion' | 'mezzo-soprano' | 'baritone-c' | 'baritone-f' | 'subbass' | 'french';
176
+ export declare var Clefs: Clef[];
177
+ export declare function IsClef(clef: Clef | string): clef is Clef;
178
+ /**
179
+ * Most event handling in SMO is an 'any' from jquery, but
180
+ * key events are sometimes narrowed to the common browser key event
181
+ * @internal
182
+ */
183
+ export interface KeyEvent {
184
+ type: string;
185
+ shiftKey: boolean;
186
+ ctrlKey: boolean;
187
+ altKey: boolean;
188
+ key: string;
189
+ keyCode: number | string;
190
+ code: string;
191
+ event: string | null;
192
+ }
193
+ export declare function defaultKeyEvent(): KeyEvent;
194
+ export declare function keyEventMatch(ev1: KeyEvent, ev2: KeyEvent): boolean;
195
+ export type keyHandler = (key?: KeyEvent) => void;
196
+ /**
197
+ * @internal
198
+ */
199
+ export interface TickAccidental {
200
+ duration: number;
201
+ pitch: Pitch;
202
+ }
203
+ /**
204
+ * @internal
205
+ * Used to create {@link MeasureTickmaps}
206
+ */
207
+ export interface AccidentalArray {
208
+ duration: string | number;
209
+ pitches: Record<string, TickAccidental>;
210
+ }
211
+ /**
212
+ * @internal
213
+ */
214
+ export interface AccidentalDisplay {
215
+ symbol: string;
216
+ courtesy: boolean;
217
+ forced: boolean;
218
+ }
219
+ export declare const reverseStaticMaps: Record<string, Record<string, string>>;
220
+ export declare function reverseStaticMap(name: string, o: Record<string, string>): Record<string, string>;