agy-powerline 1.9.0 → 1.9.2

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 CHANGED
@@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.9.2] - 2026-10-28
9
+
10
+ ### Fixed
11
+
12
+ - Pills' meter dots stand out on every pill: filled dots take the pill's text color and empty ones a fainter shade of it, at 3:1 contrast or more, where light dots used to fade on the bright pills of dark themes and dark dots on the deep pills of light themes (#168)
13
+
14
+ ## [1.9.1] - 2026-10-28
15
+
16
+ ### Fixed
17
+
18
+ - Site audits no longer report missing alt text and offscreen images to defer on every page of agy-powerline.com: the language menu's flags are drawn by the stylesheet, and a closed menu doesn't load them (#166)
19
+ - agy-powerline.com's guides page has a section heading over its list of guides, which site audits reported missing (#166)
20
+ - Search engines no longer report missing pages such as agy-powerline.com/configure/widget-style or /proc/version: the configurator's script, whose module and sample paths they read as links, is now a file of its own that robots.txt keeps them off (#165)
21
+
8
22
  ## [1.9.0] - 2026-10-25
9
23
 
10
24
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agy-powerline",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "agy statusline for Google Antigravity CLI: live Gemini, Claude/GPT and Argon quota pacing, git, themes and an interactive TUI configurator",
5
5
  "bin": {
6
6
  "agy-powerline": "src/index.js"
package/src/lib/colors.js CHANGED
@@ -303,12 +303,17 @@ function readableText(background, preferred, fallbacks) {
303
303
  }
304
304
 
305
305
  // The color moved toward white (on a dark background) or black (on a light
306
- // one) just far enough to reach the minimum contrast.
307
- function withContrast(color, background, min = MIN_CONTRAST) {
306
+ // one), or toward the given target, just far enough to reach the minimum
307
+ // contrast.
308
+ function withContrast(
309
+ color,
310
+ background,
311
+ min = MIN_CONTRAST,
312
+ target = luminance(background) < 0.5 ? [255, 255, 255] : [0, 0, 0]
313
+ ) {
308
314
  if (contrastRatio(color, background) >= min) {
309
315
  return color;
310
316
  }
311
- const target = luminance(background) < 0.5 ? [255, 255, 255] : [0, 0, 0];
312
317
  for (let step = 1; step <= 20; step++) {
313
318
  const moved = mix(color, target, step / 20);
314
319
  if (contrastRatio(moved, background) >= min) {
@@ -17,6 +17,7 @@ const {
17
17
  getActiveDepth,
18
18
  gradientColors,
19
19
  readableText,
20
+ withContrast,
20
21
  } = require("../colors");
21
22
  const { gradientStops } = require("../themes");
22
23
  const { pickGlyph, glyphChar } = require("../powerline");
@@ -79,7 +80,8 @@ function fillMeter(pct, width, fillColor, emptyColor, segmentColor, pace = {}) {
79
80
  // pips, the default, needs a Unicode font: ASCII mode keeps the cells.
80
81
  const pips = pace.style === "pips";
81
82
  if (pips && !pace.ascii && getActiveDepth() !== "none") {
82
- return pipMeter(used, marker, width, fillColor, emptyColor) + bg(segmentColor);
83
+ const track = withContrast(segmentColor, segmentColor, PIP_CONTRAST, pace.textColor);
84
+ return pipMeter(used, marker, width, pace.textColor, track) + bg(segmentColor);
83
85
  }
84
86
  if (METER_STYLES[pace.style] && !(pips && pace.ascii)) {
85
87
  return glyphMeter(used, marker, width, METER_STYLES[pace.style], pace);
@@ -101,9 +103,14 @@ function fillMeter(pct, width, fillColor, emptyColor, segmentColor, pace = {}) {
101
103
  return meter + bg(segmentColor);
102
104
  }
103
105
 
104
- // Small dots on the pill's own color: the filled ones in the light fill color,
105
- // the rest in the dark track color, the same pair cells use. The pace marker
106
- // is a larger dot in the other color, so nothing in the meter is a line.
106
+ // Small dots on the pill's own color: the filled ones in the pill's text color,
107
+ // the rest in the pill's color moved toward it until they reach 3:1 (WCAG's
108
+ // minimum for graphics). A light fill and a dark track can't both stand out
109
+ // on every pill: on a bright one the light dots fade, on a deep one the dark
110
+ // ones do. The pace marker is a larger dot in the other color, so nothing in
111
+ // the meter is a line.
112
+ const PIP_CONTRAST = 3;
113
+
107
114
  function pipMeter(used, marker, width, fillColor, emptyColor) {
108
115
  let meter = "";
109
116
  let color = null;