@mechane-ai/elements 0.25.0 → 0.27.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 (69) hide show
  1. package/README.md +9 -6
  2. package/dist/ai.js +56 -56
  3. package/dist/{categorical-values-CPRt9uzI.js → categorical-values-DqoH9l1M.js} +2 -2
  4. package/dist/chart-frame-CYdrUwvP.js +239 -0
  5. package/dist/{chart-input-DDAjzy-O.js → chart-input--Q3Jdono.js} +4 -3
  6. package/dist/charts/cartesian.js +527 -434
  7. package/dist/charts/distribution.js +134 -126
  8. package/dist/charts/graph.js +46 -43
  9. package/dist/charts/hierarchy.js +28 -26
  10. package/dist/charts/matrix.js +81 -77
  11. package/dist/charts/timeline.js +87 -80
  12. package/dist/charts.js +1 -1
  13. package/dist/{code-block-DENC5fD_.js → code-block-DPeyW4sm.js} +3 -3
  14. package/dist/collections.js +55 -54
  15. package/dist/content/code.js +1 -1
  16. package/dist/content/diff.js +10 -10
  17. package/dist/content/link.js +1 -1
  18. package/dist/content/markdown.js +2 -2
  19. package/dist/content/tree.js +2 -2
  20. package/dist/{content-link-CGIua9If.js → content-link-5oRGjDHa.js} +1 -1
  21. package/dist/content.js +18 -18
  22. package/dist/elements.css +22 -0
  23. package/dist/feedback.js +1 -1
  24. package/dist/forms/dates.js +7 -7
  25. package/dist/forms.js +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/layout.js +125 -97
  28. package/dist/navigation/commands.js +1 -1
  29. package/dist/navigation.js +61 -25
  30. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +5 -4
  31. package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +3 -2
  32. package/dist/packages/charts/src/cartesian/index.d.ts +2 -2
  33. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +2 -1
  34. package/dist/packages/charts/src/cartesian/time-series.d.ts +12 -3
  35. package/dist/packages/charts/src/chart-frame.d.ts +15 -7
  36. package/dist/packages/charts/src/chart-input.d.ts +3 -1
  37. package/dist/packages/charts/src/chart-inspection.d.ts +3 -1
  38. package/dist/packages/charts/src/chart-series-summary.d.ts +6 -0
  39. package/dist/packages/charts/src/chart-theme.d.ts +5 -0
  40. package/dist/packages/charts/src/distribution/ecdf.d.ts +3 -2
  41. package/dist/packages/charts/src/distribution/histogram.d.ts +3 -2
  42. package/dist/packages/charts/src/distribution/interval-plot.d.ts +3 -2
  43. package/dist/packages/charts/src/distribution/ranked-bars.d.ts +3 -2
  44. package/dist/packages/charts/src/graph/relation-graph.d.ts +3 -2
  45. package/dist/packages/charts/src/hierarchy/treemap.d.ts +3 -2
  46. package/dist/packages/charts/src/index.d.ts +1 -1
  47. package/dist/packages/charts/src/matrix/matrix.d.ts +3 -2
  48. package/dist/packages/charts/src/matrix/token-heatmap.d.ts +3 -2
  49. package/dist/packages/charts/src/timeline/waterfall.d.ts +4 -1
  50. package/dist/packages/core/src/index.d.ts +2 -0
  51. package/dist/packages/core/src/section-heading.d.ts +8 -0
  52. package/dist/packages/layout/src/collection-layout.d.ts +6 -0
  53. package/dist/packages/layout/src/detail-page.d.ts +2 -1
  54. package/dist/packages/layout/src/index.d.ts +4 -0
  55. package/dist/packages/layout/src/record-page.d.ts +2 -1
  56. package/dist/packages/layout/src/report-content.d.ts +6 -0
  57. package/dist/packages/navigation/src/content-tabs.d.ts +17 -0
  58. package/dist/packages/navigation/src/index.d.ts +2 -0
  59. package/dist/{pierre-diff-CHQsoQSZ.js → pierre-diff-C3U_qae6.js} +1 -1
  60. package/dist/{pierre-theme-CLgk9v3e.js → pierre-theme-DsrSwl5m.js} +19 -20
  61. package/dist/{pierre-tree-C3nKYyoN.js → pierre-tree-KSFewJrY.js} +4 -4
  62. package/dist/{src-CQOgWIzP.js → src-DYwAhQHt.js} +98 -98
  63. package/dist/{src-DLReNPV9.js → src-E3Or8tkO.js} +38 -18
  64. package/dist/{src-DHYcohZP.js → src-eWcNz_oB.js} +25 -26
  65. package/dist/tokens.js +1 -3
  66. package/dist/{tokens.stylex-DTHHFbyl.js → tokens.stylex-BoRZ3D8s.js} +92 -12
  67. package/package.json +1 -1
  68. package/dist/chart-frame-CNr8M_b2.js +0 -166
  69. package/dist/constants.stylex-BILvnwUk.js +0 -84
@@ -2,31 +2,32 @@ import { n as e, t } from "./navigation-D2_sGy3C.js";
2
2
  import { t as n } from "./style-composition-uYlczSsB.js";
3
3
  import { mergeProps as r } from "@base-ui/react/merge-props";
4
4
  import "@stylexjs/stylex";
