@mechane-ai/elements 0.49.1 → 0.50.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 (53) hide show
  1. package/dist/catalog.json +9 -1
  2. package/dist/charts/cartesian.js +1 -1
  3. package/dist/charts/comparison.js +1 -1
  4. package/dist/charts/distribution.js +1 -1
  5. package/dist/charts/figure.js +12 -12
  6. package/dist/charts/graph.js +1 -1
  7. package/dist/charts/hierarchy.js +1 -1
  8. package/dist/charts/image.js +1 -1
  9. package/dist/charts/matrix.js +1 -1
  10. package/dist/charts/plot.js +1 -1
  11. package/dist/charts/relationship.js +1 -1
  12. package/dist/charts/text.js +1 -1
  13. package/dist/charts/timeline.js +1 -1
  14. package/dist/charts/trend.js +1 -1
  15. package/dist/collections.js +1 -1
  16. package/dist/{dumbbell-plot-B-Tn7ewW.js → dumbbell-plot-BC8d_IJy.js} +1 -1
  17. package/dist/{embedding-map-Bljn-A5q.js → embedding-map-Bj8krO-d.js} +1 -1
  18. package/dist/figure-frame-koVKcXph.js +323 -0
  19. package/dist/{image-grid-mrG5u9oE.js → image-grid-CLhol2jy.js} +1 -1
  20. package/dist/kits/evaluation.js +49 -47
  21. package/dist/kits/interpretability.js +7 -7
  22. package/dist/kits/operations.js +4 -4
  23. package/dist/kits/research.js +346 -264
  24. package/dist/kits/training.js +2 -2
  25. package/dist/layout.js +1 -1075
  26. package/dist/mdx.js +1 -1
  27. package/dist/packages/charts/src/chart-inspection.d.ts +4 -1
  28. package/dist/packages/collections/src/data-table-trigger.d.ts +2 -0
  29. package/dist/packages/kits/src/evaluation/leaderboard.d.ts +2 -0
  30. package/dist/packages/kits/src/research/collection-page.d.ts +46 -0
  31. package/dist/packages/kits/src/research/index.d.ts +2 -0
  32. package/dist/packages/kits/src/research/milestone-path.d.ts +1 -2
  33. package/dist/packages/kits/src/research/work-heartbeat.d.ts +4 -3
  34. package/dist/packages/layout/src/detail-page.d.ts +3 -1
  35. package/dist/{scene-BwJKueD6.js → scene-4ePpWdmE.js} +2 -2
  36. package/dist/scene.js +1 -1
  37. package/dist/{slope-chart-CGTYbFxi.js → slope-chart-DWZIYDty.js} +1 -1
  38. package/dist/{src-B2rgpWap.js → src-DNclWY4V.js} +1 -1
  39. package/dist/src-DhWMspwr.js +1085 -0
  40. package/dist/styles2.css +8 -0
  41. package/dist/{time-series-Dh8y5ba0.js → time-series-CsngFxr1.js} +1 -1
  42. package/dist/{token-heatmap-BTrZ3-N4.js → token-heatmap-BQLIxPky.js} +1 -1
  43. package/dist/{token-predictions-CUe4junQ.js → token-predictions-C3B5L-eO.js} +1 -1
  44. package/dist/{tree-diagram-Dpqmo-fh.js → tree-diagram-Dau9jeXS.js} +1 -1
  45. package/dist/{treemap-BUSaVD3m.js → treemap-DWrMQndu.js} +1 -1
  46. package/dist/{violin-plot-BxaLwdRi.js → violin-plot-D05ODcyc.js} +1 -1
  47. package/dist/{waterfall-CcDMdKec.js → waterfall-BkLLv2Lm.js} +1 -1
  48. package/package.json +1 -1
  49. package/skills/review-elements/SKILL.md +14 -0
  50. package/skills/use-elements/SKILL.md +18 -16
  51. package/skills/use-elements/references/editorial-restraint.md +40 -0
  52. package/skills/use-elements/references/workspace.md +14 -8
  53. package/dist/figure-frame-CEijciL7.js +0 -289
