@mechane-ai/elements 0.50.0 → 0.52.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 (57) hide show
  1. package/dist/{article-CRlhq9oA.js → article-BDVuehRt.js} +1 -1
  2. package/dist/article.js +1 -1
  3. package/dist/catalog.json +54 -1
  4. package/dist/{categorical-values-BYP_R5gS.js → categorical-values-BoS03HcI.js} +1 -1
  5. package/dist/charts/cartesian.js +1 -1
  6. package/dist/charts/comparison.js +1 -1
  7. package/dist/charts/distribution.js +1 -1
  8. package/dist/charts/figure.js +12 -13
  9. package/dist/charts/graph.js +1 -1
  10. package/dist/charts/hierarchy.js +1 -1
  11. package/dist/charts/image.js +1 -1
  12. package/dist/charts/matrix.js +1 -1
  13. package/dist/charts/plot.js +3 -3
  14. package/dist/charts/relationship.js +1 -1
  15. package/dist/charts/text.js +1 -1
  16. package/dist/charts/timeline.js +1 -1
  17. package/dist/charts/trend.js +1 -1
  18. package/dist/charts.js +2 -2
  19. package/dist/collections.js +1 -1
  20. package/dist/{dates-ckJdYF7t.js → dates-CjlTzw00.js} +1 -1
  21. package/dist/{dumbbell-plot-BC8d_IJy.js → dumbbell-plot-Xxl6P7D1.js} +3 -3
  22. package/dist/{embedding-map-Bj8krO-d.js → embedding-map-tU8hT_aC.js} +3 -3
  23. package/dist/{figure-frame-koVKcXph.js → figure-frame-BKc9TvtX.js} +1 -1
  24. package/dist/forms/dates.js +1 -1
  25. package/dist/{image-grid-CLhol2jy.js → image-grid-BZy2lkNb.js} +2 -2
  26. package/dist/kits/evaluation.js +4 -4
  27. package/dist/kits/interpretability.js +7 -7
  28. package/dist/kits/operations.js +4 -4
  29. package/dist/kits/research.js +596 -250
  30. package/dist/kits/training.js +3 -3
  31. package/dist/mdx.js +2 -2
  32. package/dist/packages/charts/src/graph/tree-diagram.d.ts +1 -1
  33. package/dist/packages/charts/src/plot/plot-layout.d.ts +0 -6
  34. package/dist/packages/charts/src/timeline/event-strip.d.ts +12 -2
  35. package/dist/packages/charts/src/timeline/index.d.ts +1 -1
  36. package/dist/packages/collections/src/metrics.d.ts +5 -11
  37. package/dist/packages/kits/src/research/collection-page.d.ts +30 -4
  38. package/dist/packages/kits/src/research/index.d.ts +4 -2
  39. package/dist/packages/kits/src/research/lineage-graph.d.ts +40 -0
  40. package/dist/{plot-layout-B2xRt-_k.js → plot-layout-D8j-ozGR.js} +102 -86
  41. package/dist/{plot-surface-0cKFwtws.js → plot-surface-5e3xeiub.js} +1 -1
  42. package/dist/{reference-lines-nSxcZVF5.js → reference-lines-1FttCg46.js} +1 -1
  43. package/dist/{scene-4ePpWdmE.js → scene-8F-fQksU.js} +4 -4
  44. package/dist/scene.js +1 -1
  45. package/dist/{slope-chart-DWZIYDty.js → slope-chart-B35ZfaYn.js} +4 -4
  46. package/dist/{src-DNclWY4V.js → src-fvoTU3Bq.js} +377 -377
  47. package/dist/{time-series-CsngFxr1.js → time-series-DoFMGmFV.js} +612 -590
  48. package/dist/{token-heatmap-BQLIxPky.js → token-heatmap-DLPQWwMv.js} +3 -3
  49. package/dist/{token-predictions-C3B5L-eO.js → token-predictions-D_Jwf8Aw.js} +3 -3
  50. package/dist/{tree-diagram-Dau9jeXS.js → tree-diagram-DreDBCvt.js} +4 -4
  51. package/dist/{treemap-DWrMQndu.js → treemap-MVX-wa4t.js} +4 -4
  52. package/dist/{violin-plot-D05ODcyc.js → violin-plot-Bi71NqXF.js} +3 -3
  53. package/dist/waterfall-8y8ANO3c.js +605 -0
  54. package/package.json +1 -1
  55. package/recipes/calendar-workspace.tsx +39 -0
  56. package/skills/use-elements/references/workspace.md +8 -6
  57. package/dist/waterfall-BkLLv2Lm.js +0 -576
@@ -1,11 +1,11 @@
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-DWZIYDty.js";
3
+ import { r, s as i } from "../slope-chart-B35ZfaYn.js";
4
4
  import { m as a } from "../src-npqwq3Sa.js";
