@altertable/data-app 0.69.0 → 0.71.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 (289) hide show
  1. package/AGENTS.md +11 -1
  2. package/CONTRIBUTING.md +59 -26
  3. package/README.md +22 -26
  4. package/REFERENCE.md +1900 -0
  5. package/dist/chunks/index-5a27erdg.js +54 -0
  6. package/dist/chunks/index-5a27erdg.js.map +10 -0
  7. package/dist/chunks/{index-2sbp9h2b.js → index-9yxr7nmm.js} +330 -21
  8. package/dist/chunks/index-9yxr7nmm.js.map +17 -0
  9. package/dist/chunks/{index-r7b1ftwy.js → index-j5q5n3ra.js} +8 -6
  10. package/dist/chunks/index-j5q5n3ra.js.map +10 -0
  11. package/dist/chunks/{index-22d576sn.js → index-q75zm3a7.js} +3 -3
  12. package/dist/chunks/{index-22d576sn.js.map → index-q75zm3a7.js.map} +3 -3
  13. package/dist/chunks/{index-kwnqycjt.js → index-vhaec7m5.js} +8 -6
  14. package/dist/chunks/index-vhaec7m5.js.map +10 -0
  15. package/dist/chunks/index-zp78caex.js +1047 -0
  16. package/dist/chunks/index-zp78caex.js.map +19 -0
  17. package/dist/client/index.js +284 -16
  18. package/dist/client/index.js.map +7 -3
  19. package/dist/core/appearance.js +181 -11
  20. package/dist/core/appearance.js.map +4 -3
  21. package/dist/core/config.js +3 -3
  22. package/dist/core/contract.js +13 -15
  23. package/dist/core/contract.js.map +1 -1
  24. package/dist/core/format.js +1 -1
  25. package/dist/index.js +4 -4
  26. package/dist/index.js.map +1 -1
  27. package/dist/internal.js +418 -0
  28. package/dist/internal.js.map +15 -0
  29. package/dist/server/index.js +102 -0
  30. package/dist/server/index.js.map +10 -0
  31. package/dist/types/client/annotations.d.ts +1 -1
  32. package/dist/types/client/data-client.d.ts +21 -10
  33. package/dist/types/client/iframe.d.ts +6 -6
  34. package/dist/types/client/index.d.ts +3 -4
  35. package/dist/types/client/location.d.ts +2 -2
  36. package/dist/types/client/logger.d.ts +1 -1
  37. package/dist/types/client/navigation.d.ts +1 -1
  38. package/dist/types/client/transport.d.ts +1 -1
  39. package/dist/types/core/bridge.d.ts +1 -1
  40. package/dist/types/core/config.d.ts +20 -17
  41. package/dist/types/core/contract.d.ts +23 -13
  42. package/dist/types/core/dimension-source.d.ts +64 -0
  43. package/dist/types/core/dimension.d.ts +31 -23
  44. package/dist/types/core/facets.d.ts +13 -0
  45. package/dist/types/core/filters.d.ts +1 -1
  46. package/dist/types/core/format.d.ts +1 -2
  47. package/dist/types/core/keys.d.ts +2 -0
  48. package/dist/types/core/messages.d.ts +3 -3
  49. package/dist/types/core/operation-types.d.ts +7 -6
  50. package/dist/types/core/presentation.d.ts +1 -1
  51. package/dist/types/core/queries.d.ts +75 -7
  52. package/dist/types/core/reading.d.ts +1 -1
  53. package/dist/types/core/variables.d.ts +38 -12
  54. package/dist/types/index.d.ts +1 -1
  55. package/dist/types/internal.d.ts +22 -0
  56. package/dist/types/server/index.d.ts +1 -2
  57. package/docs/app-authoring.md +12 -4
  58. package/docs/client.md +5 -6
  59. package/docs/composition.md +84 -0
  60. package/docs/contract.md +41 -21
  61. package/docs/data-context.md +5 -3
  62. package/docs/embed.md +4 -4
  63. package/docs/formatting-and-appearance.md +1 -1
  64. package/docs/hosted-apps.md +4 -0
  65. package/docs/react-embed.md +7 -6
  66. package/docs/react.md +5 -5
  67. package/docs/server-bun.md +5 -5
  68. package/docs/server.md +1 -1
  69. package/docs/stories-and-export.md +3 -3
  70. package/docs/styling.md +6 -2
  71. package/docs/ui.md +18 -7
  72. package/docs/variables.md +83 -11
  73. package/docs/views.md +57 -3
  74. package/docs/widgets.md +97 -4
  75. package/docs/worker.md +4 -4
  76. package/examples/starter-data-app/index.tsx +11 -23
  77. package/examples/starter-local-data-app/AGENTS.md +1 -1
  78. package/examples/starter-local-data-app/README.md +12 -10
  79. package/examples/starter-local-data-app/app.ts +7 -1
  80. package/examples/starter-local-data-app/package.json +3 -1
  81. package/examples/starter-local-data-app/src/App.tsx +1 -1
  82. package/examples/starter-local-data-app/src/data-context.ts +1 -1
  83. package/examples/starter-local-data-app/src/main.tsx +1 -1
  84. package/examples/starter-local-data-app/src/server.ts +1 -1
  85. package/examples/starter-local-data-app/tsconfig.json +7 -1
  86. package/package.json +16 -92
  87. package/THIRD_PARTY_NOTICES +0 -18
  88. package/dist/chunks/index-2sbp9h2b.js.map +0 -13
  89. package/dist/chunks/index-ap60vggk.js +0 -80
  90. package/dist/chunks/index-ap60vggk.js.map +0 -10
  91. package/dist/chunks/index-cv36cyna.js +0 -180
  92. package/dist/chunks/index-cv36cyna.js.map +0 -10
  93. package/dist/chunks/index-k766wwwr.js +0 -643
  94. package/dist/chunks/index-k766wwwr.js.map +0 -13
  95. package/dist/chunks/index-kwnqycjt.js.map +0 -10
  96. package/dist/chunks/index-m0gbxtgp.js +0 -355
  97. package/dist/chunks/index-m0gbxtgp.js.map +0 -13
  98. package/dist/chunks/index-qhzdzca2.js +0 -15869
  99. package/dist/chunks/index-qhzdzca2.js.map +0 -118
  100. package/dist/chunks/index-r7b1ftwy.js.map +0 -10
  101. package/dist/chunks/index-sx488hvs.js +0 -221
  102. package/dist/chunks/index-sx488hvs.js.map +0 -12
  103. package/dist/chunks/index-wss3gd3h.js +0 -319
  104. package/dist/chunks/index-wss3gd3h.js.map +0 -13
  105. package/dist/chunks/index-zcqxfwdq.js +0 -197
  106. package/dist/chunks/index-zcqxfwdq.js.map +0 -13
  107. package/dist/embed/index.js +0 -138
  108. package/dist/embed/index.js.map +0 -12
  109. package/dist/local.js +0 -432
  110. package/dist/local.js.map +0 -14
  111. package/dist/preview.js +0 -1456
  112. package/dist/preview.js.map +0 -17
  113. package/dist/react/embed/index.js +0 -117
  114. package/dist/react/embed/index.js.map +0 -10
  115. package/dist/react/index.js +0 -2948
  116. package/dist/react/index.js.map +0 -26
  117. package/dist/react/ui/index.js +0 -3142
  118. package/dist/react/ui/index.js.map +0 -35
  119. package/dist/server.js +0 -301
  120. package/dist/server.js.map +0 -13
  121. package/dist/types/core/time-interval.d.ts +0 -96
  122. package/dist/types/embed/bootstrap.d.ts +0 -5
  123. package/dist/types/embed/bridge.d.ts +0 -12
  124. package/dist/types/embed/host.d.ts +0 -36
  125. package/dist/types/embed/index.d.ts +0 -14
  126. package/dist/types/embed/navigation.d.ts +0 -6
  127. package/dist/types/embed/runtime-html.d.ts +0 -2
  128. package/dist/types/embed/source.d.ts +0 -16
  129. package/dist/types/embed/sql.d.ts +0 -4
  130. package/dist/types/react/annotations/AnnotationBar.d.ts +0 -30
  131. package/dist/types/react/annotations/AnnotationControls.d.ts +0 -10
  132. package/dist/types/react/annotations/AnnotationEditor.d.ts +0 -16
  133. package/dist/types/react/annotations/AnnotationMarkers.d.ts +0 -19
  134. package/dist/types/react/annotations/AnnotationSelectionLayer.d.ts +0 -12
  135. package/dist/types/react/annotations/AnnotationTarget.d.ts +0 -9
  136. package/dist/types/react/annotations/AnnotationTooltip.d.ts +0 -9
  137. package/dist/types/react/annotations/AnnotationTrigger.d.ts +0 -10
  138. package/dist/types/react/annotations/annotation-editor-state.d.ts +0 -58
  139. package/dist/types/react/annotations/annotation-screenshot.d.ts +0 -4
  140. package/dist/types/react/annotations/annotation-targets.d.ts +0 -34
  141. package/dist/types/react/annotations/getAnnotationProps.d.ts +0 -17
  142. package/dist/types/react/annotations/styles.d.ts +0 -3
  143. package/dist/types/react/annotations/useAnnotationGeometry.d.ts +0 -22
  144. package/dist/types/react/annotations/useDataAppAnnotations.d.ts +0 -22
  145. package/dist/types/react/app-context.d.ts +0 -3
  146. package/dist/types/react/bindings.d.ts +0 -133
  147. package/dist/types/react/content.d.ts +0 -36
  148. package/dist/types/react/date-formatting.d.ts +0 -12
  149. package/dist/types/react/embed/bridge.d.ts +0 -21
  150. package/dist/types/react/embed/index.d.ts +0 -7
  151. package/dist/types/react/hooks.d.ts +0 -75
  152. package/dist/types/react/index.d.ts +0 -75
  153. package/dist/types/react/injectStyles.d.ts +0 -7
  154. package/dist/types/react/mount.d.ts +0 -13
  155. package/dist/types/react/search-suggestions.d.ts +0 -8
  156. package/dist/types/react/source-owner.d.ts +0 -2
  157. package/dist/types/react/style-contract.d.ts +0 -88
  158. package/dist/types/react/style-validation.d.ts +0 -2
  159. package/dist/types/react/styles.d.ts +0 -8
  160. package/dist/types/react/ui/AboutData.d.ts +0 -68
  161. package/dist/types/react/ui/AltertableLogo.d.ts +0 -3
  162. package/dist/types/react/ui/AppFooter.d.ts +0 -6
  163. package/dist/types/react/ui/AppHeader.d.ts +0 -10
  164. package/dist/types/react/ui/AppLayout.d.ts +0 -10
  165. package/dist/types/react/ui/AppScope.d.ts +0 -7
  166. package/dist/types/react/ui/AppToolbar.d.ts +0 -30
  167. package/dist/types/react/ui/AreaChart.d.ts +0 -7
  168. package/dist/types/react/ui/BarChart.d.ts +0 -6
  169. package/dist/types/react/ui/Breakdown.d.ts +0 -13
  170. package/dist/types/react/ui/Button.d.ts +0 -11
  171. package/dist/types/react/ui/ChartLegend.d.ts +0 -32
  172. package/dist/types/react/ui/Checkbox.d.ts +0 -21
  173. package/dist/types/react/ui/CheckboxGroup.d.ts +0 -7
  174. package/dist/types/react/ui/ChoicePicker.d.ts +0 -39
  175. package/dist/types/react/ui/Comparison.d.ts +0 -14
  176. package/dist/types/react/ui/ComposedChart.d.ts +0 -41
  177. package/dist/types/react/ui/ComposedChartLegend.d.ts +0 -8
  178. package/dist/types/react/ui/ContentSkeleton.d.ts +0 -7
  179. package/dist/types/react/ui/DataApp.d.ts +0 -21
  180. package/dist/types/react/ui/DataAppFrame.d.ts +0 -52
  181. package/dist/types/react/ui/DataBoundary.d.ts +0 -14
  182. package/dist/types/react/ui/DataSection.d.ts +0 -14
  183. package/dist/types/react/ui/DataSectionBoundary.d.ts +0 -30
  184. package/dist/types/react/ui/DataTable.d.ts +0 -29
  185. package/dist/types/react/ui/DataValue.d.ts +0 -9
  186. package/dist/types/react/ui/DataViewToast.d.ts +0 -11
  187. package/dist/types/react/ui/DataWidget.d.ts +0 -34
  188. package/dist/types/react/ui/DateDisplay.d.ts +0 -9
  189. package/dist/types/react/ui/DateRangePicker.d.ts +0 -30
  190. package/dist/types/react/ui/DateTimeTooltip.d.ts +0 -10
  191. package/dist/types/react/ui/DimensionPicker.d.ts +0 -13
  192. package/dist/types/react/ui/EmptyState.d.ts +0 -6
  193. package/dist/types/react/ui/ExportControl.d.ts +0 -4
  194. package/dist/types/react/ui/FilterActions.d.ts +0 -10
  195. package/dist/types/react/ui/FilterBar.d.ts +0 -3
  196. package/dist/types/react/ui/FunnelChart.d.ts +0 -20
  197. package/dist/types/react/ui/GettingStarted.d.ts +0 -6
  198. package/dist/types/react/ui/GlossaryDefinition.d.ts +0 -7
  199. package/dist/types/react/ui/GlossaryExplanation.d.ts +0 -16
  200. package/dist/types/react/ui/GradientScroll.d.ts +0 -23
  201. package/dist/types/react/ui/Grid.d.ts +0 -12
  202. package/dist/types/react/ui/GridItem.d.ts +0 -7
  203. package/dist/types/react/ui/HelpPopover.d.ts +0 -21
  204. package/dist/types/react/ui/IconButton.d.ts +0 -19
  205. package/dist/types/react/ui/InspectionContext.d.ts +0 -12
  206. package/dist/types/react/ui/InspectionProvider.d.ts +0 -29
  207. package/dist/types/react/ui/JourneyChart.d.ts +0 -10
  208. package/dist/types/react/ui/Kbd.d.ts +0 -7
  209. package/dist/types/react/ui/LineChart.d.ts +0 -7
  210. package/dist/types/react/ui/LiveControl.d.ts +0 -10
  211. package/dist/types/react/ui/Menu.d.ts +0 -12
  212. package/dist/types/react/ui/MetricWidget.d.ts +0 -49
  213. package/dist/types/react/ui/NumberField.d.ts +0 -27
  214. package/dist/types/react/ui/NumberFilterPicker.d.ts +0 -11
  215. package/dist/types/react/ui/PeriodSummary.d.ts +0 -17
  216. package/dist/types/react/ui/PickerField.d.ts +0 -15
  217. package/dist/types/react/ui/PieChart.d.ts +0 -11
  218. package/dist/types/react/ui/PopoverSurface.d.ts +0 -5
  219. package/dist/types/react/ui/PresentStory.d.ts +0 -30
  220. package/dist/types/react/ui/QueryList.d.ts +0 -14
  221. package/dist/types/react/ui/RadioGroup.d.ts +0 -18
  222. package/dist/types/react/ui/Ranking.d.ts +0 -13
  223. package/dist/types/react/ui/RefreshControl.d.ts +0 -9
  224. package/dist/types/react/ui/RequestHint.d.ts +0 -20
  225. package/dist/types/react/ui/RetentionChart.d.ts +0 -27
  226. package/dist/types/react/ui/ScatterChart.d.ts +0 -17
  227. package/dist/types/react/ui/SearchField.d.ts +0 -23
  228. package/dist/types/react/ui/SearchInput.d.ts +0 -10
  229. package/dist/types/react/ui/SearchMatch.d.ts +0 -6
  230. package/dist/types/react/ui/SearchTypeahead.d.ts +0 -15
  231. package/dist/types/react/ui/SectionHeading.d.ts +0 -8
  232. package/dist/types/react/ui/Select.d.ts +0 -18
  233. package/dist/types/react/ui/SelectionMark.d.ts +0 -5
  234. package/dist/types/react/ui/Sheet.d.ts +0 -21
  235. package/dist/types/react/ui/Skeleton.d.ts +0 -8
  236. package/dist/types/react/ui/Stack.d.ts +0 -7
  237. package/dist/types/react/ui/StaticDataApp.d.ts +0 -4
  238. package/dist/types/react/ui/StatusPanel.d.ts +0 -10
  239. package/dist/types/react/ui/TableWidget.d.ts +0 -67
  240. package/dist/types/react/ui/Tabs.d.ts +0 -10
  241. package/dist/types/react/ui/TextContent.d.ts +0 -4
  242. package/dist/types/react/ui/TextWidget.d.ts +0 -20
  243. package/dist/types/react/ui/ThemeSelector.d.ts +0 -12
  244. package/dist/types/react/ui/Toast.d.ts +0 -8
  245. package/dist/types/react/ui/Tooltip.d.ts +0 -23
  246. package/dist/types/react/ui/TooltipSurface.d.ts +0 -3
  247. package/dist/types/react/ui/TrendChart.d.ts +0 -5
  248. package/dist/types/react/ui/UpdatedAt.d.ts +0 -9
  249. package/dist/types/react/ui/VariableBar.d.ts +0 -6
  250. package/dist/types/react/ui/VisualizationWidget.d.ts +0 -43
  251. package/dist/types/react/ui/WidgetDisclosure.d.ts +0 -6
  252. package/dist/types/react/ui/WidgetEvidence.d.ts +0 -12
  253. package/dist/types/react/ui/WidgetViewTabs.d.ts +0 -16
  254. package/dist/types/react/ui/chart-data.d.ts +0 -34
  255. package/dist/types/react/ui/chart-date-axis.d.ts +0 -15
  256. package/dist/types/react/ui/chart-interaction.d.ts +0 -21
  257. package/dist/types/react/ui/chart-primitives.d.ts +0 -22
  258. package/dist/types/react/ui/chart-time.d.ts +0 -16
  259. package/dist/types/react/ui/chartColor.d.ts +0 -2
  260. package/dist/types/react/ui/classNames.d.ts +0 -1
  261. package/dist/types/react/ui/csv-export.d.ts +0 -19
  262. package/dist/types/react/ui/data-context.d.ts +0 -76
  263. package/dist/types/react/ui/data-identifiers.d.ts +0 -32
  264. package/dist/types/react/ui/icons.d.ts +0 -47
  265. package/dist/types/react/ui/index.d.ts +0 -109
  266. package/dist/types/react/ui/journey-flow.d.ts +0 -49
  267. package/dist/types/react/ui/keyboard.d.ts +0 -6
  268. package/dist/types/react/ui/metric-comparison.d.ts +0 -30
  269. package/dist/types/react/ui/metric.d.ts +0 -11
  270. package/dist/types/react/ui/presentation.d.ts +0 -25
  271. package/dist/types/react/ui/search.d.ts +0 -6
  272. package/dist/types/react/ui/searchItems.d.ts +0 -36
  273. package/dist/types/react/ui/shortcuts.d.ts +0 -45
  274. package/dist/types/react/ui/story.d.ts +0 -20
  275. package/dist/types/react/ui/useAppAppearance.d.ts +0 -3
  276. package/dist/types/react/ui/useDataAppPresentation.d.ts +0 -3
  277. package/dist/types/react/ui/useSvgId.d.ts +0 -2
  278. package/dist/types/react/ui/variables.d.ts +0 -38
  279. package/dist/types/react/ui/widget-views.d.ts +0 -3
  280. package/dist/types/react/view-control-bar.d.ts +0 -16
  281. package/dist/types/react/view-controls.d.ts +0 -20
  282. package/dist/types/react/view-runtime.d.ts +0 -31
  283. package/dist/types/react/view.d.ts +0 -78
  284. package/dist/types/react/widgets.d.ts +0 -79
  285. package/dist/types/server/local.d.ts +0 -19
  286. package/dist/types/server/preview/host.d.ts +0 -1
  287. package/dist/types/server/preview/index.d.ts +0 -16
  288. package/dist/types/server/reload-channel.d.ts +0 -6
  289. package/dist/worker.js +0 -106
