web-music-score 6.0.0-pre.3 → 6.0.0-pre.5
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 +16 -1
- package/dist/audio/index.d.ts +1 -1
- package/dist/audio/index.js +12 -2
- package/dist/audio/index.mjs +4 -4
- package/dist/audio-cg/index.js +1 -1
- package/dist/audio-cg/index.mjs +4 -4
- package/dist/audio-synth/index.js +1 -1
- package/dist/audio-synth/index.mjs +4 -4
- package/dist/{chunk-7OA6ZYVA.mjs → chunk-6R3N7WJC.mjs} +3 -3
- package/dist/{chunk-TM46RT77.mjs → chunk-DQFQEO6F.mjs} +4 -4
- package/dist/{chunk-QJ3X3GQ6.mjs → chunk-G3HIPFVF.mjs} +2 -2
- package/dist/{chunk-S5PIZUF6.mjs → chunk-JP3PJICN.mjs} +14 -4
- package/dist/{chunk-SCF6ZZFQ.mjs → chunk-U2D4H5TI.mjs} +3 -3
- package/dist/{chunk-AMTQ5XLI.mjs → chunk-Y67RBHW2.mjs} +2 -2
- package/dist/core/index.js +1740 -5
- package/dist/core/index.mjs +8 -14
- package/dist/iife/audio-cg.js +1 -1
- package/dist/iife/index.js +13 -13
- package/dist/{music-objects-DLmp5uL6.d.ts → music-objects-D-xO1oti.d.ts} +75 -5
- package/dist/{note-RVXvpfyV.d.ts → note-CJuq5aBy.d.ts} +1 -1
- package/dist/pieces/index.d.ts +3 -3
- package/dist/pieces/index.js +2 -2
- package/dist/pieces/index.mjs +3 -3
- package/dist/react-ui/index.d.ts +4 -3
- package/dist/react-ui/index.js +3 -1
- package/dist/react-ui/index.mjs +4 -2
- package/dist/{scale-B1M10_fu.d.ts → scale-DxGqFxlv.d.ts} +2 -2
- package/dist/score/index.d.ts +15 -56
- package/dist/score/index.js +731 -603
- package/dist/score/index.mjs +722 -605
- package/dist/{tempo-D-JF-8b_.d.ts → tempo-pCAa6qgo.d.ts} +1 -1
- package/dist/theory/index.d.ts +5 -5
- package/dist/theory/index.js +12 -2
- package/dist/theory/index.mjs +4 -4
- package/package.json +5 -4
package/dist/score/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
/* WebMusicScore v6.0.0-pre.
|
|
1
|
+
/* WebMusicScore v6.0.0-pre.5 | (c) 2023-2025 Stefan Brockmann | MIT License | Includes: Tone.js (MIT License), Color Name to Code (MIT License) */
|
|
2
2
|
import {
|
|
3
3
|
MusicError
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-U2D4H5TI.mjs";
|
|
5
5
|
import {
|
|
6
6
|
NoteLengthProps,
|
|
7
7
|
RhythmProps,
|
|
8
8
|
validateNoteLength
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-DQFQEO6F.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AnchoredRect,
|
|
12
12
|
BiMap,
|
|
@@ -20,105 +20,12 @@ import {
|
|
|
20
20
|
device_exports,
|
|
21
21
|
guard_exports,
|
|
22
22
|
utils_exports
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-JP3PJICN.mjs";
|
|
24
24
|
import {
|
|
25
25
|
__publicField,
|
|
26
26
|
__spreadProps,
|
|
27
27
|
__spreadValues
|
|
28
|
-
} from "../chunk-
|
|
29
|
-
|
|
30
|
-
// src/score/engine/settings.ts
|
|
31
|
-
var DebugSettings = {
|
|
32
|
-
DrawDebugRects: false,
|
|
33
|
-
DisableBeams: false
|
|
34
|
-
};
|
|
35
|
-
var DocumentSettings = {
|
|
36
|
-
DocumentScale: 1,
|
|
37
|
-
MinStaffWidth: 75,
|
|
38
|
-
MinColumnsWidth: 10,
|
|
39
|
-
ColumnWidthScale: 1.7,
|
|
40
|
-
PostMeasureBreakWidth: 10,
|
|
41
|
-
NoteDotSpace: 0.5,
|
|
42
|
-
NoteAccSpace: 0.5,
|
|
43
|
-
NoteHeadWidth: 2,
|
|
44
|
-
NoteHeadHeight: 1.3,
|
|
45
|
-
DiamondNoteHeadSize: 1.8,
|
|
46
|
-
DotSize: 0.8,
|
|
47
|
-
StemHeight: 7,
|
|
48
|
-
// One octave
|
|
49
|
-
FlagWidth: 1.5,
|
|
50
|
-
FlagHeight: 4,
|
|
51
|
-
FlagSeparation: 2,
|
|
52
|
-
BeamSeparation: 1.25,
|
|
53
|
-
BeamAngleFactor: 0.5,
|
|
54
|
-
BeamThickness: 4,
|
|
55
|
-
RestDotSpace: 0.5,
|
|
56
|
-
LedgerLineWidth: 3.6,
|
|
57
|
-
StubTieLength: 5,
|
|
58
|
-
StaffHeight: 8,
|
|
59
|
-
TabHeight: 20
|
|
60
|
-
};
|
|
61
|
-
var DocumentColor = {
|
|
62
|
-
HilightStaffPos: "#55cc55",
|
|
63
|
-
HilightObject: "#55cc55",
|
|
64
|
-
PlayCursor: "#44aa44",
|
|
65
|
-
Background: "white",
|
|
66
|
-
Header_Title: "black",
|
|
67
|
-
Header_Composer: "black",
|
|
68
|
-
Header_Arranger: "black",
|
|
69
|
-
RowGroup_Instrument: "black",
|
|
70
|
-
RowGroup_Frame: "black",
|
|
71
|
-
Staff_Frame: "black",
|
|
72
|
-
Staff_Note: "black",
|
|
73
|
-
Staff_Rest: "black",
|
|
74
|
-
Staff_Connective: "black",
|
|
75
|
-
Staff_Signature_Clef: "black",
|
|
76
|
-
Staff_Signature_Key: "black",
|
|
77
|
-
Staff_Signature_Time: "black",
|
|
78
|
-
Staff_Signature_Tempo: "black",
|
|
79
|
-
Staff_Signature_MeasureNum: "black",
|
|
80
|
-
Staff_Element_Fermata: "black",
|
|
81
|
-
Staff_Element_Annotation: "black",
|
|
82
|
-
Staff_Element_Navigation: "black",
|
|
83
|
-
Staff_Element_Label: "black",
|
|
84
|
-
Tab_Frame: "black",
|
|
85
|
-
Tab_Note: "black",
|
|
86
|
-
Tab_Rest: "black",
|
|
87
|
-
Tab_Connective: "black",
|
|
88
|
-
Tab_Tuning: "black",
|
|
89
|
-
//Tab_Signature_Clef: "black",
|
|
90
|
-
//Tab_Signature_Key: "black",
|
|
91
|
-
Tab_Signature_Time: "black",
|
|
92
|
-
Tab_Signature_Tempo: "black",
|
|
93
|
-
Tab_Signature_MeasureNum: "black",
|
|
94
|
-
Tab_Element_Fermata: "black",
|
|
95
|
-
Tab_Element_Annotation: "black",
|
|
96
|
-
Tab_Element_Navigation: "black",
|
|
97
|
-
Tab_Element_Label: "black"
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
// src/score/pub/color.ts
|
|
101
|
-
function eq(a, b) {
|
|
102
|
-
return a.toLocaleLowerCase() === b.toLocaleLowerCase();
|
|
103
|
-
}
|
|
104
|
-
function setColor(color, ...colorAttrs) {
|
|
105
|
-
const setBacground = colorAttrs.length === 1 && eq(colorAttrs[0], "background");
|
|
106
|
-
const setAllColors = colorAttrs.length === 0;
|
|
107
|
-
if (eq(color, ""))
|
|
108
|
-
color = setBacground ? "white" : "black";
|
|
109
|
-
let noMatch = true;
|
|
110
|
-
for (const key in DocumentColor) {
|
|
111
|
-
const keyAttrs = key.split("_");
|
|
112
|
-
const isColorMatch = colorAttrs.length > 0 && colorAttrs.every((a) => keyAttrs.some((b) => eq(a, b)));
|
|
113
|
-
const isBgColorMatch = keyAttrs.length === 1 && eq(keyAttrs[0], "background");
|
|
114
|
-
if (setAllColors && !isBgColorMatch || isColorMatch) {
|
|
115
|
-
DocumentColor[key] = color;
|
|
116
|
-
noMatch = false;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
if (noMatch)
|
|
120
|
-
console.error(`Color attrs ${utils_exports.Str.stringify(colorAttrs)} did not match any color.`);
|
|
121
|
-
}
|
|
28
|
+
} from "../chunk-G3HIPFVF.mjs";
|
|
122
29
|
|
|
123
30
|
// src/score/pub/types.ts
|
|
124
31
|
var StaffPreset = /* @__PURE__ */ ((StaffPreset2) => {
|
|
@@ -399,394 +306,40 @@ import { Note as Note9 } from "web-music-score/theory";
|
|
|
399
306
|
// src/score/engine/obj-staff-and-tab.ts
|
|
400
307
|
import { getTuningStrings, Note as Note8, validateTuningName } from "web-music-score/theory";
|
|
401
308
|
|
|
402
|
-
//
|
|
403
|
-
var
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
ColorName2["DarkMagenta"] = "darkmagenta";
|
|
434
|
-
ColorName2["DarkOliveGreen"] = "darkolivegreen";
|
|
435
|
-
ColorName2["DarkOrange"] = "darkorange";
|
|
436
|
-
ColorName2["DarkOrchid"] = "darkorchid";
|
|
437
|
-
ColorName2["DarkRed"] = "darkred";
|
|
438
|
-
ColorName2["DarkSalmon"] = "darksalmon";
|
|
439
|
-
ColorName2["DarkSeaGreen"] = "darkseagreen";
|
|
440
|
-
ColorName2["DarkSlateBlue"] = "darkslateblue";
|
|
441
|
-
ColorName2["DarkSlateGray"] = "darkslategray";
|
|
442
|
-
ColorName2["DarkSlateGrey"] = "darkslategrey";
|
|
443
|
-
ColorName2["DarkTurquoise"] = "darkturquoise";
|
|
444
|
-
ColorName2["DarkViolet"] = "darkviolet";
|
|
445
|
-
ColorName2["DeepPink"] = "deeppink";
|
|
446
|
-
ColorName2["DeepSkyBlue"] = "deepskyblue";
|
|
447
|
-
ColorName2["DimGray"] = "dimgray";
|
|
448
|
-
ColorName2["DimGrey"] = "dimgrey";
|
|
449
|
-
ColorName2["DodgerBlue"] = "dodgerblue";
|
|
450
|
-
ColorName2["FireBrick"] = "firebrick";
|
|
451
|
-
ColorName2["FloralWhite"] = "floralwhite";
|
|
452
|
-
ColorName2["ForestGreen"] = "forestgreen";
|
|
453
|
-
ColorName2["Fuchsia"] = "fuchsia";
|
|
454
|
-
ColorName2["Gainsboro"] = "gainsboro";
|
|
455
|
-
ColorName2["GhostWhite"] = "ghostwhite";
|
|
456
|
-
ColorName2["Gold"] = "gold";
|
|
457
|
-
ColorName2["GoldenRod"] = "goldenrod";
|
|
458
|
-
ColorName2["Gray"] = "gray";
|
|
459
|
-
ColorName2["Green"] = "green";
|
|
460
|
-
ColorName2["GreenYellow"] = "greenyellow";
|
|
461
|
-
ColorName2["Grey"] = "grey";
|
|
462
|
-
ColorName2["Honeydew"] = "honeydew";
|
|
463
|
-
ColorName2["HotPink"] = "hotpink";
|
|
464
|
-
ColorName2["IndianRed"] = "indianred";
|
|
465
|
-
ColorName2["Indigo"] = "indigo";
|
|
466
|
-
ColorName2["Ivory"] = "ivory";
|
|
467
|
-
ColorName2["Khaki"] = "khaki";
|
|
468
|
-
ColorName2["Lavender"] = "lavender";
|
|
469
|
-
ColorName2["LavenderBlush"] = "lavenderblush";
|
|
470
|
-
ColorName2["LawnGreen"] = "lawngreen";
|
|
471
|
-
ColorName2["LemonChiffon"] = "lemonchiffon";
|
|
472
|
-
ColorName2["LightBlue"] = "lightblue";
|
|
473
|
-
ColorName2["LightCoral"] = "lightcoral";
|
|
474
|
-
ColorName2["LightCyan"] = "lightcyan";
|
|
475
|
-
ColorName2["LightGoldenRodYellow"] = "lightgoldenrodyellow";
|
|
476
|
-
ColorName2["LightGray"] = "lightgray";
|
|
477
|
-
ColorName2["LightGreen"] = "lightgreen";
|
|
478
|
-
ColorName2["LightGrey"] = "lightgrey";
|
|
479
|
-
ColorName2["LightPink"] = "lightpink";
|
|
480
|
-
ColorName2["LightSalmon"] = "lightsalmon";
|
|
481
|
-
ColorName2["LightSeaGreen"] = "lightseagreen";
|
|
482
|
-
ColorName2["LightSkyBlue"] = "lightskyblue";
|
|
483
|
-
ColorName2["LightSlateGray"] = "lightslategray";
|
|
484
|
-
ColorName2["LightSlateGrey"] = "lightslategrey";
|
|
485
|
-
ColorName2["LightSteelBlue"] = "lightsteelblue";
|
|
486
|
-
ColorName2["LightYellow"] = "lightyellow";
|
|
487
|
-
ColorName2["Lime"] = "lime";
|
|
488
|
-
ColorName2["LimeGreen"] = "limegreen";
|
|
489
|
-
ColorName2["Linen"] = "linen";
|
|
490
|
-
ColorName2["Magenta"] = "magenta";
|
|
491
|
-
ColorName2["Maroon"] = "maroon";
|
|
492
|
-
ColorName2["MediumAquamarine"] = "mediumaquamarine";
|
|
493
|
-
ColorName2["MediumBlue"] = "mediumblue";
|
|
494
|
-
ColorName2["MediumOrchid"] = "mediumorchid";
|
|
495
|
-
ColorName2["MediumPurple"] = "mediumpurple";
|
|
496
|
-
ColorName2["MediumSeaGreen"] = "mediumseagreen";
|
|
497
|
-
ColorName2["MediumSlateBlue"] = "mediumslateblue";
|
|
498
|
-
ColorName2["MediumSpringGreen"] = "mediumspringgreen";
|
|
499
|
-
ColorName2["MediumTurquoise"] = "mediumturquoise";
|
|
500
|
-
ColorName2["MediumVioletRed"] = "mediumvioletred";
|
|
501
|
-
ColorName2["MidnightBlue"] = "midnightblue";
|
|
502
|
-
ColorName2["MintCream"] = "mintcream";
|
|
503
|
-
ColorName2["MistyRose"] = "mistyrose";
|
|
504
|
-
ColorName2["Moccasin"] = "moccasin";
|
|
505
|
-
ColorName2["NavajoWhite"] = "navajowhite";
|
|
506
|
-
ColorName2["Navy"] = "navy";
|
|
507
|
-
ColorName2["OldLace"] = "oldlace";
|
|
508
|
-
ColorName2["Olive"] = "olive";
|
|
509
|
-
ColorName2["OliveDrab"] = "olivedrab";
|
|
510
|
-
ColorName2["Orange"] = "orange";
|
|
511
|
-
ColorName2["OrangeRed"] = "orangered";
|
|
512
|
-
ColorName2["Orchid"] = "orchid";
|
|
513
|
-
ColorName2["PaleGoldenRod"] = "palegoldenrod";
|
|
514
|
-
ColorName2["PaleGreen"] = "palegreen";
|
|
515
|
-
ColorName2["PaleTurquoise"] = "paleturquoise";
|
|
516
|
-
ColorName2["PaleVioletRed"] = "palevioletred";
|
|
517
|
-
ColorName2["PapayaWhip"] = "papayawhip";
|
|
518
|
-
ColorName2["PeachPuff"] = "peachpuff";
|
|
519
|
-
ColorName2["Peru"] = "peru";
|
|
520
|
-
ColorName2["Pink"] = "pink";
|
|
521
|
-
ColorName2["Plum"] = "plum";
|
|
522
|
-
ColorName2["PowderBlue"] = "powderblue";
|
|
523
|
-
ColorName2["Purple"] = "purple";
|
|
524
|
-
ColorName2["RebeccaPurple"] = "rebeccapurple";
|
|
525
|
-
ColorName2["Red"] = "red";
|
|
526
|
-
ColorName2["RosyBrown"] = "rosybrown";
|
|
527
|
-
ColorName2["RoyalBlue"] = "royalblue";
|
|
528
|
-
ColorName2["SaddleBrown"] = "saddlebrown";
|
|
529
|
-
ColorName2["Salmon"] = "salmon";
|
|
530
|
-
ColorName2["SandyBrown"] = "sandybrown";
|
|
531
|
-
ColorName2["SeaGreen"] = "seagreen";
|
|
532
|
-
ColorName2["SeaShell"] = "seashell";
|
|
533
|
-
ColorName2["Sienna"] = "sienna";
|
|
534
|
-
ColorName2["Silver"] = "silver";
|
|
535
|
-
ColorName2["SkyBlue"] = "skyblue";
|
|
536
|
-
ColorName2["SlateBlue"] = "slateblue";
|
|
537
|
-
ColorName2["SlateGray"] = "slategray";
|
|
538
|
-
ColorName2["SlateGrey"] = "slategrey";
|
|
539
|
-
ColorName2["Snow"] = "snow";
|
|
540
|
-
ColorName2["SpringGreen"] = "springgreen";
|
|
541
|
-
ColorName2["SteelBlue"] = "steelblue";
|
|
542
|
-
ColorName2["Tan"] = "tan";
|
|
543
|
-
ColorName2["Teal"] = "teal";
|
|
544
|
-
ColorName2["Thistle"] = "thistle";
|
|
545
|
-
ColorName2["Tomato"] = "tomato";
|
|
546
|
-
ColorName2["Turquoise"] = "turquoise";
|
|
547
|
-
ColorName2["Violet"] = "violet";
|
|
548
|
-
ColorName2["Wheat"] = "wheat";
|
|
549
|
-
ColorName2["White"] = "white";
|
|
550
|
-
ColorName2["WhiteSmoke"] = "whitesmoke";
|
|
551
|
-
ColorName2["Yellow"] = "yellow";
|
|
552
|
-
ColorName2["YellowGreen"] = "yellowgreen";
|
|
553
|
-
})(ColorName = ColorName || (ColorName = {}));
|
|
309
|
+
// src/score/engine/settings.ts
|
|
310
|
+
var DebugSettings = {
|
|
311
|
+
DrawDebugRects: false,
|
|
312
|
+
DisableBeams: false
|
|
313
|
+
};
|
|
314
|
+
var DocumentSettings = {
|
|
315
|
+
DocumentScale: 1,
|
|
316
|
+
MinStaffWidth: 75,
|
|
317
|
+
MinColumnsWidth: 10,
|
|
318
|
+
ColumnWidthScale: 1.7,
|
|
319
|
+
PostMeasureBreakWidth: 10,
|
|
320
|
+
NoteDotSpace: 0.5,
|
|
321
|
+
NoteAccSpace: 0.5,
|
|
322
|
+
NoteHeadWidth: 2,
|
|
323
|
+
NoteHeadHeight: 1.3,
|
|
324
|
+
DiamondNoteHeadSize: 1.8,
|
|
325
|
+
DotSize: 0.8,
|
|
326
|
+
StemHeight: 7,
|
|
327
|
+
// One octave
|
|
328
|
+
FlagWidth: 1.5,
|
|
329
|
+
FlagHeight: 4,
|
|
330
|
+
FlagSeparation: 2,
|
|
331
|
+
BeamSeparation: 1.25,
|
|
332
|
+
BeamAngleFactor: 0.5,
|
|
333
|
+
BeamThickness: 4,
|
|
334
|
+
RestDotSpace: 0.5,
|
|
335
|
+
LedgerLineWidth: 3.6,
|
|
336
|
+
StubTieLength: 5,
|
|
337
|
+
StaffHeight: 8,
|
|
338
|
+
TabHeight: 20
|
|
339
|
+
};
|
|
554
340
|
|
|
555
|
-
//
|
|
556
|
-
var
|
|
557
|
-
(function(ColorCodeFormat2) {
|
|
558
|
-
ColorCodeFormat2["Hex"] = "hex";
|
|
559
|
-
ColorCodeFormat2["RGB"] = "rgb";
|
|
560
|
-
ColorCodeFormat2["Array"] = "array";
|
|
561
|
-
})(ColorCodeFormat = ColorCodeFormat || (ColorCodeFormat = {}));
|
|
562
|
-
|
|
563
|
-
// node_modules/color-name/index.js
|
|
564
|
-
var colors = {
|
|
565
|
-
aliceblue: [240, 248, 255],
|
|
566
|
-
antiquewhite: [250, 235, 215],
|
|
567
|
-
aqua: [0, 255, 255],
|
|
568
|
-
aquamarine: [127, 255, 212],
|
|
569
|
-
azure: [240, 255, 255],
|
|
570
|
-
beige: [245, 245, 220],
|
|
571
|
-
bisque: [255, 228, 196],
|
|
572
|
-
black: [0, 0, 0],
|
|
573
|
-
blanchedalmond: [255, 235, 205],
|
|
574
|
-
blue: [0, 0, 255],
|
|
575
|
-
blueviolet: [138, 43, 226],
|
|
576
|
-
brown: [165, 42, 42],
|
|
577
|
-
burlywood: [222, 184, 135],
|
|
578
|
-
cadetblue: [95, 158, 160],
|
|
579
|
-
chartreuse: [127, 255, 0],
|
|
580
|
-
chocolate: [210, 105, 30],
|
|
581
|
-
coral: [255, 127, 80],
|
|
582
|
-
cornflowerblue: [100, 149, 237],
|
|
583
|
-
cornsilk: [255, 248, 220],
|
|
584
|
-
crimson: [220, 20, 60],
|
|
585
|
-
cyan: [0, 255, 255],
|
|
586
|
-
darkblue: [0, 0, 139],
|
|
587
|
-
darkcyan: [0, 139, 139],
|
|
588
|
-
darkgoldenrod: [184, 134, 11],
|
|
589
|
-
darkgray: [169, 169, 169],
|
|
590
|
-
darkgreen: [0, 100, 0],
|
|
591
|
-
darkgrey: [169, 169, 169],
|
|
592
|
-
darkkhaki: [189, 183, 107],
|
|
593
|
-
darkmagenta: [139, 0, 139],
|
|
594
|
-
darkolivegreen: [85, 107, 47],
|
|
595
|
-
darkorange: [255, 140, 0],
|
|
596
|
-
darkorchid: [153, 50, 204],
|
|
597
|
-
darkred: [139, 0, 0],
|
|
598
|
-
darksalmon: [233, 150, 122],
|
|
599
|
-
darkseagreen: [143, 188, 143],
|
|
600
|
-
darkslateblue: [72, 61, 139],
|
|
601
|
-
darkslategray: [47, 79, 79],
|
|
602
|
-
darkslategrey: [47, 79, 79],
|
|
603
|
-
darkturquoise: [0, 206, 209],
|
|
604
|
-
darkviolet: [148, 0, 211],
|
|
605
|
-
deeppink: [255, 20, 147],
|
|
606
|
-
deepskyblue: [0, 191, 255],
|
|
607
|
-
dimgray: [105, 105, 105],
|
|
608
|
-
dimgrey: [105, 105, 105],
|
|
609
|
-
dodgerblue: [30, 144, 255],
|
|
610
|
-
firebrick: [178, 34, 34],
|
|
611
|
-
floralwhite: [255, 250, 240],
|
|
612
|
-
forestgreen: [34, 139, 34],
|
|
613
|
-
fuchsia: [255, 0, 255],
|
|
614
|
-
gainsboro: [220, 220, 220],
|
|
615
|
-
ghostwhite: [248, 248, 255],
|
|
616
|
-
gold: [255, 215, 0],
|
|
617
|
-
goldenrod: [218, 165, 32],
|
|
618
|
-
gray: [128, 128, 128],
|
|
619
|
-
green: [0, 128, 0],
|
|
620
|
-
greenyellow: [173, 255, 47],
|
|
621
|
-
grey: [128, 128, 128],
|
|
622
|
-
honeydew: [240, 255, 240],
|
|
623
|
-
hotpink: [255, 105, 180],
|
|
624
|
-
indianred: [205, 92, 92],
|
|
625
|
-
indigo: [75, 0, 130],
|
|
626
|
-
ivory: [255, 255, 240],
|
|
627
|
-
khaki: [240, 230, 140],
|
|
628
|
-
lavender: [230, 230, 250],
|
|
629
|
-
lavenderblush: [255, 240, 245],
|
|
630
|
-
lawngreen: [124, 252, 0],
|
|
631
|
-
lemonchiffon: [255, 250, 205],
|
|
632
|
-
lightblue: [173, 216, 230],
|
|
633
|
-
lightcoral: [240, 128, 128],
|
|
634
|
-
lightcyan: [224, 255, 255],
|
|
635
|
-
lightgoldenrodyellow: [250, 250, 210],
|
|
636
|
-
lightgray: [211, 211, 211],
|
|
637
|
-
lightgreen: [144, 238, 144],
|
|
638
|
-
lightgrey: [211, 211, 211],
|
|
639
|
-
lightpink: [255, 182, 193],
|
|
640
|
-
lightsalmon: [255, 160, 122],
|
|
641
|
-
lightseagreen: [32, 178, 170],
|
|
642
|
-
lightskyblue: [135, 206, 250],
|
|
643
|
-
lightslategray: [119, 136, 153],
|
|
644
|
-
lightslategrey: [119, 136, 153],
|
|
645
|
-
lightsteelblue: [176, 196, 222],
|
|
646
|
-
lightyellow: [255, 255, 224],
|
|
647
|
-
lime: [0, 255, 0],
|
|
648
|
-
limegreen: [50, 205, 50],
|
|
649
|
-
linen: [250, 240, 230],
|
|
650
|
-
magenta: [255, 0, 255],
|
|
651
|
-
maroon: [128, 0, 0],
|
|
652
|
-
mediumaquamarine: [102, 205, 170],
|
|
653
|
-
mediumblue: [0, 0, 205],
|
|
654
|
-
mediumorchid: [186, 85, 211],
|
|
655
|
-
mediumpurple: [147, 112, 219],
|
|
656
|
-
mediumseagreen: [60, 179, 113],
|
|
657
|
-
mediumslateblue: [123, 104, 238],
|
|
658
|
-
mediumspringgreen: [0, 250, 154],
|
|
659
|
-
mediumturquoise: [72, 209, 204],
|
|
660
|
-
mediumvioletred: [199, 21, 133],
|
|
661
|
-
midnightblue: [25, 25, 112],
|
|
662
|
-
mintcream: [245, 255, 250],
|
|
663
|
-
mistyrose: [255, 228, 225],
|
|
664
|
-
moccasin: [255, 228, 181],
|
|
665
|
-
navajowhite: [255, 222, 173],
|
|
666
|
-
navy: [0, 0, 128],
|
|
667
|
-
oldlace: [253, 245, 230],
|
|
668
|
-
olive: [128, 128, 0],
|
|
669
|
-
olivedrab: [107, 142, 35],
|
|
670
|
-
orange: [255, 165, 0],
|
|
671
|
-
orangered: [255, 69, 0],
|
|
672
|
-
orchid: [218, 112, 214],
|
|
673
|
-
palegoldenrod: [238, 232, 170],
|
|
674
|
-
palegreen: [152, 251, 152],
|
|
675
|
-
paleturquoise: [175, 238, 238],
|
|
676
|
-
palevioletred: [219, 112, 147],
|
|
677
|
-
papayawhip: [255, 239, 213],
|
|
678
|
-
peachpuff: [255, 218, 185],
|
|
679
|
-
peru: [205, 133, 63],
|
|
680
|
-
pink: [255, 192, 203],
|
|
681
|
-
plum: [221, 160, 221],
|
|
682
|
-
powderblue: [176, 224, 230],
|
|
683
|
-
purple: [128, 0, 128],
|
|
684
|
-
rebeccapurple: [102, 51, 153],
|
|
685
|
-
red: [255, 0, 0],
|
|
686
|
-
rosybrown: [188, 143, 143],
|
|
687
|
-
royalblue: [65, 105, 225],
|
|
688
|
-
saddlebrown: [139, 69, 19],
|
|
689
|
-
salmon: [250, 128, 114],
|
|
690
|
-
sandybrown: [244, 164, 96],
|
|
691
|
-
seagreen: [46, 139, 87],
|
|
692
|
-
seashell: [255, 245, 238],
|
|
693
|
-
sienna: [160, 82, 45],
|
|
694
|
-
silver: [192, 192, 192],
|
|
695
|
-
skyblue: [135, 206, 235],
|
|
696
|
-
slateblue: [106, 90, 205],
|
|
697
|
-
slategray: [112, 128, 144],
|
|
698
|
-
slategrey: [112, 128, 144],
|
|
699
|
-
snow: [255, 250, 250],
|
|
700
|
-
springgreen: [0, 255, 127],
|
|
701
|
-
steelblue: [70, 130, 180],
|
|
702
|
-
tan: [210, 180, 140],
|
|
703
|
-
teal: [0, 128, 128],
|
|
704
|
-
thistle: [216, 191, 216],
|
|
705
|
-
tomato: [255, 99, 71],
|
|
706
|
-
turquoise: [64, 224, 208],
|
|
707
|
-
violet: [238, 130, 238],
|
|
708
|
-
wheat: [245, 222, 179],
|
|
709
|
-
white: [255, 255, 255],
|
|
710
|
-
whitesmoke: [245, 245, 245],
|
|
711
|
-
yellow: [255, 255, 0],
|
|
712
|
-
yellowgreen: [154, 205, 50]
|
|
713
|
-
};
|
|
714
|
-
for (const key in colors) Object.freeze(colors[key]);
|
|
715
|
-
var color_name_default = Object.freeze(colors);
|
|
716
|
-
|
|
717
|
-
// node_modules/color-name-to-code/dist/color-names.js
|
|
718
|
-
var colorNames = color_name_default;
|
|
719
|
-
|
|
720
|
-
// node_modules/color-name-to-code/dist/color-array-to-hex.js
|
|
721
|
-
var colorArrayToHexDefaultOptions = {
|
|
722
|
-
hash: true,
|
|
723
|
-
lowercase: false,
|
|
724
|
-
short: false
|
|
725
|
-
};
|
|
726
|
-
function colorArrayToHex(arr, partialOptions) {
|
|
727
|
-
const options = __spreadValues(__spreadValues({}, colorArrayToHexDefaultOptions), partialOptions);
|
|
728
|
-
const { hash, lowercase, short } = options;
|
|
729
|
-
let hex = arr.map((num) => {
|
|
730
|
-
let str = num.toString(16);
|
|
731
|
-
str = str.length === 1 ? `0${str}` : str;
|
|
732
|
-
return str;
|
|
733
|
-
}).join("");
|
|
734
|
-
if (short) {
|
|
735
|
-
const chars = [...hex];
|
|
736
|
-
if (chars[0] === chars[1] && chars[2] === chars[3] && chars[4] === chars[5]) {
|
|
737
|
-
hex = `${chars[0]}${chars[2]}${chars[4]}`;
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
hex = lowercase ? hex.toLowerCase() : hex.toUpperCase();
|
|
741
|
-
if (hash) {
|
|
742
|
-
hex = `#${hex}`;
|
|
743
|
-
}
|
|
744
|
-
return hex;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
// node_modules/color-name-to-code/dist/color-array-to-rgb.js
|
|
748
|
-
function colorArrayToRGB(arr, alpha = 1) {
|
|
749
|
-
alpha = Math.min(1, Math.max(0, alpha));
|
|
750
|
-
if (alpha < 1) {
|
|
751
|
-
return `rgba(${arr[0]}, ${arr[1]}, ${arr[2]}, ${alpha})`;
|
|
752
|
-
}
|
|
753
|
-
return `rgb(${arr[0]}, ${arr[1]}, ${arr[2]})`;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
// node_modules/color-name-to-code/dist/color-name-to-code.js
|
|
757
|
-
var colorNameToCodeDefaultOptions = __spreadProps(__spreadValues({}, colorArrayToHexDefaultOptions), {
|
|
758
|
-
fallback: true,
|
|
759
|
-
alpha: 1,
|
|
760
|
-
format: ColorCodeFormat.Hex
|
|
761
|
-
});
|
|
762
|
-
function colorNameToCode(value, partialOptions = {}) {
|
|
763
|
-
const options = __spreadValues(__spreadValues({}, colorNameToCodeDefaultOptions), partialOptions);
|
|
764
|
-
const { fallback, format, hash, lowercase, short, alpha } = options;
|
|
765
|
-
value = `${value}`;
|
|
766
|
-
const colorName = value.toLowerCase().replaceAll(/[^a-z]/g, "");
|
|
767
|
-
let colorArray = colorNames[colorName];
|
|
768
|
-
if (!colorArray) {
|
|
769
|
-
if (!fallback) {
|
|
770
|
-
throw new Error(`no matching color found for '${value}'`);
|
|
771
|
-
}
|
|
772
|
-
const hex = value.toLowerCase().replaceAll(/[^\da-f]/g, "");
|
|
773
|
-
colorArray = (hex.length <= 3 ? [hex.slice(0, 1).repeat(2), hex.slice(1, 2).repeat(2), hex.slice(2, 3).repeat(2)] : [hex.slice(0, 2), hex.slice(2, 4), hex.slice(4, 6)]).map((str) => Number.parseInt(str.length < 2 ? `${"0".repeat(2 - str.length)}${str}` : str, 16));
|
|
774
|
-
}
|
|
775
|
-
switch (format) {
|
|
776
|
-
case ColorCodeFormat.Array: {
|
|
777
|
-
return [...colorArray];
|
|
778
|
-
}
|
|
779
|
-
case ColorCodeFormat.RGB: {
|
|
780
|
-
return colorArrayToRGB(colorArray, alpha);
|
|
781
|
-
}
|
|
782
|
-
default: {
|
|
783
|
-
return colorArrayToHex(colorArray, { hash, lowercase, short });
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
// src/score/engine/assets/G-clef.png
|
|
789
|
-
var G_clef_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAACWCAYAAACCe+v6AAADHXpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHja7ZZRcu0mDIbfWUWXgCSExHIwmJnu4C6/Pxg7J2kyTdv7GJhjsJCF0CfZJ5y//hzhDzRK5iGpeS45R7RUUuGKicerHetKMa3ratL2Gr2Xh5L3AkMkU/O6LbzlJ+SY074vexO69W9D94QqZvq2UOuWH+/lxzbI/tHQ9kDo2jn2/cA2JLw9Std92x7l4vbuaH2fGYqXyN9+SYyzZrKEa+JolgvmzjEZ4tmno6NxWYb0CugjuO9vVYZPfApJxFUkXV7K/IlUjBlXrAYokhhuFMK5UF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MiCiAgICAgIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkdpbXAgMi4xMCAoV2luZG93cykiCiAgICAgIHN0RXZ0OndoZW49IjIwMjItMDktMTFUMTY6MzU6MDAiLz4KICAgICA8cmRmOmxpCiAgICAgIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiCiAgICAgIHN0RXZ0OmNoYW5nZWQ9Ii8iCiAgICAgIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6MTBmYmEwYTMtOTI5Yi00NTRlLThjNGMtOGVkOGM4YWJhZGRjIgogICAgICBzdEV2dDpzb2Z0d2FyZUFnZW50PSJHaW1wIDIuMTAgKFdpbmRvd3MpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA2LTEwVDE3OjUwOjA5Ii8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Ppn4NIQAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfnBgoOMgm5WlWBAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAACHtJREFUeNrtnXuQVmMcxz+77cauTWUpbGSVu2w3BpnUEBq3chkmBjGayG1GBuNWLtUgw5SJkBkjl4QKg1wyQyarK0lRSlstU20bWam9+OM8O3P6vc8553nOe97tnO18Z84f57zP7XvOc/ndnueFfQx5e6neUmAI0B3oDPwD/AJ8Dvzcml5we+Al4D+gyeOaB1S0BrLHAut9iLqvf4ERSSZbBmwwJOu+RieV8JwQZJuARjXWE4WBIck2X38AByaJ8MwsCTcBTyWFbCFQFwHhv4DiKBqUn2PCPYEin9+bgI3AUuBPn3TtgMuT8IWv8vlq7wLdRPrTgPke6d9JAuFbPBo/3UfKK1TCh8yzIQmEb/cYjx0C8pUDuzV5D477GN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GGRvqPSZYPQIeAF7DXC/bE3fJsY2eWsvCEuhMtC9oouAROgPPxveVwIN4TM53f08tnifgfmh/nmnPC6kPk2+fx2k7ifpWb4WKAT9mG+foFvMqqvkRj+pYntFp0HPMrZj8wg1VieEd8Tc6NdFXr3TCFOgLc77TZifE7AaAOyv+MY9iS64pxBK7vyJXHWcLy8eu4T0dybo9vhBMBMJvMwwEbgzqSodnfhvxOtDieQzOv3ncRkE7UNytV4tJ295+LsnUgsugKPAt/jvQm7DmcX2+Bcj7eWRjFwAo4rtYOa1avUMrSTFClSpEiRIkWKFClSpEiRIkWKFClSpEiRIkWKFClSpEiRIgL8D6ed2EKeJMaTAAAAAElFTkSuQmCC";
|
|
341
|
+
// src/score/engine/assets/G-clef.png
|
|
342
|
+
var G_clef_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAACWCAYAAACCe+v6AAADHXpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHja7ZZRcu0mDIbfWUWXgCSExHIwmJnu4C6/Pxg7J2kyTdv7GJhjsJCF0CfZJ5y//hzhDzRK5iGpeS45R7RUUuGKicerHetKMa3ratL2Gr2Xh5L3AkMkU/O6LbzlJ+SY074vexO69W9D94QqZvq2UOuWH+/lxzbI/tHQ9kDo2jn2/cA2JLw9Std92x7l4vbuaH2fGYqXyN9+SYyzZrKEa+JolgvmzjEZ4tmno6NxWYb0CugjuO9vVYZPfApJxFUkXV7K/IlUjBlXrAYokhhuFMK5UFbgI1DCBXha9kY1PsF8jc1bjL5o3zlWxCbjnMov1J7xQ97k/HnePLOdBg81z3tB3mON+Rk/lZPehu4Fefbh1529PTu/k4vE9BqK8Ip7jO5jHRqnqCkjFnkf6j7KmkHvmFFcT2V0izkgax2T2Qu6xxobcqrHhko7MC/EoDsoUadKg841NmpwMfHJhpG5BZYldEAq3GQmQ5qdBpsU6eLImHblkPDjC61ty9qukcceYieoMsEY4ZH/3MN3FceYtUQU/YoT0gJ+8axOeBEJ+OcANTCgs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yi00NTRlLThjNGMtOGVkOGM4YWJhZGRjIgogICAgICBzdEV2dDpzb2Z0d2FyZUFnZW50PSJHaW1wIDIuMTAgKFdpbmRvd3MpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA2LTEwVDE3OjUwOjA5Ii8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/Ppn4NIQAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfnBgoOMgm5WlWBAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAACHtJREFUeNrtnXuQVmMcxz+77cauTWUpbGSVu2w3BpnUEBq3chkmBjGayG1GBuNWLtUgw5SJkBkjl4QKg1wyQyarK0lRSlstU20bWam9+OM8O3P6vc8553nOe97tnO18Z84f57zP7XvOc/ndnueFfQx5e6neUmAI0B3oDPwD/AJ8Dvzcml5we+Al4D+gyeOaB1S0BrLHAut9iLqvf4ERSSZbBmwwJOu+RieV8JwQZJuARjXWE4WBIck2X38AByaJ8MwsCTcBTyWFbCFQFwHhv4DiKBqUn2PCPYEin9+bgI3AUuBPn3TtgMuT8IWv8vlq7wLdRPrTgPke6d9JAuFbPBo/3UfKK1TCh8yzIQmEb/cYjx0C8pUDuzV5D477GN6mefY+UBuQby0wV/O8U9wJr9E8W2iY92vNs45xJ6zTfKoN827UPNsdd8K1SlJyo8Awb7XhEIkVYYAVmjXVBPtr1uyqJBBeLu5LDPMdppkPdiaRcHvDfKeJ+++SIFoCLBP3R1toWW58lhQFogiodwkPlYZf1y1w/AcclCQVcYWQtILwqiA8M2lGgDcFgSN90nbXiJUXRdWQ/BYiLMdxH5+0k8VavRb4JGmEl4j7vh7pRgDni2fj1RyQKBwiuqjui/Un015dBbQloXCbaTdrZuUajT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bcj7eWRjFwAo4rtYOa1avUMrSTFClSpEiRIkWKFClSpEiRIkWKFClSpEiRIkWKFClSpEiRIgL8D6ed2EKeJMaTAAAAAElFTkSuQmCC";
|
|
790
343
|
|
|
791
344
|
// src/score/engine/assets/F-clef.png
|
|
792
345
|
var F_clef_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAABGCAYAAACQRffVAAADInpUWHRSYXcgcHJvZmlsZSB0eXBlIGV4aWYAAHja7VdbktwgDPznFDkCkgCJ4/AwVblBjp8GY+/OZFPZPD7yMVADWIiWUEt2jTu+fR3uCxplTi5EtZRT8mghh8wFC/Nnq2skH9a4mrS9R49yF9LeYIhkap6Pmbf8gBxr2s95G6FL/wK6FlSwim8bpWx5fZTXDcj2DLQ3hE7Lvu8DG0h4exTO57Y9Stn04Wp93xmKp8jefkGUU0ykAWNgr5oy1sY+KOLZp6PcznP31S7B9XypMnziQ0g8RpFweinzJ1IwJ4wk4qA4hUXiGlmWGTiUEG4Fbj6BR/F3MN/H5i1GP2mfuZaHkXFM5XdXu+envOn147y5VzsN3JU3lvaGPNLq0z1/KKd4AV0bctvh95at3ZYf5ENWdt3Nvad7jG5jXRq3KCEhFmlf6rrKWkGvziiuUwldfXLANSxmz+jmi2/Iqe4bKq1inYnB/aBAnQoNOtbcqMHFwAcrZubmWJbQQFLmhlQgCbPTYJUsXQwp0c4cEr59oWU2L3ONzHfnO0GVCWCEI3/c3WcVx5i1ROTtjBM8g188qxNeeAL9c4IaGKGxgxpXgK/+3CavAgbjCrPhgsVXd0LUSG/JJYvoSW/EfFY9ad8ACBFMRzhDAgZ8IomU4JEyKxECaSCowHWWwBUMUIzc4SQHkQRyUB2wjTNKS5Ujn2K8VSU4FGsSBTdZCsgKISJ/NBhyqESJIcaYokaLOZYkaVZeSprm67moaNCoSVXNadZiYsGiJVMzy1YyZ8HrO2bUabaccykwWoBccLpAoZTKVWqosaaq1Wp2tTSkTwstttS0WcutdO7SUeA9de3Wcy8HHUilIxzx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3RhbmNlSUQ9InhtcC5paWQ6MDBmYjM4YTMtZjZiMi00NjQ1LTliMTYtMjlhNWE0ODZlMjhhIgogICAgICBzdEV2dDpzb2Z0d2FyZUFnZW50PSJHaW1wIDIuMTAgKFdpbmRvd3MpIgogICAgICBzdEV2dDp3aGVuPSIyMDIzLTA2LTEzVDAyOjUyOjI3Ii8+CiAgICA8L3JkZjpTZXE+CiAgIDwveG1wTU06SGlzdG9yeT4KICA8L3JkZjpEZXNjcmlwdGlvbj4KIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAKPD94cGFja2V0IGVuZD0idyI/PsIRrtIAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfnBgwXNBsqJURsAAAAGXRFWHRDb21tZW50AENyZWF0ZWQgd2l0aCBHSU1QV4EOFwAABF9JREFUeNrtmluIF1Ucxz9/E8P1VnnJ9dJWC4Frmq2JJmqolGEILoQvK2gZeXlRCSm1Fx9UEsJQERWsXhRftECs0Gq70EK9ZHlbFyHbds3VVXFX91+7664P81tYhpnfmft//st84TzMzDm/8/vOnPO7nYEMGTJkyJAhQ4YMGSJBLkJZw4FyYAIwDHgU+A9oAxqBv4C7xfyySoBlwKfAFaAb6DG0euAzoAoYXCxEnwH2A60eCGrtFrALGJNWokNEwY6QRO2tFXgPGJAmss8DlyImam/fASPTQHaeGJueBFod8FQhrfSLwM+ynDX8L1/oV+BP4LZY58eBUUAlMB94ycPSvQTMERmJ4jGgwYPh2Qg84VFmGbAP6DTI/aoQS/lzg1JfA2MDyn4ZuGaQvyZJspUGv3oKGBhyjmeBJmWOmxLMJIITiiIXIgwaZgFdylxbDeNHANXAZmAVUBpEiScNe2xRxC/3Y2WuRmUlLRHD1rd/HljvV4F3FAVqYlhNo4B7Pl/wdPEMbmOq/ShwRBH0Vkxb6LAy536fW64HuOpn8vOKoLKYCC9Q5rzs0L/JQxDjyYPkgHYXAW0xGslByrLuFuPUFw0eCI92mmiAQ4LgZoEbYyTcAZxVPsJk271ag7x6cWueCLvhfsyu8LzybKLtersUF9ywxe2BnXBnAZOUJuXZeNv1OSki3LLdzwPrgONuguw+7g7wAHjEoW+vEagAXgeelr1yUSZoCUn4hvJsqMO9byRaWyLGtFkiwOtBJnYzBKcVg/ZuSMIrlHl3RrWMnFK1OqX/q8oXOAisDqFLVxL7xonw9yHk7Q5RoxpuyLdjI3wmhLzBwMqAY0ck4SGcCNeKIQqKOTF84RtxEu4BPgohc2QM467HSRjgqBL5mBDUPU1Rnl1JwqBNUuJqrW0M+OLdYuk8Cdas38Rf4b3FR0HP/nLdZNYaioKbxSVuA6ZGQfoNvNWlO6VvEKxW5O5yGbNc4ml7ZrUtCtLjgGMSdjop9Q+wMIT8GoXwKw79ZxrKUG9r+a8flMoyr5AA4ybwo1QgggYHpZJ6Ou3Ta5IpddvufwEsVWQ2xFisCI1Nypf6RMmsIql4JI0S8bFuSs9UvmCgikeh8b6i8C/KuKOYD+VShzGSwLsprRnByYYYoSqNhE8qCv/kYfxrYjT7jmuPIC+PBWsVsl1YRzBeE45qqWGtwjo1SR0WoZ8a7KAfYa5h7/2OVaPuF1gqtS83srclpi565IAP0c+b7wOz+wPZckOc3Jt0LC52oiXABx7y6VasGnfRYgiwwRAu9raGqPLXQmAGcADvvyN+m9bgXnP4i4E9wN8+KiJ5WQG5QilumnioJP9lwHPANKw/fF7A+fxJw2ms/y9SFdiPBf4Vn9hJNL8T/iFxbyoxgej+m6zBOtnLpXlvhiXcDOyVJV8UCEL4KnBI/OnAtBP0q+ADMTq/SfshrdUFr4TzwJdY9d57WIdYzRIk1GMdeXSQIUOGDBmSwUMtd8u2ArdcUAAAAABJRU5ErkJggg==";
|
|
@@ -798,14 +351,6 @@ var ImageData = new UniMap([
|
|
|
798
351
|
]);
|
|
799
352
|
var getImageData = (asset) => ImageData.getOrDefault(asset, "");
|
|
800
353
|
var ImageCache = new BiMap();
|
|
801
|
-
function colorNameToRGBA(name, alpha = 1) {
|
|
802
|
-
const hex = colorNameToCode(name).replace("#", "");
|
|
803
|
-
const r = parseInt(hex.slice(0, 2), 16);
|
|
804
|
-
const g = parseInt(hex.slice(2, 4), 16);
|
|
805
|
-
const b = parseInt(hex.slice(4, 6), 16);
|
|
806
|
-
const a = Math.round(alpha * 255);
|
|
807
|
-
return [r, g, b, a];
|
|
808
|
-
}
|
|
809
354
|
function staffPosEquals(a, b) {
|
|
810
355
|
if (!a && !b) return true;
|
|
811
356
|
else if (!a || !b) return false;
|
|
@@ -827,6 +372,7 @@ var RenderContext = class {
|
|
|
827
372
|
__publicField(this, "canvas");
|
|
828
373
|
__publicField(this, "ctx");
|
|
829
374
|
__publicField(this, "mdoc");
|
|
375
|
+
__publicField(this, "paint", Paint.default);
|
|
830
376
|
__publicField(this, "cursorRect");
|
|
831
377
|
__publicField(this, "mousePos");
|
|
832
378
|
// Mouse coord in document space
|
|
@@ -879,12 +425,13 @@ var RenderContext = class {
|
|
|
879
425
|
}
|
|
880
426
|
onImageLoaded(data) {
|
|
881
427
|
if (data.loaded || !data.img) return;
|
|
882
|
-
|
|
428
|
+
const color = this.paint.getColor(data.color);
|
|
429
|
+
if (data.colorized || color === "" || color === "black" || color === "#000" || color === "#0000" || color === "#000000" || color === "#00000000") {
|
|
883
430
|
this.forceDraw();
|
|
884
431
|
data.loaded = true;
|
|
885
432
|
return;
|
|
886
433
|
}
|
|
887
|
-
const [nr, ng, nb, na] = colorNameToRGBA(
|
|
434
|
+
const [nr, ng, nb, na] = Paint.colorNameToRGBA(color);
|
|
888
435
|
const threshold = 40;
|
|
889
436
|
if (typeof document === "undefined") {
|
|
890
437
|
console.error("Failed to colorize image: document is undefined.");
|
|
@@ -934,6 +481,12 @@ var RenderContext = class {
|
|
|
934
481
|
mdoc.getMusicObject().setRenderContext(this);
|
|
935
482
|
}
|
|
936
483
|
}
|
|
484
|
+
setPaint(paint) {
|
|
485
|
+
this.paint = paint != null ? paint : Paint.default;
|
|
486
|
+
}
|
|
487
|
+
getPaint() {
|
|
488
|
+
return this.paint;
|
|
489
|
+
}
|
|
937
490
|
setCanvas(canvas) {
|
|
938
491
|
var _a, _b;
|
|
939
492
|
if (this.canvas !== canvas) {
|
|
@@ -1086,7 +639,7 @@ var RenderContext = class {
|
|
|
1086
639
|
if (!staff) {
|
|
1087
640
|
return;
|
|
1088
641
|
}
|
|
1089
|
-
this.fillColor(
|
|
642
|
+
this.fillColor(this.paint.colors["hilight.staffpos"]);
|
|
1090
643
|
this.fillRect(staff.row.getRect().left, staff.getDiatonicIdY(diatonicId) - unitSize, staff.row.getRect().width, 2 * unitSize);
|
|
1091
644
|
if (mousePos !== void 0) {
|
|
1092
645
|
this.drawLedgerLines(staff, diatonicId, mousePos.x);
|
|
@@ -1098,13 +651,13 @@ var RenderContext = class {
|
|
|
1098
651
|
return;
|
|
1099
652
|
}
|
|
1100
653
|
let rect = hilightedObj.getRect();
|
|
1101
|
-
this.lineColor(
|
|
654
|
+
this.lineColor(this.paint.colors["hilight.object"]);
|
|
1102
655
|
this.strokeRect(rect.left, rect.top, rect.width, rect.height);
|
|
1103
656
|
}
|
|
1104
657
|
drawPlayCursor() {
|
|
1105
658
|
let { cursorRect: r } = this;
|
|
1106
659
|
if (r) {
|
|
1107
|
-
this.color(
|
|
660
|
+
this.color(this.paint.colors["play.cursor"]).lineWidth(2).strokeLine(r.centerX, r.top, r.centerX, r.bottom);
|
|
1108
661
|
}
|
|
1109
662
|
}
|
|
1110
663
|
txFromScreenCoord(screenCoord) {
|
|
@@ -1115,7 +668,7 @@ var RenderContext = class {
|
|
|
1115
668
|
}
|
|
1116
669
|
clearCanvas() {
|
|
1117
670
|
if (this.ctx) {
|
|
1118
|
-
this.ctx.canvas.style.background =
|
|
671
|
+
this.ctx.canvas.style.background = this.getPaint().colors["background"];
|
|
1119
672
|
this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);
|
|
1120
673
|
}
|
|
1121
674
|
}
|
|
@@ -1259,15 +812,16 @@ var RenderContext = class {
|
|
|
1259
812
|
this.stroke();
|
|
1260
813
|
}
|
|
1261
814
|
color(color) {
|
|
1262
|
-
if (this.ctx)
|
|
815
|
+
if (this.ctx)
|
|
816
|
+
this.ctx.strokeStyle = this.ctx.fillStyle = this.paint.getColor(color);
|
|
1263
817
|
return this;
|
|
1264
818
|
}
|
|
1265
819
|
lineColor(color) {
|
|
1266
|
-
if (this.ctx) this.ctx.strokeStyle = color;
|
|
820
|
+
if (this.ctx) this.ctx.strokeStyle = this.paint.getColor(color);
|
|
1267
821
|
return this;
|
|
1268
822
|
}
|
|
1269
823
|
fillColor(color) {
|
|
1270
|
-
if (this.ctx) this.ctx.fillStyle = color;
|
|
824
|
+
if (this.ctx) this.ctx.fillStyle = this.paint.getColor(color);
|
|
1271
825
|
return this;
|
|
1272
826
|
}
|
|
1273
827
|
lineWidth(lineWidth) {
|
|
@@ -1735,7 +1289,7 @@ var ObjStaffSignature = class extends MusicObject {
|
|
|
1735
1289
|
}
|
|
1736
1290
|
updateClefImage(ctx, showClef) {
|
|
1737
1291
|
if (showClef) {
|
|
1738
|
-
let color =
|
|
1292
|
+
let color = ctx.getPaint().getColor(colorKey("staff.signature.clef"));
|
|
1739
1293
|
if (["black", "#000", "#000000"].includes(color))
|
|
1740
1294
|
color = "";
|
|
1741
1295
|
let img = ctx.getImageAsset(this.staff.clefImageAsset, color);
|
|
@@ -1747,7 +1301,7 @@ var ObjStaffSignature = class extends MusicObject {
|
|
|
1747
1301
|
}
|
|
1748
1302
|
updateMeasureNumber(showMeasureNumber) {
|
|
1749
1303
|
if (showMeasureNumber) {
|
|
1750
|
-
let color =
|
|
1304
|
+
let color = colorKey("staff.signature.measurenum");
|
|
1751
1305
|
let text = this.measure.getMeasureNumber().toString();
|
|
1752
1306
|
this.measureNumber = new ObjText(this, { text, color }, 0, 1);
|
|
1753
1307
|
} else {
|
|
@@ -1757,7 +1311,7 @@ var ObjStaffSignature = class extends MusicObject {
|
|
|
1757
1311
|
updateKeySignature(showKeySignature) {
|
|
1758
1312
|
if (showKeySignature) {
|
|
1759
1313
|
let { measure } = this;
|
|
1760
|
-
let color =
|
|
1314
|
+
let color = colorKey("staff.signature.key");
|
|
1761
1315
|
let prevMeasure = measure.getPrevMeasure();
|
|
1762
1316
|
let prevKeySignature = prevMeasure ? prevMeasure.getKeySignature() : void 0;
|
|
1763
1317
|
let newKeySignature = measure.getKeySignature();
|
|
@@ -1779,7 +1333,7 @@ var ObjStaffSignature = class extends MusicObject {
|
|
|
1779
1333
|
updateTimeSignature(showTimeSignature) {
|
|
1780
1334
|
if (showTimeSignature) {
|
|
1781
1335
|
let timeSignature = this.measure.getTimeSignature();
|
|
1782
|
-
let color =
|
|
1336
|
+
let color = colorKey("staff.signature.time");
|
|
1783
1337
|
let beatCount = timeSignature.beatCount.toString();
|
|
1784
1338
|
this.beatCountText = new ObjText(this, { text: beatCount, color, scale: 1.4 }, 0.5, 0.5);
|
|
1785
1339
|
let beatSize = timeSignature.beatSize.toString();
|
|
@@ -1790,7 +1344,7 @@ var ObjStaffSignature = class extends MusicObject {
|
|
|
1790
1344
|
}
|
|
1791
1345
|
updateTempo(showTempo) {
|
|
1792
1346
|
if (showTempo) {
|
|
1793
|
-
let color =
|
|
1347
|
+
let color = colorKey("staff.signature.tempo");
|
|
1794
1348
|
let text = getTempoString(this.measure.getTempo());
|
|
1795
1349
|
this.tempoText = new ObjText(this, { text, color }, 0.5, 1);
|
|
1796
1350
|
} else {
|
|
@@ -2002,7 +1556,7 @@ var ObjTabSignature = class extends MusicObject {
|
|
|
2002
1556
|
}
|
|
2003
1557
|
updateMeasureNumber(showMeasureNumber) {
|
|
2004
1558
|
if (showMeasureNumber) {
|
|
2005
|
-
let color =
|
|
1559
|
+
let color = colorKey("tab.signature.measurenum");
|
|
2006
1560
|
let text = this.measure.getMeasureNumber().toString();
|
|
2007
1561
|
this.measureNumber = new ObjText(this, { text, color }, 0, 1);
|
|
2008
1562
|
} else {
|
|
@@ -2012,7 +1566,7 @@ var ObjTabSignature = class extends MusicObject {
|
|
|
2012
1566
|
updateTimeSignature(showTimeSignature) {
|
|
2013
1567
|
if (showTimeSignature) {
|
|
2014
1568
|
let timeSignature = this.measure.getTimeSignature();
|
|
2015
|
-
let color =
|
|
1569
|
+
let color = colorKey("tab.signature.time");
|
|
2016
1570
|
let beatCount = timeSignature.beatCount.toString();
|
|
2017
1571
|
this.beatCountText = new ObjText(this, { text: beatCount, color, scale: 1.4 }, 0.5, 0.5);
|
|
2018
1572
|
let beatSize = timeSignature.beatSize.toString();
|
|
@@ -2023,7 +1577,7 @@ var ObjTabSignature = class extends MusicObject {
|
|
|
2023
1577
|
}
|
|
2024
1578
|
updateTempo(showTempo) {
|
|
2025
1579
|
if (showTempo) {
|
|
2026
|
-
let color =
|
|
1580
|
+
let color = colorKey("tab.signature.tempo");
|
|
2027
1581
|
let text = getTempoString(this.measure.getTempo());
|
|
2028
1582
|
this.tempoText = new ObjText(this, { text, color }, 0, 1);
|
|
2029
1583
|
} else {
|
|
@@ -2256,7 +1810,7 @@ var _ObjRest = class _ObjRest extends MusicObject {
|
|
|
2256
1810
|
}
|
|
2257
1811
|
this.runningDiatonicId = this.setDiatonicId;
|
|
2258
1812
|
this.runningStemDir = "up" /* Up */;
|
|
2259
|
-
this.color = (_c = options == null ? void 0 : options.color) != null ? _c :
|
|
1813
|
+
this.color = (_c = options == null ? void 0 : options.color) != null ? _c : colorKey("staff.rest");
|
|
2260
1814
|
this.hide = (_d = options == null ? void 0 : options.hide) != null ? _d : false;
|
|
2261
1815
|
this.oldStyleTriplet = tupletRatio === void 0 && NoteLengthProps2.get(noteLength).isTriplet;
|
|
2262
1816
|
this.rhythmProps = RhythmProps2.get(noteLength, void 0, (tupletRatio != null ? tupletRatio : this.oldStyleTriplet) ? Tuplet.Triplet : void 0);
|
|
@@ -2572,7 +2126,7 @@ var ObjNoteGroup = class _ObjNoteGroup extends MusicObject {
|
|
|
2572
2126
|
this.runningDiatonicId = this.setDiatonicId;
|
|
2573
2127
|
this.runningStemDir = "up" /* Up */;
|
|
2574
2128
|
this.runningStringNumbers = [];
|
|
2575
|
-
this.color = (_a = options == null ? void 0 : options.color) != null ? _a :
|
|
2129
|
+
this.color = (_a = options == null ? void 0 : options.color) != null ? _a : colorKey("staff.note");
|
|
2576
2130
|
this.staccato = (_b = options == null ? void 0 : options.staccato) != null ? _b : false;
|
|
2577
2131
|
this.diamond = (_c = options == null ? void 0 : options.diamond) != null ? _c : false;
|
|
2578
2132
|
this.arpeggio = getArpeggio(options == null ? void 0 : options.arpeggio);
|
|
@@ -2956,8 +2510,8 @@ var ObjNoteGroup = class _ObjNoteGroup extends MusicObject {
|
|
|
2956
2510
|
return;
|
|
2957
2511
|
}
|
|
2958
2512
|
let obj = new ObjTabNoteGroup(tab, this);
|
|
2959
|
-
const bgcolor =
|
|
2960
|
-
const color =
|
|
2513
|
+
const bgcolor = colorKey("background");
|
|
2514
|
+
const color = colorKey("tab.note");
|
|
2961
2515
|
this.notes.forEach((note, noteIndex) => {
|
|
2962
2516
|
let stringNumber = this.runningStringNumbers[noteIndex];
|
|
2963
2517
|
if (guard_exports.isIntegerBetween(stringNumber, 1, 6)) {
|
|
@@ -3421,7 +2975,7 @@ var ObjRhythmColumn = class extends MusicObject {
|
|
|
3421
2975
|
this.rect.offsetInPlace(dx, dy);
|
|
3422
2976
|
}
|
|
3423
2977
|
draw(ctx) {
|
|
3424
|
-
ctx.color(
|
|
2978
|
+
ctx.color(colorKey("staff.frame"));
|
|
3425
2979
|
this.row.getStaves().forEach((staff) => {
|
|
3426
2980
|
let minDiatonicId = this.staffMinDiatonicId.get(staff);
|
|
3427
2981
|
let maxDiatonicId = this.staffMaxDiatonicId.get(staff);
|
|
@@ -5168,10 +4722,8 @@ var ObjConnective = class extends MusicObject {
|
|
|
5168
4722
|
ctx.drawDebugRect(rect);
|
|
5169
4723
|
let t = _lineWidth * 1.5;
|
|
5170
4724
|
let s = _lineWidth * 0.25;
|
|
4725
|
+
ctx.color(this.line instanceof ObjTab ? colorKey("tab.connective") : colorKey("staff.connective"));
|
|
5171
4726
|
ctx.lineWidth(1);
|
|
5172
|
-
ctx.color(
|
|
5173
|
-
this.line instanceof ObjTab ? DocumentColor.Tab_Connective : DocumentColor.Staff_Connective
|
|
5174
|
-
);
|
|
5175
4727
|
if (this.arcHeight === 0) {
|
|
5176
4728
|
ctx.beginPath();
|
|
5177
4729
|
ctx.moveTo(this.lx, this.ly);
|
|
@@ -5470,7 +5022,7 @@ var ObjTabRhythm = class extends MusicObject {
|
|
|
5470
5022
|
let colX = sym.col.getRect().anchorX;
|
|
5471
5023
|
if (sym instanceof ObjNoteGroup) {
|
|
5472
5024
|
ctx.lineWidth(1);
|
|
5473
|
-
ctx.color(
|
|
5025
|
+
ctx.color(colorKey("tab.note"));
|
|
5474
5026
|
if (sym.rhythmProps.noteSize >= 2) {
|
|
5475
5027
|
ctx.lineWidth(sym.rhythmProps.noteSize === 4 ? 2 : 1);
|
|
5476
5028
|
ctx.strokeLine(colX, stemBottom, colX, stemTop);
|
|
@@ -5485,7 +5037,7 @@ var ObjTabRhythm = class extends MusicObject {
|
|
|
5485
5037
|
}
|
|
5486
5038
|
} else if (sym instanceof ObjRest) {
|
|
5487
5039
|
ctx.lineWidth(1);
|
|
5488
|
-
ctx.color(
|
|
5040
|
+
ctx.color(colorKey("tab.rest"));
|
|
5489
5041
|
let cx = colX;
|
|
5490
5042
|
let cy = (stemTop + stemBottom) / 2;
|
|
5491
5043
|
let scale = 0.65;
|
|
@@ -5506,7 +5058,7 @@ var ObjTabRhythm = class extends MusicObject {
|
|
|
5506
5058
|
let leftBeamCount = left.hasTuplet() ? 1 : left instanceof ObjNoteGroup ? left.getRightBeamCount() : 1;
|
|
5507
5059
|
let rightBeamCount = right.hasTuplet() ? 1 : right instanceof ObjNoteGroup ? right.getLeftBeamCount() : 1;
|
|
5508
5060
|
let maxBeamCount = Math.max(leftBeamCount, rightBeamCount);
|
|
5509
|
-
ctx.color(
|
|
5061
|
+
ctx.color(colorKey("tab.note"));
|
|
5510
5062
|
ctx.lineWidth(2);
|
|
5511
5063
|
for (let i = 0; i < maxBeamCount; i++) {
|
|
5512
5064
|
let leftT = rightBeamCount > leftBeamCount && i >= leftBeamCount ? 0.75 : 0;
|
|
@@ -5522,7 +5074,7 @@ var ObjTabRhythm = class extends MusicObject {
|
|
|
5522
5074
|
}
|
|
5523
5075
|
}
|
|
5524
5076
|
if (beamGroup && beamGroup.isTuplet()) {
|
|
5525
|
-
ctx.color(
|
|
5077
|
+
ctx.color(colorKey("tab.note"));
|
|
5526
5078
|
let cx = (symbols[0].col.getRect().anchorX + symbols[symbols.length - 1].col.getRect().anchorX) / 2;
|
|
5527
5079
|
let text = beamGroup.getTupletRatioText();
|
|
5528
5080
|
let textObj = this.tupletPartsTextObjMap.get(text);
|
|
@@ -6008,7 +5560,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6008
5560
|
throw new MusicError11(MusicErrorType11.Score, "Cannot add Fermata because anchor is undefined.");
|
|
6009
5561
|
}
|
|
6010
5562
|
this.forEachStaffGroup(staffTabOrGroups, 0 /* Above */, (line, vpos) => {
|
|
6011
|
-
const color = line instanceof ObjTab ?
|
|
5563
|
+
const color = line instanceof ObjTab ? colorKey("staff.element.fermata") : colorKey("tab.element.fermata");
|
|
6012
5564
|
this.addLayoutObject(new ObjFermata(anchor, vpos, color), line, 1 /* Fermata */, vpos);
|
|
6013
5565
|
});
|
|
6014
5566
|
this.disableExtension();
|
|
@@ -6028,7 +5580,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6028
5580
|
let passages = args;
|
|
6029
5581
|
addLayoutObjectProps = {
|
|
6030
5582
|
createObj: (line) => {
|
|
6031
|
-
const color = line instanceof ObjTab ?
|
|
5583
|
+
const color = line instanceof ObjTab ? colorKey("staff.element.navigation") : colorKey("tab.element.navigation");
|
|
6032
5584
|
return new ObjEnding(anchor, color, passages);
|
|
6033
5585
|
},
|
|
6034
5586
|
layoutGroupId: 4 /* Ending */,
|
|
@@ -6043,7 +5595,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6043
5595
|
let text = getNavigationString(navigation);
|
|
6044
5596
|
addLayoutObjectProps = {
|
|
6045
5597
|
createObj: (line) => {
|
|
6046
|
-
const color = line instanceof ObjTab ?
|
|
5598
|
+
const color = line instanceof ObjTab ? colorKey("staff.element.navigation") : colorKey("tab.element.navigation");
|
|
6047
5599
|
return new ObjText(anchor2, { text, color }, 1, 1);
|
|
6048
5600
|
},
|
|
6049
5601
|
layoutGroupId: 3 /* Navigation */,
|
|
@@ -6058,7 +5610,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6058
5610
|
let text = getNavigationString(navigation);
|
|
6059
5611
|
addLayoutObjectProps = {
|
|
6060
5612
|
createObj: (line) => {
|
|
6061
|
-
const color = line instanceof ObjTab ?
|
|
5613
|
+
const color = line instanceof ObjTab ? colorKey("staff.element.navigation") : colorKey("tab.element.navigation");
|
|
6062
5614
|
return new ObjText(anchor2, { text, color }, 1, 1);
|
|
6063
5615
|
},
|
|
6064
5616
|
layoutGroupId: 3 /* Navigation */,
|
|
@@ -6072,7 +5624,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6072
5624
|
let text = getNavigationString(navigation);
|
|
6073
5625
|
addLayoutObjectProps = {
|
|
6074
5626
|
createObj: (line) => {
|
|
6075
|
-
const color = line instanceof ObjTab ?
|
|
5627
|
+
const color = line instanceof ObjTab ? colorKey("staff.element.navigation") : colorKey("tab.element.navigation");
|
|
6076
5628
|
return new ObjSpecialText(anchor2, text, color);
|
|
6077
5629
|
},
|
|
6078
5630
|
layoutGroupId: 3 /* Navigation */,
|
|
@@ -6085,7 +5637,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6085
5637
|
let text = getNavigationString(navigation);
|
|
6086
5638
|
addLayoutObjectProps = {
|
|
6087
5639
|
createObj: (line) => {
|
|
6088
|
-
const color = line instanceof ObjTab ?
|
|
5640
|
+
const color = line instanceof ObjTab ? colorKey("staff.element.navigation") : colorKey("tab.element.navigation");
|
|
6089
5641
|
return new ObjSpecialText(anchor2, text, color);
|
|
6090
5642
|
},
|
|
6091
5643
|
layoutGroupId: 3 /* Navigation */,
|
|
@@ -6106,7 +5658,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6106
5658
|
const textProps = {
|
|
6107
5659
|
text,
|
|
6108
5660
|
scale: 0.8,
|
|
6109
|
-
color:
|
|
5661
|
+
color: colorKey("staff.frame")
|
|
6110
5662
|
};
|
|
6111
5663
|
this.endRepeatPlayCountText = new ObjText(this, textProps, 0.5, 1);
|
|
6112
5664
|
}
|
|
@@ -6152,7 +5704,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6152
5704
|
const anchorY = getExtensionAnchorY(linePos);
|
|
6153
5705
|
this.disableExtension();
|
|
6154
5706
|
this.forEachStaffGroup(staffTabOrGroups, defaultVerticalPos, (line, vpos) => {
|
|
6155
|
-
const color = line instanceof ObjTab ?
|
|
5707
|
+
const color = line instanceof ObjTab ? colorKey("tab.element.annotation") : colorKey("staff.element.annotation");
|
|
6156
5708
|
textProps.color = color;
|
|
6157
5709
|
let textObj = new ObjText(anchor, textProps, anchorX, anchorY);
|
|
6158
5710
|
const layoutObj = this.addLayoutObject(textObj, line, layoutGroupId, vpos);
|
|
@@ -6181,7 +5733,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6181
5733
|
}
|
|
6182
5734
|
this.disableExtension();
|
|
6183
5735
|
this.forEachStaffGroup(staffTabOrGroups, defaultVerticalPos, (line, vpos) => {
|
|
6184
|
-
const color = line instanceof ObjTab ?
|
|
5736
|
+
const color = line instanceof ObjTab ? colorKey("staff.element.label") : colorKey("tab.element.label");
|
|
6185
5737
|
textProps.color = color;
|
|
6186
5738
|
let textObj = new ObjText(anchor, textProps, 0.5, 1);
|
|
6187
5739
|
const layoutObj = this.addLayoutObject(textObj, line, layoutGroupId, vpos);
|
|
@@ -6543,21 +6095,22 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6543
6095
|
getVoiceSymbols(voiceId) {
|
|
6544
6096
|
return this.voiceSymbols.getAll(voiceId);
|
|
6545
6097
|
}
|
|
6546
|
-
|
|
6547
|
-
if (voiceId ===
|
|
6098
|
+
fillWithRests(...voiceId) {
|
|
6099
|
+
if (voiceId.length === 0) {
|
|
6548
6100
|
if (this.getConsumedTicks() === 0) {
|
|
6549
|
-
this.
|
|
6101
|
+
this.fillWithRests(0);
|
|
6550
6102
|
} else {
|
|
6551
|
-
this.
|
|
6103
|
+
this.fillWithRests(...getVoiceIds().filter((id) => this.getConsumedTicks(id) > 0));
|
|
6552
6104
|
}
|
|
6553
6105
|
return;
|
|
6554
|
-
} else if (
|
|
6555
|
-
voiceId.forEach((id) => this.
|
|
6106
|
+
} else if (voiceId.length > 1) {
|
|
6107
|
+
voiceId.forEach((id) => this.fillWithRests(id));
|
|
6556
6108
|
return;
|
|
6557
6109
|
} else {
|
|
6558
|
-
|
|
6110
|
+
const id = voiceId[0];
|
|
6111
|
+
validateVoiceId(id);
|
|
6559
6112
|
let measureTicks = this.getMeasureTicks();
|
|
6560
|
-
let consumedTicks = this.getConsumedTicks(
|
|
6113
|
+
let consumedTicks = this.getConsumedTicks(id);
|
|
6561
6114
|
let remainingTicks = measureTicks - consumedTicks;
|
|
6562
6115
|
let rests = [];
|
|
6563
6116
|
while (remainingTicks > 0) {
|
|
@@ -6572,7 +6125,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6572
6125
|
}
|
|
6573
6126
|
}
|
|
6574
6127
|
}
|
|
6575
|
-
rests.reverse().forEach((rest) => this.addRest(
|
|
6128
|
+
rests.reverse().forEach((rest) => this.addRest(id, NoteLengthProps5.create(rest.noteLength, rest.dotCount).noteLength));
|
|
6576
6129
|
}
|
|
6577
6130
|
}
|
|
6578
6131
|
requestLayout() {
|
|
@@ -6627,8 +6180,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6627
6180
|
this.row.getTabs().forEach((tab) => {
|
|
6628
6181
|
for (let stringId = 0; stringId < 6; stringId++) {
|
|
6629
6182
|
let note = tab.getTuningStrings()[stringId].format(PitchNotation.Helmholtz, SymbolSet.Unicode);
|
|
6630
|
-
let
|
|
6631
|
-
let obj = new ObjText(this, { text: note, scale: 0.8, color }, 1, 0.5);
|
|
6183
|
+
let obj = new ObjText(this, { text: note, scale: 0.8, color: colorKey("tab.tuning") }, 1, 0.5);
|
|
6632
6184
|
obj.layout(ctx);
|
|
6633
6185
|
obj.setRight(this.regions.tabTuning_0 * 0.8);
|
|
6634
6186
|
obj.setCenterY(tab.getStringY(stringId));
|
|
@@ -6781,11 +6333,11 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6781
6333
|
this.row.getNotationLines().forEach((line) => {
|
|
6782
6334
|
if (line instanceof ObjStaff) {
|
|
6783
6335
|
for (let p = line.bottomLineDiatonicId; p <= line.topLineDiatonicId; p += 2) {
|
|
6784
|
-
drawLine(line.getDiatonicIdY(p),
|
|
6336
|
+
drawLine(line.getDiatonicIdY(p), colorKey("staff.frame"));
|
|
6785
6337
|
}
|
|
6786
6338
|
} else if (line instanceof ObjTab) {
|
|
6787
6339
|
for (let stringId = 0; stringId < 6; stringId++) {
|
|
6788
|
-
drawLine(line.getStringY(stringId),
|
|
6340
|
+
drawLine(line.getStringY(stringId), colorKey("tab.frame"));
|
|
6789
6341
|
}
|
|
6790
6342
|
}
|
|
6791
6343
|
});
|
|
@@ -6796,7 +6348,7 @@ var ObjMeasure = class extends MusicObject {
|
|
|
6796
6348
|
const left2 = this.getStaffLineLeft();
|
|
6797
6349
|
const top = tab.getTopLineY();
|
|
6798
6350
|
const bottom = tab.getBottomLineY();
|
|
6799
|
-
ctx.color(
|
|
6351
|
+
ctx.color(colorKey("tab.frame")).lineWidth(1).strokeLine(left2, top, left2, bottom);
|
|
6800
6352
|
});
|
|
6801
6353
|
}
|
|
6802
6354
|
this.signatures.forEach((signature) => signature.draw(ctx));
|
|
@@ -7031,7 +6583,7 @@ var ObjNotationLine6 = class extends MusicObject {
|
|
|
7031
6583
|
}
|
|
7032
6584
|
}
|
|
7033
6585
|
drawVerticalLine(ctx, left, width, isSystemBarLine = false) {
|
|
7034
|
-
ctx.color(this.getConfig().type === "tab" ?
|
|
6586
|
+
ctx.color(this.getConfig().type === "tab" ? colorKey("tab.frame") : colorKey("staff.frame"));
|
|
7035
6587
|
const i = this.row.getNotationLines().indexOf(this);
|
|
7036
6588
|
const nextLine = i >= 0 ? this.row.getNotationLines()[i + 1] : void 0;
|
|
7037
6589
|
const isGroupLine = this.getRowGroup().lines.length > 1;
|
|
@@ -7324,7 +6876,7 @@ var ObjScoreRowGroup = class extends MusicObject {
|
|
|
7324
6876
|
__publicField(this, "instrText");
|
|
7325
6877
|
__publicField(this, "braceRect", new AnchoredRect());
|
|
7326
6878
|
__publicField(this, "mi");
|
|
7327
|
-
const color =
|
|
6879
|
+
const color = colorKey("rowgroup.instrument");
|
|
7328
6880
|
const instr = parseInstr((_a = lines[0].getConfig().instrument) != null ? _a : "");
|
|
7329
6881
|
this.instrument = instr.instrName;
|
|
7330
6882
|
this.hasBrace = instr.hideBrace ? false : this.hasInstrument && lines.length >= 2;
|
|
@@ -7379,7 +6931,7 @@ var ObjScoreRowGroup = class extends MusicObject {
|
|
|
7379
6931
|
this.instrText.draw(ctx);
|
|
7380
6932
|
if (this.hasBrace) {
|
|
7381
6933
|
const r = this.braceRect;
|
|
7382
|
-
ctx.color(
|
|
6934
|
+
ctx.color(colorKey("rowgroup.frame")).lineWidth(1).drawBracket(r, "{");
|
|
7383
6935
|
}
|
|
7384
6936
|
}
|
|
7385
6937
|
};
|
|
@@ -7757,12 +7309,9 @@ var ObjHeader = class extends MusicObject {
|
|
|
7757
7309
|
__publicField(this, "arrangerText");
|
|
7758
7310
|
__publicField(this, "mi");
|
|
7759
7311
|
this.mi = new MHeader(this);
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
this.titleText = this.title ? new ObjText(this, { text: this.title, color: titleColor, scale: 2 }, 0.5, 0) : void 0;
|
|
7764
|
-
this.composerText = this.composer ? new ObjText(this, { text: this.composer, color: compColor }, 1, 0) : void 0;
|
|
7765
|
-
this.arrangerText = this.arranger ? new ObjText(this, { text: "Arr.: " + this.arranger, color: arrColor }, 1, 0) : void 0;
|
|
7312
|
+
this.titleText = this.title ? new ObjText(this, { text: this.title, color: colorKey("header.title"), scale: 2 }, 0.5, 0) : void 0;
|
|
7313
|
+
this.composerText = this.composer ? new ObjText(this, { text: this.composer, color: colorKey("header.composer") }, 1, 0) : void 0;
|
|
7314
|
+
this.arrangerText = this.arranger ? new ObjText(this, { text: "Arr.: " + this.arranger, color: colorKey("header.arranger") }, 1, 0) : void 0;
|
|
7766
7315
|
}
|
|
7767
7316
|
getMusicInterface() {
|
|
7768
7317
|
return this.mi;
|
|
@@ -8736,14 +8285,14 @@ var _DocumentBuilder = class _DocumentBuilder {
|
|
|
8736
8285
|
return this;
|
|
8737
8286
|
}
|
|
8738
8287
|
/**
|
|
8739
|
-
*
|
|
8288
|
+
* Fill current measure with rests.
|
|
8740
8289
|
* @param voiceId - Voice id to add rests to. Single value, array or all if omitted.
|
|
8741
8290
|
* @returns - This document builder instance.
|
|
8742
8291
|
*/
|
|
8743
|
-
|
|
8744
|
-
setAssertFunction("
|
|
8745
|
-
assertArg(guard_exports.
|
|
8746
|
-
this.getMeasure().
|
|
8292
|
+
fillWithRests(...voiceId) {
|
|
8293
|
+
setAssertFunction("fillWithRests", ...voiceId);
|
|
8294
|
+
assertArg(guard_exports.isArray(voiceId) && (voiceId.length === 0 || voiceId.every((id) => isVoiceId(id))));
|
|
8295
|
+
this.getMeasure().fillWithRests(...voiceId);
|
|
8747
8296
|
return this;
|
|
8748
8297
|
}
|
|
8749
8298
|
/**
|
|
@@ -8771,6 +8320,22 @@ var _DocumentBuilder = class _DocumentBuilder {
|
|
|
8771
8320
|
}
|
|
8772
8321
|
return this;
|
|
8773
8322
|
}
|
|
8323
|
+
/**
|
|
8324
|
+
* Add and repeat builder section.
|
|
8325
|
+
* @param times - Repeat count.
|
|
8326
|
+
* @param repeatCreator - Repeat creator function.
|
|
8327
|
+
* @returns - This document builder instance.
|
|
8328
|
+
*/
|
|
8329
|
+
repeat(times, repeatCreator) {
|
|
8330
|
+
setAssertFunction("repeat", repeatCreator);
|
|
8331
|
+
assertArg(
|
|
8332
|
+
guard_exports.isIntegerGte(times, 0),
|
|
8333
|
+
guard_exports.isFunction(repeatCreator)
|
|
8334
|
+
);
|
|
8335
|
+
for (let i = 0; i < times; i++)
|
|
8336
|
+
repeatCreator(this);
|
|
8337
|
+
return this;
|
|
8338
|
+
}
|
|
8774
8339
|
};
|
|
8775
8340
|
__publicField(_DocumentBuilder, "DefaultMeasureOptions", {});
|
|
8776
8341
|
var DocumentBuilder = _DocumentBuilder;
|
|
@@ -9720,51 +9285,592 @@ var MExtensionLine = _MExtensionLine;
|
|
|
9720
9285
|
|
|
9721
9286
|
// src/score/pub/music-interface.ts
|
|
9722
9287
|
import { MusicError as MusicError19, MusicErrorType as MusicErrorType19 } from "web-music-score/core";
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9288
|
+
|
|
9289
|
+
// node_modules/color-name-to-code/dist/color-name.enum.js
|
|
9290
|
+
var ColorName;
|
|
9291
|
+
(function(ColorName2) {
|
|
9292
|
+
ColorName2["AliceBlue"] = "aliceblue";
|
|
9293
|
+
ColorName2["AntiqueWhite"] = "antiquewhite";
|
|
9294
|
+
ColorName2["Aqua"] = "aqua";
|
|
9295
|
+
ColorName2["Aquamarine"] = "aquamarine";
|
|
9296
|
+
ColorName2["Azure"] = "azure";
|
|
9297
|
+
ColorName2["Beige"] = "beige";
|
|
9298
|
+
ColorName2["Bisque"] = "bisque";
|
|
9299
|
+
ColorName2["Black"] = "black";
|
|
9300
|
+
ColorName2["BlanchedAlmond"] = "blanchedalmond";
|
|
9301
|
+
ColorName2["Blue"] = "blue";
|
|
9302
|
+
ColorName2["BlueViolet"] = "blueviolet";
|
|
9303
|
+
ColorName2["Brown"] = "brown";
|
|
9304
|
+
ColorName2["BurlyWood"] = "burlywood";
|
|
9305
|
+
ColorName2["CadetBlue"] = "cadetblue";
|
|
9306
|
+
ColorName2["Chartreuse"] = "chartreuse";
|
|
9307
|
+
ColorName2["Chocolate"] = "chocolate";
|
|
9308
|
+
ColorName2["Coral"] = "coral";
|
|
9309
|
+
ColorName2["CornflowerBlue"] = "cornflowerblue";
|
|
9310
|
+
ColorName2["CornSilk"] = "cornsilk";
|
|
9311
|
+
ColorName2["Crimson"] = "crimson";
|
|
9312
|
+
ColorName2["Cyan"] = "cyan";
|
|
9313
|
+
ColorName2["DarkBlue"] = "darkblue";
|
|
9314
|
+
ColorName2["DarkCyan"] = "darkcyan";
|
|
9315
|
+
ColorName2["DarkGoldenRod"] = "darkgoldenrod";
|
|
9316
|
+
ColorName2["DarkGray"] = "darkgray";
|
|
9317
|
+
ColorName2["DarkGreen"] = "darkgreen";
|
|
9318
|
+
ColorName2["DarkGrey"] = "darkgrey";
|
|
9319
|
+
ColorName2["DarkKhaki"] = "darkkhaki";
|
|
9320
|
+
ColorName2["DarkMagenta"] = "darkmagenta";
|
|
9321
|
+
ColorName2["DarkOliveGreen"] = "darkolivegreen";
|
|
9322
|
+
ColorName2["DarkOrange"] = "darkorange";
|
|
9323
|
+
ColorName2["DarkOrchid"] = "darkorchid";
|
|
9324
|
+
ColorName2["DarkRed"] = "darkred";
|
|
9325
|
+
ColorName2["DarkSalmon"] = "darksalmon";
|
|
9326
|
+
ColorName2["DarkSeaGreen"] = "darkseagreen";
|
|
9327
|
+
ColorName2["DarkSlateBlue"] = "darkslateblue";
|
|
9328
|
+
ColorName2["DarkSlateGray"] = "darkslategray";
|
|
9329
|
+
ColorName2["DarkSlateGrey"] = "darkslategrey";
|
|
9330
|
+
ColorName2["DarkTurquoise"] = "darkturquoise";
|
|
9331
|
+
ColorName2["DarkViolet"] = "darkviolet";
|
|
9332
|
+
ColorName2["DeepPink"] = "deeppink";
|
|
9333
|
+
ColorName2["DeepSkyBlue"] = "deepskyblue";
|
|
9334
|
+
ColorName2["DimGray"] = "dimgray";
|
|
9335
|
+
ColorName2["DimGrey"] = "dimgrey";
|
|
9336
|
+
ColorName2["DodgerBlue"] = "dodgerblue";
|
|
9337
|
+
ColorName2["FireBrick"] = "firebrick";
|
|
9338
|
+
ColorName2["FloralWhite"] = "floralwhite";
|
|
9339
|
+
ColorName2["ForestGreen"] = "forestgreen";
|
|
9340
|
+
ColorName2["Fuchsia"] = "fuchsia";
|
|
9341
|
+
ColorName2["Gainsboro"] = "gainsboro";
|
|
9342
|
+
ColorName2["GhostWhite"] = "ghostwhite";
|
|
9343
|
+
ColorName2["Gold"] = "gold";
|
|
9344
|
+
ColorName2["GoldenRod"] = "goldenrod";
|
|
9345
|
+
ColorName2["Gray"] = "gray";
|
|
9346
|
+
ColorName2["Green"] = "green";
|
|
9347
|
+
ColorName2["GreenYellow"] = "greenyellow";
|
|
9348
|
+
ColorName2["Grey"] = "grey";
|
|
9349
|
+
ColorName2["Honeydew"] = "honeydew";
|
|
9350
|
+
ColorName2["HotPink"] = "hotpink";
|
|
9351
|
+
ColorName2["IndianRed"] = "indianred";
|
|
9352
|
+
ColorName2["Indigo"] = "indigo";
|
|
9353
|
+
ColorName2["Ivory"] = "ivory";
|
|
9354
|
+
ColorName2["Khaki"] = "khaki";
|
|
9355
|
+
ColorName2["Lavender"] = "lavender";
|
|
9356
|
+
ColorName2["LavenderBlush"] = "lavenderblush";
|
|
9357
|
+
ColorName2["LawnGreen"] = "lawngreen";
|
|
9358
|
+
ColorName2["LemonChiffon"] = "lemonchiffon";
|
|
9359
|
+
ColorName2["LightBlue"] = "lightblue";
|
|
9360
|
+
ColorName2["LightCoral"] = "lightcoral";
|
|
9361
|
+
ColorName2["LightCyan"] = "lightcyan";
|
|
9362
|
+
ColorName2["LightGoldenRodYellow"] = "lightgoldenrodyellow";
|
|
9363
|
+
ColorName2["LightGray"] = "lightgray";
|
|
9364
|
+
ColorName2["LightGreen"] = "lightgreen";
|
|
9365
|
+
ColorName2["LightGrey"] = "lightgrey";
|
|
9366
|
+
ColorName2["LightPink"] = "lightpink";
|
|
9367
|
+
ColorName2["LightSalmon"] = "lightsalmon";
|
|
9368
|
+
ColorName2["LightSeaGreen"] = "lightseagreen";
|
|
9369
|
+
ColorName2["LightSkyBlue"] = "lightskyblue";
|
|
9370
|
+
ColorName2["LightSlateGray"] = "lightslategray";
|
|
9371
|
+
ColorName2["LightSlateGrey"] = "lightslategrey";
|
|
9372
|
+
ColorName2["LightSteelBlue"] = "lightsteelblue";
|
|
9373
|
+
ColorName2["LightYellow"] = "lightyellow";
|
|
9374
|
+
ColorName2["Lime"] = "lime";
|
|
9375
|
+
ColorName2["LimeGreen"] = "limegreen";
|
|
9376
|
+
ColorName2["Linen"] = "linen";
|
|
9377
|
+
ColorName2["Magenta"] = "magenta";
|
|
9378
|
+
ColorName2["Maroon"] = "maroon";
|
|
9379
|
+
ColorName2["MediumAquamarine"] = "mediumaquamarine";
|
|
9380
|
+
ColorName2["MediumBlue"] = "mediumblue";
|
|
9381
|
+
ColorName2["MediumOrchid"] = "mediumorchid";
|
|
9382
|
+
ColorName2["MediumPurple"] = "mediumpurple";
|
|
9383
|
+
ColorName2["MediumSeaGreen"] = "mediumseagreen";
|
|
9384
|
+
ColorName2["MediumSlateBlue"] = "mediumslateblue";
|
|
9385
|
+
ColorName2["MediumSpringGreen"] = "mediumspringgreen";
|
|
9386
|
+
ColorName2["MediumTurquoise"] = "mediumturquoise";
|
|
9387
|
+
ColorName2["MediumVioletRed"] = "mediumvioletred";
|
|
9388
|
+
ColorName2["MidnightBlue"] = "midnightblue";
|
|
9389
|
+
ColorName2["MintCream"] = "mintcream";
|
|
9390
|
+
ColorName2["MistyRose"] = "mistyrose";
|
|
9391
|
+
ColorName2["Moccasin"] = "moccasin";
|
|
9392
|
+
ColorName2["NavajoWhite"] = "navajowhite";
|
|
9393
|
+
ColorName2["Navy"] = "navy";
|
|
9394
|
+
ColorName2["OldLace"] = "oldlace";
|
|
9395
|
+
ColorName2["Olive"] = "olive";
|
|
9396
|
+
ColorName2["OliveDrab"] = "olivedrab";
|
|
9397
|
+
ColorName2["Orange"] = "orange";
|
|
9398
|
+
ColorName2["OrangeRed"] = "orangered";
|
|
9399
|
+
ColorName2["Orchid"] = "orchid";
|
|
9400
|
+
ColorName2["PaleGoldenRod"] = "palegoldenrod";
|
|
9401
|
+
ColorName2["PaleGreen"] = "palegreen";
|
|
9402
|
+
ColorName2["PaleTurquoise"] = "paleturquoise";
|
|
9403
|
+
ColorName2["PaleVioletRed"] = "palevioletred";
|
|
9404
|
+
ColorName2["PapayaWhip"] = "papayawhip";
|
|
9405
|
+
ColorName2["PeachPuff"] = "peachpuff";
|
|
9406
|
+
ColorName2["Peru"] = "peru";
|
|
9407
|
+
ColorName2["Pink"] = "pink";
|
|
9408
|
+
ColorName2["Plum"] = "plum";
|
|
9409
|
+
ColorName2["PowderBlue"] = "powderblue";
|
|
9410
|
+
ColorName2["Purple"] = "purple";
|
|
9411
|
+
ColorName2["RebeccaPurple"] = "rebeccapurple";
|
|
9412
|
+
ColorName2["Red"] = "red";
|
|
9413
|
+
ColorName2["RosyBrown"] = "rosybrown";
|
|
9414
|
+
ColorName2["RoyalBlue"] = "royalblue";
|
|
9415
|
+
ColorName2["SaddleBrown"] = "saddlebrown";
|
|
9416
|
+
ColorName2["Salmon"] = "salmon";
|
|
9417
|
+
ColorName2["SandyBrown"] = "sandybrown";
|
|
9418
|
+
ColorName2["SeaGreen"] = "seagreen";
|
|
9419
|
+
ColorName2["SeaShell"] = "seashell";
|
|
9420
|
+
ColorName2["Sienna"] = "sienna";
|
|
9421
|
+
ColorName2["Silver"] = "silver";
|
|
9422
|
+
ColorName2["SkyBlue"] = "skyblue";
|
|
9423
|
+
ColorName2["SlateBlue"] = "slateblue";
|
|
9424
|
+
ColorName2["SlateGray"] = "slategray";
|
|
9425
|
+
ColorName2["SlateGrey"] = "slategrey";
|
|
9426
|
+
ColorName2["Snow"] = "snow";
|
|
9427
|
+
ColorName2["SpringGreen"] = "springgreen";
|
|
9428
|
+
ColorName2["SteelBlue"] = "steelblue";
|
|
9429
|
+
ColorName2["Tan"] = "tan";
|
|
9430
|
+
ColorName2["Teal"] = "teal";
|
|
9431
|
+
ColorName2["Thistle"] = "thistle";
|
|
9432
|
+
ColorName2["Tomato"] = "tomato";
|
|
9433
|
+
ColorName2["Turquoise"] = "turquoise";
|
|
9434
|
+
ColorName2["Violet"] = "violet";
|
|
9435
|
+
ColorName2["Wheat"] = "wheat";
|
|
9436
|
+
ColorName2["White"] = "white";
|
|
9437
|
+
ColorName2["WhiteSmoke"] = "whitesmoke";
|
|
9438
|
+
ColorName2["Yellow"] = "yellow";
|
|
9439
|
+
ColorName2["YellowGreen"] = "yellowgreen";
|
|
9440
|
+
})(ColorName = ColorName || (ColorName = {}));
|
|
9441
|
+
|
|
9442
|
+
// node_modules/color-name-to-code/dist/color-code-format.enum.js
|
|
9443
|
+
var ColorCodeFormat;
|
|
9444
|
+
(function(ColorCodeFormat2) {
|
|
9445
|
+
ColorCodeFormat2["Hex"] = "hex";
|
|
9446
|
+
ColorCodeFormat2["RGB"] = "rgb";
|
|
9447
|
+
ColorCodeFormat2["Array"] = "array";
|
|
9448
|
+
})(ColorCodeFormat = ColorCodeFormat || (ColorCodeFormat = {}));
|
|
9449
|
+
|
|
9450
|
+
// node_modules/color-name/index.js
|
|
9451
|
+
var colors = {
|
|
9452
|
+
aliceblue: [240, 248, 255],
|
|
9453
|
+
antiquewhite: [250, 235, 215],
|
|
9454
|
+
aqua: [0, 255, 255],
|
|
9455
|
+
aquamarine: [127, 255, 212],
|
|
9456
|
+
azure: [240, 255, 255],
|
|
9457
|
+
beige: [245, 245, 220],
|
|
9458
|
+
bisque: [255, 228, 196],
|
|
9459
|
+
black: [0, 0, 0],
|
|
9460
|
+
blanchedalmond: [255, 235, 205],
|
|
9461
|
+
blue: [0, 0, 255],
|
|
9462
|
+
blueviolet: [138, 43, 226],
|
|
9463
|
+
brown: [165, 42, 42],
|
|
9464
|
+
burlywood: [222, 184, 135],
|
|
9465
|
+
cadetblue: [95, 158, 160],
|
|
9466
|
+
chartreuse: [127, 255, 0],
|
|
9467
|
+
chocolate: [210, 105, 30],
|
|
9468
|
+
coral: [255, 127, 80],
|
|
9469
|
+
cornflowerblue: [100, 149, 237],
|
|
9470
|
+
cornsilk: [255, 248, 220],
|
|
9471
|
+
crimson: [220, 20, 60],
|
|
9472
|
+
cyan: [0, 255, 255],
|
|
9473
|
+
darkblue: [0, 0, 139],
|
|
9474
|
+
darkcyan: [0, 139, 139],
|
|
9475
|
+
darkgoldenrod: [184, 134, 11],
|
|
9476
|
+
darkgray: [169, 169, 169],
|
|
9477
|
+
darkgreen: [0, 100, 0],
|
|
9478
|
+
darkgrey: [169, 169, 169],
|
|
9479
|
+
darkkhaki: [189, 183, 107],
|
|
9480
|
+
darkmagenta: [139, 0, 139],
|
|
9481
|
+
darkolivegreen: [85, 107, 47],
|
|
9482
|
+
darkorange: [255, 140, 0],
|
|
9483
|
+
darkorchid: [153, 50, 204],
|
|
9484
|
+
darkred: [139, 0, 0],
|
|
9485
|
+
darksalmon: [233, 150, 122],
|
|
9486
|
+
darkseagreen: [143, 188, 143],
|
|
9487
|
+
darkslateblue: [72, 61, 139],
|
|
9488
|
+
darkslategray: [47, 79, 79],
|
|
9489
|
+
darkslategrey: [47, 79, 79],
|
|
9490
|
+
darkturquoise: [0, 206, 209],
|
|
9491
|
+
darkviolet: [148, 0, 211],
|
|
9492
|
+
deeppink: [255, 20, 147],
|
|
9493
|
+
deepskyblue: [0, 191, 255],
|
|
9494
|
+
dimgray: [105, 105, 105],
|
|
9495
|
+
dimgrey: [105, 105, 105],
|
|
9496
|
+
dodgerblue: [30, 144, 255],
|
|
9497
|
+
firebrick: [178, 34, 34],
|
|
9498
|
+
floralwhite: [255, 250, 240],
|
|
9499
|
+
forestgreen: [34, 139, 34],
|
|
9500
|
+
fuchsia: [255, 0, 255],
|
|
9501
|
+
gainsboro: [220, 220, 220],
|
|
9502
|
+
ghostwhite: [248, 248, 255],
|
|
9503
|
+
gold: [255, 215, 0],
|
|
9504
|
+
goldenrod: [218, 165, 32],
|
|
9505
|
+
gray: [128, 128, 128],
|
|
9506
|
+
green: [0, 128, 0],
|
|
9507
|
+
greenyellow: [173, 255, 47],
|
|
9508
|
+
grey: [128, 128, 128],
|
|
9509
|
+
honeydew: [240, 255, 240],
|
|
9510
|
+
hotpink: [255, 105, 180],
|
|
9511
|
+
indianred: [205, 92, 92],
|
|
9512
|
+
indigo: [75, 0, 130],
|
|
9513
|
+
ivory: [255, 255, 240],
|
|
9514
|
+
khaki: [240, 230, 140],
|
|
9515
|
+
lavender: [230, 230, 250],
|
|
9516
|
+
lavenderblush: [255, 240, 245],
|
|
9517
|
+
lawngreen: [124, 252, 0],
|
|
9518
|
+
lemonchiffon: [255, 250, 205],
|
|
9519
|
+
lightblue: [173, 216, 230],
|
|
9520
|
+
lightcoral: [240, 128, 128],
|
|
9521
|
+
lightcyan: [224, 255, 255],
|
|
9522
|
+
lightgoldenrodyellow: [250, 250, 210],
|
|
9523
|
+
lightgray: [211, 211, 211],
|
|
9524
|
+
lightgreen: [144, 238, 144],
|
|
9525
|
+
lightgrey: [211, 211, 211],
|
|
9526
|
+
lightpink: [255, 182, 193],
|
|
9527
|
+
lightsalmon: [255, 160, 122],
|
|
9528
|
+
lightseagreen: [32, 178, 170],
|
|
9529
|
+
lightskyblue: [135, 206, 250],
|
|
9530
|
+
lightslategray: [119, 136, 153],
|
|
9531
|
+
lightslategrey: [119, 136, 153],
|
|
9532
|
+
lightsteelblue: [176, 196, 222],
|
|
9533
|
+
lightyellow: [255, 255, 224],
|
|
9534
|
+
lime: [0, 255, 0],
|
|
9535
|
+
limegreen: [50, 205, 50],
|
|
9536
|
+
linen: [250, 240, 230],
|
|
9537
|
+
magenta: [255, 0, 255],
|
|
9538
|
+
maroon: [128, 0, 0],
|
|
9539
|
+
mediumaquamarine: [102, 205, 170],
|
|
9540
|
+
mediumblue: [0, 0, 205],
|
|
9541
|
+
mediumorchid: [186, 85, 211],
|
|
9542
|
+
mediumpurple: [147, 112, 219],
|
|
9543
|
+
mediumseagreen: [60, 179, 113],
|
|
9544
|
+
mediumslateblue: [123, 104, 238],
|
|
9545
|
+
mediumspringgreen: [0, 250, 154],
|
|
9546
|
+
mediumturquoise: [72, 209, 204],
|
|
9547
|
+
mediumvioletred: [199, 21, 133],
|
|
9548
|
+
midnightblue: [25, 25, 112],
|
|
9549
|
+
mintcream: [245, 255, 250],
|
|
9550
|
+
mistyrose: [255, 228, 225],
|
|
9551
|
+
moccasin: [255, 228, 181],
|
|
9552
|
+
navajowhite: [255, 222, 173],
|
|
9553
|
+
navy: [0, 0, 128],
|
|
9554
|
+
oldlace: [253, 245, 230],
|
|
9555
|
+
olive: [128, 128, 0],
|
|
9556
|
+
olivedrab: [107, 142, 35],
|
|
9557
|
+
orange: [255, 165, 0],
|
|
9558
|
+
orangered: [255, 69, 0],
|
|
9559
|
+
orchid: [218, 112, 214],
|
|
9560
|
+
palegoldenrod: [238, 232, 170],
|
|
9561
|
+
palegreen: [152, 251, 152],
|
|
9562
|
+
paleturquoise: [175, 238, 238],
|
|
9563
|
+
palevioletred: [219, 112, 147],
|
|
9564
|
+
papayawhip: [255, 239, 213],
|
|
9565
|
+
peachpuff: [255, 218, 185],
|
|
9566
|
+
peru: [205, 133, 63],
|
|
9567
|
+
pink: [255, 192, 203],
|
|
9568
|
+
plum: [221, 160, 221],
|
|
9569
|
+
powderblue: [176, 224, 230],
|
|
9570
|
+
purple: [128, 0, 128],
|
|
9571
|
+
rebeccapurple: [102, 51, 153],
|
|
9572
|
+
red: [255, 0, 0],
|
|
9573
|
+
rosybrown: [188, 143, 143],
|
|
9574
|
+
royalblue: [65, 105, 225],
|
|
9575
|
+
saddlebrown: [139, 69, 19],
|
|
9576
|
+
salmon: [250, 128, 114],
|
|
9577
|
+
sandybrown: [244, 164, 96],
|
|
9578
|
+
seagreen: [46, 139, 87],
|
|
9579
|
+
seashell: [255, 245, 238],
|
|
9580
|
+
sienna: [160, 82, 45],
|
|
9581
|
+
silver: [192, 192, 192],
|
|
9582
|
+
skyblue: [135, 206, 235],
|
|
9583
|
+
slateblue: [106, 90, 205],
|
|
9584
|
+
slategray: [112, 128, 144],
|
|
9585
|
+
slategrey: [112, 128, 144],
|
|
9586
|
+
snow: [255, 250, 250],
|
|
9587
|
+
springgreen: [0, 255, 127],
|
|
9588
|
+
steelblue: [70, 130, 180],
|
|
9589
|
+
tan: [210, 180, 140],
|
|
9590
|
+
teal: [0, 128, 128],
|
|
9591
|
+
thistle: [216, 191, 216],
|
|
9592
|
+
tomato: [255, 99, 71],
|
|
9593
|
+
turquoise: [64, 224, 208],
|
|
9594
|
+
violet: [238, 130, 238],
|
|
9595
|
+
wheat: [245, 222, 179],
|
|
9596
|
+
white: [255, 255, 255],
|
|
9597
|
+
whitesmoke: [245, 245, 245],
|
|
9598
|
+
yellow: [255, 255, 0],
|
|
9599
|
+
yellowgreen: [154, 205, 50]
|
|
9600
|
+
};
|
|
9601
|
+
for (const key in colors) Object.freeze(colors[key]);
|
|
9602
|
+
var color_name_default = Object.freeze(colors);
|
|
9603
|
+
|
|
9604
|
+
// node_modules/color-name-to-code/dist/color-names.js
|
|
9605
|
+
var colorNames = color_name_default;
|
|
9606
|
+
|
|
9607
|
+
// node_modules/color-name-to-code/dist/color-array-to-hex.js
|
|
9608
|
+
var colorArrayToHexDefaultOptions = {
|
|
9609
|
+
hash: true,
|
|
9610
|
+
lowercase: false,
|
|
9611
|
+
short: false
|
|
9612
|
+
};
|
|
9613
|
+
function colorArrayToHex(arr, partialOptions) {
|
|
9614
|
+
const options = __spreadValues(__spreadValues({}, colorArrayToHexDefaultOptions), partialOptions);
|
|
9615
|
+
const { hash, lowercase, short } = options;
|
|
9616
|
+
let hex = arr.map((num) => {
|
|
9617
|
+
let str = num.toString(16);
|
|
9618
|
+
str = str.length === 1 ? `0${str}` : str;
|
|
9619
|
+
return str;
|
|
9620
|
+
}).join("");
|
|
9621
|
+
if (short) {
|
|
9622
|
+
const chars = [...hex];
|
|
9623
|
+
if (chars[0] === chars[1] && chars[2] === chars[3] && chars[4] === chars[5]) {
|
|
9624
|
+
hex = `${chars[0]}${chars[2]}${chars[4]}`;
|
|
9625
|
+
}
|
|
9626
|
+
}
|
|
9627
|
+
hex = lowercase ? hex.toLowerCase() : hex.toUpperCase();
|
|
9628
|
+
if (hash) {
|
|
9629
|
+
hex = `#${hex}`;
|
|
9630
|
+
}
|
|
9631
|
+
return hex;
|
|
9632
|
+
}
|
|
9633
|
+
|
|
9634
|
+
// node_modules/color-name-to-code/dist/color-array-to-rgb.js
|
|
9635
|
+
function colorArrayToRGB(arr, alpha = 1) {
|
|
9636
|
+
alpha = Math.min(1, Math.max(0, alpha));
|
|
9637
|
+
if (alpha < 1) {
|
|
9638
|
+
return `rgba(${arr[0]}, ${arr[1]}, ${arr[2]}, ${alpha})`;
|
|
9639
|
+
}
|
|
9640
|
+
return `rgb(${arr[0]}, ${arr[1]}, ${arr[2]})`;
|
|
9641
|
+
}
|
|
9642
|
+
|
|
9643
|
+
// node_modules/color-name-to-code/dist/color-name-to-code.js
|
|
9644
|
+
var colorNameToCodeDefaultOptions = __spreadProps(__spreadValues({}, colorArrayToHexDefaultOptions), {
|
|
9645
|
+
fallback: true,
|
|
9646
|
+
alpha: 1,
|
|
9647
|
+
format: ColorCodeFormat.Hex
|
|
9648
|
+
});
|
|
9649
|
+
function colorNameToCode(value, partialOptions = {}) {
|
|
9650
|
+
const options = __spreadValues(__spreadValues({}, colorNameToCodeDefaultOptions), partialOptions);
|
|
9651
|
+
const { fallback, format, hash, lowercase, short, alpha } = options;
|
|
9652
|
+
value = `${value}`;
|
|
9653
|
+
const colorName = value.toLowerCase().replaceAll(/[^a-z]/g, "");
|
|
9654
|
+
let colorArray = colorNames[colorName];
|
|
9655
|
+
if (!colorArray) {
|
|
9656
|
+
if (!fallback) {
|
|
9657
|
+
throw new Error(`no matching color found for '${value}'`);
|
|
9658
|
+
}
|
|
9659
|
+
const hex = value.toLowerCase().replaceAll(/[^\da-f]/g, "");
|
|
9660
|
+
colorArray = (hex.length <= 3 ? [hex.slice(0, 1).repeat(2), hex.slice(1, 2).repeat(2), hex.slice(2, 3).repeat(2)] : [hex.slice(0, 2), hex.slice(2, 4), hex.slice(4, 6)]).map((str) => Number.parseInt(str.length < 2 ? `${"0".repeat(2 - str.length)}${str}` : str, 16));
|
|
9661
|
+
}
|
|
9662
|
+
switch (format) {
|
|
9663
|
+
case ColorCodeFormat.Array: {
|
|
9664
|
+
return [...colorArray];
|
|
9665
|
+
}
|
|
9666
|
+
case ColorCodeFormat.RGB: {
|
|
9667
|
+
return colorArrayToRGB(colorArray, alpha);
|
|
9668
|
+
}
|
|
9669
|
+
default: {
|
|
9670
|
+
return colorArrayToHex(colorArray, { hash, lowercase, short });
|
|
9671
|
+
}
|
|
9672
|
+
}
|
|
9673
|
+
}
|
|
9674
|
+
|
|
9675
|
+
// src/score/pub/paint.ts
|
|
9676
|
+
var norm = (s) => s.toLowerCase();
|
|
9677
|
+
function colorKey(colorKey2) {
|
|
9678
|
+
return colorKey2;
|
|
9679
|
+
}
|
|
9680
|
+
var _Paint = class _Paint {
|
|
9681
|
+
constructor() {
|
|
9682
|
+
__publicField(this, "colors", {
|
|
9683
|
+
"hilight.staffpos": "#55cc55",
|
|
9684
|
+
"hilight.object": "#55cc55",
|
|
9685
|
+
"play.cursor": "#44aa44",
|
|
9686
|
+
"background": "white",
|
|
9687
|
+
"header.title": "black",
|
|
9688
|
+
"header.composer": "black",
|
|
9689
|
+
"header.arranger": "black",
|
|
9690
|
+
"rowgroup.instrument": "black",
|
|
9691
|
+
"rowgroup.frame": "black",
|
|
9692
|
+
"staff.frame": "black",
|
|
9693
|
+
"staff.note": "black",
|
|
9694
|
+
"staff.rest": "black",
|
|
9695
|
+
"staff.lyrics": "black",
|
|
9696
|
+
"staff.connective": "black",
|
|
9697
|
+
"staff.signature.clef": "black",
|
|
9698
|
+
"staff.signature.key": "black",
|
|
9699
|
+
"staff.signature.time": "black",
|
|
9700
|
+
"staff.signature.tempo": "black",
|
|
9701
|
+
"staff.signature.measurenum": "black",
|
|
9702
|
+
"staff.element.fermata": "black",
|
|
9703
|
+
"staff.element.annotation": "black",
|
|
9704
|
+
"staff.element.navigation": "black",
|
|
9705
|
+
"staff.element.label": "black",
|
|
9706
|
+
"tab.frame": "black",
|
|
9707
|
+
"tab.note": "black",
|
|
9708
|
+
"tab.rest": "black",
|
|
9709
|
+
"tab.lyrics": "black",
|
|
9710
|
+
"tab.connective": "black",
|
|
9711
|
+
"tab.tuning": "black",
|
|
9712
|
+
"tab.signature.clef": "black",
|
|
9713
|
+
// not needed
|
|
9714
|
+
"tab.signature.key": "black",
|
|
9715
|
+
// not needed
|
|
9716
|
+
"tab.signature.time": "black",
|
|
9717
|
+
"tab.signature.tempo": "black",
|
|
9718
|
+
"tab.signature.measurenum": "black",
|
|
9719
|
+
"tab.element.fermata": "black",
|
|
9720
|
+
"tab.element.annotation": "black",
|
|
9721
|
+
"tab.element.navigation": "black",
|
|
9722
|
+
"tab.element.label": "black"
|
|
9723
|
+
});
|
|
9724
|
+
}
|
|
9725
|
+
/**
|
|
9726
|
+
* Set color of any score document element. Use combination of color key parts to set color of specific elements.
|
|
9727
|
+
* ```ts
|
|
9728
|
+
* setColor("all", "red"); // Set color of everything except background.
|
|
9729
|
+
* setColor("staff", "red"); // Set color of all staff elements.
|
|
9730
|
+
* setColor(["staff", "signature"], "red"); // Set color of all staff signature elements.
|
|
9731
|
+
* setColor(["staff", "signature", "key"], "red"); // Set color of staff key signature.
|
|
9732
|
+
* setColor(["staff", "signature", "time"], "red"); // Set color of staff time signature.
|
|
9733
|
+
* setColor("staff.signature.time", "red"); // Set color of staff time signature.
|
|
9734
|
+
* // etc.
|
|
9735
|
+
* ```
|
|
9736
|
+
*
|
|
9737
|
+
* @param colorKeyOrParts - Color key parts to set color for.
|
|
9738
|
+
* @param color - Color (HTML color code e.g. "green", "#AA6644", etc.)
|
|
9739
|
+
*/
|
|
9740
|
+
setColor(colorKeyOrParts, color) {
|
|
9741
|
+
if (colorKeyOrParts === "all") {
|
|
9742
|
+
for (const key of Object.keys(this.colors)) {
|
|
9743
|
+
if (key !== "background" && key !== "hilight.object" && key !== "hilight.staffpos" && key !== "play.cursor")
|
|
9744
|
+
this.colors[key] = color || "black";
|
|
9745
|
+
}
|
|
9746
|
+
return;
|
|
9747
|
+
}
|
|
9748
|
+
const isBackground = typeof colorKeyOrParts === "string" && norm(colorKeyOrParts) === "background" || guard_exports.isArray(colorKeyOrParts) && colorKeyOrParts.length === 1 && norm(colorKeyOrParts[0]) === "background";
|
|
9749
|
+
const finalColor = color || (isBackground ? "white" : "black");
|
|
9750
|
+
if (isBackground) {
|
|
9751
|
+
this.colors.background = finalColor;
|
|
9752
|
+
return;
|
|
9753
|
+
}
|
|
9754
|
+
if (typeof colorKeyOrParts === "string" && colorKeyOrParts in this.colors) {
|
|
9755
|
+
this.colors[colorKeyOrParts] = finalColor;
|
|
9756
|
+
return;
|
|
9757
|
+
}
|
|
9758
|
+
const colorKeyParts = guard_exports.isArray(colorKeyOrParts) ? colorKeyOrParts : colorKeyOrParts.split(".");
|
|
9759
|
+
if (colorKeyParts.length === 0)
|
|
9760
|
+
return;
|
|
9761
|
+
const normalizedParts = colorKeyParts.map(norm);
|
|
9762
|
+
let matched = false;
|
|
9763
|
+
for (const key of Object.keys(this.colors)) {
|
|
9764
|
+
const parts = key.split(".").map(norm);
|
|
9765
|
+
const match = normalizedParts.every((a) => parts.includes(a));
|
|
9766
|
+
if (match) {
|
|
9767
|
+
this.colors[key] = finalColor;
|
|
9768
|
+
matched = true;
|
|
9769
|
+
}
|
|
9770
|
+
}
|
|
9771
|
+
if (!matched) {
|
|
9772
|
+
console.error(
|
|
9773
|
+
`Color attrs ${utils_exports.Str.stringify(colorKeyParts)} did not match any color.`
|
|
9774
|
+
);
|
|
9775
|
+
}
|
|
9776
|
+
}
|
|
9777
|
+
/**
|
|
9778
|
+
* Get color.
|
|
9779
|
+
* @param colorKeyOrColor - ColorKey or color.
|
|
9780
|
+
* @returns - Color value (e.g. "white" or "#FFFFFF").
|
|
9781
|
+
*/
|
|
9782
|
+
getColor(colorKeyOrColor) {
|
|
9783
|
+
var _a;
|
|
9784
|
+
return (_a = this.colors[colorKeyOrColor]) != null ? _a : colorKeyOrColor;
|
|
9785
|
+
}
|
|
9786
|
+
/**
|
|
9787
|
+
* Get color code.
|
|
9788
|
+
* @param colorKeyOrColor - ColorKey or color.
|
|
9789
|
+
* @returns - Color code (e.g. "#FFFFFF").
|
|
9790
|
+
*/
|
|
9791
|
+
getColorCode(colorKeyOrColor) {
|
|
9792
|
+
return _Paint.colorNameToCode(this.getColor(colorKeyOrColor));
|
|
9793
|
+
}
|
|
9794
|
+
/**
|
|
9795
|
+
* Get color RGBA.
|
|
9796
|
+
* @param colorKeyOrColor - ColorKey or color.
|
|
9797
|
+
* @returns - Color RGBA (e.g. [1, 1, 1, 1]).
|
|
9798
|
+
*/
|
|
9799
|
+
getColorRGBA(colorKeyOrColor) {
|
|
9800
|
+
return _Paint.colorNameToRGBA(this.getColor(colorKeyOrColor));
|
|
9801
|
+
}
|
|
9802
|
+
/**
|
|
9803
|
+
* Convert color name to color code.
|
|
9804
|
+
* @param colorName - Color name (e.g. "white").
|
|
9805
|
+
* @returns - Color code (e.g. "#FFFFFF")
|
|
9806
|
+
*/
|
|
9807
|
+
static colorNameToCode(colorName) {
|
|
9808
|
+
return colorNameToCode(colorName);
|
|
9809
|
+
}
|
|
9810
|
+
/**
|
|
9811
|
+
* Convert color name ro RGBA.
|
|
9812
|
+
* @param colorName - Color name (e.g. "white").
|
|
9813
|
+
* @param alpha - Alpha value 0..1 (default is 1).
|
|
9814
|
+
* @returns - RGBA (e.g. [1, 1, 1, 1]).
|
|
9815
|
+
*/
|
|
9816
|
+
static colorNameToRGBA(colorName, alpha = 1) {
|
|
9817
|
+
const hex = colorNameToCode(colorName).replace("#", "");
|
|
9818
|
+
const r = parseInt(hex.slice(0, 2), 16);
|
|
9819
|
+
const g = parseInt(hex.slice(2, 4), 16);
|
|
9820
|
+
const b = parseInt(hex.slice(4, 6), 16);
|
|
9821
|
+
const a = Math.round(alpha * 255);
|
|
9822
|
+
return [r, g, b, a];
|
|
9823
|
+
}
|
|
9824
|
+
};
|
|
9825
|
+
__publicField(_Paint, "default", new _Paint());
|
|
9826
|
+
var Paint = _Paint;
|
|
9827
|
+
|
|
9828
|
+
// src/score/pub/music-interface.ts
|
|
9829
|
+
function assertArg3(condition, argName, argValue) {
|
|
9830
|
+
if (!condition) {
|
|
9831
|
+
throw new MusicError19(MusicErrorType19.Score, `Invalid arg: ${argName} = ${argValue}`);
|
|
9832
|
+
}
|
|
9833
|
+
}
|
|
9834
|
+
function require_t(t, message) {
|
|
9835
|
+
if (t === void 0 || t === null) {
|
|
9836
|
+
throw new TypeError(message);
|
|
9837
|
+
} else {
|
|
9838
|
+
return t;
|
|
9839
|
+
}
|
|
9840
|
+
}
|
|
9841
|
+
var _MPlayer = class _MPlayer {
|
|
9842
|
+
/**
|
|
9843
|
+
* Create new music player.
|
|
9844
|
+
* @param doc - Music document to play.
|
|
9845
|
+
* @param playStateChangeListener - Play state change listener.
|
|
9846
|
+
*/
|
|
9847
|
+
constructor(doc, playStateChangeListener) {
|
|
9848
|
+
__publicField(this, "player");
|
|
9849
|
+
assertArg3(doc instanceof MDocument2, "doc", doc);
|
|
9850
|
+
assertArg3(guard_exports.isFunctionOrUndefined(playStateChangeListener), "playStateChangeListener", playStateChangeListener);
|
|
9851
|
+
this.player = new Player();
|
|
9852
|
+
this.player.setDocument(doc.getMusicObject());
|
|
9853
|
+
this.player.setCursorPositionChangeListener((cursorRect) => {
|
|
9854
|
+
doc.getMusicObject().updateCursorRect(cursorRect);
|
|
9855
|
+
});
|
|
9856
|
+
if (playStateChangeListener) {
|
|
9857
|
+
this.player.setPlayStateChnageListener(playStateChangeListener);
|
|
9858
|
+
}
|
|
9859
|
+
}
|
|
9860
|
+
/**
|
|
9861
|
+
* Stop all playing.
|
|
9862
|
+
*/
|
|
9863
|
+
static stopAll() {
|
|
9864
|
+
this.currentlyPlaying.forEach((p) => p.stop());
|
|
9865
|
+
Audio2.stop();
|
|
9866
|
+
}
|
|
9867
|
+
/**
|
|
9868
|
+
* Playe attached document.
|
|
9869
|
+
* @returns - This player instance.
|
|
9870
|
+
*/
|
|
9871
|
+
play() {
|
|
9872
|
+
_MPlayer.currentlyPlaying.add(this);
|
|
9873
|
+
this.player.play();
|
|
9768
9874
|
return this;
|
|
9769
9875
|
}
|
|
9770
9876
|
/**
|
|
@@ -9795,6 +9901,16 @@ var MRenderContext2 = class {
|
|
|
9795
9901
|
__publicField(this, "ctx");
|
|
9796
9902
|
this.ctx = new RenderContext(this);
|
|
9797
9903
|
}
|
|
9904
|
+
/**
|
|
9905
|
+
* Set Paint for this render context.
|
|
9906
|
+
* @param paint - Paint.
|
|
9907
|
+
* @returns - This render context instance.
|
|
9908
|
+
*/
|
|
9909
|
+
setPaint(paint) {
|
|
9910
|
+
assertArg3(guard_exports.isUndefined(paint) || paint instanceof Paint, "paint", paint);
|
|
9911
|
+
this.ctx.setPaint(paint);
|
|
9912
|
+
return this;
|
|
9913
|
+
}
|
|
9798
9914
|
/**
|
|
9799
9915
|
* Attach music document to this render context.
|
|
9800
9916
|
* @param doc - Music document.
|
|
@@ -10070,6 +10186,7 @@ export {
|
|
|
10070
10186
|
MusicInterface5 as MusicInterface,
|
|
10071
10187
|
Navigation,
|
|
10072
10188
|
NoteAnchor,
|
|
10189
|
+
Paint,
|
|
10073
10190
|
PlayState,
|
|
10074
10191
|
ScoreEvent,
|
|
10075
10192
|
ScoreObjectEvent,
|
|
@@ -10079,13 +10196,13 @@ export {
|
|
|
10079
10196
|
TempoAnnotation,
|
|
10080
10197
|
TieType,
|
|
10081
10198
|
VerticalPosition,
|
|
10199
|
+
colorKey,
|
|
10082
10200
|
getStringNumbers,
|
|
10083
10201
|
getVerseNumbers,
|
|
10084
10202
|
getVoiceIds,
|
|
10085
10203
|
isStringNumber,
|
|
10086
10204
|
isVerseNumber,
|
|
10087
10205
|
isVoiceId,
|
|
10088
|
-
setColor,
|
|
10089
10206
|
validateStringNumber,
|
|
10090
10207
|
validateVerseNumber,
|
|
10091
10208
|
validateVoiceId
|