instruments-chords 0.0.5 → 0.0.7

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.
@@ -12,7 +12,7 @@ export function getChordSvg(root, quality) {
12
12
  <svg
13
13
  width="${SVG_WIDTH}"
14
14
  height="${SVG_HEIGHT}"
15
- viewBox="0 0 ${SVG_WIDTH} ${SVG_HEIGHT}"
15
+ viewBox="0 0 ${SVG_WIDTH + 20} ${SVG_HEIGHT}"
16
16
  xmlns="http://www.w3.org/2000/svg"
17
17
  >
18
18
  ${base}
package/dist/svg/base.js CHANGED
@@ -1,15 +1,15 @@
1
- import { STRING_COUNT, FRET_COUNT, STRING_SPACING, FRET_SPACING, START_X, START_Y, } from './constants';
1
+ import { STRING_COUNT, FRET_COUNT, STRING_SPACING, FRET_SPACING, START_X, START_Y } from './constants';
2
2
  export function renderBase() {
3
3
  let svg = '';
4
4
  // cuerdas
5
5
  for (let i = 0; i < STRING_COUNT; i++) {
6
6
  const x = START_X + i * STRING_SPACING;
7
- svg += `<line x1="${x}" y1="${START_Y}" x2="${x}" y2="${START_Y + FRET_SPACING * FRET_COUNT}" stroke="black"/>`;
7
+ svg += `<line x1="${x}" y1="${START_Y}" x2="${x}" y2="${START_Y + FRET_SPACING * FRET_COUNT}" stroke="currentcolor"/>`;
8
8
  }
9
9
  // trastes
10
10
  for (let i = 0; i <= FRET_COUNT; i++) {
11
11
  const y = START_Y + i * FRET_SPACING;
12
- svg += `<line x1="${START_X}" y1="${y}" x2="${START_X + STRING_SPACING * (STRING_COUNT - 1)}" y2="${y}" stroke="black"/>`;
12
+ svg += `<line x1="${START_X}" y1="${y}" x2="${START_X + STRING_SPACING * (STRING_COUNT - 1)}" y2="${y}" stroke="currentcolor"/>`;
13
13
  }
14
14
  return svg;
15
15
  }
@@ -5,14 +5,14 @@ export function renderMarkers(chord) {
5
5
  const s = Number(string);
6
6
  const x = getStringX(s);
7
7
  if (fret === 'x') {
8
- svg += `<text x="${x}" y="20" text-anchor="middle">x</text>`;
8
+ svg += `<text x="${x}" y="20" text-anchor="middle" fill="currentcolor">x</text>`;
9
9
  }
10
10
  else if (fret === 0) {
11
- svg += `<circle cx="${x}" cy="20" r="5" fill="none" stroke="black"/>`;
11
+ svg += `<circle cx="${x}" cy="17" r="5" fill="none" stroke="currentcolor"/>`;
12
12
  }
13
13
  else {
14
14
  const y = getFretY(fret);
15
- svg += `<circle cx="${x}" cy="${y}" r="6" fill="black"/>`;
15
+ svg += `<circle cx="${x}" cy="${y}" r="6" fill="currentcolor"/>`;
16
16
  }
17
17
  }
18
18
  return svg;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instruments-chords",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Guitar chords database for developers",