@mechane-ai/elements 0.49.1 → 0.51.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 +21 -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 +413 -265
  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 +63 -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
package/dist/mdx.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { _ as e, b as t, d as n, f as r, g as i, i as ee, l as a, m as o, n as s, p as te, r as c, t as ne, u as re, v as ie, x as ae, y as oe } from "./article-CRlhq9oA.js";
2
2
  import { n as se, t as ce } from "./param-BdqTpZER.js";
3
3
  import { a as l, i as u, n as d, o as f, t as p } from "./transport-4V9rfYHN.js";
4
- import { C as m, F as h, G as g, H as _, I as v, J as y, L as b, M as x, N as S, P as C, U as w, W as T, X as E, Y as D, b as O, g as k, i as A, l as j, q as M, r as N, t as P, tt as F, u as I, x as L } from "./scene-BwJKueD6.js";
4
+ import { C as m, F as h, G as g, H as _, I as v, J as y, L as b, M as x, N as S, P as C, U as w, W as T, X as E, Y as D, b as O, g as k, i as A, l as j, q as M, r as N, t as P, tt as F, u as I, x as L } from "./scene-4ePpWdmE.js";
5
5
  import { t as R } from "./code-block-BZsY2sh3.js";
6
6
  import { t as z } from "./content-link-PnpcnTCx.js";
7
7
  import * as B from "@stylexjs/stylex";
@@ -3,6 +3,7 @@ import type { ChartLegendItem } from './chart-frame.tsx';
3
3
  export type ChartInspectionRow = ChartLegendItem & {
4
4
  readonly value: string;
5
5
  };
