@barmark/render 0.4.0 → 0.5.0
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 +13 -1
- package/README.md +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ package uses [semantic versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.5.0] - 2026-11-02
|
|
10
|
+
|
|
11
|
+
The spoken name of a chord, for other tools. barmark.dev's /try page
|
|
12
|
+
uses it.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`speakChord(record, key?)`**: the spoken name the chart gives a chord
|
|
17
|
+
("C minor seven flat five"; with a key, its degree too), for screen
|
|
18
|
+
readers and other tools.
|
|
19
|
+
|
|
9
20
|
## [0.4.0] - 2026-11-01
|
|
10
21
|
|
|
11
22
|
Chords as Nashville numbers or Roman numerals, and a little air between
|
|
@@ -158,7 +169,8 @@ that needs no script or as the `<barmark-chart>` web component. Requires
|
|
|
158
169
|
zoom without sideways scrolling, the element renders and re-renders, and
|
|
159
170
|
a screen reader hears "bar 9: D". Run them with `bun run test:browser`.
|
|
160
171
|
|
|
161
|
-
[Unreleased]: https://github.com/kevinpeckham/barmark/compare/render-v0.
|
|
172
|
+
[Unreleased]: https://github.com/kevinpeckham/barmark/compare/render-v0.5.0...HEAD
|
|
173
|
+
[0.5.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.4.0...render-v0.5.0
|
|
162
174
|
[0.4.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.3.0...render-v0.4.0
|
|
163
175
|
[0.3.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.2.1...render-v0.3.0
|
|
164
176
|
[0.2.1]: https://github.com/kevinpeckham/barmark/compare/render-v0.2.0...render-v0.2.1
|
package/README.md
CHANGED
|
@@ -92,6 +92,21 @@ no key, note sets, N.C., `?` and `--` look as they always do, and a
|
|
|
92
92
|
screen reader hears both: "bar 5: five, A seven". Numbered chords carry
|
|
93
93
|
`data-numeral`. It's a view: the music and bar numbers don't change.
|
|
94
94
|
|
|
95
|
+
### Spoken names
|
|
96
|
+
|
|
97
|
+
`speakChord(record, key?)` gives a chord the name a screen reader hears
|
|
98
|
+
in the chart, for other tools that want to say a chord aloud:
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
import { parseChord } from "barmark";
|
|
102
|
+
import { speakChord } from "@barmark/render";
|
|
103
|
+
|
|
104
|
+
const r = parseChord("Cø");
|
|
105
|
+
if (r.ok) speakChord(r.value); // "C minor seven flat five"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
With a key, it speaks the degree too, as the numerals view does.
|
|
109
|
+
|
|
95
110
|
## Styling on purpose
|
|
96
111
|
|
|
97
112
|
Set these custom properties on the element or anything above it:
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export type { Numerals } from "./chord.js";
|
|
|
2
2
|
export { FONT_FAMILY, fontFaceCss } from "./font.js";
|
|
3
3
|
export { type RenderOptions, renderChart, renderChartUnwrapped } from "./html.js";
|
|
4
4
|
export { layoutChart } from "./model.js";
|
|
5
|
+
export { speakChord } from "./speech.js";
|
|
5
6
|
export { stylesheet } from "./styles.js";
|
|
6
7
|
export type * from "./types.js";
|
package/dist/index.js
CHANGED
package/package.json
CHANGED