@scorelabs/core 1.0.7 → 1.0.10
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/dist/importers/MusicXMLParser.d.ts +7 -2
- package/dist/importers/MusicXMLParser.js +261 -103
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/models/Instrument.d.ts +8 -19
- package/dist/models/Instrument.js +77 -23
- package/dist/models/Measure.d.ts +5 -1
- package/dist/models/Measure.js +132 -19
- package/dist/models/Note.d.ts +7 -7
- package/dist/models/Note.js +2 -2
- package/dist/models/NoteSet.d.ts +44 -42
- package/dist/models/NoteSet.js +5 -2
- package/dist/models/Pitch.js +4 -0
- package/dist/models/PreMeasure.d.ts +24 -0
- package/dist/models/PreMeasure.js +30 -0
- package/dist/models/Score.d.ts +20 -5
- package/dist/models/Score.js +190 -5
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/types.d.ts +2 -213
- package/dist/models/types.js +2 -213
- package/dist/types/Accidental.d.ts +7 -0
- package/dist/types/Accidental.js +8 -0
- package/dist/types/Arpeggio.d.ts +5 -0
- package/dist/types/Arpeggio.js +6 -0
- package/dist/types/Articulation.d.ts +10 -0
- package/dist/types/Articulation.js +11 -0
- package/dist/types/BarlineStyle.d.ts +9 -0
- package/dist/types/BarlineStyle.js +10 -0
- package/dist/types/Bowing.d.ts +4 -0
- package/dist/types/Bowing.js +5 -0
- package/dist/types/Clef.d.ts +10 -0
- package/dist/types/Clef.js +11 -0
- package/dist/types/Duration.d.ts +20 -0
- package/dist/types/Duration.js +60 -0
- package/dist/types/Dynamic.d.ts +12 -0
- package/dist/types/Dynamic.js +13 -0
- package/dist/types/Fretboard.d.ts +19 -0
- package/dist/types/Fretboard.js +1 -0
- package/dist/types/Genre.d.ts +27 -0
- package/dist/types/Genre.js +28 -0
- package/dist/types/Glissando.d.ts +8 -0
- package/dist/types/Glissando.js +5 -0
- package/dist/types/Hairpin.d.ts +10 -0
- package/dist/types/Hairpin.js +11 -0
- package/dist/types/InstrumentPreset.d.ts +11 -0
- package/dist/types/InstrumentPreset.js +12 -0
- package/dist/types/InstrumentType.d.ts +8 -0
- package/dist/types/InstrumentType.js +9 -0
- package/dist/types/KeySignature.d.ts +3 -0
- package/dist/types/KeySignature.js +1 -0
- package/dist/types/Lyric.d.ts +11 -0
- package/dist/types/Lyric.js +7 -0
- package/dist/types/NoteheadShape.d.ts +8 -0
- package/dist/types/NoteheadShape.js +9 -0
- package/dist/types/Ornament.d.ts +8 -0
- package/dist/types/Ornament.js +9 -0
- package/dist/types/Ottava.d.ts +10 -0
- package/dist/types/Ottava.js +7 -0
- package/dist/types/Pedal.d.ts +4 -0
- package/dist/types/Pedal.js +1 -0
- package/dist/types/Repeat.d.ts +8 -0
- package/dist/types/Repeat.js +1 -0
- package/dist/types/Slur.d.ts +4 -0
- package/dist/types/Slur.js +1 -0
- package/dist/types/StemDirection.d.ts +4 -0
- package/dist/types/StemDirection.js +5 -0
- package/dist/types/Tempo.d.ts +8 -0
- package/dist/types/Tempo.js +1 -0
- package/dist/types/TimeSignature.d.ts +6 -0
- package/dist/types/TimeSignature.js +3 -0
- package/dist/types/Tuplet.d.ts +5 -0
- package/dist/types/Tuplet.js +1 -0
- package/dist/types/User.d.ts +21 -0
- package/dist/types/User.js +7 -0
- package/dist/types/index.d.ts +27 -0
- package/dist/types/index.js +27 -0
- package/package.json +3 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var NoteheadShape;
|
|
2
|
+
(function (NoteheadShape) {
|
|
3
|
+
NoteheadShape["Normal"] = "normal";
|
|
4
|
+
NoteheadShape["Cross"] = "cross";
|
|
5
|
+
NoteheadShape["Diamond"] = "diamond";
|
|
6
|
+
NoteheadShape["Slash"] = "slash";
|
|
7
|
+
NoteheadShape["Triangle"] = "triangle";
|
|
8
|
+
NoteheadShape["Square"] = "square";
|
|
9
|
+
})(NoteheadShape || (NoteheadShape = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export var Ornament;
|
|
2
|
+
(function (Ornament) {
|
|
3
|
+
Ornament["Trill"] = "trill";
|
|
4
|
+
Ornament["Mordent"] = "mordent";
|
|
5
|
+
Ornament["InvertedMordent"] = "inverted-mordent";
|
|
6
|
+
Ornament["Turn"] = "turn";
|
|
7
|
+
Ornament["InvertedTurn"] = "inverted-turn";
|
|
8
|
+
Ornament["Tremolo"] = "tremolo";
|
|
9
|
+
})(Ornament || (Ornament = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WARNING: DO NOT ADD SENSITIVE LOGIC OR PRIVATE CONSTANTS TO THIS FILE.
|
|
3
|
+
* This package (@scorelabs/core) is used in public-facing frontend applications
|
|
4
|
+
* and could be exposed. Keep all token generation, verification, and encryption
|
|
5
|
+
* logic in the 'backend' or 'website' utilities.
|
|
6
|
+
*/
|
|
7
|
+
export type UserTier = 'free' | 'premium';
|
|
8
|
+
export interface UserData {
|
|
9
|
+
accessToken?: string;
|
|
10
|
+
access_token?: string;
|
|
11
|
+
uuid?: string | number;
|
|
12
|
+
name?: string;
|
|
13
|
+
first_name?: string;
|
|
14
|
+
last_name?: string;
|
|
15
|
+
username?: string;
|
|
16
|
+
email?: string;
|
|
17
|
+
is_admin?: number | boolean;
|
|
18
|
+
id?: string | number;
|
|
19
|
+
tier?: UserTier | string;
|
|
20
|
+
picture?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WARNING: DO NOT ADD SENSITIVE LOGIC OR PRIVATE CONSTANTS TO THIS FILE.
|
|
3
|
+
* This package (@scorelabs/core) is used in public-facing frontend applications
|
|
4
|
+
* and could be exposed. Keep all token generation, verification, and encryption
|
|
5
|
+
* logic in the 'backend' or 'website' utilities.
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from './InstrumentPreset.js';
|
|
2
|
+
export * from './InstrumentType.js';
|
|
3
|
+
export * from './StemDirection.js';
|
|
4
|
+
export * from './Clef.js';
|
|
5
|
+
export * from './Duration.js';
|
|
6
|
+
export * from './Accidental.js';
|
|
7
|
+
export * from './Articulation.js';
|
|
8
|
+
export * from './Dynamic.js';
|
|
9
|
+
export * from './Genre.js';
|
|
10
|
+
export * from './BarlineStyle.js';
|
|
11
|
+
export * from './Lyric.js';
|
|
12
|
+
export * from './Bowing.js';
|
|
13
|
+
export * from './NoteheadShape.js';
|
|
14
|
+
export * from './Ornament.js';
|
|
15
|
+
export * from './Fretboard.js';
|
|
16
|
+
export * from './TimeSignature.js';
|
|
17
|
+
export * from './KeySignature.js';
|
|
18
|
+
export * from './Tempo.js';
|
|
19
|
+
export * from './Hairpin.js';
|
|
20
|
+
export * from './Ottava.js';
|
|
21
|
+
export * from './Arpeggio.js';
|
|
22
|
+
export * from './Glissando.js';
|
|
23
|
+
export * from './Pedal.js';
|
|
24
|
+
export * from './Slur.js';
|
|
25
|
+
export * from './Tuplet.js';
|
|
26
|
+
export * from './Repeat.js';
|
|
27
|
+
export * from './User.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export * from './InstrumentPreset.js';
|
|
2
|
+
export * from './InstrumentType.js';
|
|
3
|
+
export * from './StemDirection.js';
|
|
4
|
+
export * from './Clef.js';
|
|
5
|
+
export * from './Duration.js';
|
|
6
|
+
export * from './Accidental.js';
|
|
7
|
+
export * from './Articulation.js';
|
|
8
|
+
export * from './Dynamic.js';
|
|
9
|
+
export * from './Genre.js';
|
|
10
|
+
export * from './BarlineStyle.js';
|
|
11
|
+
export * from './Lyric.js';
|
|
12
|
+
export * from './Bowing.js';
|
|
13
|
+
export * from './NoteheadShape.js';
|
|
14
|
+
export * from './Ornament.js';
|
|
15
|
+
export * from './Fretboard.js';
|
|
16
|
+
export * from './TimeSignature.js';
|
|
17
|
+
export * from './KeySignature.js';
|
|
18
|
+
export * from './Tempo.js';
|
|
19
|
+
export * from './Hairpin.js';
|
|
20
|
+
export * from './Ottava.js';
|
|
21
|
+
export * from './Arpeggio.js';
|
|
22
|
+
export * from './Glissando.js';
|
|
23
|
+
export * from './Pedal.js';
|
|
24
|
+
export * from './Slur.js';
|
|
25
|
+
export * from './Tuplet.js';
|
|
26
|
+
export * from './Repeat.js';
|
|
27
|
+
export * from './User.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scorelabs/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Core logic and models for ScoreLabs music notation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"release:major": "npm version major && npm publish --access public",
|
|
25
25
|
"release": "npm run release:patch",
|
|
26
26
|
"test": "vitest",
|
|
27
|
+
"test:coverage": "vitest run --coverage",
|
|
27
28
|
"lint": "eslint ."
|
|
28
29
|
},
|
|
29
30
|
"dependencies": {
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@types/jszip": "^3.4.0",
|
|
34
35
|
"@types/node": "^25.2.3",
|
|
36
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
35
37
|
"typescript": "^5.9.3",
|
|
36
38
|
"vitest": "^4.0.18"
|
|
37
39
|
}
|