6
+ export type ChartInspectionMode = 'inline' | 'floating';
6
7
  type ChartInspectionProps = {
7
8
  readonly id: string;
8
9
  readonly label: string | undefined;
@@ -17,6 +18,8 @@ type ChartInspectionProps = {
17
18
  readonly hasSeriesSummary?: boolean | undefined;
18
19
  /** False for a plot whose axis labels name every mark, so the inspector replaces the legend at every width. */
19
20
  readonly hasLegend?: boolean | undefined;
21
+ /** Inline readout inside the legend row (default) avoids floating cards that obscure or clip over the plot. */
22
+ readonly mode?: ChartInspectionMode | undefined;
20
23
  };
21
24
  export declare function ChartLegendLoading(): ReactNode;
22
25
  export declare function ChartInspectionTitle({ title, detail, }: {
@@ -24,5 +27,5 @@ export declare function ChartInspectionTitle({ title, detail, }: {
24
27
  readonly detail: string | undefined;
25
28
  }): ReactNode;
26
29
  export declare function inspectionReadout({ label, summary, rows, notes, }: Pick<ChartInspectionProps, 'label' | 'summary' | 'rows' | 'notes'>): string | undefined;
27
- export declare function ChartInspection({ id, label, summary, legend, layoutLegend, rows, x, width, offset, notes, hasSeriesSummary, hasLegend, }: ChartInspectionProps): ReactNode;
30
+ export declare function ChartInspection({ id, label, summary, legend, layoutLegend, rows, x, width, offset, notes, hasSeriesSummary, hasLegend, mode, }: ChartInspectionProps): ReactNode;
28
31
  export {};
@@ -1,6 +1,8 @@
1
1
  import type { ComponentProps, ReactNode } from 'react';
2
2
  export type DataTableRowAction<Row> = {
3
3
  readonly label?: (row: Row) => string;
4
+ /** Show a hover tooltip repeating `label`. Defaults to false; `label` always provides `aria-label`. */
5
+ readonly showTooltip?: boolean;
4
6
  } & ({
5
7
  readonly href: (row: Row) => string;
6
8
  readonly onActivate?: (row: Row) => void;
@@ -44,6 +44,8 @@ export type LeaderboardProps = FigureProps & {
44
44
  /** Hears a press on a row's checkbox. Without it the rows have no checkboxes. */
45
45
  readonly onSelectedChange?: ((selected: ReadonlyArray<string>, details: DataTableSelectionDetails) => void) | undefined;
46
46
  readonly labels?: Partial<LeaderboardLabels> | undefined;
47
+ /** Show the generated direction/bolding footnote below the table. Defaults to false. */
48
+ readonly showLegendNote?: boolean | undefined;
47
49
  };
48
50
  /** The most models and measure columns a leaderboard shows. Larger input is refused. */
49
51
  export declare const leaderboardLimits: {
@@ -0,0 +1,63 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import type { DataTableColumn, DataTableRowAction, DataTableSort, DataTableSortDetails, TableFilterDimension, TableQueryException } from '../../../collections/src/index.ts';
3
+ import { PageLayout } from '../../../layout/src/index.ts';
4
+ export type CollectionStatus = 'loading' | 'ready' | 'failed';
5
+ type SortableColumns<Row> = {
6
+ readonly columns: ReadonlyArray<DataTableColumn<Row>>;
7
+ readonly sort: DataTableSort | undefined;
8
+ readonly onSortChange: (sort: DataTableSort | undefined, details: DataTableSortDetails) => void;
9
+ } | {
10
+ readonly columns: ReadonlyArray<DataTableColumn<Row> & {
11
+ readonly canSort?: false;
12
+ }>;
13
+ readonly sort?: never;
14
+ readonly onSortChange?: never;
15
+ };
16
+ type SharedCollectionProps<Row extends object> = SortableColumns<Row> & {
17
+ readonly title: string;
18
+ readonly caption?: string;
19
+ readonly rows: ReadonlyArray<Row>;
20
+ readonly getRowId: (row: Row) => string;
21
+ /** Local full-text search accessor, or an explicit exception reason when search is omitted. */
22
+ readonly search: ((row: Row) => string) | TableQueryException;
23
+ /** Local filter dimensions rendered in the top toolbar filter menu, or an explicit exception reason. */
24
+ readonly filters: ReadonlyArray<TableFilterDimension<Row>> | TableQueryException;
25
+ /** Optional custom row transformer (e.g. sorting) applied after local search and filtering. */
26
+ readonly transformRows?: (rows: ReadonlyArray<Row>) => ReadonlyArray<Row>;
27
+ readonly actions?: ReactNode;
28
+ readonly notice?: ReactNode;
29
+ readonly rowAction?: DataTableRowAction<Row> | undefined;
30
+ readonly activeRowId?: string | undefined;
31
+ readonly rowSizing?: 'fixed' | 'content' | undefined;
32
+ readonly empty: ReactNode;
33
+ readonly filteredEmpty?: ReactNode;
34
+ /** Read lifecycle state: `'loading'` reserves geometry with `DataTablePlaceholder` inside `AsyncRegion`. */
35
+ readonly status?: CollectionStatus;
36
+ readonly failure?: ReactNode;
37
+ readonly placeholderRows?: number;
38
+ };
39
+ export type CollectionPageProps<Row extends object> = SharedCollectionProps<Row> & {
40
+ readonly navigation?: ComponentProps<typeof PageLayout>['navigation'];
41
+ /** Optional right-hand inspector pane rendered inside a resizable Workbench split when open. */
42
+ readonly inspector?: {
43
+ readonly label: string;
44
+ readonly content: ReactNode;
45
+ } | undefined;
46
+ readonly inspectorInitialPercent?: number | undefined;
47
+ };
48
+ export type CollectionSectionProps<Row extends object> = SharedCollectionProps<Row> & {
49
+ readonly id?: string;
50
+ readonly meta?: ReactNode;
51
+ };
52
+ /**
53
+ * Full-width collection page Lego block: wires `PageLayout`, top-bar search and filter controls (`/` and `⌘F`), active
54
+ * filter chips, `AsyncRegion` + `DataTablePlaceholder` loading states, edge-to-edge `CollectionLayout`, and an optional
55
+ * resizable `Workbench` inspector.
56
+ */
57
+ export declare function CollectionPage<Row extends object>(props: CollectionPageProps<Row>): ReactNode;
58
+ /**
59
+ * Full-width collection section for tabbed or multi-section views. Wires `SectionHeading`, top-bar search and filters,
60
+ * active filter chips, `AsyncRegion` loading placeholders, and edge-to-edge `DataTable`.
61
+ */
62
+ export declare function CollectionSection<Row extends object>(props: CollectionSectionProps<Row>): ReactNode;
63
+ export {};
@@ -1,3 +1,5 @@
1
+ export type { CollectionPageProps, CollectionSectionProps, CollectionStatus } from './collection-page.tsx';
2
+ export { CollectionPage, CollectionSection } from './collection-page.tsx';
1
3
  export type { FindingCardLabels, FindingCardProps, FindingMetric, FindingSource, FindingStatus, } from './finding-card.tsx';
2
4
  export { FindingCard } from './finding-card.tsx';
3
5
  export type { MilestoneKind, MilestonePathLabels, MilestonePathProps, ResearchMilestone } from './milestone-path.tsx';
@@ -18,7 +18,6 @@ export type MilestonePathLabels = {
18
18
  readonly delta: string;
19
19
  readonly limitation: string;
20
20
  readonly source: string;
21
- readonly selectHint: string;
22
21
  readonly empty: string;
23
22
  readonly kinds: Readonly<Record<MilestoneKind, string>>;
24
23
  };
@@ -31,6 +30,6 @@ export type MilestonePathProps = Pick<FigureProps, 'title' | 'description' | 'lo
31
30
  };
32
31
  /**
33
32
  * A branching progression of research milestones: baselines, breakthroughs, falsified counterexamples, and decisions
34
- * composed from `TreeDiagram` with a linked evidence inspection panel. Draws no SVG of its own.
33
+ * composed from `TreeDiagram` with a flat inline evidence readout when a node is selected. Draws no SVG of its own.
35
34
  */
36
35
  export declare function MilestonePath({ milestones, valueLabel, valueFormat, deltaFormat, selected, onSelectedChange, labels: given, ...figure }: MilestonePathProps): ReactNode;
@@ -28,7 +28,8 @@ export type WorkHeartbeatProps = {
28
28
  readonly labels?: Partial<WorkHeartbeatLabels> | undefined;
29
29
  };
30
30
  /**
31
- * Displays reported execution checkpoints with explicit freshness and optional finite batch progress. The application
32
- * owns the state (including when an expired report becomes `'overdue'`); the kit never infers failure from staleness.
31
+ * Displays reported execution checkpoints as flat hairline-separated rows with explicit freshness and optional finite
32
+ * batch progress. The application owns the state (including when an expired report becomes `'overdue'`); the kit never
33
+ * infers failure from staleness.
33
34
  */
34
- export declare function WorkHeartbeat({ reports, locale, title, labels: given }: WorkHeartbeatProps): ReactNode;
35
+ export declare function WorkHeartbeat({ reports, locale, labels: given }: WorkHeartbeatProps): ReactNode;
@@ -2,6 +2,8 @@ import type { ReactNode } from 'react';
2
2
  type DetailPageProps = {
3
3
  readonly children: ReactNode;
4
4
  readonly isWide?: boolean;
5
+ /** Remove outer inset on a wide edge-to-edge canvas. Defaults to false so wide content aligns with page headers. */
6
+ readonly isBleed?: boolean;
5
7
  };
6
- export declare function DetailPage({ children, isWide }: DetailPageProps): ReactNode;
8
+ export declare function DetailPage({ children, isWide, isBleed }: DetailPageProps): ReactNode;
7
9
  export {};
@@ -1,6 +1,6 @@
1
1
  import { i as e } from "./chart-link-AE_xuxiP.js";
2
2
  import { A as t, D as n, E as r, O as i, S as a, c as o, j as s, l as c, s as l, t as u, u as d } from "./plot-layout-B2xRt-_k.js";
3
- import { i as f, l as p, n as m, r as h, t as g } from "./figure-frame-CEijciL7.js";
3
+ import { i as f, l as p, n as m, r as h, t as g } from "./figure-frame-koVKcXph.js";
4
4
  import { r as _, t as v } from "./plot-surface-0cKFwtws.js";
5
5
  import { a as y, i as b, r as x } from "./tone-scope-DKiSw-JR.js";
6
6
  import { _ as S, a as C, g as w, o as T, t as E, u as D } from "./param-BdqTpZER.js";
@@ -16,7 +16,7 @@ import { a as z, c as ee, f as te, n as B, t as V, u as ne } from "./plot-marks-
16
16
  import { i as re, r as ie, t as ae } from "./path-BglsXpnO.js";
17
17
  import { t as oe } from "./plot-axes-D5S9BnBa.js";
18
18
  import { t as se } from "./heatmap-scale-Zte6Ya-g.js";
19
- import { d as ce, f as le } from "./token-predictions-CUe4junQ.js";
19
+ import { d as ce, f as le } from "./token-predictions-C3B5L-eO.js";
20
20
  import * as H from "@stylexjs/stylex";
21
21
  import { Children as ue, createContext as de, memo as fe, use as pe, useEffect as me, useId as he, useLayoutEffect as U, useMemo as ge, useRef as _e, useState as W, useSyncExternalStore as ve } from "react";
22
22
  import { bindDrag as ye, dragThreshold as be } from "@ui-sdk/core";
package/dist/scene.js CHANGED
@@ -1 +1 @@
1
- export { r as LessonFlow, t as MorphScope, tt as Scene, H as SceneAxes, q as SceneBracket, G as SceneCallout, C as SceneCard, g as SceneCells, L as SceneCurve, U as SceneCustom, i as SceneFlow, J as SceneGroup, W as SceneHighlight, $ as SceneLayer, X as SceneNode, et as SceneOutside, I as ScenePoint, F as SceneProjection, P as SceneRegion, N as SceneRule, b as SceneSlot, x as SceneStack, u as SceneToken, l as SceneTokens, M as SceneVector, Y as SceneWire, w as cardRanks, T as cardSuits, v as cellGap, R as curveResolutions, nt as edgePoint, mt as fillLabel, a as flowNodeSize, s as flowPlan, c as flowPositions, n as morphLabels, rt as nodeBox, it as padRect, V as planeLabels, z as planeLimits, B as planeThicknesses, at as rectCenter, ot as rectsOverlap, E as sceneCardLabels, O as sceneCardSizes, y as sceneCellSizes, _ as sceneCellsLabels, st as sceneCircleSizes, Z as sceneContextColor, o as sceneFlowLabels, ht as sceneLabels, gt as sceneLimits, ct as sceneNodeSizes, Q as sceneOutlines, S as sceneStackLabels, _t as sceneStaggers, vt as sceneStore, d as sceneTokenLabels, lt as sidePoint, k as stackBounds, A as stackGaps, j as stackPlace, D as suitTones, p as tokenBox, m as tokenFlow, h as tokenGaps, f as tokenPercent, ut as unionRect, K as useObstacle, dt as useSceneContext, ft as useSceneFrames, pt as useSceneObject } from "./scene-BwJKueD6.js";
1
+ export { r as LessonFlow, t as MorphScope, tt as Scene, H as SceneAxes, q as SceneBracket, G as SceneCallout, C as SceneCard, g as SceneCells, L as SceneCurve, U as SceneCustom, i as SceneFlow, J as SceneGroup, W as SceneHighlight, $ as SceneLayer, X as SceneNode, et as SceneOutside, I as ScenePoint, F as SceneProjection, P as SceneRegion, N as SceneRule, b as SceneSlot, x as SceneStack, u as SceneToken, l as SceneTokens, M as SceneVector, Y as SceneWire, w as cardRanks, T as cardSuits, v as cellGap, R as curveResolutions, nt as edgePoint, mt as fillLabel, a as flowNodeSize, s as flowPlan, c as flowPositions, n as morphLabels, rt as nodeBox, it as padRect, V as planeLabels, z as planeLimits, B as planeThicknesses, at as rectCenter, ot as rectsOverlap, E as sceneCardLabels, O as sceneCardSizes, y as sceneCellSizes, _ as sceneCellsLabels, st as sceneCircleSizes, Z as sceneContextColor, o as sceneFlowLabels, ht as sceneLabels, gt as sceneLimits, ct as sceneNodeSizes, Q as sceneOutlines, S as sceneStackLabels, _t as sceneStaggers, vt as sceneStore, d as sceneTokenLabels, lt as sidePoint, k as stackBounds, A as stackGaps, j as stackPlace, D as suitTones, p as tokenBox, m as tokenFlow, h as tokenGaps, f as tokenPercent, ut as unionRect, K as useObstacle, dt as useSceneContext, ft as useSceneFrames, pt as useSceneObject } from "./scene-4ePpWdmE.js";
@@ -5,7 +5,7 @@ import { a as m } from "./tone-scope-DKiSw-JR.js";
5
5
  import { r as h, t as g } from "./figure-format-B8kRZMlo.js";
6
6
  import { a as _, o as v, r as y } from "./scale-C2xgZyZN.js";
7
7
  import { t as b } from "./chart-cursor-1mFd48Jc.js";
8
- import { c as x, i as ee, l as S, n as te, o as C, r as w, t as T } from "./figure-frame-CEijciL7.js";
8
+ import { c as x, i as ee, l as S, n as te, o as C, r as w, t as T } from "./figure-frame-koVKcXph.js";
9
9
  import { n as E } from "./plot-width-D3hTycYX.js";
10
10
  import { t as D } from "./plot-axes-D5S9BnBa.js";
11
11
  import { a as O, c as k, l as A, n as ne, o as re } from "./plot-marks-FVsbFkUs.js";
@@ -906,7 +906,7 @@ function rt({ index: e, recordId: t, row: n, action: r, isActive: i, children: a
906
906
  ...m.props(q.trigger),
907
907
  children: a
908
908
  });
909
- return o === void 0 ? s : /* @__PURE__ */ P(u.Root, { children: [/* @__PURE__ */ N(u.Trigger, { render: s }), /* @__PURE__ */ N(u.Popup, {
909
+ return o === void 0 || r.showTooltip !== !0 ? s : /* @__PURE__ */ P(u.Root, { children: [/* @__PURE__ */ N(u.Trigger, { render: s }), /* @__PURE__ */ N(u.Popup, {
910
910
  side: "top",
911
911
  align: "start",
912
912
  children: o