@mechane-ai/elements 0.65.0 → 0.68.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 (129) hide show
  1. package/README.md +21 -10
  2. package/dist/ai.js +288 -205
  3. package/dist/{article-BrUa4Wz1.js → article-Ni152e-v.js} +107 -92
  4. package/dist/article.js +1 -1
  5. package/dist/catalog.json +151 -34
  6. package/dist/{categorical-values-AXJkMt-Y.js → categorical-values-6Iz03F1i.js} +1 -1
  7. package/dist/{cells-X8SVrZBc.js → cells-BRI8LpMU.js} +1 -1
  8. package/dist/charts/cartesian.js +1 -1
  9. package/dist/charts/cells.js +1 -1
  10. package/dist/charts/comparison.js +1 -1
  11. package/dist/charts/distribution.js +1 -1
  12. package/dist/charts/figure.js +12 -12
  13. package/dist/charts/graph.js +1 -1
  14. package/dist/charts/hierarchy.js +1 -1
  15. package/dist/charts/image.js +1 -1
  16. package/dist/charts/matrix.js +2 -2
  17. package/dist/charts/plot.js +16 -15
  18. package/dist/charts/relationship.js +1 -1
  19. package/dist/charts/text.js +1 -1
  20. package/dist/charts/timeline.js +2 -2
  21. package/dist/charts/trend.js +1 -1
  22. package/dist/charts.js +3 -3
  23. package/dist/{code-block-BDRmjlES.js → code-block-DbW_t9U4.js} +1 -1
  24. package/dist/collections.js +1 -1
  25. package/dist/{color-legend-CIo7DhXB.js → color-legend-4As8881l.js} +1 -1
  26. package/dist/{commands-rzsDElrG.js → commands-C7Zrp-tG.js} +2 -2
  27. package/dist/content/code.js +1 -1
  28. package/dist/content/diff.js +3 -3
  29. package/dist/content/link.js +1 -1
  30. package/dist/content/markdown.js +1 -1
  31. package/dist/content/tree.js +2 -2
  32. package/dist/{content-link-DRaNf1mD.js → content-link-BN4NPp0u.js} +1 -1
  33. package/dist/content.js +1 -1
  34. package/dist/{dates-wu-gKO2C.js → dates-OTq-xU33.js} +2 -2
  35. package/dist/{dumbbell-plot-VFajQtEW.js → dumbbell-plot-jaQvOctJ.js} +4 -4
  36. package/dist/{embedding-map-BqDEmy88.js → embedding-map-DnZL1kvY.js} +8 -8
  37. package/dist/feedback.js +1 -1
  38. package/dist/figure-format-BVb7yFCA.js +46 -0
  39. package/dist/{figure-frame-Dd-pOeZN.js → figure-frame-96zFqsWz.js} +22 -21
  40. package/dist/forms/dates.js +1 -1
  41. package/dist/{forms-Bjx7JQ30.js → forms-iAOjGRTO.js} +1 -1
  42. package/dist/forms.js +2 -2
  43. package/dist/{image-grid-Dpyqxgwy.js → image-grid-B6fdmE9c.js} +4 -4
  44. package/dist/index.js +1 -1
  45. package/dist/kits/evaluation.js +15 -15
  46. package/dist/kits/interpretability.js +49 -45
  47. package/dist/kits/operations.js +81 -80
  48. package/dist/kits/research.js +776 -499
  49. package/dist/kits/training.js +108 -107
  50. package/dist/layout.js +1 -1
  51. package/dist/lesson.js +3 -3
  52. package/dist/markdown-JeuBeMDZ.js +293 -0
  53. package/dist/mdx.js +6 -6
  54. package/dist/navigation/commands.js +1 -1
  55. package/dist/{navigation-Cp3p0gss.js → navigation-CTnYtVD8.js} +1 -1
  56. package/dist/navigation.js +3 -3
  57. package/dist/packages/ai/src/index.d.ts +2 -0
  58. package/dist/packages/ai/src/message-reactions.d.ts +51 -0
  59. package/dist/packages/ai/src/message.d.ts +3 -1
  60. package/dist/packages/charts/src/plot/index.d.ts +2 -0
  61. package/dist/packages/charts/src/plot/plot-layout.d.ts +2 -2
  62. package/dist/packages/charts/src/plot/spatial-layer.d.ts +32 -0
  63. package/dist/packages/charts/src/plot/ticks.d.ts +2 -2
  64. package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
  65. package/dist/packages/collections/src/card-columns.d.ts +30 -0
  66. package/dist/packages/collections/src/collection-page.d.ts +43 -0
  67. package/dist/packages/collections/src/column-card.d.ts +15 -0
  68. package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
  69. package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
  70. package/dist/packages/collections/src/data-table.d.ts +2 -2
  71. package/dist/packages/collections/src/index.d.ts +5 -0
  72. package/dist/packages/collections/src/table-query.d.ts +9 -1
  73. package/dist/packages/feedback/src/feedback.d.ts +0 -4
  74. package/dist/packages/feedback/src/index.d.ts +1 -1
  75. package/dist/packages/foundations/src/visible-motion.d.ts +1 -1
  76. package/dist/packages/kits/src/research/index.d.ts +7 -2
  77. package/dist/packages/kits/src/research/motion-clip.d.ts +41 -0
  78. package/dist/packages/kits/src/research/motion-error.d.ts +8 -0
  79. package/dist/packages/kits/src/research/motion-figure.d.ts +9 -0
  80. package/dist/packages/kits/src/research/motion-frame.d.ts +22 -0
  81. package/dist/packages/kits/src/research/motion-scene.d.ts +22 -0
  82. package/dist/packages/teaching/src/article/uncover.d.ts +2 -0
  83. package/dist/{param-CwT1RvUS.js → param-Dk92C-K1.js} +2 -2
  84. package/dist/{pierre-diff-DuvK3kLF.js → pierre-diff-DXVIwW7o.js} +1 -1
  85. package/dist/plot-CpTwLIYN.js +101 -0
  86. package/dist/{plot-layout-CvkeUuG6.js → plot-layout-1MG72ZWn.js} +175 -124
  87. package/dist/{plot-surface-yy37R4vs.js → plot-surface-8-FZI94y.js} +1 -1
  88. package/dist/{reference-lines-AMeDkYlo.js → reference-lines-C18o1yEY.js} +1 -1
  89. package/dist/{scene-BRhI8XSy.js → scene-B8dppj5V.js} +7 -7
  90. package/dist/scene.js +1 -1
  91. package/dist/{slope-chart-BMOCaa8R.js → slope-chart-CELflRJd.js} +5 -5
  92. package/dist/{src-9n2M1V_y.js → src-BCAelv4f.js} +3 -3
  93. package/dist/{src-BgmAkau8.js → src-Bkov5TTa.js} +171 -164
  94. package/dist/{src-Bns-5joF.js → src-BsqbWDxS.js} +4 -4
  95. package/dist/{src-BdyO4PgQ.js → src-CIyuaSCi.js} +101 -107
  96. package/dist/{src-Tu6d_Pm8.js → src-Dc1t1ugL.js} +958 -585
  97. package/dist/{src-C5SH3jjU.js → src-DceyVyL0.js} +2 -2
  98. package/dist/{src-C_E29-DX.js → src-Dlh99sPD.js} +1 -1
  99. package/dist/styles2.css +33 -1
  100. package/dist/{time-series-CTNVqoUQ.js → time-series-DtAtGoT_.js} +9 -9
  101. package/dist/{timeline-DrsDtEIW.js → timeline-CzianQir.js} +5 -5
  102. package/dist/{token-heatmap-DddArdH8.js → token-heatmap-m6oaMwkK.js} +274 -289
  103. package/dist/{token-predictions-CBykmPID.js → token-predictions-CpGVjOIs.js} +4 -4
  104. package/dist/{transport-r1QgELf8.js → transport-DQ1yzsQl.js} +5 -5
  105. package/dist/{tree-diagram-BIJFK4pl.js → tree-diagram-D9ekymCQ.js} +5 -5
  106. package/dist/{treemap-DgmEw_mr.js → treemap-DT8q65LQ.js} +5 -5
  107. package/dist/{use-tween-BWf44Jy4.js → use-tween-DbXVZBR8.js} +1 -1
  108. package/dist/{violin-plot-BYJnv6sG.js → violin-plot-83HSjnQM.js} +4 -4
  109. package/dist/visible-motion-D6NwjGNz.js +24 -0
  110. package/dist/{waterfall-BNseqMas.js → waterfall-DmApvdrY.js} +5 -5
  111. package/package.json +1 -1
  112. package/recipes/recorded-motion.tsx +14 -0
  113. package/recipes/searchable-collection.tsx +74 -76
  114. package/skills/extend-elements/SKILL.md +2 -1
  115. package/skills/review-elements/SKILL.md +15 -7
  116. package/skills/review-explainer/SKILL.md +4 -0
  117. package/skills/upgrade-elements/SKILL.md +3 -1
  118. package/skills/upgrade-elements/references/releases.md +20 -0
  119. package/skills/use-elements/SKILL.md +10 -6
  120. package/skills/use-elements/references/collections.md +59 -12
  121. package/skills/use-elements/references/conversations.md +32 -0
  122. package/skills/use-elements/references/editorial-restraint.md +17 -29
  123. package/skills/use-elements/references/figures.md +6 -2
  124. package/skills/use-elements/references/kits.md +23 -0
  125. package/skills/use-elements/references/workspace.md +5 -5
  126. package/skills/write-explainer/SKILL.md +5 -0
  127. package/dist/figure-format-B8kRZMlo.js +0 -36
  128. package/dist/markdown--nfaDoR1.js +0 -313
  129. package/dist/packages/kits/src/research/collection-page.d.ts +0 -71