5
- import { T as o } from "../plot-layout-B2xRt-_k.js";
5
+ import { T as o } from "../plot-layout-D8j-ozGR.js";
6
6
  import { o as s, t as c } from "../cells-CNZE4us2.js";
7
7
  import { r as l } from "../figure-format-B8kRZMlo.js";
8
- import { d as u, g as d, u as f } from "../src-DNclWY4V.js";
8
+ import { d as u, g as d, u as f } from "../src-fvoTU3Bq.js";
9
9
  import { c as p, o as m } from "../src-9EJskqB_.js";
10
10
  import "@stylexjs/stylex";
11
11
  import { useState as h } from "react";
package/dist/mdx.js CHANGED
@@ -1,7 +1,7 @@
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";
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-BDVuehRt.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-4ePpWdmE.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-8F-fQksU.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";
@@ -31,7 +31,7 @@ export type TreeDiagramProps = FigureProps & FigureSelectionProps & {
31
31
  };
32
32
  export declare const treeLimits: {
33
33
  readonly nodes: 300;
34
- readonly depth: 12;
34
+ readonly depth: 32;
35
35
  };
36
36
  /**
37
37
  * A hierarchy drawn as a node-link tree: a decision tree, a module tree or a cut of a cluster dendrogram. Depth runs
@@ -105,12 +105,6 @@ export declare function tickTexts({ values, axis, locale, hasTitle, }: Pick<Axis
105
105
  * their own ticks use it, so every axis agrees.
106
106
  */
107
107
  export declare function ticksMinimum(length: number): number;
108
- /**
109
- * The ticks of a measured axis: round values on its scale, at least three on an axis longer than 120 pixels, each
110
- * labelled so that no two read the same. Ticks that land on both ends of the domain win when they fit, so the lowest
111
- * and highest marks never sit beyond the outer ticks. Every kernel layout labels its axes with it; a chart that draws
112
- * an axis of its own calls it too.
113
- */
114
108
  export declare function axisTicks({ axis, domain, length, spacing, locale, hasTitle }: AxisTicksInput): AxisTicks;
115
109
  /**
116
110
  * The ticks of a band axis: one at the center of each category, labelled with its name. A label may hold a line break,
@@ -29,6 +29,13 @@ export type EventStripMarker = {
29
29
  readonly label: string;
30
30
  readonly at: number;
31
31
  };
32
+ /** A quick time-range preset shown in the strip header, such as 6h, 24h, or All. */
33
+ export type EventStripWindow = {
34
+ readonly id: string;
35
+ readonly label: string;
36
+ /** Duration in milliseconds from the end of the strip domain, or `null` for the full span. */
37
+ readonly durationMs: number | null;
38
+ };
32
39
  /**
33
40
  * How the strip writes instants. Options name their own time zone; a function format needs `timeZone` beside it, so the
34
41
  * axis ticks fall on that zone's clock.
@@ -43,9 +50,12 @@ export type EventStripTime = {
43
50
  export type EventStripProps = FigureProps & FigureSelectionProps & EventStripTime & {
44
51
  readonly lanes: ReadonlyArray<EventStripLane>;
45
52
  readonly events: ReadonlyArray<EventStripItem>;
46
- /** The first and last instant the strip spans, in milliseconds since the epoch. */
47
- readonly domain: NumericDomain;
53
+ /** First and last instant the strip spans in epoch ms. Absent fits events and markers automatically. */
54
+ readonly domain?: NumericDomain | undefined;
48
55
  readonly markers?: ReadonlyArray<EventStripMarker> | undefined;
56
+ /** Optional time-window presets rendered in the figure header. */
57
+ readonly windows?: ReadonlyArray<EventStripWindow> | undefined;
58
+ readonly defaultWindowId?: string | undefined;
49
59
  /**
50
60
  * The lane-label gutter's width in pixels, which strips stacked in a column pass the same from `eventStripGutter`
51
61
  * over all their lanes so their time axes line up. A label longer than the gutter is cut with an ellipsis and keeps
@@ -1,4 +1,4 @@
1
- export type { EventStripItem, EventStripLane, EventStripMarker, EventStripProps, EventStripTime, } from './event-strip.tsx';
1
+ export type { EventStripItem, EventStripLane, EventStripMarker, EventStripProps, EventStripTime, EventStripWindow, } from './event-strip.tsx';
2
2
  export { EventStrip, eventStripGutter, eventStripLimits } from './event-strip.tsx';
3
3
  export type { WaterfallGeometry, WaterfallItem, WaterfallProps, WaterfallSelectDetails, WaterfallTone, } from './waterfall.tsx';
4
4
  export { Waterfall } from './waterfall.tsx';
@@ -63,17 +63,11 @@ export type MetricProps = Omit<ComponentProps<'div'>, 'children' | 'dangerouslyS
63
63
  readonly change?: MetricChange | undefined;
64
64
  /** Optional target or ceiling reference shown quietly below the detail line. */
