@altertable/data-app 0.62.0 → 0.63.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.
- package/AGENTS.md +4 -34
- package/CONTRIBUTING.md +63 -75
- package/README.md +14 -38
- package/dist/chunks/{contract-xjv197ck.js → contract-8wdybxj7.js} +8 -8
- package/dist/chunks/{contract-xjv197ck.js.map → contract-8wdybxj7.js.map} +3 -3
- package/dist/chunks/{contract-ryyf6dme.js → contract-cxr9t12b.js} +2 -5
- package/dist/chunks/contract-cxr9t12b.js.map +10 -0
- package/dist/chunks/contract-farfe948.js.map +2 -2
- package/dist/chunks/contract-mev09s5v.js.map +2 -2
- package/dist/chunks/{contract-3bnrf5pf.js → contract-tf8c3qpv.js} +11 -3
- package/dist/chunks/contract-tf8c3qpv.js.map +11 -0
- package/dist/chunks/{contract-4vrw9zk9.js → contract-tkc552ze.js} +69 -60
- package/dist/chunks/contract-tkc552ze.js.map +12 -0
- package/dist/chunks/{contract-nt819swq.js → contract-wd8qe3mt.js} +6 -1
- package/dist/chunks/{contract-nt819swq.js.map → contract-wd8qe3mt.js.map} +3 -3
- package/dist/chunks/contract-wz59z8pq.js.map +1 -1
- package/dist/chunks/{contract-rrm7s5zp.js → contract-zr3jd7mr.js} +5 -5
- package/dist/chunks/contract-zr3jd7mr.js.map +12 -0
- package/dist/client/index.js +7 -8
- package/dist/client/index.js.map +1 -1
- package/dist/core/contract.js +2 -2
- package/dist/embed/index.js +9 -11
- package/dist/embed/index.js.map +2 -2
- package/dist/local.js +7 -31
- package/dist/local.js.map +5 -7
- package/dist/react/embed/index.js +2 -3
- package/dist/react/embed/index.js.map +2 -2
- package/dist/react/index.js +5437 -221
- package/dist/react/index.js.map +70 -65
- package/dist/server.js +7 -31
- package/dist/server.js.map +5 -7
- package/dist/types/client/data-client.d.ts +33 -0
- package/dist/types/client/index.d.ts +5 -41
- package/dist/types/client/location.d.ts +4 -6
- package/dist/types/client/navigation.d.ts +2 -1
- package/dist/types/core/bridge.d.ts +2 -8
- package/dist/types/core/config.d.ts +1 -1
- package/dist/types/core/contract.d.ts +9 -56
- package/dist/types/core/format.d.ts +0 -1
- package/dist/types/core/messages.d.ts +5 -30
- package/dist/types/core/navigation.d.ts +11 -0
- package/dist/types/core/operation-types.d.ts +76 -0
- package/dist/types/core/operation.d.ts +2 -8
- package/dist/types/core/variables.d.ts +2 -2
- package/dist/types/embed/host.d.ts +5 -3
- package/dist/types/embed/index.d.ts +0 -1
- package/dist/types/embed/source.d.ts +2 -9
- package/dist/types/react/content.d.ts +3 -3
- package/dist/types/react/hooks.d.ts +65 -64
- package/dist/types/react/index.d.ts +135 -2
- package/dist/types/react/injectStyles.d.ts +7 -0
- package/dist/types/react/shellStyles.d.ts +3 -0
- package/dist/types/react/styles.d.ts +8 -0
- package/dist/types/react/ui/AboutData.d.ts +0 -1
- package/dist/types/react/ui/AppFooter.d.ts +0 -1
- package/dist/types/react/ui/AppHeader.d.ts +0 -1
- package/dist/types/react/ui/AppLayout.d.ts +0 -1
- package/dist/types/react/ui/AppScope.d.ts +0 -1
- package/dist/types/react/ui/AppToolbar.d.ts +0 -1
- package/dist/types/react/ui/Breakdown.d.ts +0 -1
- package/dist/types/react/ui/Button.d.ts +0 -1
- package/dist/types/react/ui/Checkbox.d.ts +0 -1
- package/dist/types/react/ui/Combobox.d.ts +0 -1
- package/dist/types/react/ui/ComparisonVisual.d.ts +0 -1
- package/dist/types/react/ui/ContentSkeleton.d.ts +2 -5
- package/dist/types/react/ui/DataApp.d.ts +2 -2
- package/dist/types/react/ui/DataAppSkeleton.d.ts +0 -1
- package/dist/types/react/ui/DataBoundary.d.ts +0 -1
- package/dist/types/react/ui/DataSection.d.ts +2 -4
- package/dist/types/react/ui/DataTable.d.ts +2 -3
- package/dist/types/react/ui/DataViewToast.d.ts +0 -1
- package/dist/types/react/ui/DataWidget.d.ts +4 -14
- package/dist/types/react/ui/DateRangePicker.d.ts +0 -1
- package/dist/types/react/ui/DateTimeTooltip.d.ts +0 -1
- package/dist/types/react/ui/EmptyState.d.ts +2 -5
- package/dist/types/react/ui/GettingStarted.d.ts +0 -1
- package/dist/types/react/ui/GlossaryDefinition.d.ts +0 -1
- package/dist/types/react/ui/GlossaryExplanation.d.ts +0 -1
- package/dist/types/react/ui/GradientScroll.d.ts +0 -1
- package/dist/types/react/ui/Grid.d.ts +0 -1
- package/dist/types/react/ui/HelpPopover.d.ts +0 -2
- package/dist/types/react/ui/Kbd.d.ts +0 -1
- package/dist/types/react/ui/LiveControl.d.ts +0 -1
- package/dist/types/react/ui/MetricWidget.d.ts +0 -2
- package/dist/types/react/ui/PeriodSummary.d.ts +0 -1
- package/dist/types/react/ui/PresentStory.d.ts +0 -1
- package/dist/types/react/ui/QueryList.d.ts +0 -1
- package/dist/types/react/ui/Ranking.d.ts +0 -1
- package/dist/types/react/ui/RefreshControl.d.ts +0 -1
- package/dist/types/react/ui/RefreshRegion.d.ts +0 -1
- package/dist/types/react/ui/RequestHint.d.ts +0 -1
- package/dist/types/react/ui/SearchField.d.ts +0 -1
- package/dist/types/react/ui/SearchInput.d.ts +0 -1
- package/dist/types/react/ui/SearchMatch.d.ts +0 -1
- package/dist/types/react/ui/SelectableBarChart.d.ts +0 -1
- package/dist/types/react/ui/SelectionMark.d.ts +0 -1
- package/dist/types/react/ui/Sheet.d.ts +0 -1
- package/dist/types/react/ui/Skeleton.d.ts +0 -1
- package/dist/types/react/ui/Stack.d.ts +0 -1
- package/dist/types/react/ui/StatusPanel.d.ts +0 -1
- package/dist/types/react/ui/TableWidget.d.ts +2 -3
- package/dist/types/react/ui/Tabs.d.ts +0 -1
- package/dist/types/react/ui/TextContent.d.ts +4 -0
- package/dist/types/react/ui/TextWidget.d.ts +19 -0
- package/dist/types/react/ui/ThemeSelector.d.ts +0 -1
- package/dist/types/react/ui/Tooltip.d.ts +0 -1
- package/dist/types/react/ui/UpdatedAt.d.ts +0 -1
- package/dist/types/react/ui/VariableBar.d.ts +0 -1
- package/dist/types/react/ui/VisualizationWidget.d.ts +5 -13
- package/dist/types/react/ui/WidgetDisclosure.d.ts +0 -1
- package/dist/types/react/ui/WidgetViewTabs.d.ts +2 -3
- package/dist/types/react/ui/data-identifiers.d.ts +0 -1
- package/dist/types/react/ui/presentation.d.ts +19 -0
- package/dist/types/react/view-controls.d.ts +1 -1
- package/dist/types/react/view.d.ts +2 -2
- package/docs/app-authoring.md +60 -44
- package/docs/client.md +11 -19
- package/docs/contract.md +9 -9
- package/docs/embed.md +10 -29
- package/docs/hosted-apps.md +39 -0
- package/docs/local-data-apps.md +14 -0
- package/docs/react-embed.md +10 -19
- package/docs/react.md +108 -134
- package/docs/server-bun.md +4 -6
- package/docs/server.md +2 -2
- package/docs/worker.md +3 -5
- package/examples/starter-data-app/index.tsx +159 -0
- package/package.json +16 -10
- package/dist/chunks/contract-3bnrf5pf.js.map +0 -10
- package/dist/chunks/contract-4vrw9zk9.js.map +0 -12
- package/dist/chunks/contract-rrm7s5zp.js.map +0 -12
- package/dist/chunks/contract-ryyf6dme.js.map +0 -10
- package/dist/react/index.css +0 -4628
- package/dist/react.css.d.ts +0 -1
- package/dist/types/react/ui/index.d.ts +0 -131
- package/docs/appearance.md +0 -43
- package/docs/config.md +0 -21
- package/docs/format.md +0 -29
- package/docs/react-styles.md +0 -17
- package/docs/starter-agent-instructions.md +0 -53
|
@@ -1,11 +1,144 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React bindings and UI;
|
|
2
|
+
* React bindings and UI; inject styles explicitly in the browser entry.
|
|
3
3
|
* @module @altertable/data-app/react
|
|
4
4
|
* @see https://github.com/altertable-ai/data-app/blob/main/docs/react.md
|
|
5
5
|
*/
|
|
6
|
+
export { injectDataAppStyles } from './styles.js';
|
|
7
|
+
export { injectDataAppShellStyles } from './shellStyles.js';
|
|
8
|
+
export type { DataAppStylesOptions } from './styles.js';
|
|
6
9
|
export { mountDataApp, DataAppProvider } from './mount.js';
|
|
7
10
|
export { createDataHooks } from './hooks.js';
|
|
8
11
|
export { defineDataContent } from './content.js';
|
|
9
12
|
export type { DataContentState } from './content.js';
|
|
10
13
|
export type { DataViewDefinition, ResolvedVariables, ViewBindings, } from './view.js';
|
|
11
|
-
export
|
|
14
|
+
export { DataApp } from './ui/DataApp.js';
|
|
15
|
+
export type { DataAppProps, DataAppRequest } from './ui/DataApp.js';
|
|
16
|
+
export { GettingStarted } from './ui/GettingStarted.js';
|
|
17
|
+
export { AppLayout } from './ui/AppLayout.js';
|
|
18
|
+
export type { AppLayoutProps } from './ui/AppLayout.js';
|
|
19
|
+
export { AppHeader } from './ui/AppHeader.js';
|
|
20
|
+
export type { AppHeaderProps } from './ui/AppHeader.js';
|
|
21
|
+
export { AppScope } from './ui/AppScope.js';
|
|
22
|
+
export type { AppScopeProps } from './ui/AppScope.js';
|
|
23
|
+
export { AppToolbar } from './ui/AppToolbar.js';
|
|
24
|
+
export type { AppToolbarProps } from './ui/AppToolbar.js';
|
|
25
|
+
export { VariableBar } from './ui/VariableBar.js';
|
|
26
|
+
export type { VariableBarProps } from './ui/VariableBar.js';
|
|
27
|
+
export { AppFooter } from './ui/AppFooter.js';
|
|
28
|
+
export type { AppFooterProps } from './ui/AppFooter.js';
|
|
29
|
+
export { ThemeSelector, ThemeToggle } from './ui/ThemeSelector.js';
|
|
30
|
+
export type { ThemeSelectorProps } from './ui/ThemeSelector.js';
|
|
31
|
+
export { Stack } from './ui/Stack.js';
|
|
32
|
+
export type { StackProps } from './ui/Stack.js';
|
|
33
|
+
export { Grid } from './ui/Grid.js';
|
|
34
|
+
export type { GridProps } from './ui/Grid.js';
|
|
35
|
+
export { GridItem } from './ui/GridItem.js';
|
|
36
|
+
export type { GridItemProps } from './ui/GridItem.js';
|
|
37
|
+
export type { WidgetEvidence } from './ui/WidgetEvidence.js';
|
|
38
|
+
export { DataWidget } from './ui/DataWidget.js';
|
|
39
|
+
export type { WidgetStatus } from './ui/RequestHint.js';
|
|
40
|
+
export type { DataWidgetProps } from './ui/DataWidget.js';
|
|
41
|
+
export { TextContent } from './ui/TextContent.js';
|
|
42
|
+
export type { TextContentProps } from './ui/TextContent.js';
|
|
43
|
+
export { TextWidget } from './ui/TextWidget.js';
|
|
44
|
+
export type { TextWidgetProps } from './ui/TextWidget.js';
|
|
45
|
+
export { VisualizationWidget } from './ui/VisualizationWidget.js';
|
|
46
|
+
export type { VisualizationWidgetProps, VisualizationWidgetView, } from './ui/VisualizationWidget.js';
|
|
47
|
+
export { TableWidget } from './ui/TableWidget.js';
|
|
48
|
+
export type { TableWidgetColumn, TableWidgetProps, TableWidgetSearch, } from './ui/TableWidget.js';
|
|
49
|
+
export { chartColor } from './ui/chartColor.js';
|
|
50
|
+
export { Breakdown } from './ui/Breakdown.js';
|
|
51
|
+
export type { BreakdownItem, BreakdownProps } from './ui/Breakdown.js';
|
|
52
|
+
export { Ranking } from './ui/Ranking.js';
|
|
53
|
+
export type { RankingItem, RankingProps } from './ui/Ranking.js';
|
|
54
|
+
export { WidgetDisclosure } from './ui/WidgetDisclosure.js';
|
|
55
|
+
export type { WidgetDisclosureProps } from './ui/WidgetDisclosure.js';
|
|
56
|
+
export { WidgetViewTabs } from './ui/WidgetViewTabs.js';
|
|
57
|
+
export type { WidgetView, WidgetViewTabsProps, } from './ui/WidgetViewTabs.js';
|
|
58
|
+
export { ComparisonVisual } from './ui/ComparisonVisual.js';
|
|
59
|
+
export type { ComparisonVisualProps } from './ui/ComparisonVisual.js';
|
|
60
|
+
export { calendarMetricComparison } from './ui/comparison.js';
|
|
61
|
+
export type { MetricComparison } from './ui/comparison.js';
|
|
62
|
+
export { DataTable, DataTableEmptyRow, DataTableTimestamp, DataTableShare, } from './ui/DataTable.js';
|
|
63
|
+
export type { DataTableProps, DataTableSearch, DataTableEmptyRowProps, DataTableTimestampProps, } from './ui/DataTable.js';
|
|
64
|
+
export { MetricWidget } from './ui/MetricWidget.js';
|
|
65
|
+
export type { MetricWidgetProps } from './ui/MetricWidget.js';
|
|
66
|
+
export { SelectableBarChart } from './ui/SelectableBarChart.js';
|
|
67
|
+
export type { SelectableBarChartProps, SelectableBarItem, } from './ui/SelectableBarChart.js';
|
|
68
|
+
export { DimensionPicker } from './ui/DimensionPicker.js';
|
|
69
|
+
export { EmptyState } from './ui/EmptyState.js';
|
|
70
|
+
export type { EmptyStateProps } from './ui/EmptyState.js';
|
|
71
|
+
export { Skeleton } from './ui/Skeleton.js';
|
|
72
|
+
export type { SkeletonProps } from './ui/Skeleton.js';
|
|
73
|
+
export { DataAppSkeleton } from './ui/DataAppSkeleton.js';
|
|
74
|
+
export type { DataAppSkeletonProps } from './ui/DataAppSkeleton.js';
|
|
75
|
+
export { DataBoundary } from './ui/DataBoundary.js';
|
|
76
|
+
export { resolveDataView } from '../core/data-view.js';
|
|
77
|
+
export { displayedSnapshot } from '../core/data-view.js';
|
|
78
|
+
export type { DataView, DataSnapshot, DisplayedSnapshot, } from '../core/data-view.js';
|
|
79
|
+
export type { DataBoundaryProps } from './ui/DataBoundary.js';
|
|
80
|
+
export { RefreshRegion } from './ui/RefreshRegion.js';
|
|
81
|
+
export type { RefreshRegionProps } from './ui/RefreshRegion.js';
|
|
82
|
+
export { DataSection } from './ui/DataSection.js';
|
|
83
|
+
export type { DataSectionProps, SectionResult, } from './ui/DataSection.js';
|
|
84
|
+
export { StatusPanel } from './ui/StatusPanel.js';
|
|
85
|
+
export type { StatusPanelProps } from './ui/StatusPanel.js';
|
|
86
|
+
export { ContentSkeleton } from './ui/ContentSkeleton.js';
|
|
87
|
+
export type { ContentSkeletonProps } from './ui/ContentSkeleton.js';
|
|
88
|
+
export { DataViewToast } from './ui/DataViewToast.js';
|
|
89
|
+
export type { DataViewToastProps } from './ui/DataViewToast.js';
|
|
90
|
+
export { UpdatedAt } from './ui/UpdatedAt.js';
|
|
91
|
+
export type { UpdatedAtProps } from './ui/UpdatedAt.js';
|
|
92
|
+
export { DateTimeTooltip } from './ui/DateTimeTooltip.js';
|
|
93
|
+
export type { DateTimeTooltipProps } from './ui/DateTimeTooltip.js';
|
|
94
|
+
export { LiveControl } from './ui/LiveControl.js';
|
|
95
|
+
export type { LiveControlProps, LiveIntervalSeconds, } from './ui/LiveControl.js';
|
|
96
|
+
export { DateRangePicker } from './ui/DateRangePicker.js';
|
|
97
|
+
export type { DatePresetId, DateRange, DateRangePickerProps, } from './ui/DateRangePicker.js';
|
|
98
|
+
export { defineAppVariables, textVariable, selectVariable, dateRangeVariable, dateRangeControl, useAppVariables, } from './ui/variables.js';
|
|
99
|
+
export type { AppVariable, AppVariableValues, DateRangeSelection, DateRangeVariable, DateRangeVariableOptions, } from './ui/variables.js';
|
|
100
|
+
export { PeriodSummary } from './ui/PeriodSummary.js';
|
|
101
|
+
export type { ReportingPeriod, PeriodComparison, PeriodSummaryProps, } from './ui/PeriodSummary.js';
|
|
102
|
+
export { SearchField } from './ui/SearchField.js';
|
|
103
|
+
export type { SearchFieldProps } from './ui/SearchField.js';
|
|
104
|
+
export { searchItems } from './ui/searchItems.js';
|
|
105
|
+
export type { SearchAttribute, SearchHit, SearchItemsOptions, SearchMatchValue, SearchRange, } from './ui/searchItems.js';
|
|
106
|
+
export { SearchMatch } from './ui/SearchMatch.js';
|
|
107
|
+
export type { SearchMatchProps } from './ui/SearchMatch.js';
|
|
108
|
+
export { Combobox } from './ui/Combobox.js';
|
|
109
|
+
export type { ComboboxOption, ComboboxProps } from './ui/Combobox.js';
|
|
110
|
+
export { GradientScroll } from './ui/GradientScroll.js';
|
|
111
|
+
export type { GradientScrollProps } from './ui/GradientScroll.js';
|
|
112
|
+
export { searchParams, subscribeSearch, writeSearch, } from './ui/search.js';
|
|
113
|
+
export { Tabs, TabList, Tab, TabPanels, TabPanel, useViewTab, } from './ui/Tabs.js';
|
|
114
|
+
export { createDataContext, defineDataContext, evidenceFor, } from './ui/data-context.js';
|
|
115
|
+
export type { DataContext, GlossaryEntry } from './ui/data-context.js';
|
|
116
|
+
export { defineDataIdentifiers } from './ui/data-identifiers.js';
|
|
117
|
+
export type { DataIdentifierDefinition, TableIdentifier, ColumnIdentifier, } from './ui/data-identifiers.js';
|
|
118
|
+
export { GlossaryExplanation } from './ui/GlossaryExplanation.js';
|
|
119
|
+
export type { GlossaryExplanationProps } from './ui/GlossaryExplanation.js';
|
|
120
|
+
export { GlossaryDefinition } from './ui/GlossaryDefinition.js';
|
|
121
|
+
export type { GlossaryDefinitionProps } from './ui/GlossaryDefinition.js';
|
|
122
|
+
export { AboutData } from './ui/AboutData.js';
|
|
123
|
+
export type { AboutDataProps, AboutEmpty, AboutSubject, AboutTab, } from './ui/AboutData.js';
|
|
124
|
+
export { PresentStory } from './ui/PresentStory.js';
|
|
125
|
+
export type { PresentStoryProps } from './ui/PresentStory.js';
|
|
126
|
+
export type { StoryFinding, BoundStory } from './ui/story.js';
|
|
127
|
+
export { Checkbox } from './ui/Checkbox.js';
|
|
128
|
+
export type { CheckboxProps } from './ui/Checkbox.js';
|
|
129
|
+
export { AppIcon } from './ui/icons.js';
|
|
130
|
+
export type { AppIconName, AppIconProps } from './ui/icons.js';
|
|
131
|
+
export { IconButton } from './ui/IconButton.js';
|
|
132
|
+
export type { IconButtonProps } from './ui/IconButton.js';
|
|
133
|
+
export { Kbd } from './ui/Kbd.js';
|
|
134
|
+
export type { KbdProps } from './ui/Kbd.js';
|
|
135
|
+
export { Sheet } from './ui/Sheet.js';
|
|
136
|
+
export type { SheetDialogProps, SheetProps } from './ui/Sheet.js';
|
|
137
|
+
export { Tooltip, TooltipProvider } from './ui/Tooltip.js';
|
|
138
|
+
export type { TooltipProps, TooltipProviderProps, } from './ui/Tooltip.js';
|
|
139
|
+
export { Button } from './ui/Button.js';
|
|
140
|
+
export type { ButtonProps } from './ui/Button.js';
|
|
141
|
+
export { HelpPopover } from './ui/HelpPopover.js';
|
|
142
|
+
export type { HelpPopoverPanelProps, HelpPopoverProps, HelpPopoverTriggerProps, } from './ui/HelpPopover.js';
|
|
143
|
+
export type { MetricDefinition } from './ui/metric.js';
|
|
144
|
+
export type { DataReading, MetricReading, MetricValues, } from '../core/reading.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface DataAppStylesOptions {
|
|
2
|
+
/** Defaults to the current browser document. */
|
|
3
|
+
document?: Document;
|
|
4
|
+
/** Nonce permitted by the document's style-src CSP. */
|
|
5
|
+
nonce?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Install the complete UI stylesheet once per document, before mounting. */
|
|
8
|
+
export declare function injectDataAppStyles(options?: DataAppStylesOptions): HTMLStyleElement;
|
|
@@ -3,7 +3,6 @@ import type { DisclosedQuery } from '../../core/contract.js';
|
|
|
3
3
|
import type { DataContext, GlossaryEntry } from './data-context.js';
|
|
4
4
|
import { type ButtonProps } from './Button.js';
|
|
5
5
|
import { type SheetDialogProps } from './Sheet.js';
|
|
6
|
-
|
|
7
6
|
export type AboutTab = 'glossary' | 'queries';
|
|
8
7
|
export type AboutEmpty = {
|
|
9
8
|
glossary: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps, ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { AppFooter } from './AppFooter.js';
|
|
3
3
|
import { type TooltipProviderProps } from './Tooltip.js';
|
|
4
|
-
|
|
5
4
|
export type AppLayoutProps = {
|
|
6
5
|
children: ReactNode;
|
|
7
6
|
footerActions?: ReactNode;
|
|
@@ -3,7 +3,6 @@ import type { DataView } from '../../core/data-view.js';
|
|
|
3
3
|
import { type LiveControlProps } from './LiveControl.js';
|
|
4
4
|
import { PresentStory } from './PresentStory.js';
|
|
5
5
|
import { RefreshControl } from './RefreshControl.js';
|
|
6
|
-
|
|
7
6
|
export type AppToolbarProps = {
|
|
8
7
|
children?: ReactNode;
|
|
9
8
|
end?: ReactNode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
2
|
import { type ButtonProps as AriaButtonProps } from 'react-aria-components';
|
|
3
|
-
|
|
4
3
|
export type ButtonProps = ComponentPropsWithRef<'button'> & {
|
|
5
4
|
variant?: 'elevated' | 'outline' | 'ghost';
|
|
6
5
|
size?: 'default' | 'compact' | 'icon' | 'icon-compact';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type MetricComparison } from './comparison.js';
|
|
2
2
|
import type { MetricDefinition } from './metric.js';
|
|
3
3
|
import type { MetricReading } from '../../core/reading.js';
|
|
4
|
-
|
|
5
4
|
type UnboundComparisonProps = MetricComparison & {
|
|
6
5
|
label: string;
|
|
7
6
|
emphasis?: 'standard' | 'story';
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
|
-
export type ContentSkeletonProps =
|
|
4
|
-
rows?: number;
|
|
5
|
-
variant: 'metric' | 'panel' | 'ranking';
|
|
6
|
-
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
2
|
+
import type { SkeletonContent } from './presentation.js';
|
|
3
|
+
export type ContentSkeletonProps = SkeletonContent & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
7
4
|
/** A metric, panel, or ranking placeholder to compose in the same layout as live content. */
|
|
8
5
|
export declare function ContentSkeleton({ variant, rows, className, ...props }: ContentSkeletonProps): import("react").JSX.Element;
|
|
@@ -7,7 +7,7 @@ import { type AppToolbarProps } from './AppToolbar.js';
|
|
|
7
7
|
import type { DataContext } from './data-context.js';
|
|
8
8
|
import type { BoundStory } from './story.js';
|
|
9
9
|
import { type SectionResult } from './DataSection.js';
|
|
10
|
-
import type {
|
|
10
|
+
import type { EmptyContent } from './presentation.js';
|
|
11
11
|
type DataAppBaseProps = {
|
|
12
12
|
config: DataAppConfig;
|
|
13
13
|
dataContext: DataContext;
|
|
@@ -25,7 +25,7 @@ type DataAppBaseProps = {
|
|
|
25
25
|
export type DataAppRequest<Data, Input> = SectionResult<Data, Input> & {
|
|
26
26
|
queries?: DisclosedQuery[];
|
|
27
27
|
refresh?: AppToolbarProps['refresh'];
|
|
28
|
-
empty:
|
|
28
|
+
empty: EmptyContent;
|
|
29
29
|
controls?: ReactNode;
|
|
30
30
|
};
|
|
31
31
|
export type DataAppProps<Data = unknown, Input = unknown> = DataAppBaseProps & ({
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import type { DataView } from '../../core/data-view.js';
|
|
3
|
-
import {
|
|
4
|
-
type SectionEmpty = Pick<EmptyStateProps, 'title' | 'description'>;
|
|
3
|
+
import type { EmptyContent } from './presentation.js';
|
|
5
4
|
export type SectionResult<Data, Input> = {
|
|
6
5
|
view: DataView<Data, Input>;
|
|
7
6
|
refetch: () => unknown;
|
|
8
7
|
};
|
|
9
8
|
export type DataSectionProps<Data, Input = unknown> = {
|
|
10
9
|
result: SectionResult<Data, Input>;
|
|
11
|
-
empty:
|
|
10
|
+
empty: EmptyContent;
|
|
12
11
|
children: (data: Data, displayedInput: Input) => ReactNode;
|
|
13
12
|
/** Placeholder layout for an initial request; use the ready view's grid without copied values. */
|
|
14
13
|
loading?: ReactNode;
|
|
@@ -25,4 +24,3 @@ export type DataSectionProps<Data, Input = unknown> = {
|
|
|
25
24
|
/** One request boundary for any number of cards. `DataBoundary` exposes the lower-level
|
|
26
25
|
* view-state slots for custom composition. */
|
|
27
26
|
export declare function DataSection<Data, Input>({ result, children, empty, loading, error, label, notice, dimOnUpdate, ...props }: DataSectionProps<Data, Input>): import("react").JSX.Element;
|
|
28
|
-
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { EmptyContent } from './presentation.js';
|
|
3
3
|
import { type SearchFieldProps } from './SearchField.js';
|
|
4
|
-
|
|
5
4
|
export type DataTableSearch = Pick<SearchFieldProps, 'label' | 'placeholder' | 'value' | 'onChange' | 'resetValue'> & {
|
|
6
5
|
/** Number of available records before filtering or a display limit. */
|
|
7
6
|
itemCount: number;
|
|
@@ -16,7 +15,7 @@ export declare function DataTable({ className, ref, searchable, ...props }: Data
|
|
|
16
15
|
export declare function DataTableShare({ value }: {
|
|
17
16
|
value: number;
|
|
18
17
|
}): import("react").JSX.Element;
|
|
19
|
-
export type DataTableEmptyRowProps =
|
|
18
|
+
export type DataTableEmptyRowProps = EmptyContent & {
|
|
20
19
|
colSpan: number;
|
|
21
20
|
};
|
|
22
21
|
export declare function DataTableEmptyRow({ colSpan, title, description, }: DataTableEmptyRowProps): import("react").JSX.Element;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
-
import type { DataReading } from '../../core/reading.js';
|
|
3
2
|
import { type WidgetStatus } from './RequestHint.js';
|
|
4
|
-
import {
|
|
5
|
-
import { type EmptyStateProps } from './EmptyState.js';
|
|
3
|
+
import type { EmptyContent, BoundWidgetReading } from './presentation.js';
|
|
6
4
|
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type Empty = Pick<EmptyStateProps, 'title' | 'description'>;
|
|
10
5
|
type DataWidgetBaseProps = {
|
|
11
6
|
title: ReactNode;
|
|
12
7
|
count?: number;
|
|
@@ -21,18 +16,13 @@ type DataWidgetBaseProps = {
|
|
|
21
16
|
/** Owns loading, empty content, actions, and inspection. Page and sheet mount the same
|
|
22
17
|
* body and footer; hold interactive child state above the widget to share it across mounts.
|
|
23
18
|
* A bound reading requires evidence; its child renderer runs only for nonempty ready data. */
|
|
24
|
-
export type DataWidgetProps<Data = unknown> = DataWidgetBaseProps & ({
|
|
25
|
-
reading: DataReading<Data>;
|
|
26
|
-
isEmpty: (data: Data) => boolean;
|
|
27
|
-
empty: Empty;
|
|
28
|
-
evidence: WidgetEvidence;
|
|
29
|
-
skeleton?: Pick<ContentSkeletonProps, 'variant' | 'rows'>;
|
|
19
|
+
export type DataWidgetProps<Data = unknown> = DataWidgetBaseProps & ((BoundWidgetReading<Data> & {
|
|
30
20
|
children: (data: Data) => ReactNode;
|
|
31
|
-
} | {
|
|
21
|
+
}) | {
|
|
32
22
|
reading?: never;
|
|
33
23
|
isEmpty?: never;
|
|
34
24
|
skeleton?: never;
|
|
35
|
-
empty?:
|
|
25
|
+
empty?: EmptyContent;
|
|
36
26
|
children: ReactNode;
|
|
37
27
|
});
|
|
38
28
|
export declare function DataWidget<Data>(props: DataWidgetProps<Data>): import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
2
|
import { type CalendarDate } from '@internationalized/date';
|
|
3
3
|
import { DateRangePicker as AriaDateRangePicker } from 'react-aria-components';
|
|
4
|
-
|
|
5
4
|
import { type DatePresetId, type DateRange } from '../../core/date-range.js';
|
|
6
5
|
export type { DatePresetId, DateRange } from '../../core/date-range.js';
|
|
7
6
|
export type DateRangePickerProps = {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type EmptyStateProps = {
|
|
4
|
-
title: ReactNode;
|
|
5
|
-
description?: ReactNode;
|
|
1
|
+
import type { EmptyContent } from './presentation.js';
|
|
2
|
+
export type EmptyStateProps = EmptyContent & {
|
|
6
3
|
variant?: 'visual' | 'table';
|
|
7
4
|
className?: string;
|
|
8
5
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DataAppConfig } from '../../core/config.js';
|
|
2
2
|
import type { DataContext } from './data-context.js';
|
|
3
|
-
|
|
4
3
|
/** Query-backed connection state and next steps for a newly created app. Mount within
|
|
5
4
|
* `DataAppProvider` and register `connection: connectionCheck()` on the server. */
|
|
6
5
|
export declare function GettingStarted({ config, dataContext, }: {
|
|
@@ -2,7 +2,6 @@ import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
|
2
2
|
import type { DisclosedQuery } from '../../core/contract.js';
|
|
3
3
|
import type { DataContext, GlossaryEntry } from './data-context.js';
|
|
4
4
|
import { type AboutEmpty } from './AboutData.js';
|
|
5
|
-
|
|
6
5
|
export type GlossaryExplanationProps = {
|
|
7
6
|
entry: GlossaryEntry;
|
|
8
7
|
empty?: AboutEmpty;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ReactNode, type RefObject } from 'react';
|
|
2
2
|
import { type Placement } from '@floating-ui/react';
|
|
3
|
-
|
|
4
|
-
|
|
5
3
|
export type HelpPopoverTriggerProps = Omit<ComponentPropsWithRef<'button'>, 'children' | 'type'>;
|
|
6
4
|
export type HelpPopoverPanelProps = Omit<ComponentPropsWithRef<'section'>, 'children' | 'role'>;
|
|
7
5
|
export type HelpPopoverProps = {
|
|
@@ -5,8 +5,6 @@ import { type MetricComparison } from './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
|
-
|
|
9
|
-
|
|
10
8
|
type MetricWidgetBaseProps = {
|
|
11
9
|
label: string;
|
|
12
10
|
description?: ReactNode;
|
|
@@ -3,7 +3,6 @@ import type { ThemeController } from '../../core/appearance.js';
|
|
|
3
3
|
import { type AboutEmpty } from './AboutData.js';
|
|
4
4
|
import type { DataContext } from './data-context.js';
|
|
5
5
|
import { type StoryFinding } from './story.js';
|
|
6
|
-
|
|
7
6
|
export type StoryStep = {
|
|
8
7
|
id: string;
|
|
9
8
|
empty?: AboutEmpty;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
|
|
3
2
|
/** One search control surface for picker search and table/page search. */
|
|
4
3
|
export declare function SearchInput({ size, endAction, loading, className, onKeyDown, ...props }: Omit<ComponentPropsWithRef<'input'>, 'size' | 'children'> & {
|
|
5
4
|
size?: 'default' | 'compact';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
-
|
|
3
2
|
export type SkeletonProps = Omit<ComponentPropsWithRef<'span'>, 'children' | 'aria-hidden'>;
|
|
4
3
|
/** Decorative loading placeholder that fades in only when loading takes a moment.
|
|
5
4
|
* Put the accessible status on its container. */
|