@@ -1,12 +1,12 @@
1
1
  import { T as e } from "../plot-layout-B2xRt-_k.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-CEijciL7.js";
5
- import { d as o, g as s, u as c } from "../src-B2rgpWap.js";
4
+ import { n as i, r as a } from "../figure-frame-koVKcXph.js";
5
+ import { d as o, g as s, u as c } from "../src-DNclWY4V.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-CNZE4us2.js";
8
8
  import { t as g } from "../accessibility-P89UG9-r.js";
9
- import { r as _, t as v } from "../dumbbell-plot-B-Tn7ewW.js";
9
+ import { r as _, t as v } from "../dumbbell-plot-BC8d_IJy.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
@@ -149,19 +149,19 @@ function B({ model: t }) {
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, ...h } = e, { emptyLabel: g = "No models have results yet.", ..._ } = h, v = {
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 = {
153
153
  ...N,
154
154
  ...m
155
- }, y = T(l.map((e) => e.model)), x = [
155
+ }, x = T(l.map((e) => e.model)), S = [
156
156
  ...l.some((e) => e.rank !== void 0) ? [{
157
157
  id: "rank",
158
- label: v.rank,
158
+ label: y.rank,
159
159
  role: "number",
160
160
  width: F
161
161
  }] : [],
162
162
  {
163
163
  id: "model",
164
- label: v.model,
164
+ label: y.model,
165
165
  role: "primary"
166
166
  },
167
167
  ...s.map((e) => ({
@@ -172,32 +172,32 @@ function V(e) {
172
172
  ...e.isSecondary === !0 && { isSecondary: !0 }
173
173
  }))
174
174
  ];
175
- if (_.status === "loading") return /* @__PURE__ */ b(i, {
176
- ..._,
175
+ if (v.status === "loading") return /* @__PURE__ */ b(i, {
176
+ ...v,
177
177
  children: /* @__PURE__ */ b(o, {
178
- caption: _.title,
179
- columns: x,
178
+ caption: v.title,
179
+ columns: S,
180
180
  rows: I
181
181
  })
182
182
  });
183
- let S = R(e);
184
- if (S !== void 0) return /* @__PURE__ */ b(a, {
185
- ..._,
186
- message: S
183
+ let C = R(e);
184
+ if (C !== void 0) return /* @__PURE__ */ b(a, {
185
+ ...v,
186
+ message: C
187
187
  });
188
- let C = new Map(n.map((e) => [e.id, e])), w = new Map(s.map((e) => {
188
+ let w = new Map(n.map((e) => [e.id, e])), D = new Map(s.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
- })), D = x.map((e) => ({
191
+ })), O = S.map((e) => ({
192
192
  ...e,
193
193
  cell: (n) => {
194
- let r = C.get(n.model) ?? {
194
+ let r = w.get(n.model) ?? {
195
195
  id: n.model,
196
196
  label: n.model
197
197
  }, i = s.find((t) => t.id === e.id);
198
198
  if (i === void 0) return e.id === "rank" ? t({
199
199
  value: n.rank ?? null,
200
- locale: _.locale,
200
+ locale: v.locale,
201
201
  format: L
202
202
  }) : /* @__PURE__ */ b(B, { model: r });
203
203
  let a = n.values[i.id] ?? null;
@@ -205,16 +205,16 @@ function V(e) {
205
205
  column: i,
206
206
  value: a,
207
207
  model: n.model,
208
- locale: _.locale,
209
- isBest: k(a) !== null && k(a) === w.get(i.id),
210
- bestLabel: v.best
208
+ locale: v.locale,
209
+ isBest: k(a) !== null && k(a) === D.get(i.id),
210
+ bestLabel: y.best
211
211
  });
212
212
  }
213
- })), O = s.filter((e) => e.isHigherBetter).map((e) => e.label), A = s.filter((e) => !e.isHigherBetter).map((e) => e.label), M = [
214
- ...O.length > 0 ? [`${v.higherIsBetter}: ${O.join(", ")}.`] : [],
215
- ...A.length > 0 ? [`${v.lowerIsBetter}: ${A.join(", ")}.`] : [],
216
- v.bestNote
217
- ].join(" "), P = {
213
+ })), A = s.filter((e) => e.isHigherBetter).map((e) => e.label), M = s.filter((e) => !e.isHigherBetter).map((e) => e.label), P = [
214
+ ...A.length > 0 ? [`${y.higherIsBetter}: ${A.join(", ")}.`] : [],
215
+ ...M.length > 0 ? [`${y.lowerIsBetter}: ${M.join(", ")}.`] : [],
216
+ y.bestNote
217
+ ].join(" "), V = {
218
218
  query: {
219
219
  mode: "static",
220
220
  reason: "The leaderboard shows every model it is given."
@@ -223,35 +223,35 @@ function V(e) {
223
223
  rows: l,
224
224
  sort: u,
225
225
  models: n,
226
- locale: _.locale
226
+ locale: v.locale
227
227
  }),
228
228
  getRowId: (e) => e.model,
229
- caption: _.title,
229
+ caption: v.title,
230
230
  hideCaption: !0,
231
- empty: g,
232
- onRowHighlightChange: y
233
- }, V = p === void 0 ? {} : {
231
+ empty: _,
232
+ onRowHighlightChange: x
233
+ }, H = p === void 0 ? {} : {
234
234
  selectedIds: new Set(f),
235
235
  onSelectionChange: (e, t) => p(Array.from(e), t),
236
- selectionLabel: (e) => `${v.select} ${C.get(e.model)?.label ?? e.model}`
236
+ selectionLabel: (e) => `${y.select} ${w.get(e.model)?.label ?? e.model}`
237
237
  };
238
238
  return /* @__PURE__ */ b(r, {
239
239
  ids: n.map((e) => e.id),
240
240
  tones: Object.fromEntries(n.flatMap((e) => e.tone === void 0 ? [] : [[e.id, e.tone]])),
241
241
  children: /* @__PURE__ */ b(i, {
242
- ..._,
243
- footer: M,
242
+ ...v,
243
+ footer: h ? P : void 0,
244
244
  children: d === void 0 ? /* @__PURE__ */ b(c, {
245
- ...P,
246
245
  ...V,
247
- columns: D.map((e) => ({
246
+ ...H,
247
+ columns: O.map((e) => ({
248
248
  ...e,
249
249
  canSort: !1
250
250
  }))
251
251
  }) : /* @__PURE__ */ b(c, {
252
- ...P,
253
252
  ...V,
254
- columns: D.map((e) => ({
253
+ ...H,
254
+ columns: O.map((e) => ({
255
255
  ...e,
256
256
  canSort: e.id !== "rank"
257
257
  })),
@@ -269,9 +269,9 @@ var H = {
269
269
  interval: "Interval",
270
270
  reading: "Reading",
271
271
  ahead: "ahead",
272
- unclear: "No clear difference",
273
- untested: "Not tested",
274
- noInterval: "None given"
272
+ unclear: "—",
273
+ untested: "—",
274
+ noInterval: "—"
275
275
  }, U = 4, W = {
276
276
  difference: 128,
277
277
  interval: 168,
@@ -305,7 +305,7 @@ function q(e) {
305
305
  function I(e) {
306
306
  return e.isSignificant === void 0 ? E.untested : e.isSignificant ? `${(e.difference ?? 0) > 0 === p ? i.label : r.label} ${E.ahead}` : E.unclear;
307
307
  }
308
- let L = [
308
+ let L = u.some((e) => e.interval !== void 0), R = [
309
309
  {
310
310
  id: "benchmark",
311
311
  label: E.benchmark,
@@ -324,7 +324,7 @@ function q(e) {
324
324
  format: N
325
325
  })
326
326
  },
327
- {
327
+ ...L ? [{
328
328
  id: "interval",
329
329
  label: E.interval,
330
330
  role: "number",
@@ -338,7 +338,7 @@ function q(e) {
338
338
  locale: P,
339
339
  format: N
340
340
  })}`
341
- },
341
+ }] : [],
342
342
  {
343
343
  id: "reading",
344
344
  label: E.reading,
@@ -370,7 +370,8 @@ function q(e) {
370
370
  onSelectedChange: S
371
371
  }), C.status === "loading" ? /* @__PURE__ */ b(o, {
372
372
  caption: `${E.caption} ${i.label} minus ${r.label}`,
373
- columns: L,
373
+ hideCaption: !0,
374
+ columns: R,
374
375
  rows: U,
375
376
  rowSizing: "content"
376
377
  }) : u.length > 0 && /* @__PURE__ */ b(c, {
@@ -379,9 +380,10 @@ function q(e) {
379
380
  reason: "The comparison lists every benchmark it is given."
380
381
  },
381
382
  rows: u,
382
- columns: L,
383
+ columns: R,
383
384
  getRowId: (e) => e.id,
384
385
  caption: `${E.caption} ${i.label} minus ${r.label}`,
386
+ hideCaption: !0,
385
387
  empty: null,
386
388
  rowSizing: "content",
387
389
  activeRowId: j?.inspected ?? void 0,
@@ -1,17 +1,17 @@
1
- import { u as e } from "../token-heatmap-BTrZ3-N4.js";
2
- import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-CUe4junQ.js";
1
+ import { u as e } from "../token-heatmap-BQLIxPky.js";
2
+ import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-C3B5L-eO.js";
3
3
  import { T as s, m as c, t as l } from "../src-9EJskqB_.js";
4
4
  import { m as u } from "../src-npqwq3Sa.js";
5
5
  import { n as d, t as f } from "../chart-link-AE_xuxiP.js";
6
- import { r as p } from "../tree-diagram-Dpqmo-fh.js";
6
+ import { r as p } from "../tree-diagram-Dau9jeXS.js";
7
7
  import { t as m } from "../tone-scope-DKiSw-JR.js";
8
- import { d as h, l as g } from "../violin-plot-BxaLwdRi.js";
8
+ import { d as h, l as g } from "../violin-plot-D05ODcyc.js";
9
9
  import { r as _ } from "../figure-format-B8kRZMlo.js";
10
- import { t as v } from "../embedding-map-Bljn-A5q.js";
10
+ import { t as v } from "../embedding-map-Bj8krO-d.js";
11
11
  import { n as y, t as b } from "../forms-CEbwzlRR.js";
12
12
  import { o as x, t as S } from "../cells-CNZE4us2.js";
13
- import { d as C, g as w, u as T } from "../src-B2rgpWap.js";
14
- import { s as E } from "../slope-chart-CGTYbFxi.js";
13
+ import { d as C, g as w, u as T } from "../src-DNclWY4V.js";
14
+ import { s as E } from "../slope-chart-DWZIYDty.js";
15
15
  import { x as D } from "../src-Dxs3Buo_.js";
16
16
  import * as O from "@stylexjs/stylex";
17
17
  import { useId as k, useState as A } from "react";
@@ -1,11 +1,11 @@
1
- import { a as e } from "../dumbbell-plot-B-Tn7ewW.js";
1
+ import { a as e } from "../dumbbell-plot-BC8d_IJy.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
4
  import { c as r, i, o as a, s as o } from "../src-9EJskqB_.js";
5
5
  import { m as s } from "../src-npqwq3Sa.js";
6
- import { n as c } from "../waterfall-CcDMdKec.js";
7
- import { r as l, s as u } from "../time-series-Dh8y5ba0.js";
8
- import { i as d, r as f } from "../src-B2rgpWap.js";
6
+ import { n as c } from "../waterfall-BkLLv2Lm.js";
7
+ import { r as l, s as u } from "../time-series-CsngFxr1.js";
8
+ import { i as d, r as f } from "../src-DNclWY4V.js";
9
9
  import "@stylexjs/stylex";
10
10
  import { useId as p } from "react";
11
11
  import { jsx as m, jsxs as h } from "react/jsx-runtime";