@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.
- package/README.md +21 -10
- package/dist/ai.js +288 -205
- package/dist/{article-BrUa4Wz1.js → article-Ni152e-v.js} +107 -92
- package/dist/article.js +1 -1
- package/dist/catalog.json +151 -34
- package/dist/{categorical-values-AXJkMt-Y.js → categorical-values-6Iz03F1i.js} +1 -1
- package/dist/{cells-X8SVrZBc.js → cells-BRI8LpMU.js} +1 -1
- package/dist/charts/cartesian.js +1 -1
- package/dist/charts/cells.js +1 -1
- package/dist/charts/comparison.js +1 -1
- package/dist/charts/distribution.js +1 -1
- package/dist/charts/figure.js +12 -12
- package/dist/charts/graph.js +1 -1
- package/dist/charts/hierarchy.js +1 -1
- package/dist/charts/image.js +1 -1
- package/dist/charts/matrix.js +2 -2
- package/dist/charts/plot.js +16 -15
- package/dist/charts/relationship.js +1 -1
- package/dist/charts/text.js +1 -1
- package/dist/charts/timeline.js +2 -2
- package/dist/charts/trend.js +1 -1
- package/dist/charts.js +3 -3
- package/dist/{code-block-BDRmjlES.js → code-block-DbW_t9U4.js} +1 -1
- package/dist/collections.js +1 -1
- package/dist/{color-legend-CIo7DhXB.js → color-legend-4As8881l.js} +1 -1
- package/dist/{commands-rzsDElrG.js → commands-C7Zrp-tG.js} +2 -2
- package/dist/content/code.js +1 -1
- package/dist/content/diff.js +3 -3
- package/dist/content/link.js +1 -1
- package/dist/content/markdown.js +1 -1
- package/dist/content/tree.js +2 -2
- package/dist/{content-link-DRaNf1mD.js → content-link-BN4NPp0u.js} +1 -1
- package/dist/content.js +1 -1
- package/dist/{dates-wu-gKO2C.js → dates-OTq-xU33.js} +2 -2
- package/dist/{dumbbell-plot-VFajQtEW.js → dumbbell-plot-jaQvOctJ.js} +4 -4
- package/dist/{embedding-map-BqDEmy88.js → embedding-map-DnZL1kvY.js} +8 -8
- package/dist/feedback.js +1 -1
- package/dist/figure-format-BVb7yFCA.js +46 -0
- package/dist/{figure-frame-Dd-pOeZN.js → figure-frame-96zFqsWz.js} +22 -21
- package/dist/forms/dates.js +1 -1
- package/dist/{forms-Bjx7JQ30.js → forms-iAOjGRTO.js} +1 -1
- package/dist/forms.js +2 -2
- package/dist/{image-grid-Dpyqxgwy.js → image-grid-B6fdmE9c.js} +4 -4
- package/dist/index.js +1 -1
- package/dist/kits/evaluation.js +15 -15
- package/dist/kits/interpretability.js +49 -45
- package/dist/kits/operations.js +81 -80
- package/dist/kits/research.js +776 -499
- package/dist/kits/training.js +108 -107
- package/dist/layout.js +1 -1
- package/dist/lesson.js +3 -3
- package/dist/markdown-JeuBeMDZ.js +293 -0
- package/dist/mdx.js +6 -6
- package/dist/navigation/commands.js +1 -1
- package/dist/{navigation-Cp3p0gss.js → navigation-CTnYtVD8.js} +1 -1
- package/dist/navigation.js +3 -3
- package/dist/packages/ai/src/index.d.ts +2 -0
- package/dist/packages/ai/src/message-reactions.d.ts +51 -0
- package/dist/packages/ai/src/message.d.ts +3 -1
- package/dist/packages/charts/src/plot/index.d.ts +2 -0
- package/dist/packages/charts/src/plot/plot-layout.d.ts +2 -2
- package/dist/packages/charts/src/plot/spatial-layer.d.ts +32 -0
- package/dist/packages/charts/src/plot/ticks.d.ts +2 -2
- package/dist/packages/collections/src/card-columns-model.d.ts +50 -0
- package/dist/packages/collections/src/card-columns.d.ts +30 -0
- package/dist/packages/collections/src/collection-page.d.ts +43 -0
- package/dist/packages/collections/src/column-card.d.ts +15 -0
- package/dist/packages/collections/src/data-table-layout.d.ts +2 -0
- package/dist/packages/collections/src/data-table-rows.d.ts +4 -3
- package/dist/packages/collections/src/data-table.d.ts +2 -2
- package/dist/packages/collections/src/index.d.ts +5 -0
- package/dist/packages/collections/src/table-query.d.ts +9 -1
- package/dist/packages/feedback/src/feedback.d.ts +0 -4
- package/dist/packages/feedback/src/index.d.ts +1 -1
- package/dist/packages/foundations/src/visible-motion.d.ts +1 -1
- package/dist/packages/kits/src/research/index.d.ts +7 -2
- package/dist/packages/kits/src/research/motion-clip.d.ts +41 -0
- package/dist/packages/kits/src/research/motion-error.d.ts +8 -0
- package/dist/packages/kits/src/research/motion-figure.d.ts +9 -0
- package/dist/packages/kits/src/research/motion-frame.d.ts +22 -0
- package/dist/packages/kits/src/research/motion-scene.d.ts +22 -0
- package/dist/packages/teaching/src/article/uncover.d.ts +2 -0
- package/dist/{param-CwT1RvUS.js → param-Dk92C-K1.js} +2 -2
- package/dist/{pierre-diff-DuvK3kLF.js → pierre-diff-DXVIwW7o.js} +1 -1
- package/dist/plot-CpTwLIYN.js +101 -0
- package/dist/{plot-layout-CvkeUuG6.js → plot-layout-1MG72ZWn.js} +175 -124
- package/dist/{plot-surface-yy37R4vs.js → plot-surface-8-FZI94y.js} +1 -1
- package/dist/{reference-lines-AMeDkYlo.js → reference-lines-C18o1yEY.js} +1 -1
- package/dist/{scene-BRhI8XSy.js → scene-B8dppj5V.js} +7 -7
- package/dist/scene.js +1 -1
- package/dist/{slope-chart-BMOCaa8R.js → slope-chart-CELflRJd.js} +5 -5
- package/dist/{src-9n2M1V_y.js → src-BCAelv4f.js} +3 -3
- package/dist/{src-BgmAkau8.js → src-Bkov5TTa.js} +171 -164
- package/dist/{src-Bns-5joF.js → src-BsqbWDxS.js} +4 -4
- package/dist/{src-BdyO4PgQ.js → src-CIyuaSCi.js} +101 -107
- package/dist/{src-Tu6d_Pm8.js → src-Dc1t1ugL.js} +958 -585
- package/dist/{src-C5SH3jjU.js → src-DceyVyL0.js} +2 -2
- package/dist/{src-C_E29-DX.js → src-Dlh99sPD.js} +1 -1
- package/dist/styles2.css +33 -1
- package/dist/{time-series-CTNVqoUQ.js → time-series-DtAtGoT_.js} +9 -9
- package/dist/{timeline-DrsDtEIW.js → timeline-CzianQir.js} +5 -5
- package/dist/{token-heatmap-DddArdH8.js → token-heatmap-m6oaMwkK.js} +274 -289
- package/dist/{token-predictions-CBykmPID.js → token-predictions-CpGVjOIs.js} +4 -4
- package/dist/{transport-r1QgELf8.js → transport-DQ1yzsQl.js} +5 -5
- package/dist/{tree-diagram-BIJFK4pl.js → tree-diagram-D9ekymCQ.js} +5 -5
- package/dist/{treemap-DgmEw_mr.js → treemap-DT8q65LQ.js} +5 -5
- package/dist/{use-tween-BWf44Jy4.js → use-tween-DbXVZBR8.js} +1 -1
- package/dist/{violin-plot-BYJnv6sG.js → violin-plot-83HSjnQM.js} +4 -4
- package/dist/visible-motion-D6NwjGNz.js +24 -0
- package/dist/{waterfall-BNseqMas.js → waterfall-DmApvdrY.js} +5 -5
- package/package.json +1 -1
- package/recipes/recorded-motion.tsx +14 -0
- package/recipes/searchable-collection.tsx +74 -76
- package/skills/extend-elements/SKILL.md +2 -1
- package/skills/review-elements/SKILL.md +15 -7
- package/skills/review-explainer/SKILL.md +4 -0
- package/skills/upgrade-elements/SKILL.md +3 -1
- package/skills/upgrade-elements/references/releases.md +20 -0
- package/skills/use-elements/SKILL.md +10 -6
- package/skills/use-elements/references/collections.md +59 -12
- package/skills/use-elements/references/conversations.md +32 -0
- package/skills/use-elements/references/editorial-restraint.md +17 -29
- package/skills/use-elements/references/figures.md +6 -2
- package/skills/use-elements/references/kits.md +23 -0
- package/skills/use-elements/references/workspace.md +5 -5
- package/skills/write-explainer/SKILL.md +5 -0
- package/dist/figure-format-B8kRZMlo.js +0 -36
- package/dist/markdown--nfaDoR1.js +0 -313
- package/dist/packages/kits/src/research/collection-page.d.ts +0 -71
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { r as e } from "./tokens.stylex-dF5CACEJ.js";
|
|
2
|
-
import { t } from "./src-
|
|
3
|
-
import { t as
|
|
4
|
-
import { d as
|
|
5
|
-
import { T as o, b as s, c, w as l } from "./plot-layout-
|
|
2
|
+
import { o as t, t as n } from "./src-Bkov5TTa.js";
|
|
3
|
+
import { t as r } from "./accessibility-P89UG9-r.js";
|
|
4
|
+
import { d as i, u as a } from "./src-CIyuaSCi.js";
|
|
5
|
+
import { T as o, b as s, c, w as l } from "./plot-layout-1MG72ZWn.js";
|
|
6
6
|
import * as u from "@stylexjs/stylex";
|
|
7
7
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
8
|
import { formatNumber as m } from "@ui-sdk/core/number";
|
|
9
9
|
// packages/charts/src/chart-data.tsx
|
|
10
|
-
function h({ label: e, columns: t, rows:
|
|
10
|
+
function h({ label: e, columns: t, rows: n }) {
|
|
11
11
|
return /* @__PURE__ */ f("div", {
|
|
12
|
-
...u.props(
|
|
12
|
+
...u.props(r.hidden),
|
|
13
13
|
children: /* @__PURE__ */ p("table", { children: [
|
|
14
14
|
/* @__PURE__ */ f("caption", { children: e }),
|
|
15
15
|
/* @__PURE__ */ f("thead", { children: /* @__PURE__ */ f("tr", { children: t.map((e) => /* @__PURE__ */ f("th", {
|
|
16
16
|
scope: "col",
|
|
17
17
|
children: e.label
|
|
18
18
|
}, e.id)) }) }),
|
|
19
|
-
/* @__PURE__ */ f("tbody", { children:
|
|
19
|
+
/* @__PURE__ */ f("tbody", { children: n.map((e) => /* @__PURE__ */ f("tr", { children: t.map((t, n) => n === 0 ? /* @__PURE__ */ f("th", {
|
|
20
20
|
scope: "row",
|
|
21
21
|
children: e.values[n]
|
|
22
22
|
}, t.id) : /* @__PURE__ */ f("td", { children: e.values[n] }, t.id)) }, e.id)) })
|
|
@@ -82,14 +82,14 @@ function y() {
|
|
|
82
82
|
children: [/* @__PURE__ */ f("span", { ...u.props(_.swatch(e.line)) }), /* @__PURE__ */ p("span", {
|
|
83
83
|
className: "x1cqoux5 xeuugli",
|
|
84
84
|
children: [
|
|
85
|
-
/* @__PURE__ */ f(
|
|
85
|
+
/* @__PURE__ */ f(i, {}),
|
|
86
86
|
/* @__PURE__ */ f("span", {
|
|
87
87
|
className: "x1s85apg xannxpe",
|
|
88
|
-
children: /* @__PURE__ */ f(
|
|
88
|
+
children: /* @__PURE__ */ f(i, {})
|
|
89
89
|
}),
|
|
90
90
|
/* @__PURE__ */ f("span", {
|
|
91
91
|
className: "x1s85apg xannxpe x1mqbd49 xbixft xss6m8b",
|
|
92
|
-
children: /* @__PURE__ */ f(
|
|
92
|
+
children: /* @__PURE__ */ f(i, {})
|
|
93
93
|
})
|
|
94
94
|
]
|
|
95
95
|
})]
|
|
@@ -244,7 +244,7 @@ function T(e, t) {
|
|
|
244
244
|
function E(e, t) {
|
|
245
245
|
return `${T(e.shown, t)} of ${T(e.total, t)} ${e.unit} shown`;
|
|
246
246
|
}
|
|
247
|
-
function D({ title: e, description:
|
|
247
|
+
function D({ title: e, description: t, report: i, actions: a, locale: o, source: c, coverage: d, transforms: m = [], status: h = "ready", figure: g = {}, series: _, titleDetail: v, footer: y, seriesLegend: x, scaleLegend: S, children: C }) {
|
|
248
248
|
let w = l(), T = d !== void 0 && d.shown < d.total ? E(d, o) : void 0, D = [
|
|
249
249
|
w ? T : void 0,
|
|
250
250
|
c,
|
|
@@ -254,7 +254,7 @@ function D({ title: e, description: r, report: i, actions: a, locale: o, source:
|
|
|
254
254
|
detail: v
|
|
255
255
|
}), j = i === void 0 ? {} : { "data-figure-report": "" }, M = T === void 0 ? A : /* @__PURE__ */ p("span", {
|
|
256
256
|
className: "x3nfvp2 x1a02dak x1pha0wt xa2sdi0 x1gkm1c7",
|
|
257
|
-
children: [A, /* @__PURE__ */ f(
|
|
257
|
+
children: [A, /* @__PURE__ */ f(n, { children: T })]
|
|
258
258
|
});
|
|
259
259
|
return /* @__PURE__ */ p(s, {
|
|
260
260
|
figure: {
|
|
@@ -263,10 +263,10 @@ function D({ title: e, description: r, report: i, actions: a, locale: o, source:
|
|
|
263
263
|
"aria-busy": h !== "ready" || void 0
|
|
264
264
|
},
|
|
265
265
|
title: w ? /* @__PURE__ */ f("span", {
|
|
266
|
-
...u.props(
|
|
266
|
+
...u.props(r.hidden),
|
|
267
267
|
children: e
|
|
268
268
|
}) : M,
|
|
269
|
-
description: w ? void 0 :
|
|
269
|
+
description: w ? void 0 : t,
|
|
270
270
|
report: i,
|
|
271
271
|
actions: a,
|
|
272
272
|
series: _,
|
|
@@ -287,9 +287,9 @@ function D({ title: e, description: r, report: i, actions: a, locale: o, source:
|
|
|
287
287
|
})
|
|
288
288
|
]
|
|
289
289
|
}) : void 0,
|
|
290
|
-
children: [w &&
|
|
291
|
-
...u.props(
|
|
292
|
-
children:
|
|
290
|
+
children: [w && t !== void 0 && /* @__PURE__ */ f("p", {
|
|
291
|
+
...u.props(r.hidden),
|
|
292
|
+
children: t
|
|
293
293
|
}), C]
|
|
294
294
|
});
|
|
295
295
|
}
|
|
@@ -299,12 +299,13 @@ function O({ children: e }) {
|
|
|
299
299
|
children: e
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
|
-
function k({ message: e, ...
|
|
302
|
+
function k({ message: e, ...n }) {
|
|
303
303
|
return /* @__PURE__ */ f(D, {
|
|
304
|
-
...
|
|
304
|
+
...n,
|
|
305
305
|
status: "ready",
|
|
306
|
-
children: /* @__PURE__ */ f(
|
|
307
|
-
|
|
306
|
+
children: /* @__PURE__ */ f(t, {
|
|
307
|
+
tone: "negative",
|
|
308
|
+
role: "alert",
|
|
308
309
|
children: e
|
|
309
310
|
})
|
|
310
311
|
});
|
package/dist/forms/dates.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { o as Calendar, a as DatePicker, i as DateRangePicker, t as EventMonth, r as MonthPicker, n as MonthRangePicker, s as addCalendarDays, c as addCalendarMonths, l as parseCalendarDate, u as parseCalendarMonth, d as serializeCalendarDate, f as serializeCalendarMonth } from "../dates-
|
|
1
|
+
export { o as Calendar, a as DatePicker, i as DateRangePicker, t as EventMonth, r as MonthPicker, n as MonthRangePicker, s as addCalendarDays, c as addCalendarMonths, l as parseCalendarDate, u as parseCalendarMonth, d as serializeCalendarDate, f as serializeCalendarMonth } from "../dates-OTq-xU33.js";
|
package/dist/forms.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "./src-
|
|
2
|
-
import { i as C, n as w, t as T } from "./forms-
|
|
1
|
+
import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "./src-DceyVyL0.js";
|
|
2
|
+
import { i as C, n as w, t as T } from "./forms-iAOjGRTO.js";
|
|
3
3
|
export { t as AgentAvatarPicker, a as Checkbox, e as Combobox, T as Field, b as Fieldset, n as FilePicker, c as FormActions, l as FormStatus, w as Input, S as InputGroup, i as NumberField, d as RadioGroup, y as SegmentedControl, f as Select, h as SelectControl, _ as SettingsRow, m as SettingsSection, x as Slider, o as Switch, C as Textarea, s as ToggleGroup, v as TokenInput, p as defaultCodec, g as fromText, u as toLabel, r as toText };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as e } from "./tokens.stylex-dF5CACEJ.js";
|
|
2
|
-
import { x as t } from "./src-
|
|
2
|
+
import { x as t } from "./src-DceyVyL0.js";
|
|
3
3
|
import { t as n } from "./chart-tones-ei3BC2AL.js";
|
|
4
|
-
import { A as r, D as i, E as a, M as o, O as s, S as c, j as l } from "./plot-layout-
|
|
5
|
-
import { r as u } from "./figure-format-
|
|
4
|
+
import { A as r, D as i, E as a, M as o, O as s, S as c, j as l } from "./plot-layout-1MG72ZWn.js";
|
|
5
|
+
import { r as u } from "./figure-format-BVb7yFCA.js";
|
|
6
6
|
import { a as d, o as f } from "./scale-C2xgZyZN.js";
|
|
7
|
-
import { i as p, l as m, n as h, r as g, t as _ } from "./figure-frame-
|
|
7
|
+
import { i as p, l as m, n as h, r as g, t as _ } from "./figure-frame-96zFqsWz.js";
|
|
8
8
|
import { n as v, t as y } from "./plot-width-D3hTycYX.js";
|
|
9
9
|
import * as b from "@stylexjs/stylex";
|
|
10
10
|
import { useId as x, useState as S } from "react";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { _ as Accordion, x as AgentAvatar, T as Avatar, t as Badge, E as Button, v as Collapsible, d as Columns, D as ConfirmButton, b as CopyValue, f as Divider, y as FilterChips, n as Heading, O as IconButton, k as IconLink, r as Identifier, i as Muted, p as Panel, a as Prose, M as RouteLink, m as Row, l as SectionHeading, h as Stack, o as Status, s as Subheading, g as SurfaceLink, c as Text, A as TextButton, j as TextLink, S as agentAppearance, C as agentAvatarColors, w as agentAvatarShapes } from "./src-
|
|
1
|
+
export { _ as Accordion, x as AgentAvatar, T as Avatar, t as Badge, E as Button, v as Collapsible, d as Columns, D as ConfirmButton, b as CopyValue, f as Divider, y as FilterChips, n as Heading, O as IconButton, k as IconLink, r as Identifier, i as Muted, p as Panel, a as Prose, M as RouteLink, m as Row, l as SectionHeading, h as Stack, o as Status, s as Subheading, g as SurfaceLink, c as Text, A as TextButton, j as TextLink, S as agentAppearance, C as agentAvatarColors, w as agentAvatarShapes } from "./src-Bkov5TTa.js";
|
package/dist/kits/evaluation.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { T as e } from "../plot-layout-
|
|
2
|
-
import { r as t } from "../figure-format-
|
|
1
|
+
import { T as e } from "../plot-layout-1MG72ZWn.js";
|
|
2
|
+
import { r as t } from "../figure-format-BVb7yFCA.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-
|
|
5
|
-
import { d as o, g as s,
|
|
4
|
+
import { n as i, r as a } from "../figure-frame-96zFqsWz.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
|
-
import { a as d, i as f, o as p, r as m, t as h } from "../cells-
|
|
7
|
+
import { a as d, i as f, o as p, r as m, t as h } from "../cells-BRI8LpMU.js";
|
|
8
8
|
import { t as g } from "../accessibility-P89UG9-r.js";
|
|
9
|
-
import { r as _, t as v } from "../dumbbell-plot-
|
|
9
|
+
import { r as _, t as v } from "../dumbbell-plot-jaQvOctJ.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(
|
|
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:
|
|
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
|
-
...
|
|
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(
|
|
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(
|
|
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 =
|
|
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 =
|
|
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(
|
|
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(
|
|
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-
|
|
2
|
-
import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-
|
|
3
|
-
import { E as s, m as c,
|
|
4
|
-
import { m as u } from "../src-BdyO4PgQ.js";
|
|
1
|
+
import { u as e } from "../token-heatmap-m6oaMwkK.js";
|
|
2
|
+
import { a as t, c as n, f as r, o as i, r as a, t as o } from "../token-predictions-CpGVjOIs.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-
|
|
5
|
+
import { r as p } from "../tree-diagram-D9ekymCQ.js";
|
|
7
6
|
import { t as m } from "../tone-scope-DKiSw-JR.js";
|
|
8
|
-
import { d as h, l as g } from "../violin-plot-
|
|
9
|
-
import { r as _ } from "../figure-format-
|
|
10
|
-
import { t as v } from "../embedding-map-
|
|
11
|
-
import { n as y, t as b } from "../forms-
|
|
12
|
-
import { o as x, t as S } from "../cells-
|
|
13
|
-
import { d as C, g as w,
|
|
14
|
-
import { s as E } from "../slope-chart-
|
|
15
|
-
import { x as D } from "../src-
|
|
7
|
+
import { d as h, l as g } from "../violin-plot-83HSjnQM.js";
|
|
8
|
+
import { r as _ } from "../figure-format-BVb7yFCA.js";
|
|
9
|
+
import { t as v } from "../embedding-map-DnZL1kvY.js";
|
|
10
|
+
import { n as y, t as b } from "../forms-iAOjGRTO.js";
|
|
11
|
+
import { o as x, t as S } from "../cells-BRI8LpMU.js";
|
|
12
|
+
import { d as C, g as w, h as T } from "../src-Dc1t1ugL.js";
|
|
13
|
+
import { s as E } from "../slope-chart-CELflRJd.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:
|
|
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(
|
|
199
|
-
|
|
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:
|
|
214
|
-
destinations:
|
|
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:
|
|
251
|
+
tokens: u.map((e) => ({
|
|
252
252
|
id: e.id,
|
|
253
253
|
text: e.text
|
|
254
254
|
})),
|
|
255
|
-
links:
|
|
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)),
|
|
548
|
-
return
|
|
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(
|
|
580
|
-
|
|
581
|
-
|
|
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
|
-
},
|
|
618
|
-
if (d !== void 0) return /* @__PURE__ */ M(
|
|
619
|
-
|
|
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:
|
|
649
|
+
htmlFor: u,
|
|
648
650
|
children: c.search
|
|
649
651
|
}),
|
|
650
652
|
/* @__PURE__ */ M(y, {
|
|
651
|
-
id:
|
|
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:
|
|
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(
|
|
732
|
-
|
|
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(
|
|
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(
|
|
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) =>
|
|
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:
|
|
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(
|
|
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:
|
|
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:
|
|
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:
|
|
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(
|
|
941
|
-
|
|
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) =>
|
|
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) =>
|
|
983
|
+
onValueChange: (t, n) => u?.({
|
|
980
984
|
...S,
|
|
981
985
|
[e.id]: t
|
|
982
986
|
}, {
|