@barmark/render 0.7.1 → 0.7.3

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,26 @@ package uses [semantic versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.7.3] - 2026-11-03
10
+
11
+ Requires `barmark` 0.10.0. No change to the renderer's code: a page that
12
+ installs `barmark` 0.10.0 alongside it gets one copy instead of two.
13
+
14
+ ### Changed
15
+
16
+ - **Depends on `barmark` `^0.10.0`** (was `^0.9.0`, which in 0.x stops
17
+ short of 0.10.0).
18
+
19
+ ## [0.7.2] - 2026-11-02
20
+
21
+ Requires `barmark` 0.9.0, and shows its swing amount.
22
+
23
+ ### Added
24
+
25
+ - **A swing amount shows with its feel** (barmark's `swingPercent`): the
26
+ header reads "D major · swing 58%", and a mid-chart change "Feel shuffle
27
+ 58%". A later header `feel:` without an amount drops the earlier one.
28
+
9
29
  ## [0.7.1] - 2026-11-02
10
30
 
11
31
  Requires `barmark` 0.8.0. No change to the renderer's code: it now reads
@@ -203,7 +223,9 @@ that needs no script or as the `<barmark-chart>` web component. Requires
203
223
  zoom without sideways scrolling, the element renders and re-renders, and
204
224
  a screen reader hears "bar 9: D". Run them with `bun run test:browser`.
205
225
 
206
- [Unreleased]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.1...HEAD
226
+ [Unreleased]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.3...HEAD
227
+ [0.7.3]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.2...render-v0.7.3
228
+ [0.7.2]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.1...render-v0.7.2
207
229
  [0.7.1]: https://github.com/kevinpeckham/barmark/compare/render-v0.7.0...render-v0.7.1
208
230
  [0.7.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.6.0...render-v0.7.0
209
231
  [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.1",
3
+ "version": "0.7.3",
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.8.0"
50
+ "barmark": "^0.10.0"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "rm -rf dist && tsc -p tsconfig.build.json",