@mechane-ai/elements 0.65.0 → 0.67.0

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.
Files changed (106) hide show
  1. package/README.md +21 -10
  2. package/dist/ai.js +285 -203
  3. package/dist/{article-BrUa4Wz1.js → article-anMy8fA5.js} +6 -6
  4. package/dist/article.js +1 -1
  5. package/dist/catalog.json +81 -34
  6. package/dist/{categorical-values-AXJkMt-Y.js → categorical-values-Bh7ZkEQn.js} +1 -1
  7. package/dist/charts/cartesian.js +1 -1
  8. package/dist/charts/comparison.js +1 -1
  9. package/dist/charts/distribution.js +1 -1
  10. package/dist/charts/figure.js +12 -12
  11. package/dist/charts/graph.js +1 -1
  12. package/dist/charts/hierarchy.js +1 -1
  13. package/dist/charts/image.js +1 -1
  14. package/dist/charts/matrix.js +1 -1
  15. package/dist/charts/plot.js +3 -3
  16. package/dist/charts/relationship.js +1 -1
  17. package/dist/charts/text.js +1 -1
  18. package/dist/charts/timeline.js +2 -2
  19. package/dist/charts/trend.js +1 -1
  20. package/dist/charts.js +2 -2
  21. package/dist/{code-block-BDRmjlES.js → code-block-DbW_t9U4.js} +1 -1
  22. package/dist/collections.js +1 -1
  23. package/dist/{commands-rzsDElrG.js → commands-C7Zrp-tG.js} +2 -2
  24. package/dist/content/code.js +1 -1
  25. package/dist/content/diff.js +3 -3
  26. package/dist/content/link.js +1 -1
  27. package/dist/content/markdown.js +1 -1
  28. package/dist/content/tree.js +2 -2
  29. package/dist/{content-link-DRaNf1mD.js → content-link-BN4NPp0u.js} +1 -1
  30. package/dist/content.js +1 -1
  31. package/dist/{dates-wu-gKO2C.js → dates-OTq-xU33.js} +2 -2
  32. package/dist/{dumbbell-plot-VFajQtEW.js → dumbbell-plot-BQDGe0sQ.js} +3 -3
  33. package/dist/{embedding-map-BqDEmy88.js → embedding-map-DmmknG7A.js} +6 -6
  34. package/dist/feedback.js +1 -1
  35. package/dist/{figure-frame-Dd-pOeZN.js → figure-frame-DlyNTDzh.js} +22 -21
  36. package/dist/forms/dates.js +1 -1
  37. package/dist/{forms-Bjx7JQ30.js → forms-iAOjGRTO.js} +1 -1
  38. package/dist/forms.js +2 -2
  39. package/dist/{image-grid-Dpyqxgwy.js → image-grid-CxEAQvTf.js} +3 -3
  40. package/dist/index.js +1 -1
  41. package/dist/kits/evaluation.js +13 -13
  42. package/dist/kits/interpretability.js +47 -43
  43. package/dist/kits/operations.js +80 -79
  44. package/dist/kits/research.js +364 -499
  45. package/dist/kits/training.js +108 -107
  46. package/dist/layout.js +1 -1
  47. package/dist/lesson.js +3 -3
  48. package/dist/{markdown--nfaDoR1.js → markdown-Diffqqm7.js} +2 -2
  49. package/dist/mdx.js +6 -6
  50. package/dist/navigation/commands.js +1 -1
  51. package/dist/{navigation-Cp3p0gss.js → navigation-CTnYtVD8.js} +1 -1
  52. package/dist/navigation.js +3 -3
  53. package/dist/packages/ai/src/index.d.ts +2 -0
  54. package/dist/packages/ai/src/message-reactions.d.ts +51 -0
  55. package/dist/packages/ai/src/message.d.ts +3 -1
  56. package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
  57. package/dist/packages/collections/src/card-columns.d.ts +30 -0
  58. package/dist/packages/collections/src/collection-page.d.ts +43 -0
  59. package/dist/packages/collections/src/column-card.d.ts +15 -0
  60. package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
  61. package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
  62. package/dist/packages/collections/src/data-table.d.ts +2 -2
  63. package/dist/packages/collections/src/index.d.ts +5 -0
  64. package/dist/packages/collections/src/table-query.d.ts +9 -1
  65. package/dist/packages/feedback/src/feedback.d.ts +0 -4
  66. package/dist/packages/feedback/src/index.d.ts +1 -1
  67. package/dist/packages/kits/src/research/index.d.ts +0 -2
  68. package/dist/{param-CwT1RvUS.js → param-CKr8EYxF.js} +1 -1
  69. package/dist/{pierre-diff-DuvK3kLF.js → pierre-diff-DXVIwW7o.js} +1 -1
  70. package/dist/{plot-layout-CvkeUuG6.js → plot-layout-CVzSbcU7.js} +24 -23
  71. package/dist/{plot-surface-yy37R4vs.js → plot-surface-CBhI1alw.js} +1 -1
  72. package/dist/{reference-lines-AMeDkYlo.js → reference-lines-C970JwWZ.js} +1 -1
  73. package/dist/{scene-BRhI8XSy.js → scene-C3dCxckI.js} +6 -6
  74. package/dist/scene.js +1 -1
  75. package/dist/{slope-chart-BMOCaa8R.js → slope-chart-DekEJxsy.js} +4 -4
  76. package/dist/{src-9n2M1V_y.js → src-BCAelv4f.js} +3 -3
  77. package/dist/{src-BgmAkau8.js → src-Bkov5TTa.js} +171 -164
  78. package/dist/{src-Bns-5joF.js → src-BsqbWDxS.js} +4 -4
  79. package/dist/{src-BdyO4PgQ.js → src-CIyuaSCi.js} +101 -107
  80. package/dist/{src-Tu6d_Pm8.js → src-Dc1t1ugL.js} +958 -585
  81. package/dist/{src-C5SH3jjU.js → src-DceyVyL0.js} +2 -2
  82. package/dist/{src-C_E29-DX.js → src-Dlh99sPD.js} +1 -1
  83. package/dist/styles2.css +21 -1
  84. package/dist/{time-series-CTNVqoUQ.js → time-series-BSNnijxf.js} +8 -8
  85. package/dist/{timeline-DrsDtEIW.js → timeline-CnxfYSIg.js} +4 -4
  86. package/dist/{token-heatmap-DddArdH8.js → token-heatmap-CJaXo56P.js} +3 -3
  87. package/dist/{token-predictions-CBykmPID.js → token-predictions-Bi7aKPnh.js} +3 -3
  88. package/dist/{transport-r1QgELf8.js → transport-CXj0DV6o.js} +4 -4
  89. package/dist/{tree-diagram-BIJFK4pl.js → tree-diagram-BxOZsjr1.js} +4 -4
  90. package/dist/{treemap-DgmEw_mr.js → treemap-B2yOAetT.js} +4 -4
  91. package/dist/{use-tween-BWf44Jy4.js → use-tween-C1TWJwce.js} +1 -1
  92. package/dist/{violin-plot-BYJnv6sG.js → violin-plot-W2L_2JRo.js} +3 -3
  93. package/dist/{waterfall-BNseqMas.js → waterfall-Bt73N2Ng.js} +4 -4
  94. package/package.json +1 -1
  95. package/recipes/searchable-collection.tsx +74 -76
  96. package/skills/extend-elements/SKILL.md +2 -1
  97. package/skills/review-elements/SKILL.md +11 -7
  98. package/skills/upgrade-elements/SKILL.md +3 -1
  99. package/skills/upgrade-elements/references/releases.md +20 -0
  100. package/skills/use-elements/SKILL.md +8 -6
  101. package/skills/use-elements/references/collections.md +59 -12
  102. package/skills/use-elements/references/conversations.md +32 -0
  103. package/skills/use-elements/references/editorial-restraint.md +17 -29
  104. package/skills/use-elements/references/figures.md +6 -2
  105. package/skills/use-elements/references/workspace.md +5 -5
  106. package/dist/packages/kits/src/research/collection-page.d.ts +0 -71
