@enmaq/mdgl 0.3.0 → 0.3.1

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/eval.js CHANGED
@@ -274,8 +274,10 @@ class Grid {
274
274
  if (col < 0 || row < 0 || col >= this.w || row >= this.h || r === ' ' || alpha <= 0)
275
275
  return;
276
276
  const c = this.cells[row][col];
277
+ // source-over onto the cell's current colour: the glyph already there if any, else the (black) background
278
+ const dest = c.r !== ' ' ? c.fg : c.bg;
277
279
  c.r = r;
278
- c.fg = alpha >= 1 ? color : blend(color, alpha, c.bg);
280
+ c.fg = alpha >= 1 ? color : blend(color, alpha, dest);
279
281
  }
280
282
  }
281
283
  const q9 = (v) => Math.round(v * 1e9) / 1e9;
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RESET = exports.SHOW_CURSOR = exports.HIDE_CURSOR = exports.SYNC_END = exports.SYNC_BEGIN = exports.sanitizeRune = exports.plainText = exports.plainFallback = exports.play = exports.MAX_REQUEST_LINE = exports.mathInt = exports.handleLine = exports.fallbackFrame = exports.frameNs = exports.compileDocument = exports.compile = exports.graphemes = exports.graphemeRanges = exports.graphemeCount = exports.clusterWidth = exports.cellRune = exports.UNICODE_VERSION = exports.parse = exports.parseChecked = exports.checkDocument = exports.check = exports.VERSION = void 0;
4
4
  // @enmaq/mdgl: MDGL 0.1 parser and checker (development tree; evaluator and
5
5
  // rendering are not implemented yet). Spec: ../SPEC.md
6
- exports.VERSION = '0.3.0';
6
+ exports.VERSION = '0.3.1';
7
7
  var check_1 = require("./check");
8
8
  Object.defineProperty(exports, "check", { enumerable: true, get: function () { return check_1.check; } });
9
9
  Object.defineProperty(exports, "checkDocument", { enumerable: true, get: function () { return check_1.checkDocument; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enmaq/mdgl",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "MDGL 0.1 parser, checker, evaluator, terminal-cell renderer and terminal player.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",