@danxbot/ui 15.12.3 → 15.14.0

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.
@@ -395,6 +395,33 @@ export interface ProgressRingSegmentsProps extends ProgressRingBase {
395
395
  * and readers act on different halves of it.
396
396
  */
397
397
  remainderLabel?: string;
398
+ /**
399
+ * Overrides the centre number — and `aria-valuenow` with it — instead of
400
+ * the library's own `percentOf(used, total)`.
401
+ *
402
+ * DX-3766: `percentOf(used, total)` answers "how much of what's DRAWN is
403
+ * used", which is the right fact only when the segments are a partial fill
404
+ * (a context window, a disk budget) with real room left on the track. A
405
+ * caller who draws every category that makes up the whole — a plan
406
+ * header's In Progress/Ready/Archive/Review/Done breakdown, where the
407
+ * segments ARE the total by construction — gets a permanent, useless 100%
408
+ * out of that formula, because `used` always equals `total`. There is no
409
+ * way to get a DIFFERENT number (e.g. "Done ÷ total") out of the segments
410
+ * without either lying about what's drawn or losing the multi-arc colour
411
+ * breakdown entirely.
412
+ *
413
+ * A plain number, read the same way the computed percent is: rounded for
414
+ * display, and separately clamped to [0, 100] for `aria-valuenow` (which
415
+ * `aria-valuemax` already declares as the ceiling) — the visible digit
416
+ * still shows the caller's real number even past 100, exactly as the
417
+ * computed percent does on an over-sum ring; only the announced value is
418
+ * bounded.
419
+ *
420
+ * The ring's description (`aria-describedby`) is NOT affected — it still
421
+ * names the true segment breakdown, because that fact doesn't change just
422
+ * because the centre is showing a different number.
423
+ */
424
+ centerValue?: number;
398
425
  value?: never;
399
426
  tone?: never;
400
427
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "15.12.3",
3
+ "version": "15.14.0",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",