@tspro/web-music-score 5.4.1 → 5.4.2
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/CHANGELOG.md +3 -0
- package/README.md +4 -4
- package/dist/audio/index.d.mts +1 -1
- package/dist/audio/index.js +1 -1
- package/dist/audio/index.mjs +3 -3
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +3 -3
- package/dist/audio-synth/index.js +1 -1
- package/dist/audio-synth/index.mjs +3 -3
- package/dist/{chunk-A5SMODAT.mjs → chunk-42IBAVOC.mjs} +3 -3
- package/dist/{chunk-5I5KENEC.mjs → chunk-CVYTUTL6.mjs} +2 -2
- package/dist/{chunk-6P4ECBUH.mjs → chunk-MMWSQGVR.mjs} +3 -3
- package/dist/{chunk-U2ACCEHX.mjs → chunk-ROBXPR34.mjs} +2 -2
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +4 -4
- package/dist/{guitar-DXlB-9vK.d.mts → guitar-DK18GZ6h.d.mts} +1 -1
- package/dist/iife/audio-cg.global.js +1 -1
- package/dist/iife/index.global.js +11 -11
- package/dist/{music-objects-DYMqx839.d.mts → music-objects-DqoO-Sfv.d.mts} +93 -39
- package/dist/{music-objects-DumXKWJp.d.ts → music-objects-T8u8bnNP.d.ts} +91 -37
- package/dist/{note-RVXvpfyV.d.mts → note-CJuq5aBy.d.mts} +1 -1
- package/dist/pieces/index.d.mts +3 -3
- package/dist/pieces/index.d.ts +1 -1
- package/dist/pieces/index.js +1 -1
- package/dist/pieces/index.mjs +2 -2
- package/dist/react-ui/index.d.mts +5 -5
- package/dist/react-ui/index.d.ts +1 -1
- package/dist/react-ui/index.js +1 -1
- package/dist/react-ui/index.mjs +2 -2
- package/dist/{scale-C8gHC448.d.mts → scale-DWM4RQco.d.mts} +2 -2
- package/dist/score/index.d.mts +5 -5
- package/dist/score/index.d.ts +2 -2
- package/dist/score/index.js +623 -441
- package/dist/score/index.mjs +516 -335
- package/dist/{tempo-BlCGZuYg.d.mts → tempo-Cxu8vusu.d.mts} +1 -1
- package/dist/theory/index.d.mts +6 -6
- package/dist/theory/index.js +1 -1
- package/dist/theory/index.mjs +3 -3
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { N as Note, A as Accidental } from './note-
|
|
2
|
-
import { R as RhythmProps, N as NoteLength, i as NoteLengthStr, l as TupletRatio, d as Tempo, K as KeySignature, b as TimeSignature } from './tempo-
|
|
3
|
-
import { AnchoredRect, Rect, Vec } from '@tspro/ts-utils-lib';
|
|
1
|
+
import { N as Note, A as Accidental } from './note-CJuq5aBy.mjs';
|
|
2
|
+
import { R as RhythmProps, N as NoteLength, i as NoteLengthStr, l as TupletRatio, d as Tempo, K as KeySignature, b as TimeSignature } from './tempo-Cxu8vusu.mjs';
|
|
3
|
+
import { AnchoredRect, UniMap, Rect, Vec } from '@tspro/ts-utils-lib';
|
|
4
4
|
|
|
5
5
|
/** Staff preset values for score configuration. */
|
|
6
6
|
declare enum StaffPreset {
|
|
@@ -805,6 +805,26 @@ declare class PlayerColumnProps {
|
|
|
805
805
|
getFermataHoldTicks(): number;
|
|
806
806
|
}
|
|
807
807
|
|
|
808
|
+
declare class ObjScoreRowGroup extends MusicObject {
|
|
809
|
+
readonly lines: readonly ObjNotationLine[];
|
|
810
|
+
private space;
|
|
811
|
+
readonly instrument: string;
|
|
812
|
+
private readonly instrText;
|
|
813
|
+
private braceRect;
|
|
814
|
+
readonly mi: MScoreRowGroup;
|
|
815
|
+
constructor(lines: readonly ObjNotationLine[]);
|
|
816
|
+
getMusicInterface(): MScoreRowGroup;
|
|
817
|
+
get row(): ObjScoreRow;
|
|
818
|
+
get hasBrace(): boolean;
|
|
819
|
+
get hasInstrument(): boolean;
|
|
820
|
+
pick(x: number, y: number): MusicObject[];
|
|
821
|
+
updateRect(): void;
|
|
822
|
+
layout(ctx: RenderContext): void;
|
|
823
|
+
layoutToNotationLines(): void;
|
|
824
|
+
offset(dx: number, dy: number): void;
|
|
825
|
+
draw(ctx: RenderContext): void;
|
|
826
|
+
}
|
|
827
|
+
|
|
808
828
|
declare enum BarLineType {
|
|
809
829
|
None = 0,
|
|
810
830
|
Single = 1,
|
|
@@ -814,10 +834,10 @@ declare enum BarLineType {
|
|
|
814
834
|
EndRepeat = 5,
|
|
815
835
|
EndStartRepeat = 6
|
|
816
836
|
}
|
|
817
|
-
declare class
|
|
837
|
+
declare class ObjStaffBarLine extends MusicObject {
|
|
818
838
|
readonly barLine: ObjBarLine;
|
|
819
839
|
readonly line: ObjNotationLine;
|
|
820
|
-
|
|
840
|
+
vlines: {
|
|
821
841
|
left: number;
|
|
822
842
|
width: number;
|
|
823
843
|
}[];
|
|
@@ -826,17 +846,17 @@ declare class ObjStaffTabBarLine extends MusicObject {
|
|
|
826
846
|
y: number;
|
|
827
847
|
r: number;
|
|
828
848
|
}[];
|
|
829
|
-
readonly mi:
|
|
849
|
+
readonly mi: MStaffBarLine;
|
|
830
850
|
constructor(barLine: ObjBarLine, line: ObjNotationLine);
|
|
831
851
|
getMusicInterface(): MusicInterface;
|
|
832
852
|
pick(x: number, y: number): MusicObject[];
|
|
833
|
-
|
|
853
|
+
updateRect(): void;
|
|
834
854
|
offset(dx: number, dy: number): void;
|
|
835
855
|
}
|
|
836
856
|
declare abstract class ObjBarLine extends MusicObject {
|
|
837
857
|
readonly measure: ObjMeasure;
|
|
838
|
-
protected
|
|
839
|
-
protected
|
|
858
|
+
protected notationLineObjects: ObjStaffBarLine[];
|
|
859
|
+
protected notationLineObjectsByGrp: UniMap<ObjScoreRowGroup, ObjStaffBarLine[]>;
|
|
840
860
|
protected barLineType: BarLineType;
|
|
841
861
|
constructor(measure: ObjMeasure);
|
|
842
862
|
abstract solveBarLineType(): BarLineType;
|
|
@@ -1029,17 +1049,29 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1029
1049
|
draw(ctx: RenderContext): void;
|
|
1030
1050
|
}
|
|
1031
1051
|
|
|
1052
|
+
declare class ScoreRowRegions {
|
|
1053
|
+
instrWidth: number;
|
|
1054
|
+
staffWidth: number;
|
|
1055
|
+
resetWidths(): void;
|
|
1056
|
+
addRowInstrWidth(w: number): void;
|
|
1057
|
+
addRowstaffWidth(w: number): void;
|
|
1058
|
+
get instrLeft(): number;
|
|
1059
|
+
get instrRight(): number;
|
|
1060
|
+
get staffLeft(): number;
|
|
1061
|
+
get staffRight(): number;
|
|
1062
|
+
get left(): number;
|
|
1063
|
+
get right(): number;
|
|
1064
|
+
get width(): number;
|
|
1065
|
+
}
|
|
1032
1066
|
declare class ObjScoreRow extends MusicObject {
|
|
1033
1067
|
readonly doc: ObjDocument;
|
|
1034
1068
|
private readonly prevRow;
|
|
1035
1069
|
private readonly scoreConfig;
|
|
1036
1070
|
private nextRow?;
|
|
1037
|
-
private minWidth;
|
|
1038
1071
|
private readonly notationLines;
|
|
1039
|
-
private readonly
|
|
1072
|
+
private readonly rowGroups;
|
|
1040
1073
|
private readonly staves;
|
|
1041
1074
|
private readonly tabs;
|
|
1042
|
-
private readonly instrumentNames;
|
|
1043
1075
|
private readonly measures;
|
|
1044
1076
|
private needLayout;
|
|
1045
1077
|
readonly mi: MScoreRow;
|
|
@@ -1047,8 +1079,9 @@ declare class ObjScoreRow extends MusicObject {
|
|
|
1047
1079
|
getMusicInterface(): MScoreRow;
|
|
1048
1080
|
private createNotationLines;
|
|
1049
1081
|
getNotationLines(): ReadonlyArray<ObjNotationLine>;
|
|
1050
|
-
|
|
1082
|
+
getRowGroups(): ReadonlyArray<ObjScoreRowGroup>;
|
|
1051
1083
|
findMatchingLine(line: ObjNotationLine): ObjNotationLine | undefined;
|
|
1084
|
+
get regions(): ScoreRowRegions;
|
|
1052
1085
|
getStaves(): ReadonlyArray<ObjStaff>;
|
|
1053
1086
|
getTabs(): ReadonlyArray<ObjTab>;
|
|
1054
1087
|
get hasStaff(): boolean;
|
|
@@ -1069,33 +1102,22 @@ declare class ObjScoreRow extends MusicObject {
|
|
|
1069
1102
|
getNextRow(): ObjScoreRow | undefined;
|
|
1070
1103
|
getFirstMeasure(): ObjMeasure | undefined;
|
|
1071
1104
|
getLastMeasure(): ObjMeasure | undefined;
|
|
1072
|
-
getMinWidth(): number;
|
|
1073
1105
|
solveAutoStemDir(symbols: ReadonlyArray<RhythmSymbol>): Stem.Up | Stem.Down;
|
|
1074
|
-
getInstrumentNameWidth(ctx: RenderContext): number;
|
|
1075
1106
|
requestLayout(): void;
|
|
1076
1107
|
layout(ctx: RenderContext): void;
|
|
1077
|
-
|
|
1108
|
+
layoutStretch(ctx: RenderContext): void;
|
|
1078
1109
|
updateRect(): void;
|
|
1079
1110
|
alignStemsToBeams(): void;
|
|
1080
1111
|
layoutSetNotationLines(ctx: RenderContext): void;
|
|
1081
|
-
layoutPadding(ctx: RenderContext): void;
|
|
1082
1112
|
layoutDone(): void;
|
|
1083
1113
|
offset(dx: number, dy: number): void;
|
|
1084
1114
|
draw(ctx: RenderContext): void;
|
|
1085
1115
|
}
|
|
1086
1116
|
|
|
1087
|
-
declare class InstrumentGroupRegions {
|
|
1088
|
-
nameLeft: number;
|
|
1089
|
-
nameRight: number;
|
|
1090
|
-
braceLeft: number;
|
|
1091
|
-
braceRight: number;
|
|
1092
|
-
get left(): number;
|
|
1093
|
-
get right(): number;
|
|
1094
|
-
get width(): number;
|
|
1095
|
-
}
|
|
1096
1117
|
declare class ObjDocument extends MusicObject {
|
|
1097
1118
|
private needLayout;
|
|
1098
1119
|
private ctx?;
|
|
1120
|
+
readonly regions: ScoreRowRegions;
|
|
1099
1121
|
private readonly rows;
|
|
1100
1122
|
private readonly measures;
|
|
1101
1123
|
private measuresPerRow;
|
|
@@ -1104,7 +1126,6 @@ declare class ObjDocument extends MusicObject {
|
|
|
1104
1126
|
private newRowRequested;
|
|
1105
1127
|
private allConnectiveProps;
|
|
1106
1128
|
private staffGroups;
|
|
1107
|
-
private instrumentGroupRegions;
|
|
1108
1129
|
private readonly mi;
|
|
1109
1130
|
constructor();
|
|
1110
1131
|
getMusicInterface(): MDocument;
|
|
@@ -1133,10 +1154,10 @@ declare class ObjDocument extends MusicObject {
|
|
|
1133
1154
|
private forEachMeasure;
|
|
1134
1155
|
resetMeasures(): void;
|
|
1135
1156
|
updateCursorRect(cursorRect?: Rect): void;
|
|
1136
|
-
getInstrumentGroupRegions(ctx: RenderContext): InstrumentGroupRegions;
|
|
1137
1157
|
requestLayout(): void;
|
|
1138
1158
|
requestFullLayout(): void;
|
|
1139
1159
|
layout(): void;
|
|
1160
|
+
offset(dx: number, dy: number): void;
|
|
1140
1161
|
drawContent(): void;
|
|
1141
1162
|
pickStaffPosAt(x: number, y: number): {
|
|
1142
1163
|
scoreRow: ObjScoreRow;
|
|
@@ -1230,11 +1251,13 @@ declare class RenderContext {
|
|
|
1230
1251
|
strokeRect(x: number, y: number, w: number, h: number): RenderContext;
|
|
1231
1252
|
fillText(text: string, x: number, y: number): RenderContext;
|
|
1232
1253
|
getTextWidth(text: string, font: string): number;
|
|
1233
|
-
arc(x: number, y: number, radius: number, startRadians: number, endRadians: number):
|
|
1234
|
-
fillCircle(x: number, y: number, radius: number):
|
|
1235
|
-
strokeLine(startX: number, startY: number, endX: number, endY: number):
|
|
1236
|
-
strokePartialLine(startX: number, startY: number, endX: number, endY: number, startT: number, endT: number):
|
|
1237
|
-
|
|
1254
|
+
arc(x: number, y: number, radius: number, startRadians: number, endRadians: number): RenderContext;
|
|
1255
|
+
fillCircle(x: number, y: number, radius: number): RenderContext;
|
|
1256
|
+
strokeLine(startX: number, startY: number, endX: number, endY: number): RenderContext;
|
|
1257
|
+
strokePartialLine(startX: number, startY: number, endX: number, endY: number, startT: number, endT: number): RenderContext;
|
|
1258
|
+
/** @deprecated - Use {@link drawBracket} instead. */
|
|
1259
|
+
drawBrace(rect: AnchoredRect, side: "left" | "right"): RenderContext;
|
|
1260
|
+
drawBracket(rect: AnchoredRect, bracket: "(" | ")" | "[" | "]" | "{" | "}" | "<" | ">"): RenderContext;
|
|
1238
1261
|
}
|
|
1239
1262
|
|
|
1240
1263
|
declare class ObjEnding extends MusicObject {
|
|
@@ -1387,6 +1410,7 @@ declare class LayoutObjectWrapper {
|
|
|
1387
1410
|
getTextContent(): string | undefined;
|
|
1388
1411
|
layout(ctx: RenderContext): void;
|
|
1389
1412
|
offset(dx: number, dy: number): void;
|
|
1413
|
+
setAnchorY(y: number): void;
|
|
1390
1414
|
getRect(): AnchoredRect;
|
|
1391
1415
|
}
|
|
1392
1416
|
declare class LayoutGroup {
|
|
@@ -1423,7 +1447,21 @@ declare abstract class MusicObject {
|
|
|
1423
1447
|
private needRectUpdate;
|
|
1424
1448
|
requestRectUpdate(): void;
|
|
1425
1449
|
updateRect(): void;
|
|
1450
|
+
forceRectUpdate(): void;
|
|
1426
1451
|
getRect(): AnchoredRect;
|
|
1452
|
+
abstract offset(dx: number, dy: number): void;
|
|
1453
|
+
offsetX(dx: number): void;
|
|
1454
|
+
offsetY(dy: number): void;
|
|
1455
|
+
setLeft(x: number): void;
|
|
1456
|
+
setRight(x: number): void;
|
|
1457
|
+
setTop(y: number): void;
|
|
1458
|
+
setBottom(y: number): void;
|
|
1459
|
+
setAnchor(x: number, y: number): void;
|
|
1460
|
+
setAnchorX(x: number): void;
|
|
1461
|
+
setAnchorY(y: number): void;
|
|
1462
|
+
setCenter(x: number, y: number): void;
|
|
1463
|
+
setCenterX(x: number): void;
|
|
1464
|
+
setCenterY(y: number): void;
|
|
1427
1465
|
/**
|
|
1428
1466
|
* Most objects are simple rects in shape.
|
|
1429
1467
|
* Some objects might be more complex consisting of multiple rects.
|
|
@@ -1466,6 +1504,7 @@ declare class ObjArpeggio extends MusicObject {
|
|
|
1466
1504
|
}
|
|
1467
1505
|
|
|
1468
1506
|
declare class ObjHeader extends MusicObject {
|
|
1507
|
+
readonly doc: ObjDocument;
|
|
1469
1508
|
readonly title?: string | undefined;
|
|
1470
1509
|
readonly composer?: string | undefined;
|
|
1471
1510
|
readonly arranger?: string | undefined;
|
|
@@ -1476,7 +1515,7 @@ declare class ObjHeader extends MusicObject {
|
|
|
1476
1515
|
constructor(doc: ObjDocument, title?: string | undefined, composer?: string | undefined, arranger?: string | undefined);
|
|
1477
1516
|
getMusicInterface(): MHeader;
|
|
1478
1517
|
pick(x: number, y: number): MusicObject[];
|
|
1479
|
-
|
|
1518
|
+
layout(ctx: RenderContext): void;
|
|
1480
1519
|
offset(dx: number, dy: number): void;
|
|
1481
1520
|
draw(ctx: RenderContext): void;
|
|
1482
1521
|
}
|
|
@@ -1976,14 +2015,14 @@ declare class MBarLineLeft extends MusicInterface {
|
|
|
1976
2015
|
getMusicObject(): ObjBarLineLeft;
|
|
1977
2016
|
}
|
|
1978
2017
|
/** Bar line object for certain staff or tab. */
|
|
1979
|
-
declare class
|
|
2018
|
+
declare class MStaffBarLine extends MusicInterface {
|
|
1980
2019
|
private readonly obj;
|
|
1981
2020
|
/** Object name. */
|
|
1982
|
-
static readonly Name = "
|
|
2021
|
+
static readonly Name = "StaffBarLine";
|
|
1983
2022
|
/** @internal */
|
|
1984
|
-
constructor(obj:
|
|
2023
|
+
constructor(obj: ObjStaffBarLine);
|
|
1985
2024
|
/** @internal */
|
|
1986
|
-
getMusicObject():
|
|
2025
|
+
getMusicObject(): ObjStaffBarLine;
|
|
1987
2026
|
/**
|
|
1988
2027
|
* Get parent bar line object.
|
|
1989
2028
|
* @returns - Parent bar line object.
|
|
@@ -2193,6 +2232,21 @@ declare class MScoreRow extends MusicInterface {
|
|
|
2193
2232
|
*/
|
|
2194
2233
|
getNotationLines(): ReadonlyArray<MStaff | MTab>;
|
|
2195
2234
|
}
|
|
2235
|
+
/** Score row group object. */
|
|
2236
|
+
declare class MScoreRowGroup extends MusicInterface {
|
|
2237
|
+
private readonly obj;
|
|
2238
|
+
/** Object name. */
|
|
2239
|
+
static readonly Name = "ScoreRowGroup";
|
|
2240
|
+
/** @internal */
|
|
2241
|
+
constructor(obj: ObjScoreRowGroup);
|
|
2242
|
+
/** @internal */
|
|
2243
|
+
getMusicObject(): ObjScoreRowGroup;
|
|
2244
|
+
/**
|
|
2245
|
+
* Get instrument name.
|
|
2246
|
+
* @returns - instrument name.
|
|
2247
|
+
*/
|
|
2248
|
+
getInstrument(): string;
|
|
2249
|
+
}
|
|
2196
2250
|
/** Staff notatio line object. */
|
|
2197
2251
|
declare class MStaff extends MusicInterface {
|
|
2198
2252
|
private readonly obj;
|
|
@@ -2349,4 +2403,4 @@ declare class MExtensionLine extends MusicInterface {
|
|
|
2349
2403
|
getMusicObject(): ObjExtensionLine;
|
|
2350
2404
|
}
|
|
2351
2405
|
|
|
2352
|
-
export {
|
|
2406
|
+
export { MStaffSignature as $, type AnnotationText as A, MFermata as B, Connective as C, MHeader as D, MImage as E, Fermata as F, MMeasure as G, MBarLineRight as H, MBarLineLeft as I, MStaffBarLine as J, MNoteGroup as K, type LyricsOptions as L, MDocument as M, type NoteOptions as N, MStaffNoteGroup as O, MTabNoteGroup as P, MRest as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MStaffRest as U, type VoiceId as V, MRhythmColumn as W, MScoreRow as X, MScoreRowGroup as Y, MStaff as Z, MTab as _, type ScoreConfiguration as a, MTabSignature as a0, MTabRhythm as a1, MSpecialText as a2, MText as a3, MLyrics as a4, MExtensionLine as a5, Clef as a6, type BaseConfig as a7, type StaffConfig as a8, type TabConfig as a9, getVoiceIds as aa, isVoiceId as ab, validateVoiceId as ac, type StringNumber as ad, getStringNumbers as ae, isStringNumber as af, validateStringNumber as ag, getVerseNumbers as ah, isVerseNumber as ai, validateVerseNumber as aj, Stem as ak, Arpeggio as al, type StaffTabOrGroup as am, LyricsAlign as an, LyricsHyphen as ao, DynamicsAnnotation as ap, TempoAnnotation as aq, PlayState as ar, type PlayStateChangeListener as as, type MeasureOptions as b, type VerseNumber as c, type StaffTabOrGroups as d, Navigation as e, Annotation as f, Label as g, TieType as h, NoteAnchor as i, VerticalPosition as j, type ScoreEventType as k, ScoreEvent as l, ScoreStaffPosEvent as m, ScoreObjectEvent as n, type ScoreEventListener as o, MPlayer as p, MRenderContext as q, MRenderer as r, MPlaybackButtons as s, MusicInterface as t, MAccidental as u, MConnective as v, MArpeggio as w, MBeamGroup as x, MStaffBeamGroup as y, MEnding as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { N as Note, A as Accidental } from './note-RVXvpfyV.js';
|
|
2
2
|
import { R as RhythmProps, N as NoteLength, i as NoteLengthStr, l as TupletRatio, d as Tempo, K as KeySignature, b as TimeSignature } from './tempo-DwuZsv2T.js';
|
|
3
|
-
import { AnchoredRect, Rect, Vec } from '@tspro/ts-utils-lib';
|
|
3
|
+
import { AnchoredRect, UniMap, Rect, Vec } from '@tspro/ts-utils-lib';
|
|
4
4
|
|
|
5
5
|
/** Staff preset values for score configuration. */
|
|
6
6
|
declare enum StaffPreset {
|
|
@@ -805,6 +805,26 @@ declare class PlayerColumnProps {
|
|
|
805
805
|
getFermataHoldTicks(): number;
|
|
806
806
|
}
|
|
807
807
|
|
|
808
|
+
declare class ObjScoreRowGroup extends MusicObject {
|
|
809
|
+
readonly lines: readonly ObjNotationLine[];
|
|
810
|
+
private space;
|
|
811
|
+
readonly instrument: string;
|
|
812
|
+
private readonly instrText;
|
|
813
|
+
private braceRect;
|
|
814
|
+
readonly mi: MScoreRowGroup;
|
|
815
|
+
constructor(lines: readonly ObjNotationLine[]);
|
|
816
|
+
getMusicInterface(): MScoreRowGroup;
|
|
817
|
+
get row(): ObjScoreRow;
|
|
818
|
+
get hasBrace(): boolean;
|
|
819
|
+
get hasInstrument(): boolean;
|
|
820
|
+
pick(x: number, y: number): MusicObject[];
|
|
821
|
+
updateRect(): void;
|
|
822
|
+
layout(ctx: RenderContext): void;
|
|
823
|
+
layoutToNotationLines(): void;
|
|
824
|
+
offset(dx: number, dy: number): void;
|
|
825
|
+
draw(ctx: RenderContext): void;
|
|
826
|
+
}
|
|
827
|
+
|
|
808
828
|
declare enum BarLineType {
|
|
809
829
|
None = 0,
|
|
810
830
|
Single = 1,
|
|
@@ -814,10 +834,10 @@ declare enum BarLineType {
|
|
|
814
834
|
EndRepeat = 5,
|
|
815
835
|
EndStartRepeat = 6
|
|
816
836
|
}
|
|
817
|
-
declare class
|
|
837
|
+
declare class ObjStaffBarLine extends MusicObject {
|
|
818
838
|
readonly barLine: ObjBarLine;
|
|
819
839
|
readonly line: ObjNotationLine;
|
|
820
|
-
|
|
840
|
+
vlines: {
|
|
821
841
|
left: number;
|
|
822
842
|
width: number;
|
|
823
843
|
}[];
|
|
@@ -826,17 +846,17 @@ declare class ObjStaffTabBarLine extends MusicObject {
|
|
|
826
846
|
y: number;
|
|
827
847
|
r: number;
|
|
828
848
|
}[];
|
|
829
|
-
readonly mi:
|
|
849
|
+
readonly mi: MStaffBarLine;
|
|
830
850
|
constructor(barLine: ObjBarLine, line: ObjNotationLine);
|
|
831
851
|
getMusicInterface(): MusicInterface;
|
|
832
852
|
pick(x: number, y: number): MusicObject[];
|
|
833
|
-
|
|
853
|
+
updateRect(): void;
|
|
834
854
|
offset(dx: number, dy: number): void;
|
|
835
855
|
}
|
|
836
856
|
declare abstract class ObjBarLine extends MusicObject {
|
|
837
857
|
readonly measure: ObjMeasure;
|
|
838
|
-
protected
|
|
839
|
-
protected
|
|
858
|
+
protected notationLineObjects: ObjStaffBarLine[];
|
|
859
|
+
protected notationLineObjectsByGrp: UniMap<ObjScoreRowGroup, ObjStaffBarLine[]>;
|
|
840
860
|
protected barLineType: BarLineType;
|
|
841
861
|
constructor(measure: ObjMeasure);
|
|
842
862
|
abstract solveBarLineType(): BarLineType;
|
|
@@ -1029,17 +1049,29 @@ declare class ObjMeasure extends MusicObject {
|
|
|
1029
1049
|
draw(ctx: RenderContext): void;
|
|
1030
1050
|
}
|
|
1031
1051
|
|
|
1052
|
+
declare class ScoreRowRegions {
|
|
1053
|
+
instrWidth: number;
|
|
1054
|
+
staffWidth: number;
|
|
1055
|
+
resetWidths(): void;
|
|
1056
|
+
addRowInstrWidth(w: number): void;
|
|
1057
|
+
addRowstaffWidth(w: number): void;
|
|
1058
|
+
get instrLeft(): number;
|
|
1059
|
+
get instrRight(): number;
|
|
1060
|
+
get staffLeft(): number;
|
|
1061
|
+
get staffRight(): number;
|
|
1062
|
+
get left(): number;
|
|
1063
|
+
get right(): number;
|
|
1064
|
+
get width(): number;
|
|
1065
|
+
}
|
|
1032
1066
|
declare class ObjScoreRow extends MusicObject {
|
|
1033
1067
|
readonly doc: ObjDocument;
|
|
1034
1068
|
private readonly prevRow;
|
|
1035
1069
|
private readonly scoreConfig;
|
|
1036
1070
|
private nextRow?;
|
|
1037
|
-
private minWidth;
|
|
1038
1071
|
private readonly notationLines;
|
|
1039
|
-
private readonly
|
|
1072
|
+
private readonly rowGroups;
|
|
1040
1073
|
private readonly staves;
|
|
1041
1074
|
private readonly tabs;
|
|
1042
|
-
private readonly instrumentNames;
|
|
1043
1075
|
private readonly measures;
|
|
1044
1076
|
private needLayout;
|
|
1045
1077
|
readonly mi: MScoreRow;
|
|
@@ -1047,8 +1079,9 @@ declare class ObjScoreRow extends MusicObject {
|
|
|
1047
1079
|
getMusicInterface(): MScoreRow;
|
|
1048
1080
|
private createNotationLines;
|
|
1049
1081
|
getNotationLines(): ReadonlyArray<ObjNotationLine>;
|
|
1050
|
-
|
|
1082
|
+
getRowGroups(): ReadonlyArray<ObjScoreRowGroup>;
|
|
1051
1083
|
findMatchingLine(line: ObjNotationLine): ObjNotationLine | undefined;
|
|
1084
|
+
get regions(): ScoreRowRegions;
|
|
1052
1085
|
getStaves(): ReadonlyArray<ObjStaff>;
|
|
1053
1086
|
getTabs(): ReadonlyArray<ObjTab>;
|
|
1054
1087
|
get hasStaff(): boolean;
|
|
@@ -1069,33 +1102,22 @@ declare class ObjScoreRow extends MusicObject {
|
|
|
1069
1102
|
getNextRow(): ObjScoreRow | undefined;
|
|
1070
1103
|
getFirstMeasure(): ObjMeasure | undefined;
|
|
1071
1104
|
getLastMeasure(): ObjMeasure | undefined;
|
|
1072
|
-
getMinWidth(): number;
|
|
1073
1105
|
solveAutoStemDir(symbols: ReadonlyArray<RhythmSymbol>): Stem.Up | Stem.Down;
|
|
1074
|
-
getInstrumentNameWidth(ctx: RenderContext): number;
|
|
1075
1106
|
requestLayout(): void;
|
|
1076
1107
|
layout(ctx: RenderContext): void;
|
|
1077
|
-
|
|
1108
|
+
layoutStretch(ctx: RenderContext): void;
|
|
1078
1109
|
updateRect(): void;
|
|
1079
1110
|
alignStemsToBeams(): void;
|
|
1080
1111
|
layoutSetNotationLines(ctx: RenderContext): void;
|
|
1081
|
-
layoutPadding(ctx: RenderContext): void;
|
|
1082
1112
|
layoutDone(): void;
|
|
1083
1113
|
offset(dx: number, dy: number): void;
|
|
1084
1114
|
draw(ctx: RenderContext): void;
|
|
1085
1115
|
}
|
|
1086
1116
|
|
|
1087
|
-
declare class InstrumentGroupRegions {
|
|
1088
|
-
nameLeft: number;
|
|
1089
|
-
nameRight: number;
|
|
1090
|
-
braceLeft: number;
|
|
1091
|
-
braceRight: number;
|
|
1092
|
-
get left(): number;
|
|
1093
|
-
get right(): number;
|
|
1094
|
-
get width(): number;
|
|
1095
|
-
}
|
|
1096
1117
|
declare class ObjDocument extends MusicObject {
|
|
1097
1118
|
private needLayout;
|
|
1098
1119
|
private ctx?;
|
|
1120
|
+
readonly regions: ScoreRowRegions;
|
|
1099
1121
|
private readonly rows;
|
|
1100
1122
|
private readonly measures;
|
|
1101
1123
|
private measuresPerRow;
|
|
@@ -1104,7 +1126,6 @@ declare class ObjDocument extends MusicObject {
|
|
|
1104
1126
|
private newRowRequested;
|
|
1105
1127
|
private allConnectiveProps;
|
|
1106
1128
|
private staffGroups;
|
|
1107
|
-
private instrumentGroupRegions;
|
|
1108
1129
|
private readonly mi;
|
|
1109
1130
|
constructor();
|
|
1110
1131
|
getMusicInterface(): MDocument;
|
|
@@ -1133,10 +1154,10 @@ declare class ObjDocument extends MusicObject {
|
|
|
1133
1154
|
private forEachMeasure;
|
|
1134
1155
|
resetMeasures(): void;
|
|
1135
1156
|
updateCursorRect(cursorRect?: Rect): void;
|
|
1136
|
-
getInstrumentGroupRegions(ctx: RenderContext): InstrumentGroupRegions;
|
|
1137
1157
|
requestLayout(): void;
|
|
1138
1158
|
requestFullLayout(): void;
|
|
1139
1159
|
layout(): void;
|
|
1160
|
+
offset(dx: number, dy: number): void;
|
|
1140
1161
|
drawContent(): void;
|
|
1141
1162
|
pickStaffPosAt(x: number, y: number): {
|
|
1142
1163
|
scoreRow: ObjScoreRow;
|
|
@@ -1230,11 +1251,13 @@ declare class RenderContext {
|
|
|
1230
1251
|
strokeRect(x: number, y: number, w: number, h: number): RenderContext;
|
|
1231
1252
|
fillText(text: string, x: number, y: number): RenderContext;
|
|
1232
1253
|
getTextWidth(text: string, font: string): number;
|
|
1233
|
-
arc(x: number, y: number, radius: number, startRadians: number, endRadians: number):
|
|
1234
|
-
fillCircle(x: number, y: number, radius: number):
|
|
1235
|
-
strokeLine(startX: number, startY: number, endX: number, endY: number):
|
|
1236
|
-
strokePartialLine(startX: number, startY: number, endX: number, endY: number, startT: number, endT: number):
|
|
1237
|
-
|
|
1254
|
+
arc(x: number, y: number, radius: number, startRadians: number, endRadians: number): RenderContext;
|
|
1255
|
+
fillCircle(x: number, y: number, radius: number): RenderContext;
|
|
1256
|
+
strokeLine(startX: number, startY: number, endX: number, endY: number): RenderContext;
|
|
1257
|
+
strokePartialLine(startX: number, startY: number, endX: number, endY: number, startT: number, endT: number): RenderContext;
|
|
1258
|
+
/** @deprecated - Use {@link drawBracket} instead. */
|
|
1259
|
+
drawBrace(rect: AnchoredRect, side: "left" | "right"): RenderContext;
|
|
1260
|
+
drawBracket(rect: AnchoredRect, bracket: "(" | ")" | "[" | "]" | "{" | "}" | "<" | ">"): RenderContext;
|
|
1238
1261
|
}
|
|
1239
1262
|
|
|
1240
1263
|
declare class ObjEnding extends MusicObject {
|
|
@@ -1387,6 +1410,7 @@ declare class LayoutObjectWrapper {
|
|
|
1387
1410
|
getTextContent(): string | undefined;
|
|
1388
1411
|
layout(ctx: RenderContext): void;
|
|
1389
1412
|
offset(dx: number, dy: number): void;
|
|
1413
|
+
setAnchorY(y: number): void;
|
|
1390
1414
|
getRect(): AnchoredRect;
|
|
1391
1415
|
}
|
|
1392
1416
|
declare class LayoutGroup {
|
|
@@ -1423,7 +1447,21 @@ declare abstract class MusicObject {
|
|
|
1423
1447
|
private needRectUpdate;
|
|
1424
1448
|
requestRectUpdate(): void;
|
|
1425
1449
|
updateRect(): void;
|
|
1450
|
+
forceRectUpdate(): void;
|
|
1426
1451
|
getRect(): AnchoredRect;
|
|
1452
|
+
abstract offset(dx: number, dy: number): void;
|
|
1453
|
+
offsetX(dx: number): void;
|
|
1454
|
+
offsetY(dy: number): void;
|
|
1455
|
+
setLeft(x: number): void;
|
|
1456
|
+
setRight(x: number): void;
|
|
1457
|
+
setTop(y: number): void;
|
|
1458
|
+
setBottom(y: number): void;
|
|
1459
|
+
setAnchor(x: number, y: number): void;
|
|
1460
|
+
setAnchorX(x: number): void;
|
|
1461
|
+
setAnchorY(y: number): void;
|
|
1462
|
+
setCenter(x: number, y: number): void;
|
|
1463
|
+
setCenterX(x: number): void;
|
|
1464
|
+
setCenterY(y: number): void;
|
|
1427
1465
|
/**
|
|
1428
1466
|
* Most objects are simple rects in shape.
|
|
1429
1467
|
* Some objects might be more complex consisting of multiple rects.
|
|
@@ -1466,6 +1504,7 @@ declare class ObjArpeggio extends MusicObject {
|
|
|
1466
1504
|
}
|
|
1467
1505
|
|
|
1468
1506
|
declare class ObjHeader extends MusicObject {
|
|
1507
|
+
readonly doc: ObjDocument;
|
|
1469
1508
|
readonly title?: string | undefined;
|
|
1470
1509
|
readonly composer?: string | undefined;
|
|
1471
1510
|
readonly arranger?: string | undefined;
|
|
@@ -1476,7 +1515,7 @@ declare class ObjHeader extends MusicObject {
|
|
|
1476
1515
|
constructor(doc: ObjDocument, title?: string | undefined, composer?: string | undefined, arranger?: string | undefined);
|
|
1477
1516
|
getMusicInterface(): MHeader;
|
|
1478
1517
|
pick(x: number, y: number): MusicObject[];
|
|
1479
|
-
|
|
1518
|
+
layout(ctx: RenderContext): void;
|
|
1480
1519
|
offset(dx: number, dy: number): void;
|
|
1481
1520
|
draw(ctx: RenderContext): void;
|
|
1482
1521
|
}
|
|
@@ -1976,14 +2015,14 @@ declare class MBarLineLeft extends MusicInterface {
|
|
|
1976
2015
|
getMusicObject(): ObjBarLineLeft;
|
|
1977
2016
|
}
|
|
1978
2017
|
/** Bar line object for certain staff or tab. */
|
|
1979
|
-
declare class
|
|
2018
|
+
declare class MStaffBarLine extends MusicInterface {
|
|
1980
2019
|
private readonly obj;
|
|
1981
2020
|
/** Object name. */
|
|
1982
|
-
static readonly Name = "
|
|
2021
|
+
static readonly Name = "StaffBarLine";
|
|
1983
2022
|
/** @internal */
|
|
1984
|
-
constructor(obj:
|
|
2023
|
+
constructor(obj: ObjStaffBarLine);
|
|
1985
2024
|
/** @internal */
|
|
1986
|
-
getMusicObject():
|
|
2025
|
+
getMusicObject(): ObjStaffBarLine;
|
|
1987
2026
|
/**
|
|
1988
2027
|
* Get parent bar line object.
|
|
1989
2028
|
* @returns - Parent bar line object.
|
|
@@ -2193,6 +2232,21 @@ declare class MScoreRow extends MusicInterface {
|
|
|
2193
2232
|
*/
|
|
2194
2233
|
getNotationLines(): ReadonlyArray<MStaff | MTab>;
|
|
2195
2234
|
}
|
|
2235
|
+
/** Score row group object. */
|
|
2236
|
+
declare class MScoreRowGroup extends MusicInterface {
|
|
2237
|
+
private readonly obj;
|
|
2238
|
+
/** Object name. */
|
|
2239
|
+
static readonly Name = "ScoreRowGroup";
|
|
2240
|
+
/** @internal */
|
|
2241
|
+
constructor(obj: ObjScoreRowGroup);
|
|
2242
|
+
/** @internal */
|
|
2243
|
+
getMusicObject(): ObjScoreRowGroup;
|
|
2244
|
+
/**
|
|
2245
|
+
* Get instrument name.
|
|
2246
|
+
* @returns - instrument name.
|
|
2247
|
+
*/
|
|
2248
|
+
getInstrument(): string;
|
|
2249
|
+
}
|
|
2196
2250
|
/** Staff notatio line object. */
|
|
2197
2251
|
declare class MStaff extends MusicInterface {
|
|
2198
2252
|
private readonly obj;
|
|
@@ -2349,4 +2403,4 @@ declare class MExtensionLine extends MusicInterface {
|
|
|
2349
2403
|
getMusicObject(): ObjExtensionLine;
|
|
2350
2404
|
}
|
|
2351
2405
|
|
|
2352
|
-
export {
|
|
2406
|
+
export { MStaffSignature as $, type AnnotationText as A, MFermata as B, Connective as C, MHeader as D, MImage as E, Fermata as F, MMeasure as G, MBarLineRight as H, MBarLineLeft as I, MStaffBarLine as J, MNoteGroup as K, type LyricsOptions as L, MDocument as M, type NoteOptions as N, MStaffNoteGroup as O, MTabNoteGroup as P, MRest as Q, type RestOptions as R, StaffPreset as S, type TupletOptions as T, MStaffRest as U, type VoiceId as V, MRhythmColumn as W, MScoreRow as X, MScoreRowGroup as Y, MStaff as Z, MTab as _, type ScoreConfiguration as a, MTabSignature as a0, MTabRhythm as a1, MSpecialText as a2, MText as a3, MLyrics as a4, MExtensionLine as a5, Clef as a6, type BaseConfig as a7, type StaffConfig as a8, type TabConfig as a9, getVoiceIds as aa, isVoiceId as ab, validateVoiceId as ac, type StringNumber as ad, getStringNumbers as ae, isStringNumber as af, validateStringNumber as ag, getVerseNumbers as ah, isVerseNumber as ai, validateVerseNumber as aj, Stem as ak, Arpeggio as al, type StaffTabOrGroup as am, LyricsAlign as an, LyricsHyphen as ao, DynamicsAnnotation as ap, TempoAnnotation as aq, PlayState as ar, type PlayStateChangeListener as as, type MeasureOptions as b, type VerseNumber as c, type StaffTabOrGroups as d, Navigation as e, Annotation as f, Label as g, TieType as h, NoteAnchor as i, VerticalPosition as j, type ScoreEventType as k, ScoreEvent as l, ScoreStaffPosEvent as m, ScoreObjectEvent as n, type ScoreEventListener as o, MPlayer as p, MRenderContext as q, MRenderer as r, MPlaybackButtons as s, MusicInterface as t, MAccidental as u, MConnective as v, MArpeggio as w, MBeamGroup as x, MStaffBeamGroup as y, MEnding as z };
|
|
@@ -300,7 +300,7 @@ declare class Note {
|
|
|
300
300
|
* @param b - Note b.
|
|
301
301
|
* @returns - -1, 0 or 1.
|
|
302
302
|
*/
|
|
303
|
-
static compareFunc(a: Note, b: Note): 1 |
|
|
303
|
+
static compareFunc(a: Note, b: Note): 1 | -1 | 0;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
export { type Accidental as A, DefaultPitchNotation as D, GuitarNoteLabel as G, Note as N, type ParsedNote as P, SymbolSet as S, type NoteLetter as a, PitchNotation as b, PitchNotationList as c, DefaultGuitarNoteLabel as d, GuitarNoteLabelList as e, validateGuitarNoteLabel as f, getPitchNotationName as g, validatePitchNotation as v };
|
package/dist/pieces/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { M as MDocument } from '../music-objects-
|
|
2
|
-
import '../note-
|
|
3
|
-
import '../tempo-
|
|
1
|
+
import { M as MDocument } from '../music-objects-DqoO-Sfv.mjs';
|
|
2
|
+
import '../note-CJuq5aBy.mjs';
|
|
3
|
+
import '../tempo-Cxu8vusu.mjs';
|
|
4
4
|
import '@tspro/ts-utils-lib';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/pieces/index.d.ts
CHANGED
package/dist/pieces/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v5.4.
|
|
1
|
+
/* WebMusicScore v5.4.2 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
package/dist/pieces/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* WebMusicScore v5.4.
|
|
2
|
-
import "../chunk-
|
|
1
|
+
/* WebMusicScore v5.4.2 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
|
+
import "../chunk-ROBXPR34.mjs";
|
|
3
3
|
|
|
4
4
|
// src/pieces/canon-pachelbel.ts
|
|
5
5
|
import { DocumentBuilder } from "@tspro/web-music-score/score";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { c as Scale, S as ScaleType } from '../scale-
|
|
4
|
-
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-
|
|
5
|
-
import { H as Handedness } from '../guitar-
|
|
3
|
+
import { c as Scale, S as ScaleType } from '../scale-DWM4RQco.mjs';
|
|
4
|
+
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-CJuq5aBy.mjs';
|
|
5
|
+
import { H as Handedness } from '../guitar-DK18GZ6h.mjs';
|
|
6
6
|
import { Rect } from '@tspro/ts-utils-lib';
|
|
7
|
-
import { M as MDocument, o as ScoreEventListener, s as MPlaybackButtons } from '../music-objects-
|
|
8
|
-
import '../tempo-
|
|
7
|
+
import { M as MDocument, o as ScoreEventListener, s as MPlaybackButtons } from '../music-objects-DqoO-Sfv.mjs';
|
|
8
|
+
import '../tempo-Cxu8vusu.mjs';
|
|
9
9
|
|
|
10
10
|
interface CircleOfFifthsProps {
|
|
11
11
|
style?: React.CSSProperties;
|
package/dist/react-ui/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { c as Scale, S as ScaleType } from '../scale-CUYFBo-8.js';
|
|
|
4
4
|
import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-RVXvpfyV.js';
|
|
5
5
|
import { H as Handedness } from '../guitar-CNOxM4ZK.js';
|
|
6
6
|
import { Rect } from '@tspro/ts-utils-lib';
|
|
7
|
-
import { M as MDocument, o as ScoreEventListener, s as MPlaybackButtons } from '../music-objects-
|
|
7
|
+
import { M as MDocument, o as ScoreEventListener, s as MPlaybackButtons } from '../music-objects-T8u8bnNP.js';
|
|
8
8
|
import '../tempo-DwuZsv2T.js';
|
|
9
9
|
|
|
10
10
|
interface CircleOfFifthsProps {
|
package/dist/react-ui/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* WebMusicScore v5.4.
|
|
1
|
+
/* WebMusicScore v5.4.2 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
"use strict";
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist/react-ui/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* WebMusicScore v5.4.
|
|
1
|
+
/* WebMusicScore v5.4.2 | (c) 2023-2025 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
__publicField
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-ROBXPR34.mjs";
|
|
5
5
|
|
|
6
6
|
// src/react-ui/circle-of-fifths.tsx
|
|
7
7
|
import * as React from "react";
|