@altertable/data-app-react 0.0.0-stage → 0.72.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 (169) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +59 -2
  3. package/THIRD_PARTY_NOTICES +18 -0
  4. package/dist/chunks/index-xwy62xrb.js +16996 -0
  5. package/dist/chunks/index-xwy62xrb.js.map +120 -0
  6. package/dist/index.js +2888 -0
  7. package/dist/index.js.map +23 -0
  8. package/dist/types/actions.d.ts +53 -0
  9. package/dist/types/annotations/AnnotationBar.d.ts +30 -0
  10. package/dist/types/annotations/AnnotationControls.d.ts +10 -0
  11. package/dist/types/annotations/AnnotationEditor.d.ts +16 -0
  12. package/dist/types/annotations/AnnotationMarkers.d.ts +19 -0
  13. package/dist/types/annotations/AnnotationSelectionLayer.d.ts +12 -0
  14. package/dist/types/annotations/AnnotationTarget.d.ts +9 -0
  15. package/dist/types/annotations/AnnotationTooltip.d.ts +9 -0
  16. package/dist/types/annotations/AnnotationTrigger.d.ts +10 -0
  17. package/dist/types/annotations/annotation-editor-state.d.ts +58 -0
  18. package/dist/types/annotations/annotation-screenshot.d.ts +4 -0
  19. package/dist/types/annotations/annotation-targets.d.ts +34 -0
  20. package/dist/types/annotations/getAnnotationProps.d.ts +17 -0
  21. package/dist/types/annotations/styles.d.ts +3 -0
  22. package/dist/types/annotations/useAnnotationGeometry.d.ts +22 -0
  23. package/dist/types/annotations/useDataAppAnnotations.d.ts +22 -0
  24. package/dist/types/app-context.d.ts +3 -0
  25. package/dist/types/bindings.d.ts +169 -0
  26. package/dist/types/content.d.ts +36 -0
  27. package/dist/types/date-formatting.d.ts +12 -0
  28. package/dist/types/details.d.ts +46 -0
  29. package/dist/types/exploration.d.ts +44 -0
  30. package/dist/types/hooks.d.ts +114 -0
  31. package/dist/types/index.d.ts +78 -0
  32. package/dist/types/injectStyles.d.ts +7 -0
  33. package/dist/types/mount.d.ts +13 -0
  34. package/dist/types/search-suggestions.d.ts +8 -0
  35. package/dist/types/source-owner.d.ts +2 -0
  36. package/dist/types/style-contract.d.ts +88 -0
  37. package/dist/types/style-validation.d.ts +2 -0
  38. package/dist/types/styles.d.ts +8 -0
  39. package/dist/types/ui/AboutData.d.ts +73 -0
  40. package/dist/types/ui/AltertableLogo.d.ts +3 -0
  41. package/dist/types/ui/AppFooter.d.ts +6 -0
  42. package/dist/types/ui/AppHeader.d.ts +10 -0
  43. package/dist/types/ui/AppLayout.d.ts +10 -0
  44. package/dist/types/ui/AppScope.d.ts +7 -0
  45. package/dist/types/ui/AppToolbar.d.ts +30 -0
  46. package/dist/types/ui/AreaChart.d.ts +7 -0
  47. package/dist/types/ui/BarChart.d.ts +6 -0
  48. package/dist/types/ui/Breakdown.d.ts +13 -0
  49. package/dist/types/ui/Button.d.ts +12 -0
  50. package/dist/types/ui/ChartLegend.d.ts +32 -0
  51. package/dist/types/ui/Checkbox.d.ts +21 -0
  52. package/dist/types/ui/CheckboxGroup.d.ts +7 -0
  53. package/dist/types/ui/ChoicePicker.d.ts +39 -0
  54. package/dist/types/ui/Comparison.d.ts +14 -0
  55. package/dist/types/ui/ComposedChart.d.ts +41 -0
  56. package/dist/types/ui/ComposedChartLegend.d.ts +9 -0
  57. package/dist/types/ui/ContentSkeleton.d.ts +7 -0
  58. package/dist/types/ui/DataApp.d.ts +24 -0
  59. package/dist/types/ui/DataAppFrame.d.ts +52 -0
  60. package/dist/types/ui/DataBoundary.d.ts +14 -0
  61. package/dist/types/ui/DataSection.d.ts +14 -0
  62. package/dist/types/ui/DataSectionBoundary.d.ts +30 -0
  63. package/dist/types/ui/DataTable.d.ts +29 -0
  64. package/dist/types/ui/DataValue.d.ts +9 -0
  65. package/dist/types/ui/DataViewToast.d.ts +11 -0
  66. package/dist/types/ui/DataWidget.d.ts +37 -0
  67. package/dist/types/ui/DateDisplay.d.ts +9 -0
  68. package/dist/types/ui/DateRangePicker.d.ts +30 -0
  69. package/dist/types/ui/DateTimeTooltip.d.ts +10 -0
  70. package/dist/types/ui/DimensionPicker.d.ts +14 -0
  71. package/dist/types/ui/EmptyState.d.ts +6 -0
  72. package/dist/types/ui/ExplorationActionControl.d.ts +60 -0
  73. package/dist/types/ui/ExportControl.d.ts +4 -0
  74. package/dist/types/ui/FilterActions.d.ts +10 -0
  75. package/dist/types/ui/FilterBar.d.ts +3 -0
  76. package/dist/types/ui/FunnelChart.d.ts +20 -0
  77. package/dist/types/ui/GettingStarted.d.ts +6 -0
  78. package/dist/types/ui/GlossaryDefinition.d.ts +7 -0
  79. package/dist/types/ui/GlossaryExplanation.d.ts +16 -0
  80. package/dist/types/ui/GradientScroll.d.ts +23 -0
  81. package/dist/types/ui/Grid.d.ts +12 -0
  82. package/dist/types/ui/GridItem.d.ts +7 -0
  83. package/dist/types/ui/HelpPopover.d.ts +21 -0
  84. package/dist/types/ui/IconButton.d.ts +19 -0
  85. package/dist/types/ui/InspectionContext.d.ts +12 -0
  86. package/dist/types/ui/InspectionProvider.d.ts +29 -0
  87. package/dist/types/ui/JourneyChart.d.ts +10 -0
  88. package/dist/types/ui/Kbd.d.ts +7 -0
  89. package/dist/types/ui/LineChart.d.ts +7 -0
  90. package/dist/types/ui/LiveControl.d.ts +10 -0
  91. package/dist/types/ui/Menu.d.ts +13 -0
  92. package/dist/types/ui/MetricWidget.d.ts +51 -0
  93. package/dist/types/ui/NumberField.d.ts +27 -0
  94. package/dist/types/ui/NumberFilterPicker.d.ts +11 -0
  95. package/dist/types/ui/PeriodSummary.d.ts +17 -0
  96. package/dist/types/ui/PickerField.d.ts +23 -0
  97. package/dist/types/ui/PieChart.d.ts +11 -0
  98. package/dist/types/ui/PopoverSurface.d.ts +5 -0
  99. package/dist/types/ui/PresentStory.d.ts +30 -0
  100. package/dist/types/ui/QueryList.d.ts +14 -0
  101. package/dist/types/ui/RadioGroup.d.ts +18 -0
  102. package/dist/types/ui/Ranking.d.ts +13 -0
  103. package/dist/types/ui/RefreshControl.d.ts +9 -0
  104. package/dist/types/ui/RequestHint.d.ts +20 -0
  105. package/dist/types/ui/RetentionChart.d.ts +27 -0
  106. package/dist/types/ui/ScatterChart.d.ts +17 -0
  107. package/dist/types/ui/SearchField.d.ts +23 -0
  108. package/dist/types/ui/SearchInput.d.ts +10 -0
  109. package/dist/types/ui/SearchMatch.d.ts +6 -0
  110. package/dist/types/ui/SearchTypeahead.d.ts +15 -0
  111. package/dist/types/ui/SectionHeading.d.ts +8 -0
  112. package/dist/types/ui/Select.d.ts +22 -0
  113. package/dist/types/ui/SelectionMark.d.ts +5 -0
  114. package/dist/types/ui/Sheet.d.ts +21 -0
  115. package/dist/types/ui/Skeleton.d.ts +8 -0
  116. package/dist/types/ui/Stack.d.ts +7 -0
  117. package/dist/types/ui/StaticDataApp.d.ts +4 -0
  118. package/dist/types/ui/StatusPanel.d.ts +10 -0
  119. package/dist/types/ui/TableWidget.d.ts +67 -0
  120. package/dist/types/ui/Tabs.d.ts +10 -0
  121. package/dist/types/ui/TextContent.d.ts +4 -0
  122. package/dist/types/ui/TextWidget.d.ts +20 -0
  123. package/dist/types/ui/ThemeSelector.d.ts +12 -0
  124. package/dist/types/ui/Toast.d.ts +8 -0
  125. package/dist/types/ui/Tooltip.d.ts +23 -0
  126. package/dist/types/ui/TooltipSurface.d.ts +3 -0
  127. package/dist/types/ui/TrendChart.d.ts +5 -0
  128. package/dist/types/ui/UpdatedAt.d.ts +9 -0
  129. package/dist/types/ui/VariableBar.d.ts +6 -0
  130. package/dist/types/ui/VisualizationWidget.d.ts +43 -0
  131. package/dist/types/ui/WidgetDisclosure.d.ts +6 -0
  132. package/dist/types/ui/WidgetEvidence.d.ts +12 -0
  133. package/dist/types/ui/WidgetViewTabs.d.ts +16 -0
  134. package/dist/types/ui/chart-data.d.ts +36 -0
  135. package/dist/types/ui/chart-date-axis.d.ts +15 -0
  136. package/dist/types/ui/chart-interaction.d.ts +27 -0
  137. package/dist/types/ui/chart-primitives.d.ts +22 -0
  138. package/dist/types/ui/chart-time.d.ts +19 -0
  139. package/dist/types/ui/chartColor.d.ts +2 -0
  140. package/dist/types/ui/classNames.d.ts +1 -0
  141. package/dist/types/ui/csv-export.d.ts +19 -0
  142. package/dist/types/ui/data-context.d.ts +76 -0
  143. package/dist/types/ui/data-identifiers.d.ts +32 -0
  144. package/dist/types/ui/icons.d.ts +49 -0
  145. package/dist/types/ui/index.d.ts +111 -0
  146. package/dist/types/ui/journey-flow.d.ts +49 -0
  147. package/dist/types/ui/keyboard.d.ts +6 -0
  148. package/dist/types/ui/metric-comparison.d.ts +30 -0
  149. package/dist/types/ui/metric.d.ts +11 -0
  150. package/dist/types/ui/presentation.d.ts +25 -0
  151. package/dist/types/ui/search.d.ts +6 -0
  152. package/dist/types/ui/searchItems.d.ts +36 -0
  153. package/dist/types/ui/shortcuts.d.ts +45 -0
  154. package/dist/types/ui/story.d.ts +20 -0
  155. package/dist/types/ui/time-interval.d.ts +96 -0
  156. package/dist/types/ui/use-chart-scroll-to-end.d.ts +2 -0
  157. package/dist/types/ui/useAppAppearance.d.ts +3 -0
  158. package/dist/types/ui/useDataAppPresentation.d.ts +3 -0
  159. package/dist/types/ui/useSvgId.d.ts +2 -0
  160. package/dist/types/ui/variables.d.ts +36 -0
  161. package/dist/types/ui/widget-views.d.ts +3 -0
  162. package/dist/types/view-control-bar.d.ts +18 -0
  163. package/dist/types/view-controls.d.ts +20 -0
  164. package/dist/types/view-runtime.d.ts +34 -0
  165. package/dist/types/view.d.ts +87 -0
  166. package/dist/types/widgets.d.ts +90 -0
  167. package/dist/ui/index.js +3520 -0
  168. package/dist/ui/index.js.map +36 -0
  169. package/package.json +65 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Altertable
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,60 @@
1
- # Temporary Holding Version
1
+ # @altertable/data-app-react
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ React components, hooks, styles, and authoring tools for Altertable data apps.
4
+
5
+ ## Installation
6
+
7
+ ```fish
8
+ bun add @altertable/data-app @altertable/data-app-react react react-dom
9
+ ```
10
+
11
+ React and React DOM 19.2 or newer are required.
12
+
13
+ ## Usage
14
+
15
+ Mount a simple static screen into an element with `id="root"`:
16
+
17
+ ```tsx
18
+ import { defineDataApp } from '@altertable/data-app';
19
+ import { injectDataAppStyles, mountDataApp } from '@altertable/data-app-react';
20
+ import { MetricWidget } from '@altertable/data-app-react/ui';
21
+
22
+ const app = defineDataApp({
23
+ title: 'Activity',
24
+ description: 'A snapshot of activity.',
25
+ scope: { organization: 'demo', environment: 'production' },
26
+ queries: {},
27
+ });
28
+
29
+ function App() {
30
+ return (
31
+ <MetricWidget
32
+ label="Active projects"
33
+ value={42}
34
+ format={{ kind: 'count' }}
35
+ />
36
+ );
37
+ }
38
+
39
+ injectDataAppStyles();
40
+ mountDataApp({ app, component: App });
41
+ ```
42
+
43
+ Use the main entry for declared views, bound widgets, and layouts; `/ui` supports
44
+ setup screens, static content, and custom composition. Install styles explicitly
45
+ with `injectDataAppStyles()`.
46
+
47
+ To embed an app in a React host, use `@altertable/data-app-embed/react`. These
48
+ packages do not depend on each other: this package builds the app UI; the embed
49
+ package manages its host iframe.
50
+
51
+ ## Documentation
52
+
53
+ See the [React guide](https://github.com/altertable-ai/data-app/blob/main/docs/react.md)
54
+ for apps with queries, filters, and bound widgets.
55
+ Use the hosted template from `@altertable/data-app-examples` at the same version as
56
+ `@altertable/data-app`. Browse the latest [single-file starter](https://github.com/altertable-ai/data-app/blob/main/packages/data-app-examples/templates/starter-data-app/index.tsx).
57
+
58
+ ## License
59
+
60
+ [MIT](LICENSE). Vendored code is covered by [third-party notices](THIRD_PARTY_NOTICES).
@@ -0,0 +1,18 @@
1
+ d3-time 3.1.0 and d3-array 3.2.4
2
+ https://github.com/d3/d3-time
3
+ https://github.com/d3/d3-array
4
+
5
+ Copyright 2010-2022 Mike Bostock (d3-time)
6
+ Copyright 2010-2023 Mike Bostock (d3-array tick-step helpers)
7
+
8
+ Permission to use, copy, modify, and/or distribute this software for any purpose
9
+ with or without fee is hereby granted, provided that the above copyright notice
10
+ and this permission notice appear in all copies.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
13
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
14
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
15
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
16
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
17
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
18
+ THIS SOFTWARE.