@@ -1,12 +1,12 @@
1
- import { T as e } from "../plot-layout-CvkeUuG6.js";
1
+ import { T as e } from "../plot-layout-CVzSbcU7.js";
2
2
  import { r as t } from "../figure-format-B8kRZMlo.js";
3
3
  import { i as n, t as r } from "../tone-scope-DKiSw-JR.js";
4
- import { n as i, r as a } from "../figure-frame-Dd-pOeZN.js";
5
- import { d as o, g as s, u as c } from "../src-Tu6d_Pm8.js";
4
+ import { n as i, r as a } from "../figure-frame-DlyNTDzh.js";
5
+ import { d as o, g as s, h as c } from "../src-Dc1t1ugL.js";
6
6
  import { n as l, t as u } from "../chart-link-AE_xuxiP.js";
7
7
  import { a as d, i as f, o as p, r as m, t as h } from "../cells-X8SVrZBc.js";
8
8
  import { t as g } from "../accessibility-P89UG9-r.js";
9
- import { r as _, t as v } from "../dumbbell-plot-VFajQtEW.js";
9
+ import { r as _, t as v } from "../dumbbell-plot-BQDGe0sQ.js";
10
10
  import * as y from "@stylexjs/stylex";
11
11
  import { jsx as b, jsxs as x } from "react/jsx-runtime";
12
12
  // packages/kits/src/evaluation/evaluation-data.ts
@@ -142,14 +142,14 @@ function z({ rows: e, sort: t, models: n, locale: r }) {
142
142
  }
