@sudobility/music_types 0.11.31 → 0.11.32

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.
@@ -0,0 +1,427 @@
1
+ import { isNoteEvent } from "../../model/score.js";
2
+ import { findEvent } from "../score/queries.js";
3
+ import { transformCommand } from "./snapshot.js";
4
+ import { withTracks } from "./reflow.js";
5
+ import { mapNotes } from "./note-commands.js";
6
+ // ---- simple per-note field commands ------------------------------------------
7
+ /** Sets the given notes' pitch to an absolute `Pitch`. */
8
+ export function changePitchCommand(eventIds, pitch, label) {
9
+ return transformCommand(label, (score) => mapNotes(score, eventIds, (note) => ({ ...note, pitch })));
10
+ }
11
+ /** Sets the given notes' velocity (0-127). */
12
+ export function changeVelocityCommand(eventIds, velocity, label) {
13
+ return transformCommand(label, (score) => mapNotes(score, eventIds, (note) => ({ ...note, velocity })));
14
+ }
15
+ /** Sets (or clears, when `articulation` is `undefined`) the given notes' articulation. */
16
+ export function changeArticulationCommand(eventIds, articulation, label) {
17
+ return transformCommand(label, (score) => mapNotes(score, eventIds, (note) => {
18
+ if (articulation)
19
+ return { ...note, articulation };
20
+ const updated = { ...note };
21
+ delete updated.articulation;
22
+ return updated;
23
+ }));
24
+ }
25
+ /**
26
+ * Sets (or clears, when `ornament` is `undefined`) the given notes' ornament.
27
+ *
28
+ * Shaped like `changeArticulationCommand` rather than like the fermata toggle,
29
+ * because an ornament is a choice among several rather than an on/off: a menu
30
+ * sets the one it names, and "None" clears. A note carries at most one sign —
31
+ * a trill that is also a turn is not a marking anybody writes.
32
+ */
33
+ export function changeOrnamentCommand(eventIds, ornament, label) {
34
+ return transformCommand(label, (score) => mapNotes(score, eventIds, (note) => {
35
+ if (ornament)
36
+ return { ...note, ornament };
37
+ const updated = { ...note };
38
+ delete updated.ornament;
39
+ return updated;
40
+ }));
41
+ }
42
+ /**
43
+ * Puts a fermata on the given notes, or takes it off the ones that have one.
44
+ *
45
+ * Toggles on the *whole selection together* rather than per note: the state is
46
+ * read from whether every selected note already carries one, so a mixed
47
+ * selection gains fermatas rather than flipping each note independently. A
48
+ * control that did the latter would leave a selection half-marked and look
49
+ * broken.
50
+ *
51
+ * Unlike `toggleSlurCommand` this needs no endpoints and refuses nothing — a
52
+ * fermata is a property of a single note, so one note is a perfectly good
53
+ * selection and each marked note stands alone. Chords are marked note by note
54
+ * because that is what the selection contains; the renderer draws one fermata
55
+ * per notehead position, which is what a chord with a pause looks like.
56
+ */
57
+ export function toggleFermataCommand(eventIds, label) {
58
+ return transformCommand(label, (score) => {
59
+ const notes = eventIds
60
+ .map((id) => findEvent(score, id))
61
+ .filter((event) => event !== null && isNoteEvent(event));
62
+ if (notes.length === 0)
63
+ return score;
64
+ // Only remove when every selected note already has one, so a selection
65
+ // that is partly marked becomes fully marked rather than inverting.
66
+ const allMarked = notes.every((note) => note.fermata);
67
+ return mapNotes(score, eventIds, (note) => {
68
+ if (allMarked) {
69
+ const updated = { ...note };
70
+ delete updated.fermata;
71
+ return updated;
72
+ }
73
+ return { ...note, fermata: true };
74
+ });
75
+ });
76
+ }
77
+ /**
78
+ * Sets or clears the dynamic marking the given notes start.
79
+ *
80
+ * A dynamic is stored on the note it applies *from* and governs until the next
81
+ * one on that track, so marking one note `f` is how a passage becomes loud —
82
+ * there is nothing to apply to the notes in between, and applying it to each
83
+ * would print a marking under every notehead.
84
+ */
85
+ export function changeDynamicCommand(eventIds, dynamic, label) {
86
+ return transformCommand(label, (score) => mapNotes(score, eventIds, (note) => {
87
+ if (dynamic)
88
+ return { ...note, dynamic };
89
+ const updated = { ...note };
90
+ delete updated.dynamic;
91
+ return updated;
92
+ }));
93
+ }
94
+ /** Sets the given notes' pitch accidental, keeping their step/octave. */
95
+ export function changeAccidentalCommand(eventIds, accidental, label) {
96
+ return transformCommand(label, (score) => mapNotes(score, eventIds, (note) => ({
97
+ ...note,
98
+ pitch: { ...note.pitch, accidental },
99
+ })));
100
+ }
101
+ /** Toggles `tieStart` or `tieStop` on the given notes. */
102
+ export function toggleTieCommand(eventIds, which, label) {
103
+ return transformCommand(label, (score) => mapNotes(score, eventIds, (note) => ({ ...note, [which]: !note[which] })));
104
+ }
105
+ /**
106
+ * Slurs a selection, or removes the slur it already carries.
107
+ *
108
+ * Takes the whole selection rather than a flag per note, because that is what
109
+ * a slur is: one mark over a run of notes. The caller says "slur these" and
110
+ * this decides which of them is the start and which the stop — marking them
111
+ * individually would let a user create a start with no stop, which draws
112
+ * nothing and is invisible to fix.
113
+ *
114
+ * Endpoints are the earliest and latest note by tick, not the order the ids
115
+ * arrived in: a selection built by shift-clicking around a phrase is still
116
+ * that phrase.
117
+ *
118
+ * Fewer than two notes cannot be slurred — a phrase mark over one note means
119
+ * nothing — and toggling off is offered when the span is already slurred, so
120
+ * the same control removes what it made.
121
+ */
122
+ export function toggleSlurCommand(eventIds, label) {
123
+ return transformCommand(label, (score) => {
124
+ const notes = eventIds
125
+ .map((id) => findEvent(score, id))
126
+ .filter((event) => event !== null && isNoteEvent(event))
127
+ .sort((a, b) => a.startTick - b.startTick);
128
+ if (notes.length < 2)
129
+ return score;
130
+ const first = notes[0];
131
+ const last = notes[notes.length - 1];
132
+ const alreadySlurred = Boolean(first.slurStart && last.slurStop);
133
+ return mapNotes(score, eventIds, (note) => {
134
+ const updated = { ...note };
135
+ delete updated.slurStart;
136
+ delete updated.slurStop;
137
+ if (alreadySlurred)
138
+ return updated;
139
+ if (note.id === first.id)
140
+ updated.slurStart = true;
141
+ if (note.id === last.id)
142
+ updated.slurStop = true;
143
+ return updated;
144
+ });
145
+ });
146
+ }
147
+ /**
148
+ * Writes a hairpin across the selection, or removes the one it already has.
149
+ *
150
+ * Shaped like `toggleSlurCommand`, because a hairpin is the same kind of thing
151
+ * — one mark over a run of notes. The caller says "crescendo these" and this
152
+ * decides which of them opens it and which closes it; marking them one at a
153
+ * time would let a user create an opening with no close, which draws nothing
154
+ * and is invisible to fix.
155
+ *
156
+ * Endpoints are the earliest and latest note **by tick**, not the order the
157
+ * ids arrived in, so a selection built by shift-clicking around a phrase is
158
+ * still that phrase.
159
+ *
160
+ * Fewer than two notes is refused: a wedge over one note has nowhere to open
161
+ * to. Re-applying the **same** direction to a span that already carries it
162
+ * removes it, so one control undoes what it made; applying the **other**
163
+ * direction flips it, which is what reaching for the other button means.
164
+ */
165
+ export function toggleHairpinCommand(eventIds, hairpin, label) {
166
+ return transformCommand(label, (score) => {
167
+ const notes = eventIds
168
+ .map((id) => findEvent(score, id))
169
+ .filter((event) => event !== null && isNoteEvent(event))
170
+ .sort((a, b) => a.startTick - b.startTick);
171
+ if (notes.length < 2)
172
+ return score;
173
+ const first = notes[0];
174
+ const last = notes[notes.length - 1];
175
+ const sameAlready = first.hairpinStart === hairpin && Boolean(last.hairpinStop);
176
+ return mapNotes(score, eventIds, (note) => {
177
+ const updated = { ...note };
178
+ delete updated.hairpinStart;
179
+ delete updated.hairpinStop;
180
+ if (sameAlready)
181
+ return updated;
182
+ if (note.id === first.id)
183
+ updated.hairpinStart = hairpin;
184
+ if (note.id === last.id)
185
+ updated.hairpinStop = true;
186
+ return updated;
187
+ });
188
+ });
189
+ }
190
+ /**
191
+ * Rolls the selected chords, or stops rolling them.
192
+ *
193
+ * Toggles the whole selection together, like the fermata: the state is read
194
+ * from whether *every* selected note already carries the flag, so a partly
195
+ * marked selection becomes fully marked rather than inverting note by note.
196
+ *
197
+ * The mark belongs to a chord, but the selection is notes — so this simply
198
+ * sets the flag on what was selected and lets the renderer decide. A lone note
199
+ * keeps the flag harmlessly and draws nothing, which is better than refusing:
200
+ * selecting a bar and rolling its chords should not fail because one beat
201
+ * happens to be a single note.
202
+ */
203
+ export function toggleArpeggiateCommand(eventIds, label) {
204
+ return transformCommand(label, (score) => {
205
+ const notes = eventIds
206
+ .map((id) => findEvent(score, id))
207
+ .filter((event) => event !== null && isNoteEvent(event));
208
+ if (notes.length === 0)
209
+ return score;
210
+ const allMarked = notes.every((note) => note.arpeggiate);
211
+ return mapNotes(score, eventIds, (note) => {
212
+ if (allMarked) {
213
+ const updated = { ...note };
214
+ delete updated.arpeggiate;
215
+ return updated;
216
+ }
217
+ return { ...note, arpeggiate: true };
218
+ });
219
+ });
220
+ }
221
+ /**
222
+ * Brackets the selection at an octave, or removes the bracket it has.
223
+ *
224
+ * A span like the hairpin: endpoints by tick, two notes minimum, the same
225
+ * displacement twice removes it and a different one replaces it.
226
+ */
227
+ export function toggleOttavaCommand(eventIds, ottava, label) {
228
+ return transformCommand(label, (score) => {
229
+ const notes = eventIds
230
+ .map((id) => findEvent(score, id))
231
+ .filter((event) => event !== null && isNoteEvent(event))
232
+ .sort((a, b) => a.startTick - b.startTick);
233
+ if (notes.length < 2)
234
+ return score;
235
+ const first = notes[0];
236
+ const last = notes[notes.length - 1];
237
+ const sameAlready = first.ottavaStart === ottava && Boolean(last.ottavaStop);
238
+ return mapNotes(score, eventIds, (note) => {
239
+ const updated = { ...note };
240
+ delete updated.ottavaStart;
241
+ delete updated.ottavaStop;
242
+ if (sameAlready)
243
+ return updated;
244
+ if (note.id === first.id)
245
+ updated.ottavaStart = ottava;
246
+ if (note.id === last.id)
247
+ updated.ottavaStop = true;
248
+ return updated;
249
+ });
250
+ });
251
+ }
252
+ /**
253
+ * Slides between the selected notes, or removes the slide.
254
+ *
255
+ * Two notes exactly is the usual case and two is the minimum: a glissando is
256
+ * a line *between* noteheads, so one note has nothing to slide to. A wider
257
+ * selection slides from its first note to its last, which is what dragging
258
+ * across a run and asking for a slide means.
259
+ */
260
+ export function toggleGlissandoCommand(eventIds, label) {
261
+ return transformCommand(label, (score) => {
262
+ const notes = eventIds
263
+ .map((id) => findEvent(score, id))
264
+ .filter((event) => event !== null && isNoteEvent(event))
265
+ .sort((a, b) => a.startTick - b.startTick);
266
+ if (notes.length < 2)
267
+ return score;
268
+ const first = notes[0];
269
+ const last = notes[notes.length - 1];
270
+ const already = Boolean(first.glissandoStart && last.glissandoStop);
271
+ return mapNotes(score, eventIds, (note) => {
272
+ const updated = { ...note };
273
+ delete updated.glissandoStart;
274
+ delete updated.glissandoStop;
275
+ if (already)
276
+ return updated;
277
+ if (note.id === first.id)
278
+ updated.glissandoStart = true;
279
+ if (note.id === last.id)
280
+ updated.glissandoStop = true;
281
+ return updated;
282
+ });
283
+ });
284
+ }
285
+ /**
286
+ * Sets or clears the finger written on the given notes.
287
+ *
288
+ * Blank clears it rather than storing an empty string, which would reserve
289
+ * space beside the notehead and print nothing.
290
+ */
291
+ export function setFingeringCommand(eventIds, fingering, label) {
292
+ const trimmed = fingering?.trim();
293
+ return transformCommand(label, (score) => mapNotes(score, eventIds, (note) => {
294
+ if (trimmed)
295
+ return { ...note, fingering: trimmed };
296
+ const updated = { ...note };
297
+ delete updated.fingering;
298
+ return updated;
299
+ }));
300
+ }
301
+ /**
302
+ * Sets or clears the syllable sung on one note.
303
+ *
304
+ * One note at a time, unlike the other note commands: every syllable in a line
305
+ * is different, so applying one across a selection could only ever write the
306
+ * same word repeatedly.
307
+ *
308
+ * Blank text clears the lyric rather than storing an empty one — an empty
309
+ * syllable would reserve space under the note and print nothing.
310
+ */
311
+ export function setLyricCommand(eventId, lyric, label) {
312
+ return transformCommand(label, (score) => mapNotes(score, [eventId], (note) => {
313
+ const updated = { ...note };
314
+ if (!lyric || lyric.text.trim() === "") {
315
+ delete updated.lyric;
316
+ return updated;
317
+ }
318
+ updated.lyric = {
319
+ text: lyric.text.trim(),
320
+ // `single` is the default the model states, so storing it would only
321
+ // be noise in every saved score.
322
+ ...(lyric.syllabic && lyric.syllabic !== "single"
323
+ ? { syllabic: lyric.syllabic }
324
+ : {}),
325
+ };
326
+ return updated;
327
+ }));
328
+ }
329
+ /**
330
+ * Sets or clears the chord symbol printed from a note.
331
+ *
332
+ * One note at a time, like a lyric: every chord in a progression is different,
333
+ * so applying one across a selection could only write the same symbol
334
+ * repeatedly. Blank text clears it rather than storing an empty symbol, which
335
+ * would reserve space above the stave and print nothing.
336
+ */
337
+ export function setChordSymbolCommand(eventId, symbol, label) {
338
+ return transformCommand(label, (score) => mapNotes(score, [eventId], (note) => {
339
+ const updated = { ...note };
340
+ const trimmed = symbol?.trim();
341
+ if (!trimmed) {
342
+ delete updated.chordSymbol;
343
+ return updated;
344
+ }
345
+ updated.chordSymbol = trimmed;
346
+ return updated;
347
+ }));
348
+ }
349
+ /**
350
+ * Turns a written note into a grace note on the note that follows it.
351
+ *
352
+ * The note leaves the voice and reappears hanging off its neighbour, and the
353
+ * gap it leaves is filled with a rest — so the bar still adds up, which is the
354
+ * whole reason grace notes are stored on their principal rather than as events
355
+ * of their own.
356
+ *
357
+ * The principal is the next note *in the same voice*, since that is what the
358
+ * ornament leads into. A note with nothing after it cannot become one: an
359
+ * ornament with nothing to ornament would simply vanish from the page.
360
+ */
361
+ export function toGraceNoteCommand(eventId, label) {
362
+ return transformCommand(label, (score) => {
363
+ const tracks = score.tracks.map((track) => ({
364
+ ...track,
365
+ measures: track.measures.map((measure) => ({
366
+ ...measure,
367
+ voices: measure.voices.map((voice) => {
368
+ const index = voice.events.findIndex((e) => e.id === eventId);
369
+ if (index === -1)
370
+ return voice;
371
+ const source = voice.events[index];
372
+ if (!isNoteEvent(source))
373
+ return voice;
374
+ // The principal: the next *note* after it in this voice.
375
+ const principalIndex = voice.events.findIndex((e, i) => i > index && isNoteEvent(e));
376
+ if (principalIndex === -1)
377
+ return voice;
378
+ const principal = voice.events[principalIndex];
379
+ const grace = {
380
+ pitch: source.pitch,
381
+ durationTicks: source.durationTicks,
382
+ slashed: true,
383
+ };
384
+ /*
385
+ Ornaments the source itself carried travel with it, ahead of the
386
+ note it becomes: turning a decorated note into a grace note should
387
+ move the whole ornamental run to the new principal, not silently
388
+ drop everything in front of it.
389
+ */
390
+ const carried = [...(source.graceNotes ?? []), grace];
391
+ return {
392
+ ...voice,
393
+ events: voice.events.map((event, i) => {
394
+ // The time the note occupied stays occupied, by a rest: an
395
+ // ornament borrows from its principal, it does not shorten the
396
+ // bar.
397
+ if (i === index)
398
+ return {
399
+ id: source.id,
400
+ startTick: source.startTick,
401
+ durationTicks: source.durationTicks,
402
+ voiceId: source.voiceId,
403
+ trackId: source.trackId,
404
+ };
405
+ if (i === principalIndex)
406
+ return {
407
+ ...principal,
408
+ graceNotes: [...(principal.graceNotes ?? []), ...carried],
409
+ };
410
+ return event;
411
+ }),
412
+ };
413
+ }),
414
+ })),
415
+ }));
416
+ return withTracks(score, tracks);
417
+ });
418
+ }
419
+ /** Removes every ornament from the given notes. */
420
+ export function clearGraceNotesCommand(eventIds, label) {
421
+ return transformCommand(label, (score) => mapNotes(score, eventIds, (note) => {
422
+ const updated = { ...note };
423
+ delete updated.graceNotes;
424
+ return updated;
425
+ }));
426
+ }
427
+ //# sourceMappingURL=note-marks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"note-marks.js","sourceRoot":"","sources":["../../../src/domain/commands/note-marks.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,iFAAiF;AAEjF,0DAA0D;AAC1D,MAAM,UAAU,kBAAkB,CAChC,QAAgB,EAChB,KAAY,EACZ,KAAa;IAEb,OAAO,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CACvC,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAC1D,CAAC;AACJ,CAAC;AAED,8CAA8C;AAC9C,MAAM,UAAU,qBAAqB,CACnC,QAAgB,EAChB,QAAgB,EAChB,KAAa;IAEb,OAAO,gBAAgB,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE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AC"}
@@ -1,11 +1,7 @@
1
- import type { Score, ScoreFragment } from "../../index.js";
1
+ import type { Score } from "../../index.js";
2
+ import type { ScoreFragment } from "../../model/score.js";
2
3
  import type { ScoreRange } from "../selection/types.js";
