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,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
|
-
/**
|
|
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 +1 @@
|
|
|
1
|
-
export declare const dynamicCtorInit: () => void;
|
|
1
|
+
export declare const dynamicCtorInit: () => void;
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { KeyEvent } from '../smo/data/common';
|
|
2
|
-
import { SuiExceptionHandler } from '../ui/exceptions';
|
|
3
|
-
import { Qwerty } from '../ui/qwerty';
|
|
4
|
-
import { SuiPiano } from '../render/sui/piano';
|
|
5
|
-
import { CompleteNotifier } from '../ui/common';
|
|
6
|
-
import { SuiTracker } from '../render/sui/tracker';
|
|
7
|
-
import { SuiScoreViewOperations } from '../render/sui/scoreViewOperations';
|
|
8
|
-
import { BrowserEventSource } from '../ui/eventSource';
|
|
9
|
-
import { SuiKeyCommands } from './keyCommands';
|
|
10
|
-
import { KeyBinding, ModalEventHandler } from './common';
|
|
11
|
-
import { ModifierTab } from '../smo/xform/selections';
|
|
12
|
-
import { SuiMenuManager } from '../ui/menus/manager';
|
|
13
|
-
import { SmoConfiguration } from './configuration';
|
|
14
|
-
/**
|
|
15
|
-
* Handle keyboard/mouse events, and pass them to the renderer and other UI elements.
|
|
16
|
-
* @category SuiApplication
|
|
17
|
-
*/
|
|
18
|
-
export interface EventHandlerParams {
|
|
19
|
-
view: SuiScoreViewOperations;
|
|
20
|
-
eventSource: BrowserEventSource;
|
|
21
|
-
tracker: SuiTracker;
|
|
22
|
-
keyCommands: SuiKeyCommands;
|
|
23
|
-
menus: SuiMenuManager;
|
|
24
|
-
completeNotifier: CompleteNotifier;
|
|
25
|
-
keyBindings: KeyBinding[];
|
|
26
|
-
config: SmoConfiguration;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* this is the default keyboard/mouse handler for smoosic in application mode.
|
|
30
|
-
* It diverts key events to tracker or key commmands as appropriate, and mouse events to
|
|
31
|
-
* tracker. Modal elements take this control away temporarily.
|
|
32
|
-
*
|
|
33
|
-
* It also handles some global events such as window resize and scroll of the music region.
|
|
34
|
-
* @category SuiApplication
|
|
35
|
-
*/
|
|
36
|
-
export declare class SuiEventHandler implements ModalEventHandler {
|
|
37
|
-
static reentry: boolean;
|
|
38
|
-
static keyboardUi: Qwerty;
|
|
39
|
-
static showQwerty(): void;
|
|
40
|
-
static instance: SuiEventHandler;
|
|
41
|
-
static debugMask: number;
|
|
42
|
-
static altKeyPressed: boolean;
|
|
43
|
-
static ctrlKeyPressed: boolean;
|
|
44
|
-
static shiftKeyPressed: boolean;
|
|
45
|
-
view: SuiScoreViewOperations;
|
|
46
|
-
eventSource: BrowserEventSource;
|
|
47
|
-
tracker: SuiTracker;
|
|
48
|
-
keyBind: KeyBinding[];
|
|
49
|
-
completeNotifier: CompleteNotifier;
|
|
50
|
-
keyCommands: SuiKeyCommands;
|
|
51
|
-
resizing: boolean;
|
|
52
|
-
undoStatus: number;
|
|
53
|
-
trackScrolling: boolean;
|
|
54
|
-
config: SmoConfiguration;
|
|
55
|
-
keyHandlerObj: any;
|
|
56
|
-
menus: SuiMenuManager;
|
|
57
|
-
piano: SuiPiano | null;
|
|
58
|
-
exhandler: SuiExceptionHandler;
|
|
59
|
-
constructor(params: EventHandlerParams);
|
|
60
|
-
private static handleScrollEventDefer;
|
|
61
|
-
handleScrollEvent(): void;
|
|
62
|
-
createPiano(): void;
|
|
63
|
-
resizeEvent(): void;
|
|
64
|
-
createModifierDialog(modifierSelection: ModifierTab): import("./exports").SuiDialogBase | null;
|
|
65
|
-
trackerModifierSelect(ev: KeyEvent): void;
|
|
66
|
-
bindResize(): void;
|
|
67
|
-
get renderElement(): Element;
|
|
68
|
-
static get editorKeyBindingDefaults(): KeyBinding[];
|
|
69
|
-
static get trackerKeyBindingDefaults(): KeyBinding[];
|
|
70
|
-
helpControls(): void;
|
|
71
|
-
menuHelp(): void;
|
|
72
|
-
keyUp(evdata: any): void;
|
|
73
|
-
handleMetaKeyDown(evdata: any): void;
|
|
74
|
-
evKey(evdata: any): Promise<void>;
|
|
75
|
-
mouseMove(ev: any): void;
|
|
76
|
-
mouseClick(ev: any): Promise<void>;
|
|
77
|
-
bindEvents(): void;
|
|
78
|
-
}
|
|
1
|
+
import { KeyEvent } from '../smo/data/common';
|
|
2
|
+
import { SuiExceptionHandler } from '../ui/exceptions';
|
|
3
|
+
import { Qwerty } from '../ui/qwerty';
|
|
4
|
+
import { SuiPiano } from '../render/sui/piano';
|
|
5
|
+
import { CompleteNotifier } from '../ui/common';
|
|
6
|
+
import { SuiTracker } from '../render/sui/tracker';
|
|
7
|
+
import { SuiScoreViewOperations } from '../render/sui/scoreViewOperations';
|
|
8
|
+
import { BrowserEventSource } from '../ui/eventSource';
|
|
9
|
+
import { SuiKeyCommands } from './keyCommands';
|
|
10
|
+
import { KeyBinding, ModalEventHandler } from './common';
|
|
11
|
+
import { ModifierTab } from '../smo/xform/selections';
|
|
12
|
+
import { SuiMenuManager } from '../ui/menus/manager';
|
|
13
|
+
import { SmoConfiguration } from './configuration';
|
|
14
|
+
/**
|
|
15
|
+
* Handle keyboard/mouse events, and pass them to the renderer and other UI elements.
|
|
16
|
+
* @category SuiApplication
|
|
17
|
+
*/
|
|
18
|
+
export interface EventHandlerParams {
|
|
19
|
+
view: SuiScoreViewOperations;
|
|
20
|
+
eventSource: BrowserEventSource;
|
|
21
|
+
tracker: SuiTracker;
|
|
22
|
+
keyCommands: SuiKeyCommands;
|
|
23
|
+
menus: SuiMenuManager;
|
|
24
|
+
completeNotifier: CompleteNotifier;
|
|
25
|
+
keyBindings: KeyBinding[];
|
|
26
|
+
config: SmoConfiguration;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* this is the default keyboard/mouse handler for smoosic in application mode.
|
|
30
|
+
* It diverts key events to tracker or key commmands as appropriate, and mouse events to
|
|
31
|
+
* tracker. Modal elements take this control away temporarily.
|
|
32
|
+
*
|
|
33
|
+
* It also handles some global events such as window resize and scroll of the music region.
|
|
34
|
+
* @category SuiApplication
|
|
35
|
+
*/
|
|
36
|
+
export declare class SuiEventHandler implements ModalEventHandler {
|
|
37
|
+
static reentry: boolean;
|
|
38
|
+
static keyboardUi: Qwerty;
|
|
39
|
+
static showQwerty(): void;
|
|
40
|
+
static instance: SuiEventHandler;
|
|
41
|
+
static debugMask: number;
|
|
42
|
+
static altKeyPressed: boolean;
|
|
43
|
+
static ctrlKeyPressed: boolean;
|
|
44
|
+
static shiftKeyPressed: boolean;
|
|
45
|
+
view: SuiScoreViewOperations;
|
|
46
|
+
eventSource: BrowserEventSource;
|
|
47
|
+
tracker: SuiTracker;
|
|
48
|
+
keyBind: KeyBinding[];
|
|
49
|
+
completeNotifier: CompleteNotifier;
|
|
50
|
+
keyCommands: SuiKeyCommands;
|
|
51
|
+
resizing: boolean;
|
|
52
|
+
undoStatus: number;
|
|
53
|
+
trackScrolling: boolean;
|
|
54
|
+
config: SmoConfiguration;
|
|
55
|
+
keyHandlerObj: any;
|
|
56
|
+
menus: SuiMenuManager;
|
|
57
|
+
piano: SuiPiano | null;
|
|
58
|
+
exhandler: SuiExceptionHandler;
|
|
59
|
+
constructor(params: EventHandlerParams);
|
|
60
|
+
private static handleScrollEventDefer;
|
|
61
|
+
handleScrollEvent(): void;
|
|
62
|
+
createPiano(): void;
|
|
63
|
+
resizeEvent(): void;
|
|
64
|
+
createModifierDialog(modifierSelection: ModifierTab): import("./exports").SuiDialogBase | null;
|
|
65
|
+
trackerModifierSelect(ev: KeyEvent): void;
|
|
66
|
+
bindResize(): void;
|
|
67
|
+
get renderElement(): Element;
|
|
68
|
+
static get editorKeyBindingDefaults(): KeyBinding[];
|
|
69
|
+
static get trackerKeyBindingDefaults(): KeyBinding[];
|
|
70
|
+
helpControls(): void;
|
|
71
|
+
menuHelp(): void;
|
|
72
|
+
keyUp(evdata: any): void;
|
|
73
|
+
handleMetaKeyDown(evdata: any): void;
|
|
74
|
+
evKey(evdata: any): Promise<void>;
|
|
75
|
+
mouseMove(ev: any): void;
|
|
76
|
+
mouseClick(ev: any): Promise<void>;
|
|
77
|
+
bindEvents(): void;
|
|
78
|
+
}
|