@altertable/data-app 0.65.0 → 0.67.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 (202) hide show
  1. package/AGENTS.md +38 -1
  2. package/CONTRIBUTING.md +54 -14
  3. package/README.md +1 -1
  4. package/dist/chunks/index-23dktynd.js +80 -0
  5. package/dist/chunks/index-23dktynd.js.map +10 -0
  6. package/dist/chunks/index-8qfxv0h5.js +14160 -0
  7. package/dist/chunks/index-8qfxv0h5.js.map +108 -0
  8. package/dist/chunks/index-ag0cgnvq.js +639 -0
  9. package/dist/chunks/index-ag0cgnvq.js.map +13 -0
  10. package/dist/chunks/index-dq7b35fn.js +307 -0
  11. package/dist/chunks/index-dq7b35fn.js.map +13 -0
  12. package/dist/chunks/{contract-a061yj6r.js → index-ev2b5aaf.js} +41 -72
  13. package/dist/chunks/index-ev2b5aaf.js.map +12 -0
  14. package/dist/chunks/{contract-awa2d5b1.js → index-f5cnbrjz.js} +19 -2
  15. package/dist/chunks/{contract-awa2d5b1.js.map → index-f5cnbrjz.js.map} +4 -3
  16. package/dist/chunks/{contract-sm7j7k95.js → index-ktmvs916.js} +9 -150
  17. package/dist/chunks/index-ktmvs916.js.map +13 -0
  18. package/dist/chunks/{contract-txjy0en2.js → index-m6n8ctfc.js} +64 -72
  19. package/dist/chunks/index-m6n8ctfc.js.map +10 -0
  20. package/dist/chunks/index-mt93ff2b.js +28 -0
  21. package/dist/chunks/index-mt93ff2b.js.map +10 -0
  22. package/dist/chunks/{contract-tf8c3qpv.js → index-qd5xgx6y.js} +46 -5
  23. package/dist/chunks/index-qd5xgx6y.js.map +13 -0
  24. package/dist/chunks/index-x69p7cv7.js +149 -0
  25. package/dist/chunks/index-x69p7cv7.js.map +10 -0
  26. package/dist/client/index.js +12 -7
  27. package/dist/client/index.js.map +1 -1
  28. package/dist/core/appearance.js +1 -1
  29. package/dist/core/config.js +7 -3
  30. package/dist/core/config.js.map +1 -1
  31. package/dist/core/contract.js +24 -6
  32. package/dist/core/contract.js.map +1 -1
  33. package/dist/core/format.js +1 -1
  34. package/dist/embed/index.js +16 -12
  35. package/dist/embed/index.js.map +4 -4
  36. package/dist/index.js +12 -0
  37. package/dist/index.js.map +9 -0
  38. package/dist/local.js +20 -30
  39. package/dist/local.js.map +7 -8
  40. package/dist/react/embed/index.js +1 -1
  41. package/dist/react/embed/index.js.map +2 -2
  42. package/dist/react/index.js +2567 -11542
  43. package/dist/react/index.js.map +16 -91
  44. package/dist/react/ui/index.js +2272 -0
  45. package/dist/react/ui/index.js.map +28 -0
  46. package/dist/server.js +13 -26
  47. package/dist/server.js.map +6 -7
  48. package/dist/types/client/annotations.d.ts +27 -0
  49. package/dist/types/client/data-client.d.ts +1 -2
  50. package/dist/types/client/iframe.d.ts +4 -2
  51. package/dist/types/client/index.d.ts +1 -0
  52. package/dist/types/core/annotations.d.ts +94 -0
  53. package/dist/types/core/appearance.d.ts +2 -2
  54. package/dist/types/core/config.d.ts +48 -4
  55. package/dist/types/core/contract.d.ts +21 -11
  56. package/dist/types/core/dimension.d.ts +6 -4
  57. package/dist/types/core/filters.d.ts +44 -0
  58. package/dist/types/core/messages.d.ts +2 -0
  59. package/dist/types/core/operation-types.d.ts +5 -2
  60. package/dist/types/core/operation.d.ts +3 -4
  61. package/dist/types/core/presentation.d.ts +2 -0
  62. package/dist/types/core/queries.d.ts +16 -0
  63. package/dist/types/core/uuid.d.ts +2 -0
  64. package/dist/types/core/variables.d.ts +34 -18
  65. package/dist/types/embed/runtime-html.d.ts +2 -0
  66. package/dist/types/embed/source.d.ts +2 -1
  67. package/dist/types/index.d.ts +3 -0
  68. package/dist/types/react/annotations/AnnotationBar.d.ts +30 -0
  69. package/dist/types/react/annotations/AnnotationControls.d.ts +10 -0
  70. package/dist/types/react/annotations/AnnotationEditor.d.ts +16 -0
  71. package/dist/types/react/annotations/AnnotationMarkers.d.ts +19 -0
  72. package/dist/types/react/annotations/AnnotationSelectionLayer.d.ts +12 -0
  73. package/dist/types/react/annotations/AnnotationTarget.d.ts +9 -0
  74. package/dist/types/react/annotations/AnnotationTooltip.d.ts +9 -0
  75. package/dist/types/react/annotations/AnnotationTrigger.d.ts +10 -0
  76. package/dist/types/react/annotations/annotation-editor-state.d.ts +56 -0
  77. package/dist/types/react/annotations/annotation-screenshot.d.ts +4 -0
  78. package/dist/types/react/annotations/annotation-targets.d.ts +33 -0
  79. package/dist/types/react/annotations/getAnnotationProps.d.ts +15 -0
  80. package/dist/types/react/annotations/styles.d.ts +3 -0
  81. package/dist/types/react/annotations/useAnnotationGeometry.d.ts +22 -0
  82. package/dist/types/react/annotations/useDataAppAnnotations.d.ts +22 -0
  83. package/dist/types/react/app-context.d.ts +3 -0
  84. package/dist/types/react/bindings.d.ts +110 -0
  85. package/dist/types/react/content.d.ts +24 -11
  86. package/dist/types/react/hooks.d.ts +29 -787
  87. package/dist/types/react/index.d.ts +31 -106
  88. package/dist/types/react/mount.d.ts +6 -4
  89. package/dist/types/react/source-owner.d.ts +2 -0
  90. package/dist/types/react/style-contract.d.ts +80 -0
  91. package/dist/types/react/style-validation.d.ts +2 -0
  92. package/dist/types/react/ui/AboutData.d.ts +9 -1
  93. package/dist/types/react/ui/AppHeader.d.ts +1 -2
  94. package/dist/types/react/ui/AppLayout.d.ts +3 -9
  95. package/dist/types/react/ui/AppToolbar.d.ts +5 -8
  96. package/dist/types/react/ui/AreaChart.d.ts +7 -0
  97. package/dist/types/react/ui/BarChart.d.ts +6 -0
  98. package/dist/types/react/ui/Button.d.ts +3 -3
  99. package/dist/types/react/ui/ChartLegend.d.ts +31 -0
  100. package/dist/types/react/ui/Checkbox.d.ts +15 -4
  101. package/dist/types/react/ui/CheckboxGroup.d.ts +7 -0
  102. package/dist/types/react/ui/{Combobox.d.ts → ChoicePicker.d.ts} +10 -15
  103. package/dist/types/react/ui/{ComparisonVisual.d.ts → Comparison.d.ts} +3 -3
  104. package/dist/types/react/ui/ComposedChart.d.ts +41 -0
  105. package/dist/types/react/ui/ComposedChartLegend.d.ts +8 -0
  106. package/dist/types/react/ui/ContentSkeleton.d.ts +2 -0
  107. package/dist/types/react/ui/DataApp.d.ts +17 -58
  108. package/dist/types/react/ui/DataAppFrame.d.ts +41 -0
  109. package/dist/types/react/ui/DataBoundary.d.ts +4 -5
  110. package/dist/types/react/ui/DataSection.d.ts +6 -18
  111. package/dist/types/react/ui/DataSectionBoundary.d.ts +30 -0
  112. package/dist/types/react/ui/DataValue.d.ts +9 -0
  113. package/dist/types/react/ui/DataWidget.d.ts +2 -1
  114. package/dist/types/react/ui/DateTimeTooltip.d.ts +1 -1
  115. package/dist/types/react/ui/DimensionPicker.d.ts +1 -1
  116. package/dist/types/react/ui/ExportControl.d.ts +1 -1
  117. package/dist/types/react/ui/FilterActions.d.ts +10 -0
  118. package/dist/types/react/ui/FilterBar.d.ts +3 -0
  119. package/dist/types/react/ui/GettingStarted.d.ts +2 -4
  120. package/dist/types/react/ui/HelpPopover.d.ts +3 -4
  121. package/dist/types/react/ui/InspectionContext.d.ts +2 -0
  122. package/dist/types/react/ui/InspectionProvider.d.ts +29 -0
  123. package/dist/types/react/ui/LineChart.d.ts +7 -0
  124. package/dist/types/react/ui/Menu.d.ts +12 -0
  125. package/dist/types/react/ui/MetricWidget.d.ts +4 -3
  126. package/dist/types/react/ui/NumberField.d.ts +27 -0
  127. package/dist/types/react/ui/NumberFilterPicker.d.ts +9 -0
  128. package/dist/types/react/ui/PieChart.d.ts +11 -0
  129. package/dist/types/react/ui/PresentStory.d.ts +2 -5
  130. package/dist/types/react/ui/RadioGroup.d.ts +18 -0
  131. package/dist/types/react/ui/RefreshControl.d.ts +1 -2
  132. package/dist/types/react/ui/ScatterChart.d.ts +17 -0
  133. package/dist/types/react/ui/SearchField.d.ts +1 -2
  134. package/dist/types/react/ui/SearchInput.d.ts +3 -1
  135. package/dist/types/react/ui/Select.d.ts +14 -0
  136. package/dist/types/react/ui/SelectionMark.d.ts +2 -1
  137. package/dist/types/react/ui/Sheet.d.ts +2 -1
  138. package/dist/types/react/ui/Skeleton.d.ts +5 -2
  139. package/dist/types/react/ui/StaticDataApp.d.ts +4 -0
  140. package/dist/types/react/ui/TableWidget.d.ts +19 -16
  141. package/dist/types/react/ui/Tabs.d.ts +6 -2
  142. package/dist/types/react/ui/TextWidget.d.ts +2 -1
  143. package/dist/types/react/ui/Tooltip.d.ts +4 -3
  144. package/dist/types/react/ui/TooltipSurface.d.ts +3 -0
  145. package/dist/types/react/ui/TrendChart.d.ts +5 -0
  146. package/dist/types/react/ui/UpdatedAt.d.ts +1 -1
  147. package/dist/types/react/ui/VisualizationWidget.d.ts +12 -13
  148. package/dist/types/react/ui/WidgetViewTabs.d.ts +1 -1
  149. package/dist/types/react/ui/chart-data.d.ts +25 -0
  150. package/dist/types/react/ui/chart-primitives.d.ts +20 -0
  151. package/dist/types/react/ui/data-context.d.ts +18 -7
  152. package/dist/types/react/ui/icons.d.ts +2 -0
  153. package/dist/types/react/ui/index.d.ts +98 -0
  154. package/dist/types/react/ui/keyboard.d.ts +6 -0
  155. package/dist/types/react/ui/metric.d.ts +1 -1
  156. package/dist/types/react/ui/presentation.d.ts +5 -1
  157. package/dist/types/react/ui/shortcuts.d.ts +14 -1
  158. package/dist/types/react/ui/useAppAppearance.d.ts +1 -1
  159. package/dist/types/react/ui/variables.d.ts +4 -2
  160. package/dist/types/react/view-controls.d.ts +3 -1
  161. package/dist/types/react/view-runtime.d.ts +29 -0
  162. package/dist/types/react/view.d.ts +21 -4
  163. package/dist/types/react/widgets.d.ts +79 -0
  164. package/dist/types/server/handler.d.ts +4 -4
  165. package/dist/worker.js +20 -737
  166. package/docs/app-authoring.md +72 -50
  167. package/docs/client.md +8 -8
  168. package/docs/contract.md +42 -20
  169. package/docs/data-context.md +91 -0
  170. package/docs/embed.md +10 -2
  171. package/docs/formatting-and-appearance.md +68 -0
  172. package/docs/hosted-apps.md +9 -15
  173. package/docs/layout.md +5 -3
  174. package/docs/react-embed.md +5 -4
  175. package/docs/react.md +22 -317
  176. package/docs/server-bun.md +1 -1
  177. package/docs/server.md +4 -4
  178. package/docs/stories-and-export.md +52 -0
  179. package/docs/styling.md +62 -0
  180. package/docs/ui-quality.md +20 -0
  181. package/docs/ui.md +196 -0
  182. package/docs/variables.md +171 -0
  183. package/docs/views.md +123 -0
  184. package/docs/widgets.md +145 -0
  185. package/examples/starter-data-app/index.tsx +115 -86
  186. package/package.json +25 -12
  187. package/dist/chunks/contract-a061yj6r.js.map +0 -12
  188. package/dist/chunks/contract-g6hky7x6.js +0 -282
  189. package/dist/chunks/contract-g6hky7x6.js.map +0 -12
  190. package/dist/chunks/contract-sm7j7k95.js.map +0 -14
  191. package/dist/chunks/contract-tf8c3qpv.js.map +0 -11
  192. package/dist/chunks/contract-txjy0en2.js.map +0 -10
  193. package/dist/chunks/contract-wz59z8pq.js +0 -8
  194. package/dist/chunks/contract-wz59z8pq.js.map +0 -10
  195. package/dist/chunks/contract-yxbjea23.js +0 -328
  196. package/dist/chunks/contract-yxbjea23.js.map +0 -12
  197. package/dist/types/react/ui/RefreshRegion.d.ts +0 -9
  198. package/dist/types/react/ui/SelectableBarChart.d.ts +0 -15
  199. package/docs/releasing.md +0 -79
  200. /package/dist/chunks/{contract-mev09s5v.js → index-mev09s5v.js} +0 -0
  201. /package/dist/chunks/{contract-mev09s5v.js.map → index-mev09s5v.js.map} +0 -0
  202. /package/dist/types/react/ui/{comparison.d.ts → metric-comparison.d.ts} +0 -0
