@mechane-ai/elements 0.0.0-stage → 0.4.1

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 (169) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +32 -0
  3. package/README.md +119 -2
  4. package/dist/accessibility-C-aIZ1Yx.js +15 -0
  5. package/dist/ai.js +323 -0
  6. package/dist/assets/stylex.css +2664 -0
  7. package/dist/categorical-values-cMX7Mykq.js +58 -0
  8. package/dist/chart-frame-bX0VLC_W.js +152 -0
  9. package/dist/chart-input-qnM44oen.js +21 -0
  10. package/dist/charts/cartesian.js +1040 -0
  11. package/dist/charts/distribution.js +610 -0
  12. package/dist/charts/graph.js +231 -0
  13. package/dist/charts/hierarchy.js +109 -0
  14. package/dist/charts/matrix.js +439 -0
  15. package/dist/charts/timeline.js +198 -0
  16. package/dist/charts.js +1 -0
  17. package/dist/code-block-BiMcfdlB.js +175 -0
  18. package/dist/collections.js +466 -0
  19. package/dist/content/code.js +1 -0
  20. package/dist/content/diff.js +96 -0
  21. package/dist/content/link.js +1 -0
  22. package/dist/content/markdown.js +155 -0
  23. package/dist/content/tree.js +77 -0
  24. package/dist/content-link-Bm-Td5wm.js +26 -0
  25. package/dist/content.js +318 -0
  26. package/dist/feedback.js +1 -0
  27. package/dist/forms/dates.js +168 -0
  28. package/dist/forms.js +1 -0
  29. package/dist/index.js +1 -0
  30. package/dist/layout.js +379 -0
  31. package/dist/navigation/commands.js +80 -0
  32. package/dist/navigation-yxK3iQXo.js +39 -0
  33. package/dist/navigation.js +58 -0
  34. package/dist/overlays.js +1 -0
  35. package/dist/packages/ai/src/approval.d.ts +29 -0
  36. package/dist/packages/ai/src/conversation.d.ts +34 -0
  37. package/dist/packages/ai/src/index.d.ts +10 -0
  38. package/dist/packages/ai/src/message.d.ts +19 -0
  39. package/dist/packages/ai/src/prompt-input.d.ts +25 -0
  40. package/dist/packages/ai/src/sources.d.ts +17 -0
  41. package/dist/packages/charts/src/cartesian/bar-chart.d.ts +24 -0
  42. package/dist/packages/charts/src/cartesian/breakdown-bar.d.ts +12 -0
  43. package/dist/packages/charts/src/cartesian/index.d.ts +12 -0
  44. package/dist/packages/charts/src/cartesian/scatter-plot.d.ts +37 -0
  45. package/dist/packages/charts/src/cartesian/sparkline.d.ts +11 -0
  46. package/dist/packages/charts/src/cartesian/time-series-data.d.ts +54 -0
  47. package/dist/packages/charts/src/cartesian/time-series-line.d.ts +9 -0
  48. package/dist/packages/charts/src/cartesian/time-series.d.ts +29 -0
  49. package/dist/packages/charts/src/categorical-values.d.ts +24 -0
  50. package/dist/packages/charts/src/chart-frame.d.ts +34 -0
  51. package/dist/packages/charts/src/chart-input.d.ts +10 -0
  52. package/dist/packages/charts/src/chart-theme.d.ts +48 -0
  53. package/dist/packages/charts/src/distribution/distribution-input.d.ts +14 -0
  54. package/dist/packages/charts/src/distribution/distribution-plot.d.ts +135 -0
  55. package/dist/packages/charts/src/distribution/ecdf.d.ts +23 -0
  56. package/dist/packages/charts/src/distribution/histogram.d.ts +26 -0
  57. package/dist/packages/charts/src/distribution/index.d.ts +8 -0
  58. package/dist/packages/charts/src/distribution/interval-plot.d.ts +24 -0
  59. package/dist/packages/charts/src/distribution/ranked-bars.d.ts +22 -0
  60. package/dist/packages/charts/src/graph/index.d.ts +2 -0
  61. package/dist/packages/charts/src/graph/relation-graph.d.ts +45 -0
  62. package/dist/packages/charts/src/hierarchy/index.d.ts +2 -0
  63. package/dist/packages/charts/src/hierarchy/treemap.d.ts +12 -0
  64. package/dist/packages/charts/src/index.d.ts +4 -0
  65. package/dist/packages/charts/src/matrix/color-legend.d.ts +7 -0
  66. package/dist/packages/charts/src/matrix/heatmap-scale.d.ts +8 -0
  67. package/dist/packages/charts/src/matrix/index.d.ts +7 -0
  68. package/dist/packages/charts/src/matrix/matrix.d.ts +34 -0
  69. package/dist/packages/charts/src/matrix/token-heatmap.d.ts +20 -0
  70. package/dist/packages/charts/src/plot-width.d.ts +5 -0
  71. package/dist/packages/charts/src/timeline/index.d.ts +2 -0
  72. package/dist/packages/charts/src/timeline/waterfall.d.ts +34 -0
  73. package/dist/packages/collections/src/collection-controls.d.ts +41 -0
  74. package/dist/packages/collections/src/data-table.d.ts +49 -0
  75. package/dist/packages/collections/src/index.d.ts +10 -0
  76. package/dist/packages/collections/src/inspector.d.ts +16 -0
  77. package/dist/packages/collections/src/list-footer.d.ts +6 -0
  78. package/dist/packages/collections/src/metrics.d.ts +9 -0
  79. package/dist/packages/collections/src/table.d.ts +17 -0
  80. package/dist/packages/collections/src/timestamp.d.ts +7 -0
  81. package/dist/packages/content/src/code/code-block.d.ts +22 -0
  82. package/dist/packages/content/src/code/index.d.ts +2 -0
  83. package/dist/packages/content/src/code/use-highlighted-code.d.ts +9 -0
  84. package/dist/packages/content/src/content-link.d.ts +8 -0
  85. package/dist/packages/content/src/diff/diff-source.d.ts +32 -0
  86. package/dist/packages/content/src/diff/diff-viewer.d.ts +3 -0
  87. package/dist/packages/content/src/diff/index.d.ts +2 -0
  88. package/dist/packages/content/src/diff/pierre-diff.d.ts +14 -0
  89. package/dist/packages/content/src/index.d.ts +8 -0
  90. package/dist/packages/content/src/json-viewer.d.ts +11 -0
  91. package/dist/packages/content/src/link.d.ts +2 -0
  92. package/dist/packages/content/src/log-viewer.d.ts +9 -0
  93. package/dist/packages/content/src/markdown/index.d.ts +2 -0
  94. package/dist/packages/content/src/markdown/markdown.d.ts +7 -0
  95. package/dist/packages/content/src/pierre-theme.d.ts +36 -0
  96. package/dist/packages/content/src/stack-trace.d.ts +16 -0
  97. package/dist/packages/content/src/trace.d.ts +35 -0
  98. package/dist/packages/content/src/tree/file-tree-types.d.ts +12 -0
  99. package/dist/packages/content/src/tree/file-tree.d.ts +3 -0
  100. package/dist/packages/content/src/tree/index.d.ts +2 -0
  101. package/dist/packages/content/src/tree/pierre-tree.d.ts +3 -0
  102. package/dist/packages/core/src/actions.d.ts +31 -0
  103. package/dist/packages/core/src/avatar.d.ts +10 -0
  104. package/dist/packages/core/src/copy-value.d.ts +9 -0
  105. package/dist/packages/core/src/disclosure.d.ts +33 -0
  106. package/dist/packages/core/src/index.d.ts +7 -0
  107. package/dist/packages/core/src/surfaces.d.ts +18 -0
  108. package/dist/packages/core/src/text.d.ts +30 -0
  109. package/dist/packages/feedback/src/feedback.d.ts +11 -0
  110. package/dist/packages/feedback/src/index.d.ts +7 -0
  111. package/dist/packages/feedback/src/loading.d.ts +7 -0
  112. package/dist/packages/feedback/src/progress.d.ts +10 -0
  113. package/dist/packages/feedback/src/skeleton.d.ts +18 -0
  114. package/dist/packages/feedback/src/toast.d.ts +28 -0
  115. package/dist/packages/forms/src/combobox.d.ts +81 -0
  116. package/dist/packages/forms/src/dates/calendar.d.ts +32 -0
  117. package/dist/packages/forms/src/dates/date-range-picker.d.ts +16 -0
  118. package/dist/packages/forms/src/dates/index.d.ts +4 -0
  119. package/dist/packages/forms/src/field-styles.d.ts +66 -0
  120. package/dist/packages/forms/src/form-controls.d.ts +81 -0
  121. package/dist/packages/forms/src/forms.d.ts +32 -0
  122. package/dist/packages/forms/src/index.d.ts +7 -0
  123. package/dist/packages/forms/src/select.d.ts +44 -0
  124. package/dist/packages/forms/src/selection-styles.d.ts +110 -0
  125. package/dist/packages/forms/src/selection.d.ts +57 -0
  126. package/dist/packages/forms/src/settings-row.d.ts +8 -0
  127. package/dist/packages/foundations/src/accessibility.d.ts +14 -0
  128. package/dist/packages/foundations/src/control-state.d.ts +67 -0
  129. package/dist/packages/foundations/src/overlay-styles.d.ts +46 -0
  130. package/dist/packages/foundations/src/popup-styles.d.ts +84 -0
  131. package/dist/packages/foundations/src/style-composition.d.ts +22 -0
  132. package/dist/packages/foundations/src/theme.d.ts +16 -0
  133. package/dist/packages/foundations/src/tokens.stylex.d.ts +143 -0
  134. package/dist/packages/layout/src/app-shell.d.ts +9 -0
  135. package/dist/packages/layout/src/detail-page.d.ts +6 -0
  136. package/dist/packages/layout/src/frame.stylex.d.ts +23 -0
  137. package/dist/packages/layout/src/index.d.ts +6 -0
  138. package/dist/packages/layout/src/page-toolbar.d.ts +14 -0
  139. package/dist/packages/layout/src/resizable.d.ts +27 -0
  140. package/dist/packages/layout/src/sidebar.d.ts +46 -0
  141. package/dist/packages/navigation/src/commands/command.d.ts +37 -0
  142. package/dist/packages/navigation/src/commands/index.d.ts +2 -0
  143. package/dist/packages/navigation/src/index.d.ts +3 -0
  144. package/dist/packages/navigation/src/navigation.d.ts +24 -0
  145. package/dist/packages/navigation/src/skip-link.d.ts +6 -0
  146. package/dist/packages/navigation/src/tabs.d.ts +19 -0
  147. package/dist/packages/overlays/src/alert-dialog.d.ts +18 -0
  148. package/dist/packages/overlays/src/dialog.d.ts +27 -0
  149. package/dist/packages/overlays/src/drawer.d.ts +33 -0
  150. package/dist/packages/overlays/src/index.d.ts +7 -0
  151. package/dist/packages/overlays/src/menu.d.ts +51 -0
  152. package/dist/packages/overlays/src/popover.d.ts +24 -0
  153. package/dist/packages/overlays/src/preview.d.ts +17 -0
  154. package/dist/packages/overlays/src/tooltip.d.ts +18 -0
  155. package/dist/pierre-diff-CZdzgiYm.js +66 -0
  156. package/dist/pierre-theme-BpESNIsV.js +96 -0
  157. package/dist/pierre-tree-qZVvI5c1.js +106 -0
  158. package/dist/plot-width--OgdohB5.js +18 -0
  159. package/dist/popup-styles-CvtZDE2t.js +135 -0
  160. package/dist/src-BfvOOeA3.js +272 -0
  161. package/dist/src-CbYaLvhD.js +671 -0
  162. package/dist/src-CfDf8TY8.js +466 -0
  163. package/dist/src-CvpS9XIR.js +1077 -0
  164. package/dist/style-composition-uYlczSsB.js +9 -0
  165. package/dist/theme.js +7 -0
  166. package/dist/tokens.js +138 -0
  167. package/package.json +148 -3
  168. package/packages/foundations/src/tokens.stylex.ts +145 -0
  169. package/styles.css +2 -0