@@ -1,13 +0,0 @@
1
- import { type ComponentType, type ReactNode } from 'react';
2
- import { type DataAppDefinition, type QueryDefinitions } from '../core/config.js';
3
- /** Mount once per document; installs document identity and the shared request provider. */
4
- export declare function mountDataApp<const Queries extends QueryDefinitions>({ app, component: Component, root, }: {
5
- app: DataAppDefinition<Queries>;
6
- component: ComponentType;
7
- root?: HTMLElement | null;
8
- }): void;
9
- /** Provide one app identity and shared requests to a custom React root. */
10
- export declare function DataAppProvider<const Queries extends QueryDefinitions>({ app, children, }: {
11
- app: DataAppDefinition<Queries>;
12
- children: ReactNode;
13
- }): import("react").JSX.Element;
@@ -1,8 +0,0 @@
1
- import type { SearchSuggestion } from './ui/SearchTypeahead.js';
2
- /** The primary view supplies suggestions from exactly the source displayed by its widgets. */
3
- export declare const SearchSuggestionsContext: import("react").Context<{
4
- groups: readonly (readonly SearchSuggestion[])[];
5
- busy: boolean;
6
- } | null>;
7
- /** Share five slots across datasets, then prioritize title matches without filtering source rows. */
8
- export declare function balanceSearchSuggestions(groups: readonly (readonly SearchSuggestion[])[], query?: string): SearchSuggestion[];
@@ -1,2 +0,0 @@
1
- export declare function ownedSource<Source extends object>(owner: object, source: Source): Source;
2
- export declare function assertSourceOwner(owner: object, source: object): void;
@@ -1,88 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- /** Public custom-property names for authoring types and validation. CSS owns their defaults. */
3
- export 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-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'];
4
- /** Stable component roots for CSS customization; only utilities may be placed on native markup. */
5
- export declare const dataAppStyleClasses: {
6
- readonly 'altertable-app-layout': {
7
- readonly component: 'AppLayout';
8
- readonly kind: 'root';
9
- };
10
- readonly 'altertable-stack': {
11
- readonly component: 'Stack';
12
- readonly kind: 'root';
13
- };
14
- readonly 'altertable-grid': {
15
- readonly component: 'Grid';
16
- readonly kind: 'root';
17
- };
18
- readonly 'altertable-grid-item': {
19
- readonly component: 'GridItem';
20
- readonly kind: 'root';
21
- };
22
- readonly 'altertable-text-content': {
23
- readonly component: 'TextContent';
24
- readonly kind: 'root';
25
- };
26
- readonly 'altertable-button': {
27
- readonly component: 'Button';
28
- readonly kind: 'root';
29
- };
30
- readonly 'altertable-tabs': {
31
- readonly component: 'Tabs';
32
- readonly kind: 'root';
33
- };
34
- readonly 'altertable-data-widget': {
35
- readonly component: 'DataWidget';
36
- readonly kind: 'root';
37
- };
38
- readonly 'altertable-metric-widget': {
39
- readonly component: 'MetricWidget';
40
- readonly kind: 'root';
41
- };
42
- readonly 'altertable-chart-legend': {
43
- readonly component: 'ChartLegend';
44
- readonly kind: 'root';
45
- };
46
- readonly 'altertable-chart-legend-item': {
47
- readonly component: 'ChartLegend.Item';
48
- readonly kind: 'root';
49
- };
50
- readonly 'altertable-chart-legend-marker': {
51
- readonly component: 'ChartLegend.Marker';
52
- readonly kind: 'root';
53
- };
54
- readonly 'altertable-chart-legend-label': {
55
- readonly component: 'ChartLegend.Label';
56
- readonly kind: 'root';
57
- };
58
- readonly 'altertable-funnel-chart': {
59
- readonly component: 'FunnelChart';
60
- readonly kind: 'root';
61
- };
62
- readonly 'altertable-retention-chart': {
63
- readonly component: 'RetentionChart';
64
- readonly kind: 'root';
65
- };
66
- readonly 'altertable-journey-chart': {
67
- readonly component: 'JourneyChart';
68
- readonly kind: 'root';
69
- };
70
- readonly 'altertable-composed-chart': {
71
- readonly component: 'ComposedChart';
72
- readonly kind: 'root';
73
- };
74
- readonly 'altertable-sr-only': {
75
- readonly component: null;
76
- readonly kind: 'utility';
77
- };
78
- };
79
- export declare const dataAppStyleHooks: {
80
- readonly 'data-atbl-focus': readonly ['ring', 'inset', 'group'];
81
- readonly 'data-atbl-control': readonly ['default', 'action', 'help', 'text'];
82
- };
83
- export type DataAppStyleToken = (typeof dataAppStyleTokens)[number];
84
- /** React style properties with checked public Altertable custom properties. */
85
- export type DataAppStyle = CSSProperties & Partial<Record<DataAppStyleToken, string | number>>;
86
- export type DataAppStyleHooks = {
87
- [Name in keyof typeof dataAppStyleHooks]?: (typeof dataAppStyleHooks)[Name][number];
88
- };
@@ -1,2 +0,0 @@
1
- /** Static authoring checks; app-owned names are allowed, package implementation names are not. */
2
- export declare function validateAuthoredStyles(source: string, kind: 'css' | 'markup'): string[];
@@ -1,8 +0,0 @@
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;
@@ -1,68 +0,0 @@
1
- import { type ComponentPropsWithRef, type ReactNode, type RefObject } from 'react';
2
- import type { DisclosedQuery } from '../../core/contract.js';
3
- import type { DataContext, GlossaryEntry } from './data-context.js';
4
- import { type ButtonProps } from './Button.js';
5
- import { type SheetDialogProps } from './Sheet.js';
6
- export type AboutTab = 'glossary' | 'queries';
7
- export declare function resolveAboutTab(tab: string | null | undefined): AboutTab;
8
- export type AboutEmpty = {
9
- glossary: {
10
- title: string;
11
- description?: string;
12
- };
13
- queries: {
14
- title: string;
15
- description?: string;
16
- };
17
- };
18
- export declare const defaultAboutEmpty: AboutEmpty;
19
- export type AboutSubject = {
20
- empty?: AboutEmpty;
21
- id?: string;
22
- title?: ReactNode;
23
- description?: ReactNode;
24
- visual?: ReactNode;
25
- visualKind?: 'metric' | 'chart' | 'widget';
26
- dataContext?: DataContext;
27
- references?: {
28
- kind: 'ids';
29
- glossaryIds?: readonly string[];
30
- queryNames?: readonly string[];
31
- } | {
32
- kind: 'entries';
33
- entries: readonly GlossaryEntry[];
34
- };
35
- queries?: DisclosedQuery[];
36
- };
37
- export type AboutDataProps = AboutSubject & {
38
- variant?: ButtonProps['variant'];
39
- iconOnly?: boolean;
40
- /**
41
- * Register the global inspect shortcut. Defaults on for existing toolbar triggers; local
42
- * triggers set false.
43
- */
44
- shortcut?: boolean;
45
- tooltip?: ReactNode;
46
- children?: ReactNode;
47
- footer?: ReactNode;
48
- portalRoot?: RefObject<HTMLElement | null>;
49
- sheetProps?: SheetDialogProps;
50
- headerActions?: ReactNode;
51
- open?: boolean;
52
- onOpenChange?: (open: boolean) => void;
53
- /** Initial inspect tab. While open, the URL's `tab` parameter tracks selection. */
54
- tab?: AboutTab;
55
- trigger?: boolean;
56
- } & Omit<ComponentPropsWithRef<'button'>, 'children' | 'title'>;
57
- /**
58
- * Open state uses `?about=`; tab selection uses `?tab=`. Enable the global shortcut only on the
59
- * page-level trigger.
60
- */
61
- export declare function InspectionSheet({ id, title, description, visual, visualKind, dataContext, references, queries, empty, footer, sheetProps, headerActions, open, onOpenChange, tab, onTabChange, returnFocus, }: AboutDataProps & {
62
- open: boolean;
63
- onOpenChange: (open: boolean) => void;
64
- tab: AboutTab;
65
- onTabChange: (tab: AboutTab) => void;
66
- returnFocus: RefObject<HTMLButtonElement | null>;
67
- }): import("react").JSX.Element;
68
- export declare function AboutData(props: AboutDataProps): import("react").JSX.Element;
@@ -1,3 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- export type AltertableLogoProps = SVGProps<SVGSVGElement>;
3
- export declare function AltertableLogo(props: AltertableLogoProps): import("react").JSX.Element;
@@ -1,6 +0,0 @@
1
- import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- export type AppFooterProps = ComponentPropsWithRef<'footer'> & {
3
- attribution?: ReactNode;
4
- };
5
- /** `children` fills the action slot; `attribution` replaces the default link. */
6
- export declare function AppFooter({ children, attribution, className, ...props }: AppFooterProps): import("react").JSX.Element;
@@ -1,10 +0,0 @@
1
- import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- export type AppHeaderProps = {
3
- scope?: ReactNode;
4
- title: ReactNode;
5
- description?: ReactNode;
6
- toolbar?: ReactNode;
7
- children?: ReactNode;
8
- } & Omit<ComponentPropsWithRef<'header'>, 'children' | 'title'>;
9
- /** Page identity and actions; on narrow screens the scope shares a row with actions. */
10
- export declare function AppHeader({ scope, title, description, toolbar, children, className, ...props }: AppHeaderProps): import("react").JSX.Element;
@@ -1,10 +0,0 @@
1
- import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- export type AppLayoutProps = {
3
- children: ReactNode;
4
- footerActions?: ReactNode;
5
- footer?: ReactNode;
6
- } & Omit<ComponentPropsWithRef<'main'>, 'children'>;
7
- /**
8
- * Native props target `<main>`. The shell owns its wrapper and tooltip defaults.
9
- */
10
- export declare function AppLayout({ children, footerActions, footer, className, ...props }: AppLayoutProps): import("react").JSX.Element;
@@ -1,7 +0,0 @@
1
- import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- export type AppScopeProps = {
3
- organization: string;
4
- environment: string;
5
- children?: ReactNode;
6
- } & Omit<ComponentPropsWithRef<'div'>, 'children'>;
7
- export declare function AppScope({ organization, environment, children, className, ...props }: AppScopeProps): import("react").JSX.Element;
@@ -1,30 +0,0 @@
1
- import type { ComponentProps, ComponentPropsWithRef, ReactNode } from 'react';
2
- import type { DataView } from '../../core/data-view.js';
3
- import type { CsvExport } from './csv-export.js';
4
- import { type LiveControlProps } from './LiveControl.js';
5
- import { PresentStory } from './PresentStory.js';
6
- export type AppToolbarProps = {
7
- children?: ReactNode;
8
- end?: ReactNode;
9
- updatedAt?: ReactNode;
10
- requestState?: DataView<unknown, unknown>['kind'];
11
- refresh?: {
12
- refreshing: boolean;
13
- onRefresh: () => void;
14
- onCancel?: () => void;
15
- label?: string;
16
- tooltip?: ReactNode;
17
- };
18
- live?: LiveControlProps;
19
- aboutData?: ReactNode;
20
- /** Null reserves a disabled story action while its findings are unavailable. */
21
- story?: ComponentProps<typeof PresentStory> | null;
22
- /** Null reserves a disabled export action while its data is unavailable. */
23
- csvExport?: CsvExport | null;
24
- } & Omit<ComponentPropsWithRef<'div'>, 'children'>;
25
- /** Header actions only. Put reader-controlled inputs in DataApp.variables below the header.
26
- * Observation time, or an initial loading status, sits before Refresh. Children prepend app controls in the right
27
- * cluster; end follows the built-in actions. Live sits beside Refresh when supplied. Refresh also
28
- * answers Alt/Option+R and uses the button to cancel a running request when onCancel is provided;
29
- * refresh.tooltip overrides its static label. All built-in controls are optional. */
30
- export declare function AppToolbar({ children, updatedAt, requestState, refresh, live, aboutData, story, csvExport, end, className, role, 'aria-label': ariaLabel, ...props }: AppToolbarProps): import("react").JSX.Element;
@@ -1,7 +0,0 @@
1
- import type { ChartItem, ValueChartProps } from './chart-data.js';
2
- export type AreaChartItem = ChartItem;
3
- export type AreaChartProps = ValueChartProps;
4
- /** Ordered finite samples filled to a zero baseline, including negative values.
5
- * Samples are equally spaced; supply missing periods explicitly.
6
- * Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
7
- export declare function AreaChart(props: AreaChartProps): import("react").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { type ChartItem, type ValueChartProps } from './chart-data.js';
2
- export type BarChartItem = ChartItem;
3
- export type BarChartProps = ValueChartProps;
4
- /** Nonnegative category values. Compose inside VisualizationWidget for a titled panel.
5
- * Owns hover/touch tooltips; no selection state or keyboard navigation. */
6
- export declare function BarChart({ items, unit, ariaLabel, formatValue, }: BarChartProps): import("react").JSX.Element;
@@ -1,13 +0,0 @@
1
- import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- export type BreakdownItem = {
3
- id: string;
4
- label: ReactNode;
5
- value: number;
6
- };
7
- export type BreakdownProps = {
8
- total: number;
9
- items: readonly BreakdownItem[];
10
- formatValue?: (value: number) => ReactNode;
11
- } & Omit<ComponentPropsWithRef<'div'>, 'children'>;
12
- /** Mutually exclusive parts of one observed whole. Every share uses the supplied total. */
13
- export declare function Breakdown({ total, items, formatValue, className, ...props }: BreakdownProps): import("react").JSX.Element;
@@ -1,11 +0,0 @@
1
- import type { ComponentPropsWithRef } from 'react';
2
- import { Button as AriaButton } from 'react-aria-components';
3
- export type ButtonProps = ComponentPropsWithRef<'button'> & {
4
- variant?: 'primary' | 'elevated' | 'outline' | 'ghost';
5
- size?: 'default' | 'compact' | 'icon' | 'icon-compact';
6
- };
7
- export declare function Button({ className, type, variant, size, disabled, ...props }: ButtonProps): import("react").JSX.Element;
8
- /** React Aria trigger behavior with the same presentation as the native Button. */
9
- export declare function PressButton({ variant, size, className, ...props }: Omit<ComponentPropsWithRef<typeof AriaButton>, 'className'> & Pick<ButtonProps, 'variant' | 'size'> & {
10
- className?: string;
11
- }): import("react").JSX.Element;
@@ -1,32 +0,0 @@
1
- import { type ComponentPropsWithRef, type ReactNode } from 'react';
2
- export type ChartLegendProps = {
3
- children: ReactNode;
4
- /** Single-row fits up to four cells before expansion, adapting to available width. */
5
- layout?: 'horizontal' | 'vertical' | 'single-row';
6
- align?: 'start' | 'center' | 'end';
7
- /** Optional cell cap, including expansion. Horizontal legends default to two rows. */
8
- maxVisibleItems?: number;
9
- } & Omit<ComponentPropsWithRef<'ul'>, 'children'>;
10
- /** Optional chart key, placed beside any chart with the app's layout components.
11
- * Items describe displayed series or categories; the caller owns series visibility and interactions. */
12
- declare function ChartLegendRoot({ children, layout, align, maxVisibleItems, className, 'aria-label': ariaLabel, ...props }: ChartLegendProps): import("react").JSX.Element;
13
- export type ChartLegendItemProps = ComponentPropsWithRef<'li'> & {
14
- inactive?: boolean;
15
- };
16
- /** Descriptive by default; compose a button inside the item for an authored series toggle. */
17
- declare function ChartLegendItem({ inactive, className, ...props }: ChartLegendItemProps): import("react").JSX.Element;
18
- export type ChartLegendMarkerKind = 'square' | 'bar' | 'line' | 'area' | 'point' | 'slice';
19
- export type ChartLegendMarkerProps = Omit<ComponentPropsWithRef<'svg'>, 'children'> & {
20
- kind: ChartLegendMarkerKind;
21
- };
22
- /** Decorative mark; color accepts public palette tokens or any CSS color.
23
- * Defaults match the shared bar or accent-colored series primitives. */
24
- declare function ChartLegendMarker({ kind, color, className, style, ...props }: ChartLegendMarkerProps): import("react").JSX.Element;
25
- export type ChartLegendLabelProps = ComponentPropsWithRef<'span'>;
26
- declare function ChartLegendLabel({ className, children, title, ...props }: ChartLegendLabelProps): import("react").JSX.Element;
27
- export declare const ChartLegend: typeof ChartLegendRoot & {
28
- Item: typeof ChartLegendItem;
29
- Marker: typeof ChartLegendMarker;
30
- Label: typeof ChartLegendLabel;
31
- };
32
- export {};
@@ -1,21 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- export declare const CheckboxGroupContext: import("react").Context<{
3
- values: readonly string[];
4
- disabled?: boolean;
5
- onChange: (value: string, checked: boolean) => void;
6
- } | null>;
7
- export type CheckboxProps = {
8
- label: string;
9
- description?: ReactNode;
10
- disabled?: boolean;
11
- className?: string;
12
- } & ({
13
- value: string;
14
- checked?: never;
15
- onChange?: never;
16
- } | {
17
- value?: never;
18
- checked: boolean;
19
- onChange: (checked: boolean) => void;
20
- });
21
- export declare function Checkbox({ label, description, checked, value, onChange, disabled, className, }: CheckboxProps): import("react").JSX.Element;
@@ -1,7 +0,0 @@
1
- import type { ComponentPropsWithRef } from 'react';
2
- export type CheckboxGroupProps = Omit<ComponentPropsWithRef<'fieldset'>, 'onChange'> & {
3
- label: string;
4
- values: readonly string[];
5
- onChange: (values: string[]) => void;
6
- };
7
- export declare function CheckboxGroup({ label, values, onChange, className, children, disabled, ...props }: CheckboxGroupProps): import("react").JSX.Element;
@@ -1,39 +0,0 @@
1
- import { type ControlLabelPlacement } from './PickerField.js';
2
- import type { ChoiceOption } from '../../core/variables.js';
3
- export type { ChoiceOption } from '../../core/variables.js';
4
- type SharedProps = {
5
- label: string;
6
- labelPlacement?: ControlLabelPlacement;
7
- options: readonly ChoiceOption[];
8
- /** Separate source state, rendered last with a divider and the shared option component. */
9
- missingOption?: ChoiceOption;
10
- disabled?: boolean;
11
- placeholder?: string;
12
- emptyMessage?: string;
13
- /** Known options remain selectable while refreshing; unavailable selected IDs are retained. */
14
- loading?: boolean;
15
- /** Shows failure feedback without removing known options or unavailable selections. */
16
- error?: boolean;
17
- onRetry?: () => void;
18
- };
19
- export type SingleChoicePickerProps = SharedProps & {
20
- selectionMode: 'single';
21
- value: string;
22
- onChange: (value: string) => void;
23
- values?: never;
24
- maxSelected?: never;
25
- emptySelectionLabel?: never;
26
- };
27
- export type MultiChoicePickerProps = SharedProps & {
28
- selectionMode: 'multiple';
29
- values: readonly string[];
30
- onChange: (values: string[]) => void;
31
- /** Positive integer; at capacity, only unselected options are disabled. */
32
- maxSelected: number;
33
- /** Meaning of an empty selection belongs to the caller, e.g. All or Select a value. */
34
- emptySelectionLabel: string;
35
- value?: never;
36
- };
37
- export type ChoicePickerProps = SingleChoicePickerProps | MultiChoicePickerProps;
38
- /** Searchable selection picker with one focus and popup model for single and multiple values. */
39
- export declare function ChoicePicker(props: ChoicePickerProps): import("react").JSX.Element;
@@ -1,14 +0,0 @@
1
- import { type MetricComparison } from './metric-comparison.js';
2
- import type { MetricDefinition } from './metric.js';
3
- import type { MetricReading } from '../../core/reading.js';
4
- type UnboundComparisonProps = MetricComparison & {
5
- label: string;
6
- emphasis?: 'standard' | 'story';
7
- };
8
- export type ComparisonProps = UnboundComparisonProps | {
9
- metric: MetricDefinition;
10
- reading: MetricReading;
11
- emphasis?: 'standard' | 'story';
12
- };
13
- export declare function Comparison(props: ComparisonProps): import("react").JSX.Element | null;
14
- export {};
@@ -1,41 +0,0 @@
1
- import { type ComponentProps } from 'react';
2
- import { ComposedChartLegend as Legend } from './ComposedChartLegend.js';
3
- import { ComposedChart as RechartsComposedChart, ZAxis, ReferenceLine, ReferenceArea, ReferenceDot, Brush, Label, LabelList, ErrorBar } from 'recharts';
4
- import { ChartBar as Bar, ChartDot as Dot, ChartLine as Line, ChartArea as Area, ChartScatter as Scatter, ChartXAxis as XAxis, ChartYAxis as YAxis, ChartGrid as CartesianGrid, ChartTooltip as Tooltip } from './chart-primitives.js';
5
- export type ComposedChartProps<Row = unknown> = Omit<ComponentProps<typeof RechartsComposedChart<Row>>, 'data' | 'title'> & {
6
- /** Displayed rows; series and axes select fields with Recharts dataKey props. */
7
- data: readonly Row[];
8
- /** Describes the measures and scope for assistive technology. */
9
- ariaLabel: string;
10
- };
11
- /** Compose Cartesian series inside VisualizationWidget. Defaults to responsive
12
- * full width and 300px height. Children retain native Recharts props and behavior,
13
- * including stacking, numeric/time axes, missing values, tooltips, and keyboard
14
- * navigation. Match yAxisId on axes and series for different units; use stackId
15
- * for stacks. Preserve missing measures as null and choose connectNulls deliberately.
16
- * Use public chart tokens for series colors. Dataset bindings own
17
- * loading, empty results, evidence, and CSV; this primitive owns only the plot. */
18
- declare function ComposedChartRoot<Row>({ data, ariaLabel, width, height, responsive, className, ...props }: ComposedChartProps<Row>): import("react").JSX.Element;
19
- /** Shared themed series and controls; other children retain native Recharts defaults. */
20
- export declare const ComposedChart: typeof ComposedChartRoot & {
21
- Dot: typeof Dot;
22
- Area: typeof Area;
23
- Bar: typeof Bar;
24
- Line: typeof Line;
25
- Scatter: typeof Scatter;
26
- XAxis: typeof XAxis;
27
- YAxis: typeof YAxis;
28
- ZAxis: typeof ZAxis;
29
- CartesianGrid: typeof CartesianGrid;
30
- Tooltip: typeof Tooltip;
31
- Legend: typeof Legend;
32
- ReferenceLine: typeof ReferenceLine;
33
- ReferenceArea: typeof ReferenceArea;
34
- ReferenceDot: typeof ReferenceDot;
35
- Brush: typeof Brush;
36
- Cell: import("react").FunctionComponent<import("recharts").CellProps>;
37
- Label: typeof Label;
38
- LabelList: typeof LabelList;
39
- ErrorBar: typeof ErrorBar;
40
- };
41
- export {};
@@ -1,8 +0,0 @@
1
- import type { ComponentProps } from 'react';
2
- import { Legend } from 'recharts';
3
- export type ComposedChartLegendProps = ComponentProps<typeof Legend> & {
4
- maxVisibleItems?: number;
5
- };
6
- /** Opt in inside ComposedChart to derive the shared legend from its displayed series.
7
- * Native positioning, sorting, formatters, callbacks, and custom content remain available. */
8
- export declare function ComposedChartLegend({ maxVisibleItems, ...props }: ComposedChartLegendProps): import("react").JSX.Element;
@@ -1,7 +0,0 @@
1
- import type { ComponentPropsWithRef } from 'react';
2
- import type { SkeletonContent } from './presentation.js';
3
- export type ContentSkeletonProps = SkeletonContent & Omit<ComponentPropsWithRef<'div'>, 'children'>;
4
- /** A metric, panel, or ranking placeholder to compose in the same layout as live content. */
5
- export declare function ContentSkeleton({ variant, rows, className, ...props }: ContentSkeletonProps): import("react").JSX.Element;
6
- /** Placeholder for a widget body; static headings stay outside it. */
7
- export declare function ContentSkeletonBody({ variant, rows }: SkeletonContent): import("react").JSX.Element;
@@ -1,21 +0,0 @@
1
- import { type ExportDataset, type RegisteredBinding } from '../bindings.js';
2
- import type { DisplayedSnapshot } from '../../core/data-view.js';
3
- import type { StoryFinding } from './story.js';
4
- import { type DataAppBaseProps, type DataAppControlProps } from './DataAppFrame.js';
5
- import { type DeclaredView } from '../view-runtime.js';
6
- export type DataAppProps<Data, Input = unknown> = Omit<DataAppBaseProps, 'dataContext'> & DataAppControlProps & {
7
- view: DeclaredView<Data, Input> & {
8
- scope(snapshot: DisplayedSnapshot<Data, Input>): string;
9
- };
10
- /** Show supplied datasets’ record suggestions on the first declared search. Defaults to true. */
11
- showSearchSuggestions?: boolean;
12
- story: (snapshot: DisplayedSnapshot<Data, Input>) => readonly (Omit<StoryFinding, 'evidence'> & {
13
- evidence: RegisteredBinding;
14
- })[];
15
- datasets: readonly [
16
- ExportDataset<Data, Input>,
17
- ...ExportDataset<Data, Input>[]
18
- ];
19
- };
20
- /** Executes the primary view and owns its controls, inspection, exports, and stories. */
21
- export declare function DataApp<Data, Input>(props: DataAppProps<Data, Input>): import("react").JSX.Element;
@@ -1,52 +0,0 @@
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
- /** Optional source, coverage, or methodology note below the app content.
16
- * Compose prose and inline components; typography and spacing are provided.
17
- * Put data widgets in children and app controls in footerActions. */
18
- footer?: ReactNode;
19
- };
20
- export type DataAppRequest<Data, Input> = SectionResult<Data, Input> & {
21
- queries?: DisclosedQuery[];
22
- /** Actual request activity, including retries with retained data. */
23
- refreshing?: boolean;
24
- cancel?: () => unknown;
25
- searchControls?: ReactNode;
26
- filterControls?: ReactNode;
27
- };
28
- export type DataAppControlProps = {
29
- /** Show declared search controls. Defaults to true; hiding preserves their values. */
30
- showSearch?: boolean;
31
- /** Show declared filter controls, including display options. Defaults to true; hiding preserves their values. */
32
- showFilters?: boolean;
33
- };
34
- export type StaticDataAppProps = DataAppBaseProps & {
35
- csvExport?: CsvExport;
36
- queries?: DisclosedQuery[];
37
- };
38
- export type DataAppProps<Data = unknown, Input = unknown> = (DataAppBaseProps & DataAppControlProps & {
39
- request: DataAppRequest<Data, Input>;
40
- /** Findings are always derived from the result currently visible to the user. */
41
- story: BoundStory<Data, Input>;
42
- /** Export every distinct dataset in the displayed result. */
43
- csvExport: (snapshot: DisplayedSnapshot<Data, Input>) => CsvExport;
44
- queries?: never;
45
- }) | (StaticDataAppProps & {
46
- request?: never;
47
- story?: never;
48
- });
49
- /** Owns the page title, header, gutter, and width; body content uses section headings.
50
- * The primary request binds the toolbar, controls, refresh, and inspection.
51
- * Children always render; compose DataSection boundaries around independently loading content. */
52
- export declare function DataAppFrame<Data, Input>(props: DataAppProps<Data, Input>): import("react").JSX.Element;
@@ -1,14 +0,0 @@
1
- import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- import type { DataView } from '../../core/data-view.js';
3
- export type DataBoundaryProps<T, Input = unknown> = {
4
- view: DataView<T, Input>;
5
- loadingFallback: ReactNode;
6
- emptyFallback: ReactNode;
7
- error: (error: Error) => ReactNode;
8
- staleError?: (error: Error) => ReactNode;
9
- notice?: 'inline' | 'none';
10
- children: (data: T, displayedInput: Input) => ReactNode;
11
- } & Omit<ComponentPropsWithRef<'div'>, 'children'>;
12
- /** Render one request state at a time. Prior content remains readable during an update.
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,14 +0,0 @@
1
- import { type ViewContent } from '../content.js';
2
- import { type ComponentPropsWithRef, type ReactNode } from 'react';
3
- import type { EmptyContent } from './presentation.js';
4
- export type DataSectionProps<Data, Input = unknown> = {
5
- content: ViewContent<Data, Input>;
6
- emptyFallback?: EmptyContent;
7
- error?: {
8
- title: ReactNode;
9
- description?: ReactNode;
10
- onRetry?: () => void;
11
- };
12
- label?: string;
13
- } & Omit<ComponentPropsWithRef<'div'>, 'children' | 'content'>;
14
- export declare function DataSection<Data, Input>({ content, ...presentation }: DataSectionProps<Data, Input>): import("react").JSX.Element;