5
- import { jsx as i } from "react/jsx-runtime";
6
- import { Tabs as a } from "@base-ui/react/tabs";
5
+ import { useState as i } from "react";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
+ import { Tabs as s } from "@base-ui/react/tabs";
7
8
  // packages/navigation/src/page-navigation.tsx
8
- function o({ items: e, isEmbedded: t = !1 }) {
9
- return /* @__PURE__ */ i("div", {
9
+ function c({ items: e, isEmbedded: t = !1 }) {
10
+ return /* @__PURE__ */ a("div", {
10
11
  "aria-hidden": !0,
11
12
  inert: !0,
12
13
  ...{
13
14
  0: { className: "x78zum5 xxhr3t xeuugli xw2csxc xso031l x1q0q8m5 x1qndepd x1hz01jw xtqrqnz xj57cvi x1778rvt xvmahel x13qnu6 x9v5kkp x19rmrnh x1bqaal" },
14
15
  1: { className: "x78zum5 xxhr3t xeuugli xw2csxc x1q0q8m5 x1qndepd x1hz01jw xtqrqnz xj57cvi x1778rvt xvmahel x13qnu6 x9v5kkp x19rmrnh x1bqaal x1qhh985" }
15
16
  }[!!t | 0],
16
- children: e.map((e) => /* @__PURE__ */ i("span", {
17
+ children: e.map((e) => /* @__PURE__ */ a("span", {
17
18
  className: "x1n2onr6 x9f619 x3nfvp2 x6s0dn4 x2lah0s xid9utz xn9t2bk x1doqdfy xkrqix3 xuxw1ft x153jb6y xp9636p x1s9zmfe x1kl8fbi x1s928wv x1j6awrg x1ccaobo x1xrz1ek x3cntg4 xyhc2n1 x13qnu6 x9v5kkp x19rmrnh x1bqaal",
18
19
  children: e.label
19
20
  }, e.id))
20
21
  });
21
22
  }
22
- function s({ items: e, selectedId: t, onNavigate: n, label: r = "Page sections", isEmbedded: a = !1 }) {
23
- return /* @__PURE__ */ i("nav", {
23
+ function l({ items: e, selectedId: t, onNavigate: n, label: r = "Page sections", isEmbedded: i = !1 }) {
24
+ return /* @__PURE__ */ a("nav", {
24
25
  "aria-label": r,
25
26
  ...{
26
27
  0: { className: "x78zum5 xxhr3t xeuugli xw2csxc xso031l x1q0q8m5 x1qndepd x1hz01jw xtqrqnz xj57cvi x1778rvt xvmahel x13qnu6 x9v5kkp x19rmrnh x1bqaal" },
27
28
  1: { className: "x78zum5 xxhr3t xeuugli xw2csxc x1q0q8m5 x1qndepd x1hz01jw xtqrqnz xj57cvi x1778rvt xvmahel x13qnu6 x9v5kkp x19rmrnh x1bqaal x1qhh985" }
28
- }[!!a | 0],
29
- children: e.map((e) => /* @__PURE__ */ i("a", {
29
+ }[!!i | 0],
30
+ children: e.map((e) => /* @__PURE__ */ a("a", {
30
31
  href: e.href,
31
32
  "aria-current": e.id === t ? "page" : void 0,
32
33
  ...{
@@ -43,12 +44,12 @@ function s({ items: e, selectedId: t, onNavigate: n, label: r = "Page sections",
43
44
  });
44
45
  }
45
46
  // packages/navigation/src/skip-link.tsx
46
- function c(e) {
47
- return /* @__PURE__ */ i("a", { ...r({ className: "xixxii4 x1ridm32 x12hha37 x1b4oyad x174j0rr x1mvvolr x9f619 xvv7f4i xj0a0fe x1ok0vyi xpvm0e4 xbixft x1hz01jw xk4h15q xtqrqnz x1778rvt xvmahel xujl8zx x1wfrlr2 x1tkds87 x1de710j x1gnsi0 x1cm8ssg" }, e) });
47
+ function u(e) {
48
+ return /* @__PURE__ */ a("a", { ...r({ className: "xixxii4 x1ridm32 x12hha37 x1b4oyad x174j0rr x1mvvolr x9f619 xvv7f4i xj0a0fe x1ok0vyi xpvm0e4 xbixft x1hz01jw xk4h15q xtqrqnz x1778rvt xvmahel xujl8zx x1wfrlr2 x1tkds87 x1de710j x1gnsi0 x1cm8ssg" }, e) });
48
49
  }
49
50
  // packages/navigation/src/tabs.tsx
50
- function l({ className: e, style: t, ...r }) {
51
- return /* @__PURE__ */ i(a.Root, {
51
+ function d({ className: e, style: t, ...r }) {
52
+ return /* @__PURE__ */ a(s.Root, {
52
53
  ...r,
53
54
  ...n({
54
55
  className: e,
@@ -57,8 +58,8 @@ function l({ className: e, style: t, ...r }) {
57
58
  })
58
59
  });
59
60
  }
60
- function u({ className: e, style: t, ...r }) {
61
- return /* @__PURE__ */ i(a.List, {
61
+ function f({ className: e, style: t, ...r }) {
62
+ return /* @__PURE__ */ a(s.List, {
62
63
  ...r,
63
64
  ...n({
64
65
  className: e,
@@ -67,8 +68,8 @@ function u({ className: e, style: t, ...r }) {
67
68
  })
68
69
  });
69
70
  }
70
- function d({ className: e, style: t, ...r }) {
71
- return /* @__PURE__ */ i(a.Tab, {
71
+ function p({ className: e, style: t, ...r }) {
72
+ return /* @__PURE__ */ a(s.Tab, {
72
73
  ...r,
73
74
  ...n({
74
75
  className: e,
@@ -77,8 +78,8 @@ function d({ className: e, style: t, ...r }) {
77
78
  })
78
79
  });
79
80
  }
80
- function f({ className: e, style: t, ...r }) {
81
- return /* @__PURE__ */ i(a.Panel, {
81
+ function m({ className: e, style: t, ...r }) {
82
+ return /* @__PURE__ */ a(s.Panel, {
82
83
  ...r,
83
84
  ...n({
84
85
  className: e,
@@ -87,10 +88,45 @@ function f({ className: e, style: t, ...r }) {
87
88
  })
88
89
  });
89
90
  }
90
- var p = {
91
- Root: l,
92
- List: u,
93
- Tab: d,
94
- Panel: f
91
+ var h = {
92
+ Root: d,
93
+ List: f,
94
+ Tab: p,
95
+ Panel: m
95
96
  };
96
- export { t as Breadcrumb, e as Kbd, s as PageNavigation, o as PageNavigationPlaceholder, c as SkipLink, p as Tabs };
97
+ // packages/navigation/src/content-tabs.tsx
98
+ function g(e) {
99
+ let [t, n] = i(e.items[0]?.id), r = e.navigation, s = r?.selectedId ?? t, c = e.items.find((e) => e.id === s) ?? e.items[0];
100
+ return r === void 0 ? /* @__PURE__ */ o(h.Root, {
101
+ value: c?.id,
102
+ onValueChange: (e) => n(String(e)),
103
+ className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
104
+ children: [/* @__PURE__ */ a(h.List, {
105
+ "aria-label": e.label,
106
+ children: e.items.map((e) => /* @__PURE__ */ a(h.Tab, {
107
+ value: e.id,
108
+ children: e.label
109
+ }, e.id))
110
+ }), c !== void 0 && /* @__PURE__ */ a(h.Panel, {
111
+ value: c.id,
112
+ className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j xexx8yu",
113
+ children: c.content
114
+ }, c.id)]
115
+ }) : /* @__PURE__ */ o("div", {
116
+ className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j",
117
+ children: [/* @__PURE__ */ a(l, {
118
+ label: e.label,
119
+ items: e.items.map((e) => ({
120
+ id: e.id,
121
+ label: e.label,
122
+ href: r.href(e.id)
123
+ })),
124
+ selectedId: c?.id ?? "",
125
+ onNavigate: r.onNavigate
126
+ }), /* @__PURE__ */ a("div", {
127
+ className: "x78zum5 xdt5ytf x98rzlu xeuugli x2lwn1j xexx8yu",
128
+ children: c?.content
129
+ })]
130
+ });
131
+ }
132
+ export { t as Breadcrumb, g as ContentTabs, e as Kbd, l as PageNavigation, c as PageNavigationPlaceholder, u as SkipLink, h as Tabs };
@@ -1,10 +1,11 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartSelection } from '../chart-frame.tsx';
2
+ import type { ChartSelection, ChartSeriesReport } from '../chart-frame.tsx';
3
3
  import type { BarComposition, BarSeries } from './bar-data.ts';
4
4
  export type { BarSeries, BarBucket, BarComposition } from './bar-data.ts';
5
5
  export type BarChartProps = {
6
6
  readonly title: string;
7
7
  readonly description?: ReactNode;
8
+ readonly report?: ChartSeriesReport | undefined;
8
9
  readonly categories: ReadonlyArray<{
9
10
  readonly id: string;
10
11
  readonly label: string;
@@ -20,9 +21,9 @@ export type BarChartProps = {
20
21
  readonly selection?: ChartSelection | undefined;
21
22
  readonly height?: number | undefined;
22
23
  };
23
- export type BarChartPlaceholderProps = Pick<BarChartProps, 'description' | 'height'> & {
24
+ export type BarChartPlaceholderProps = Pick<BarChartProps, 'description' | 'height' | 'report'> & {
24
25
  readonly title?: string | undefined;
25
26
  readonly series?: ReadonlyArray<Pick<BarSeries, 'id' | 'label' | 'tone'>> | undefined;
26
27
  };
27
- export declare function BarChartPlaceholder({ title, description, series, height, }: BarChartPlaceholderProps): ReactNode;
28
- export declare function BarChart({ title, description, categories, series, domain, mode, formatValue, formatTick, highlightedSeriesId, selection, height, composition, }: BarChartProps): ReactNode;
28
+ export declare function BarChartPlaceholder({ title, description, report, series, height, }: BarChartPlaceholderProps): ReactNode;
29
+ export declare function BarChart({ title, description, report, categories, series, domain, mode, formatValue, formatTick, highlightedSeriesId, selection, height, composition, }: BarChartProps): ReactNode;
@@ -1,12 +1,13 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { BreakdownItem } from '../categorical-values.tsx';
3
- import type { ChartSelection } from '../chart-frame.tsx';
3
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
4
4
  export type BreakdownBarProps = {
5
5
  readonly title: string;
6
+ readonly report?: ChartReport | undefined;
6
7
  readonly description?: string | undefined;
7
8
  readonly items: ReadonlyArray<BreakdownItem>;
8
9
  readonly total: number;
9
10
  readonly formatValue: (value: number) => string;
10
11
  readonly selection?: ChartSelection | undefined;
11
12
  };
12
- export declare function BreakdownBar({ title, description, items, total, formatValue, selection, }: BreakdownBarProps): ReactNode;
13
+ export declare function BreakdownBar({ title, report, description, items, total, formatValue, selection, }: BreakdownBarProps): ReactNode;
@@ -8,5 +8,5 @@ export type { SparklineProps } from './sparkline.tsx';
8
8
  export { Sparkline } from './sparkline.tsx';
9
9
  export type { TimeSeriesPoint, TimeSeries, TimeSeriesMarker } from './time-series-data.ts';
10
10
  export { timeSeriesLimits } from './time-series-data.ts';
11
- export type { TimeSeriesChartProps, TimeSeriesChartPlaceholderProps, AreaChartProps, SmallMultiplesProps, } from './time-series.tsx';
12
- export { LineChart, AreaChart, SmallMultiples, TimeSeriesChartPlaceholder } from './time-series.tsx';
11
+ export type { TimeSeriesChartProps, TimeSeriesChartPlaceholderProps, AreaChartProps, SmallMultiplesProps, SmallMultiplesPlaceholderProps, } from './time-series.tsx';
12
+ export { LineChart, AreaChart, SmallMultiples, SmallMultiplesPlaceholder, TimeSeriesChartPlaceholder, } from './time-series.tsx';
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartSelection } from '../chart-frame.tsx';
2
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
3
3
  import type { ChartTone } from '../chart-theme.ts';
4
4
  export type ScatterPoint = {
5
5
  readonly id: string;
@@ -21,6 +21,7 @@ export type ScatterRangeSelection = {
21
21
  };
22
22
  export type ScatterPlotProps = {
23
23
  readonly title: string;
24
+ readonly report?: ChartReport | undefined;
24
25
  readonly description: string;
25
26
  readonly points: ReadonlyArray<ScatterPoint>;
26
27
  readonly xDomain: readonly [number, number];
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { ChartSeriesReport } from '../chart-frame.tsx';
2
3
  import type { TimeSeries, TimeSeriesMarker } from './time-series-data.ts';
3
4
  export type TimeSeriesChartProps = {
4
5
  readonly title: string;
@@ -11,14 +12,15 @@ export type TimeSeriesChartProps = {
11
12
  readonly markers?: ReadonlyArray<TimeSeriesMarker> | undefined;
12
13
  readonly height?: number | undefined;
13
14
  readonly actions?: ReactNode;
15
+ readonly report?: ChartSeriesReport | undefined;
14
16
  };
15
17
  export type AreaChartProps = TimeSeriesChartProps & {
16
18
  readonly isStacked?: boolean | undefined;
17
19
  };
18
- export type TimeSeriesChartPlaceholderProps = Pick<TimeSeriesChartProps, 'title' | 'description' | 'height' | 'actions'> & {
20
+ export type TimeSeriesChartPlaceholderProps = Pick<TimeSeriesChartProps, 'title' | 'description' | 'height' | 'actions' | 'report'> & {
19
21
  readonly series: ReadonlyArray<Pick<TimeSeries, 'id' | 'label' | 'tone'>>;
20
22
  };
21
- export type SmallMultiplesProps = Omit<TimeSeriesChartProps, 'series' | 'title' | 'description' | 'actions' | 'formatValue' | 'formatTick' | 'markers'> & {
23
+ export type SmallMultiplesProps = Omit<TimeSeriesChartProps, 'series' | 'title' | 'description' | 'actions' | 'formatValue' | 'formatTick' | 'markers' | 'report'> & {
22
24
  readonly charts: ReadonlyArray<{
23
25
  readonly id: string;
24
26
  readonly title: string;
@@ -27,9 +29,16 @@ export type SmallMultiplesProps = Omit<TimeSeriesChartProps, 'series' | 'title'
27
29
  readonly formatValue: (value: number) => string;
28
30
  readonly formatTick?: ((value: number) => string) | undefined;
29
31
  readonly markers?: ReadonlyArray<TimeSeriesMarker> | undefined;
32
+ readonly report?: ChartSeriesReport | undefined;
33
+ }>;
34
+ };
35
+ export type SmallMultiplesPlaceholderProps = Pick<SmallMultiplesProps, 'height'> & {
36
+ readonly charts: ReadonlyArray<TimeSeriesChartPlaceholderProps & {
37
+ readonly id: string;
30
38
  }>;
31
39
  };
32
40
  export declare function LineChart(props: TimeSeriesChartProps): ReactNode;
33
41
  export declare function AreaChart({ isStacked, ...props }: AreaChartProps): ReactNode;
34
- export declare function TimeSeriesChartPlaceholder({ title, description, series, actions, height, }: TimeSeriesChartPlaceholderProps): ReactNode;
42
+ export declare function TimeSeriesChartPlaceholder(props: TimeSeriesChartPlaceholderProps): ReactNode;
35
43
  export declare function SmallMultiples({ charts, ...props }: SmallMultiplesProps): ReactNode;
44
+ export declare function SmallMultiplesPlaceholder({ charts, height }: SmallMultiplesPlaceholderProps): ReactNode;
@@ -1,5 +1,15 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartTone } from './chart-theme.ts';
2
+ import type { ChartLegendItem } from './chart-theme.ts';
3
+ export type ChartReport = {
4
+ readonly meta?: ReactNode;
5
+ readonly summary?: ReactNode;
6
+ readonly seriesValues?: never;
7
+ };
8
+ export type ChartSeriesReport = ChartReport | {
9
+ readonly meta?: ReactNode;
10
+ readonly summary?: never;
11
+ readonly seriesValues: Readonly<Record<string, string | undefined>>;
12
+ };
3
13
  export type ChartSelection = {
4
14
  readonly selectedId: string | undefined;
5
15
  readonly onSelect: (id: string) => void;
@@ -10,18 +20,16 @@ export type ChartFrameProps = {
10
20
  readonly children: ReactNode;
11
21
  readonly actions?: ReactNode;
12
22
  readonly footer?: ReactNode;
23
+ readonly report?: ChartSeriesReport | undefined;
24
+ readonly series?: ReadonlyArray<ChartLegendItem> | undefined;
13
25
  };
14
- export type ChartLegendItem = {
15
- readonly id: string;
16
- readonly label: string;
17
- readonly tone: ChartTone;
18
- };
26
+ export type { ChartLegendItem } from './chart-theme.ts';
19
27
  export type ChartLegendProps = {
20
28
  readonly items: ReadonlyArray<ChartLegendItem>;
21
29
  readonly label?: string | undefined;
22
30
  readonly isScrollable?: boolean | undefined;
23
31
  };
24
- export declare function ChartFrame({ title, description, children, actions, footer }: ChartFrameProps): ReactNode;
32
+ export declare function ChartFrame({ title, description, children, actions, footer, report, series, }: ChartFrameProps): ReactNode;
25
33
  export declare function ChartLegend({ items, label, isScrollable }: ChartLegendProps): ReactNode;
26
34
  export declare function ChartDatumButton({ label, isSelected, onSelect, children, }: {
27
35
  readonly label: string;
@@ -1,10 +1,12 @@
1
1
  import type { ReactNode } from 'react';
2
+ import type { ChartSeriesReport } from './chart-frame.tsx';
2
3
  export declare function isFiniteDomain(domain: readonly [number, number]): boolean;
3
4
  export declare function hasUniqueIds(records: ReadonlyArray<{
4
5
  readonly id: string;
5
6
  }>): boolean;
6
- export declare function ChartInputError({ title, description, message, }: {
7
+ export declare function ChartInputError({ title, description, message, report, }: {
7
8
  readonly title: string;
8
9
  readonly description?: ReactNode;
9
10
  readonly message: string;
11
+ readonly report?: ChartSeriesReport | undefined;
10
12
  }): ReactNode;
@@ -15,10 +15,12 @@ type ChartInspectionProps = {
15
15
  readonly offset?: number | undefined;
16
16
  readonly source: 'pointer' | 'keyboard' | undefined;
17
17
  readonly notes?: ReadonlyArray<string> | undefined;
18
+ readonly hasSeriesSummary?: boolean | undefined;
18
19
  };
20
+ export declare function ChartLegendLoading(): ReactNode;
19
21
  export declare function ChartInspectionTitle({ title, detail, }: {
20
22
  readonly title: string;
21
23
  readonly detail: string | undefined;
22
24
  }): ReactNode;
23
- export declare function ChartInspection({ id, label, summary, legend, layoutLegend, rows, x, width, offset, source, notes, }: ChartInspectionProps): ReactNode;
25
+ export declare function ChartInspection({ id, label, summary, legend, layoutLegend, rows, x, width, offset, source, notes, hasSeriesSummary, }: ChartInspectionProps): ReactNode;
24
26
  export {};
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ChartLegendItem } from './chart-theme.ts';
3
+ export declare function ChartSeriesSummary({ series, values, }: {
4
+ readonly series: ReadonlyArray<ChartLegendItem>;
5
+ readonly values: Readonly<Record<string, string | undefined>>;
6
+ }): ReactNode;
@@ -1,5 +1,10 @@
1
1
  import * as stylex from '@stylexjs/stylex';
2
2
  export type ChartTone = 'series1' | 'series2' | 'series3' | 'series4' | 'series5' | 'series6' | 'positive' | 'negative' | 'neutral';
3
+ export type ChartLegendItem = {
4
+ readonly id: string;
5
+ readonly label: string;
6
+ readonly tone: ChartTone;
7
+ };
3
8
  export declare const chartToneColors: Readonly<Record<ChartTone, string>>;
4
9
  export declare const chartStyles: Readonly<{
5
10
  readonly plot: Readonly<{
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartSelection } from '../chart-frame.tsx';
2
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
3
3
  import type { ChartTone } from '../chart-theme.ts';
4
4
  import type { NumericDomain } from './distribution-input.ts';
5
5
  export type ECDFPoint = {
@@ -9,6 +9,7 @@ export type ECDFPoint = {
9
9
  };
10
10
  export type ECDFProps = {
11
11
  readonly title: string;
12
+ readonly report?: ChartReport | undefined;
12
13
  readonly description?: string;
13
14
  readonly points: ReadonlyArray<ECDFPoint>;
14
15
  readonly domain: NumericDomain;
@@ -20,4 +21,4 @@ export type ECDFProps = {
20
21
  readonly selection?: ChartSelection;
21
22
  readonly emptyLabel?: string;
22
23
  };
23
- export declare function ECDF({ title, description, points, domain, valueLabel, probabilityLabel, formatValue, formatProbability, tone, selection, emptyLabel, }: ECDFProps): ReactNode;
24
+ export declare function ECDF({ title, report, description, points, domain, valueLabel, probabilityLabel, formatValue, formatProbability, tone, selection, emptyLabel, }: ECDFProps): ReactNode;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartSelection } from '../chart-frame.tsx';
2
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
3
3
  import type { ChartTone } from '../chart-theme.ts';
4
4
  import type { NumericDomain } from './distribution-input.ts';
5
5
  export type HistogramBin = {
@@ -11,6 +11,7 @@ export type HistogramBin = {
11
11
  };
12
12
  export type HistogramProps = {
13
13
  readonly title: string;
14
+ readonly report?: ChartReport | undefined;
14
15
  readonly description?: string;
15
16
  readonly bins: ReadonlyArray<HistogramBin>;
16
17
  readonly domain: NumericDomain;
@@ -23,4 +24,4 @@ export type HistogramProps = {
23
24
  readonly selection?: ChartSelection;
24
25
  readonly emptyLabel?: string;
25
26
  };
26
- export declare function Histogram({ title, description, bins, domain, maximumCount, valueLabel, countLabel, formatValue, formatCount, tone, selection, emptyLabel, }: HistogramProps): ReactNode;
27
+ export declare function Histogram({ title, report, description, bins, domain, maximumCount, valueLabel, countLabel, formatValue, formatCount, tone, selection, emptyLabel, }: HistogramProps): ReactNode;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartSelection } from '../chart-frame.tsx';
2
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
3
3
  import type { ChartTone } from '../chart-theme.ts';
4
4
  import type { NumericDomain } from './distribution-input.ts';
5
5
  export type IntervalDatum = {
@@ -12,6 +12,7 @@ export type IntervalDatum = {
12
12
  };
13
13
  export type IntervalPlotProps = {
14
14
  readonly title: string;
15
+ readonly report?: ChartReport | undefined;
15
16
  readonly description?: string;
16
17
  readonly items: ReadonlyArray<IntervalDatum>;
17
18
  readonly domain: NumericDomain;
@@ -21,4 +22,4 @@ export type IntervalPlotProps = {
21
22
  readonly selection?: ChartSelection;
22
23
  readonly emptyLabel?: string;
23
24
  };
24
- export declare function IntervalPlot({ title, description, items, domain, valueLabel, intervalLabel, formatValue, selection, emptyLabel, }: IntervalPlotProps): ReactNode;
25
+ export declare function IntervalPlot({ title, report, description, items, domain, valueLabel, intervalLabel, formatValue, selection, emptyLabel, }: IntervalPlotProps): ReactNode;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartSelection } from '../chart-frame.tsx';
2
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
3
3
  import type { ChartTone } from '../chart-theme.ts';
4
4
  import type { NumericDomain } from './distribution-input.ts';
5
5
  export type RankedBarDatum = {
@@ -11,6 +11,7 @@ export type RankedBarDatum = {
11
11
  };
12
12
  export type RankedBarsProps = {
13
13
  readonly title: string;
14
+ readonly report?: ChartReport | undefined;
14
15
  readonly description?: string;
15
16
  readonly items: ReadonlyArray<RankedBarDatum>;
16
17
  readonly domain: NumericDomain;
@@ -19,4 +20,4 @@ export type RankedBarsProps = {
19
20
  readonly selection?: ChartSelection;
20
21
  readonly emptyLabel?: string;
21
22
  };
22
- export declare function RankedBars({ title, description, items, domain, valueLabel, formatValue, selection, emptyLabel, }: RankedBarsProps): ReactNode;
23
+ export declare function RankedBars({ title, report, description, items, domain, valueLabel, formatValue, selection, emptyLabel, }: RankedBarsProps): ReactNode;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartSelection } from '../chart-frame.tsx';
2
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
3
3
  import type { ChartTone } from '../chart-theme.ts';
4
4
  export type RelationNode = {
5
5
  readonly id: string;
@@ -29,6 +29,7 @@ export type RelationGroup = {
29
29
  };
30
30
  export type RelationGraphProps = {
31
31
  readonly title: string;
32
+ readonly report?: ChartReport | undefined;
32
33
  readonly description: string;
33
34
  readonly nodes: ReadonlyArray<RelationNode>;
34
35
  readonly edges: ReadonlyArray<RelationEdge>;
@@ -42,4 +43,4 @@ export declare const MAX_RELATION_NODES = 256;
42
43
  export declare const MAX_RELATION_EDGES = 1024;
43
44
  export declare const MAX_RELATION_GROUPS = 256;
44
45
  export declare const MAX_RELATION_DIMENSION = 8192;
45
- export declare function RelationGraph({ title, description, nodes, edges, groups, width, height, selection, emptyLabel, }: RelationGraphProps): ReactNode;
46
+ export declare function RelationGraph({ title, report, description, nodes, edges, groups, width, height, selection, emptyLabel, }: RelationGraphProps): ReactNode;
@@ -1,12 +1,13 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { BreakdownItem } from '../categorical-values.tsx';
3
- import type { ChartSelection } from '../chart-frame.tsx';
3
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
4
4
  export type TreemapProps = {
5
5
  readonly title: string;
6
+ readonly report?: ChartReport | undefined;
6
7
  readonly description?: string | undefined;
7
8
  readonly items: ReadonlyArray<BreakdownItem>;
8
9
  readonly formatValue: (value: number) => string;
9
10
  readonly selection?: ChartSelection | undefined;
10
11
  readonly height?: number | undefined;
11
12
  };
12
- export declare function Treemap({ title, description, items, formatValue, selection, height }: TreemapProps): ReactNode;
13
+ export declare function Treemap({ title, report, description, items, formatValue, selection, height, }: TreemapProps): ReactNode;
@@ -1,5 +1,5 @@
1
1
  export type { BreakdownItem } from './categorical-values.tsx';
2
- export type { ChartSelection, ChartFrameProps, ChartLegendItem, ChartLegendProps } from './chart-frame.tsx';
2
+ export type { ChartReport, ChartSeriesReport, ChartSelection, ChartFrameProps, ChartLegendItem, ChartLegendProps, } from './chart-frame.tsx';
3
3
  export { ChartFrame, ChartLegend } from './chart-frame.tsx';
4
4
  export type { ChartTone } from './chart-theme.ts';
5
5
  export { chartToneColors } from './chart-theme.ts';
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartSelection } from '../chart-frame.tsx';
2
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
3
3
  import type { HeatmapScale } from './heatmap-scale.ts';
4
4
  export type MatrixAxisItem = {
5
5
  readonly id: string;
@@ -21,6 +21,7 @@ export type MatrixCell = {
21
21
  });
22
22
  export type MatrixProps = HeatmapScale & {
23
23
  readonly title: string;
24
+ readonly report?: ChartReport | undefined;
24
25
  readonly description: string;
25
26
  readonly rows: ReadonlyArray<MatrixAxisItem>;
26
27
  readonly columns: ReadonlyArray<MatrixAxisItem>;
@@ -31,4 +32,4 @@ export type MatrixProps = HeatmapScale & {
31
32
  readonly emptyLabel: string;
32
33
  };
33
34
  export declare const MAX_MATRIX_CELLS = 4096;
34
- export declare function Matrix({ title, description, rows, columns, cells, domain, palette, valueLabel, formatValue, selection, emptyLabel, }: MatrixProps): ReactNode;
35
+ export declare function Matrix({ title, report, description, rows, columns, cells, domain, palette, valueLabel, formatValue, selection, emptyLabel, }: MatrixProps): ReactNode;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ChartSelection } from '../chart-frame.tsx';
2
+ import type { ChartReport, ChartSelection } from '../chart-frame.tsx';
3
3
  import type { HeatmapScale } from './heatmap-scale.ts';
4
4
  export type HeatmapToken = {
5
5
  readonly id: string;
@@ -9,6 +9,7 @@ export type HeatmapToken = {
9
9
  };
10
10
  export type TokenHeatmapProps = HeatmapScale & {
11
11
  readonly title: string;
12
+ readonly report?: ChartReport | undefined;
12
13
  readonly description: string;
13
14
  readonly tokens: ReadonlyArray<HeatmapToken>;
14
15
  readonly valueLabel: string;
@@ -17,4 +18,4 @@ export type TokenHeatmapProps = HeatmapScale & {
17
18
  readonly emptyLabel: string;
18
19
  };
19
20
  export declare const MAX_HEATMAP_TOKENS = 2048;
20
- export declare function TokenHeatmap({ title, description, tokens, domain, palette, valueLabel, formatValue, selection, emptyLabel, }: TokenHeatmapProps): ReactNode;
21
+ export declare function TokenHeatmap({ title, report, description, tokens, domain, palette, valueLabel, formatValue, selection, emptyLabel, }: TokenHeatmapProps): ReactNode;
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode, Ref } from 'react';
2
+ import type { ChartReport } from '../chart-frame.tsx';
2
3
  type WaterfallGeometry = {
3
4
  readonly kind: 'interval';
4
5
  readonly start: number;
@@ -17,12 +18,14 @@ export type WaterfallItem = {
17
18
  readonly summary: string;
18
19
  readonly tone: 'neutral' | 'positive' | 'negative';
19
20
  readonly geometry: WaterfallGeometry;
21
+ readonly controls?: string;
20
22
  };
21
23
  type WaterfallProps = {
22
24
  readonly items: ReadonlyArray<WaterfallItem>;
23
25
  readonly start: number;
24
26
  readonly end: number;
25
27
  readonly label: string;
28
+ readonly report?: ChartReport | undefined;
26
29
  readonly rowLabel: string;
27
30
  readonly summaryLabel: string;
28
31
  readonly emptyLabel: string;
@@ -31,5 +34,5 @@ type WaterfallProps = {
31
34
  readonly onSelect: (id: string) => void;
32
35
  readonly formatOffset: (offset: number) => string;
33
36
  };
34
- export declare function Waterfall({ items, start, end, label, rowLabel, summaryLabel, emptyLabel, selectedId, selectedRef, onSelect, formatOffset, }: WaterfallProps): ReactNode;
37
+ export declare function Waterfall({ items, start, end, label, report, rowLabel, summaryLabel, emptyLabel, selectedId, selectedRef, onSelect, formatOffset, }: WaterfallProps): ReactNode;
35
38
  export {};
@@ -8,4 +8,6 @@ export { AgentAvatar, agentAppearance, agentAvatarColors } from './agent-avatar.
8
8
  export { CopyValue } from './copy-value.tsx';
9
9
  export { Accordion, Collapsible } from './disclosure.tsx';
10
10
  export { Panel, SurfaceLink, Row, Stack, Columns, Divider } from './surfaces.tsx';
11
+ export { SectionHeading } from './section-heading.tsx';
12
+ export type { SectionHeadingProps } from './section-heading.tsx';
11
13
  export { Text, Heading, Subheading, Muted, Identifier, Prose, Badge, Status } from './text.tsx';
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ export type SectionHeadingProps = {
3
+ readonly title: ReactNode;
4
+ readonly id?: string | undefined;
5
+ readonly meta?: ReactNode;
6
+ readonly actions?: ReactNode;
7
+ };
8
+ export declare function SectionHeading({ title, id, meta, actions }: SectionHeadingProps): ReactNode;
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ export type CollectionLayoutProps = {
3
+ readonly header?: ReactNode;
4
+ readonly children: ReactNode;
5
+ };
6
+ export declare function CollectionLayout({ header, children }: CollectionLayoutProps): ReactNode;
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  type DetailPageProps = {
3
3
  readonly children: ReactNode;
4
+ readonly isWide?: boolean;
4
5
  };
5
- export declare function DetailPage({ children }: DetailPageProps): ReactNode;
6
+ export declare function DetailPage({ children, isWide }: DetailPageProps): ReactNode;
6
7
  export {};
@@ -10,6 +10,10 @@ export { ViewStack } from './view-stack.tsx';
10
10
  export { PageToolbar, ToolbarAction } from './page-toolbar.tsx';
11
11
  export type { PageContentProps } from './page-content.tsx';
12
12
  export { PageContent } from './page-content.tsx';
13
+ export { ReportContent } from './report-content.tsx';
14
+ export type { ReportContentProps } from './report-content.tsx';
15
+ export { CollectionLayout } from './collection-layout.tsx';
16
+ export type { CollectionLayoutProps } from './collection-layout.tsx';
13
17
  export type { ReportSectionProps } from './report-section.tsx';
14
18
  export { ReportSection } from './report-section.tsx';
15
19
  export type { RecordPageRootProps, RecordPageToolbarProps, RecordPageBodyProps, RecordPageHeaderProps, RecordPageContentProps, RecordPageAsideProps, } from './record-page.tsx';
@@ -4,6 +4,7 @@ export type RecordPageRootProps = {
4
4
  };
5
5
  export type RecordPageBodyProps = {
6
6
  readonly children: ReactNode;
7
+ readonly isWide?: boolean;
7
8
  };
8
9
  export type RecordPageContentProps = {
9
10
  readonly children: ReactNode;
@@ -27,7 +28,7 @@ export type RecordPageAsideProps = {
27
28
  };
28
29
  declare function RecordPageRoot({ children }: RecordPageRootProps): ReactNode;
29
30
  declare function RecordPageToolbar({ backLabel, backHref, onBack, actions, showNavigation, }: RecordPageToolbarProps): ReactNode;
30
- declare function RecordPageBody({ children }: RecordPageBodyProps): ReactNode;
31
+ declare function RecordPageBody({ children, isWide }: RecordPageBodyProps): ReactNode;
31
32
  declare function RecordPageContent({ children }: RecordPageContentProps): ReactNode;
32
33
  declare function RecordPageHeader({ title, description, icon, titleRef }: RecordPageHeaderProps): ReactNode;
33
34
  declare function RecordPageAside({ children, label }: RecordPageAsideProps): ReactNode;
@@ -0,0 +1,6 @@
1
+ import type { ReactNode } from 'react';
2
+ export type ReportContentProps = {
3
+ readonly summary: ReactNode;
4
+ readonly breakdown?: ReactNode;
5
+ };
6
+ export declare function ReportContent({ summary, breakdown }: ReportContentProps): ReactNode;
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from 'react';
2
+ export type ContentTab = {
3
+ readonly id: string;
4
+ readonly label: string;
5
+ readonly content: ReactNode;
6
+ };
7
+ export type ContentTabNavigation = {
8
+ readonly selectedId: string;
9
+ readonly onNavigate: (id: string) => void;
10
+ readonly href: (id: string) => string;
11
+ };
12
+ export type ContentTabsProps = {
13
+ readonly label: string;
14
+ readonly items: ReadonlyArray<ContentTab>;
15
+ readonly navigation?: ContentTabNavigation;
16
+ };
17
+ export declare function ContentTabs(props: ContentTabsProps): ReactNode;