@tangle-network/charts 0.21.18 → 0.21.20
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 +25 -24
- package/dist/react/index.js +29 -26
- package/package.json +1 -1
|
@@ -272,8 +272,8 @@
|
|
|
272
272
|
.fw-root .fw-kinds { margin: 0; padding: 0; justify-content: flex-start; color: var(--fw-muted); }
|
|
273
273
|
.fw-root .fw-kinds .fw-swatch-model { width: 12px; height: 8px; border-radius: 2px; background: var(--fw-kind-model); }
|
|
274
274
|
/* With per-agent hues the key shows kind as shade, as the bars do: darker for a model call, lighter for a tool call. */
|
|
275
|
-
.fw-root.fw-fill-agent .fw-kinds .fw-swatch-model { background:
|
|
276
|
-
.fw-root.fw-fill-agent .fw-kinds .fw-swatch-tool { background:
|
|
275
|
+
.fw-root.fw-fill-agent .fw-kinds .fw-swatch-model { background: light-dark(oklch(0.50 0 0), oklch(0.72 0 0)); }
|
|
276
|
+
.fw-root.fw-fill-agent .fw-kinds .fw-swatch-tool { background: light-dark(oklch(0.80 0 0), oklch(0.46 0 0)); }
|
|
277
277
|
.fw-root .fw-kinds .fw-swatch-tool { width: 12px; height: 8px; border-radius: 2px; background: var(--fw-kind-tool); }
|
|
278
278
|
.fw-root .fw-kinds .fw-swatch-wait { width: 12px; height: 8px; border-radius: 2px; background: color-mix(in oklab, var(--fw-text) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fw-text) 18%, transparent); }
|
|
279
279
|
.fw-root .fw-kinds .fw-swatch-handoff { width: 10px; height: 8px; border-left: 1.5px solid var(--fw-muted); border-bottom: 1.5px solid var(--fw-muted); border-bottom-left-radius: 3px; }
|
|
@@ -287,33 +287,34 @@
|
|
|
287
287
|
.fw-root .fw-view-agents .fw-seg { pointer-events: auto; }
|
|
288
288
|
.fw-root .fw-seg-model { background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
|
|
289
289
|
.fw-root .fw-seg-tool { background: var(--dim); box-shadow: inset 0 0 0 1px var(--dim-line); }
|
|
290
|
-
/* Without per-agent hues (muted or outcome fill), a step's kind owns its color; with them, kind is
|
|
291
|
-
|
|
290
|
+
/* Without per-agent hues (muted or outcome fill), a step's kind owns its color; with them, kind is a fixed lightness on the agent's own
|
|
291
|
+
hue (the rules below), so each agent stays one color. */
|
|
292
292
|
.fw-root:is(.fw-fill-muted, .fw-fill-outcome) .fw-view-agents .fw-seg-model { background: var(--fw-kind-model); box-shadow: none; }
|
|
293
293
|
.fw-root:is(.fw-fill-muted, .fw-fill-outcome) .fw-view-agents .fw-seg-tool { background: var(--fw-kind-tool); box-shadow: none; }
|
|
294
|
-
/* Per-agent hues
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
.fw-root.fw-fill-agent .fw-view-agents .fw-seg-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
.fw-root .fw-view-agents .fw-seg {
|
|
294
|
+
/* Per-agent hues: a step's kind is a fixed lightness on its agent's hue, the same for every hue, so kind reads by lightness
|
|
295
|
+
against the surface and never contradicts the key (critique P0 #4: dark tool steps were lighter than model steps, and the
|
|
296
|
+
step varied with hue). Model is the stronger step on either surface; chroma is capped at 0.10, never raised, so a neutral (the root's grey) stays
|
|
297
|
+
neutral instead of taking a red cast from its undefined hue. */
|
|
298
|
+
.fw-root.fw-fill-agent .fw-view-agents .fw-seg-model { background: light-dark(oklch(from var(--tone) 0.50 min(c, 0.10) h), oklch(from var(--tone) 0.72 min(c, 0.10) h)); box-shadow: none; }
|
|
299
|
+
.fw-root.fw-fill-agent .fw-view-agents :is(.fw-seg-tool, .fw-seg-failed) { background: light-dark(oklch(from var(--tone) 0.80 min(c, 0.10) h), oklch(from var(--tone) 0.46 min(c, 0.10) h)); box-shadow: none; }
|
|
300
|
+
/* A failed turn is still the agent's work: it keeps the agent's hue, and the red cross on the ending turn says it failed. */
|
|
301
|
+
.fw-root.fw-fill-agent .fw-view-agents .fw-seg-failed { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fw-failed) 55%, transparent); }
|
|
302
|
+
.fw-root .fw-view-agents .fw-seg { container-type: inline-size; justify-content: flex-start; font-size: 12px; line-height: 16px; white-space: nowrap; color: var(--fw-seg-ink); }
|
|
303
|
+
/* Label ink holds 4.5:1 on its fill: the model step is dark on light and bright on dark, the tool step the reverse, so ink flips
|
|
304
|
+
with it: page-light on L 0.50 and L 0.46, page-dark on L 0.72 and L 0.80. */
|
|
305
|
+
.fw-root .fw-view-agents .fw-seg-model { --fw-seg-ink: light-dark(var(--fw-surface), hsl(var(--hsl-background))); }
|
|
306
|
+
.fw-root .fw-view-agents :is(.fw-seg-tool, .fw-seg-failed) { --fw-seg-ink: var(--fw-text); }
|
|
302
307
|
.fw-root .fw-view-agents .fw-seg > * { pointer-events: none; }
|
|
303
|
-
/*
|
|
304
|
-
.fw-root .fw-
|
|
305
|
-
.fw-root .fw-seg-
|
|
308
|
+
/* One line, 6 px in from each end; a part that does not fit whole wraps to the hidden second line, so trailing parts drop first. */
|
|
309
|
+
.fw-root .fw-seg-label { flex: 1; min-width: 0; height: 16px; margin: 0 6px; display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px; overflow: hidden; }
|
|
310
|
+
.fw-root .fw-seg-label > * { flex: none; height: 16px; display: inline-flex; align-items: center; }
|
|
306
311
|
.fw-root .fw-seg-icon svg { width: 12px; height: 12px; stroke-width: 1.75; }
|
|
307
|
-
.fw-root .fw-seg-name {
|
|
308
|
-
.fw-root .fw-seg-chip {
|
|
309
|
-
.fw-root .fw-seg-meta {
|
|
310
|
-
|
|
311
|
-
@container (max-width: 180px) { .fw-root .fw-seg-cost { display: none; } }
|
|
312
|
-
@container (max-width: 96px) { .fw-root .fw-seg-meta { display: none; } }
|
|
313
|
-
@container (max-width: 56px) { .fw-root :is(.fw-seg-name, .fw-seg-chip) { display: none; } }
|
|
314
|
-
@container (max-width: 24px) { .fw-root :is(.fw-seg-icon, .fw-view-agents .fw-seg .fw-glyph) { display: none; } }
|
|
312
|
+
.fw-root .fw-seg-name { font-weight: 600; }
|
|
313
|
+
.fw-root .fw-seg-chip { padding: 0 4px; border-radius: var(--radius-pill); background: color-mix(in oklab, currentColor 18%, transparent); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
314
|
+
.fw-root .fw-seg-meta { font-variant-numeric: tabular-nums; }
|
|
315
|
+
@container (max-width: 24px) { .fw-root :is(.fw-seg-label, .fw-view-agents .fw-seg .fw-glyph) { display: none; } }
|
|
315
316
|
/* Fail and retry read as filled chips inside the bar, red and amber, as the references draw them. */
|
|
316
|
-
.fw-root .fw-view-agents .fw-seg .fw-glyph { flex: none; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--fw-failed); color: light-dark(var(--fw-surface), hsl(var(--hsl-background))); }
|
|
317
|
+
.fw-root .fw-view-agents .fw-seg .fw-glyph { flex: none; margin-left: 6px; display: grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--fw-failed); color: light-dark(var(--fw-surface), hsl(var(--hsl-background))); }
|
|
317
318
|
.fw-root .fw-view-agents .fw-seg .fw-glyph[data-glyph="retry"] { background: var(--fw-amber); }
|
|
318
319
|
.fw-root .fw-view-agents .fw-seg .fw-glyph svg { width: 9px; height: 9px; stroke-width: 2.5; }
|
|
319
320
|
.fw-root:is(.fw-fill-muted, .fw-fill-outcome) .fw-view-agents :is(.fw-seg-alt.fw-seg-model, .fw-seg-alt.fw-seg-tool) { filter: brightness(.88); }
|
package/dist/react/index.js
CHANGED
|
@@ -3396,32 +3396,35 @@ function Segment({ mark, events, agentView, ending }) {
|
|
|
3396
3396
|
className: "fw-glyph",
|
|
3397
3397
|
"data-glyph": glyph,
|
|
3398
3398
|
children: glyph === "fail" ? /* @__PURE__ */ jsx(FailGlyph, {}) : /* @__PURE__ */ jsx(RetryGlyph, {})
|
|
3399
|
-
}), agentView && /* @__PURE__ */ jsxs(
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
"
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3399
|
+
}), agentView && /* @__PURE__ */ jsxs("span", {
|
|
3400
|
+
className: "fw-seg-label",
|
|
3401
|
+
children: [
|
|
3402
|
+
/* @__PURE__ */ jsx("span", {
|
|
3403
|
+
className: "fw-seg-icon",
|
|
3404
|
+
"aria-hidden": true,
|
|
3405
|
+
children: /* @__PURE__ */ jsx(KindGlyph, {
|
|
3406
|
+
kind: model ? "model" : "tool",
|
|
3407
|
+
name: mark.tool ?? mark.name
|
|
3408
|
+
})
|
|
3409
|
+
}),
|
|
3410
|
+
name && /* @__PURE__ */ jsx("span", {
|
|
3411
|
+
className: "fw-seg-name",
|
|
3412
|
+
children: name
|
|
3413
|
+
}),
|
|
3414
|
+
mark.count > 1 && /* @__PURE__ */ jsxs("span", {
|
|
3415
|
+
className: "fw-seg-chip",
|
|
3416
|
+
children: ["×", mark.count]
|
|
3417
|
+
}),
|
|
3418
|
+
duration && /* @__PURE__ */ jsx("span", {
|
|
3419
|
+
className: "fw-seg-meta",
|
|
3420
|
+
children: duration
|
|
3421
|
+
}),
|
|
3422
|
+
mark.costUsd ? /* @__PURE__ */ jsx("span", {
|
|
3423
|
+
className: "fw-seg-meta",
|
|
3424
|
+
children: formatCost(mark.costUsd)
|
|
3425
|
+
}) : null
|
|
3426
|
+
]
|
|
3427
|
+
})]
|
|
3425
3428
|
});
|
|
3426
3429
|
}
|
|
3427
3430
|
/** A span the clock is inside: it grows live, or playback has not reached its end. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/charts",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.20",
|
|
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",
|