@onjmin/dtm 0.1.80 → 0.1.81

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/dist/index.js CHANGED
@@ -7062,9 +7062,10 @@ var loadDrumFont = (ctx, pitch) => {
7062
7062
  return p;
7063
7063
  };
7064
7064
  var BAR_SEP = /[|ll→]/;
7065
+ var toHalfWidth = (str) => str.replace(/[!-~]/g, (ch) => String.fromCharCode(ch.charCodeAt(0) - 65248)).replace(/ /g, " ");
7065
7066
  var NON_EVENT_RE = /^[=_]$|^N\.C\.$|^N$/i;
7066
7067
  var buildDisplayLines = (chords, eventsCount) => {
7067
- const rawLines = chords.split("\n").map((l) => l.trim()).filter((l) => l);
7068
+ const rawLines = toHalfWidth(chords).split("\n").map((l) => l.trim()).filter((l) => l);
7068
7069
  const displayLines = [];
7069
7070
  let eventCounter = 0;
7070
7071
  let colorIdx = 0;
package/dist/index.mjs CHANGED
@@ -6939,9 +6939,10 @@ var loadDrumFont = (ctx, pitch) => {
6939
6939
  return p;
6940
6940
  };
6941
6941
  var BAR_SEP = /[|ll→]/;
6942
+ var toHalfWidth = (str) => str.replace(/[!-~]/g, (ch) => String.fromCharCode(ch.charCodeAt(0) - 65248)).replace(/ /g, " ");
6942
6943
  var NON_EVENT_RE = /^[=_]$|^N\.C\.$|^N$/i;
6943
6944
  var buildDisplayLines = (chords, eventsCount) => {
6944
- const rawLines = chords.split("\n").map((l) => l.trim()).filter((l) => l);
6945
+ const rawLines = toHalfWidth(chords).split("\n").map((l) => l.trim()).filter((l) => l);
6945
6946
  const displayLines = [];
6946
6947
  let eventCounter = 0;
6947
6948
  let colorIdx = 0;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "onjmin",
3
3
  "license": "MIT",
4
4
  "name": "@onjmin/dtm",
5
- "version": "0.1.80",
5
+ "version": "0.1.81",
6
6
  "description": "MMLを中間言語に用いた、モバイルファーストなDAW / ピアノロール打ち込みコンポーネント",
7
7
  "homepage": "https://onjmin.github.io/dtm",
8
8
  "repository": {