@altertable/data-app-react 0.71.0 → 0.73.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 (170) hide show
  1. package/README.md +3 -6
  2. package/dist/chunks/SectionHeading-CVenpddF.js +7813 -0
  3. package/dist/chunks/SectionHeading-CVenpddF.js.map +1 -0
  4. package/dist/index.js +1004 -2847
  5. package/dist/index.js.map +1 -23
  6. package/dist/types/chunks/date-formatting.d.ts +863 -0
  7. package/dist/types/index.d.ts +745 -78
  8. package/dist/types/ui/index.d.ts +572 -111
  9. package/dist/ui/index.js +2779 -3403
  10. package/dist/ui/index.js.map +1 -36
  11. package/package.json +7 -6
  12. package/dist/chunks/index-1nbjx0se.js +0 -17022
  13. package/dist/chunks/index-1nbjx0se.js.map +0 -120
  14. package/dist/types/actions.d.ts +0 -53
  15. package/dist/types/annotations/AnnotationBar.d.ts +0 -30
  16. package/dist/types/annotations/AnnotationControls.d.ts +0 -10
  17. package/dist/types/annotations/AnnotationEditor.d.ts +0 -16
  18. package/dist/types/annotations/AnnotationMarkers.d.ts +0 -19
  19. package/dist/types/annotations/AnnotationSelectionLayer.d.ts +0 -12
  20. package/dist/types/annotations/AnnotationTarget.d.ts +0 -9
  21. package/dist/types/annotations/AnnotationTooltip.d.ts +0 -9
  22. package/dist/types/annotations/AnnotationTrigger.d.ts +0 -10
  23. package/dist/types/annotations/annotation-editor-state.d.ts +0 -58
  24. package/dist/types/annotations/annotation-screenshot.d.ts +0 -4
  25. package/dist/types/annotations/annotation-targets.d.ts +0 -34
  26. package/dist/types/annotations/getAnnotationProps.d.ts +0 -17
  27. package/dist/types/annotations/styles.d.ts +0 -3
  28. package/dist/types/annotations/useAnnotationGeometry.d.ts +0 -22
  29. package/dist/types/annotations/useDataAppAnnotations.d.ts +0 -22
  30. package/dist/types/app-context.d.ts +0 -3
  31. package/dist/types/bindings.d.ts +0 -169
  32. package/dist/types/content.d.ts +0 -36
  33. package/dist/types/date-formatting.d.ts +0 -12
  34. package/dist/types/details.d.ts +0 -46
  35. package/dist/types/exploration.d.ts +0 -44
  36. package/dist/types/hooks.d.ts +0 -114
  37. package/dist/types/injectStyles.d.ts +0 -7
  38. package/dist/types/mount.d.ts +0 -13
  39. package/dist/types/search-suggestions.d.ts +0 -8
  40. package/dist/types/source-owner.d.ts +0 -2
  41. package/dist/types/style-contract.d.ts +0 -88
  42. package/dist/types/style-validation.d.ts +0 -2
  43. package/dist/types/styles.d.ts +0 -8
  44. package/dist/types/ui/AboutData.d.ts +0 -73
  45. package/dist/types/ui/AltertableLogo.d.ts +0 -3
  46. package/dist/types/ui/AppFooter.d.ts +0 -6
  47. package/dist/types/ui/AppHeader.d.ts +0 -10
  48. package/dist/types/ui/AppLayout.d.ts +0 -10
  49. package/dist/types/ui/AppScope.d.ts +0 -7
  50. package/dist/types/ui/AppToolbar.d.ts +0 -30
  51. package/dist/types/ui/AreaChart.d.ts +0 -7
  52. package/dist/types/ui/BarChart.d.ts +0 -6
  53. package/dist/types/ui/Breakdown.d.ts +0 -13
  54. package/dist/types/ui/Button.d.ts +0 -12
  55. package/dist/types/ui/ChartLegend.d.ts +0 -32
  56. package/dist/types/ui/Checkbox.d.ts +0 -21
  57. package/dist/types/ui/CheckboxGroup.d.ts +0 -7
  58. package/dist/types/ui/ChoicePicker.d.ts +0 -39
  59. package/dist/types/ui/Comparison.d.ts +0 -14
  60. package/dist/types/ui/ComposedChart.d.ts +0 -41
  61. package/dist/types/ui/ComposedChartLegend.d.ts +0 -9
  62. package/dist/types/ui/ContentSkeleton.d.ts +0 -7
  63. package/dist/types/ui/DataApp.d.ts +0 -24
  64. package/dist/types/ui/DataAppFrame.d.ts +0 -52
  65. package/dist/types/ui/DataBoundary.d.ts +0 -14
  66. package/dist/types/ui/DataSection.d.ts +0 -14
  67. package/dist/types/ui/DataSectionBoundary.d.ts +0 -30
  68. package/dist/types/ui/DataTable.d.ts +0 -29
  69. package/dist/types/ui/DataValue.d.ts +0 -9
  70. package/dist/types/ui/DataViewToast.d.ts +0 -11
  71. package/dist/types/ui/DataWidget.d.ts +0 -37
  72. package/dist/types/ui/DateDisplay.d.ts +0 -9
  73. package/dist/types/ui/DateRangePicker.d.ts +0 -30
  74. package/dist/types/ui/DateTimeTooltip.d.ts +0 -10
  75. package/dist/types/ui/DimensionPicker.d.ts +0 -14
  76. package/dist/types/ui/EmptyState.d.ts +0 -6
  77. package/dist/types/ui/ExplorationActionControl.d.ts +0 -60
  78. package/dist/types/ui/ExportControl.d.ts +0 -4
  79. package/dist/types/ui/FilterActions.d.ts +0 -10
  80. package/dist/types/ui/FilterBar.d.ts +0 -3
  81. package/dist/types/ui/FunnelChart.d.ts +0 -20
  82. package/dist/types/ui/GettingStarted.d.ts +0 -6
  83. package/dist/types/ui/GlossaryDefinition.d.ts +0 -7
  84. package/dist/types/ui/GlossaryExplanation.d.ts +0 -16
  85. package/dist/types/ui/GradientScroll.d.ts +0 -23
  86. package/dist/types/ui/Grid.d.ts +0 -12
  87. package/dist/types/ui/GridItem.d.ts +0 -7
  88. package/dist/types/ui/HelpPopover.d.ts +0 -21
  89. package/dist/types/ui/IconButton.d.ts +0 -19
  90. package/dist/types/ui/InspectionContext.d.ts +0 -12
  91. package/dist/types/ui/InspectionProvider.d.ts +0 -29
  92. package/dist/types/ui/JourneyChart.d.ts +0 -10
  93. package/dist/types/ui/Kbd.d.ts +0 -7
  94. package/dist/types/ui/LineChart.d.ts +0 -7
  95. package/dist/types/ui/LiveControl.d.ts +0 -10
  96. package/dist/types/ui/Menu.d.ts +0 -13
  97. package/dist/types/ui/MetricWidget.d.ts +0 -51
  98. package/dist/types/ui/NumberField.d.ts +0 -27
  99. package/dist/types/ui/NumberFilterPicker.d.ts +0 -11
  100. package/dist/types/ui/PeriodSummary.d.ts +0 -17
  101. package/dist/types/ui/PickerField.d.ts +0 -23
  102. package/dist/types/ui/PieChart.d.ts +0 -11
  103. package/dist/types/ui/PopoverSurface.d.ts +0 -5
  104. package/dist/types/ui/PresentStory.d.ts +0 -30
  105. package/dist/types/ui/QueryList.d.ts +0 -14
  106. package/dist/types/ui/RadioGroup.d.ts +0 -18
  107. package/dist/types/ui/Ranking.d.ts +0 -13
  108. package/dist/types/ui/RefreshControl.d.ts +0 -9
  109. package/dist/types/ui/RequestHint.d.ts +0 -20
  110. package/dist/types/ui/RetentionChart.d.ts +0 -27
  111. package/dist/types/ui/ScatterChart.d.ts +0 -17
  112. package/dist/types/ui/SearchField.d.ts +0 -23
  113. package/dist/types/ui/SearchInput.d.ts +0 -10
  114. package/dist/types/ui/SearchMatch.d.ts +0 -6
  115. package/dist/types/ui/SearchTypeahead.d.ts +0 -15
  116. package/dist/types/ui/SectionHeading.d.ts +0 -8
  117. package/dist/types/ui/Select.d.ts +0 -22
  118. package/dist/types/ui/SelectionMark.d.ts +0 -5
  119. package/dist/types/ui/Sheet.d.ts +0 -21
  120. package/dist/types/ui/Skeleton.d.ts +0 -8
  121. package/dist/types/ui/Stack.d.ts +0 -7
  122. package/dist/types/ui/StaticDataApp.d.ts +0 -4
  123. package/dist/types/ui/StatusPanel.d.ts +0 -10
  124. package/dist/types/ui/TableWidget.d.ts +0 -67
  125. package/dist/types/ui/Tabs.d.ts +0 -10
  126. package/dist/types/ui/TextContent.d.ts +0 -4
  127. package/dist/types/ui/TextWidget.d.ts +0 -20
  128. package/dist/types/ui/ThemeSelector.d.ts +0 -12
  129. package/dist/types/ui/Toast.d.ts +0 -8
  130. package/dist/types/ui/Tooltip.d.ts +0 -23
  131. package/dist/types/ui/TooltipSurface.d.ts +0 -3
  132. package/dist/types/ui/TrendChart.d.ts +0 -5
  133. package/dist/types/ui/UpdatedAt.d.ts +0 -9
  134. package/dist/types/ui/VariableBar.d.ts +0 -6
  135. package/dist/types/ui/VisualizationWidget.d.ts +0 -43
  136. package/dist/types/ui/WidgetDisclosure.d.ts +0 -6
  137. package/dist/types/ui/WidgetEvidence.d.ts +0 -12
  138. package/dist/types/ui/WidgetViewTabs.d.ts +0 -16
  139. package/dist/types/ui/chart-data.d.ts +0 -36
  140. package/dist/types/ui/chart-date-axis.d.ts +0 -15
  141. package/dist/types/ui/chart-interaction.d.ts +0 -27
  142. package/dist/types/ui/chart-primitives.d.ts +0 -22
  143. package/dist/types/ui/chart-time.d.ts +0 -19
  144. package/dist/types/ui/chartColor.d.ts +0 -2
  145. package/dist/types/ui/classNames.d.ts +0 -1
  146. package/dist/types/ui/csv-export.d.ts +0 -19
  147. package/dist/types/ui/data-context.d.ts +0 -76
  148. package/dist/types/ui/data-identifiers.d.ts +0 -32
  149. package/dist/types/ui/icons.d.ts +0 -49
  150. package/dist/types/ui/journey-flow.d.ts +0 -49
  151. package/dist/types/ui/keyboard.d.ts +0 -6
  152. package/dist/types/ui/metric-comparison.d.ts +0 -30
  153. package/dist/types/ui/metric.d.ts +0 -11
  154. package/dist/types/ui/presentation.d.ts +0 -25
  155. package/dist/types/ui/search.d.ts +0 -6
  156. package/dist/types/ui/searchItems.d.ts +0 -36
  157. package/dist/types/ui/shortcuts.d.ts +0 -45
  158. package/dist/types/ui/story.d.ts +0 -20
  159. package/dist/types/ui/time-interval.d.ts +0 -96
  160. package/dist/types/ui/use-chart-scroll-to-end.d.ts +0 -2
  161. package/dist/types/ui/useAppAppearance.d.ts +0 -3
  162. package/dist/types/ui/useDataAppPresentation.d.ts +0 -3
  163. package/dist/types/ui/useSvgId.d.ts +0 -2
  164. package/dist/types/ui/variables.d.ts +0 -36
  165. package/dist/types/ui/widget-views.d.ts +0 -3
  166. package/dist/types/view-control-bar.d.ts +0 -18
  167. package/dist/types/view-controls.d.ts +0 -20
  168. package/dist/types/view-runtime.d.ts +0 -34
  169. package/dist/types/view.d.ts +0 -87
  170. package/dist/types/widgets.d.ts +0 -90
