@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.
@@ -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: color-mix(in oklab, var(--fw-text) 58%, var(--fw-surface)); }
276
- .fw-root.fw-fill-agent .fw-kinds .fw-swatch-tool { background: color-mix(in oklab, var(--fw-text) 24%, var(--fw-surface)); }
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 the darker and lighter shade of the
291
- agent's own hue (the rules above), so each agent stays one color. */
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 at full saturation (blind round 26: muted per-agent bars "blur together", "wash out on white"): kind is a darker or
295
- lighter step of the agent's own saturated hue; waiting stays the only pale fill. Light theme sits one step softer (round 27: the
296
- saturated light bars read "heavy"). */
297
- .fw-root.fw-fill-agent .fw-view-agents .fw-seg-model { background: light-dark(color-mix(in oklab, var(--tone) 88%, var(--fw-text)), var(--tone)); box-shadow: none; }
298
- .fw-root.fw-fill-agent .fw-view-agents .fw-seg-tool { background: light-dark(color-mix(in oklab, var(--tone) 84%, var(--fw-surface)), color-mix(in oklab, var(--tone) 72%, var(--fw-text))); box-shadow: none; }
299
- /* A failed turn is still the agent's work: it keeps the agent's saturated hue, and the red cross on the ending turn says it failed. */
300
- .fw-root.fw-fill-agent .fw-view-agents .fw-seg-failed { background: light-dark(color-mix(in oklab, var(--tone) 84%, var(--fw-surface)), color-mix(in oklab, var(--tone) 72%, var(--fw-text))); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--fw-failed) 55%, transparent); }
301
- .fw-root .fw-view-agents .fw-seg { container-type: inline-size; justify-content: flex-start; gap: 4px; white-space: nowrap; font-size: 12px; line-height: 16px; color: light-dark(var(--fw-surface), hsl(var(--hsl-background))); }
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
- /* The inset is the first part's margin, not the segment's padding, so a short step keeps its true width (padding set a 12 px floor). */
304
- .fw-root .fw-view-agents .fw-seg > :first-child { margin-left: 6px; }
305
- .fw-root .fw-seg-icon { display: inline-flex; flex: none; }
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 { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
308
- .fw-root .fw-seg-chip { flex: none; padding: 0 4px; border-radius: var(--radius-pill); background: color-mix(in oklab, currentColor 24%, transparent); font-weight: 600; font-variant-numeric: tabular-nums; }
309
- .fw-root .fw-seg-meta { flex: none; opacity: .85; font-variant-numeric: tabular-nums; }
310
- /* A narrowing step drops its cost first, then its duration, then its name and count, then its icon. */
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); }
@@ -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(Fragment, { children: [
3400
- /* @__PURE__ */ jsx("span", {
3401
- className: "fw-seg-icon",
3402
- "aria-hidden": true,
3403
- children: /* @__PURE__ */ jsx(KindGlyph, {
3404
- kind: model ? "model" : "tool",
3405
- name: mark.tool ?? mark.name
3406
- })
3407
- }),
3408
- name && /* @__PURE__ */ jsx("span", {
3409
- className: "fw-seg-name",
3410
- children: name
3411
- }),
3412
- mark.count > 1 && /* @__PURE__ */ jsxs("span", {
3413
- className: "fw-seg-chip",
3414
- children: ["×", mark.count]
3415
- }),
3416
- duration && /* @__PURE__ */ jsx("span", {
3417
- className: "fw-seg-meta",
3418
- children: duration
3419
- }),
3420
- mark.costUsd ? /* @__PURE__ */ jsx("span", {
3421
- className: "fw-seg-meta fw-seg-cost",
3422
- children: formatCost(mark.costUsd)
3423
- }) : null
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.18",
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",