143
143
  function B({ model: t }) {
144
144
  let r = n(t.id) ?? "neutral";
145
- return /* @__PURE__ */ b(s, {
145
+ return /* @__PURE__ */ b(o, {
146
146
  secondary: t.detail,
147
147
  leading: /* @__PURE__ */ b(e, { tone: r }),
148
148
  children: t.label
149
149
  });
150
150
  }
151
151
  function V(e) {
152
- let { models: n, columns: s, rows: l, sort: u, onSortChange: d, selected: f, onSelectedChange: p, labels: m, showLegendNote: h = !1, ...g } = e, { emptyLabel: _ = "No models have results yet.", ...v } = g, y = {
152
+ let { models: n, columns: o, rows: l, sort: u, onSortChange: d, selected: f, onSelectedChange: p, labels: m, showLegendNote: h = !1, ...g } = e, { emptyLabel: _ = "No models have results yet.", ...v } = g, y = {
153
153
  ...N,
154
154
  ...m
155
155
  }, x = T(l.map((e) => e.model)), S = [
@@ -164,7 +164,7 @@ function V(e) {
164
164
  label: y.model,
165
165
  role: "primary"
166
166
  },
167
- ...s.map((e) => ({
167
+ ...o.map((e) => ({
168
168
  id: e.id,
169
169
  label: e.label,
170
170
  role: "number",
@@ -174,7 +174,7 @@ function V(e) {
174
174
  ];
175
175
  if (v.status === "loading") return /* @__PURE__ */ b(i, {
176
176
  ...v,
177
- children: /* @__PURE__ */ b(o, {
177
+ children: /* @__PURE__ */ b(s, {
178
178
  caption: v.title,
179
179
  columns: S,
180
180
  rows: I
@@ -185,7 +185,7 @@ function V(e) {
185
185
  ...v,
186
186
  message: C
187
187
  });
188
- let w = new Map(n.map((e) => [e.id, e])), D = new Map(s.map((e) => {
188
+ let w = new Map(n.map((e) => [e.id, e])), D = new Map(o.map((e) => {
189
189
  let t = l.flatMap((t) => k(t.values[e.id] ?? null) ?? []), n = e.isHigherBetter ? Math.max(...t) : Math.min(...t);
190
190
  return [e.id, t.length < 2 ? void 0 : n];
191
191
  })), O = S.map((e) => ({
@@ -194,7 +194,7 @@ function V(e) {
194
194
  let r = w.get(n.model) ?? {
195
195
  id: n.model,
196
196
  label: n.model
197
- }, i = s.find((t) => t.id === e.id);
197
+ }, i = o.find((t) => t.id === e.id);
198
198
  if (i === void 0) return e.id === "rank" ? t({
199
199
  value: n.rank ?? null,
200
200
  locale: v.locale,
@@ -210,7 +210,7 @@ function V(e) {
210
210
  bestLabel: y.best
211
211
  });
212
212
  }
213
- })), A = s.filter((e) => e.isHigherBetter).map((e) => e.label), M = s.filter((e) => !e.isHigherBetter).map((e) => e.label), P = [
213
+ })), A = o.filter((e) => e.isHigherBetter).map((e) => e.label), M = o.filter((e) => !e.isHigherBetter).map((e) => e.label), P = [
214
214
  ...A.length > 0 ? [`${y.higherIsBetter}: ${A.join(", ")}.`] : [],
215
215
  ...M.length > 0 ? [`${y.lowerIsBetter}: ${M.join(", ")}.`] : [],
216
216
  y.bestNote
@@ -344,7 +344,7 @@ function q(e) {
344
344
  label: E.reading,
345
345
  role: "text",
346
346
  width: W.reading,
347
- cell: (e) => /* @__PURE__ */ b(s, {
347
+ cell: (e) => /* @__PURE__ */ b(o, {
348
348
  secondary: e.note,
349
349
  children: I(e)
350
350
  })
@@ -368,7 +368,7 @@ function q(e) {
368
368
  height: h,
369
369
  selected: y,
370
370
  onSelectedChange: S
371
- }), C.status === "loading" ? /* @__PURE__ */ b(o, {
371
+ }), C.status === "loading" ? /* @__PURE__ */ b(s, {
372
372
  caption: `${E.caption} ${i.label} minus ${r.label}`,
373
373
  hideCaption: !0,
374
374
  columns: R,
@@ -1,18 +1,17 @@
1
- import { u as e } from "../token-heatmap-DddArdH8.js";
2
- import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-CBykmPID.js";
3
- import { E as s, m as c, t as l } from "../src-BgmAkau8.js";
4
- import { m as u } from "../src-BdyO4PgQ.js";
1
+ import { u as e } from "../token-heatmap-CJaXo56P.js";
2
+ import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-Bi7aKPnh.js";
3
+ import { E as s, m as c, o as l, t as u } from "../src-Bkov5TTa.js";
5
4
  import { n as d, t as f } from "../chart-link-AE_xuxiP.js";
6
- import { r as p } from "../tree-diagram-BIJFK4pl.js";
5
+ import { r as p } from "../tree-diagram-BxOZsjr1.js";
7
6
  import { t as m } from "../tone-scope-DKiSw-JR.js";
8
- import { d as h, l as g } from "../violin-plot-BYJnv6sG.js";
7
+ import { d as h, l as g } from "../violin-plot-W2L_2JRo.js";
9
8
  import { r as _ } from "../figure-format-B8kRZMlo.js";
10
- import { t as v } from "../embedding-map-BqDEmy88.js";
11
- import { n as y, t as b } from "../forms-Bjx7JQ30.js";
9
+ import { t as v } from "../embedding-map-DmmknG7A.js";
10
+ import { n as y, t as b } from "../forms-iAOjGRTO.js";
12
11
  import { o as x, t as S } from "../cells-X8SVrZBc.js";
13
- import { d as C, g as w, u as T } from "../src-Tu6d_Pm8.js";
14
- import { s as E } from "../slope-chart-BMOCaa8R.js";
15
- import { x as D } from "../src-C5SH3jjU.js";
12
+ import { d as C, g as w, h as T } from "../src-Dc1t1ugL.js";
13
+ import { s as E } from "../slope-chart-DekEJxsy.js";
14
+ import { x as D } from "../src-DceyVyL0.js";
16
15
  import * as O from "@stylexjs/stylex";
17
16
  import { useId as k, useState as A } from "react";
18
17
  import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
@@ -190,13 +189,14 @@ var B = { heads: 32 }, V = 240, H = {
190
189
  k7Eaqz: "xeuugli",
191
190
  $$css: !0
192
191
  }, te = { panels: (e) => [ee, { "--x-gridTemplateColumns": `repeat(auto-fill, minmax(min(${e}px, 100%), 1fr))` == null ? void 0 : `repeat(auto-fill, minmax(min(${e}px, 100%), 1fr))` }] };
193
- function ne({ title: t, description: n, locale: r, status: i, coverage: o, source: c, tokens: l, heads: d, mask: f = "none", selected: p = null, onSelectedChange: m, pair: h, onPairChange: g, minPanelWidth: _ = V, labels: v }) {
192
+ function ne({ title: t, description: n, locale: r, status: i, coverage: o, source: c, tokens: u, heads: d, mask: f = "none", selected: p = null, onSelectedChange: m, pair: h, onPairChange: g, minPanelWidth: _ = V, labels: v }) {
194
193
  let y = {
195
194
  ...H,
196
195
  ...v
197
196
  }, [b, x] = A(null), S = h === void 0 ? b : h, C = I(d.map((e) => e.id)), w = d.find((e) => e.id === p) ?? d[0], T = p !== null && !d.some((e) => e.id === p), E = (C === void 0 ? void 0 : `Head ${C} appears twice. Heads must have unique identifiers.`) ?? (d.length > B.heads ? `This grid draws at most ${B.heads} heads.` : void 0) ?? (T ? `The selected head ${p} is not among the heads.` : void 0);
198
- if (E !== void 0) return /* @__PURE__ */ M(u, {
199
- hasError: !0,
197
+ if (E !== void 0) return /* @__PURE__ */ M(l, {
198
+ tone: "negative",
199
+ role: "alert",
200
200
  children: `${t}: ${E}`
201
201
  });
202
202
  function D(e, t) {
@@ -210,8 +210,8 @@ function ne({ title: t, description: n, locale: r, status: i, coverage: o, sourc
210
210
  status: i,
211
211
  coverage: o,
212
212
  source: c,
213
- sources: l,
214
- destinations: l,
213
+ sources: u,
214
+ destinations: u,
215
215
  mask: f
216
216
  };
217
217
  return /* @__PURE__ */ M(z, { children: /* @__PURE__ */ N("section", {
@@ -248,11 +248,11 @@ function ne({ title: t, description: n, locale: r, status: i, coverage: o, sourc
248
248
  description: y.linksDescription,
249
249
  locale: r,
250
250
  status: i,
251
- tokens: l.map((e) => ({
251
+ tokens: u.map((e) => ({
252
252
  id: e.id,
253
253
  text: e.text
254
254
  })),
255
- links: l.flatMap((e, t) => l.flatMap((n, r) => {
255
+ links: u.flatMap((e, t) => u.flatMap((n, r) => {
256
256
  let i = w.weights[t]?.[r] ?? null;
257
257
  return i === null || i === 0 ? [] : [{
258
258
  sourceId: n.id,
@@ -544,8 +544,8 @@ function ie({ details: e, selected: t = null, onSelectedChange: n, pinned: r = [
544
544
  let s = {
545
545
  ...re,
546
546
  ...a
547
- }, c = new Set(o.nodes.map((e) => e.id)), l = Object.keys(e).find((e) => !c.has(e));
548
- return l === void 0 ? /* @__PURE__ */ M(m, {
547
+ }, c = new Set(o.nodes.map((e) => e.id)), u = Object.keys(e).find((e) => !c.has(e));
548
+ return u === void 0 ? /* @__PURE__ */ M(m, {
549
549
  ids: o.nodes.map((e) => e.id),
550
550
  children: /* @__PURE__ */ M(z, { children: /* @__PURE__ */ N("div", {
551
551
  ...O.props(R.split),
@@ -576,9 +576,10 @@ function ie({ details: e, selected: t = null, onSelectedChange: n, pinned: r = [
576
576
  labels: s
577
577
  })]
578
578
  }) })
579
- }) : /* @__PURE__ */ M(u, {
580
- hasError: !0,
581
- children: `${o.title}: details name node ${l}, which is not in the graph.`
579
+ }) : /* @__PURE__ */ M(l, {
580
+ tone: "negative",
581
+ role: "alert",
582
+ children: `${o.title}: details name node ${u}, which is not in the graph.`
582
583
  });
583
584
  }
584
585
  // packages/kits/src/interpretability/embedding-atlas.tsx
@@ -614,9 +615,10 @@ function se({ landmarks: e, details: t, query: n = "", onQueryChange: r, selecte
614
615
  let c = {
615
616
  ...ae,
616
617
  ...o
617
- }, l = k(), d = e.find((e) => t[e.id] === void 0);
618
- if (d !== void 0) return /* @__PURE__ */ M(u, {
619
- hasError: !0,
618
+ }, u = k(), d = e.find((e) => t[e.id] === void 0);
619
+ if (d !== void 0) return /* @__PURE__ */ M(l, {
620
+ tone: "negative",
621
+ role: "alert",
620
622
  children: `${s.title}: landmark ${d.id} has no feature details.`
621
623
  });
622
624
  let f = e.filter((e) => {
@@ -644,11 +646,11 @@ function se({ landmarks: e, details: t, query: n = "", onQueryChange: r, selecte
644
646
  children: [
645
647
  /* @__PURE__ */ N(b.Root, { children: [
646
648
  /* @__PURE__ */ M(b.Label, {
647
- htmlFor: l,
649
+ htmlFor: u,
648
650
  children: c.search
649
651
  }),
650
652
  /* @__PURE__ */ M(y, {
651
- id: l,
653
+ id: u,
652
654
  type: "search",
653
655
  value: n,
654
656
  onValueChange: (e, t) => r?.(e, {
@@ -721,15 +723,16 @@ function pe(e) {
721
723
  return i === null || a === null ? Number(i === null) - Number(a === null) : t * (typeof i == "number" && typeof a == "number" ? i - a : String(i).localeCompare(String(a)));
722
724
  };
723
725
  }
724
- function me({ title: e, locale: t, status: n, features: r, frequencyDomain: i, frequencyFormat: a, activationFormat: o, profileDomain: s, selected: c = null, onSelectedChange: l, query: d = "", onQueryChange: f, sort: p, onSortChange: m, labels: h }) {
726
+ function me({ title: e, locale: t, status: n, features: r, frequencyDomain: i, frequencyFormat: a, activationFormat: o, profileDomain: s, selected: c = null, onSelectedChange: u, query: d = "", onQueryChange: f, sort: p, onSortChange: m, labels: h }) {
725
727
  let g = {
726
728
  ...fe,
727
729
  ...h
728
730
  }, v = L(r.map((e) => e.id)), y = I(r.map((e) => e.id));
729
731
  if (y !== void 0 || r.length > P.features) {
730
732
  let t = y === void 0 ? `This list shows at most ${P.features} features. Supply a page of them.` : `Feature ${y} appears twice. Features must have unique identifiers.`;
731
- return /* @__PURE__ */ M(u, {
732
- hasError: !0,
733
+ return /* @__PURE__ */ M(l, {
734
+ tone: "negative",
735
+ role: "alert",
733
736
  children: `${e}: ${t}`
734
737
  });
735
738
  }
@@ -740,7 +743,7 @@ function me({ title: e, locale: t, status: n, features: r, frequencyDomain: i, f
740
743
  role: "primary",
741
744
  width: ce,
742
745
  canSort: !0,
743
- cell: (e) => /* @__PURE__ */ M(w, {
746
+ cell: (e) => /* @__PURE__ */ M(C, {
744
747
  secondary: [e.id, e.source].filter(Boolean).join(" · "),
745
748
  children: e.label
746
749
  })
@@ -789,7 +792,7 @@ function me({ title: e, locale: t, status: n, features: r, frequencyDomain: i, f
789
792
  })
790
793
  }] : []
791
794
  ];
792
- return n === "loading" ? /* @__PURE__ */ M(C, {
795
+ return n === "loading" ? /* @__PURE__ */ M(w, {
793
796
  caption: e,
794
797
  columns: O,
795
798
  rows: 6
@@ -819,7 +822,7 @@ function me({ title: e, locale: t, status: n, features: r, frequencyDomain: i, f
819
822
  onRowHighlightChange: v,
820
823
  rowAction: {
821
824
  label: (e) => e.label,
822
- onActivate: (e) => l?.(e.id, { reason: "press" })
825
+ onActivate: (e) => u?.(e.id, { reason: "press" })
823
826
  }
824
827
  });
825
828
  }
@@ -834,7 +837,7 @@ var he = {
834
837
  curveDescription: "How the chosen next tokens gain or lose probability as the layers add to the residual stream.",
835
838
  noPosition: "Select a cell to follow its position through the layers."
836
839
  };
837
- function ge({ columns: e, layers: n, cells: a, tracks: o = [], layerGroups: s = [], valueFormat: u = he, selected: d = null, onSelectedChange: f, labels: p, ...m }) {
840
+ function ge({ columns: e, layers: n, cells: a, tracks: o = [], layerGroups: s = [], valueFormat: l = he, selected: d = null, onSelectedChange: f, labels: p, ...m }) {
838
841
  let h = {
839
842
  ...Q,
840
843
  ...p
@@ -845,7 +848,7 @@ function ge({ columns: e, layers: n, cells: a, tracks: o = [], layerGroups: s =
845
848
  return /* @__PURE__ */ N("div", {
846
849
  ...O.props(R.stack),
847
850
  children: [
848
- s.length > 0 && /* @__PURE__ */ M(c, { children: s.map((e) => /* @__PURE__ */ N(l, {
851
+ s.length > 0 && /* @__PURE__ */ M(c, { children: s.map((e) => /* @__PURE__ */ N(u, {
849
852
  tone: "neutral",
850
853
  children: [
851
854
  e.label,
@@ -864,7 +867,7 @@ function ge({ columns: e, layers: n, cells: a, tracks: o = [], layerGroups: s =
864
867
  domain: [0, 1],
865
868
  palette: "sequential",
866
869
  valueLabel: h.probability,
867
- valueFormat: u,
870
+ valueFormat: l,
868
871
  selected: d,
869
872
  onSelectedChange: (e, t) => f?.(e, {
870
873
  reason: "press",
@@ -888,7 +891,7 @@ function ge({ columns: e, layers: n, cells: a, tracks: o = [], layerGroups: s =
888
891
  y: {
889
892
  label: h.probability,
890
893
  domain: [0, 1],
891
- format: u
894
+ format: l
892
895
  },
893
896
  labels: "legend",
894
897
  markers: x.length > 0 ? x : void 0,
@@ -932,13 +935,14 @@ var _e = {
932
935
  $$css: !0
933
936
  }
934
937
  };
935
- function ye({ title: e, locale: t, status: n, source: r, features: i, values: a, onValuesChange: l, strengthFormat: d = _e, prompt: f, predictions: p, completions: m, labels: h }) {
938
+ function ye({ title: e, locale: t, status: n, source: r, features: i, values: a, onValuesChange: u, strengthFormat: d = _e, prompt: f, predictions: p, completions: m, labels: h }) {
936
939
  let g = {
937
940
  ...ve,
938
941
  ...h
939
942
  }, _ = I(i.map((e) => e.id)), v = i.find((e) => !(e.min < e.max && e.step > 0)), y = Object.keys(a).find((e) => !i.some((t) => t.id === e)), b = (_ === void 0 ? void 0 : `Feature ${_} appears twice.`) ?? (v === void 0 ? void 0 : `Feature ${v.id} needs a minimum below its maximum and a step above 0.`) ?? (y === void 0 ? void 0 : `A strength is given for ${y}, which is not among the features.`);
940
- if (b !== void 0) return /* @__PURE__ */ M(u, {
941
- hasError: !0,
943
+ if (b !== void 0) return /* @__PURE__ */ M(l, {
944
+ tone: "negative",
945
+ role: "alert",
942
946
  children: `${e}: ${b}`
943
947
  });
944
948
  let x = Object.fromEntries(i.map((e) => [e.id, e.neutral ?? 0])), S = {
@@ -963,7 +967,7 @@ function ye({ title: e, locale: t, status: n, source: r, features: i, values: a,
963
967
  }), /* @__PURE__ */ M(s, {
964
968
  variant: "ghost",
965
969
  density: "compact",
966
- onClick: (e) => l?.(x, {
970
+ onClick: (e) => u?.(x, {
967
971
  reason: "press",
968
972
  event: e.nativeEvent
969
973
  }),
@@ -976,7 +980,7 @@ function ye({ title: e, locale: t, status: n, source: r, features: i, values: a,
976
980
  max: e.max,
977
981
  step: e.step,
978
982
  value: S[e.id] ?? 0,
979
- onValueChange: (t, n) => l?.({
983
+ onValueChange: (t, n) => u?.({
980
984
  ...S,
981
985
  [e.id]: t
982
986
  }, {
@@ -1,36 +1,35 @@
1
- import { a as e } from "../dumbbell-plot-VFajQtEW.js";
1
+ import { a as e } from "../dumbbell-plot-BQDGe0sQ.js";
2
2
  import { r as t } from "../figure-format-B8kRZMlo.js";
3
3
  import { t as n } from "../tone-scope-DKiSw-JR.js";
4
- import { c as r, i, o as a, s as o } from "../src-BgmAkau8.js";
5
- import { m as s } from "../src-BdyO4PgQ.js";
6
- import { n as c } from "../waterfall-BNseqMas.js";
7
- import { r as l, s as u } from "../time-series-CTNVqoUQ.js";
8
- import { i as d, r as f } from "../src-Tu6d_Pm8.js";
4
+ import { c as r, i, o as a, s as o } from "../src-Bkov5TTa.js";
5
+ import { n as s } from "../waterfall-Bt73N2Ng.js";
6
+ import { r as c, s as l } from "../time-series-BSNnijxf.js";
7
+ import { i as u, r as d } from "../src-Dc1t1ugL.js";
9
8
  import "@stylexjs/stylex";
10
- import { useId as p } from "react";
11
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
9
+ import { useId as f } from "react";
10
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
11
  // packages/kits/src/operations/budget-board.tsx
13
- var g = {
12
+ var h = {
14
13
  empty: "No objectives are set for this service.",
15
14
  duplicateIds: "Budget rows need unique identifiers.",
16
15
  measured: "Measured",
17
16
  target: "Target"
18
17
  };
19
- function _({ groups: i, locale: o, status: c, selected: l, onSelectedChange: u, labels: d }) {
18
+ function g({ groups: o, locale: s, status: c, selected: l, onSelectedChange: u, labels: d }) {
20
19
  let f = {
21
- ...g,
20
+ ...h,
22
21
  ...d
23
- }, p = i.flatMap((e) => e.rows.map((e) => e.id));
24
- return new Set(p).size === p.length ? i.length === 0 && c !== "loading" ? /* @__PURE__ */ m(s, { children: f.empty }) : /* @__PURE__ */ m(n, {
25
- ids: p,
26
- children: /* @__PURE__ */ m("div", {
22
+ }, g = o.flatMap((e) => e.rows.map((e) => e.id));
23
+ return new Set(g).size === g.length ? o.length === 0 && c !== "loading" ? /* @__PURE__ */ p(i, { children: f.empty }) : /* @__PURE__ */ p(n, {
24
+ ids: g,
25
+ children: /* @__PURE__ */ p("div", {
27
26
  className: "xrvj5dj x1j825kq xeuugli",
28
- children: i.map((n) => /* @__PURE__ */ h("div", {
27
+ children: o.map((n) => /* @__PURE__ */ m("div", {
29
28
  className: "xrvj5dj x1n8ia3y xeuugli",
30
- children: [/* @__PURE__ */ m(e, {
29
+ children: [/* @__PURE__ */ p(e, {
31
30
  title: n.title,
32
31
  description: n.description,
33
- locale: o,
32
+ locale: s,
34
33
  status: c,
35
34
  value: n.value,
36
35
  height: "compact",
@@ -43,36 +42,36 @@ function _({ groups: i, locale: o, status: c, selected: l, onSelectedChange: u,
43
42
  target: r,
44
43
  ranges: i
45
44
  }))
46
- }), c !== "loading" && /* @__PURE__ */ m("ul", {
45
+ }), c !== "loading" && /* @__PURE__ */ p("ul", {
47
46
  "aria-label": `${n.title}: state of each objective`,
48
47
  className: "xrvj5dj xunmzkg x1ghz6dp x1717udv xe8uvvx x1hz01jw xtqrqnz x1778rvt xbixft",
49
- children: n.rows.map((e) => /* @__PURE__ */ h("li", {
48
+ children: n.rows.map((e) => /* @__PURE__ */ m("li", {
50
49
  ...{
51
50
  0: { className: "xrvj5dj xowlaxb x1y1mm1b x1hm1d26 x1pha0wt xeuugli x1hmw7ec x5g2kb4 x1ok0vyi" },
52
51
  1: { className: "xrvj5dj xowlaxb x1y1mm1b x1hm1d26 x1pha0wt xeuugli x1hmw7ec x5g2kb4 x1ok0vyi x1r7kqkb" }
53
52
  }[e.id === l | 0],
54
53
  children: [
55
- /* @__PURE__ */ h("span", {
54
+ /* @__PURE__ */ m("span", {
56
55
  className: "xeuugli xj0a0fe",
57
- children: [e.label, /* @__PURE__ */ m(r, {
56
+ children: [e.label, /* @__PURE__ */ p(r, {
58
57
  variant: "caption",
59
58
  tone: "muted",
60
59
  children: ` · ${f.measured} ${t({
61
60
  value: e.value,
62
- locale: o,
61
+ locale: s,
63
62
  format: n.value.format
64
63
  })}, ${f.target.toLowerCase()} ${t({
65
64
  value: e.target,
66
- locale: o,
65
+ locale: s,
67
66
  format: n.value.format
68
67
  })}`
69
68
  })]
70
69
  }),
71
- /* @__PURE__ */ m(a, {
70
+ /* @__PURE__ */ p(a, {
72
71
  tone: e.tone,
73
72
  children: e.state
74
73
  }),
75
- e.detail !== void 0 && /* @__PURE__ */ m("span", {
74
+ e.detail !== void 0 && /* @__PURE__ */ p("span", {
76
75
  className: "x1osaytk x153jb6y xy8obcc",
77
76
  children: e.detail
78
77
  })
@@ -81,20 +80,21 @@ function _({ groups: i, locale: o, status: c, selected: l, onSelectedChange: u,
81
80
  })]
82
81
  }, n.id))
83
82
  })
84
- }) : /* @__PURE__ */ m(s, {
85
- hasError: !0,
83
+ }) : /* @__PURE__ */ p(a, {
84
+ tone: "negative",
85
+ role: "alert",
86
86
  children: f.duplicateIds
87
87
  });
88
88
  }
89
89
  // packages/kits/src/operations/incident-timeline.tsx
90
- var v = {
90
+ var _ = {
91
91
  deploy: "Deploys",
92
92
  alert: "Alerts",
93
93
  incident: "Incidents"
94
94
  };
95
- function y({ events: e, window: t, labels: n, ...r }) {
95
+ function v({ events: e, window: t, labels: n, ...r }) {
96
96
  let i = {
97
- ...v,
97
+ ..._,
98
98
  ...n
99
99
  }, a = [
100
100
  {
@@ -113,7 +113,7 @@ function y({ events: e, window: t, labels: n, ...r }) {
113
113
  tone: "negative"
114
114
  }
115
115
  ];
116
- return /* @__PURE__ */ m(c, {
116
+ return /* @__PURE__ */ p(s, {
117
117
  ...r,
118
118
  lanes: a,
119
119
  events: e.map(({ kind: e, ...t }) => ({
@@ -124,7 +124,7 @@ function y({ events: e, window: t, labels: n, ...r }) {
124
124
  });
125
125
  }
126
126
  // packages/kits/src/operations/service-health.tsx
127
- var b = {
127
+ var y = {
128
128
  healthy: "Healthy",
129
129
  degraded: "Degraded",
130
130
  down: "Down",
@@ -133,80 +133,81 @@ var b = {
133
133
  charts: "Over time",
134
134
  trendSummary: "Recent values of the measure.",
135
135
  duplicateIds: "Indicators and chart panels each need unique identifiers."
136
- }, x = {
136
+ }, b = {
137
137
  healthy: "positive",
138
138
  degraded: "warning",
139
139
  down: "negative",
140
140
  unknown: "neutral"
141
141
  };
142
- function S(e) {
142
+ function x(e) {
143
143
  return new Set(e).size !== e.length;
144
144
  }
145
- function C({ service: e, indicators: r, charts: c, timestampUnit: g, timeFormat: _, locale: v, height: y = "compact", status: C, labels: w }) {
146
- let T = p(), E = {
147
- ...b,
148
- ...w
149
- }, D = C === "loading";
150
- if (S(r.map((e) => e.id)) || S(c.map((e) => e.id))) return /* @__PURE__ */ m(s, {
151
- hasError: !0,
152
- children: E.duplicateIds
145
+ function S({ service: e, indicators: r, charts: s, timestampUnit: h, timeFormat: g, locale: _, height: v = "compact", status: S, labels: C }) {
146
+ let w = f(), T = {
147
+ ...y,
148
+ ...C
149
+ }, E = S === "loading";
150
+ if (x(r.map((e) => e.id)) || x(s.map((e) => e.id))) return /* @__PURE__ */ p(a, {
151
+ tone: "negative",
152
+ role: "alert",
153
+ children: T.duplicateIds
153
154
  });
154
- let O = [.../* @__PURE__ */ new Set([...r.map((e) => e.id), ...c.flatMap((e) => e.series.map((e) => e.id))])];
155
- return /* @__PURE__ */ m(n, {
156
- ids: O,
157
- children: /* @__PURE__ */ h("section", {
158
- "aria-labelledby": T,
155
+ let D = [.../* @__PURE__ */ new Set([...r.map((e) => e.id), ...s.flatMap((e) => e.series.map((e) => e.id))])];
156
+ return /* @__PURE__ */ p(n, {
157
+ ids: D,
158
+ children: /* @__PURE__ */ m("section", {
159
+ "aria-labelledby": w,
159
160
  className: "xrvj5dj x1j825kq xeuugli x1hz01jw xbixft",
160
161
  children: [
161
- /* @__PURE__ */ h("header", {
162
+ /* @__PURE__ */ m("header", {
162
163
  className: "xrvj5dj xunmzkg xeuugli",
163
- children: [/* @__PURE__ */ m(o, {
164
- id: T,
164
+ children: [/* @__PURE__ */ p(o, {
165
+ id: w,
165
166
  children: e.label
166
- }), /* @__PURE__ */ h("div", {
167
+ }), /* @__PURE__ */ m("div", {
167
168
  className: "x78zum5 x1a02dak x6s0dn4 x8zbtdt x1gkm1c7",
168
- children: [/* @__PURE__ */ m(a, {
169
- tone: x[e.state],
170
- children: E[e.state]
171
- }), e.stateDetail !== void 0 && /* @__PURE__ */ m(i, { children: e.stateDetail })]
169
+ children: [/* @__PURE__ */ p(a, {
170
+ tone: b[e.state],
171
+ children: T[e.state]
172
+ }), e.stateDetail !== void 0 && /* @__PURE__ */ p(i, { children: e.stateDetail })]
172
173
  })]
173
174
  }),
174
- r.length > 0 && /* @__PURE__ */ h("div", {
175
+ r.length > 0 && /* @__PURE__ */ m("div", {
175
176
  className: "xrvj5dj x1n8ia3y xeuugli",
176
- children: [/* @__PURE__ */ m("h3", {
177
+ children: [/* @__PURE__ */ p("h3", {
177
178
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k x1b5ytql x1wjjqco",
178
- children: E.indicators
179
- }), /* @__PURE__ */ m(d, {
179
+ children: T.indicators
180
+ }), /* @__PURE__ */ p(u, {
180
181
  layout: "columns",
181
182
  children: r.map((e) => {
182
183
  let n = [e.change === void 0 ? void 0 : `${t({
183
184
  value: e.change.value,
184
- locale: v,
185
+ locale: _,
185
186
  format: e.change.format
186
187
  })} ${e.change.label}`, e.target === void 0 ? void 0 : `${e.target.label} ${t({
187
188
  value: e.target.value,
188
- locale: v,
189
+ locale: _,
189
190
  format: e.format
190
191
  })}`].filter((e) => e !== void 0).join(" · ");
191
- return D ? /* @__PURE__ */ m(f, {
192
+ return E ? /* @__PURE__ */ p(d, {
192
193
  variant: "statistic",
193
194
  label: e.label,
194
195
  isLoading: !0,
195
196
  hasDetail: !0
196
- }, e.id) : /* @__PURE__ */ m(f, {
197
+ }, e.id) : /* @__PURE__ */ p(d, {
197
198
  variant: "statistic",
198
199
  label: e.label,
199
200
  value: t({
200
201
  value: e.value,
201
- locale: v,
202
+ locale: _,
202
203
  format: e.format
203
204
  }),
204
205
  ...n === "" ? {} : { detail: n },
205
- ...e.trend === void 0 ? {} : { trend: /* @__PURE__ */ m(u, {
206
+ ...e.trend === void 0 ? {} : { trend: /* @__PURE__ */ p(l, {
206
207
  title: `${e.label} trend`,
207
- summary: E.trendSummary,
208
+ summary: T.trendSummary,
208
209
  unit: e.trend.unit,
209
- timestampUnit: g,
210
+ timestampUnit: h,
210
211
  series: {
211
212
  id: e.id,
212
213
  label: e.label,
@@ -218,22 +219,22 @@ function C({ service: e, indicators: r, charts: c, timestampUnit: g, timeFormat:
218
219
  })
219
220
  })]
220
221
  }),
221
- c.length > 0 && /* @__PURE__ */ h("div", {
222
+ s.length > 0 && /* @__PURE__ */ m("div", {
222
223
  className: "xrvj5dj x1n8ia3y xeuugli",
223
- children: [/* @__PURE__ */ m("h3", {
224
+ children: [/* @__PURE__ */ p("h3", {
224
225
  className: "x1ghz6dp x153jb6y xy8obcc xas2l8k x1b5ytql x1wjjqco",
225
- children: E.charts
226
- }), /* @__PURE__ */ m(l, {
227
- charts: c,
228
- timestampUnit: g,
229
- timeFormat: _,
230
- height: y,
231
- locale: v,
232
- status: C
226
+ children: T.charts
227
+ }), /* @__PURE__ */ p(c, {
228
+ charts: s,
229
+ timestampUnit: h,
230
+ timeFormat: g,
231
+ height: v,
232
+ locale: _,
233
+ status: S
233
234
  })]
234
235
  })
235
236
  ]
236
237
  })
237
238
  });
238
239
  }
239
- export { _ as BudgetBoard, y as IncidentTimeline, C as ServiceHealth };
240
+ export { g as BudgetBoard, v as IncidentTimeline, S as ServiceHealth };