@@ -0,0 +1,135 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ import type { ReactNode } from 'react';
3
+ import type { NumericDomain } from './distribution-input.ts';
4
+ export declare const distributionGeometry: {
5
+ readonly height: 160;
6
+ };
7
+ export declare const distributionStyles: Readonly<{
8
+ readonly plot: Readonly<{
9
+ readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
10
+ readonly display: stylex.StyleXClassNameFor<"display", "grid">;
11
+ readonly gridTemplateColumns: stylex.StyleXClassNameFor<"gridTemplateColumns", "max-content minmax(0, 1fr)">;
12
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
13
+ }>;
14
+ readonly yAxis: Readonly<{
15
+ readonly height: stylex.StyleXClassNameFor<"height", 160>;
16
+ readonly display: stylex.StyleXClassNameFor<"display", "flex">;
17
+ readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
18
+ readonly justifyContent: stylex.StyleXClassNameFor<"justifyContent", "space-between">;
19
+ readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "end">;
20
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
21
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
22
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
23
+ readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
24
+ }>;
25
+ readonly svg: Readonly<{
26
+ readonly display: stylex.StyleXClassNameFor<"display", "block">;
27
+ readonly width: stylex.StyleXClassNameFor<"width", "100%">;
28
+ readonly height: stylex.StyleXClassNameFor<"height", 160>;
29
+ readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
30
+ }>;
31
+ readonly grid: Readonly<{
32
+ readonly stroke: stylex.StyleXClassNameFor<"stroke", string>;
33
+ readonly strokeDasharray: stylex.StyleXClassNameFor<"strokeDasharray", "3 3">;
34
+ readonly vectorEffect: stylex.StyleXClassNameFor<"vectorEffect", "non-scaling-stroke">;
35
+ }>;
36
+ readonly axis: Readonly<{
37
+ readonly display: stylex.StyleXClassNameFor<"display", "flex">;
38
+ readonly justifyContent: stylex.StyleXClassNameFor<"justifyContent", "space-between">;
39
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
40
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
41
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
42
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
43
+ readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
44
+ }>;
45
+ readonly axisNames: Readonly<{
46
+ readonly gridColumn: stylex.StyleXClassNameFor<"gridColumn", "1 / -1">;
47
+ readonly display: stylex.StyleXClassNameFor<"display", "flex">;
48
+ readonly justifyContent: stylex.StyleXClassNameFor<"justifyContent", "space-between">;
49
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
50
+ }>;
51
+ readonly label: Readonly<{
52
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
53
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
54
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
55
+ readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
56
+ }>;
57
+ readonly values: Readonly<{
58
+ readonly display: stylex.StyleXClassNameFor<"display", "grid">;
59
+ readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
60
+ }>;
61
+ readonly value: Readonly<{
62
+ readonly display: stylex.StyleXClassNameFor<"display", "flex">;
63
+ readonly justifyContent: stylex.StyleXClassNameFor<"justifyContent", "space-between">;
64
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
65
+ readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
66
+ readonly width: stylex.StyleXClassNameFor<"width", "100%">;
67
+ }>;
68
+ readonly summary: Readonly<{
69
+ readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
70
+ readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
71
+ readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "end">;
72
+ }>;
73
+ readonly row: Readonly<{
74
+ readonly display: stylex.StyleXClassNameFor<"display", "grid">;
75
+ readonly gridTemplateColumns: stylex.StyleXClassNameFor<"gridTemplateColumns", "minmax(0, 1fr)" | "minmax(100px, 1fr) minmax(120px, 2fr)">;
76
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
77
+ readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
78
+ readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
79
+ readonly width: stylex.StyleXClassNameFor<"width", "100%">;
80
+ }>;
81
+ readonly rowAxis: Readonly<{
82
+ readonly boxSizing: stylex.StyleXClassNameFor<"boxSizing", "border-box">;
83
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
84
+ }>;
85
+ readonly axisSpacer: Readonly<{
86
+ readonly display: stylex.StyleXClassNameFor<"display", "block" | "none">;
87
+ }>;
88
+ readonly rowLabel: Readonly<{
89
+ readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
90
+ readonly display: stylex.StyleXClassNameFor<"display", "grid">;
91
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
92
+ readonly overflowWrap: stylex.StyleXClassNameFor<"overflowWrap", "anywhere">;
93
+ }>;
94
+ readonly rowValue: Readonly<{
95
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
96
+ readonly fontVariantNumeric: stylex.StyleXClassNameFor<"fontVariantNumeric", "tabular-nums">;
97
+ }>;
98
+ readonly rowSvg: Readonly<{
99
+ readonly display: stylex.StyleXClassNameFor<"display", "block">;
100
+ readonly width: stylex.StyleXClassNameFor<"width", "100%">;
101
+ readonly height: stylex.StyleXClassNameFor<"height", 28>;
102
+ readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
103
+ }>;
104
+ readonly empty: Readonly<{
105
+ readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
106
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
107
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
108
+ readonly lineHeight: stylex.StyleXClassNameFor<"lineHeight", string>;
109
+ }>;
110
+ readonly baseline: Readonly<{
111
+ readonly stroke: stylex.StyleXClassNameFor<"stroke", string>;
112
+ readonly vectorEffect: stylex.StyleXClassNameFor<"vectorEffect", "non-scaling-stroke">;
113
+ }>;
114
+ readonly missing: Readonly<{
115
+ readonly fill: stylex.StyleXClassNameFor<"fill", string>;
116
+ readonly stroke: stylex.StyleXClassNameFor<"stroke", string>;
117
+ readonly strokeDasharray: stylex.StyleXClassNameFor<"strokeDasharray", "3 3">;
118
+ readonly vectorEffect: stylex.StyleXClassNameFor<"vectorEffect", "non-scaling-stroke">;
119
+ }>;
120
+ }>;
121
+ type NumericPlotProps = {
122
+ readonly xDomain: NumericDomain;
123
+ readonly yDomain: NumericDomain;
124
+ readonly xLabel: string;
125
+ readonly yLabel: string;
126
+ readonly formatX: (value: number) => string;
127
+ readonly formatY: (value: number) => string;
128
+ readonly children: (width: number) => ReactNode;
129
+ };
130
+ export declare function NumericPlot({ xDomain, yDomain, xLabel, yLabel, formatX, formatY, children, }: NumericPlotProps): ReactNode;
131
+ export declare function DomainLabels({ domain, formatValue, }: {
132
+ readonly domain: NumericDomain;
133
+ readonly formatValue: (value: number) => string;
134
+ }): ReactNode;
135
+ export {};
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ChartSelection } from '../chart-frame.tsx';
3
+ import type { ChartTone } from '../chart-theme.ts';
4
+ import type { NumericDomain } from './distribution-input.ts';
5
+ export type ECDFPoint = {
6
+ readonly id: string;
7
+ readonly value: number;
8
+ readonly probability: number | null;
9
+ };
10
+ export type ECDFProps = {
11
+ readonly title: string;
12
+ readonly description?: string;
13
+ readonly points: ReadonlyArray<ECDFPoint>;
14
+ readonly domain: NumericDomain;
15
+ readonly valueLabel: string;
16
+ readonly probabilityLabel: string;
17
+ readonly formatValue: (value: number) => string;
18
+ readonly formatProbability: (probability: number) => string;
19
+ readonly tone?: ChartTone;
20
+ readonly selection?: ChartSelection;
21
+ readonly emptyLabel?: string;
22
+ };
23
+ export declare function ECDF({ title, description, points, domain, valueLabel, probabilityLabel, formatValue, formatProbability, tone, selection, emptyLabel, }: ECDFProps): ReactNode;
@@ -0,0 +1,26 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ChartSelection } from '../chart-frame.tsx';
3
+ import type { ChartTone } from '../chart-theme.ts';
4
+ import type { NumericDomain } from './distribution-input.ts';
5
+ export type HistogramBin = {
6
+ readonly id: string;
7
+ readonly label: string;
8
+ readonly lowerBound: number;
9
+ readonly upperBound: number;
10
+ readonly count: number | null;
11
+ };
12
+ export type HistogramProps = {
13
+ readonly title: string;
14
+ readonly description?: string;
15
+ readonly bins: ReadonlyArray<HistogramBin>;
16
+ readonly domain: NumericDomain;
17
+ readonly maximumCount: number;
18
+ readonly valueLabel: string;
19
+ readonly countLabel: string;
20
+ readonly formatValue: (value: number) => string;
21
+ readonly formatCount: (count: number) => string;
22
+ readonly tone?: ChartTone;
23
+ readonly selection?: ChartSelection;
24
+ readonly emptyLabel?: string;
25
+ };
26
+ export declare function Histogram({ title, description, bins, domain, maximumCount, valueLabel, countLabel, formatValue, formatCount, tone, selection, emptyLabel, }: HistogramProps): ReactNode;
@@ -0,0 +1,8 @@
1
+ export type { ECDFPoint, ECDFProps } from './ecdf.tsx';
2
+ export { ECDF } from './ecdf.tsx';
3
+ export type { HistogramBin, HistogramProps } from './histogram.tsx';
4
+ export { Histogram } from './histogram.tsx';
5
+ export type { IntervalDatum, IntervalPlotProps } from './interval-plot.tsx';
6
+ export { IntervalPlot } from './interval-plot.tsx';
7
+ export type { RankedBarDatum, RankedBarsProps } from './ranked-bars.tsx';
8
+ export { RankedBars } from './ranked-bars.tsx';
@@ -0,0 +1,24 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ChartSelection } from '../chart-frame.tsx';
3
+ import type { ChartTone } from '../chart-theme.ts';
4
+ import type { NumericDomain } from './distribution-input.ts';
5
+ export type IntervalDatum = {
6
+ readonly id: string;
7
+ readonly label: string;
8
+ readonly lower: number | null;
9
+ readonly estimate: number | null;
10
+ readonly upper: number | null;
11
+ readonly tone?: ChartTone;
12
+ };
13
+ export type IntervalPlotProps = {
14
+ readonly title: string;
15
+ readonly description?: string;
16
+ readonly items: ReadonlyArray<IntervalDatum>;
17
+ readonly domain: NumericDomain;
18
+ readonly valueLabel: string;
19
+ readonly intervalLabel: string;
20
+ readonly formatValue: (value: number) => string;
21
+ readonly selection?: ChartSelection;
22
+ readonly emptyLabel?: string;
23
+ };
24
+ export declare function IntervalPlot({ title, description, items, domain, valueLabel, intervalLabel, formatValue, selection, emptyLabel, }: IntervalPlotProps): ReactNode;
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ChartSelection } from '../chart-frame.tsx';
3
+ import type { ChartTone } from '../chart-theme.ts';
4
+ import type { NumericDomain } from './distribution-input.ts';
5
+ export type RankedBarDatum = {
6
+ readonly id: string;
7
+ readonly label: string;
8
+ readonly rank?: string;
9
+ readonly value: number | null;
10
+ readonly tone?: ChartTone;
11
+ };
12
+ export type RankedBarsProps = {
13
+ readonly title: string;
14
+ readonly description?: string;
15
+ readonly items: ReadonlyArray<RankedBarDatum>;
16
+ readonly domain: NumericDomain;
17
+ readonly valueLabel: string;
18
+ readonly formatValue: (value: number) => string;
19
+ readonly selection?: ChartSelection;
20
+ readonly emptyLabel?: string;
21
+ };
22
+ export declare function RankedBars({ title, description, items, domain, valueLabel, formatValue, selection, emptyLabel, }: RankedBarsProps): ReactNode;
@@ -0,0 +1,2 @@
1
+ export type { RelationNode, RelationEdge, RelationGroup, RelationGraphProps } from './relation-graph.tsx';
2
+ export { MAX_RELATION_NODES, MAX_RELATION_EDGES, MAX_RELATION_GROUPS, MAX_RELATION_DIMENSION, RelationGraph, } from './relation-graph.tsx';
@@ -0,0 +1,45 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ChartSelection } from '../chart-frame.tsx';
3
+ import type { ChartTone } from '../chart-theme.ts';
4
+ export type RelationNode = {
5
+ readonly id: string;
6
+ readonly label: string;
7
+ readonly description?: string | undefined;
8
+ readonly x: number;
9
+ readonly y: number;
10
+ readonly width: number;
11
+ readonly height: number;
12
+ readonly tone: ChartTone;
13
+ };
14
+ export type RelationEdge = {
15
+ readonly id: string;
16
+ readonly sourceId: string;
17
+ readonly targetId: string;
18
+ readonly label: string;
19
+ readonly direction: 'directed' | 'undirected';
20
+ };
21
+ export type RelationGroup = {
22
+ readonly id: string;
23
+ readonly label: string;
24
+ readonly x: number;
25
+ readonly y: number;
26
+ readonly width: number;
27
+ readonly height: number;
28
+ readonly nodeIds: ReadonlyArray<string>;
29
+ };
30
+ export type RelationGraphProps = {
31
+ readonly title: string;
32
+ readonly description: string;
33
+ readonly nodes: ReadonlyArray<RelationNode>;
34
+ readonly edges: ReadonlyArray<RelationEdge>;
35
+ readonly groups?: ReadonlyArray<RelationGroup> | undefined;
36
+ readonly width: number;
37
+ readonly height: number;
38
+ readonly selection?: ChartSelection | undefined;
39
+ readonly emptyLabel: string;
40
+ };
41
+ export declare const MAX_RELATION_NODES = 256;
42
+ export declare const MAX_RELATION_EDGES = 1024;
43
+ export declare const MAX_RELATION_GROUPS = 256;
44
+ export declare const MAX_RELATION_DIMENSION = 8192;
45
+ export declare function RelationGraph({ title, description, nodes, edges, groups, width, height, selection, emptyLabel, }: RelationGraphProps): ReactNode;
@@ -0,0 +1,2 @@
1
+ export type { TreemapProps } from './treemap.tsx';
2
+ export { Treemap } from './treemap.tsx';
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { BreakdownItem } from '../categorical-values.tsx';
3
+ import type { ChartSelection } from '../chart-frame.tsx';
4
+ export type TreemapProps = {
5
+ readonly title: string;
6
+ readonly description?: string | undefined;
7
+ readonly items: ReadonlyArray<BreakdownItem>;
8
+ readonly formatValue: (value: number) => string;
9
+ readonly selection?: ChartSelection | undefined;
10
+ readonly height?: number | undefined;
11
+ };
12
+ export declare function Treemap({ title, description, items, formatValue, selection, height }: TreemapProps): ReactNode;
@@ -0,0 +1,4 @@
1
+ export type { BreakdownItem } from './categorical-values.tsx';
2
+ export type { ChartSelection, ChartFrameProps, ChartLegendItem, ChartLegendProps } from './chart-frame.tsx';
3
+ export { ChartFrame, ChartLegend } from './chart-frame.tsx';
4
+ export type { ChartTone } from './chart-theme.ts';
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { HeatmapScale } from './heatmap-scale.ts';
3
+ export type ColorLegendProps = HeatmapScale & {
4
+ readonly label: string;
5
+ readonly formatValue: (value: number) => string;
6
+ };
7
+ export declare function ColorLegend({ label, domain, palette, formatValue }: ColorLegendProps): ReactNode;
@@ -0,0 +1,8 @@
1
+ export type HeatmapPalette = 'sequential' | 'diverging';
2
+ export type HeatmapScale = {
3
+ readonly domain: readonly [number, number];
4
+ readonly palette: HeatmapPalette;
5
+ };
6
+ export declare function heatmapScaleProblem({ domain, palette }: HeatmapScale): string | null;
7
+ export declare function isHeatmapValueInDomain(value: number, domain: readonly [number, number]): boolean;
8
+ export declare function heatmapColor(value: number, { domain, palette }: HeatmapScale): string;
@@ -0,0 +1,7 @@
1
+ export type { ColorLegendProps } from './color-legend.tsx';
2
+ export { ColorLegend } from './color-legend.tsx';
3
+ export type { HeatmapPalette, HeatmapScale } from './heatmap-scale.ts';
4
+ export type { MatrixAxisItem, MatrixCell, MatrixProps } from './matrix.tsx';
5
+ export { MAX_MATRIX_CELLS, Matrix } from './matrix.tsx';
6
+ export type { HeatmapToken, TokenHeatmapProps } from './token-heatmap.tsx';
7
+ export { MAX_HEATMAP_TOKENS, TokenHeatmap } from './token-heatmap.tsx';
@@ -0,0 +1,34 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ChartSelection } from '../chart-frame.tsx';
3
+ import type { HeatmapScale } from './heatmap-scale.ts';
4
+ export type MatrixAxisItem = {
5
+ readonly id: string;
6
+ readonly label: string;
7
+ };
8
+ export type MatrixCell = {
9
+ readonly id: string;
10
+ readonly rowId: string;
11
+ readonly columnId: string;
12
+ } & ({
13
+ readonly kind: 'value';
14
+ readonly value: number;
15
+ } | {
16
+ readonly kind: 'masked';
17
+ readonly reason: string;
18
+ } | {
19
+ readonly kind: 'missing';
20
+ readonly reason: string;
21
+ });
22
+ export type MatrixProps = HeatmapScale & {
23
+ readonly title: string;
24
+ readonly description: string;
25
+ readonly rows: ReadonlyArray<MatrixAxisItem>;
26
+ readonly columns: ReadonlyArray<MatrixAxisItem>;
27
+ readonly cells: ReadonlyArray<MatrixCell>;
28
+ readonly valueLabel: string;
29
+ readonly formatValue: (value: number) => string;
30
+ readonly selection?: ChartSelection;
31
+ readonly emptyLabel: string;
32
+ };
33
+ 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;
@@ -0,0 +1,20 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ChartSelection } from '../chart-frame.tsx';
3
+ import type { HeatmapScale } from './heatmap-scale.ts';
4
+ export type HeatmapToken = {
5
+ readonly id: string;
6
+ readonly index: number;
7
+ readonly text: string;
8
+ readonly score: number | null;
9
+ };
10
+ export type TokenHeatmapProps = HeatmapScale & {
11
+ readonly title: string;
12
+ readonly description: string;
13
+ readonly tokens: ReadonlyArray<HeatmapToken>;
14
+ readonly valueLabel: string;
15
+ readonly formatValue: (value: number) => string;
16
+ readonly selection?: ChartSelection;
17
+ readonly emptyLabel: string;
18
+ };
19
+ export declare const MAX_HEATMAP_TOKENS = 2048;
20
+ export declare function TokenHeatmap({ title, description, tokens, domain, palette, valueLabel, formatValue, selection, emptyLabel, }: TokenHeatmapProps): ReactNode;
@@ -0,0 +1,5 @@
1
+ export declare function usePlotWidth(): {
2
+ ref: import("react").Dispatch<import("react").SetStateAction<HTMLDivElement | null>>;
3
+ width: number;
4
+ element: HTMLDivElement | null;
5
+ };
@@ -0,0 +1,2 @@
1
+ export type { WaterfallItem } from './waterfall.tsx';
2
+ export { Waterfall } from './waterfall.tsx';
@@ -0,0 +1,34 @@
1
+ import type { ReactNode } from 'react';
2
+ type WaterfallGeometry = {
3
+ readonly kind: 'interval';
4
+ readonly start: number;
5
+ readonly end: number;
6
+ } | {
7
+ readonly kind: 'point';
8
+ readonly at: number;
9
+ readonly marker: 'filled' | 'hollow' | 'diamond';
10
+ } | {
11
+ readonly kind: 'unavailable';
12
+ };
13
+ export type WaterfallItem = {
14
+ readonly id: string;
15
+ readonly label: string;
16
+ readonly detail: string;
17
+ readonly summary: string;
18
+ readonly tone: 'neutral' | 'positive' | 'negative';
19
+ readonly geometry: WaterfallGeometry;
20
+ };
21
+ type WaterfallProps = {
22
+ readonly items: ReadonlyArray<WaterfallItem>;
23
+ readonly start: number;
24
+ readonly end: number;
25
+ readonly label: string;
26
+ readonly rowLabel: string;
27
+ readonly summaryLabel: string;
28
+ readonly emptyLabel: string;
29
+ readonly selectedId: string | undefined;
30
+ readonly onSelect: (id: string) => void;
31
+ readonly formatOffset: (offset: number) => string;
32
+ };
33
+ export declare function Waterfall({ items, start, end, label, rowLabel, summaryLabel, emptyLabel, selectedId, onSelect, formatOffset, }: WaterfallProps): ReactNode;
34
+ export {};
@@ -0,0 +1,41 @@
1
+ import type { ReactNode } from 'react';
2
+ export type CollectionToolbarProps = {
3
+ readonly label: string;
4
+ readonly children: ReactNode;
5
+ readonly actions?: ReactNode;
6
+ };
7
+ export declare function CollectionToolbar({ label, children, actions }: CollectionToolbarProps): ReactNode;
8
+ export type FilterChip = {
9
+ readonly id: string;
10
+ readonly label: string;
11
+ };
12
+ export type FilterChipsProps = {
13
+ readonly filters: ReadonlyArray<FilterChip>;
14
+ readonly onRemove: (id: string) => void;
15
+ readonly label?: string;
16
+ };
17
+ export declare function FilterChips({ filters, onRemove, label }: FilterChipsProps): ReactNode;
18
+ export type ColumnChoice = {
19
+ readonly id: string;
20
+ readonly label: string;
21
+ readonly visible: boolean;
22
+ readonly required?: boolean;
23
+ };
24
+ export type ColumnControlsProps = {
25
+ readonly columns: ReadonlyArray<ColumnChoice>;
26
+ readonly onVisibilityChange: (columnId: string, visible: boolean) => void;
27
+ readonly label?: string;
28
+ };
29
+ export declare function ColumnControls({ columns, onVisibilityChange, label }: ColumnControlsProps): ReactNode;
30
+ export type CollectionPaginationProps = {
31
+ readonly description: string;
32
+ readonly previous: {
33
+ readonly disabled: boolean;
34
+ readonly onClick: () => void;
35
+ };
36
+ readonly next: {
37
+ readonly disabled: boolean;
38
+ readonly onClick: () => void;
39
+ };
40
+ };
41
+ export declare function CollectionPagination({ description, previous, next }: CollectionPaginationProps): ReactNode;
@@ -0,0 +1,49 @@
1
+ import type { ReactNode } from 'react';
2
+ type ColumnAlignment = 'start' | 'end';
3
+ export type DataTableColumn<Row> = {
4
+ readonly id: string;
5
+ readonly label: string;
6
+ readonly cell: (row: Row) => ReactNode;
7
+ readonly align?: ColumnAlignment;
8
+ readonly width?: number;
9
+ readonly sortable?: boolean;
10
+ };
11
+ export type DataTableSort = {
12
+ readonly columnId: string;
13
+ readonly direction: 'ascending' | 'descending';
14
+ };
15
+ export type DataTableWindow = {
16
+ readonly height: number;
17
+ readonly estimatedRowHeight?: number;
18
+ };
19
+ type SortProperties<Row> = {
20
+ readonly columns: ReadonlyArray<DataTableColumn<Row>>;
21
+ readonly sort: DataTableSort | undefined;
22
+ readonly onSortChange: (sort: DataTableSort | undefined) => void;
23
+ } | {
24
+ readonly columns: ReadonlyArray<DataTableColumn<Row> & {
25
+ readonly sortable?: false;
26
+ }>;
27
+ readonly sort?: never;
28
+ readonly onSortChange?: never;
29
+ };
30
+ type SelectionProperties<Row> = {
31
+ readonly selectedIds: ReadonlySet<string>;
32
+ readonly onSelectionChange: (selectedIds: ReadonlySet<string>) => void;
33
+ readonly selectionLabel: (row: Row) => string;
34
+ };
35
+ type OptionalSelection<Row> = SelectionProperties<Row> | {
36
+ readonly selectedIds?: never;
37
+ readonly onSelectionChange?: never;
38
+ readonly selectionLabel?: never;
39
+ };
40
+ export type DataTableProps<Row> = SortProperties<Row> & OptionalSelection<Row> & {
41
+ readonly rows: ReadonlyArray<Row>;
42
+ readonly getRowId: (row: Row) => string;
43
+ readonly caption: string;
44
+ readonly empty: string;
45
+ readonly window?: DataTableWindow;
46
+ readonly footer?: ReactNode;
47
+ };
48
+ export declare function DataTable<Row extends object>({ rows, columns, getRowId, caption, empty, sort, onSortChange, selectedIds, onSelectionChange, selectionLabel, window, footer, }: DataTableProps<Row>): ReactNode;
49
+ export {};
@@ -0,0 +1,10 @@
1
+ export type { CollectionToolbarProps, FilterChip, FilterChipsProps, ColumnChoice, ColumnControlsProps, CollectionPaginationProps, } from './collection-controls.tsx';
2
+ export { CollectionToolbar, FilterChips, ColumnControls, CollectionPagination } from './collection-controls.tsx';
3
+ export type { DataTableColumn, DataTableSort, DataTableWindow, DataTableProps } from './data-table.tsx';
4
+ export { DataTable } from './data-table.tsx';
5
+ export { Inspector, Details } from './inspector.tsx';
6
+ export { ListFooter } from './list-footer.tsx';
7
+ export { MetricGrid, Metric } from './metrics.tsx';
8
+ export { Table, Cell } from './table.tsx';
9
+ export type { TimestampProps } from './timestamp.tsx';
10
+ export { Timestamp } from './timestamp.tsx';
@@ -0,0 +1,16 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ type InspectorProps = ComponentProps<'div'> & {
3
+ readonly master: ReactNode;
4
+ readonly detail: ReactNode;
5
+ readonly label: string;
6
+ };
7
+ type DetailItem = {
8
+ readonly label: string;
9
+ readonly value: ReactNode;
10
+ };
11
+ type DetailsProps = ComponentProps<'dl'> & {
12
+ readonly items: ReadonlyArray<DetailItem>;
13
+ };
14
+ export declare function Inspector({ master, detail, label, ...props }: InspectorProps): ReactNode;
15
+ export declare function Details({ items, ...props }: DetailsProps): ReactNode;
16
+ export {};
@@ -0,0 +1,6 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ type ListFooterProps = ComponentProps<'div'> & {
3
+ readonly actions?: ReactNode;
4
+ };
5
+ export declare function ListFooter({ children, actions, ...props }: ListFooterProps): ReactNode;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ type MetricGridProps = ComponentProps<'dl'>;
3
+ type MetricProps = ComponentProps<'div'> & {
4
+ readonly label: string;
5
+ readonly value: string;
6
+ };
7
+ export declare function MetricGrid(props: MetricGridProps): ReactNode;
8
+ export declare function Metric({ label, value, ...props }: MetricProps): ReactNode;
9
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ type TableHeader = string | {
3
+ readonly label: string;
4
+ readonly width: number;
5
+ readonly secondary?: boolean;
6
+ };
7
+ type TableProps = ComponentProps<'table'> & {
8
+ readonly headers: ReadonlyArray<TableHeader>;
9
+ readonly label: string;
10
+ };
11
+ type CellProps = ComponentProps<'td'> & {
12
+ readonly secondary?: boolean;
13
+ readonly mobileLabel?: string;
14
+ };
15
+ export declare function Table({ headers, children, label, ...props }: TableProps): ReactNode;
16
+ export declare function Cell({ children, secondary, mobileLabel, ...props }: CellProps): ReactNode;
17
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ export type TimestampProps = {
3
+ readonly dateTime: string;
4
+ readonly label: string;
5
+ readonly title?: string;
6
+ };
7
+ export declare function Timestamp({ dateTime, label, title }: TimestampProps): ReactNode;
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+ export type CodeAnnotation = {
3
+ readonly line: number;
4
+ readonly content: ReactNode;
5
+ };
6
+ export type CodeSelection = {
7
+ readonly start: number;
8
+ readonly end?: number;
9
+ };
10
+ export type CodeBlockProps = {
11
+ readonly code: string;
12
+ readonly language?: string | undefined;
13
+ readonly filename?: string | undefined;
14
+ readonly streaming?: boolean;
15
+ readonly wrap?: boolean;
16
+ readonly lineNumbers?: boolean;
17
+ readonly selectedLines?: CodeSelection;
18
+ readonly annotations?: ReadonlyArray<CodeAnnotation>;
19
+ readonly maxHeight?: number;
20
+ readonly maxLines?: number;
21
+ };
22
+ export declare function CodeBlock({ code, language, filename, streaming, wrap, lineNumbers, selectedLines, annotations, maxHeight, maxLines, }: CodeBlockProps): ReactNode;
@@ -0,0 +1,2 @@
1
+ export type { CodeAnnotation, CodeSelection, CodeBlockProps } from './code-block.tsx';
2
+ export { CodeBlock } from './code-block.tsx';