@@ -1,61 +1,20 @@
1
- import { type ComponentProps, type ReactNode } from 'react';
2
- import type { DisclosedQuery } from '../../core/contract.js';
3
- import type { DataAppConfig } from '../../core/config.js';
4
- import type { CsvExport } from './csv-export.js';
5
- import { type DisplayedSnapshot } from '../../core/data-view.js';
6
- import { type AboutEmpty } from './AboutData.js';
7
- import { AppLayout } from './AppLayout.js';
8
- import { type AppToolbarProps } from './AppToolbar.js';
9
- import type { DataContext } from './data-context.js';
10
- import type { BoundStory } from './story.js';
11
- import { type SectionResult } from './DataSection.js';
12
- import type { EmptyContent } from './presentation.js';
13
- type DataAppBaseProps = {
14
- config: DataAppConfig;
15
- dataContext: DataContext;
16
- aboutEmpty?: AboutEmpty;
17
- description?: ReactNode;
18
- /** Display names only; config.scope remains the connection identity. */
19
- scopeLabels?: {
20
- organization?: string;
21
- environment?: string;
1
+ import { type RegisteredBinding } from '../bindings.js';
2
+ import type { DisplayedSnapshot } from '../../core/data-view.js';
3
+ import { type ExportDataset } from '../bindings.js';
4
+ import type { StoryFinding } from './story.js';
5
+ import { type DataAppBaseProps } from './DataAppFrame.js';
6
+ import { type DeclaredView } from '../view-runtime.js';
7
+ export type DataAppProps<Data, Input = unknown> = Omit<DataAppBaseProps, 'dataContext'> & {
8
+ view: DeclaredView<Data, Input> & {
9
+ scope(snapshot: DisplayedSnapshot<Data, Input>): string;
22
10
  };
23
- toolbarActions?: ReactNode;
24
- footerActions?: ReactNode;
25
- layoutProps?: Omit<ComponentProps<typeof AppLayout>, 'children' | 'footerActions'>;
11
+ story: (snapshot: DisplayedSnapshot<Data, Input>) => readonly (Omit<StoryFinding, 'evidence'> & {
12
+ evidence: RegisteredBinding;
13
+ })[];
14
+ datasets: readonly [
15
+ ExportDataset<Data, Input>,
16
+ ...ExportDataset<Data, Input>[]
17
+ ];
26
18
  };
27
- export type DataAppRequest<Data, Input> = SectionResult<Data, Input> & {
28
- queries?: DisclosedQuery[];
29
- refresh?: AppToolbarProps['refresh'];
30
- empty: EmptyContent;
31
- controls?: ReactNode;
32
- };
33
- export type DataAppProps<Data = unknown, Input = unknown> = DataAppBaseProps & ({
34
- request: DataAppRequest<Data, Input>;
35
- /** Findings are always derived from the result currently visible to the reader. */
36
- story: BoundStory<Data, Input>;
37
- /** Every analytical view exports every distinct dataset in its displayed result. */
38
- csvExport: (snapshot: DisplayedSnapshot<Data, Input>) => CsvExport;
39
- children: (data: Data, displayedInput: Input) => ReactNode;
40
- loading?: ReactNode;
41
- label?: string;
42
- queries?: never;
43
- refresh?: never;
44
- variables?: never;
45
- } | {
46
- request?: never;
47
- story?: never;
48
- csvExport?: CsvExport;
49
- children: ReactNode;
50
- queries?: DisclosedQuery[];
51
- refresh?: AppToolbarProps['refresh'];
52
- variables?: ReactNode;
53
- loading?: never;
54
- empty?: never;
55
- label?: never;
56
- });
57
- /** Owns the page title, header, gutter, and width; body content uses section headings.
58
- * The primary request owns controls, empty state, displayed input, refresh, and inspection.
59
- * Without a request, the shell accepts authored children for setup or static views. */
19
+ /** Executes the primary view and owns its controls, inspection, exports, and stories. */
60
20
  export declare function DataApp<Data, Input>(props: DataAppProps<Data, Input>): import("react").JSX.Element;
61
- export {};
@@ -0,0 +1,41 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { DisclosedQuery } from '../../core/contract.js';
3
+ import type { CsvExport } from './csv-export.js';
4
+ import { type DisplayedSnapshot } from '../../core/data-view.js';
5
+ import type { DataContext } from './data-context.js';
6
+ import type { BoundStory } from './story.js';
7
+ import type { SectionResult } from './DataSectionBoundary.js';
8
+ export type DataAppBaseProps = {
9
+ children: ReactNode;
10
+ dataContext: DataContext;
11
+ /** Override the declared subtitle; null hides it. */
12
+ description?: ReactNode;
13
+ toolbarActions?: ReactNode;
14
+ footerActions?: ReactNode;
15
+ };
16
+ export type DataAppRequest<Data, Input> = SectionResult<Data, Input> & {
17
+ queries?: DisclosedQuery[];
18
+ /** Actual request activity, including retries with retained data. */
19
+ refreshing?: boolean;
20
+ cancel?: () => unknown;
21
+ controls?: ReactNode;
22
+ };
23
+ export type StaticDataAppProps = DataAppBaseProps & {
24
+ csvExport?: CsvExport;
25
+ queries?: DisclosedQuery[];
26
+ };
27
+ export type DataAppProps<Data = unknown, Input = unknown> = (DataAppBaseProps & {
28
+ request: DataAppRequest<Data, Input>;
29
+ /** Findings are always derived from the result currently visible to the reader. */
30
+ story: BoundStory<Data, Input>;
31
+ /** Export every distinct dataset in the displayed result. */
32
+ csvExport: (snapshot: DisplayedSnapshot<Data, Input>) => CsvExport;
33
+ queries?: never;
34
+ }) | (StaticDataAppProps & {
35
+ request?: never;
36
+ story?: never;
37
+ });
38
+ /** Owns the page title, header, gutter, and width; body content uses section headings.
39
+ * The primary request binds the toolbar, controls, refresh, and inspection.
40
+ * Children always render; compose DataSection boundaries around independently loading content. */
41
+ export declare function DataAppFrame<Data, Input>(props: DataAppProps<Data, Input>): import("react").JSX.Element;
@@ -2,14 +2,13 @@ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  import type { DataView } from '../../core/data-view.js';
3
3
  export type DataBoundaryProps<T, Input = unknown> = {
4
4
  view: DataView<T, Input>;
5
- loading: ReactNode;
6
- empty: ReactNode;
5
+ loadingFallback: ReactNode;
6
+ emptyFallback: ReactNode;
7
7
  error: (error: Error) => ReactNode;
8
8
  staleError?: (error: Error) => ReactNode;
9
9
  notice?: 'inline' | 'none';
10
- dimOnUpdate?: boolean;
11
10
  children: (data: T, displayedInput: Input) => ReactNode;
12
11
  } & Omit<ComponentPropsWithRef<'div'>, 'children'>;
13
12
  /** Render one request state at a time. Prior content remains readable during an update.
14
- * Local boundaries can opt into an inline notice and delayed dimming. */
15
- export declare function DataBoundary<T, Input>({ view, loading, empty, error, staleError, notice, dimOnUpdate, children, className, ...props }: DataBoundaryProps<T, Input>): import("react").JSX.Element;
13
+ * Feedback ownership is supplied by the containing section. */
14
+ export declare function DataBoundary<T, Input>({ view, loadingFallback, emptyFallback, error, staleError, notice, children, className, ...props }: DataBoundaryProps<T, Input>): import("react").JSX.Element;
@@ -1,26 +1,14 @@
1
- import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- import type { DataView } from '../../core/data-view.js';
1
+ import { type ViewContent } from '../content.js';
2
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
3
3
  import type { EmptyContent } from './presentation.js';
4
- export type SectionResult<Data, Input> = {
5
- view: DataView<Data, Input>;
6
- refetch: () => unknown;
7
- };
8
4
  export type DataSectionProps<Data, Input = unknown> = {
9
- result: SectionResult<Data, Input>;
10
- empty: EmptyContent;
11
- children: (data: Data, displayedInput: Input) => ReactNode;
12
- /** Placeholder layout for an initial request; use the ready view's grid without copied values. */
13
- loading?: ReactNode;
5
+ content: ViewContent<Data, Input>;
6
+ emptyFallback?: EmptyContent;
14
7
  error?: {
15
8
  title: ReactNode;
16
9
  description?: ReactNode;
17
10
  onRetry?: () => void;
18
11
  };
19
12
  label?: string;
20
- /** DataApp suppresses this local notice in favor of its page-level toast. */
21
- notice?: 'inline' | 'none';
22
- dimOnUpdate?: boolean;
23
- } & Omit<ComponentPropsWithRef<'div'>, 'children'>;
24
- /** One request boundary for any number of cards. `DataBoundary` exposes the lower-level
25
- * view-state slots for custom composition. */
26
- export declare function DataSection<Data, Input>({ result, children, empty, loading, error, label, notice, dimOnUpdate, ...props }: DataSectionProps<Data, Input>): import("react").JSX.Element;
13
+ } & Omit<ComponentPropsWithRef<'div'>, 'children' | 'content'>;
14
+ export declare function DataSection<Data, Input>({ content, ...presentation }: DataSectionProps<Data, Input>): import("react").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import type { DataView } from '../../core/data-view.js';
3
+ import type { EmptyContent } from './presentation.js';
4
+ export type SectionResult<Data, Input> = {
5
+ view: DataView<Data, Input>;
6
+ refetch: () => unknown;
7
+ };
8
+ export type DataSectionProps<Data, Input = unknown> = {
9
+ children: (data: Data, displayedInput: Input) => ReactNode;
10
+ /** Placeholder layout for an initial request; use the ready view's grid without copied values. */
11
+ loadingFallback: ReactNode;
12
+ error?: {
13
+ title: ReactNode;
14
+ description?: ReactNode;
15
+ onRetry?: () => void;
16
+ };
17
+ label?: string;
18
+ notice?: 'none' | 'inline';
19
+ } & ({
20
+ result: SectionResult<Data, Input> & {
21
+ emptyFallback: EmptyContent;
22
+ };
23
+ emptyFallback?: EmptyContent;
24
+ } | {
25
+ result: SectionResult<Data, Input>;
26
+ emptyFallback: EmptyContent;
27
+ }) & Omit<ComponentPropsWithRef<'div'>, 'children'>;
28
+ /** One request boundary for any number of cards. `DataBoundary` exposes the lower-level
29
+ * view-state slots internally. The primary DataApp request uses page-level feedback. */
30
+ export declare function DataSectionBoundary<Data, Input>({ result, children, emptyFallback, loadingFallback, error, label, notice: feedback, ...props }: DataSectionProps<Data, Input>): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import type { DataReading } from '../../core/reading.js';
3
+ export type DataValueProps<Value> = {
4
+ reading: DataReading<Value>;
5
+ loadingFallback: ReactNode;
6
+ children: (value: Value) => ReactNode;
7
+ } & Omit<ComponentPropsWithRef<'span'>, 'children'>;
8
+ /** Bind inline content to displayed data. Keep static wording outside this span. */
9
+ export declare function DataValue<Value>({ reading, loadingFallback, children, ...props }: DataValueProps<Value>): import("react").JSX.Element;
@@ -4,6 +4,7 @@ import type { EmptyContent, BoundWidgetReading } from './presentation.js';
4
4
  import type { WidgetEvidence } from './WidgetEvidence.js';
5
5
  type DataWidgetBaseProps = {
6
6
  title: ReactNode;
7
+ annotationId?: string;
7
8
  count?: number;
8
9
  description?: ReactNode;
9
10
  evidence?: WidgetEvidence;
@@ -22,7 +23,7 @@ export type DataWidgetProps<Data = unknown> = DataWidgetBaseProps & ((BoundWidge
22
23
  reading?: never;
23
24
  isEmpty?: never;
24
25
  skeleton?: never;
25
- empty?: EmptyContent;
26
+ emptyFallback?: EmptyContent;
26
27
  children: ReactNode;
27
28
  });
28
29
  export declare function DataWidget<Data>(props: DataWidgetProps<Data>): import("react").JSX.Element;
@@ -6,4 +6,4 @@ export type DateTimeTooltipProps = {
6
6
  children?: ReactNode;
7
7
  } & Omit<HelpPopoverProps, 'trigger' | 'triggerLabel' | 'label' | 'children'>;
8
8
  /** Pass the viewer's account time zone when known; the popover also exposes UTC and Unix time. */
9
- export declare function DateTimeTooltip({ date, timeZone, children, triggerClassName, panelClassName, ...props }: DateTimeTooltipProps): import("react").JSX.Element;
9
+ export declare function DateTimeTooltip({ date, timeZone, children, panelProps, ...props }: DateTimeTooltipProps): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import type { DimensionOption, DimensionSelection, DimensionValue, DimensionVariable } from '../../core/dimension.js';
2
- /** Adapts the typed dimension contract to the shared Combobox control. */
2
+ /** Adapts the typed dimension contract to the shared ChoicePicker control. */
3
3
  export declare function DimensionPicker<T extends DimensionValue>({ filter, value, onChange, options: suppliedOptions, loading, error, onRetry, }: {
4
4
  filter: DimensionVariable<T>;
5
5
  value: DimensionSelection<T>;
@@ -1,4 +1,4 @@
1
1
  import { type CsvExport } from './csv-export.js';
2
2
  export declare function ExportControl({ csv }: {
3
- csv: CsvExport;
3
+ csv?: CsvExport;
4
4
  }): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export type FilterActionsProps = {
2
+ onClear?: () => void;
3
+ } & ({
4
+ onApply: () => void;
5
+ onCancel: () => void;
6
+ } | {
7
+ onApply?: never;
8
+ onCancel?: never;
9
+ });
10
+ export declare function FilterActions({ onClear, onApply, onCancel, }: FilterActionsProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ export type FilterBarProps = ComponentPropsWithRef<'div'>;
3
+ export declare function FilterBar({ className, role, 'aria-label': label, ...props }: FilterBarProps): import("react").JSX.Element;
@@ -1,8 +1,6 @@
1
- import type { DataAppConfig } from '../../core/config.js';
2
1
  import type { DataContext } from './data-context.js';
3
2
  /** Query-backed connection state and next steps for a newly created app. Mount within
4
- * `DataAppProvider` and register `connection: connectionCheck()` on the server. */
5
- export declare function GettingStarted({ config, dataContext, }: {
6
- config: DataAppConfig;
3
+ * `DataAppProvider` and register `connection: connectionCheck(app.queries)` on the server. */
4
+ export declare function GettingStarted({ dataContext }: {
7
5
  dataContext: DataContext;
8
6
  }): import("react").JSX.Element;
@@ -1,14 +1,13 @@
1
1
  import { type ComponentPropsWithRef, type ReactNode, type RefObject } from 'react';
2
2
  import { type Placement } from '@floating-ui/react';
3
- export type HelpPopoverTriggerProps = Omit<ComponentPropsWithRef<'button'>, 'children' | 'type'>;
3
+ import type { DataAppStyleHooks } from '../style-contract.js';
4
+ export type HelpPopoverTriggerProps = Omit<ComponentPropsWithRef<'button'>, 'children' | 'type'> & DataAppStyleHooks;
4
5
  export type HelpPopoverPanelProps = Omit<ComponentPropsWithRef<'section'>, 'children' | 'role'>;
5
6
  export type HelpPopoverProps = {
6
7
  trigger: ReactNode;
7
8
  triggerLabel: string;
8
9
  label: string;
9
10
  children: ReactNode;
10
- triggerClassName?: string;
11
- panelClassName?: string;
12
11
  placement?: Placement;
13
12
  portalRoot?: RefObject<HTMLElement | null>;
14
13
  triggerProps?: HelpPopoverTriggerProps;
@@ -19,4 +18,4 @@ export type HelpPopoverProps = {
19
18
  /** A supplemental explanation that opens on click, Enter, or a deliberate mouse hover. Tabbing
20
19
  * past the trigger does not open it, and a click keeps a hover-opened panel in place.
21
20
  * triggerProps and panelProps target its two surfaces. */
22
- export declare function HelpPopover({ trigger, triggerLabel, label, children, triggerClassName, panelClassName, portalRoot, triggerProps, panelProps, placement, open: openProp, onOpenChange, }: HelpPopoverProps): import("react").JSX.Element;
21
+ export declare function HelpPopover({ trigger, triggerLabel, label, children, portalRoot, triggerProps, panelProps, placement, open: openProp, onOpenChange, }: HelpPopoverProps): import("react").JSX.Element;
@@ -1,8 +1,10 @@
1
+ import type { DataView } from '../../core/data-view.js';
1
2
  import type { DisclosedQuery } from '../../core/contract.js';
2
3
  import type { AboutEmpty } from './AboutData.js';
3
4
  import type { DataContext } from './data-context.js';
4
5
  export type InspectionDefaults = {
5
6
  dataContext: DataContext;
7
+ primaryView?: DataView<unknown, unknown>;
6
8
  empty?: AboutEmpty;
7
9
  queries?: DisclosedQuery[];
8
10
  };
@@ -0,0 +1,29 @@
1
+ import { type ReactNode, type RefObject } from 'react';
2
+ import { type AboutDataProps, type AboutTab } from './AboutData.js';
3
+ type Inspection = {
4
+ key: string;
5
+ id: string;
6
+ props: AboutDataProps;
7
+ trigger: RefObject<HTMLButtonElement | null>;
8
+ };
9
+ type Selection = {
10
+ inspection: Inspection;
11
+ open: boolean;
12
+ tab: AboutTab;
13
+ } | null;
14
+ export declare const InspectionOwner: import("react").Context<{
15
+ subscribe(this: void, listener: () => void): () => void;
16
+ snapshot: () => Selection;
17
+ sync: () => void;
18
+ register(inspection: Inspection): void;
19
+ remove(key: string): void;
20
+ open(inspection: Inspection): void;
21
+ close(key: string): void;
22
+ controlled(inspection: Inspection, open: boolean | undefined): void;
23
+ selectTab(this: void, tab: AboutTab): void;
24
+ } | null>;
25
+ export declare const InspectionVisual: import("react").Context<boolean>;
26
+ export declare function InspectionProvider({ children }: {
27
+ children: ReactNode;
28
+ }): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
29
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { ChartItem, ValueChartProps } from './chart-data.js';
2
+ export type LineChartItem = ChartItem;
3
+ export type LineChartProps = ValueChartProps;
4
+ /** Equally spaced finite samples in supplied order; fill missing periods explicitly.
5
+ * Supports negative values, single points, and horizontal scrolling for long series.
6
+ * Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
7
+ export declare function LineChart(props: LineChartProps): import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ import { MenuTrigger, MenuSection, Popover, Separator, type MenuProps, type MenuItemProps, type MenuTriggerProps } from 'react-aria-components';
3
+ export { MenuTrigger, MenuSection };
4
+ export { PressButton as MenuButton } from './Button.js';
5
+ export type { MenuProps, MenuItemProps, MenuTriggerProps };
6
+ export type MenuPopoverProps = ComponentPropsWithRef<typeof Popover>;
7
+ /** Anchored popup for a Menu; the surrounding MenuTrigger owns focus and dismissal. */
8
+ export declare function MenuPopover({ className, placement, ...props }: MenuPopoverProps): import("react").JSX.Element;
9
+ /** Actions by default; single selection creates radio items, multiple creates checkbox items. */
10
+ export declare function Menu<T extends object>({ className, ...props }: MenuProps<T>): import("react").JSX.Element;
11
+ export declare function MenuItem<T extends object>({ className, children, ...props }: MenuItemProps<T>): import("react").JSX.Element;
12
+ export declare function MenuSeparator({ className, ...props }: ComponentPropsWithRef<typeof Separator>): import("react").JSX.Element;
@@ -1,17 +1,17 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- import { type WidgetStatus } from './RequestHint.js';
2
+ import type { WidgetStatus } from './RequestHint.js';
3
3
  import type { WidgetEvidence } from './WidgetEvidence.js';
4
- import { type MetricComparison } from './comparison.js';
4
+ import { type MetricComparison } from './metric-comparison.js';
5
5
  import { type MetricFormat } from '../../core/format.js';
6
6
  import type { MetricReading } from '../../core/reading.js';
7
7
  import { type MetricDefinition } from './metric.js';
8
8
  type MetricWidgetBaseProps = {
9
9
  label: string;
10
+ annotationId?: string;
10
11
  description?: ReactNode;
11
12
  comparison?: MetricComparison;
12
13
  evidence?: WidgetEvidence;
13
14
  action?: ReactNode;
14
- insight?: ReactNode;
15
15
  status?: WidgetStatus;
16
16
  visual?: ReactNode;
17
17
  } & Omit<ComponentPropsWithRef<'div'>, 'about' | 'children'>;
@@ -31,6 +31,7 @@ type UnboundMetricWidgetProps = MetricWidgetBaseProps & ({
31
31
  value?: never;
32
32
  format?: never;
33
33
  })));
34
+ /** VisualizationWidget with a formatted metric, optional comparison, and evidence. */
34
35
  export type MetricWidgetProps = UnboundMetricWidgetProps | (Omit<MetricWidgetBaseProps, 'label' | 'comparison' | 'evidence'> & {
35
36
  metric: MetricDefinition;
36
37
  reading: MetricReading;
@@ -0,0 +1,27 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ import { NumberField as AriaNumberField } from 'react-aria-components';
3
+ export type NumberFieldProps = Omit<ComponentPropsWithRef<typeof AriaNumberField>, 'value' | 'onChange' | 'className'> & {
4
+ label: string;
5
+ value: number | null;
6
+ onChange: (value: number | null) => void;
7
+ className?: string;
8
+ };
9
+ /** Localized numeric entry. Empty input is null rather than zero. */
10
+ export declare function NumberField({ label, value, onChange, className, ...props }: NumberFieldProps): import("react").JSX.Element;
11
+ export type NumberRange = {
12
+ min?: number;
13
+ max?: number;
14
+ };
15
+ export type NumberRangeFieldProps = {
16
+ label: string;
17
+ value: NumberRange;
18
+ onChange: (value: NumberRange) => void;
19
+ /** Reports whether the current draft interval can be committed. */
20
+ onValidityChange?: (valid: boolean) => void;
21
+ min?: number;
22
+ max?: number;
23
+ disabled?: boolean;
24
+ className?: string;
25
+ };
26
+ /** Commit valid intervals; retain invalid draft bounds so users can correct them. */
27
+ export declare function NumberRangeField({ label, value, onChange, onValidityChange, min, max, disabled, className, }: NumberRangeFieldProps): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { type NumberFilter, type NumberSelection } from '../../core/filters.js';
2
+ export type NumberFilterPickerProps = {
3
+ filter: NumberFilter;
4
+ value: NumberSelection;
5
+ onChange: (value: NumberSelection) => void;
6
+ disabled?: boolean;
7
+ };
8
+ /** Edit a numeric predicate in a panel. Apply commits one complete value; dismissing discards the draft. */
9
+ export declare function NumberFilterPicker({ filter, value, onChange, disabled, }: NumberFilterPickerProps): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { ChartItem, ValueChartProps } from './chart-data.js';
2
+ export type PieChartItem = ChartItem;
3
+ export type PieChartProps = ValueChartProps & {
4
+ /** Omit the built-in key when composing a separate ChartLegend. */
5
+ showLegend?: boolean;
6
+ };
7
+ /** Nonnegative, mutually exclusive parts; shares use the sum of supplied items.
8
+ * Include Other to represent the whole. Zero values remain in the legend; all-zero
9
+ * data shows an empty circle. Colors follow item order. Compose inside VisualizationWidget;
10
+ * hover/touch tooltips coordinate slice and legend emphasis without caller state. */
11
+ export declare function PieChart({ items, unit, ariaLabel, showLegend, formatValue, }: PieChartProps): import("react").JSX.Element;
@@ -20,14 +20,11 @@ export type PresentStoryProps = {
20
20
  scope?: ReactNode;
21
21
  dataContext: DataContext;
22
22
  theme?: ThemeController;
23
- launcherProps?: Omit<ComponentPropsWithRef<'span'>, 'children'>;
24
- dialogProps?: Omit<ComponentPropsWithRef<'dialog'>, 'children' | 'aria-labelledby' | 'open'>;
25
23
  headerActions?: ReactNode;
26
24
  footer?: ReactNode;
27
25
  } & Omit<ComponentPropsWithRef<'button'>, 'title'>;
28
26
  /**
29
27
  * Uses an already loaded snapshot. Navigation is stored in `?present=1&step=`, and step
30
- * inspection uses `?about=`. `launcherProps` targets the outer span; `dialogProps` targets the
31
- * modal.
28
+ * inspection uses `?about=`. The presentation owns its modal structure.
32
29
  */
33
- export declare function PresentStory({ title, findings, empty, scope, dataContext, theme, launcherProps, dialogProps, headerActions, footer, children, className, onClick, disabled, ref, ...props }: PresentStoryProps): import("react").JSX.Element;
30
+ export declare function PresentStory({ title, findings, empty, scope, dataContext, theme, headerActions, footer, children, className, onClick, disabled, ref, ...props }: PresentStoryProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import { RadioGroup as AriaRadioGroup, Radio as AriaRadio } from 'react-aria-components';
3
+ import { type ChoiceOption } from '../../core/variables.js';
4
+ export type RadioGroupProps = Omit<ComponentPropsWithRef<typeof AriaRadioGroup>, 'className' | 'children'> & {
5
+ children: ReactNode;
6
+ label: string;
7
+ className?: string;
8
+ };
9
+ export declare function RadioGroup({ label, className, children, ...props }: RadioGroupProps): import("react").JSX.Element;
10
+ export type RadioProps = Omit<ComponentPropsWithRef<typeof AriaRadio>, 'className'> & {
11
+ className?: string;
12
+ };
13
+ export declare function Radio({ className, children, ...props }: RadioProps): import("react").JSX.Element;
14
+ export type SegmentedControlProps = Omit<RadioGroupProps, 'children'> & {
15
+ options: readonly ChoiceOption[];
16
+ };
17
+ /** A compact radio group; arrow keys follow standard radio selection behavior. */
18
+ export declare function SegmentedControl({ options, className, ...props }: SegmentedControlProps): import("react").JSX.Element;
@@ -3,8 +3,7 @@ export type RefreshControlProps = {
3
3
  refreshing: boolean;
4
4
  children: ReactNode;
5
5
  label?: string;
6
- statusProps?: Omit<ComponentPropsWithRef<'div'>, 'children' | 'role'>;
7
6
  status?: ReactNode;
8
7
  } & Omit<ComponentPropsWithRef<'div'>, 'children'>;
9
8
  /** Show refresh progress just before its action after a short delay. */
10
- export declare function RefreshControl({ refreshing, children, label, statusProps, status, className, ...props }: RefreshControlProps): import("react").JSX.Element;
9
+ export declare function RefreshControl({ refreshing, children, label, status, className, ...props }: RefreshControlProps): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import type { ScatterChartItem } from './chart-data.js';
2
+ export type { ScatterChartItem } from './chart-data.js';
3
+ export type ScatterChartProps = {
4
+ items: readonly ScatterChartItem[];
5
+ xLabel: string;
6
+ yLabel: string;
7
+ xUnit: string;
8
+ yUnit: string;
9
+ ariaLabel: string;
10
+ formatX?: (value: number) => string;
11
+ formatY?: (value: number) => string;
12
+ };
13
+ /** Independent finite X/Y observations on linear axes that include zero.
14
+ * Negative and constant coordinates are supported. Axis labels and units describe
15
+ * tooltips as well as the plot; formatX/formatY format ticks and tooltip values.
16
+ * Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
17
+ export declare function ScatterChart({ items, xLabel, yLabel, xUnit, yUnit, ariaLabel, formatX, formatY, }: ScatterChartProps): import("react").JSX.Element;
@@ -12,11 +12,10 @@ export type SearchFieldProps = {
12
12
  busy?: boolean;
13
13
  resetValue?: string;
14
14
  inputProps?: Omit<ComponentPropsWithRef<'input'>, 'type' | 'value' | 'children'>;
15
- clearButtonProps?: Omit<ComponentPropsWithRef<'button'>, 'type' | 'children'>;
16
15
  children?: ReactNode;
17
16
  } & Omit<ComponentPropsWithRef<'form'>, 'onChange' | 'onSubmit' | 'children'>;
18
17
  /**
19
18
  * The caller owns filtering, URL state, and whether search runs while typing or on submit.
20
19
  * Escape and Clear reset the query.
21
20
  */
22
- export declare function SearchField({ label, value, onChange, onSubmit, placeholder, showLabel, size, description, status, busy, resetValue, inputProps, clearButtonProps, children, className, ...props }: SearchFieldProps): import("react").JSX.Element;
21
+ export declare function SearchField({ label, value, onChange, onSubmit, placeholder, showLabel, size, description, status, busy, resetValue, inputProps, children, className, ...props }: SearchFieldProps): import("react").JSX.Element;
@@ -1,7 +1,9 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  /** One search control surface for picker search and table/page search. */
3
- export declare function SearchInput({ size, endAction, loading, className, onKeyDown, ...props }: Omit<ComponentPropsWithRef<'input'>, 'size' | 'children'> & {
3
+ export declare function SearchInput({ focusRing, size, endAction, loading, className, ...props }: Omit<ComponentPropsWithRef<'input'>, 'size' | 'children'> & {
4
4
  size?: 'default' | 'compact';
5
+ /** Picker search delegates focus indication to the active option. */
6
+ focusRing?: boolean;
5
7
  endAction?: ReactNode;
6
8
  /** Replaces the search glyph in its existing space; input and results remain usable. */
7
9
  loading?: boolean;
@@ -0,0 +1,14 @@
1
+ import { type ChoiceOption } from '../../core/variables.js';
2
+ export type SelectProps = {
3
+ label: string;
4
+ options: readonly ChoiceOption[];
5
+ value: string;
6
+ onChange: (value: string) => void;
7
+ disabled?: boolean;
8
+ required?: boolean;
9
+ name?: string;
10
+ id?: string;
11
+ className?: string;
12
+ };
13
+ /** Labeled single selection with keyboard navigation and a styled listbox. */
14
+ export declare function Select({ label, options, value, onChange, disabled, required, className, ...props }: SelectProps): import("react").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  /** Decorative selection indicator; the containing control owns its accessible semantics. */
2
- export declare function SelectionMark({ selected }: {
2
+ export declare function SelectionMark({ selected, multiple, }: {
3
3
  selected: boolean;
4
+ multiple?: boolean;
4
5
  }): import("react").JSX.Element;
@@ -9,10 +9,11 @@ export type SheetProps = {
9
9
  headerActions?: ReactNode;
10
10
  footer?: ReactNode;
11
11
  wide?: boolean;
12
+ placement?: 'side' | 'center';
12
13
  returnFocus?: RefObject<HTMLElement | null>;
13
14
  } & SheetDialogProps;
14
15
  /**
15
16
  * Uses the native dialog top layer and focus trap. Closing keeps the modal mounted until its
16
17
  * exit transition completes.
17
18
  */
18
- export declare function Sheet({ open, onOpenChange, title, description, children, headerActions, footer, wide, returnFocus, className, onCancel, onClose, onClick, onTransitionEnd, ref, ...props }: SheetProps): import("react").JSX.Element;
19
+ export declare function Sheet({ open, onOpenChange, title, description, children, headerActions, footer, wide, placement, returnFocus, className, onCancel, onClose, onClick, onTransitionEnd, ref, ...props }: SheetProps): import("react").JSX.Element;
@@ -1,5 +1,8 @@
1
1
  import type { ComponentPropsWithRef } from 'react';
2
- export type SkeletonProps = Omit<ComponentPropsWithRef<'span'>, 'children' | 'aria-hidden'>;
2
+ export type SkeletonProps = Omit<ComponentPropsWithRef<'span'>, 'children' | 'aria-hidden'> & {
3
+ /** Align a text-sized placeholder with surrounding prose. */
4
+ inline?: boolean;
5
+ };
3
6
  /** Decorative loading placeholder that fades in only when loading takes a moment.
4
7
  * Put the accessible status on its container. */
5
- export declare function Skeleton({ className, ...props }: SkeletonProps): import("react").JSX.Element;
8
+ export declare function Skeleton({ inline, className, ...props }: SkeletonProps): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { type StaticDataAppProps } from './DataAppFrame.js';
2
+ export type DataAppProps = StaticDataAppProps;
3
+ /** Setup and static screens; fetched data uses the declared-view DataApp. */
4
+ export declare function DataApp(props: DataAppProps): import("react").JSX.Element;