@tangle-network/charts 2.0.1 → 2.0.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.
- package/dist/react/flow-waterfall.css +5 -5
- package/dist/react/index.js +45 -39
- package/package.json +1 -1
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
--fw-h1: light-dark(oklch(from var(--tone-blue-icon) .58 .11 calc(h + 39)), oklch(from var(--tone-blue-icon) .67 .11 calc(h + 39)));
|
|
22
22
|
--fw-h2: light-dark(oklch(from var(--tone-violet-icon) .55 .11 h), oklch(from var(--tone-violet-icon) .70 .11 h));
|
|
23
23
|
--fw-h3: light-dark(oklch(from var(--tone-pink-icon) .55 .11 h), oklch(from var(--tone-pink-icon) .67 .11 calc(h - 16)));
|
|
24
|
-
--fw-h4: light-dark(oklch(from var(--tone-cyan-icon) .
|
|
25
|
-
--fw-h5: light-dark(oklch(from var(--tone-blue-icon) .58 .
|
|
24
|
+
--fw-h4: light-dark(oklch(from var(--tone-cyan-icon) .578 .11 calc(h - 22.894)), oklch(from var(--tone-cyan-icon) .67 .11 calc(h - 26.148)));
|
|
25
|
+
--fw-h5: light-dark(oklch(from var(--tone-blue-icon) .58 .11 calc(h + 37.6)), oklch(from var(--tone-blue-icon) .67 .11 calc(h + 29.5)));
|
|
26
26
|
--fw-ease: var(--ease-standard, cubic-bezier(.2,.8,.2,1));
|
|
27
27
|
--fw-bar-h: 20px;
|
|
28
28
|
--fw-label-col: min(var(--fw-name-w), 42%);
|
|
@@ -268,11 +268,11 @@
|
|
|
268
268
|
.fw-root .fw-glyph svg { width: 11px; height: 11px; stroke-width: 2; }
|
|
269
269
|
.fw-root .fw-seg-model .fw-glyph, .fw-root .fw-k-model .fw-glyph { color: light-dark(var(--tone), var(--fw-text)); }
|
|
270
270
|
.fw-root .fw-end { z-index: 2; display: inline-flex; align-items: center; gap: 8px; top: calc(50% + var(--fw-bar-shift) - var(--fw-bar-h) / 2); height: var(--fw-bar-h);
|
|
271
|
-
left: min(calc(var(--x0) + max(var(--w), 3px) + 4px), calc(100% - var(--fw-end-w, 0px) -
|
|
271
|
+
left: min(calc(var(--x0) + max(var(--w), 3px) + 4px), calc(100% - var(--fw-end-w, 0px) - 4px)); padding: 0 4px; border-radius: var(--radius-tag);
|
|
272
272
|
background: linear-gradient(var(--fw-tint, transparent) 0 0), var(--fw-surface); white-space: nowrap; pointer-events: none; }
|
|
273
273
|
.fw-root .fw-duration { font-size: 14px; color: var(--fw-muted); font-variant-numeric: tabular-nums; }
|
|
274
274
|
.fw-root .fw-k-failed ~ .fw-end .fw-duration { color: var(--fw-failed); }
|
|
275
|
-
.fw-root .fw-badge { height:
|
|
275
|
+
.fw-root .fw-badge { display: inline-flex; flex: none; height: 18px; padding: 0 6px; border-radius: var(--radius-pill); font-size: 12px; line-height: 18px; font-weight: 500; color: var(--fw-muted); background: transparent; box-shadow: inset 0 0 0 1px var(--fw-border); }
|
|
276
276
|
|
|
277
277
|
.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; }
|
|
278
278
|
.fw-root .fw-link {
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
|
|
353
353
|
@media (prefers-reduced-motion: reduce) {
|
|
354
354
|
.fw-root *, .fw-root *::before { animation: none !important; transition: opacity var(--duration-fast) !important; }
|
|
355
|
-
.fw-root [data-motion="essential"], .fw-root [data-motion="essential"]::before { animation: tangle-breathe var(--motion-ambient) infinite !important; }
|
|
355
|
+
.fw-root :is(.fw-agent-dot, .fw-spinner)[data-motion="essential"], .fw-root .fw-state-live[data-motion="essential"]::before { animation: tangle-breathe var(--motion-ambient) infinite !important; }
|
|
356
356
|
}
|
|
357
357
|
|
|
358
358
|
.fw-root-agents .fw-heading { border-bottom: 0; padding: 20px 24px 12px; }
|
package/dist/react/index.js
CHANGED
|
@@ -6822,17 +6822,15 @@ function criticalPathIds(rows) {
|
|
|
6822
6822
|
function agentCallouts(agents, clockMs) {
|
|
6823
6823
|
let slowest, slowestMs = -1, costliest, top = -1, priced = 0, timed = 0;
|
|
6824
6824
|
for (const row of agents) {
|
|
6825
|
-
if (row.durationLabel === "—" || row.span.startMs > clockMs || row.kind !== "pipeline" || row.id.startsWith("family:") || row.id.startsWith("run:")) continue;
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
slowestMs = ms;
|
|
6832
|
-
}
|
|
6825
|
+
if (row.durationLabel === "—" || row.span.startMs > clockMs || row.kind !== "pipeline" || row.hasAgents || row.id.startsWith("family:") || row.id.startsWith("run:")) continue;
|
|
6826
|
+
const ms = (spanRunning(row.span) ? Math.max(row.span.endMs, clockMs) : Math.min(row.span.endMs, clockMs)) - row.span.startMs;
|
|
6827
|
+
timed += 1;
|
|
6828
|
+
if (ms > slowestMs) {
|
|
6829
|
+
slowest = row;
|
|
6830
|
+
slowestMs = ms;
|
|
6833
6831
|
}
|
|
6834
6832
|
const cost = row.span.costUsd ?? row.rollupCostUsd;
|
|
6835
|
-
if (cost
|
|
6833
|
+
if (typeof cost !== "number" || !Number.isFinite(cost)) continue;
|
|
6836
6834
|
priced += 1;
|
|
6837
6835
|
if (cost > top) {
|
|
6838
6836
|
costliest = row;
|
|
@@ -7366,6 +7364,7 @@ function Table({ rows }) {
|
|
|
7366
7364
|
/** The span card: what ran, for how long, on what tokens and at what recorded cost, then its input and output. */
|
|
7367
7365
|
function SpanCard({ id, row, agent, clockMs, left, top, pinned, onClose, renderIcon, compact }) {
|
|
7368
7366
|
const span = row.span;
|
|
7367
|
+
const failure = span.facts?.find((fact) => fact.label.toLowerCase() === "failure")?.value;
|
|
7369
7368
|
const state = runStatus(span.status ?? "unknown");
|
|
7370
7369
|
const meta = statusMeta(state);
|
|
7371
7370
|
const status = meta.label;
|
|
@@ -7438,14 +7437,14 @@ function SpanCard({ id, row, agent, clockMs, left, top, pinned, onClose, renderI
|
|
|
7438
7437
|
close
|
|
7439
7438
|
]
|
|
7440
7439
|
}),
|
|
7441
|
-
/* @__PURE__ */ jsx(Table, { rows: metrics(who, clockMs, false) }),
|
|
7440
|
+
/* @__PURE__ */ jsx(Table, { rows: metrics(who, clockMs, false).filter(([label]) => label.toLowerCase() !== "failure") }),
|
|
7442
7441
|
step && /* @__PURE__ */ jsx("p", {
|
|
7443
7442
|
className: "fw-card-step",
|
|
7444
7443
|
children: step
|
|
7445
7444
|
}),
|
|
7446
|
-
!row.ok && /* @__PURE__ */
|
|
7445
|
+
!row.ok && /* @__PURE__ */ jsx("p", {
|
|
7447
7446
|
className: "fw-card-error",
|
|
7448
|
-
children:
|
|
7447
|
+
children: failure ? `Failure: ${failure}` : span.output ? `Recorded output: ${span.output}` : "Failure detail not reported"
|
|
7449
7448
|
}),
|
|
7450
7449
|
sentence && row.ok && /* @__PURE__ */ jsx("p", {
|
|
7451
7450
|
className: "fw-card-result",
|
|
@@ -7492,6 +7491,10 @@ function SpanCard({ id, row, agent, clockMs, left, top, pinned, onClose, renderI
|
|
|
7492
7491
|
]
|
|
7493
7492
|
}),
|
|
7494
7493
|
/* @__PURE__ */ jsx(Table, { rows: metrics(row, clockMs, true) }),
|
|
7494
|
+
!row.ok && !span.output && !failure && /* @__PURE__ */ jsx("p", {
|
|
7495
|
+
className: "fw-card-error",
|
|
7496
|
+
children: "Failure detail not reported"
|
|
7497
|
+
}),
|
|
7495
7498
|
span.input && /* @__PURE__ */ jsxs("div", {
|
|
7496
7499
|
className: "fw-card-text",
|
|
7497
7500
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -7503,7 +7506,7 @@ function SpanCard({ id, row, agent, clockMs, left, top, pinned, onClose, renderI
|
|
|
7503
7506
|
className: "fw-card-text",
|
|
7504
7507
|
children: [/* @__PURE__ */ jsx("div", {
|
|
7505
7508
|
className: "fw-card-label",
|
|
7506
|
-
children: row.ok ? "Output" : "
|
|
7509
|
+
children: row.ok ? "Output" : "Recorded output"
|
|
7507
7510
|
}), /* @__PURE__ */ jsx("p", { children: span.output })]
|
|
7508
7511
|
})
|
|
7509
7512
|
]
|
|
@@ -7602,6 +7605,15 @@ const FlowRow = memo(function FlowRow(props) {
|
|
|
7602
7605
|
const step = agentView && row.stepOf !== void 0;
|
|
7603
7606
|
const opens = family || agentView && isAgent && row.own.length > 0;
|
|
7604
7607
|
const outcomes = row.outcomes ?? (span.outcome ? [span.outcome] : []);
|
|
7608
|
+
const callouts = /* @__PURE__ */ jsxs(Fragment, { children: [slowest && /* @__PURE__ */ jsx("span", {
|
|
7609
|
+
className: "fw-badge",
|
|
7610
|
+
title: agentView ? "Longest elapsed leaf agent" : "Longest elapsed leaf step",
|
|
7611
|
+
children: agentView ? "Longest leaf" : "Longest step"
|
|
7612
|
+
}), costliest && /* @__PURE__ */ jsx("span", {
|
|
7613
|
+
className: "fw-badge",
|
|
7614
|
+
title: "Highest reported cost among priced leaf agents",
|
|
7615
|
+
children: "Costliest leaf"
|
|
7616
|
+
})] });
|
|
7605
7617
|
return /* @__PURE__ */ jsxs("div", {
|
|
7606
7618
|
role: "row",
|
|
7607
7619
|
"data-span-id": row.id,
|
|
@@ -7621,8 +7633,7 @@ const FlowRow = memo(function FlowRow(props) {
|
|
|
7621
7633
|
style: {
|
|
7622
7634
|
"--row-y": `${top}px`,
|
|
7623
7635
|
"--fw-enter-delay": `${motion?.enter ?? 0}ms`,
|
|
7624
|
-
"--fw-end-w": `${endLabelWidth(label)}px
|
|
7625
|
-
"--fw-badge-w": `${(slowest ? 80 : 0) + (costliest ? 90 : 0)}px`
|
|
7636
|
+
"--fw-end-w": `${endLabelWidth(label)}px`
|
|
7626
7637
|
},
|
|
7627
7638
|
onFocus: (event) => {
|
|
7628
7639
|
if (event.target === event.currentTarget) props.onActivate(row);
|
|
@@ -7713,7 +7724,8 @@ const FlowRow = memo(function FlowRow(props) {
|
|
|
7713
7724
|
className: "fw-name-text",
|
|
7714
7725
|
children: row.name
|
|
7715
7726
|
}),
|
|
7716
|
-
|
|
7727
|
+
!agentView && callouts,
|
|
7728
|
+
state !== "unknown" && !activity.quiet && /* @__PURE__ */ jsx("span", {
|
|
7717
7729
|
className: "fw-row-state",
|
|
7718
7730
|
style: { color: `var(${meta.token})` },
|
|
7719
7731
|
children: meta.label
|
|
@@ -7731,13 +7743,17 @@ const FlowRow = memo(function FlowRow(props) {
|
|
|
7731
7743
|
children: renderIcon(span)
|
|
7732
7744
|
}), /* @__PURE__ */ jsxs("span", {
|
|
7733
7745
|
className: "fw-subtitle-tail",
|
|
7734
|
-
children: [
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7746
|
+
children: [
|
|
7747
|
+
callouts,
|
|
7748
|
+
/* @__PURE__ */ jsx("span", {
|
|
7749
|
+
className: "fw-subtitle-text",
|
|
7750
|
+
children: summary[0]
|
|
7751
|
+
}),
|
|
7752
|
+
summary.slice(1).map((part) => /* @__PURE__ */ jsxs("span", {
|
|
7753
|
+
className: "fw-subtitle-extra",
|
|
7754
|
+
children: ["· ", part]
|
|
7755
|
+
}, part))
|
|
7756
|
+
]
|
|
7741
7757
|
})]
|
|
7742
7758
|
})]
|
|
7743
7759
|
}),
|
|
@@ -7755,7 +7771,7 @@ const FlowRow = memo(function FlowRow(props) {
|
|
|
7755
7771
|
role: "gridcell",
|
|
7756
7772
|
className: "fw-lane",
|
|
7757
7773
|
"data-waterfall-track": true,
|
|
7758
|
-
"aria-label": `${KIND_LABEL[span.kind]}, ${label}${slowest ? `,
|
|
7774
|
+
"aria-label": `${KIND_LABEL[span.kind]}, ${label}${slowest ? `, longest leaf ${agentView ? "agent" : "step"}` : ""}${costliest ? ", highest reported leaf-agent cost" : ""}${critical ? ", critical path" : ""}`,
|
|
7759
7775
|
children: invalid ? /* @__PURE__ */ jsx("span", {
|
|
7760
7776
|
className: "fw-invalid",
|
|
7761
7777
|
children: "—"
|
|
@@ -7797,23 +7813,13 @@ const FlowRow = memo(function FlowRow(props) {
|
|
|
7797
7813
|
events: props,
|
|
7798
7814
|
agentView
|
|
7799
7815
|
}, `${mark.id}-${i}`)),
|
|
7800
|
-
/* @__PURE__ */
|
|
7816
|
+
/* @__PURE__ */ jsx("span", {
|
|
7801
7817
|
className: "fw-end",
|
|
7802
7818
|
style: at(span.startMs, running ? OPEN_END : span.endMs),
|
|
7803
|
-
children:
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
}),
|
|
7808
|
-
slowest && /* @__PURE__ */ jsx("span", {
|
|
7809
|
-
className: "fw-badge",
|
|
7810
|
-
children: "Slowest"
|
|
7811
|
-
}),
|
|
7812
|
-
costliest && /* @__PURE__ */ jsx("span", {
|
|
7813
|
-
className: "fw-badge",
|
|
7814
|
-
children: "Costliest"
|
|
7815
|
-
})
|
|
7816
|
-
]
|
|
7819
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
7820
|
+
className: "fw-duration",
|
|
7821
|
+
children: label
|
|
7822
|
+
})
|
|
7817
7823
|
})
|
|
7818
7824
|
] })
|
|
7819
7825
|
})]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/charts",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.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",
|