@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.
Files changed (158) hide show
  1. package/CLAUDE.md +33 -3
  2. package/dist/domain/documents/document-state.d.ts +17 -0
  3. package/dist/domain/documents/document-state.d.ts.map +1 -0
  4. package/dist/domain/documents/document-state.js +6 -0
  5. package/dist/domain/documents/document-state.js.map +1 -0
  6. package/dist/domain/documents/export-formats.d.ts +74 -0
  7. package/dist/domain/documents/export-formats.d.ts.map +1 -0
  8. package/dist/domain/documents/export-formats.js +53 -0
  9. package/dist/domain/documents/export-formats.js.map +1 -0
  10. package/dist/domain/documents/formats.d.ts +17 -0
  11. package/dist/domain/documents/formats.d.ts.map +1 -0
  12. package/dist/domain/documents/formats.js +61 -0
  13. package/dist/domain/documents/formats.js.map +1 -0
  14. package/dist/domain/documents/project-file.d.ts +33 -0
  15. package/dist/domain/documents/project-file.d.ts.map +1 -0
  16. package/dist/domain/documents/project-file.js +14 -0
  17. package/dist/domain/documents/project-file.js.map +1 -0
  18. package/dist/domain/documents/publish.d.ts +6 -0
  19. package/dist/domain/documents/publish.d.ts.map +1 -0
  20. package/dist/domain/documents/publish.js +2 -0
  21. package/dist/domain/documents/publish.js.map +1 -0
  22. package/dist/domain/documents/templates.d.ts +21 -0
  23. package/dist/domain/documents/templates.d.ts.map +1 -0
  24. package/dist/domain/documents/templates.js +22 -0
  25. package/dist/domain/documents/templates.js.map +1 -0
  26. package/dist/domain/editor/app-errors.d.ts +16 -0
  27. package/dist/domain/editor/app-errors.d.ts.map +1 -0
  28. package/dist/domain/editor/app-errors.js +8 -0
  29. package/dist/domain/editor/app-errors.js.map +1 -0
  30. package/dist/domain/editor/context-menu.d.ts +74 -0
  31. package/dist/domain/editor/context-menu.d.ts.map +1 -0
  32. package/dist/domain/editor/context-menu.js +19 -0
  33. package/dist/domain/editor/context-menu.js.map +1 -0
  34. package/dist/domain/editor/device-prefs.d.ts +107 -0
  35. package/dist/domain/editor/device-prefs.d.ts.map +1 -0
  36. package/dist/domain/editor/device-prefs.js +66 -0
  37. package/dist/domain/editor/device-prefs.js.map +1 -0
  38. package/dist/domain/editor/docs.d.ts +56 -0
  39. package/dist/domain/editor/docs.d.ts.map +1 -0
  40. package/dist/domain/editor/docs.js +41 -0
  41. package/dist/domain/editor/docs.js.map +1 -0
  42. package/dist/domain/editor/edit-mode.d.ts +31 -0
  43. package/dist/domain/editor/edit-mode.d.ts.map +1 -0
  44. package/dist/domain/editor/edit-mode.js +40 -0
  45. package/dist/domain/editor/edit-mode.js.map +1 -0
  46. package/dist/domain/editor/editing-copy.d.ts +91 -0
  47. package/dist/domain/editor/editing-copy.d.ts.map +1 -0
  48. package/dist/domain/editor/editing-copy.js +88 -0
  49. package/dist/domain/editor/editing-copy.js.map +1 -0
  50. package/dist/domain/editor/inspector.d.ts +45 -0
  51. package/dist/domain/editor/inspector.d.ts.map +1 -0
  52. package/dist/domain/editor/inspector.js +34 -0
  53. package/dist/domain/editor/inspector.js.map +1 -0
  54. package/dist/domain/editor/labelled-option.d.ts +6 -0
  55. package/dist/domain/editor/labelled-option.d.ts.map +1 -0
  56. package/dist/domain/editor/labelled-option.js +2 -0
  57. package/dist/domain/editor/labelled-option.js.map +1 -0
  58. package/dist/domain/editor/library-copy.d.ts +61 -0
  59. package/dist/domain/editor/library-copy.d.ts.map +1 -0
  60. package/dist/domain/editor/library-copy.js +2 -0
  61. package/dist/domain/editor/library-copy.js.map +1 -0
  62. package/dist/domain/editor/print.d.ts +30 -0
  63. package/dist/domain/editor/print.d.ts.map +1 -0
  64. package/dist/domain/editor/print.js +43 -0
  65. package/dist/domain/editor/print.js.map +1 -0
  66. package/dist/domain/editor/score-input.d.ts +158 -0
  67. package/dist/domain/editor/score-input.d.ts.map +1 -0
  68. package/dist/domain/editor/score-input.js +2 -0
  69. package/dist/domain/editor/score-input.js.map +1 -0
  70. package/dist/domain/editor/toast.d.ts +32 -0
  71. package/dist/domain/editor/toast.d.ts.map +1 -0
  72. package/dist/domain/editor/toast.js +5 -0
  73. package/dist/domain/editor/toast.js.map +1 -0
  74. package/dist/domain/editor/toolbar.d.ts +62 -0
  75. package/dist/domain/editor/toolbar.d.ts.map +1 -0
  76. package/dist/domain/editor/toolbar.js +83 -0
  77. package/dist/domain/editor/toolbar.js.map +1 -0
  78. package/dist/domain/editor/view-settings.d.ts +22 -0
  79. package/dist/domain/editor/view-settings.d.ts.map +1 -0
  80. package/dist/domain/editor/view-settings.js +30 -0
  81. package/dist/domain/editor/view-settings.js.map +1 -0
  82. package/dist/domain/generation/replace-drafts.d.ts +78 -0
  83. package/dist/domain/generation/replace-drafts.d.ts.map +1 -0
  84. package/dist/domain/generation/replace-drafts.js +40 -0
  85. package/dist/domain/generation/replace-drafts.js.map +1 -0
  86. package/dist/domain/generation/request-drafts.d.ts +226 -0
  87. package/dist/domain/generation/request-drafts.d.ts.map +1 -0
  88. package/dist/domain/generation/request-drafts.js +52 -0
  89. package/dist/domain/generation/request-drafts.js.map +1 -0
  90. package/dist/domain/instruments/gm-catalogue.d.ts +27 -3
  91. package/dist/domain/instruments/gm-catalogue.d.ts.map +1 -1
  92. package/dist/domain/instruments/gm-catalogue.js +4 -3
  93. package/dist/domain/instruments/gm-catalogue.js.map +1 -1
  94. package/dist/domain/instruments/gm-polyphony.d.ts +25 -2
  95. package/dist/domain/instruments/gm-polyphony.d.ts.map +1 -1
  96. package/dist/domain/instruments/gm-polyphony.js +9 -3
  97. package/dist/domain/instruments/gm-polyphony.js.map +1 -1
  98. package/dist/domain/instruments/gm-range.d.ts +10 -6
  99. package/dist/domain/instruments/gm-range.d.ts.map +1 -1
  100. package/dist/domain/instruments/gm-range.js +18 -3
  101. package/dist/domain/instruments/gm-range.js.map +1 -1
  102. package/dist/domain/instruments/out-of-range.d.ts +70 -0
  103. package/dist/domain/instruments/out-of-range.d.ts.map +1 -0
  104. package/dist/domain/instruments/out-of-range.js +106 -0
  105. package/dist/domain/instruments/out-of-range.js.map +1 -0
  106. package/dist/domain/instruments/track-instrument.d.ts +23 -0
  107. package/dist/domain/instruments/track-instrument.d.ts.map +1 -1
  108. package/dist/domain/instruments/track-instrument.js +26 -0
  109. package/dist/domain/instruments/track-instrument.js.map +1 -1
  110. package/dist/domain/notation/music-vocabulary.d.ts +17 -0
  111. package/dist/domain/notation/music-vocabulary.d.ts.map +1 -1
  112. package/dist/domain/notation/music-vocabulary.js +25 -1
  113. package/dist/domain/notation/music-vocabulary.js.map +1 -1
  114. package/dist/domain/notation/picker-options.d.ts +42 -2
  115. package/dist/domain/notation/picker-options.d.ts.map +1 -1
  116. package/dist/domain/notation/picker-options.js +41 -2
  117. package/dist/domain/notation/picker-options.js.map +1 -1
  118. package/dist/domain/score/transport-settings.d.ts +29 -0
  119. package/dist/domain/score/transport-settings.d.ts.map +1 -0
  120. package/dist/domain/score/transport-settings.js +2 -0
  121. package/dist/domain/score/transport-settings.js.map +1 -0
  122. package/dist/formats/audio-import.d.ts +15 -0
  123. package/dist/formats/audio-import.d.ts.map +1 -0
  124. package/dist/formats/audio-import.js +26 -0
  125. package/dist/formats/audio-import.js.map +1 -0
  126. package/dist/formats/index.d.ts +10 -0
  127. package/dist/formats/index.d.ts.map +1 -1
  128. package/dist/formats/index.js +10 -0
  129. package/dist/formats/index.js.map +1 -1
  130. package/dist/formats/midi-import.d.ts +128 -0
  131. package/dist/formats/midi-import.d.ts.map +1 -0
  132. package/dist/formats/midi-import.js +2 -0
  133. package/dist/formats/midi-import.js.map +1 -0
  134. package/dist/formats/musicxml.d.ts +44 -0
  135. package/dist/formats/musicxml.d.ts.map +1 -0
  136. package/dist/formats/musicxml.js +2 -0
  137. package/dist/formats/musicxml.js.map +1 -0
  138. package/dist/formats/tracker-export.d.ts +55 -0
  139. package/dist/formats/tracker-export.d.ts.map +1 -0
  140. package/dist/formats/tracker-export.js +18 -0
  141. package/dist/formats/tracker-export.js.map +1 -0
  142. package/dist/index.d.ts +24 -0
  143. package/dist/index.d.ts.map +1 -1
  144. package/dist/index.js +30 -0
  145. package/dist/index.js.map +1 -1
  146. package/dist/platform/index.d.ts +2 -0
  147. package/dist/platform/index.d.ts.map +1 -1
  148. package/dist/platform/index.js +2 -0
  149. package/dist/platform/index.js.map +1 -1
  150. package/dist/platform/score-files.d.ts +36 -0
  151. package/dist/platform/score-files.d.ts.map +1 -0
  152. package/dist/platform/score-files.js +2 -0
  153. package/dist/platform/score-files.js.map +1 -0
  154. package/dist/platform/storage.d.ts +19 -0
  155. package/dist/platform/storage.d.ts.map +1 -0
  156. package/dist/platform/storage.js +10 -0
  157. package/dist/platform/storage.js.map +1 -0
  158. package/package.json +1 -1
