@barmark/render 0.7.0 → 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 CHANGED
@@ -6,6 +6,29 @@ 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
+
19
+ ## [0.7.1] - 2026-11-02
20
+
21
+ Requires `barmark` 0.8.0. No change to the renderer's code: it now reads
22
+ charts with `barmark` 0.8.0's rules (`(add9)` and friends inside
23
+ parentheses, the clearer empty-section message), so a page that installs
24
+ `barmark` 0.8.0 alongside it gets one copy instead of two.
25
+
26
+ ### Changed
27
+
28
+ - **Depends on `barmark` `^0.8.0`** (was `^0.7.0`, which in 0.x stops
29
+ short of 0.8.0 and made npm install a second, older copy for the
30
+ renderer).
31
+
9
32
  ## [0.7.0] - 2026-11-02
10
33
 
11
34
  Power chords in the numerals views. Requires `barmark` 0.7.0.
@@ -190,7 +213,9 @@ that needs no script or as the `<barmark-chart>` web component. Requires
190
213
  zoom without sideways scrolling, the element renders and re-renders, and
191
214
  a screen reader hears "bar 9: D". Run them with `bun run test:browser`.
192
215
 
193
- [Unreleased]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.0...HEAD
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
218
+ [0.7.1]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.0...render-v0.7.1
194
219
  [0.7.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.6.0...render-v0.7.0
195
220
  [0.6.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.5.0...render-v0.6.0
196
221
  [0.5.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.4.0...render-v0.5.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.0",
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.7.0"
50
+ "barmark": "^0.9.0"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "rm -rf dist && tsc -p tsconfig.build.json",