@@ -0,0 +1,863 @@
1
+ import { DataAppDefinition, QueryDefinitions } from "@altertable/data-app/config";
2
+ import { AppVariable, AppVariableValues, AppVariableValues as AppVariableValues$1, ChoiceOption as ChoiceOption$1, ChoiceVariable as ChoiceVariable$1, DataReading, DataView, DatePresetId, DateRange, DateRangeSelection, DateRangeVariable, DateRangeVariable as DateRangeVariable$1, DateRangeVariableOptions, DisplayedSnapshot, HistoryMode, MetricReading, MultiChoiceVariable, SearchVariable, VariableCollection, VariablePresentation, choiceVariable, dateRangeVariable, multiChoiceVariable, searchVariable } from "@altertable/data-app/internal";
3
+ import { CSSProperties, ComponentPropsWithRef, ComponentType, ReactNode, Ref, RefObject } from "react";
4
+ import { Button } from "react-aria-components";
5
+ import { Placement } from "@floating-ui/react";
6
+ import { LucideProps } from "lucide-react";
7
+ import { DateFormat, MetricFormat } from "@altertable/data-app/format";
8
+ import { DateRangeRequest, DisclosedQuery } from "@altertable/data-app/contract";
9
+ import { ThemeController } from "@altertable/data-app/appearance";
10
+ //#region src/ui/Button.d.ts
11
+ type ButtonProps = ComponentPropsWithRef<'button'> & {
12
+ /** Inline actions retain button semantics without a padded control surface. */
13
+ variant?: 'primary' | 'elevated' | 'outline' | 'ghost' | 'inline';
14
+ size?: 'default' | 'compact' | 'icon' | 'icon-compact';
15
+ };
16
+ declare function Button$1({ className, type, variant, size, disabled, ...props }: ButtonProps): import("react").JSX.Element;
17
+ /** React Aria trigger behavior with the same presentation as the native Button. */
18
+ declare function PressButton({ variant, size, className, ...props }: Omit<ComponentPropsWithRef<typeof Button>, 'className'> & Pick<ButtonProps, 'variant' | 'size'> & {
19
+ className?: string;
20
+ }): import("react").JSX.Element;
21
+ //#endregion
22
+ //#region src/ui/data-identifiers.d.ts
23
+ type TableIdentifier = {
24
+ catalog: string;
25
+ schema: string;
26
+ name: string;
27
+ };
28
+ type ColumnIdentifier<TableId extends string = string> = {
29
+ table: TableId;
30
+ name: string;
31
+ };
32
+ type DataIdentifierDefinition = ({
33
+ kind: 'table';
34
+ } & TableIdentifier) | {
35
+ kind: 'column';
36
+ tableId: `tables.${string}`;
37
+ table: TableIdentifier;
38
+ name: string;
39
+ };
40
+ type IdentifierId<Tables extends Record<string, TableIdentifier>, Columns extends Record<string, ColumnIdentifier<Extract<keyof Tables, string>>>> = `tables.${Extract<keyof Tables, string>}` | { [Id in Extract<keyof Columns, string>]: `columns.${Columns[Id]['table']}.${Id}`; }[Extract<keyof Columns, string>];
41
+ /** Register exact source names once; returned JSX IDs are checked against this registry. */
42
+ declare function defineDataIdentifiers<const Tables extends Record<string, TableIdentifier>, const Columns extends Record<string, ColumnIdentifier<Extract<keyof Tables, string>>>>({ tables, columns }: {
43
+ tables: Tables;
44
+ columns: Columns;
45
+ }): {
46
+ definitions: Readonly<Record<IdentifierId<Tables, Columns>, DataIdentifierDefinition>>;
47
+ DataIdentifier: ({ id, display }: {
48
+ id: IdentifierId<Tables, Columns>;
49
+ display?: 'short' | 'qualified';
50
+ }) => import("react").JSX.Element;
51
+ };
52
+ //#endregion
53
+ //#region src/ui/metric-comparison.d.ts
54
+ type MetricComparison = {
55
+ current: {
56
+ value: number;
57
+ formattedValue: string;
58
+ periodLabel?: string;
59
+ };
60
+ previous?: {
61
+ value: number | null;
62
+ formattedValue: string;
63
+ periodLabel?: string;
64
+ };
65
+ favorableDirection?: 'up' | 'down';
66
+ };
67
+ //#endregion
68
+ //#region src/ui/metric.d.ts
69
+ type MetricDefinition = {
70
+ id: string;
71
+ label: string;
72
+ format: MetricFormat;
73
+ favorableDirection?: 'up' | 'down';
74
+ evidence: WidgetEvidence;
75
+ };
76
+ //#endregion
77
+ //#region src/ui/PresentStory.d.ts
78
+ type PresentStoryProps = {
79
+ title: string;
80
+ findings: readonly StoryFinding[];
81
+ empty?: AboutEmpty;
82
+ scope?: ReactNode;
83
+ dataContext: DataContext;
84
+ theme?: ThemeController;
85
+ headerActions?: ReactNode;
86
+ footer?: ReactNode;
87
+ } & Omit<ComponentPropsWithRef<'button'>, 'title'>;
88
+ /**
89
+ * Uses an already loaded snapshot. Navigation is stored in `?present=1&step=`, and step
90
+ * inspection uses `?about=`. The presentation owns its modal structure.
91
+ */
92
+ declare function PresentStory({ title, findings, empty, scope, dataContext, theme, headerActions, footer, children, className, onClick, disabled, ref, ...props }: PresentStoryProps): import("react").JSX.Element;
93
+ //#endregion
94
+ //#region src/ui/story.d.ts
95
+ /** One consequential, inspectable finding from the displayed result. */
96
+ type StoryFinding = {
97
+ id: string;
98
+ headline: string;
99
+ context?: string;
100
+ visual: ReactNode;
101
+ visualKind?: 'metric' | 'chart';
102
+ evidence: WidgetEvidence | MetricDefinition;
103
+ };
104
+ /** One to four findings with unique, nonempty IDs and registered evidence.
105
+ * Receives the displayed result and its original input during refresh or failure. */
106
+ type BoundStory<Data, Input> = (snapshot: DisplayedSnapshot<Data, Input>) => readonly StoryFinding[];
107
+ //#endregion
108
+ //#region src/ui/data-context.d.ts
109
+ type GlossaryEntry = {
110
+ term: string;
111
+ definition: ReactNode;
112
+ queryNames?: string[];
113
+ };
114
+ type DataContext = {
115
+ description: ReactNode;
116
+ glossary: Record<string, GlossaryEntry>;
117
+ identifiers?: Readonly<Record<string, DataIdentifierDefinition>>;
118
+ queryNames?: Readonly<Record<string, string>>;
119
+ };
120
+ type MetricDeclaration = {
121
+ id: string;
122
+ glossaryId: string;
123
+ label?: string;
124
+ format: MetricFormat;
125
+ favorableDirection?: 'up' | 'down';
126
+ queryNames?: readonly string[];
127
+ };
128
+ type EvidenceDeclaration = {
129
+ id: string;
130
+ } & ({
131
+ glossaryIds: readonly [string, ...string[]];
132
+ queryNames?: readonly string[];
133
+ } | {
134
+ queryNames: readonly [string, ...string[]];
135
+ glossaryIds?: readonly string[];
136
+ });
137
+ type AuthoringDataContext = DataContext & {
138
+ metric(definition: MetricDeclaration): MetricDefinition;
139
+ evidence(definition: EvidenceDeclaration): WidgetEvidence;
140
+ };
141
+ /** Bind glossary query references and card evidence to the same registry. */
142
+ declare function createDataContext<const Names extends Record<string, string>>(queryNames: Names): <const Context extends Omit<DataContext, 'glossary'> & {
143
+ glossary: Record<string, Omit<GlossaryEntry, 'queryNames'> & {
144
+ queryNames?: Names[keyof Names][];
145
+ }>;
146
+ }>(context: Context) => Context & {
147
+ queryNames: Names;
148
+ evidence: (input: {
149
+ id: string;
150
+ } & ({
151
+ glossaryIds: readonly [keyof Context["glossary"] & string, ...(keyof Context["glossary"] & string)[]];
152
+ queryNames?: readonly Names[keyof Names][];
153
+ } | {
154
+ queryNames: readonly [Names[keyof Names], ...Names[keyof Names][]];
155
+ glossaryIds?: readonly (keyof Context["glossary"] & string)[];
156
+ })) => WidgetEvidence;
157
+ finding: (input: Omit<StoryFinding, 'evidence'> & {
158
+ evidence: Parameters<(input: {
159
+ id: string;
160
+ } & ({
161
+ glossaryIds: readonly [keyof Context["glossary"] & string, ...(keyof Context["glossary"] & string)[]];
162
+ queryNames?: readonly Names[keyof Names][];
163
+ } | {
164
+ queryNames: readonly [Names[keyof Names], ...Names[keyof Names][]];
165
+ glossaryIds?: readonly (keyof Context["glossary"] & string)[];
166
+ })) => WidgetEvidence>[0];
167
+ }) => StoryFinding & {
168
+ evidence: WidgetEvidence;
169
+ };
170
+ metric: (definition: {
171
+ id: string;
172
+ glossaryId: keyof Context['glossary'] & string;
173
+ label?: string;
174
+ format: MetricFormat;
175
+ favorableDirection?: 'up' | 'down';
176
+ queryNames?: readonly Names[keyof Names][];
177
+ }) => MetricDefinition;
178
+ };
179
+ //#endregion
180
+ //#region src/ui/Sheet.d.ts
181
+ type SheetDialogProps = Omit<ComponentPropsWithRef<'dialog'>, 'children' | 'open' | 'title' | 'aria-labelledby'>;
182
+ type SheetProps = {
183
+ open: boolean;
184
+ onOpenChange: (open: boolean) => void;
185
+ title: ReactNode;
186
+ description?: ReactNode;
187
+ children: ReactNode;
188
+ headerActions?: ReactNode;
189
+ footer?: ReactNode;
190
+ wide?: boolean;
191
+ placement?: 'side' | 'center';
192
+ /** Edge for side placement. Defaults to right; small screens use a bottom sheet. */
193
+ side?: 'left' | 'right';
194
+ returnFocus?: RefObject<HTMLElement | SVGElement | null>;
195
+ } & SheetDialogProps;
196
+ /**
197
+ * Uses the native dialog top layer and focus trap. Closing keeps the modal mounted until its
198
+ * exit transition completes.
199
+ */
200
+ declare function Sheet({ open, onOpenChange, title, description, children, headerActions, footer, wide, placement, side, returnFocus, className, onCancel, onClose, onClick, onTransitionEnd, ref, ...props }: SheetProps): import("react").JSX.Element;
201
+ //#endregion
202
+ //#region src/ui/AboutData.d.ts
203
+ type InspectionRecords = {
204
+ scope: string;
205
+ content: ReactNode;
206
+ };
207
+ type AboutTab = 'records' | 'glossary' | 'queries';
208
+ type AboutEmpty = {
209
+ glossary: {
210
+ title: string;
211
+ description?: string;
212
+ };
213
+ queries: {
214
+ title: string;
215
+ description?: string;
216
+ };
217
+ };
218
+ type AboutSubject = {
219
+ empty?: AboutEmpty;
220
+ id?: string;
221
+ title?: ReactNode;
222
+ description?: ReactNode;
223
+ visual?: ReactNode;
224
+ visualKind?: 'metric' | 'chart' | 'widget';
225
+ dataContext?: DataContext;
226
+ references?: {
227
+ kind: 'ids';
228
+ glossaryIds?: readonly string[];
229
+ queryNames?: readonly string[];
230
+ } | {
231
+ kind: 'entries';
232
+ entries: readonly GlossaryEntry[];
233
+ };
234
+ queries?: DisclosedQuery[];
235
+ records?: InspectionRecords;
236
+ };
237
+ type AboutDataProps = AboutSubject & {
238
+ variant?: ButtonProps['variant'];
239
+ iconOnly?: boolean;
240
+ /**
241
+ * Register the global inspect shortcut. Defaults on for existing toolbar triggers; local
242
+ * triggers set false.
243
+ */
244
+ shortcut?: boolean;
245
+ tooltip?: ReactNode;
246
+ children?: ReactNode;
247
+ footer?: ReactNode;
248
+ portalRoot?: RefObject<HTMLElement | null>;
249
+ sheetProps?: SheetDialogProps;
250
+ headerActions?: ReactNode;
251
+ open?: boolean;
252
+ onOpenChange?: (open: boolean) => void;
253
+ /** Initial inspect tab. While open, the URL's `tab` parameter tracks selection. */
254
+ tab?: AboutTab;
255
+ trigger?: boolean;
256
+ } & Omit<ComponentPropsWithRef<'button'>, 'children' | 'title'>;
257
+ declare function AboutData(props: AboutDataProps): import("react").JSX.Element;
258
+ //#endregion
259
+ //#region src/ui/WidgetEvidence.d.ts
260
+ type EvidenceDetails = Omit<AboutSubject, 'id' | 'title' | 'description' | 'visual' | 'visualKind' | 'references'> & {
261
+ id: string;
262
+ };
263
+ type WidgetEvidence = EvidenceDetails & ({
264
+ glossaryIds: [string, ...string[]];
265
+ queryNames?: string[];
266
+ } | {
267
+ queryNames: [string, ...string[]];
268
+ glossaryIds?: string[];
269
+ });
270
+ //#endregion
271
+ //#region src/ui/presentation.d.ts
272
+ type EmptyContent = {
273
+ title: ReactNode;
274
+ description?: ReactNode;
275
+ /** A relevant recovery action; omit when there is nothing the user can change. */
276
+ action?: ReactNode;
277
+ };
278
+ type SkeletonContent = {
279
+ variant: 'metric' | 'panel' | 'ranking';
280
+ /**
281
+ * Placeholder rows, clamped to 0–100.
282
+ * @default 4
283
+ */
284
+ rows?: number;
285
+ };
286
+ /** A bound widget must explain empty results and link the reading to its evidence. */
287
+ type BoundWidgetReading<Data> = {
288
+ reading: DataReading<Data>;
289
+ isEmpty: (data: Data) => boolean;
290
+ emptyFallback: EmptyContent;
291
+ evidence: WidgetEvidence;
292
+ skeleton?: SkeletonContent;
293
+ };
294
+ //#endregion
295
+ //#region src/ui/ExplorationActionControl.d.ts
296
+ /** A resolved action available for one displayed exploration item. */
297
+ type ExplorationAction = {
298
+ id: string;
299
+ label: string;
300
+ onSelect: (trigger?: HTMLElement | SVGElement) => void;
301
+ /** Keep this action directly available when other actions require a menu. */
302
+ primary?: boolean;
303
+ /** Keep utility actions separate from exploration destinations. */
304
+ group?: 'clipboard';
305
+ };
306
+ /** Resolves the actions available for a displayed domain row. */
307
+ type ItemActions<Row> = (row: Row) => readonly ExplorationAction[];
308
+ type ExplorationActionControlProps = {
309
+ actions: readonly ExplorationAction[];
310
+ /** Identifies the item whose actions the control exposes. */
311
+ ariaLabel: string;
312
+ /** Use when another item-level hit target already exposes the primary action. */
313
+ hidePrimary?: boolean;
314
+ /** Own a context menu without adding a second visible or keyboard trigger. */
315
+ contextOnly?: boolean;
316
+ /** Chart labels use a chevron; other action menus use an ellipsis. */
317
+ indicator?: 'ellipsis' | 'chevron';
318
+ /** Shares this menu trigger with an item's context and keyboard actions. */
319
+ ref?: Ref<HTMLButtonElement>;
320
+ className?: string;
321
+ };
322
+ /**
323
+ * Presents exploration actions consistently: a sole action is direct, an explicit
324
+ * primary action stays direct, and all available choices remain in the menu.
325
+ */
326
+ declare function ExplorationActionControl({ actions, ariaLabel, className, hidePrimary, contextOnly, indicator, ref }: ExplorationActionControlProps): import("react").JSX.Element | null;
327
+ //#endregion
328
+ //#region src/ui/csv-export.d.ts
329
+ type CsvCell = string | number | boolean | null | undefined;
330
+ /** One named dataset with ordered columns and raw displayed values. */
331
+ type CsvTable = {
332
+ name: string;
333
+ columns: readonly string[];
334
+ rows: readonly (readonly CsvCell[])[];
335
+ };
336
+ /** All distinct datasets in the displayed result; filename names the download. */
337
+ type CsvExport = {
338
+ filename: string;
339
+ tables: readonly [CsvTable, ...CsvTable[]];
340
+ };
341
+ //#endregion
342
+ //#region src/ui/SearchField.d.ts
343
+ type SearchFieldProps = {
344
+ label: string;
345
+ value: string;
346
+ onChange: (value: string) => void;
347
+ onSubmit?: (value: string) => void;
348
+ placeholder?: string;
349
+ showLabel?: boolean;
350
+ /** Enable page search shortcuts on one primary search field per app. */
351
+ focusShortcut?: boolean;
352
+ size?: 'default' | 'compact';
353
+ description?: ReactNode;
354
+ status?: ReactNode;
355
+ busy?: boolean;
356
+ resetValue?: string;
357
+ inputProps?: Omit<ComponentPropsWithRef<'input'>, 'type' | 'value' | 'children'>;
358
+ children?: ReactNode;
359
+ } & Omit<ComponentPropsWithRef<'form'>, 'onChange' | 'onSubmit' | 'children'>;
360
+ /**
361
+ * The caller owns filtering, URL state, and whether search runs while typing or on submit.
362
+ * Escape and Clear reset the query.
363
+ */
364
+ declare function SearchField({ label, value, onChange, onSubmit, placeholder, showLabel, focusShortcut, size, description, status, busy, resetValue, inputProps, children, className, ...props }: SearchFieldProps): import("react").JSX.Element;
365
+ //#endregion
366
+ //#region src/ui/SearchTypeahead.d.ts
367
+ type SearchSuggestion = {
368
+ id: string;
369
+ title: string;
370
+ description?: string;
371
+ /** Override completing the query with this title, for example to open record details. */
372
+ onSelect?: () => void;
373
+ };
374
+ type SearchTypeaheadProps = SearchFieldProps & {
375
+ /** Suggestions from the displayed result, in its order. No additional filtering or request. */
376
+ items: readonly SearchSuggestion[];
377
+ };
378
+ /** An editable combobox with manual selection: typing searches, selecting completes the query unless overridden.
379
+ * Input retains focus during navigation; Escape dismisses suggestions before clearing search. */
380
+ declare function SearchTypeahead({ items, busy, inputProps, ...props }: SearchTypeaheadProps): import("react").JSX.Element;
381
+ //#endregion
382
+ //#region src/ui/DataTable.d.ts
383
+ type DataTableSearch = Pick<SearchFieldProps, 'label' | 'placeholder' | 'value' | 'onChange' | 'resetValue' | 'inputProps'> & {
384
+ /** Number of available records before filtering or a display limit. */
385
+ itemCount: number;
386
+ };
387
+ type DataTableProps = ComponentPropsWithRef<'table'> & {
388
+ searchable?: DataTableSearch;
389
+ };
390
+ /** Scrollable native table. Mark quantitative th/td cells with data-type="number";
391
+ * the runtime aligns them to the end and uses tabular digits. */
392
+ declare function DataTable({ className, ref, searchable, ...props }: DataTableProps): import("react").JSX.Element;
393
+ /** Accepts a fraction of the stated whole, using `formatPercent` semantics. */
394
+ declare function DataTableShare({ value }: {
395
+ value: number;
396
+ }): import("react").JSX.Element;
397
+ type DataTableEmptyRowProps = EmptyContent & {
398
+ colSpan: number;
399
+ };
400
+ declare function DataTableEmptyRow({ colSpan, title, description, action }: DataTableEmptyRowProps): import("react").JSX.Element;
401
+ type DataTableTimestampProps = {
402
+ value: string | Date | number;
403
+ children?: ReactNode;
404
+ timeZone?: string;
405
+ locale?: string;
406
+ precision?: 'minute' | 'second';
407
+ };
408
+ declare function DataTableTimestamp({ value, children, timeZone, locale, precision }: DataTableTimestampProps): import("react").JSX.Element;
409
+ //#endregion
410
+ //#region src/ui/RequestHint.d.ts
411
+ /** Idle keeps the same reserved space as refresh and failure. Initial loading belongs to skeletons. */
412
+ type WidgetStatus = {
413
+ kind: 'idle';
414
+ } | {
415
+ kind: 'updating';
416
+ message?: string;
417
+ } | {
418
+ kind: 'error';
419
+ message?: string;
420
+ onRetry?: () => void;
421
+ };
422
+ //#endregion
423
+ //#region src/ui/searchItems.d.ts
424
+ type SearchRange = {
425
+ start: number;
426
+ end: number;
427
+ };
428
+ /** The exact displayed text and its offsets stay together for safe rendering. */
429
+ type SearchMatchValue = {
430
+ text: string;
431
+ ranges: readonly SearchRange[];
432
+ };
433
+ type SearchAttribute<Item> = {
434
+ name: string;
435
+ getter: (item: Item) => string;
436
+ weight?: number;
437
+ };
438
+ type SearchHit<Item> = {
439
+ item: Item;
440
+ score: number;
441
+ /** Render displayed fields with <SearchMatch match={hit.matches.fieldName} />. */
442
+ matches: Record<string, SearchMatchValue>;
443
+ };
444
+ type SearchItemsOptions<Item> = {
445
+ attributes: readonly [SearchAttribute<Item>, ...SearchAttribute<Item>[]];
446
+ /** Literal filtering preserves source order; fuzzy search ranks discovery results. */
447
+ mode?: 'literal' | 'fuzzy';
448
+ limit?: number;
449
+ fuzzyThreshold?: number;
450
+ };
451
+ /** Highlight literal query terms in supplied text without filtering or reordering results. */
452
+ declare function matchSearchText(text: string, query: string): SearchMatchValue;
453
+ /**
454
+ * Search only a complete local collection. Empty queries retain every item.
455
+ * When a searched field is displayed, render its match with SearchMatch:
456
+ * `hits.map(hit => <SearchMatch match={hit.matches.name} />)`.
457
+ * Fields used only to find a row need no visible highlight.
458
+ */
459
+ declare function searchItems<Item>(items: readonly Item[], query: string, options: SearchItemsOptions<Item>): SearchHit<Item>[];
460
+ //#endregion
461
+ //#region src/ui/TableWidget.d.ts
462
+ type TableWidgetColumn<Row> = {
463
+ /** Stable, nonempty identity; unique within this table. */
464
+ id: string;
465
+ header: ReactNode;
466
+ type?: 'number' | 'datetime';
467
+ /** Render this column's value for one row. The table owns its cell element and semantics. */
468
+ cell: (row: Row, hit?: SearchHit<Row>) => ReactNode;
469
+ };
470
+ type TableWidgetSearch<Row> = Omit<DataTableSearch, 'itemCount'> & Pick<SearchItemsOptions<Row>, 'attributes' | 'mode' | 'fuzzyThreshold'>;
471
+ type TableDisplayMode = {
472
+ /** Positive integer preview cap after search; disables pagination. */
473
+ limit: number;
474
+ pagination?: never;
475
+ } | {
476
+ /** Local pagination after search: 10 rows by default, false shows all supplied rows.
477
+ * pageSize must be a positive integer. Counts refer only to supplied rows.
478
+ * The widget owns bottom-footer controls and shares the current page with inspection. */
479
+ pagination?: {
480
+ pageSize: number;
481
+ } | false;
482
+ limit?: never;
483
+ };
484
+ type TableWidgetBaseProps<Row> = {
485
+ title: ReactNode;
486
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
487
+ annotationId?: string;
488
+ /** Show the matching supplied-row count before pagination or limits. Defaults to true. */
489
+ showCount?: boolean;
490
+ /** Override the derived count, for example with a server total. Hidden when showCount is false or loading. */
491
+ count?: number;
492
+ /** Clear only filters affecting this dataset. Supply only while those filters are active; enables empty-result recovery. */
493
+ onClearFilters?: () => void;
494
+ description?: ReactNode;
495
+ columns: readonly [TableWidgetColumn<Row>, ...TableWidgetColumn<Row>[]];
496
+ /** Unique, nonempty row identity. Numeric keys must be finite; 1 and "1" collide. */
497
+ rowKey: (row: Row) => string | number;
498
+ status?: WidgetStatus;
499
+ action?: ReactNode;
500
+ evidence?: WidgetEvidence;
501
+ search?: TableWidgetSearch<Row>;
502
+ /** Valid result with no rows; the header remains visible. */
503
+ emptyFallback: EmptyContent;
504
+ /** No local search matches or explicitly filtered results. Defaults to “No matching results” with recovery guidance. */
505
+ noMatchesFallback?: EmptyContent;
506
+ } & TableDisplayMode & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
507
+ /** Composes VisualizationWidget with DataTable, search, and local pagination.
508
+ * Columns own header and body semantics; the first column is the row header.
509
+ * Use DataTable inside VisualizationWidget directly for custom table markup. */
510
+ type TableWidgetProps<Row> = TableWidgetBaseProps<Row> & ({
511
+ rows: readonly Row[];
512
+ reading?: never;
513
+ skeletonRows?: never;
514
+ } | {
515
+ reading: DataReading<readonly Row[]>;
516
+ rows?: never;
517
+ skeletonRows?: number;
518
+ evidence: WidgetEvidence;
519
+ });
520
+ declare function TableWidget<Row>(props: TableWidgetProps<Row>): import("react").JSX.Element;
521
+ //#endregion
522
+ //#region src/styles.d.ts
523
+ interface DataAppStylesOptions {
524
+ /** Defaults to the current browser document. */
525
+ document?: Document;
526
+ /** Nonce permitted by the document's style-src CSP. */
527
+ nonce?: string;
528
+ }
529
+ /** Install the complete UI stylesheet once per document, before mounting. */
530
+ declare function injectDataAppStyles(options?: DataAppStylesOptions): HTMLStyleElement;
531
+ //#endregion
532
+ //#region src/style-contract.d.ts
533
+ /** Public custom-property names for authoring types and validation. CSS owns their defaults. */
534
+ declare const dataAppStyleTokens: readonly ['--atbl-control-text-size', '--atbl-annotation-accent', '--atbl-annotation-accent-hover', '--atbl-annotation-on-accent', '--atbl-annotation-highlight', '--atbl-background', '--atbl-surface', '--atbl-subtle', '--atbl-text', '--atbl-muted', '--atbl-border', '--atbl-accent', '--atbl-accent-subtle', '--atbl-on-accent', '--atbl-positive', '--atbl-negative', '--atbl-danger', '--atbl-danger-subtle', '--atbl-backdrop', '--atbl-code-surface', '--atbl-code-text', '--atbl-code-keyword', '--atbl-chart-fill', '--atbl-control-hover-border', '--atbl-focus-color', '--atbl-focus-outline', '--atbl-focus-ring-offset', '--atbl-focus-ring-inset', '--atbl-font', '--atbl-font-heading', '--atbl-mono-font', '--atbl-space-xs', '--atbl-space-sm', '--atbl-space-md', '--atbl-space-lg', '--atbl-space-xl', '--atbl-layout-gap', '--atbl-surface-padding', '--atbl-content-width', '--atbl-control-height', '--atbl-dropdown-padding', '--atbl-dropdown-item-padding-block', '--atbl-dropdown-item-padding-inline', '--atbl-dropdown-item-gap', '--atbl-radius-control', '--atbl-radius-surface', '--atbl-radius-overlay', '--atbl-shadow-surface', '--atbl-shadow-overlay', '--atbl-shadow-control', '--atbl-cursor-action', '--atbl-cursor-disabled', '--atbl-cursor-help', '--atbl-duration-fast', '--atbl-duration-normal', '--atbl-duration-slow', '--atbl-ease-standard', '--atbl-ease-enter', '--atbl-chart-1', '--atbl-chart-2', '--atbl-chart-3', '--atbl-chart-4', '--atbl-chart-5', '--atbl-chart-6', '--atbl-chart-7', '--atbl-chart-8', '--atbl-type-emphasis-weight', '--atbl-type-meta-weight', '--atbl-type-page-size', '--atbl-type-section-size', '--atbl-type-widget-size', '--atbl-type-body-size', '--atbl-type-label-size', '--atbl-type-meta-size', '--atbl-type-metric-size', '--atbl-type-heading-weight', '--atbl-type-label-weight', '--atbl-type-body-leading', '--atbl-type-label-leading', '--atbl-type-heading-leading', '--atbl-type-metric-leading', '--atbl-text-measure', '--atbl-control-compact-height', '--atbl-control-icon-size', '--atbl-control-padding-inline', '--atbl-control-padding-block', '--atbl-control-gap', '--atbl-control-disabled-opacity', '--atbl-cursor-busy', '--atbl-control-hover-surface', '--atbl-control-pressed-surface', '--atbl-control-open-surface', '--atbl-control-open-border', '--atbl-control-selected-surface', '--atbl-control-selected-text'];
535
+ declare const dataAppStyleHooks: {
536
+ readonly 'data-atbl-focus': readonly ['ring', 'inset', 'group'];
537
+ readonly 'data-atbl-control': readonly ['default', 'action', 'help', 'text'];
538
+ };
539
+ type DataAppStyleToken = (typeof dataAppStyleTokens)[number];
540
+ /** React style properties with checked public Altertable custom properties. */
541
+ type DataAppStyle = CSSProperties & Partial<Record<DataAppStyleToken, string | number>>;
542
+ type DataAppStyleHooks = { [Name in keyof typeof dataAppStyleHooks]?: (typeof dataAppStyleHooks)[Name][number]; };
543
+ //#endregion
544
+ //#region src/mount.d.ts
545
+ /** Mount once per document; installs document identity and the shared request provider. */
546
+ declare function mountDataApp<const Queries extends QueryDefinitions>({ app, component: Component, root }: {
547
+ app: DataAppDefinition<Queries>;
548
+ component: ComponentType;
549
+ root?: HTMLElement | null;
550
+ }): void;
551
+ /** Provide one app identity and shared requests to a custom React root. */
552
+ declare function DataAppProvider<const Queries extends QueryDefinitions>({ app, children }: {
553
+ app: DataAppDefinition<Queries>;
554
+ children: ReactNode;
555
+ }): import("react").JSX.Element;
556
+ //#endregion
557
+ //#region src/ui/variables.d.ts
558
+ /** URL is the source of truth for app variables; one update can change dependent values atomically. */
559
+ declare function useAppVariables<const Variables extends VariableCollection>(definitions: Variables): {
560
+ values: AppVariableValues<Variables>;
561
+ set: <Key extends keyof Variables & string>(name: Key, value: AppVariableValues<Variables>[Key]) => void;
562
+ reset: <Key extends keyof Variables & string>(name: Key) => void;
563
+ resetAll: () => void;
564
+ clearAll: () => void;
565
+ update: (next: Partial<AppVariableValues<Variables>>, history?: HistoryMode) => void;
566
+ bind: <Key extends keyof Variables & string>(name: Key) => {
567
+ value: AppVariableValues<Variables>[Key];
568
+ onChange(value: AppVariableValues<Variables>[Key]): void;
569
+ resetValue: AppVariableValues<Variables>[Key];
570
+ };
571
+ };
572
+ //#endregion
573
+ //#region src/ui/DataAppFrame.d.ts
574
+ type DataAppBaseProps = {
575
+ children: ReactNode;
576
+ dataContext: DataContext;
577
+ /** Override the declared subtitle; null hides it. */
578
+ description?: ReactNode;
579
+ toolbarActions?: ReactNode;
580
+ footerActions?: ReactNode;
581
+ /** Optional source, coverage, or methodology note below the app content.
582
+ * Compose prose and inline components; typography and spacing are provided.
583
+ * Put data widgets in children and app controls in footerActions. */
584
+ footer?: ReactNode;
585
+ };
586
+ type DataAppControlProps = {
587
+ /** Show declared search controls. Defaults to true; hiding preserves their values. */
588
+ showSearch?: boolean;
589
+ /** Show declared filter controls, including display options. Defaults to true; hiding preserves their values. */
590
+ showFilters?: boolean;
591
+ };
592
+ type StaticDataAppProps = DataAppBaseProps & {
593
+ csvExport?: CsvExport;
594
+ queries?: DisclosedQuery[];
595
+ };
596
+ //#endregion
597
+ //#region src/ui/DataValue.d.ts
598
+ type DataValueProps<Value> = {
599
+ reading: DataReading<Value>;
600
+ loadingFallback: ReactNode;
601
+ children: (value: Value) => ReactNode;
602
+ } & Omit<ComponentPropsWithRef<'span'>, 'children'>;
603
+ /** Bind inline content to displayed data. Keep static wording outside this span. */
604
+ declare function DataValue<Value>({ reading, loadingFallback, children, ...props }: DataValueProps<Value>): import("react").JSX.Element;
605
+ //#endregion
606
+ //#region src/ui/MetricWidget.d.ts
607
+ type MetricWidgetBaseProps = {
608
+ label: string;
609
+ /** Document outline level. The label keeps the shared widget-heading appearance. */
610
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
611
+ annotationId?: string;
612
+ description?: ReactNode;
613
+ comparison?: MetricComparison;
614
+ evidence?: WidgetEvidence;
615
+ records?: InspectionRecords;
616
+ action?: ReactNode;
617
+ status?: WidgetStatus;
618
+ visual?: ReactNode;
619
+ } & Omit<ComponentPropsWithRef<'div'>, 'about' | 'children'>;
620
+ type UnboundMetricWidgetProps = MetricWidgetBaseProps & ({
621
+ loading: true;
622
+ value?: never;
623
+ format?: never;
624
+ content?: never;
625
+ } | ({
626
+ loading?: false;
627
+ } & ({
628
+ value: number;
629
+ format: MetricFormat;
630
+ content?: never;
631
+ } | {
632
+ content: ReactNode;
633
+ value?: never;
634
+ format?: never;
635
+ })));
636
+ /** VisualizationWidget with a formatted metric, optional comparison, and evidence. */
637
+ type MetricWidgetProps = UnboundMetricWidgetProps | (Omit<MetricWidgetBaseProps, 'label' | 'comparison' | 'evidence'> & {
638
+ metric: MetricDefinition;
639
+ reading: MetricReading;
640
+ label?: never;
641
+ value?: never;
642
+ format?: never;
643
+ content?: never;
644
+ comparison?: never;
645
+ evidence?: never;
646
+ loading?: never;
647
+ });
648
+ declare function MetricWidget(props: MetricWidgetProps): import("react").JSX.Element;
649
+ //#endregion
650
+ //#region src/ui/DataWidget.d.ts
651
+ type DataWidgetBaseProps = {
652
+ title: ReactNode;
653
+ /** Document outline level. The widget title keeps the shared widget-heading appearance. */
654
+ headingLevel?: 2 | 3 | 4 | 5 | 6;
655
+ /** Unique stable target for persisted feedback; overrides automatic evidence identity. */
656
+ annotationId?: string;
657
+ /** Result count beside the heading. Derive from the displayed result; zero is visible. */
658
+ count?: number;
659
+ description?: ReactNode;
660
+ evidence?: WidgetEvidence;
661
+ /** Lazy detail records rendered as the first inspection tab. */
662
+ records?: InspectionRecords;
663
+ action?: ReactNode;
664
+ /** Reserved feedback slot; retain displayed content while refreshing or after failure. */
665
+ status?: WidgetStatus;
666
+ footer?: ReactNode;
667
+ bodyPadding?: 'inset' | 'flush';
668
+ } & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
669
+ /** Owns loading, empty content, actions, and inspection. Page and sheet mount the same
670
+ * body and footer; hold interactive child state above the widget to share it across mounts.
671
+ * A bound reading requires evidence; its child renderer runs only for nonempty ready data. */
672
+ type DataWidgetProps<Data = unknown> = DataWidgetBaseProps & ((BoundWidgetReading<Data> & {
673
+ children: (data: Data) => ReactNode;
674
+ }) | {
675
+ reading?: never;
676
+ isEmpty?: never;
677
+ skeleton?: never;
678
+ emptyFallback?: EmptyContent;
679
+ children: ReactNode;
680
+ });
681
+ declare function DataWidget<Data>(props: DataWidgetProps<Data>): import("react").JSX.Element;
682
+ //#endregion
683
+ //#region src/ui/TextWidget.d.ts
684
+ type TextWidgetBaseProps = Omit<Extract<DataWidgetProps, {
685
+ reading?: never;
686
+ }>, 'reading' | 'children' | 'isEmpty' | 'empty' | 'skeleton' | 'bodyPadding'>;
687
+ /** Narrative sibling of VisualizationWidget, composing DataWidget with TextContent.
688
+ * Use TextContent directly for borderless prose. Bind claims and scope to the same displayed reading.
689
+ * The renderer handles every ready value, including zero and empty collections. */
690
+ type TextWidgetProps<Data = unknown> = TextWidgetBaseProps & ({
691
+ reading: DataReading<Data>;
692
+ evidence: WidgetEvidence;
693
+ children: (data: Data) => ReactNode;
694
+ } | {
695
+ reading?: never;
696
+ children: ReactNode;
697
+ });
698
+ declare function TextWidget<Data>(props: TextWidgetProps<Data>): import("react").JSX.Element;
699
+ //#endregion
700
+ //#region src/ui/VisualizationWidget.d.ts
701
+ type VisualizationWidgetBaseProps = Pick<DataWidgetProps, 'title' | 'headingLevel' | 'annotationId' | 'description' | 'count' | 'action' | 'evidence' | 'records' | 'status' | 'emptyFallback'> & {
702
+ /** Footer controls, such as table pagination. */
703
+ footer?: ReactNode;
704
+ } & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
705
+ type UnboundVisualizationWidgetProps = VisualizationWidgetBaseProps & ({
706
+ loading: true;
707
+ loadingContent?: ReactNode;
708
+ visual?: never;
709
+ } | {
710
+ loading?: false;
711
+ visual: ReactNode;
712
+ loadingContent?: never;
713
+ });
714
+ type VisualizationWidgetView<Data> = {
715
+ /** Stable, nonempty identity; unique within this widget. */
716
+ id: string;
717
+ label: ReactNode;
718
+ render: (data: Data) => ReactNode;
719
+ };
720
+ type BoundVisualizationWidgetBase<Data> = VisualizationWidgetBaseProps & BoundWidgetReading<Data> & {
721
+ visual?: never;
722
+ loading?: never;
723
+ };
724
+ /** DataWidget frame for charts, DataTable, metrics, or a custom data display.
725
+ * Owns alternate-view selection and shares it with inspection. Built-in charts own
726
+ * transient tooltips; lift persistent custom interactions above both mounts.
727
+ * For narrative prose use the sibling TextWidget, which composes DataWidget directly. */
728
+ type VisualizationWidgetProps<Data = unknown> = UnboundVisualizationWidgetProps | (BoundVisualizationWidgetBase<Data> & {
729
+ children: (data: Data) => ReactNode;
730
+ views?: never;
731
+ }) | (BoundVisualizationWidgetBase<Data> & {
732
+ views: readonly VisualizationWidgetView<Data>[];
733
+ viewLabel: string;
734
+ /** An existing view ID; defaults to the first view. Validated while loading too. */
735
+ initialView?: string;
736
+ children?: never;
737
+ });
738
+ /** Compose an unframed visual with the shared heading and inspection. */
739
+ declare function VisualizationWidget<Data>(props: VisualizationWidgetProps<Data>): import("react").JSX.Element;
740
+ //#endregion
741
+ //#region src/ui/HelpPopover.d.ts
742
+ type HelpPopoverTriggerProps = Omit<ComponentPropsWithRef<'button'>, 'children' | 'type'> & DataAppStyleHooks;
743
+ type HelpPopoverPanelProps = Omit<ComponentPropsWithRef<'section'>, 'children' | 'role'>;
744
+ type HelpPopoverProps = {
745
+ trigger: ReactNode;
746
+ triggerLabel: string;
747
+ label: string;
748
+ children: ReactNode;
749
+ placement?: Placement;
750
+ portalRoot?: RefObject<HTMLElement | null>;
751
+ triggerProps?: HelpPopoverTriggerProps;
752
+ panelProps?: HelpPopoverPanelProps;
753
+ open?: boolean;
754
+ onOpenChange?: (open: boolean) => void;
755
+ };
756
+ /** A supplemental explanation that opens on click, Enter, or a deliberate mouse hover. Tabbing
757
+ * past the trigger does not open it, and a click keeps a hover-opened panel in place.
758
+ * triggerProps and panelProps target its two surfaces. */
759
+ declare function HelpPopover({ trigger, triggerLabel, label, children, portalRoot, triggerProps, panelProps, placement, open: openProp, onOpenChange }: HelpPopoverProps): import("react").JSX.Element;
760
+ //#endregion
761
+ //#region src/ui/icons.d.ts
762
+ /** Use semantic names to keep icon meaning and optical size consistent across controls. */
763
+ declare const brandedIcons: {
764
+ readonly annotate: import("lucide-react").LucideIcon;
765
+ readonly cancel: import("lucide-react").LucideIcon;
766
+ readonly calendar: import("lucide-react").LucideIcon;
767
+ readonly clock: import("lucide-react").LucideIcon;
768
+ readonly check: import("lucide-react").LucideIcon;
769
+ readonly disclosure: import("lucide-react").LucideIcon;
770
+ readonly breakdown: import("lucide-react").LucideIcon;
771
+ readonly moreActions: import("lucide-react").LucideIcon;
772
+ readonly previousMonth: import("lucide-react").LucideIcon;
773
+ readonly nextMonth: import("lucide-react").LucideIcon;
774
+ readonly explore: import("lucide-react").LucideIcon;
775
+ /** @deprecated Use openDetails for inspection triggers. */
776
+ readonly inspect: import("lucide-react").LucideIcon;
777
+ readonly info: import("lucide-react").LucideIcon;
778
+ readonly openDetails: import("lucide-react").LucideIcon;
779
+ readonly present: import("lucide-react").LucideIcon;
780
+ readonly export: import("lucide-react").LucideIcon;
781
+ readonly error: import("lucide-react").LucideIcon;
782
+ readonly close: import("lucide-react").LucideIcon;
783
+ readonly filters: import("lucide-react").LucideIcon;
784
+ readonly clearFilters: import("lucide-react").LucideIcon;
785
+ readonly displayOptions: import("lucide-react").LucideIcon;
786
+ readonly previous: import("lucide-react").LucideIcon;
787
+ readonly next: import("lucide-react").LucideIcon;
788
+ readonly lightTheme: import("lucide-react").LucideIcon;
789
+ readonly darkTheme: import("lucide-react").LucideIcon;
790
+ readonly live: import("lucide-react").LucideIcon;
791
+ readonly loading: import("lucide-react").LucideIcon;
792
+ readonly refresh: import("lucide-react").LucideIcon;
793
+ readonly stop: import("lucide-react").LucideIcon;
794
+ readonly reset: import("lucide-react").LucideIcon;
795
+ readonly search: import("lucide-react").LucideIcon;
796
+ readonly copy: import("lucide-react").LucideIcon;
797
+ readonly sql: import("lucide-react").LucideIcon;
798
+ readonly wrap: import("lucide-react").LucideIcon;
799
+ readonly trendDown: import("lucide-react").LucideIcon;
800
+ readonly trendFlat: import("lucide-react").LucideIcon;
801
+ readonly trendUp: import("lucide-react").LucideIcon;
802
+ };
803
+ type AppIconName = keyof typeof brandedIcons;
804
+ type AppIconProps = Omit<LucideProps, 'size'> & {
805
+ name: AppIconName;
806
+ size?: number | string;
807
+ };
808
+ declare function AppIcon({ name, size, strokeWidth, style, ...props }: AppIconProps): import("react").FunctionComponentElement<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
809
+ //#endregion
810
+ //#region src/ui/Tooltip.d.ts
811
+ type TooltipProviderProps = {
812
+ children: ReactNode;
813
+ delay?: number;
814
+ skipDelayDuration?: number;
815
+ };
816
+ /** Delay the first hover, then open nearby tooltips without waiting during the skip window.
817
+ * Keyboard focus always opens immediately. AppLayout provides this by default. */
818
+ declare function TooltipProvider({ children, delay, skipDelayDuration }: TooltipProviderProps): import("react").JSX.Element;
819
+ type TooltipProps = {
820
+ content: ReactNode;
821
+ children: ReactNode;
822
+ variant?: 'hint' | 'chart';
823
+ onOpenChange?: (open: boolean) => void;
824
+ align?: 'start' | 'center' | 'end';
825
+ placement?: 'top' | 'bottom';
826
+ portalRoot?: RefObject<HTMLElement | null>;
827
+ } & Omit<ComponentPropsWithRef<'span'>, 'children' | 'content'>;
828
+ /** Short visual hint for an already labeled control. variant="chart" follows the cursor
829
+ * on hover and toggles on tap so a bar or point can show the period and value. Chart
830
+ * tooltips dismiss on scroll and do not open on keyboard focus. Hint
831
+ * tooltips hide once the control is pressed. Escape closes either. */
832
+ declare function Tooltip({ content, children, onOpenChange, variant, align, placement, portalRoot, className, ref, onPointerEnter, onPointerMove, onPointerLeave, onPointerDown, onFocusCapture, onBlurCapture, ...props }: TooltipProps): import("react").JSX.Element;
833
+ //#endregion
834
+ //#region src/ui/SectionHeading.d.ts
835
+ type SectionHeadingProps = {
836
+ children: ReactNode;
837
+ /** Document outline level. Defaults to the section level below the page title. */
838
+ level?: 2 | 3 | 4 | 5 | 6;
839
+ } & Omit<ComponentPropsWithRef<'h2'>, 'children'>;
840
+ /** A section title with the shared section-heading appearance. */
841
+ declare function SectionHeading({ children, level, className, ...props }: SectionHeadingProps): import("react").JSX.Element;
842
+ //#endregion
843
+ //#region src/ui/DateDisplay.d.ts
844
+ type DateDisplayProps = {
845
+ value: string | Date | number | null | undefined;
846
+ /** Calendar dates stay dates; instants require a Date, epoch milliseconds, or an offset-bearing ISO string. */
847
+ format?: DateFormat;
848
+ } & Omit<ComponentPropsWithRef<'time'>, 'children' | 'dateTime'>;
849
+ /** Readable dates with exact-time disclosure for instants; invalid or ambiguous values render as missing. */
850
+ declare function DateDisplay({ value, format, className, ...props }: DateDisplayProps): import("react").JSX.Element;
851
+ //#endregion
852
+ //#region src/date-formatting.d.ts
853
+ /** Resolve date display defaults for custom charts and narrative. Explicit options override the view and app. */
854
+ declare function useDateFormatting(options?: {
855
+ locale?: string;
856
+ timeZone?: string;
857
+ }): {
858
+ locale: string;
859
+ timeZone: string;
860
+ };
861
+ //#endregion
862
+ export { TableWidgetColumn as $, defineDataIdentifiers as $t, AppVariableValues$1 as A, EmptyContent as At, dateRangeVariable as B, DataContext as Bt, MetricWidgetProps as C, CsvCell as Ct, DataAppControlProps as D, ExplorationActionControl as Dt, DataAppBaseProps as E, ExplorationAction as Et, DateRangeVariableOptions as F, AboutSubject as Ft, mountDataApp as G, StoryFinding as Gt, searchVariable as H, GlossaryEntry as Ht, MultiChoiceVariable as I, AboutTab as It, DataAppStyleToken as J, MetricDefinition as Jt, DataAppStyle as K, PresentStory as Kt, SearchVariable as L, Sheet as Lt, ChoiceVariable$1 as M, AboutData as Mt, DateRangeSelection as N, AboutDataProps as Nt, StaticDataAppProps as O, ExplorationActionControlProps as Ot, DateRangeVariable$1 as P, AboutEmpty as Pt, TableWidget as Q, TableIdentifier as Qt, VariablePresentation as R, SheetProps as Rt, MetricWidget as S, SearchFieldProps as St, DataValueProps as T, CsvTable as Tt, useAppVariables as U, createDataContext as Ut, multiChoiceVariable as V, EvidenceDeclaration as Vt, DataAppProvider as W, BoundStory as Wt, injectDataAppStyles as X, ColumnIdentifier as Xt, DataAppStylesOptions as Y, MetricComparison as Yt, TableDisplayMode as Z, DataIdentifierDefinition as Zt, VisualizationWidgetView as _, DataTableTimestampProps as _t, SectionHeadingProps as a, SearchMatchValue as at, DataWidget as b, SearchTypeaheadProps as bt, TooltipProvider as c, searchItems as ct, AppIconName as d, DataTableEmptyRow as dt, Button$1 as en, TableWidgetProps as et, AppIconProps as f, DataTableEmptyRowProps as ft, VisualizationWidgetProps as g, DataTableTimestamp as gt, VisualizationWidget as h, DataTableShare as ht, SectionHeading as i, SearchItemsOptions as it, ChoiceOption$1 as j, WidgetEvidence as jt, AppVariable as k, ItemActions as kt, TooltipProviderProps as l, WidgetStatus as lt, HelpPopoverProps as m, DataTableSearch as mt, DateDisplay as n, PressButton as nn, SearchAttribute as nt, Tooltip as o, SearchRange as ot, HelpPopover as p, DataTableProps as pt, DataAppStyleHooks as q, PresentStoryProps as qt, DateDisplayProps as r, SearchHit as rt, TooltipProps as s, matchSearchText as st, useDateFormatting as t, ButtonProps as tn, TableWidgetSearch as tt, AppIcon as u, DataTable as ut, TextWidget as v, SearchSuggestion as vt, DataValue as w, CsvExport as wt, DataWidgetProps as x, SearchField as xt, TextWidgetProps as y, SearchTypeahead as yt, choiceVariable as z, AuthoringDataContext as zt };
863
+ //# sourceMappingURL=date-formatting.d.ts.map