65
65
  readonly target?: string | undefined;
66
- } & ({
67
- readonly isLoading?: false;
68
- readonly value: string;
69
- readonly detail?: string;
70
- readonly hasDetail?: never;
71
- } | {
72
- readonly isLoading: true;
73
- readonly value?: never;
74
- readonly detail?: never;
75
- readonly hasDetail?: boolean;
76
- });
66
+ readonly isLoading?: boolean | undefined;
67
+ readonly value?: string | undefined;
68
+ readonly detail?: string | undefined;
69
+ readonly hasDetail?: boolean | undefined;
70
+ };
77
71
  export declare function MetricGrid({ layout, ...props }: MetricGridProps): ReactNode;
78
72
  export declare function Metric({ label, value, detail, change, target, isLoading, hasDetail, variant, trend, ...props }: MetricProps): ReactNode;
79
73
  export {};
@@ -1,6 +1,13 @@
1
1
  import type { ComponentProps, ReactNode } from 'react';
2
2
  import type { DataTableColumn, DataTableRowAction, DataTableSort, DataTableSortDetails, TableFilterDimension, TableQueryException } from '../../../collections/src/index.ts';
3
3
  import { PageLayout } from '../../../layout/src/index.ts';
4
+ export type CollectionStatus = 'loading' | 'ready' | 'failed';
5
+ /** A named scope partition shown as a segmented switcher in the collection header with live item counts. */
6
+ export type CollectionScope<Row> = {
7
+ readonly id: string;
8
+ readonly label: string;
9
+ readonly match: (row: Row) => boolean;
10
+ };
4
11
  type SortableColumns<Row> = {
5
12
  readonly columns: ReadonlyArray<DataTableColumn<Row>>;
6
13
  readonly sort: DataTableSort | undefined;
@@ -12,7 +19,7 @@ type SortableColumns<Row> = {
12
19
  readonly sort?: never;
13
20
  readonly onSortChange?: never;
14
21
  };
15
- export type CollectionPageProps<Row extends object> = SortableColumns<Row> & {
22
+ type SharedCollectionProps<Row extends object> = SortableColumns<Row> & {
16
23
  readonly title: string;
17
24
  readonly caption?: string;
18
25
  readonly rows: ReadonlyArray<Row>;
@@ -23,7 +30,9 @@ export type CollectionPageProps<Row extends object> = SortableColumns<Row> & {
23
30
  readonly filters: ReadonlyArray<TableFilterDimension<Row>> | TableQueryException;
24
31
  /** Optional custom row transformer (e.g. sorting) applied after local search and filtering. */
25
32
  readonly transformRows?: (rows: ReadonlyArray<Row>) => ReadonlyArray<Row>;
26
- readonly navigation?: ComponentProps<typeof PageLayout>['navigation'];
33
+ /** Optional segmented scopes (e.g. Active / All) that partition rows before local search and filtering. */
34
+ readonly scopes?: ReadonlyArray<CollectionScope<Row>> | undefined;
35
+ readonly defaultScopeId?: string | undefined;
27
36
  readonly actions?: ReactNode;
28
37
  readonly notice?: ReactNode;
29
38
  readonly rowAction?: DataTableRowAction<Row> | undefined;
@@ -31,6 +40,13 @@ export type CollectionPageProps<Row extends object> = SortableColumns<Row> & {
31
40
  readonly rowSizing?: 'fixed' | 'content' | undefined;
32
41
  readonly empty: ReactNode;
33
42
  readonly filteredEmpty?: ReactNode;
43
+ /** Read lifecycle state: `'loading'` reserves geometry with `DataTablePlaceholder` inside `AsyncRegion`. */
44
+ readonly status?: CollectionStatus;
45
+ readonly failure?: ReactNode;
46
+ readonly placeholderRows?: number;
47
+ };
48
+ export type CollectionPageProps<Row extends object> = SharedCollectionProps<Row> & {
49
+ readonly navigation?: ComponentProps<typeof PageLayout>['navigation'];
34
50
  /** Optional right-hand inspector pane rendered inside a resizable Workbench split when open. */
35
51
  readonly inspector?: {
36
52
  readonly label: string;
@@ -38,9 +54,19 @@ export type CollectionPageProps<Row extends object> = SortableColumns<Row> & {
38
54
  } | undefined;
39
55
  readonly inspectorInitialPercent?: number | undefined;
40
56
  };
57
+ export type CollectionSectionProps<Row extends object> = SharedCollectionProps<Row> & {
58
+ readonly id?: string;
59
+ readonly meta?: ReactNode;
60
+ };
41
61
  /**
42
62
  * Full-width collection page Lego block: wires `PageLayout`, top-bar search and filter controls (`/` and `⌘F`), active
43
- * filter chips, edge-to-edge `CollectionLayout` + `DataTable`, and an optional resizable `Workbench` inspector.
63
+ * filter chips, `AsyncRegion` + `DataTablePlaceholder` loading states, edge-to-edge `CollectionLayout`, and an optional
64
+ * resizable `Workbench` inspector.
65
+ */
66
+ export declare function CollectionPage<Row extends object>(props: CollectionPageProps<Row>): ReactNode;
67
+ /**
68
+ * Full-width collection section for tabbed or multi-section views. Wires `SectionHeading`, top-bar search and filters,
69
+ * active filter chips, `AsyncRegion` loading placeholders, and edge-to-edge `DataTable`.
44
70
  */
45
- export declare function CollectionPage<Row extends object>({ title, caption, rows, getRowId, columns, sort, onSortChange, search, filters, transformRows, navigation, actions, notice, rowAction, activeRowId, rowSizing, empty, filteredEmpty, inspector, inspectorInitialPercent, }: CollectionPageProps<Row>): ReactNode;
71
+ export declare function CollectionSection<Row extends object>(props: CollectionSectionProps<Row>): ReactNode;
46
72
  export {};
@@ -1,7 +1,9 @@
1
- export type { CollectionPageProps } from './collection-page.tsx';
2
- export { CollectionPage } from './collection-page.tsx';
1
+ export type { CollectionPageProps, CollectionScope, CollectionSectionProps, CollectionStatus, } from './collection-page.tsx';
2
+ export { CollectionPage, CollectionSection } from './collection-page.tsx';
3
3
  export type { FindingCardLabels, FindingCardProps, FindingMetric, FindingSource, FindingStatus, } from './finding-card.tsx';
4
4
  export { FindingCard } from './finding-card.tsx';
5
+ export type { LineageGraphLabels, LineageGraphProps, LineageNode, LineageNodeKind } from './lineage-graph.tsx';
6
+ export { LineageGraph } from './lineage-graph.tsx';
5
7
  export type { MilestoneKind, MilestonePathLabels, MilestonePathProps, ResearchMilestone } from './milestone-path.tsx';
6
8
  export { MilestonePath } from './milestone-path.tsx';
7
9
  export type { SpecimenDiffLabels, SpecimenDiffProps, SpecimenDiffRow, SpecimenFilter, SpecimenOutcome, } from './specimen-diff.tsx';
@@ -0,0 +1,40 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FigureProps, FigureSelectionProps, ValueFormat } from '../../../charts/src/index.ts';
3
+ export type LineageNodeKind = 'baseline' | 'milestone' | 'branch' | 'merge' | 'killed';
4
+ export type LineageNode = {
5
+ readonly id: string;
6
+ readonly parentIds: ReadonlyArray<string>;
7
+ readonly label: string;
8
+ readonly kind: LineageNodeKind;
9
+ readonly lane?: string | undefined;
10
+ readonly metric?: number | null | undefined;
11
+ readonly delta?: number | null | undefined;
12
+ readonly summary?: string | undefined;
13
+ readonly detail?: string | undefined;
14
+ readonly source?: string | undefined;
15
+ readonly timestamp?: string | undefined;
16
+ };
17
+ export type LineageGraphLabels = {
18
+ readonly frontier: string;
19
+ readonly all: string;
20
+ readonly metric: string;
21
+ readonly delta: string;
22
+ readonly lane: string;
23
+ readonly parents: string;
24
+ readonly source: string;
25
+ readonly empty: string;
26
+ readonly kinds: Readonly<Record<LineageNodeKind, string>>;
27
+ };
28
+ export type LineageGraphProps = Pick<FigureProps, 'title' | 'description' | 'locale' | 'status' | 'source' | 'transforms' | 'actions'> & FigureSelectionProps & {
29
+ readonly nodes: ReadonlyArray<LineageNode>;
30
+ readonly valueLabel?: string | undefined;
31
+ readonly valueFormat?: ValueFormat | undefined;
32
+ readonly deltaFormat?: ValueFormat | undefined;
33
+ readonly defaultScope?: 'frontier' | 'all' | undefined;
34
+ readonly labels?: Partial<LineageGraphLabels> | undefined;
35
+ };
36
+ /**
37
+ * Multi-parent research lineage DAG with automatic topological layout, optional agent swimlanes, and a Frontier / All
38
+ * scope switcher. Composes `RelationGraph` with a flat inline evidence readout for the selected node.
39
+ */
40
+ export declare function LineageGraph({ nodes, valueLabel, valueFormat, deltaFormat, defaultScope, selected, onSelectedChange, labels: given, actions, ...figure }: LineageGraphProps): ReactNode;