unicode-animations 1.0.1 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unicode-animations",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Unicode spinner animations as raw frame data",
5
5
  "type": "module",
6
6
  "exports": {
@@ -63,6 +63,6 @@
63
63
  "vitest": "^3.0.0"
64
64
  },
65
65
  "dependencies": {
66
- "unicode-animations": "^1.0.0"
66
+ "unicode-animations": "^1.0.1"
67
67
  }
68
68
  }
@@ -51,6 +51,7 @@ try {
51
51
  }
52
52
 
53
53
  function pad(str, n) { return str + ' '.repeat(Math.max(0, n - str.length)); }
54
+ function padBraille(str, n) { return str + '\u2800'.repeat(Math.max(0, n - str.length)); }
54
55
 
55
56
  // ─── Title (box-drawing art) ───
56
57
  const titleLines = [
@@ -112,10 +113,10 @@ try {
112
113
  const name = row[c];
113
114
  const sp = S[name];
114
115
  const frame = sp.frames[tick % sp.frames.length];
115
- line += B + pad(frame, colFPad[c]) + R + ' ' + D + pad(name, NPAD) + R;
116
+ line += B + padBraille(frame, colFPad[c]) + R + ' ' + D + pad(name, NPAD) + R;
116
117
  if (c < 2) line += ' ';
117
118
  }
118
- buf += CL + line + '\n';
119
+ buf += CL + '\r' + line + '\n';
119
120
  }
120
121
  return buf;
121
122
  }
@@ -159,7 +160,7 @@ try {
159
160
  cleanup();
160
161
  return;
161
162
  }
162
- out.write(`\x1B[${ROWS}A`);
163
+ out.write(`\x1B[${ROWS}A\r`);
163
164
  out.write(renderGrid(tick));
164
165
  tick++;
165
166
  }, INTERVAL);