@sudobility/music_types 0.13.26 → 0.13.27
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/CLAUDE.md +33 -3
- package/dist/domain/documents/document-state.d.ts +17 -0
- package/dist/domain/documents/document-state.d.ts.map +1 -0
- package/dist/domain/documents/document-state.js +6 -0
- package/dist/domain/documents/document-state.js.map +1 -0
- package/dist/domain/documents/export-formats.d.ts +74 -0
- package/dist/domain/documents/export-formats.d.ts.map +1 -0
- package/dist/domain/documents/export-formats.js +53 -0
- package/dist/domain/documents/export-formats.js.map +1 -0
- package/dist/domain/documents/formats.d.ts +17 -0
- package/dist/domain/documents/formats.d.ts.map +1 -0
- package/dist/domain/documents/formats.js +61 -0
- package/dist/domain/documents/formats.js.map +1 -0
- package/dist/domain/documents/project-file.d.ts +33 -0
- package/dist/domain/documents/project-file.d.ts.map +1 -0
- package/dist/domain/documents/project-file.js +14 -0
- package/dist/domain/documents/project-file.js.map +1 -0
- package/dist/domain/documents/publish.d.ts +6 -0
- package/dist/domain/documents/publish.d.ts.map +1 -0
- package/dist/domain/documents/publish.js +2 -0
- package/dist/domain/documents/publish.js.map +1 -0
- package/dist/domain/documents/templates.d.ts +21 -0
- package/dist/domain/documents/templates.d.ts.map +1 -0
- package/dist/domain/documents/templates.js +22 -0
- package/dist/domain/documents/templates.js.map +1 -0
- package/dist/domain/editor/app-errors.d.ts +16 -0
- package/dist/domain/editor/app-errors.d.ts.map +1 -0
- package/dist/domain/editor/app-errors.js +8 -0
- package/dist/domain/editor/app-errors.js.map +1 -0
- package/dist/domain/editor/context-menu.d.ts +74 -0
- package/dist/domain/editor/context-menu.d.ts.map +1 -0
- package/dist/domain/editor/context-menu.js +19 -0
- package/dist/domain/editor/context-menu.js.map +1 -0
- package/dist/domain/editor/device-prefs.d.ts +107 -0
- package/dist/domain/editor/device-prefs.d.ts.map +1 -0
- package/dist/domain/editor/device-prefs.js +66 -0
- package/dist/domain/editor/device-prefs.js.map +1 -0
- package/dist/domain/editor/docs.d.ts +56 -0
- package/dist/domain/editor/docs.d.ts.map +1 -0
- package/dist/domain/editor/docs.js +41 -0
- package/dist/domain/editor/docs.js.map +1 -0
- package/dist/domain/editor/edit-mode.d.ts +31 -0
- package/dist/domain/editor/edit-mode.d.ts.map +1 -0
- package/dist/domain/editor/edit-mode.js +40 -0
- package/dist/domain/editor/edit-mode.js.map +1 -0
- package/dist/domain/editor/editing-copy.d.ts +91 -0
- package/dist/domain/editor/editing-copy.d.ts.map +1 -0
- package/dist/domain/editor/editing-copy.js +88 -0
- package/dist/domain/editor/editing-copy.js.map +1 -0
- package/dist/domain/editor/inspector.d.ts +45 -0
- package/dist/domain/editor/inspector.d.ts.map +1 -0
- package/dist/domain/editor/inspector.js +34 -0
- package/dist/domain/editor/inspector.js.map +1 -0
- package/dist/domain/editor/labelled-option.d.ts +6 -0
- package/dist/domain/editor/labelled-option.d.ts.map +1 -0
- package/dist/domain/editor/labelled-option.js +2 -0
- package/dist/domain/editor/labelled-option.js.map +1 -0
- package/dist/domain/editor/library-copy.d.ts +61 -0
- package/dist/domain/editor/library-copy.d.ts.map +1 -0
- package/dist/domain/editor/library-copy.js +2 -0
- package/dist/domain/editor/library-copy.js.map +1 -0
- package/dist/domain/editor/print.d.ts +30 -0
- package/dist/domain/editor/print.d.ts.map +1 -0
- package/dist/domain/editor/print.js +43 -0
- package/dist/domain/editor/print.js.map +1 -0
- package/dist/domain/editor/score-input.d.ts +158 -0
- package/dist/domain/editor/score-input.d.ts.map +1 -0
- package/dist/domain/editor/score-input.js +2 -0
- package/dist/domain/editor/score-input.js.map +1 -0
- package/dist/domain/editor/toast.d.ts +32 -0
- package/dist/domain/editor/toast.d.ts.map +1 -0
- package/dist/domain/editor/toast.js +5 -0
- package/dist/domain/editor/toast.js.map +1 -0
- package/dist/domain/editor/toolbar.d.ts +62 -0
- package/dist/domain/editor/toolbar.d.ts.map +1 -0
- package/dist/domain/editor/toolbar.js +83 -0
- package/dist/domain/editor/toolbar.js.map +1 -0
- package/dist/domain/editor/view-settings.d.ts +22 -0
- package/dist/domain/editor/view-settings.d.ts.map +1 -0
- package/dist/domain/editor/view-settings.js +30 -0
- package/dist/domain/editor/view-settings.js.map +1 -0
- package/dist/domain/generation/replace-drafts.d.ts +78 -0
- package/dist/domain/generation/replace-drafts.d.ts.map +1 -0
- package/dist/domain/generation/replace-drafts.js +40 -0
- package/dist/domain/generation/replace-drafts.js.map +1 -0
- package/dist/domain/generation/request-drafts.d.ts +226 -0
- package/dist/domain/generation/request-drafts.d.ts.map +1 -0
- package/dist/domain/generation/request-drafts.js +52 -0
- package/dist/domain/generation/request-drafts.js.map +1 -0
- package/dist/domain/instruments/gm-catalogue.d.ts +27 -3
- package/dist/domain/instruments/gm-catalogue.d.ts.map +1 -1
- package/dist/domain/instruments/gm-catalogue.js +4 -3
- package/dist/domain/instruments/gm-catalogue.js.map +1 -1
- package/dist/domain/instruments/gm-polyphony.d.ts +25 -2
- package/dist/domain/instruments/gm-polyphony.d.ts.map +1 -1
- package/dist/domain/instruments/gm-polyphony.js +9 -3
- package/dist/domain/instruments/gm-polyphony.js.map +1 -1
- package/dist/domain/instruments/gm-range.d.ts +10 -6
- package/dist/domain/instruments/gm-range.d.ts.map +1 -1
- package/dist/domain/instruments/gm-range.js +18 -3
- package/dist/domain/instruments/gm-range.js.map +1 -1
- package/dist/domain/instruments/out-of-range.d.ts +70 -0
- package/dist/domain/instruments/out-of-range.d.ts.map +1 -0
- package/dist/domain/instruments/out-of-range.js +106 -0
- package/dist/domain/instruments/out-of-range.js.map +1 -0
- package/dist/domain/instruments/track-instrument.d.ts +23 -0
- package/dist/domain/instruments/track-instrument.d.ts.map +1 -1
- package/dist/domain/instruments/track-instrument.js +26 -0
- package/dist/domain/instruments/track-instrument.js.map +1 -1
- package/dist/domain/notation/music-vocabulary.d.ts +17 -0
- package/dist/domain/notation/music-vocabulary.d.ts.map +1 -1
- package/dist/domain/notation/music-vocabulary.js +25 -1
- package/dist/domain/notation/music-vocabulary.js.map +1 -1
- package/dist/domain/notation/picker-options.d.ts +42 -2
- package/dist/domain/notation/picker-options.d.ts.map +1 -1
- package/dist/domain/notation/picker-options.js +41 -2
- package/dist/domain/notation/picker-options.js.map +1 -1
- package/dist/domain/score/transport-settings.d.ts +29 -0
- package/dist/domain/score/transport-settings.d.ts.map +1 -0
- package/dist/domain/score/transport-settings.js +2 -0
- package/dist/domain/score/transport-settings.js.map +1 -0
- package/dist/formats/audio-import.d.ts +15 -0
- package/dist/formats/audio-import.d.ts.map +1 -0
- package/dist/formats/audio-import.js +26 -0
- package/dist/formats/audio-import.js.map +1 -0
- package/dist/formats/index.d.ts +10 -0
- package/dist/formats/index.d.ts.map +1 -1
- package/dist/formats/index.js +10 -0
- package/dist/formats/index.js.map +1 -1
- package/dist/formats/midi-import.d.ts +128 -0
- package/dist/formats/midi-import.d.ts.map +1 -0
- package/dist/formats/midi-import.js +2 -0
- package/dist/formats/midi-import.js.map +1 -0
- package/dist/formats/musicxml.d.ts +44 -0
- package/dist/formats/musicxml.d.ts.map +1 -0
- package/dist/formats/musicxml.js +2 -0
- package/dist/formats/musicxml.js.map +1 -0
- package/dist/formats/tracker-export.d.ts +55 -0
- package/dist/formats/tracker-export.d.ts.map +1 -0
- package/dist/formats/tracker-export.js +18 -0
- package/dist/formats/tracker-export.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -1
- package/dist/platform/index.d.ts +2 -0
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js +2 -0
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/score-files.d.ts +36 -0
- package/dist/platform/score-files.d.ts.map +1 -0
- package/dist/platform/score-files.js +2 -0
- package/dist/platform/score-files.js.map +1 -0
- package/dist/platform/storage.d.ts +19 -0
- package/dist/platform/storage.d.ts.map +1 -0
- package/dist/platform/storage.js +10 -0
- package/dist/platform/storage.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelled-option.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/labelled-option.ts"],"names":[],"mappings":"AAAA,2GAA2G;AAC3G,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,IAAI;IAAE,KAAK,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelled-option.js","sourceRoot":"","sources":["../../../src/domain/editor/labelled-option.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The words the frontend libraries need, as contracts a host fills in.
|
|
3
|
+
*
|
|
4
|
+
* No library in this family holds strings in any language. Each app hands over
|
|
5
|
+
* its sentences — music_lib's `createLibraryCopy(t)` builds every table from a
|
|
6
|
+
* translate function — and these are the shapes of those tables.
|
|
7
|
+
*/
|
|
8
|
+
import type { SelectionSummaryCopy } from "../selection/selection.js";
|
|
9
|
+
import type { MusicXmlWarnings } from "../../formats/musicxml.js";
|
|
10
|
+
import type { TemplateCopy } from "../documents/templates.js";
|
|
11
|
+
import type { EditingCopy } from "./editing-copy.js";
|
|
12
|
+
/**
|
|
13
|
+
* The messages music_lib raises from long-lived internals — an autosave, the
|
|
14
|
+
* playback adapter, a signed-out call.
|
|
15
|
+
*
|
|
16
|
+
* **Every entry is a function, resolved at the moment the message is needed.**
|
|
17
|
+
* They used to be plain strings, captured when the host called
|
|
18
|
+
* `setLibraryMessages` — which strands whatever language was loaded at
|
|
19
|
+
* start-up, so a reader who switches to Chinese goes on getting English
|
|
20
|
+
* toasts. `EditingCopy` already learned this and passes `commandLabel` as a
|
|
21
|
+
* resolver for the same reason. The shape stays an object with a field per
|
|
22
|
+
* message rather than a single `(key) => string`, because a record fails to
|
|
23
|
+
* compile when a member is added and a resolver silently goes on answering for
|
|
24
|
+
* the old set.
|
|
25
|
+
*/
|
|
26
|
+
export type LibraryMessages = {
|
|
27
|
+
/** Action label on a retryable error toast. */
|
|
28
|
+
retry: () => string;
|
|
29
|
+
/** Autosave to the server failed; the change is still held locally. */
|
|
30
|
+
saveFailed: () => string;
|
|
31
|
+
/** The transport could not start. */
|
|
32
|
+
playbackFailed: () => string;
|
|
33
|
+
/** The score could not be handed to the playback engine. */
|
|
34
|
+
scoreLoadFailed: () => string;
|
|
35
|
+
/** An authenticated call was attempted while signed out. */
|
|
36
|
+
authRequired: () => string;
|
|
37
|
+
/**
|
|
38
|
+
* A server-backed feature was reached on a host that has no server.
|
|
39
|
+
*
|
|
40
|
+
* Distinct from `authRequired`, which means "sign in and this works". This
|
|
41
|
+
* one means the feature is not on offer here at all — a native app editing a
|
|
42
|
+
* local file. A host whose UI asks `serverAvailable` first should never show
|
|
43
|
+
* it; it is the backstop for the paths that do not.
|
|
44
|
+
*/
|
|
45
|
+
serverUnavailable: () => string;
|
|
46
|
+
};
|
|
47
|
+
export type LibraryMessageKey = keyof LibraryMessages;
|
|
48
|
+
/** Every copy table the libraries read, each resolved when it is used. */
|
|
49
|
+
export type LibraryCopy = {
|
|
50
|
+
/** For `setEditingCopy`: undo labels, validation, refusals. */
|
|
51
|
+
editing: () => EditingCopy;
|
|
52
|
+
/** For `selectionSummaryLabel`. */
|
|
53
|
+
selection: () => SelectionSummaryCopy;
|
|
54
|
+
/** For `openMusicXml`: one sentence per case the importer warns about. */
|
|
55
|
+
musicXmlWarnings: () => MusicXmlWarnings;
|
|
56
|
+
/** For `setLibraryMessages`: the messages raised from long-lived internals. */
|
|
57
|
+
library: () => LibraryMessages;
|
|
58
|
+
/** For `projectTemplates`: each template's name and description. */
|
|
59
|
+
templates: () => TemplateCopy;
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=library-copy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-copy.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/library-copy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,MAAM,CAAC;IACpB,uEAAuE;IACvE,UAAU,EAAE,MAAM,MAAM,CAAC;IACzB,qCAAqC;IACrC,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,4DAA4D;IAC5D,eAAe,EAAE,MAAM,MAAM,CAAC;IAC9B,4DAA4D;IAC5D,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B;;;;;;;OAOG;IACH,iBAAiB,EAAE,MAAM,MAAM,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,eAAe,CAAC;AAEtD,0EAA0E;AAC1E,MAAM,MAAM,WAAW,GAAG;IACxB,+DAA+D;IAC/D,OAAO,EAAE,MAAM,WAAW,CAAC;IAC3B,mCAAmC;IACnC,SAAS,EAAE,MAAM,oBAAoB,CAAC;IACtC,0EAA0E;IAC1E,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;IACzC,+EAA+E;IAC/E,OAAO,EAAE,MAAM,eAAe,CAAC;IAC/B,oEAAoE;IACpE,SAAS,EAAE,MAAM,YAAY,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-copy.js","sourceRoot":"","sources":["../../../src/domain/editor/library-copy.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The paper a score prints on, as vocabulary and picker options.
|
|
3
|
+
*
|
|
4
|
+
* The page geometry that uses these — dimensions, margins, pagination — is
|
|
5
|
+
* music_drawing's.
|
|
6
|
+
*/
|
|
7
|
+
/** The papers a score prints on, in the order a picker offers them. */
|
|
8
|
+
export declare const PAPER_SIZES: readonly ["a4", "letter", "legal"];
|
|
9
|
+
export type PaperSize = (typeof PAPER_SIZES)[number];
|
|
10
|
+
/** Portrait first: it is the default and what almost every part is. */
|
|
11
|
+
export declare const PAPER_ORIENTATIONS: readonly ["portrait", "landscape"];
|
|
12
|
+
export type PaperOrientation = (typeof PAPER_ORIENTATIONS)[number];
|
|
13
|
+
/**
|
|
14
|
+
* The paper picker. `css` is the `@page` size keyword; an orientation's value
|
|
15
|
+
* is its own CSS keyword already.
|
|
16
|
+
*
|
|
17
|
+
* A4 has a key like the others even though it reads "A4" in both languages —
|
|
18
|
+
* one shape for every entry is what lets a picker map straight through, and the
|
|
19
|
+
* locales list it as shared by design.
|
|
20
|
+
*/
|
|
21
|
+
export declare const PAPER_OPTIONS: ReadonlyArray<{
|
|
22
|
+
value: PaperSize;
|
|
23
|
+
labelKey: string;
|
|
24
|
+
css: string;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const ORIENTATION_OPTIONS: ReadonlyArray<{
|
|
27
|
+
value: PaperOrientation;
|
|
28
|
+
labelKey: string;
|
|
29
|
+
}>;
|
|
30
|
+
//# sourceMappingURL=print.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/print.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uEAAuE;AACvE,eAAO,MAAM,WAAW,oCAAqC,CAAC;AAC9D,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,oCAAqC,CAAC;AACrE,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAoBnE;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC;IACxC,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACb,CAIE,CAAC;AAEJ,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAAC;IAC9C,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAGE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The paper a score prints on, as vocabulary and picker options.
|
|
3
|
+
*
|
|
4
|
+
* The page geometry that uses these — dimensions, margins, pagination — is
|
|
5
|
+
* music_drawing's.
|
|
6
|
+
*/
|
|
7
|
+
/** The papers a score prints on, in the order a picker offers them. */
|
|
8
|
+
export const PAPER_SIZES = ["a4", "letter", "legal"];
|
|
9
|
+
/** Portrait first: it is the default and what almost every part is. */
|
|
10
|
+
export const PAPER_ORIENTATIONS = ["portrait", "landscape"];
|
|
11
|
+
const PAPER_LABEL_KEY = {
|
|
12
|
+
a4: "print.paperA4",
|
|
13
|
+
letter: "print.paperLetter",
|
|
14
|
+
legal: "print.paperLegal",
|
|
15
|
+
};
|
|
16
|
+
/** The CSS `@page { size }` keyword for each paper. */
|
|
17
|
+
const PAPER_CSS = {
|
|
18
|
+
a4: "A4",
|
|
19
|
+
letter: "letter",
|
|
20
|
+
legal: "legal",
|
|
21
|
+
};
|
|
22
|
+
const ORIENTATION_LABEL_KEY = {
|
|
23
|
+
portrait: "print.portrait",
|
|
24
|
+
landscape: "print.landscape",
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* The paper picker. `css` is the `@page` size keyword; an orientation's value
|
|
28
|
+
* is its own CSS keyword already.
|
|
29
|
+
*
|
|
30
|
+
* A4 has a key like the others even though it reads "A4" in both languages —
|
|
31
|
+
* one shape for every entry is what lets a picker map straight through, and the
|
|
32
|
+
* locales list it as shared by design.
|
|
33
|
+
*/
|
|
34
|
+
export const PAPER_OPTIONS = PAPER_SIZES.map((value) => ({
|
|
35
|
+
value,
|
|
36
|
+
labelKey: PAPER_LABEL_KEY[value],
|
|
37
|
+
css: PAPER_CSS[value],
|
|
38
|
+
}));
|
|
39
|
+
export const ORIENTATION_OPTIONS = PAPER_ORIENTATIONS.map((value) => ({
|
|
40
|
+
value,
|
|
41
|
+
labelKey: ORIENTATION_LABEL_KEY[value],
|
|
42
|
+
}));
|
|
43
|
+
//# sourceMappingURL=print.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"print.js","sourceRoot":"","sources":["../../../src/domain/editor/print.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,uEAAuE;AACvE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAG9D,uEAAuE;AACvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAAU,EAAE,WAAW,CAAU,CAAC;AAGrE,MAAM,eAAe,GAA8B;IACjD,EAAE,EAAE,eAAe;IACnB,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE,kBAAkB;CAC1B,CAAC;AAEF,uDAAuD;AACvD,MAAM,SAAS,GAA8B;IAC3C,EAAE,EAAE,IAAI;IACR,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;CACf,CAAC;AAEF,MAAM,qBAAqB,GAAqC;IAC9D,QAAQ,EAAE,gBAAgB;IAC1B,SAAS,EAAE,iBAAiB;CAC7B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAIrB,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC/B,KAAK;IACL,QAAQ,EAAE,eAAe,CAAC,KAAK,CAAC;IAChC,GAAG,EAAE,SAAS,CAAC,KAAK,CAAC;CACtB,CAAC,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,mBAAmB,GAG3B,kBAAkB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtC,KAAK;IACL,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC;CACvC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a hand does to the score, as data: a press and what lies under it, a
|
|
3
|
+
* pointer gesture, a key chord, a group of piano keys, a lyric keystroke.
|
|
4
|
+
*
|
|
5
|
+
* The geometry that answers "what is under this point" is music_drawing's; the
|
|
6
|
+
* meaning of each input is music_editing's. The shapes they pass between them
|
|
7
|
+
* are declared here once, so neither package restates the other's.
|
|
8
|
+
*/
|
|
9
|
+
import type { Pitch, UUID } from "../../model/score.js";
|
|
10
|
+
import type { PitchDisplay } from "../score/display-score.js";
|
|
11
|
+
/**
|
|
12
|
+
* Whatever lies under a point on the score, as the canvas reports it.
|
|
13
|
+
*
|
|
14
|
+
* `null` (passed where a hit is expected) means the press landed on nothing —
|
|
15
|
+
* between systems, or on the gutter's empty band.
|
|
16
|
+
*
|
|
17
|
+
* A stave's `pitch` is the pitch **as drawn** at that point, after the display
|
|
18
|
+
* lenses; `routeScorePress` inverts them itself, because a drawn pitch stored
|
|
19
|
+
* raw writes a note an octave out inside an `8va` and a tone out on a B-flat
|
|
20
|
+
* part — and it does so silently, since the note then draws where it was
|
|
21
|
+
* pressed and only sounds wrong.
|
|
22
|
+
*/
|
|
23
|
+
export type ScoreCanvasHit = {
|
|
24
|
+
kind: "trackGutter";
|
|
25
|
+
trackId: UUID;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "measureNumber";
|
|
28
|
+
measureIndex: number;
|
|
29
|
+
} | {
|
|
30
|
+
kind: "note";
|
|
31
|
+
/** Every event sharing the notehead's box: a chord is one target. */
|
|
32
|
+
eventIds: readonly UUID[];
|
|
33
|
+
trackId: UUID;
|
|
34
|
+
measureIndex: number;
|
|
35
|
+
tick: number;
|
|
36
|
+
} | {
|
|
37
|
+
kind: "stave";
|
|
38
|
+
trackId: UUID;
|
|
39
|
+
measureIndex: number;
|
|
40
|
+
tick: number;
|
|
41
|
+
/** The pitch *as drawn* at that point, when the point is on a stave. */
|
|
42
|
+
pitch: Pitch | null;
|
|
43
|
+
};
|
|
44
|
+
export type ScorePressModifiers = {
|
|
45
|
+
shift: boolean;
|
|
46
|
+
/** Cmd on macOS, Ctrl elsewhere — resolved by the host. */
|
|
47
|
+
mod: boolean;
|
|
48
|
+
/** The store's `noteInput`, passed so a host can route a press it has already read. */
|
|
49
|
+
noteInput: boolean;
|
|
50
|
+
/** How the pressed pitch was drawn, so it can be taken back to sounding pitch. */
|
|
51
|
+
pitchDisplay: PitchDisplay;
|
|
52
|
+
/** The bar a shift-extended bar selection grows from; see `selectMeasureRange`. */
|
|
53
|
+
anchor: number | null;
|
|
54
|
+
/**
|
|
55
|
+
* The tick the canvas reports for the press point (`ScoreCanvas.tickAt`), or
|
|
56
|
+
* null where there is none. What a Mod press selects *to*.
|
|
57
|
+
*
|
|
58
|
+
* Not the hit's own tick: a hit only exists inside a measure, and its tick
|
|
59
|
+
* falls back to 0 where the canvas has no answer — so reading it made a
|
|
60
|
+
* Mod press between systems do nothing and one on an unmapped stretch select
|
|
61
|
+
* back to the start of the piece. Required rather than defaulted to the hit,
|
|
62
|
+
* so a host cannot quietly keep the old answer.
|
|
63
|
+
*/
|
|
64
|
+
pointTick: number | null;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* What a primary press that may become a drag starts.
|
|
68
|
+
*
|
|
69
|
+
* - `move` — Alt on a note: drag the selection to another track or tick. The
|
|
70
|
+
* anchor is the last id of the box. `selectChord` is the chord to select
|
|
71
|
+
* first when none of it is selected yet (null to keep the selection); an
|
|
72
|
+
* explicit modifier leaves no ambiguity with a box select, so requiring a
|
|
73
|
+
* prior selection would be friction for nothing.
|
|
74
|
+
* - `pitchDrag` — a press on the *one* selected note. Requiring it to be
|
|
75
|
+
* selected first is what keeps an ordinary press-and-drag across the staff a
|
|
76
|
+
* box select.
|
|
77
|
+
* - `box` — everything else; Shift adds to the selection rather than replacing
|
|
78
|
+
* it. A box that never moves past the host's slop is an ordinary press, and
|
|
79
|
+
* goes to `routeScorePress` instead.
|
|
80
|
+
*/
|
|
81
|
+
export type PointerGesture = {
|
|
82
|
+
kind: "move";
|
|
83
|
+
anchorId: UUID;
|
|
84
|
+
anchorTick: number;
|
|
85
|
+
selectChord: readonly UUID[] | null;
|
|
86
|
+
} | {
|
|
87
|
+
kind: "pitchDrag";
|
|
88
|
+
eventId: UUID;
|
|
89
|
+
pitch: Pitch;
|
|
90
|
+
} | {
|
|
91
|
+
kind: "box";
|
|
92
|
+
additive: boolean;
|
|
93
|
+
};
|
|
94
|
+
/** What produced a press. */
|
|
95
|
+
export type PointerKind = "mouse" | "touch";
|
|
96
|
+
/** What a press was, once it ended (`classifyPress`). */
|
|
97
|
+
export type PressKind = "tap" | "longPress" | "drag";
|
|
98
|
+
/**
|
|
99
|
+
* One keypress, platform-free.
|
|
100
|
+
*
|
|
101
|
+
* `mod` is Cmd on macOS and Ctrl elsewhere, resolved by the host because only
|
|
102
|
+
* it knows which platform it is on — and reserved for the system throughout
|
|
103
|
+
* the shortcut table, so a browser or OS shortcut is never mistaken for an
|
|
104
|
+
* edit.
|
|
105
|
+
*/
|
|
106
|
+
export type EditorKeyChord = {
|
|
107
|
+
key: string;
|
|
108
|
+
shift: boolean;
|
|
109
|
+
alt: boolean;
|
|
110
|
+
mod: boolean;
|
|
111
|
+
};
|
|
112
|
+
/** Piano keys pressed together, grouped into one chord until the last lifts. */
|
|
113
|
+
export type KeyGroup = {
|
|
114
|
+
/** Every key touched since the first went down, in the order touched. */
|
|
115
|
+
midis: readonly number[];
|
|
116
|
+
/** Keys still held. Empty means the group is finished. */
|
|
117
|
+
down: readonly number[];
|
|
118
|
+
/** When the first key went down; 0 when no group is open. */
|
|
119
|
+
startedAt: number;
|
|
120
|
+
};
|
|
121
|
+
export type ReleaseResult = {
|
|
122
|
+
group: KeyGroup;
|
|
123
|
+
/** Set once the last finger lifts — what to hand `playKeyGroup`. */
|
|
124
|
+
finished: {
|
|
125
|
+
midis: readonly number[];
|
|
126
|
+
heldMs: number;
|
|
127
|
+
} | null;
|
|
128
|
+
};
|
|
129
|
+
/** A change to an existing note's pitch. */
|
|
130
|
+
export type PitchChange = {
|
|
131
|
+
id: UUID;
|
|
132
|
+
to: Pitch;
|
|
133
|
+
};
|
|
134
|
+
/** Where lyric entry is in the line. */
|
|
135
|
+
export type LyricEntryState = {
|
|
136
|
+
/** The note being written, into the notes entry began with. */
|
|
137
|
+
index: number;
|
|
138
|
+
/** How many notes the line has. */
|
|
139
|
+
count: number;
|
|
140
|
+
/** Whether the syllable before this one ended in a hyphen. */
|
|
141
|
+
continuing: boolean;
|
|
142
|
+
};
|
|
143
|
+
/** A keystroke, or its on-screen equivalent, that means something to entry. */
|
|
144
|
+
export type LyricInput = "space" | "tab" | "hyphen" | "enter" | "escape" | "back";
|
|
145
|
+
export type LyricWrite = {
|
|
146
|
+
index: number;
|
|
147
|
+
text: string;
|
|
148
|
+
continuing: boolean;
|
|
149
|
+
hyphenated: boolean;
|
|
150
|
+
};
|
|
151
|
+
export type LyricStep = {
|
|
152
|
+
state: LyricEntryState;
|
|
153
|
+
/** What to write, or null when the input writes nothing. */
|
|
154
|
+
write: LyricWrite | null;
|
|
155
|
+
/** Whether entry is over. */
|
|
156
|
+
close: boolean;
|
|
157
|
+
};
|
|
158
|
+
//# sourceMappingURL=score-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-input.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/score-input.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-input.js","sourceRoot":"","sources":["../../../src/domain/editor/score-input.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A toast: a transient message a store raises and a host renders.
|
|
3
|
+
*/
|
|
4
|
+
export type ToastSeverity = "info" | "success" | "warning" | "error";
|
|
5
|
+
/**
|
|
6
|
+
* An optional action button (spec §28: "retry actions where appropriate"),
|
|
7
|
+
* e.g. "Retry" on a failed import/save toast, or "Undo" on a paste refused
|
|
8
|
+
* after a cut. The toast is dismissed once it is used, so `onClick` does only
|
|
9
|
+
* the work.
|
|
10
|
+
*/
|
|
11
|
+
export type ToastAction = {
|
|
12
|
+
label: string;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
};
|
|
15
|
+
export type Toast = {
|
|
16
|
+
id: string;
|
|
17
|
+
message: string;
|
|
18
|
+
severity: ToastSeverity;
|
|
19
|
+
action?: ToastAction;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* A host's toast renderer.
|
|
23
|
+
*
|
|
24
|
+
* The toast arrives with its id already assigned, because the store's caller
|
|
25
|
+
* is handed that id back — a refused paste's Undo action dismisses its own
|
|
26
|
+
* toast by it.
|
|
27
|
+
*/
|
|
28
|
+
export type ToastSink = {
|
|
29
|
+
push(toast: Toast): void;
|
|
30
|
+
dismiss(id: string): void;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/toast.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAErE;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAEjE,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,aAAa,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.js","sourceRoot":"","sources":["../../../src/domain/editor/toast.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The editing bar's vocabulary: its controls, the More menu, the two ways to
|
|
3
|
+
* add a track, and how many voices it offers.
|
|
4
|
+
*
|
|
5
|
+
* When each control is available is music_editing's rule
|
|
6
|
+
* (`selectToolbarAvailability`); what they are called is the host's copy.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Every control on the editing bar whose availability depends on the score.
|
|
10
|
+
*
|
|
11
|
+
* The view controls — zoom, layout, pitch display, the inspector toggle — are
|
|
12
|
+
* deliberately absent: they change how the score is looked at rather than the
|
|
13
|
+
* score, so they are live with no score, with nothing selected and while the
|
|
14
|
+
* transport plays, and a row of constant `true`s would only be something for a
|
|
15
|
+
* bar to forget to read.
|
|
16
|
+
*/
|
|
17
|
+
export declare const TOOLBAR_CONTROLS: readonly ["addTrack", "noteDuration", "dotted", "triplet", "accidental", "articulation", "ornament", "tie", "insertMode", "replaceMode", "stackMode", "insertNote", "slur", "crescendo", "diminuendo", "arpeggiate", "beamBreak", "beamNone", "fermata", "noteInput", "insertRest", "quantizeGrid", "quantize", "voice", "moreActions", "selectAll", "addMeasure", "deleteMeasure", "goToBar", "enterLyrics", "glissando"];
|
|
18
|
+
export type ToolbarControl = (typeof TOOLBAR_CONTROLS)[number];
|
|
19
|
+
export type ToolbarAvailability = Record<ToolbarControl, boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* How many voices the bar offers.
|
|
22
|
+
*
|
|
23
|
+
* Two is where notation actually needs them — stems up against stems down on
|
|
24
|
+
* one stave. More is real notation too, but nothing else in the editor tells
|
|
25
|
+
* voices apart yet, so offering four would be offering somewhere to lose notes.
|
|
26
|
+
*/
|
|
27
|
+
export declare const EDITOR_VOICE_COUNT = 2;
|
|
28
|
+
export type AddTrackChoice = "blank" | "generate";
|
|
29
|
+
export type AddTrackChoiceOption = {
|
|
30
|
+
value: AddTrackChoice;
|
|
31
|
+
labelKey: string;
|
|
32
|
+
hintKey: string;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
};
|
|
35
|
+
/** The rarely-used actions both bars keep behind a More menu, in order. */
|
|
36
|
+
export declare const EDITOR_MORE_ACTIONS: readonly [{
|
|
37
|
+
readonly value: "select-all";
|
|
38
|
+
readonly labelKey: "editor.selectAllNotes";
|
|
39
|
+
readonly control: "selectAll";
|
|
40
|
+
}, {
|
|
41
|
+
readonly value: "add-measure";
|
|
42
|
+
readonly labelKey: "editor.addMeasure";
|
|
43
|
+
readonly control: "addMeasure";
|
|
44
|
+
}, {
|
|
45
|
+
readonly value: "delete-measure";
|
|
46
|
+
readonly labelKey: "editor.deleteMeasure";
|
|
47
|
+
readonly control: "deleteMeasure";
|
|
48
|
+
}, {
|
|
49
|
+
readonly value: "go-to-bar";
|
|
50
|
+
readonly labelKey: "editor.goToBar";
|
|
51
|
+
readonly control: "goToBar";
|
|
52
|
+
}, {
|
|
53
|
+
readonly value: "enter-lyrics";
|
|
54
|
+
readonly labelKey: "editor.enterLyrics";
|
|
55
|
+
readonly control: "enterLyrics";
|
|
56
|
+
}, {
|
|
57
|
+
readonly value: "glissando";
|
|
58
|
+
readonly labelKey: "editor.glissando";
|
|
59
|
+
readonly control: "glissando";
|
|
60
|
+
}];
|
|
61
|
+
export type EditorMoreAction = (typeof EDITOR_MORE_ACTIONS)[number]["value"];
|
|
62
|
+
//# sourceMappingURL=toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/toolbar.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,4ZAgCnB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC;AAElD,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;EA2B9B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The editing bar's vocabulary: its controls, the More menu, the two ways to
|
|
3
|
+
* add a track, and how many voices it offers.
|
|
4
|
+
*
|
|
5
|
+
* When each control is available is music_editing's rule
|
|
6
|
+
* (`selectToolbarAvailability`); what they are called is the host's copy.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Every control on the editing bar whose availability depends on the score.
|
|
10
|
+
*
|
|
11
|
+
* The view controls — zoom, layout, pitch display, the inspector toggle — are
|
|
12
|
+
* deliberately absent: they change how the score is looked at rather than the
|
|
13
|
+
* score, so they are live with no score, with nothing selected and while the
|
|
14
|
+
* transport plays, and a row of constant `true`s would only be something for a
|
|
15
|
+
* bar to forget to read.
|
|
16
|
+
*/
|
|
17
|
+
export const TOOLBAR_CONTROLS = [
|
|
18
|
+
"addTrack",
|
|
19
|
+
"noteDuration",
|
|
20
|
+
"dotted",
|
|
21
|
+
"triplet",
|
|
22
|
+
"accidental",
|
|
23
|
+
"articulation",
|
|
24
|
+
"ornament",
|
|
25
|
+
"tie",
|
|
26
|
+
"insertMode",
|
|
27
|
+
"replaceMode",
|
|
28
|
+
"stackMode",
|
|
29
|
+
"insertNote",
|
|
30
|
+
"slur",
|
|
31
|
+
"crescendo",
|
|
32
|
+
"diminuendo",
|
|
33
|
+
"arpeggiate",
|
|
34
|
+
"beamBreak",
|
|
35
|
+
"beamNone",
|
|
36
|
+
"fermata",
|
|
37
|
+
"noteInput",
|
|
38
|
+
"insertRest",
|
|
39
|
+
"quantizeGrid",
|
|
40
|
+
"quantize",
|
|
41
|
+
"voice",
|
|
42
|
+
"moreActions",
|
|
43
|
+
"selectAll",
|
|
44
|
+
"addMeasure",
|
|
45
|
+
"deleteMeasure",
|
|
46
|
+
"goToBar",
|
|
47
|
+
"enterLyrics",
|
|
48
|
+
"glissando",
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* How many voices the bar offers.
|
|
52
|
+
*
|
|
53
|
+
* Two is where notation actually needs them — stems up against stems down on
|
|
54
|
+
* one stave. More is real notation too, but nothing else in the editor tells
|
|
55
|
+
* voices apart yet, so offering four would be offering somewhere to lose notes.
|
|
56
|
+
*/
|
|
57
|
+
export const EDITOR_VOICE_COUNT = 2;
|
|
58
|
+
/** The rarely-used actions both bars keep behind a More menu, in order. */
|
|
59
|
+
export const EDITOR_MORE_ACTIONS = [
|
|
60
|
+
{
|
|
61
|
+
value: "select-all",
|
|
62
|
+
labelKey: "editor.selectAllNotes",
|
|
63
|
+
control: "selectAll",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
value: "add-measure",
|
|
67
|
+
labelKey: "editor.addMeasure",
|
|
68
|
+
control: "addMeasure",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
value: "delete-measure",
|
|
72
|
+
labelKey: "editor.deleteMeasure",
|
|
73
|
+
control: "deleteMeasure",
|
|
74
|
+
},
|
|
75
|
+
{ value: "go-to-bar", labelKey: "editor.goToBar", control: "goToBar" },
|
|
76
|
+
{
|
|
77
|
+
value: "enter-lyrics",
|
|
78
|
+
labelKey: "editor.enterLyrics",
|
|
79
|
+
control: "enterLyrics",
|
|
80
|
+
},
|
|
81
|
+
{ value: "glissando", labelKey: "editor.glissando", control: "glissando" },
|
|
82
|
+
];
|
|
83
|
+
//# sourceMappingURL=toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolbar.js","sourceRoot":"","sources":["../../../src/domain/editor/toolbar.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU;IACV,cAAc;IACd,QAAQ;IACR,SAAS;IACT,YAAY;IACZ,cAAc;IACd,UAAU;IACV,KAAK;IACL,YAAY;IACZ,aAAa;IACb,WAAW;IACX,YAAY;IACZ,MAAM;IACN,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,UAAU;IACV,SAAS;IACT,WAAW;IACX,YAAY;IACZ,cAAc;IACd,UAAU;IACV,OAAO;IACP,aAAa;IACb,WAAW;IACX,YAAY;IACZ,eAAe;IACf,SAAS;IACT,aAAa;IACb,WAAW;CACH,CAAC;AAMX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAWpC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC;QACE,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,uBAAuB;QACjC,OAAO,EAAE,WAAW;KACrB;IACD;QACE,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,mBAAmB;QAC7B,OAAO,EAAE,YAAY;KACtB;IACD;QACE,KAAK,EAAE,gBAAgB;QACvB,QAAQ,EAAE,sBAAsB;QAChC,OAAO,EAAE,eAAe;KACzB;IACD,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE;IACtE;QACE,KAAK,EAAE,cAAc;QACrB,QAAQ,EAAE,oBAAoB;QAC9B,OAAO,EAAE,aAAa;KACvB;IACD,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,WAAW,EAAE;CAK1E,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the notation is laid out: `page` wraps systems to fit the width,
|
|
3
|
+
* `continuous` lays every measure out in one long system.
|
|
4
|
+
*
|
|
5
|
+
* An array with the type read off it, so a toolbar offering the choice reads
|
|
6
|
+
* this rather than writing the list out again — which is how one of them comes
|
|
7
|
+
* to offer a mode the renderer no longer has.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LAYOUT_MODES: readonly ["page", "continuous"];
|
|
10
|
+
export type LayoutMode = (typeof LAYOUT_MODES)[number];
|
|
11
|
+
/**
|
|
12
|
+
* The grids a quantize is offered on.
|
|
13
|
+
*
|
|
14
|
+
* Stops at a thirty-second: below that a grid is finer than the deviations a
|
|
15
|
+
* human performance actually has, so snapping to it changes nothing while
|
|
16
|
+
* looking like it did something.
|
|
17
|
+
*/
|
|
18
|
+
export declare const QUANTIZE_GRIDS: readonly ["quarter", "eighth", "sixteenth", "thirtysecond"];
|
|
19
|
+
export type QuantizeGrid = (typeof QUANTIZE_GRIDS)[number];
|
|
20
|
+
/** The short label a grid is written as on a bar: `1/16`. */
|
|
21
|
+
export declare const QUANTIZE_GRID_SHORT: Record<QuantizeGrid, string>;
|
|
22
|
+
//# sourceMappingURL=view-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-settings.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/view-settings.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,iCAAkC,CAAC;AAE5D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,6DAKiB,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,6DAA6D;AAC7D,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAK5D,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the notation is laid out: `page` wraps systems to fit the width,
|
|
3
|
+
* `continuous` lays every measure out in one long system.
|
|
4
|
+
*
|
|
5
|
+
* An array with the type read off it, so a toolbar offering the choice reads
|
|
6
|
+
* this rather than writing the list out again — which is how one of them comes
|
|
7
|
+
* to offer a mode the renderer no longer has.
|
|
8
|
+
*/
|
|
9
|
+
export const LAYOUT_MODES = ["page", "continuous"];
|
|
10
|
+
/**
|
|
11
|
+
* The grids a quantize is offered on.
|
|
12
|
+
*
|
|
13
|
+
* Stops at a thirty-second: below that a grid is finer than the deviations a
|
|
14
|
+
* human performance actually has, so snapping to it changes nothing while
|
|
15
|
+
* looking like it did something.
|
|
16
|
+
*/
|
|
17
|
+
export const QUANTIZE_GRIDS = [
|
|
18
|
+
"quarter",
|
|
19
|
+
"eighth",
|
|
20
|
+
"sixteenth",
|
|
21
|
+
"thirtysecond",
|
|
22
|
+
];
|
|
23
|
+
/** The short label a grid is written as on a bar: `1/16`. */
|
|
24
|
+
export const QUANTIZE_GRID_SHORT = {
|
|
25
|
+
quarter: "1/4",
|
|
26
|
+
eighth: "1/8",
|
|
27
|
+
sixteenth: "1/16",
|
|
28
|
+
thirtysecond: "1/32",
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=view-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-settings.js","sourceRoot":"","sources":["../../../src/domain/editor/view-settings.ts"],"names":[],"mappings":"AAMA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,YAAY,CAAU,CAAC;AAI5D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,SAAS;IACT,QAAQ;IACR,WAAW;IACX,cAAc;CAC4B,CAAC;AAI7C,6DAA6D;AAC7D,MAAM,CAAC,MAAM,mBAAmB,GAAiC;IAC/D,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,MAAM;IACjB,YAAY,EAAE,MAAM;CACrB,CAAC"}
|