@@ -0,0 +1,107 @@
1
+ /**
2
+ * How this person likes to work, on this device: the vocabulary.
3
+ *
4
+ * The prefs themselves — validating a stored object, loading, saving, the
5
+ * store that holds them — are music_lib's. The closed lists and the shape are
6
+ * here because both apps draw a settings screen from them.
7
+ */
8
+ import type { PitchDisplay } from "../score/display-score.js";
9
+ import type { PickerOption } from "../notation/picker-options.js";
10
+ /**
11
+ * The colour scheme a reader asked for.
12
+ *
13
+ * An array with the type read off it, not a bare union: a union has no runtime
14
+ * form, so the settings picker in each app would have to write the list out
15
+ * again — which is how one of them comes to offer a mode nothing applies.
16
+ * `system` means "follow the OS", and is the default because a device that has
17
+ * been told to go dark at sunset should take the app with it.
18
+ */
19
+ export declare const THEME_MODES: readonly ["light", "dark", "system"];
20
+ export type ThemeMode = (typeof THEME_MODES)[number];
21
+ /** A scheme that can actually be drawn: never `system`. */
22
+ export type ResolvedThemeMode = Exclude<ThemeMode, "system">;
23
+ /**
24
+ * The word for each theme mode.
25
+ *
26
+ * The web's theme menu capitalised the mode's own name, so a Chinese reader
27
+ * chose between "Light", "Dark" and "System" in English; both apps then fixed
28
+ * that with the same three keys and each kept its own copy of the table. A
29
+ * `Record`, so a fourth mode fails to compile rather than printing a key.
30
+ *
31
+ * Here rather than beside the other picker tables in `picker-options.ts`, for
32
+ * the reason those live beside their own vocabularies: a list keyed by a closed
33
+ * vocabulary belongs next to the vocabulary. (`picker-options` is also
34
+ * evaluated before this module by the barrel, so a table there reading
35
+ * `THEME_MODES` would read it before it exists.)
36
+ */
37
+ export declare const THEME_MODE_LABEL_KEY: Record<ThemeMode, string>;
38
+ /** The three modes as a settings picker wants them: value plus its key. */
39
+ export declare const THEME_MODE_OPTIONS: ReadonlyArray<PickerOption<ThemeMode>>;
40
+ export declare const FONT_SIZES: readonly ["small", "medium", "large"];
41
+ export type FontSize = (typeof FONT_SIZES)[number];
42
+ /**
43
+ * The developer switches, shown while developer mode is on.
44
+ *
45
+ * Only one, and that is the point: this carried six overlay toggles from spec
46
+ * §33 as well (`showIds`, `showTicks`, `showMeasureBoundaries`,
47
+ * `showPlaybackScheduling`, `enableDiagnostics`, `enableValidationWarnings`),
48
+ * and no package in the family ever read one of them. Both apps drew a switch
49
+ * for each, so a developer could turn six settings on and watch nothing happen
50
+ * — which is worse than the absent feature, because it reads as a broken one.
51
+ * They are gone rather than left standing as a promise. A field added back here
52
+ * has to have a reader.
53
+ */
54
+ export type DevSettings = {
55
+ /**
56
+ * Which generation backend new scores are asked from.
57
+ *
58
+ * A developer setting rather than a Generate-dialog control on purpose: the
59
+ * answer is the same for every generation until somebody is deliberately
60
+ * comparing two of them, and putting it in the ordinary flow would ask every
61
+ * user a question they have no basis to answer.
62
+ *
63
+ * Typed as a plain string rather than `GenerationVariant` so a value stored
64
+ * by a newer build cannot break an older one — the server resolves it through
65
+ * an allow-list and falls back to the default, so an unrecognised value is
66
+ * harmless at both ends.
67
+ */
68
+ generationVariant: string;
69
+ };
70
+ export type DevicePrefs = {
71
+ themeMode: ThemeMode;
72
+ developerMode: boolean;
73
+ pitchDisplay: PitchDisplay;
74
+ /** The piano keyboard panel. Expanded by default on both apps. */
75
+ keyboardCollapsed: boolean;
76
+ fontSize: FontSize;
77
+ /**
78
+ * The UI language as a BCP 47 tag, or `null` to follow the device.
79
+ *
80
+ * `null` rather than the device's language filled in, because "follow the
81
+ * device" has to survive the device changing language.
82
+ */
83
+ language: string | null;
84
+ };
85
+ /**
86
+ * The language to open in when nothing else has said.
87
+ *
88
+ * The reader's own choice first (the `language` pref, `null` for "follow the
89
+ * device", which is what the pref stores rather than a filled-in answer so a
90
+ * device that changes language is followed), then the device's own tags, then
91
+ * the first language the build ships — which is English in both apps, and is
92
+ * taken from the list rather than written in so a build that shipped another
93
+ * one first would not be told it was English.
94
+ *
95
+ * **Tags are matched by their language subtag.** A phone stores a BCP 47 tag
96
+ * and a browser reports `zh-CN`; neither `zh-Hans` nor `zh-CN` is a bundle
97
+ * either app has, and comparing whole tags is how the native app came to ignore
98
+ * its own reader's stored `zh-Hans` and open in English. A choice with no
99
+ * bundle is skipped rather than honoured, since honouring it renders every
100
+ * string as its raw key.
101
+ *
102
+ * `supported` stays each app's, because the two ship their strings differently
103
+ * — the web fetches a directory per language, the native app bundles a JSON —
104
+ * so which languages exist is a fact about the build. Only the rule is shared.
105
+ */
106
+ export declare function preferredLanguage<T extends string>(chosen: string | null | undefined, deviceTags: readonly string[], supported: readonly [T, ...T[]]): T;
107
+ //# sourceMappingURL=device-prefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-prefs.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/device-prefs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;;;;GAQG;AACH,eAAO,MAAM,WAAW,sCAAuC,CAAC;AAEhE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;AAE7D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAI1D,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,YAAY,CAAC,SAAS,CAAC,CAIjE,CAAC;AAEN,eAAO,MAAM,UAAU,uCAAwC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;;;;;;;;OAYG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,YAAY,CAAC;IAC3B,kEAAkE;IAClE,iBAAiB,EAAE,OAAO,CAAC;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAChD,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACjC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,GAC9B,CAAC,CAOH"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * The colour scheme a reader asked for.
3
+ *
4
+ * An array with the type read off it, not a bare union: a union has no runtime
5
+ * form, so the settings picker in each app would have to write the list out
6
+ * again — which is how one of them comes to offer a mode nothing applies.
7
+ * `system` means "follow the OS", and is the default because a device that has
8
+ * been told to go dark at sunset should take the app with it.
9
+ */
10
+ export const THEME_MODES = ["light", "dark", "system"];
11
+ /**
12
+ * The word for each theme mode.
13
+ *
14
+ * The web's theme menu capitalised the mode's own name, so a Chinese reader
15
+ * chose between "Light", "Dark" and "System" in English; both apps then fixed
16
+ * that with the same three keys and each kept its own copy of the table. A
17
+ * `Record`, so a fourth mode fails to compile rather than printing a key.
18
+ *
19
+ * Here rather than beside the other picker tables in `picker-options.ts`, for
20
+ * the reason those live beside their own vocabularies: a list keyed by a closed
21
+ * vocabulary belongs next to the vocabulary. (`picker-options` is also
22
+ * evaluated before this module by the barrel, so a table there reading
23
+ * `THEME_MODES` would read it before it exists.)
24
+ */
25
+ export const THEME_MODE_LABEL_KEY = {
26
+ light: "settings.themeLight",
27
+ dark: "settings.themeDark",
28
+ system: "settings.themeSystem",
29
+ };
30
+ /** The three modes as a settings picker wants them: value plus its key. */
31
+ export const THEME_MODE_OPTIONS = THEME_MODES.map((value) => ({
32
+ value,
33
+ labelKey: THEME_MODE_LABEL_KEY[value],
34
+ }));
35
+ export const FONT_SIZES = ["small", "medium", "large"];
36
+ /**
37
+ * The language to open in when nothing else has said.
38
+ *
39
+ * The reader's own choice first (the `language` pref, `null` for "follow the
40
+ * device", which is what the pref stores rather than a filled-in answer so a
41
+ * device that changes language is followed), then the device's own tags, then
42
+ * the first language the build ships — which is English in both apps, and is
43
+ * taken from the list rather than written in so a build that shipped another
44
+ * one first would not be told it was English.
45
+ *
46
+ * **Tags are matched by their language subtag.** A phone stores a BCP 47 tag
47
+ * and a browser reports `zh-CN`; neither `zh-Hans` nor `zh-CN` is a bundle
48
+ * either app has, and comparing whole tags is how the native app came to ignore
49
+ * its own reader's stored `zh-Hans` and open in English. A choice with no
50
+ * bundle is skipped rather than honoured, since honouring it renders every
51
+ * string as its raw key.
52
+ *
53
+ * `supported` stays each app's, because the two ship their strings differently
54
+ * — the web fetches a directory per language, the native app bundles a JSON —
55
+ * so which languages exist is a fact about the build. Only the rule is shared.
56
+ */
57
+ export function preferredLanguage(chosen, deviceTags, supported) {
58
+ for (const tag of [chosen, ...deviceTags]) {
59
+ const code = tag?.split("-")[0]?.toLowerCase() ?? "";
60
+ const match = supported.find((language) => language === code);
61
+ if (match)
62
+ return match;
63
+ }
64
+ return supported[0];
65
+ }
66
+ //# sourceMappingURL=device-prefs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device-prefs.js","sourceRoot":"","sources":["../../../src/domain/editor/device-prefs.ts"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAOhE;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA8B;IAC7D,KAAK,EAAE,qBAAqB;IAC5B,IAAI,EAAE,oBAAoB;IAC1B,MAAM,EAAE,sBAAsB;CAC/B,CAAC;AAEF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,kBAAkB,GAC7B,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC1B,KAAK;IACL,QAAQ,EAAE,oBAAoB,CAAC,KAAK,CAAC;CACtC,CAAC,CAAC,CAAC;AAEN,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAgDhE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAiC,EACjC,UAA6B,EAC7B,SAA+B;IAE/B,KAAK,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,GAAG,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QACrD,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;QAC9D,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC;IAC1B,CAAC;IACD,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The documentation's vocabulary: which topics exist, how they group, and the
3
+ * shapes of a topic, a resource link and a shortcut row.
4
+ *
5
+ * The content tables built from these — `DOCS_TOPICS`, `RESOURCE_GROUPS` —
6
+ * are music_lib's, and `SHORTCUTS` is music_editing's, beside the bindings it
7
+ * is checked against. Every description is an i18n key: the prose lives in
8
+ * each host's locale files.
9
+ */
10
+ /** Every documentation topic, in the order the list shows them. */
11
+ export declare const DOCS_TOPIC_IDS: readonly ["getting-started", "navigation", "editor", "notation", "structure", "tracks", "playback", "midi-input", "inspector", "generation", "sharing", "settings", "shortcuts", "instruments", "formats", "limits"];
12
+ export type DocsTopicId = (typeof DOCS_TOPIC_IDS)[number];
13
+ /** Extra content a topic renders beneath its prose, built from live data. */
14
+ export type DocsWidget = "shortcuts" | "instruments" | "formats";
15
+ export type DocsSubsection = {
16
+ /** i18n key for the subsection heading. */
17
+ heading: string;
18
+ /** i18n keys, one per paragraph. */
19
+ body: readonly string[];
20
+ };
21
+ export type DocsTopic = {
22
+ id: DocsTopicId;
23
+ /** i18n key for the title shown in the list and at the head of the page. */
24
+ title: string;
25
+ /** i18n key for the one-line summary under the title in the list. */
26
+ summary: string;
27
+ sections: readonly DocsSubsection[];
28
+ widget?: DocsWidget;
29
+ };
30
+ /** The group a topic sits under in the navigation list. */
31
+ export declare const DOCS_GROUPS: readonly ["start", "using", "reference"];
32
+ export type DocsGroup = (typeof DOCS_GROUPS)[number];
33
+ /** One place to find music to open. */
34
+ export type Resource = {
35
+ /** i18n key suffix under `resources.link`, and the React key. */
36
+ key: string;
37
+ name: string;
38
+ url: string;
39
+ };
40
+ /** Resources grouped by which importer the files feed. */
41
+ export type ResourceGroup = {
42
+ /** i18n key suffix under `resources.group`, for the title and route line. */
43
+ key: string;
44
+ links: readonly Resource[];
45
+ };
46
+ export type ShortcutRow = {
47
+ /** The keys, written out. Mutually exclusive with `keysKey`. */
48
+ keys?: string;
49
+ /** A translated description of the gesture, where it is not a key chord. */
50
+ keysKey?: string;
51
+ actionKey: string;
52
+ };
53
+ /** Which part of the editor a shortcut belongs to — the docs group by these. */
54
+ export declare const SHORTCUT_GROUPS: readonly ["transport", "editing", "selection", "noteEntry", "marks", "caret", "pointer"];
55
+ export type ShortcutGroup = (typeof SHORTCUT_GROUPS)[number];
56
+ //# sourceMappingURL=docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,mEAAmE;AACnE,eAAO,MAAM,cAAc,sNAiBjB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1D,6EAA6E;AAC7E,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG;IAC3B,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,WAAW,CAAC;IAChB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;IACpC,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,2DAA2D;AAC3D,eAAO,MAAM,WAAW,0CAA2C,CAAC;AACpE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,uCAAuC;AACvC,MAAM,MAAM,QAAQ,GAAG;IACrB,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,0DAA0D;AAC1D,MAAM,MAAM,aAAa,GAAG;IAC1B,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,eAAe,0FAQlB,CAAC;AACX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * The documentation's vocabulary: which topics exist, how they group, and the
3
+ * shapes of a topic, a resource link and a shortcut row.
4
+ *
5
+ * The content tables built from these — `DOCS_TOPICS`, `RESOURCE_GROUPS` —
6
+ * are music_lib's, and `SHORTCUTS` is music_editing's, beside the bindings it
7
+ * is checked against. Every description is an i18n key: the prose lives in
8
+ * each host's locale files.
9
+ */
10
+ /** Every documentation topic, in the order the list shows them. */
11
+ export const DOCS_TOPIC_IDS = [
12
+ "getting-started",
13
+ "navigation",
14
+ "editor",
15
+ "notation",
16
+ "structure",
17
+ "tracks",
18
+ "playback",
19
+ "midi-input",
20
+ "inspector",
21
+ "generation",
22
+ "sharing",
23
+ "settings",
24
+ "shortcuts",
25
+ "instruments",
26
+ "formats",
27
+ "limits",
28
+ ];
29
+ /** The group a topic sits under in the navigation list. */
30
+ export const DOCS_GROUPS = ["start", "using", "reference"];
31
+ /** Which part of the editor a shortcut belongs to — the docs group by these. */
32
+ export const SHORTCUT_GROUPS = [
33
+ "transport",
34
+ "editing",
35
+ "selection",
36
+ "noteEntry",
37
+ "marks",
38
+ "caret",
39
+ "pointer",
40
+ ];
41
+ //# sourceMappingURL=docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../src/domain/editor/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,mEAAmE;AACnE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,iBAAiB;IACjB,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,WAAW;IACX,QAAQ;IACR,UAAU;IACV,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,SAAS;IACT,UAAU;IACV,WAAW;IACX,aAAa;IACb,SAAS;IACT,QAAQ;CACA,CAAC;AAuBX,2DAA2D;AAC3D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,CAAU,CAAC;AA0BpE,gFAAgF;AAChF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,WAAW;IACX,SAAS;IACT,WAAW;IACX,WAAW;IACX,OAAO;IACP,OAAO;IACP,SAAS;CACD,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * What happens to music already at the caret when a new note is written.
3
+ */
4
+ import type { NotationIconName } from "../notation/notation-icon-art.js";
5
+ /**
6
+ * `insert` shifts the active track's later notes out of the way, `replace`
7
+ * overwrites them, `stack` joins them as a chord. Deliberately NOT about
8
+ * whether one gesture makes a chord — keys held together are one chord in
9
+ * every mode, because that is what playing them means.
10
+ */
11
+ export declare const EDIT_MODES: readonly ["insert", "replace", "stack"];
12
+ export type EditMode = (typeof EDIT_MODES)[number];
13
+ /**
14
+ * The edit modes as a toolbar offers them: in order, each with its glyph and
15
+ * its label and hint keys.
16
+ *
17
+ * Beside `EditMode` because that is what it lists — one declaration of the
18
+ * vocabulary and one of its options, in the package every app and library
19
+ * reads vocabulary from.
20
+ *
21
+ * Stack's hint has a second form, `editor.stackModeUnavailable`, for a track
22
+ * whose instrument cannot play a chord — that depends on the track, so the
23
+ * caller picks it (`editModeHintKey` in music_editing).
24
+ */
25
+ export declare const EDIT_MODE_OPTIONS: ReadonlyArray<{
26
+ value: EditMode;
27
+ icon: NotationIconName;
28
+ labelKey: string;
29
+ hintKey: string;
30
+ }>;
31
+ //# sourceMappingURL=edit-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-mode.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/edit-mode.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,yCAA0C,CAAC;AAElE,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC;IAC5C,KAAK,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,gBAAgB,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAmBA,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * `insert` shifts the active track's later notes out of the way, `replace`
3
+ * overwrites them, `stack` joins them as a chord. Deliberately NOT about
4
+ * whether one gesture makes a chord — keys held together are one chord in
5
+ * every mode, because that is what playing them means.
6
+ */
7
+ export const EDIT_MODES = ["insert", "replace", "stack"];
8
+ /**
9
+ * The edit modes as a toolbar offers them: in order, each with its glyph and
10
+ * its label and hint keys.
11
+ *
12
+ * Beside `EditMode` because that is what it lists — one declaration of the
13
+ * vocabulary and one of its options, in the package every app and library
14
+ * reads vocabulary from.
15
+ *
16
+ * Stack's hint has a second form, `editor.stackModeUnavailable`, for a track
17
+ * whose instrument cannot play a chord — that depends on the track, so the
18
+ * caller picks it (`editModeHintKey` in music_editing).
19
+ */
20
+ export const EDIT_MODE_OPTIONS = [
21
+ {
22
+ value: "insert",
23
+ icon: "InsertModeIcon",
24
+ labelKey: "editor.insertMode",
25
+ hintKey: "editor.insertModeHint",
26
+ },
27
+ {
28
+ value: "replace",
29
+ icon: "ReplaceModeIcon",
30
+ labelKey: "editor.replaceMode",
31
+ hintKey: "editor.replaceModeHint",
32
+ },
33
+ {
34
+ value: "stack",
35
+ icon: "ChordIcon",
36
+ labelKey: "editor.stackMode",
37
+ hintKey: "editor.stackModeHint",
38
+ },
39
+ ];
40
+ //# sourceMappingURL=edit-mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit-mode.js","sourceRoot":"","sources":["../../../src/domain/editor/edit-mode.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAU,CAAC;AAIlE;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAKzB;IACH;QACE,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,mBAAmB;QAC7B,OAAO,EAAE,uBAAuB;KACjC;IACD;QACE,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,oBAAoB;QAC9B,OAAO,EAAE,wBAAwB;KAClC;IACD;QACE,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,kBAAkB;QAC5B,OAAO,EAAE,sBAAsB;KAChC;CACF,CAAC"}
@@ -0,0 +1,91 @@
1
+ /**
2
+ * The words an edit is described in, as a contract the host fills in.
3
+ *
4
+ * An edit has to be *named* — in the undo history and in the occasional toast
5
+ * — and no library in this family holds user-facing strings in any language.
6
+ * So music_editing declares what it needs to say as keys and facts, and each
7
+ * app supplies the sentences (`setEditingCopy`, built by music_lib's
8
+ * `createLibraryCopy`). The contract is declared here so the library that
9
+ * reads it and the one that builds it name one shape.
10
+ */
11
+ /**
12
+ * One key per command, named for the command rather than its wording.
13
+ *
14
+ * An array with the type read off it, not a bare union: a host has to prove
15
+ * every one of these has a translation, and a union has no runtime form to
16
+ * walk. Both apps' undo histories printed raw keys for labels nobody had
17
+ * written — the web for eleven commands, the native app for all but four —
18
+ * because nothing could enumerate what was needed.
19
+ */
20
+ export declare const COMMAND_LABEL_KEYS: readonly ["addNote", "addMeasure", "addTrack", "changeAccidental", "changeArticulation", "changeDuration", "changeDynamic", "changePitch", "changeClef", "changeKeySignature", "changeRepeats", "changeMetadata", "changeTempo", "changeTimeSignature", "changeTrackProps", "changeVelocity", "deleteEvents", "changeVoice", "clearBars", "clearTrack", "deleteMeasure", "deleteTrack", "importScore", "insertWithRipple", "moveNotes", "pasteEvents", "pasteBars", "pasteTrack", "quantize", "relocateNotes", "resizeNotes", "setChordSymbol", "setFingering", "setPickup", "setLyric", "toGraceNote", "changeBeam", "changeBarline", "changeMeasureClef", "changeNavigation", "changeOrnament", "toggleArpeggiate", "toggleGlissando", "toggleOttava", "toggleFermata", "toggleHairpin", "toggleSlur", "toggleTie", "transpose"];
21
+ export type CommandLabelKey = (typeof COMMAND_LABEL_KEYS)[number];
22
+ /**
23
+ * What an edit that was refused had been about to do.
24
+ *
25
+ * The tail of the sentence — "so it was not added", "so nothing was pasted" —
26
+ * and a closed list so a host's copy table fails to compile when a new route
27
+ * starts refusing, rather than printing a key.
28
+ */
29
+ export declare const REFUSED_EDITS: readonly ["addNote", "addChord", "changeNote", "changeAccidental", "moveNote", "moveNotes", "transpose", "paste"];
30
+ export type RefusedEdit = (typeof REFUSED_EDITS)[number];
31
+ /** Which side of an instrument's compass a refused pitch fell. */
32
+ export type RangeDirection = "above" | "below";
33
+ export type OutOfRangeCopy = {
34
+ /** The refused sounding pitch, written as `pitchToString` writes it: `C#2`. */
35
+ pitch: string;
36
+ /** The track's instrument name, as the catalogue spells it. */
37
+ instrument: string;
38
+ /** The compass's lowest and highest sounding pitches, written the same way. */
39
+ low: string;
40
+ high: string;
41
+ direction: RangeDirection;
42
+ refused: RefusedEdit;
43
+ };
44
+ export type PolyphonyCopy = {
45
+ /** `null` when the target track could not be resolved. */
46
+ instrument: string | null;
47
+ /** How many notes the instrument plays at once; 1 is a monophonic part. */
48
+ limit: number;
49
+ refused: RefusedEdit;
50
+ };
51
+ export type EditingCopy = {
52
+ /**
53
+ * What each command is called in the undo history.
54
+ *
55
+ * A resolver rather than a snapshot: labels are read at dispatch time, so the
56
+ * label stored in history is the one the edit was actually made under — which
57
+ * is what you want when reading back what you did, and what a table captured
58
+ * at bootstrap would get wrong the moment somebody switches language.
59
+ */
60
+ commandLabel: (key: CommandLabelKey) => string;
61
+ /**
62
+ * An edit introduced a validation error that was not there before.
63
+ *
64
+ * A function rather than a string because it has to carry the validator's own
65
+ * account of what went wrong, and where that detail sits in the sentence is a
66
+ * question about the language, not about the edit.
67
+ */
68
+ validationProblem: (detail: string) => string;
69
+ /** Refusing to delete a track's only measure. */
70
+ lastMeasureKept: string;
71
+ /**
72
+ * A note the instrument cannot play was refused.
73
+ *
74
+ * Facts rather than a sentence: the pitch, the instrument, its compass, which
75
+ * side of it the note fell and what was being attempted. Every one of those
76
+ * used to be spliced into an English string, so a Chinese reader was told in
77
+ * English why the note they played did not appear — and the order of the
78
+ * parts ("C2 is below Violin's range") is itself a fact about English.
79
+ */
80
+ outOfRange: (detail: OutOfRangeCopy) => string;
81
+ /** A chord was refused because the instrument plays fewer notes at once. */
82
+ tooManyNotes: (detail: PolyphonyCopy) => string;
83
+ /**
84
+ * The label on a toast's Undo button.
85
+ *
86
+ * Offered where a refusal leaves somebody's music only in the undo history —
87
+ * a paste refused after a cut, whose notes are no longer anywhere else.
88
+ */
89
+ undoAction: () => string;
90
+ };
91
+ //# sourceMappingURL=editing-copy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editing-copy.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/editing-copy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,oyBAkDrB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,mHAShB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,kEAAkE;AAClE,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG;IAC3B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,UAAU,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,0DAA0D;IAC1D,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;;;OAOG;IACH,YAAY,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,MAAM,CAAC;IAC/C;;;;;;OAMG;IACH,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C,iDAAiD;IACjD,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,UAAU,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,MAAM,CAAC;IAC/C,4EAA4E;IAC5E,YAAY,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,MAAM,CAAC;IAChD;;;;;OAKG;IACH,UAAU,EAAE,MAAM,MAAM,CAAC;CAC1B,CAAC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * The words an edit is described in, as a contract the host fills in.
3
+ *
4
+ * An edit has to be *named* — in the undo history and in the occasional toast
5
+ * — and no library in this family holds user-facing strings in any language.
6
+ * So music_editing declares what it needs to say as keys and facts, and each
7
+ * app supplies the sentences (`setEditingCopy`, built by music_lib's
8
+ * `createLibraryCopy`). The contract is declared here so the library that
9
+ * reads it and the one that builds it name one shape.
10
+ */
11
+ /**
12
+ * One key per command, named for the command rather than its wording.
13
+ *
14
+ * An array with the type read off it, not a bare union: a host has to prove
15
+ * every one of these has a translation, and a union has no runtime form to
16
+ * walk. Both apps' undo histories printed raw keys for labels nobody had
17
+ * written — the web for eleven commands, the native app for all but four —
18
+ * because nothing could enumerate what was needed.
19
+ */
20
+ export const COMMAND_LABEL_KEYS = [
21
+ "addNote",
22
+ "addMeasure",
23
+ "addTrack",
24
+ "changeAccidental",
25
+ "changeArticulation",
26
+ "changeDuration",
27
+ "changeDynamic",
28
+ "changePitch",
29
+ "changeClef",
30
+ "changeKeySignature",
31
+ "changeRepeats",
32
+ "changeMetadata",
33
+ "changeTempo",
34
+ "changeTimeSignature",
35
+ "changeTrackProps",
36
+ "changeVelocity",
37
+ "deleteEvents",
38
+ "changeVoice",
39
+ "clearBars",
40
+ "clearTrack",
41
+ "deleteMeasure",
42
+ "deleteTrack",
43
+ "importScore",
44
+ "insertWithRipple",
45
+ "moveNotes",
46
+ "pasteEvents",
47
+ "pasteBars",
48
+ "pasteTrack",
49
+ "quantize",
50
+ "relocateNotes",
51
+ "resizeNotes",
52
+ "setChordSymbol",
53
+ "setFingering",
54
+ "setPickup",
55
+ "setLyric",
56
+ "toGraceNote",
57
+ "changeBeam",
58
+ "changeBarline",
59
+ "changeMeasureClef",
60
+ "changeNavigation",
61
+ "changeOrnament",
62
+ "toggleArpeggiate",
63
+ "toggleGlissando",
64
+ "toggleOttava",
65
+ "toggleFermata",
66
+ "toggleHairpin",
67
+ "toggleSlur",
68
+ "toggleTie",
69
+ "transpose",
70
+ ];
71
+ /**
72
+ * What an edit that was refused had been about to do.
73
+ *
74
+ * The tail of the sentence — "so it was not added", "so nothing was pasted" —
75
+ * and a closed list so a host's copy table fails to compile when a new route
76
+ * starts refusing, rather than printing a key.
77
+ */
78
+ export const REFUSED_EDITS = [
79
+ "addNote",
80
+ "addChord",
81
+ "changeNote",
82
+ "changeAccidental",
83
+ "moveNote",
84
+ "moveNotes",
85
+ "transpose",
86
+ "paste",
87
+ ];
88
+ //# sourceMappingURL=editing-copy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editing-copy.js","sourceRoot":"","sources":["../../../src/domain/editor/editing-copy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,SAAS;IACT,YAAY;IACZ,UAAU;IACV,kBAAkB;IAClB,oBAAoB;IACpB,gBAAgB;IAChB,eAAe;IACf,aAAa;IACb,YAAY;IACZ,oBAAoB;IACpB,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,qBAAqB;IACrB,kBAAkB;IAClB,gBAAgB;IAChB,cAAc;IACd,aAAa;IACb,WAAW;IACX,YAAY;IACZ,eAAe;IACf,aAAa;IACb,aAAa;IACb,kBAAkB;IAClB,WAAW;IACX,aAAa;IACb,WAAW;IACX,YAAY;IACZ,UAAU;IACV,eAAe;IACf,aAAa;IACb,gBAAgB;IAChB,cAAc;IACd,WAAW;IACX,UAAU;IACV,aAAa;IACb,YAAY;IACZ,eAAe;IACf,mBAAmB;IACnB,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,iBAAiB;IACjB,cAAc;IACd,eAAe;IACf,eAAe;IACf,YAAY;IACZ,WAAW;IACX,WAAW;CACH,CAAC;AAIX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,SAAS;IACT,UAAU;IACV,YAAY;IACZ,kBAAkB;IAClB,UAAU;IACV,WAAW;IACX,WAAW;IACX,OAAO;CACC,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * The property sheet's vocabulary: its tabs, the controls that stay live while
3
+ * the transport plays, and the patches its fields write.
4
+ *
5
+ * The rules over these — which tab a selection opens, what a typed tempo
6
+ * commits — are music_editing's. Keys, never words.
7
+ */
8
+ import type { Clef, Track } from "../../model/score.js";
9
+ import type { INHERIT_CLEF } from "../notation/picker-options.js";
10
+ /**
11
+ * The inspector's tabs, in the web order.
12
+ *
13
+ * Score first, then Track — the only tab that always has something to show,
14
+ * since there is always an active track — then Note and Bar. The native panel
15
+ * listed Track, Note, Measure, Score; one order means a reader moving between
16
+ * the apps finds the same tab in the same place.
17
+ *
18
+ * `measure` is the id and the model's word; the label is "Bar" (see the app's
19
+ * copy), because the reader is shown a bar and the code keeps `Measure`.
20
+ */
21
+ export declare const INSPECTOR_TABS: readonly ["score", "track", "note", "measure"];
22
+ export type InspectorTab = (typeof INSPECTOR_TABS)[number];
23
+ /** The copy key naming each tab. */
24
+ export declare const INSPECTOR_TAB_LABEL_KEY: Record<InspectorTab, string>;
25
+ /**
26
+ * The controls that stay live while the transport plays.
27
+ *
28
+ * Mixing, not editing: these are `kind: 'mix'` commands and reach the engine
29
+ * live, because muting a part while listening is how an arrangement gets
30
+ * listened to. Everything else in the inspector locks. A list rather than a
31
+ * flag per control so the exemption is one decision, written down.
32
+ */
33
+ export declare const MIX_ONLY_CONTROLS: readonly ["trackVolume", "trackPan", "trackMute", "trackSolo"];
34
+ export type MixOnlyControl = (typeof MIX_ONLY_CONTROLS)[number];
35
+ /** A picker value for a bar's clef: a clef, or inherit-what-is-in-force. */
36
+ export type MeasureClefValue = Clef | typeof INHERIT_CLEF;
37
+ /** The mixing properties, which stay editable while the transport plays. */
38
+ export type TrackMixPatch = Partial<Pick<Track, "volume" | "pan" | "muted" | "solo">>;
39
+ /** The metadata fields a user can edit. `createdAt` is the score's, not theirs. */
40
+ export type ScoreMetadataPatch = {
41
+ title?: string;
42
+ composer?: string;
43
+ description?: string;
44
+ };
45
+ //# sourceMappingURL=inspector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspector.d.ts","sourceRoot":"","sources":["../../../src/domain/editor/inspector.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,gDAAiD,CAAC;AAE7E,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3D,oCAAoC;AACpC,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAKhE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,gEAKpB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,OAAO,YAAY,CAAC;AAE1D,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG,OAAO,CACjC,IAAI,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC,CACjD,CAAC;AAEF,mFAAmF;AACnF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The inspector's tabs, in the web order.
3
+ *
4
+ * Score first, then Track — the only tab that always has something to show,
5
+ * since there is always an active track — then Note and Bar. The native panel
6
+ * listed Track, Note, Measure, Score; one order means a reader moving between
7
+ * the apps finds the same tab in the same place.
8
+ *
9
+ * `measure` is the id and the model's word; the label is "Bar" (see the app's
10
+ * copy), because the reader is shown a bar and the code keeps `Measure`.
11
+ */
12
+ export const INSPECTOR_TABS = ["score", "track", "note", "measure"];
13
+ /** The copy key naming each tab. */
14
+ export const INSPECTOR_TAB_LABEL_KEY = {
15
+ score: "inspector.score",
16
+ track: "inspector.track",
17
+ note: "inspector.note",
18
+ measure: "inspector.measure",
19
+ };
20
+ /**
21
+ * The controls that stay live while the transport plays.
22
+ *
23
+ * Mixing, not editing: these are `kind: 'mix'` commands and reach the engine
24
+ * live, because muting a part while listening is how an arrangement gets
25
+ * listened to. Everything else in the inspector locks. A list rather than a
26
+ * flag per control so the exemption is one decision, written down.
27
+ */
28
+ export const MIX_ONLY_CONTROLS = [
29
+ "trackVolume",
30
+ "trackPan",
31
+ "trackMute",
32
+ "trackSolo",
33
+ ];
34
+ //# sourceMappingURL=inspector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inspector.js","sourceRoot":"","sources":["../../../src/domain/editor/inspector.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAU,CAAC;AAI7E,oCAAoC;AACpC,MAAM,CAAC,MAAM,uBAAuB,GAAiC;IACnE,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,mBAAmB;CAC7B,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,aAAa;IACb,UAAU;IACV,WAAW;IACX,WAAW;CACH,CAAC"}