@tangle-network/charts 0.18.0 → 0.18.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.
@@ -128,7 +128,7 @@
128
128
  .fw-root .fw-sticky { position: absolute; top: 0; left: 0; right: 0; z-index: 2; background: var(--fw-surface); box-shadow: 0 1px 0 var(--fw-border), 0 6px 12px -8px rgb(0 0 0 / .35); }
129
129
 
130
130
  /* Rows */
131
- .fw-root .fw-row { position: absolute; top: 0; left: 0; right: 0; height: var(--fw-row-h); display: grid; grid-template-columns: var(--fw-label-col) minmax(0, 1fr); outline: 0; contain: layout style; }
131
+ .fw-root .fw-row { position: absolute; top: 0; left: 0; right: 0; transform: translateY(var(--row-y)); height: var(--fw-row-h); display: grid; grid-template-columns: var(--fw-label-col) minmax(0, 1fr); outline: 0; contain: layout style; }
132
132
  .fw-root .fw-row:hover { background: var(--fw-hover); }
133
133
  .fw-root .fw-row.fw-active { background: color-mix(in oklab, var(--fw-accent) 7%, transparent); }
134
134
  .fw-root .fw-row[aria-selected="true"] { background: color-mix(in oklab, var(--fw-accent) 11%, transparent); }
@@ -198,6 +198,8 @@
198
198
  .fw-root .fw-legend li { display: inline-flex; align-items: center; gap: 8px; }
199
199
  .fw-root .fw-legend .fw-swatch { width: 12px; height: 8px; border-radius: 2px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
200
200
  .fw-root .fw-legend b { color: var(--fw-text); font-weight: 600; font-variant-numeric: tabular-nums; }
201
+ .fw-root .fw-legend .fw-swatch-step { display: inline-grid; place-items: center; width: 12px; height: 12px; border-radius: 3px; background: var(--fw-well); color: var(--fw-failed); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fw-failed) 50%, transparent); }
202
+ .fw-root .fw-legend .fw-swatch-step svg { width: 8px; height: 8px; }
201
203
  .fw-root .fw-bar.fw-approx { opacity: calc(var(--on) * .7); }
202
204
  .fw-root .fw-seg { width: max(calc(var(--w) - 2px), calc(var(--on) * 3px)); pointer-events: none; }
203
205
  .fw-root .fw-view-agents .fw-seg { pointer-events: auto; }
@@ -327,12 +329,12 @@
327
329
  @container (max-width: 899px) {
328
330
  /* The root is the queried container, so the variables go on its children. */
329
331
  .fw-root-agents > * { --fw-label-col: 0px; --fw-bar-shift: 8px; }
330
- .fw-root-agents .fw-view-agents .fw-label { position: absolute; z-index: 2; top: 4px; left: 0; right: 0; height: 18px; padding: 0 var(--fw-pad); gap: 8px; align-items: center; pointer-events: none; overflow: hidden; }
331
332
  .fw-root-agents .fw-view-agents .fw-names { flex-direction: row; align-items: baseline; gap: 8px; min-width: 0; }
332
333
  .fw-root-agents .fw-view-agents .fw-agent-dot { align-self: center; margin-top: 0; }
333
334
  /* The label leaves the grid flow, so the lane must claim the track column itself. */
334
335
  .fw-root-agents .fw-view-agents .fw-lane { grid-column: 2; }
335
- /* Elbows pass behind the name, not through its letters. */
336
- .fw-root-agents .fw-view-agents .fw-names { padding-right: 4px; border-radius: 4px; background: var(--fw-surface); }
337
- .fw-root-agents .fw-view-agents .fw-row:hover .fw-names { background: transparent; }
336
+ /* Elbows pass behind the name, not through its letters. A transform or layout containment would make each row
337
+ its own stacking context and trap the name under the connector layer, so stacked rows place by top instead. */
338
+ .fw-root-agents .fw-view-agents .fw-row { transform: none; top: var(--row-y); contain: style; }
339
+ .fw-root-agents .fw-view-agents .fw-label { position: absolute; z-index: 3; top: 4px; left: 0; height: 18px; max-width: calc(100% - var(--fw-pad)); padding: 0 8px 0 var(--fw-pad); gap: 8px; align-items: center; pointer-events: none; overflow: hidden; border-radius: 0 4px 4px 0; background: var(--fw-surface); }
338
340
  }
@@ -2876,7 +2876,7 @@ const FlowRow = memo(function FlowRow(props) {
2876
2876
  "data-tone": toneKey(row.tone),
2877
2877
  "data-outcome": span.outcome?.tone,
2878
2878
  className: `fw-row${active ? " fw-active" : ""}${sticky ? " fw-sticky-row" : ""}${isAgent ? " fw-agent-row" : ""}`,
2879
- style: { transform: `translateY(${top}px)` },
2879
+ style: { "--row-y": `${top}px` },
2880
2880
  onFocus: (event) => {
2881
2881
  if (event.target === event.currentTarget) props.onActivate(row);
2882
2882
  },
@@ -3718,10 +3718,11 @@ function OutcomeLegend({ agents }) {
3718
3718
  items.set(outcome.label, item);
3719
3719
  }
3720
3720
  if (items.size === 0) return null;
3721
- return /* @__PURE__ */ jsx("ul", {
3721
+ const failedSteps = agents.reduce((sum, row) => sum + row.own.reduce((n, mark) => n + (mark.kind === "failed" ? mark.count : 0), 0), 0);
3722
+ return /* @__PURE__ */ jsxs("ul", {
3722
3723
  className: "fw-legend",
3723
3724
  "aria-label": "Outcomes",
3724
- children: [...items].map(([label, item]) => /* @__PURE__ */ jsxs("li", { children: [
3725
+ children: [[...items].map(([label, item]) => /* @__PURE__ */ jsxs("li", { children: [
3725
3726
  /* @__PURE__ */ jsx("span", {
3726
3727
  className: "fw-swatch",
3727
3728
  "data-tone": "0",
@@ -3731,7 +3732,15 @@ function OutcomeLegend({ agents }) {
3731
3732
  label,
3732
3733
  " ",
3733
3734
  /* @__PURE__ */ jsx("b", { children: item.count })
3734
- ] }, label))
3735
+ ] }, label)), failedSteps > 0 && /* @__PURE__ */ jsxs("li", { children: [
3736
+ /* @__PURE__ */ jsx("span", {
3737
+ className: "fw-swatch-step",
3738
+ "aria-hidden": true,
3739
+ children: /* @__PURE__ */ jsx(FailGlyph, {})
3740
+ }),
3741
+ "Failed step ",
3742
+ /* @__PURE__ */ jsx("b", { children: failedSteps })
3743
+ ] })]
3735
3744
  });
3736
3745
  }
3737
3746
  const headlineSeconds = (ms) => ms < 6e4 ? `${(ms / 1e3).toFixed(1)}s` : formatSpanDuration(ms);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/charts",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
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",