3
- /**
4
- * `ScoreFragment` is canonical in @sudobility/music_types and re-exported
5
- * here so domain modules keep one import site. A fragment is a snapshot of
6
- * a tick range of a score (measures shared by reference, not deep-cloned).
7
- */
8
- export type { ScoreFragment } from "../../index.js";
4
+ export type { ScoreFragment };
9
5
  /** Captures the measures overlapping `range` (per track named in `range.trackIds`, or all tracks if empty). */
10
6
  export declare function extractFragment(score: Score, range: ScoreRange): ScoreFragment;
11
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"fragment.d.ts","sourceRoot":"","sources":["../../../src/domain/score/fragment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAW,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;GAIG;AACH,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,+GAA+G;AAC/G,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,UAAU,GAChB,aAAa,CAMf;AAUD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,GAAG,KAAK,CA6C5E"}
1
+ {"version":3,"file":"fragment.d.ts","sourceRoot":"","sources":["../../../src/domain/score/fragment.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAW,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAQxD,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,+GAA+G;AAC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Aa,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,CACjC,CAAC;QACF,IAAI,UAAU,KAAK,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;QAEpC,IAAI,SAAS,GAAG,UAAU,CAAC;QAC3B,OACE,SAAS,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM;YACjC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,EACxD,CAAC;YACD,SAAS,IAAI,CAAC,CAAC;QACjB,CAAC;QAED,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YAC/D,GAAG,OAAO;YACV,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBACrC,GAAG,KAAK;gBACR,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;oBACnC,GAAG,KAAK;oBACR,OAAO,EAAE,KAAK,CAAC,EAAE;oBACjB,OAAO,EAAE,KAAK,CAAC,EAAE;iBAClB,CAAC,CAAC;aACJ,CAAC,CAAC;SACJ,CAAC,CAAC,CAAC;QAEJ,OAAO;YACL,GAAG,KAAK;YACR,QAAQ,EAAE;gBACR,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;gBACtC,GAAG,kBAAkB;gBACrB,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC;aACnC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,mBAAmB,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AACnD,CAAC"}
@@ -3,8 +3,8 @@
3
3
  * canonical in @sudobility/music_types and re-exported here so domain
4
4
  * modules keep one import site; `emptySelection` is the runtime helper.
5
5
  */
6
- export type { ScoreRange, ScoreSelection } from "../../index.js";
7
- import type { ScoreSelection } from "../../index.js";
6
+ export type { ScoreRange, ScoreSelection } from "../../model/score.js";
7
+ import type { ScoreSelection } from "../../model/score.js";
8
8
  /** An empty selection: no events, measures, tracks, or range selected. */
9
9
  export declare function emptySelection(): ScoreSelection;
10
10
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/domain/selection/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,0EAA0E;AAC1E,wBAAgB,cAAc,IAAI,cAAc,CAE/C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/domain/selection/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D,0EAA0E;AAC1E,wBAAgB,cAAc,IAAI,cAAc,CAE/C"}