@@ -1,39 +1,38 @@
1
1
  import { t as e } from "../src-DIS0YOj0.js";
2
2
  import { i as t, t as n } from "../tone-scope-DKiSw-JR.js";
3
- import { r, s as i } from "../slope-chart-BMOCaa8R.js";
4
- import { m as a } from "../src-BdyO4PgQ.js";
5
- import { T as o } from "../plot-layout-CvkeUuG6.js";
6
- import { o as s, t as c } from "../cells-X8SVrZBc.js";
7
- import { r as l } from "../figure-format-B8kRZMlo.js";
8
- import { d as u, g as d, u as f } from "../src-Tu6d_Pm8.js";
9
- import { c as p, o as m } from "../src-BgmAkau8.js";
3
+ import { r, s as i } from "../slope-chart-CELflRJd.js";
4
+ import { c as a, o } from "../src-Bkov5TTa.js";
5
+ import { T as s } from "../plot-layout-1MG72ZWn.js";
6
+ import { o as c, t as l } from "../cells-BRI8LpMU.js";
7
+ import { r as u } from "../figure-format-BVb7yFCA.js";
8
+ import { d, g as f, h as p } from "../src-Dc1t1ugL.js";
10
9
  import "@stylexjs/stylex";
11
- import { useState as h } from "react";
12
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
- import { Eye as v, EyeOff as y } from "lucide-react";
10
+ import { useState as m } from "react";
11
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
+ import { Eye as _, EyeOff as v } from "lucide-react";
14
13
  // packages/kits/src/training/run-marker.tsx
