@mcqj/vexflow 0.0.1-alpha.7 → 0.0.1-alpha.9
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/README.md +6 -0
- package/build/cjs/vexflow-bravura.js +1 -1
- package/build/cjs/vexflow-bravura.js.map +1 -1
- package/build/cjs/vexflow-core.js +1 -1
- package/build/cjs/vexflow-core.js.map +1 -1
- package/build/cjs/vexflow-debug-with-tests.js +381 -363
- package/build/cjs/vexflow-debug-with-tests.js.map +1 -1
- package/build/cjs/vexflow-debug.js +202 -210
- package/build/cjs/vexflow-debug.js.map +1 -1
- package/build/cjs/vexflow.js +1 -1
- package/build/cjs/vexflow.js.map +1 -1
- package/build/esm/src/formatter.js +99 -11
- package/build/esm/src/tickcontext.js +6 -0
- package/build/esm/src/version.js +3 -3
- package/build/esm/tests/formatter_tests.js +66 -0
- package/build/playwright-report/index.html +3 -3
- package/build/types/src/formatter.d.ts +16 -0
- package/build/types/src/tickcontext.d.ts +11 -0
- package/package.json +10 -13
|
@@ -28,7 +28,12 @@ export interface FormatParams {
|
|
|
28
28
|
context?: RenderContext;
|
|
29
29
|
}
|
|
30
30
|
export interface AlignmentTickContexts {
|
|
31
|
+
/** All tick positions, sorted. */
|
|
31
32
|
list: number[];
|
|
33
|
+
/** Tick positions whose contexts participate in spacing and justification. */
|
|
34
|
+
spacingList: number[];
|
|
35
|
+
/** Tick positions whose contexts contain only dependent tickables. */
|
|
36
|
+
dependentList: number[];
|
|
32
37
|
map: Record<number, TickContext>;
|
|
33
38
|
array: TickContext[];
|
|
34
39
|
resolutionMultiplier: number;
|
|
@@ -184,6 +189,17 @@ export declare class Formatter {
|
|
|
184
189
|
* of all the tickables/notes in the formatter.
|
|
185
190
|
*/
|
|
186
191
|
preFormat(justifyWidth?: number, renderingContext?: RenderContext, voicesParam?: Voice[], stave?: Stave): number;
|
|
192
|
+
/**
|
|
193
|
+
* Position contexts that contain only dependent tickables.
|
|
194
|
+
*
|
|
195
|
+
* Dependent voices follow the layout of the other voices, so their contexts
|
|
196
|
+
* are not part of the spacing list. Instead, place each one between the
|
|
197
|
+
* surrounding spacing contexts, interpolating by tick. Contexts before the
|
|
198
|
+
* first spacing context are aligned with it, and trailing contexts are
|
|
199
|
+
* interpolated across the final note's remaining duration toward the end of
|
|
200
|
+
* the justified layout.
|
|
201
|
+
*/
|
|
202
|
+
protected positionDependentContexts(): void;
|
|
187
203
|
/** Calculate the total cost of this formatting decision. */
|
|
188
204
|
evaluate(): number;
|
|
189
205
|
/**
|
|
@@ -65,6 +65,17 @@ export declare class TickContext {
|
|
|
65
65
|
getMaxTickable(): Tickable | undefined;
|
|
66
66
|
getMinTickable(): Tickable | undefined;
|
|
67
67
|
getTickables(): Tickable[];
|
|
68
|
+
/**
|
|
69
|
+
* Return the tickables that participate in spacing. Tickables from dependent
|
|
70
|
+
* voices follow the layout of the other voices and are excluded.
|
|
71
|
+
*/
|
|
72
|
+
getNonDependentTickables(): Tickable[];
|
|
73
|
+
/**
|
|
74
|
+
* Return true if this context contains tickables, all of which belong to
|
|
75
|
+
* dependent voices. Such contexts should not create a spacing slot of their
|
|
76
|
+
* own; they are positioned from the surrounding non-dependent contexts.
|
|
77
|
+
*/
|
|
78
|
+
hasOnlyDependentTickables(): boolean;
|
|
68
79
|
/**
|
|
69
80
|
* Introduced on 2020-04-17 as getTickablesForVoice(voiceIndex).
|
|
70
81
|
* https://github.com/0xfe/vexflow/blame/dc97b0cc5bb93171c0038638c34362dc958222ca/src/tickcontext.js#L63
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcqj/vexflow",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.9",
|
|
4
4
|
"description": "A JavaScript library for rendering music notation and guitar tablature.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "mcqj",
|
|
@@ -50,9 +50,10 @@
|
|
|
50
50
|
"url": "https://github.com/vexflow/vexflow/issues"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@eslint/js": "^
|
|
53
|
+
"@eslint/js": "^10.0.1",
|
|
54
|
+
"@napi-rs/canvas": "^1.2.0",
|
|
54
55
|
"@playwright/test": "^1.63.0",
|
|
55
|
-
"@types/node": "^
|
|
56
|
+
"@types/node": "^26.6.6",
|
|
56
57
|
"@typescript-eslint/eslint-plugin": "^8.33.1",
|
|
57
58
|
"@typescript-eslint/parser": "^8.33.1",
|
|
58
59
|
"@vexflow-fonts/academico": "^1.0.1",
|
|
@@ -65,16 +66,16 @@
|
|
|
65
66
|
"@vexflow-fonts/petalumascript": "^1.0.0",
|
|
66
67
|
"@vexflow-fonts/sebastian": "^1.0.1",
|
|
67
68
|
"canvas": "^3.1.0",
|
|
68
|
-
"eslint": "^
|
|
69
|
+
"eslint": "^10.15.0",
|
|
69
70
|
"eslint-plugin-import-x": "^4.17.1",
|
|
70
|
-
"eslint-plugin-simple-import-sort": "^
|
|
71
|
+
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
71
72
|
"globals": "^17.12.0",
|
|
72
|
-
"jsdom": "^
|
|
73
|
+
"jsdom": "^31.0.1",
|
|
73
74
|
"jspdf": "^4.0.0",
|
|
74
75
|
"magic-string": "^1.2.3",
|
|
75
76
|
"opentype.js": "^2.0.0",
|
|
76
77
|
"svg2pdf.js": "^2.5.0",
|
|
77
|
-
"typescript": "^
|
|
78
|
+
"typescript": "^6.0.3",
|
|
78
79
|
"vite": "^8.2.2",
|
|
79
80
|
"vitest": "^5.0.0"
|
|
80
81
|
},
|
|
@@ -108,13 +109,9 @@
|
|
|
108
109
|
"guitar",
|
|
109
110
|
"tablature"
|
|
110
111
|
],
|
|
111
|
-
"overrides": {
|
|
112
|
-
"undici": "6.23.0"
|
|
113
|
-
},
|
|
114
112
|
"allowScripts": {
|
|
115
113
|
"canvas@3.2.3": true,
|
|
116
|
-
"core-js@3.
|
|
117
|
-
"fsevents@2.3.3": true
|
|
118
|
-
"unrs-resolver@1.12.2": true
|
|
114
|
+
"core-js@3.51.0": true,
|
|
115
|
+
"fsevents@2.3.3": true
|
|
119
116
|
}
|
|
120
117
|
}
|