@tangle-network/charts 0.20.2 → 0.20.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.
@@ -262,7 +262,8 @@
262
262
  .fw-root .fw-badge { height: 18px; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--fw-amber); background: color-mix(in oklab, var(--fw-amber) 13%, transparent); border: 1px solid color-mix(in oklab, var(--fw-amber) 28%, transparent); }
263
263
 
264
264
  /* Handoff elbows: 1.5 px stroke, 6 px radius, a 5 px dot where the handoff leaves its sender. */
265
- .fw-root .fw-links { position: absolute; top: 0; bottom: 0; left: var(--fw-label-col); right: 0; overflow: hidden; pointer-events: none; z-index: 1; }
265
+ /* Under the rows (which follow it), so end labels and badges always sit above the connectors. */
266
+ .fw-root .fw-links { position: absolute; top: 0; bottom: 0; left: var(--fw-label-col); right: 0; overflow: hidden; pointer-events: none; z-index: 0; }
266
267
  .fw-root .fw-link {
267
268
  --x: calc(var(--fw-pad) + (var(--s) - var(--fw-v0)) * var(--fw-k) * 1px);
268
269
  position: absolute; width: 8px; border: 0 solid var(--line); border-bottom-width: 1.5px; translate: 0 var(--fw-bar-shift);
@@ -2663,7 +2663,8 @@ function agentFamilies(agents, open) {
2663
2663
  detail: members[0].span.detail,
2664
2664
  meta: {
2665
2665
  failedAgents: failed,
2666
- costPartial: known.length < members.length
2666
+ costPartial: known.length < members.length,
2667
+ members: members.map((row) => row.id)
2667
2668
  }
2668
2669
  }
2669
2670
  });
@@ -2780,6 +2781,16 @@ function stepRuns(steps) {
2780
2781
  }
2781
2782
  return out;
2782
2783
  }
2784
+ /** A row as the view draws it: its drawn copy, or for a member of a folded family, itself in the family's hue. */
2785
+ function drawnRow(row, visible) {
2786
+ const drawn = visible.find((item) => item.id === row.id);
2787
+ if (drawn) return drawn;
2788
+ const family = visible.find((item) => (item.span.meta?.members)?.includes(row.id));
2789
+ return family ? {
2790
+ ...row,
2791
+ tone: family.tone
2792
+ } : row;
2793
+ }
2783
2794
  //#endregion
2784
2795
  //#region src/react/flow-waterfall-icons.tsx
2785
2796
  const svg = (children, label) => /* @__PURE__ */ jsx("svg", {
@@ -4550,7 +4561,7 @@ function FlowWaterfall({ trace, live, startedAt, label = "Trace waterfall", defa
4550
4561
  const busy = agents.reduce((sum, row) => sum + busyMs(row, limit), 0);
4551
4562
  const speedup = limit > 0 ? busy / limit : 0;
4552
4563
  const done = !isLive && !trace.spans.some(spanRunning);
4553
- const shown = (row) => row && (visible.find((item) => item.id === row.id) ?? row);
4564
+ const shown = (row) => row && drawnRow(row, visible);
4554
4565
  const cardRow = shown(card ? byId.get(card.target) : void 0);
4555
4566
  const cardAgent = cardRow && (() => {
4556
4567
  for (let cursor = cardRow; cursor; cursor = cursor.parentId ? byId.get(cursor.parentId) : void 0) if (cursor.kind === "pipeline") return shown(cursor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/charts",
3
- "version": "0.20.2",
3
+ "version": "0.20.3",
4
4
  "description": "Static SVG and HTML figures for benchmarks and operational timing. Draws from producer data and refuses what it cannot draw honestly.",
5
5
  "type": "module",
6
6
  "license": "MIT",