15
- function b({ id: e }) {
16
- return /* @__PURE__ */ g(o, {
14
+ function y({ id: e }) {
15
+ return /* @__PURE__ */ h(s, {
17
16
  tone: t(e) ?? "neutral",
18
17
  shape: "line"
19
18
  });
20
19
  }
21
20
  // packages/kits/src/training/run-legend.tsx
22
- var x = 14;
23
- function S({ runs: e, selected: t, hidden: n, labels: r, onSelectedChange: i, onHiddenChange: a }) {
24
- return /* @__PURE__ */ g("ul", {
21
+ var b = 14;
22
+ function x({ runs: e, selected: t, hidden: n, labels: r, onSelectedChange: i, onHiddenChange: a }) {
23
+ return /* @__PURE__ */ h("ul", {
25
24
  "aria-label": r.legend,
26
25
  className: "x78zum5 x1a02dak x1hnptsi x1ghz6dp x1717udv xe8uvvx xeuugli",
27
26
  children: e.map((e) => {
28
- let o = n.includes(e.id), s = t === e.id, c = o ? y : v;
29
- return /* @__PURE__ */ _("li", {
27
+ let o = n.includes(e.id), s = t === e.id, c = o ? v : _;
28
+ return /* @__PURE__ */ g("li", {
30
29
  ...{
31
30
  0: { className: "x3nfvp2 x1qjc9v5 x193iq5w xeuugli xmkeg23 x1y0btm7 x1ey3b81 xy32g2j xpvm0e4 xb3r6kr" },
32
31
  2: { className: "x3nfvp2 x1qjc9v5 x193iq5w xeuugli xmkeg23 x1y0btm7 xy32g2j xpvm0e4 xb3r6kr x159tnba" },
33
32
  1: { className: "x3nfvp2 x1qjc9v5 x193iq5w xeuugli xmkeg23 x1y0btm7 x1ey3b81 xy32g2j xb3r6kr x1r7kqkb" },
34
33
  3: { className: "x3nfvp2 x1qjc9v5 x193iq5w xeuugli xmkeg23 x1y0btm7 xy32g2j xb3r6kr x159tnba x1r7kqkb" }
35
34
  }[!!s << 1 | !!o],
36
- children: [/* @__PURE__ */ _("button", {
35
+ children: [/* @__PURE__ */ g("button", {
37
36
  type: "button",
38
37
  "aria-pressed": s,
39
38
  title: `${e.label} · ${r.states[e.state]}`,
@@ -42,14 +41,14 @@ function S({ runs: e, selected: t, hidden: n, labels: r, onSelectedChange: i, on
42
41
  event: t.nativeEvent
43
42
  }),
44
43
  className: "x3nfvp2 x6s0dn4 x1hnptsi xeuugli x159bbqr x5g2kb4 xc342km xjbqb8w xbixft x1ypdohk x1hz01jw xtqrqnz x1778rvt xx9gdjd x2ssjo2",
45
- children: [/* @__PURE__ */ g(b, { id: e.id }), /* @__PURE__ */ g("span", {
44
+ children: [/* @__PURE__ */ h(y, { id: e.id }), /* @__PURE__ */ h("span", {
46
45
  ...{
47
46
  0: { className: "xb3r6kr xlyipyv xuxw1ft" },
48
47
  1: { className: "xb3r6kr xlyipyv xuxw1ft x153jb6y xmqliwb x1ks1olk" }
49
48
  }[!!o | 0],
50
49
  children: e.label
51
50
  })]
52
- }), /* @__PURE__ */ g("button", {
51
+ }), /* @__PURE__ */ h("button", {
53
52
  type: "button",
54
53
  "aria-pressed": !o,
55
54
  "aria-label": `${o ? r.show : r.hide} ${e.label}`,
@@ -58,8 +57,8 @@ function S({ runs: e, selected: t, hidden: n, labels: r, onSelectedChange: i, on
58
57
  event: t.nativeEvent
59
58
  }),
60
59
  className: "x3nfvp2 x6s0dn4 x1hnptsi xeuugli x159bbqr x5g2kb4 xc342km xjbqb8w x1ypdohk x1hz01jw xtqrqnz x1778rvt xx9gdjd x2ssjo2 x153jb6y",
61
- children: /* @__PURE__ */ g(c, {
62
- size: x,
60
+ children: /* @__PURE__ */ h(c, {
61
+ size: b,
63
62
  "aria-hidden": !0
64
63
  })
65
64
  })]
@@ -68,81 +67,82 @@ function S({ runs: e, selected: t, hidden: n, labels: r, onSelectedChange: i, on
68
67
  });
69
68
  }
70
69
  // packages/kits/src/training/runs.ts
71
- var C = {
70
+ var S = {
72
71
  running: "Running",
73
72
  finished: "Finished",
74
73
  failed: "Failed",
75
74
  stopped: "Stopped"
76
- }, w = { runs: 12 };
77
- function T(e) {
78
- return new Set(e.map((e) => e.id)).size === e.length ? e.length > w.runs ? `This view shows at most ${w.runs} runs. Use RunsOverview for a sweep.` : void 0 : "Runs must have unique identifiers.";
75
+ }, C = { runs: 12 };
76
+ function w(e) {
77
+ return new Set(e.map((e) => e.id)).size === e.length ? e.length > C.runs ? `This view shows at most ${C.runs} runs. Use RunsOverview for a sweep.` : void 0 : "Runs must have unique identifiers.";
79
78
  }
80
- function E(e) {
79
+ function T(e) {
81
80
  return Object.fromEntries(e.flatMap((e) => e.tone === void 0 ? [] : [[e.id, e.tone]]));
82
81
  }
83
82
  // packages/kits/src/training/run-dashboard.tsx
84
- var D = {
83
+ var E = {
85
84
  legend: "Runs",
86
85
  hide: "Hide",
87
86
  show: "Show",
88
- states: C,
87
+ states: S,
89
88
  noRuns: "There are no runs to compare.",
90
89
  allHidden: "Every run is hidden. Show a run to see its curves."
91
90
  };
92
- function O({ runs: e, metrics: t, series: n, selected: r, hidden: i }) {
91
+ function D({ runs: e, metrics: t, series: n, selected: r, hidden: i }) {
93
92
  let a = new Set(e.map((e) => e.id)), o = new Set(t.map((e) => e.id)), s = Object.keys(n).find((e) => !o.has(e)), c = Object.values(n).flatMap((e) => Object.keys(e)).find((e) => !a.has(e));
94
93
  if (o.size !== t.length) return "Metrics must have unique identifiers.";
95
94
  if (s !== void 0) return `The series name metric ${s}, which is not among the metrics.`;
96
95
  if (c !== void 0) return `The series name run ${c}, which is not among the runs.`;
97
96
  if (r !== null && !a.has(r)) return `The selected run ${r} is not among the runs.`;
98
97
  let l = i.find((e) => !a.has(e));
99
- return l === void 0 ? T(e) : `The hidden run ${l} is not among the runs.`;
98
+ return l === void 0 ? w(e) : `The hidden run ${l} is not among the runs.`;
100
99
  }
101
- function k({ title: t, description: r, locale: o, status: s, coverage: c, transforms: l, runs: u, metrics: d, series: f, x: p, selected: m = null, onSelectedChange: h, hidden: v = [], onHiddenChange: y, hasLegend: b = !0, height: x = "compact", minPanelWidth: C, labels: w }) {
102
- let T = {
103
- ...D,
100
+ function O({ title: t, description: r, locale: a, status: s, coverage: c, transforms: l, runs: u, metrics: d, series: f, x: p, selected: m = null, onSelectedChange: _, hidden: v = [], onHiddenChange: y, hasLegend: b = !0, height: S = "compact", minPanelWidth: C, labels: w }) {
101
+ let O = {
102
+ ...E,
104
103
  ...w
105
- }, k = O({
104
+ }, k = D({
106
105
  runs: u,
107
106
  metrics: d,
108
107
  series: f,
109
108
  selected: m,
110
109
  hidden: v
111
110
  });
112
- if (k !== void 0) return /* @__PURE__ */ g(a, {
113
- hasError: !0,
111
+ if (k !== void 0) return /* @__PURE__ */ h(o, {
112
+ tone: "negative",
113
+ role: "alert",
114
114
  children: `${t}: ${k}`
115
115
  });
116
- let A = u.filter((e) => !v.includes(e.id)), j = u.length === 0 ? T.noRuns : T.allHidden;
117
- return /* @__PURE__ */ g(n, {
116
+ let A = u.filter((e) => !v.includes(e.id)), j = u.length === 0 ? O.noRuns : O.allHidden;
117
+ return /* @__PURE__ */ h(n, {
118
118
  ids: u.map((e) => e.id),
119
- tones: E(u),
120
- children: /* @__PURE__ */ _("div", {
119
+ tones: T(u),
120
+ children: /* @__PURE__ */ g("div", {
121
121
  className: "xrvj5dj xaml1ju xeuugli",
122
- children: [b && /* @__PURE__ */ g(S, {
122
+ children: [b && /* @__PURE__ */ h(x, {
123
123
  runs: u,
124
124
  selected: m,
125
125
  hidden: v,
126
- labels: T,
127
- onSelectedChange: h,
126
+ labels: O,
127
+ onSelectedChange: _,
128
128
  onHiddenChange: y
129
- }), /* @__PURE__ */ g(e, {
129
+ }), /* @__PURE__ */ h(e, {
130
130
  title: t,
131
131
  description: r,
132
132
  minPanelWidth: C,
133
133
  ids: u.map((e) => e.id),
134
- tones: E(u),
135
- children: d.map((e) => /* @__PURE__ */ g(i, {
134
+ tones: T(u),
135
+ children: d.map((e) => /* @__PURE__ */ h(i, {
136
136
  title: e.title,
137
137
  description: e.description,
138
- locale: o,
138
+ locale: a,
139
139
  status: s,
140
140
  coverage: c,
141
141
  transforms: l,
142
142
  emptyLabel: j,
143
143
  x: p,
144
144
  y: e.y,
145
- height: x,
145
+ height: S,
146
146
  labels: "none",
147
147
  highlighted: m,
148
148
  series: A.map((t) => ({
@@ -156,125 +156,126 @@ function k({ title: t, description: r, locale: o, status: s, coverage: c, transf
156
156
  });
157
157
  }
158
158
  // packages/kits/src/training/run-state.tsx
159
- var A = {
159
+ var k = {
160
160
  running: "neutral",
161
161
  finished: "positive",
162
162
  failed: "negative",
163
163
  stopped: "warning"
164
164
  };
165
- function j({ state: e, labels: t }) {
166
- return /* @__PURE__ */ g(m, {
167
- tone: A[e],
165
+ function A({ state: e, labels: t }) {
166
+ return /* @__PURE__ */ h(o, {
167
+ tone: k[e],
168
168
  children: t[e]
169
169
  });
170
170
  }
171
171
  // packages/kits/src/training/run-table.tsx
172
- var M = {
172
+ var j = {
173
173
  name: "Run",
174
174
  state: "State",
175
- states: C,
175
+ states: S,
176
176
  yes: "Yes",
177
177
  no: "No",
178
178
  empty: "There are no runs.",
179
179
  showRun: "Show in the charts:",
180
180
  focused: "Focused"
181
- }, N = 140, P = 92, F = 104, I = 170;
182
- function L({ column: e, run: t, labels: n, locale: r }) {
181
+ }, M = 140, N = 92, P = 104, F = 170;
182
+ function I({ column: e, run: t, labels: n, locale: r }) {
183
183
  let i = e.values[t] ?? null;
184
- return typeof i == "number" ? l({
184
+ return typeof i == "number" ? u({
185
185
  value: i,
186
186
  locale: r,
187
187
  format: e.format ?? {}
188
188
  }) : typeof i == "boolean" ? i ? n.yes : n.no : i ?? "Unavailable";
189
189
  }
190
- function R(e) {
190
+ function L(e) {
191
191
  return typeof e == "boolean" ? Number(e) : e;
192
192
  }
193
- function z(e, t) {
193
+ function R(e, t) {
194
194
  return e.kind === "bar" ? e.values[t] ?? null : e.values[t]?.findLast((e) => e !== null) ?? null;
195
195
  }
196
- function B(e, t) {
196
+ function z(e, t) {
197
197
  return e === null || t === null ? Number(e === null) - Number(t === null) : typeof e == "number" && typeof t == "number" ? e - t : String(e).localeCompare(String(t));
198
198
  }
199
- function V({ runs: e, columns: t, metrics: n }) {
199
+ function B({ runs: e, columns: t, metrics: n }) {
200
200
  let r = new Set(e.map((e) => e.id)), i = [...t.map((e) => e.values), ...n.map((e) => e.values)].flatMap((e) => Object.keys(e)).find((e) => !r.has(e)), a = [...t, ...n].map((e) => e.id);
201
- return new Set(a).size === a.length ? i === void 0 ? T(e) : `A column has values for run ${i}, which is not among the runs.` : "Columns and metrics must have unique identifiers.";
201
+ return new Set(a).size === a.length ? i === void 0 ? w(e) : `A column has values for run ${i}, which is not among the runs.` : "Columns and metrics must have unique identifiers.";
202
202
  }
203
- function H({ title: e, locale: t, status: r, runs: i, columns: o = [], metrics: l = [], showOnlyDifferences: m = !1, selected: _ = null, onSelectedChange: v, hidden: y = [], onHiddenChange: x, sort: S, onSortChange: C, labels: w }) {
204
- let T = {
205
- ...M,
203
+ function V({ title: e, locale: t, status: r, runs: i, columns: s = [], metrics: u = [], showOnlyDifferences: g = !1, selected: _ = null, onSelectedChange: v, hidden: b = [], onHiddenChange: x, sort: S, onSortChange: C, labels: w }) {
204
+ let E = {
205
+ ...j,
206
206
  ...w
207
- }, [D, O] = h(), k = S === void 0 ? D : S ?? void 0, A = V({
207
+ }, [D, O] = m(), k = S === void 0 ? D : S ?? void 0, V = B({
208
208
  runs: i,
209
- columns: o,
210
- metrics: l
209
+ columns: s,
210
+ metrics: u
211
211
  });
212
- if (A !== void 0) return /* @__PURE__ */ g(a, {
213
- hasError: !0,
214
- children: `${e}: ${A}`
212
+ if (V !== void 0) return /* @__PURE__ */ h(o, {
213
+ tone: "negative",
214
+ role: "alert",
215
+ children: `${e}: ${V}`
215
216
  });
216
- let H = new Set(o.filter((e) => i.length > 1 && new Set(i.map((t) => e.values[t.id] ?? null)).size === 1).map((e) => e.id)), U = {
217
+ let H = new Set(s.filter((e) => i.length > 1 && new Set(i.map((t) => e.values[t.id] ?? null)).size === 1).map((e) => e.id)), U = {
217
218
  name: (e) => e.label,
218
- state: (e) => T.states[e.state],
219
- ...Object.fromEntries(o.map((e) => [e.id, (t) => R(e.values[t.id] ?? null)])),
220
- ...Object.fromEntries(l.map((e) => [e.id, (t) => z(e, t.id)]))
219
+ state: (e) => E.states[e.state],
220
+ ...Object.fromEntries(s.map((e) => [e.id, (t) => L(e.values[t.id] ?? null)])),
221
+ ...Object.fromEntries(u.map((e) => [e.id, (t) => R(e, t.id)]))
221
222
  }, W = i.toSorted((e, t) => {
222
- let n = k === void 0 ? void 0 : U[k.columnId], r = n === void 0 ? 0 : B(n(e), n(t));
223
+ let n = k === void 0 ? void 0 : U[k.columnId], r = n === void 0 ? 0 : z(n(e), n(t));
223
224
  return k?.direction === "descending" ? -r : r;
224
225
  }), G = [
225
226
  {
226
227
  id: "name",
227
- label: T.name,
228
+ label: E.name,
228
229
  role: "primary",
229
- width: I,
230
+ width: F,
230
231
  canSort: !0,
231
- cell: (e) => /* @__PURE__ */ g(d, {
232
- secondary: _ === e.id ? [T.focused, e.detail].filter(Boolean).join(" · ") : e.detail,
233
- leading: /* @__PURE__ */ g(b, { id: e.id }),
232
+ cell: (e) => /* @__PURE__ */ h(d, {
233
+ secondary: _ === e.id ? [E.focused, e.detail].filter(Boolean).join(" · ") : e.detail,
234
+ leading: /* @__PURE__ */ h(y, { id: e.id }),
234
235
  children: e.label
235
236
  })
236
237
  },
237
238
  {
238
239
  id: "state",
239
- label: T.state,
240
+ label: E.state,
240
241
  role: "status",
241
- width: F,
242
+ width: P,
242
243
  canSort: !0,
243
- cell: (e) => /* @__PURE__ */ g(j, {
244
+ cell: (e) => /* @__PURE__ */ h(A, {
244
245
  state: e.state,
245
- labels: T.states
246
+ labels: E.states
246
247
  })
247
248
  },
248
- ...o.filter((e) => !m || !H.has(e.id)).map((e) => ({
249
+ ...s.filter((e) => !g || !H.has(e.id)).map((e) => ({
249
250
  id: e.id,
250
251
  label: e.label,
251
252
  role: typeof Object.values(e.values).find((e) => e !== null) == "number" ? "number" : "text",
252
- width: P,
253
+ width: N,
253
254
  isSecondary: !0,
254
255
  canSort: !0,
255
- cell: (n) => /* @__PURE__ */ g(p, {
256
+ cell: (n) => /* @__PURE__ */ h(a, {
256
257
  tone: H.has(e.id) ? "muted" : "ink",
257
- children: L({
258
+ children: I({
258
259
  column: e,
259
260
  run: n.id,
260
- labels: T,
261
+ labels: E,
261
262
  locale: t
262
263
  })
263
264
  })
264
265
  })),
265
- ...l.map((e) => ({
266
+ ...u.map((e) => ({
266
267
  id: e.id,
267
268
  label: e.label,
268
269
  role: "number",
269
- width: N,
270
+ width: M,
270
271
  canSort: !0,
271
- cell: (n) => e.kind === "bar" ? /* @__PURE__ */ g(s, {
272
+ cell: (n) => e.kind === "bar" ? /* @__PURE__ */ h(c, {
272
273
  id: n.id,
273
274
  value: e.values[n.id] ?? null,
274
275
  domain: e.domain,
275
276
  locale: t,
276
277
  format: e.format
277
- }) : /* @__PURE__ */ g(c, {
278
+ }) : /* @__PURE__ */ h(l, {
278
279
  id: n.id,
279
280
  points: e.values[n.id] ?? [],
280
281
  domain: e.domain,
@@ -283,14 +284,14 @@ function H({ title: e, locale: t, status: r, runs: i, columns: o = [], metrics:
283
284
  })
284
285
  }))
285
286
  ];
286
- return r === "loading" ? /* @__PURE__ */ g(u, {
287
+ return r === "loading" ? /* @__PURE__ */ h(f, {
287
288
  caption: e,
288
289
  columns: G,
289
290
  rows: i.length
290
- }) : /* @__PURE__ */ g(n, {
291
+ }) : /* @__PURE__ */ h(n, {
291
292
  ids: i.map((e) => e.id),
292
- tones: E(i),
293
- children: /* @__PURE__ */ g(f, {
293
+ tones: T(i),
294
+ children: /* @__PURE__ */ h(p, {
294
295
  query: {
295
296
  mode: "static",
296
297
  reason: "A run set is short and the application chooses which runs it holds."
@@ -299,17 +300,17 @@ function H({ title: e, locale: t, status: r, runs: i, columns: o = [], metrics:
299
300
  rows: W,
300
301
  columns: G,
301
302
  getRowId: (e) => e.id,
302
- empty: T.empty,
303
+ empty: E.empty,
303
304
  sort: k,
304
305
  onSortChange: (e) => {
305
306
  O(e), C?.(e);
306
307
  },
307
- selectedIds: new Set(i.filter((e) => !y.includes(e.id)).map((e) => e.id)),
308
+ selectedIds: new Set(i.filter((e) => !b.includes(e.id)).map((e) => e.id)),
308
309
  onSelectionChange: (e, t) => x?.(i.filter((t) => !e.has(t.id)).map((e) => e.id), {
309
310
  reason: t.reason === "item-press" ? "press" : "imperative",
310
311
  event: t.event
311
312
  }),
312
- selectionLabel: (e) => `${T.showRun} ${e.label}`,
313
+ selectionLabel: (e) => `${E.showRun} ${e.label}`,
313
314
  activeRowId: _ ?? void 0,
314
315
  rowAction: {
315
316
  label: (e) => e.label,
@@ -319,17 +320,17 @@ function H({ title: e, locale: t, status: r, runs: i, columns: o = [], metrics:
319
320
  });
320
321
  }
321
322
  // packages/kits/src/training/runs-overview.tsx
322
- function U({ summaryText: e, selected: t, ...n }) {
323
- return /* @__PURE__ */ _("div", {
323
+ function H({ summaryText: e, selected: t, ...n }) {
324
+ return /* @__PURE__ */ g("div", {
324
325
  className: "xrvj5dj x1hnptsi xeuugli",
325
- children: [/* @__PURE__ */ g(r, {
326
+ children: [/* @__PURE__ */ h(r, {
326
327
  ...n,
327
328
  selected: t,
328
329
  featured: t == null ? [] : [t]
329
- }), e !== void 0 && /* @__PURE__ */ g("p", {
330
+ }), e !== void 0 && /* @__PURE__ */ h("p", {
330
331
  className: "x1ghz6dp x153jb6y x1hz01jw xtqrqnz x1778rvt",
331
332
  children: e
332
333
  })]
333
334
  });
334
335
  }
335
- export { k as RunDashboard, H as RunTable, U as RunsOverview, w as runLimits, C as runStateLabels };
336
+ export { O as RunDashboard, V as RunTable, H as RunsOverview, C as runLimits, S as runStateLabels };
package/dist/layout.js CHANGED
@@ -1 +1 @@
1
- export { d as AppShell, n as CollectionLayout, h as DevToolsBar, l as FigureGrid, c as FocusPage, b as Navigation, x as NavigationItem, S as NavigationLink, p as NavigationRail, f as NavigationRailMenu, m as NavigationRailPlaceholder, C as NavigationSection, D as PageInset, _ as PageLayout, v as PageSection, u as ReadingColumn, t as RecordPage, s as Resizable, w as SidebarBrand, T as SidebarFooter, E as SidebarLabel, y as ToolbarAction, r as ViewStack, i as Workbench, a as WorkbenchFooter, o as WorkbenchScroll, g as useDevToolsBar } from "./src-9n2M1V_y.js";
1
+ export { d as AppShell, n as CollectionLayout, h as DevToolsBar, l as FigureGrid, c as FocusPage, b as Navigation, x as NavigationItem, S as NavigationLink, p as NavigationRail, f as NavigationRailMenu, m as NavigationRailPlaceholder, C as NavigationSection, D as PageInset, _ as PageLayout, v as PageSection, u as ReadingColumn, t as RecordPage, s as Resizable, w as SidebarBrand, T as SidebarFooter, E as SidebarLabel, y as ToolbarAction, r as ViewStack, i as Workbench, a as WorkbenchFooter, o as WorkbenchScroll, g as useDevToolsBar } from "./src-BCAelv4f.js";
package/dist/lesson.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { n as e, t } from "./clock-DSm5lkNE.js";
2
- import { _ as n, g as r, h as i, i as a, l as o, n as s, t as c, u as l } from "./param-CwT1RvUS.js";
3
- import { t as u } from "./use-tween-BWf44Jy4.js";
4
- import { a as d, c as f, d as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./transport-r1QgELf8.js";
2
+ import { _ as n, g as r, h as i, i as a, l as o, n as s, t as c, u as l } from "./param-Dk92C-K1.js";
3
+ import { t as u } from "./use-tween-DbXVZBR8.js";
4
+ import { a as d, c as f, d as p, i as m, l as h, n as g, o as _, r as v, s as y, t as b, u as x } from "./transport-DQ1yzsQl.js";
5
5
  export { a as BoundValue, h as Lesson, i as LessonLocale, c as Param, m as ParamChoice, d as ParamSlider, _ as ParamToggle, g as Playback, b as Transport, s as Value, n as createTween, o as defineLesson, t as isMotionReduced, l as lessonGraph, e as onFrame, x as playbackPaces, p as playbackRuns, y as useLesson, f as useLessonContext, r as useLessonLocale, v as usePlayback, u as useTween };