@barmark/render 0.7.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/dist/html.js +2 -2
- package/dist/model.js +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ package uses [semantic versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.7.2] - 2026-11-02
|
|
10
|
+
|
|
11
|
+
Requires `barmark` 0.9.0, and shows its swing amount.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **A swing amount shows with its feel** (barmark's `swingPercent`): the
|
|
16
|
+
header reads "D major · swing 58%", and a mid-chart change "Feel shuffle
|
|
17
|
+
58%". A later header `feel:` without an amount drops the earlier one.
|
|
18
|
+
|
|
9
19
|
## [0.7.1] - 2026-11-02
|
|
10
20
|
|
|
11
21
|
Requires `barmark` 0.8.0. No change to the renderer's code: it now reads
|
|
@@ -203,7 +213,8 @@ that needs no script or as the `<barmark-chart>` web component. Requires
|
|
|
203
213
|
zoom without sideways scrolling, the element renders and re-renders, and
|
|
204
214
|
a screen reader hears "bar 9: D". Run them with `bun run test:browser`.
|
|
205
215
|
|
|
206
|
-
[Unreleased]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.
|
|
216
|
+
[Unreleased]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.2...HEAD
|
|
217
|
+
[0.7.2]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.1...render-v0.7.2
|
|
207
218
|
[0.7.1]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.0...render-v0.7.1
|
|
208
219
|
[0.7.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.6.0...render-v0.7.0
|
|
209
220
|
[0.6.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.5.0...render-v0.6.0
|
package/dist/html.js
CHANGED
|
@@ -53,7 +53,7 @@ function tempoChangeText(c) {
|
|
|
53
53
|
return c.kind;
|
|
54
54
|
return `${c.kind}.${c.to === null ? "" : ` to ♩ = ${c.to}`}`;
|
|
55
55
|
}
|
|
56
|
-
/** "D major · 4/4 · ♩ = 145 · swing", escaped; labelled, "Key D major · Time 4/4 · …". */
|
|
56
|
+
/** "D major · 4/4 · ♩ = 145 · swing" (or "swing 58%"), escaped; labelled, "Key D major · Time 4/4 · …". */
|
|
57
57
|
function metaText(d, labelled = false) {
|
|
58
58
|
return [
|
|
59
59
|
["Key", d.key ? `${glyphs(d.key.tonic)} ${d.key.mode}` : ""],
|
|
@@ -64,7 +64,7 @@ function metaText(d, labelled = false) {
|
|
|
64
64
|
d.tempoChange?.kind === "a tempo" ? "" : "Tempo",
|
|
65
65
|
d.tempoChange ? tempoChangeText(d.tempoChange) : "",
|
|
66
66
|
],
|
|
67
|
-
["Feel", d.feel
|
|
67
|
+
["Feel", d.feel ? `${d.feel}${d.swingPercent === undefined ? "" : ` ${d.swingPercent}%`}` : ""],
|
|
68
68
|
]
|
|
69
69
|
.filter(([, value]) => value)
|
|
70
70
|
.map(([label, value]) => escapeHtml(labelled && label ? `${label} ${value}` : (value ?? "")))
|
package/dist/model.js
CHANGED
|
@@ -75,6 +75,9 @@ function splitHeader(lines) {
|
|
|
75
75
|
continue;
|
|
76
76
|
if (l?.kind !== "directive")
|
|
77
77
|
break;
|
|
78
|
+
// A new feel replaces the old one whole, its amount included.
|
|
79
|
+
if (l.set.feel)
|
|
80
|
+
delete header.swingPercent;
|
|
78
81
|
Object.assign(header, l.set);
|
|
79
82
|
}
|
|
80
83
|
return { header, body: lines.slice(i).filter((l) => l.kind !== "title") };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barmark/render",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Render barmark chord charts as a clean, accessible bar grid: HTML with Declarative Shadow DOM, or the <barmark-chart> web component.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"url": "https://github.com/kevinpeckham/barmark/issues"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"barmark": "^0.
|
|
50
|
+
"barmark": "^0.9.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|