@altertable/data-app 0.64.0 → 0.66.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 (157) hide show
  1. package/AGENTS.md +40 -0
  2. package/CONTRIBUTING.md +37 -3
  3. package/README.md +2 -2
  4. package/dist/chunks/{contract-mwe7gnmh.js → contract-13j5zb3c.js} +110 -216
  5. package/dist/chunks/contract-13j5zb3c.js.map +13 -0
  6. package/dist/chunks/contract-19ckn3n7.js +78 -0
  7. package/dist/chunks/contract-19ckn3n7.js.map +10 -0
  8. package/dist/chunks/contract-awa2d5b1.js +272 -0
  9. package/dist/chunks/contract-awa2d5b1.js.map +12 -0
  10. package/dist/chunks/{contract-xtxza1fy.js → contract-e11m4y7f.js} +35 -71
  11. package/dist/chunks/contract-e11m4y7f.js.map +12 -0
  12. package/dist/chunks/{contract-zr3jd7mr.js → contract-h8a6f559.js} +100 -75
  13. package/dist/chunks/contract-h8a6f559.js.map +12 -0
  14. package/dist/chunks/contract-havnjmdr.js +13011 -0
  15. package/dist/chunks/contract-havnjmdr.js.map +99 -0
  16. package/dist/chunks/{contract-txjy0en2.js → contract-m6n8ctfc.js} +64 -72
  17. package/dist/chunks/contract-m6n8ctfc.js.map +10 -0
  18. package/dist/chunks/contract-pk603qj7.js +146 -0
  19. package/dist/chunks/contract-pk603qj7.js.map +10 -0
  20. package/dist/chunks/{contract-yxbjea23.js → contract-rfbakka4.js} +179 -2
  21. package/dist/chunks/contract-rfbakka4.js.map +13 -0
  22. package/dist/client/index.js +11 -6
  23. package/dist/client/index.js.map +1 -1
  24. package/dist/core/appearance.js +1 -1
  25. package/dist/core/contract.js +13 -3
  26. package/dist/core/contract.js.map +1 -1
  27. package/dist/embed/index.js +25 -13
  28. package/dist/embed/index.js.map +3 -3
  29. package/dist/local.js +1 -1
  30. package/dist/local.js.map +2 -2
  31. package/dist/react/embed/index.js +5 -2
  32. package/dist/react/embed/index.js.map +3 -3
  33. package/dist/react/index.js +2532 -11273
  34. package/dist/react/index.js.map +16 -88
  35. package/dist/react/ui/index.js +1614 -0
  36. package/dist/react/ui/index.js.map +22 -0
  37. package/dist/server.js +1 -1
  38. package/dist/server.js.map +2 -2
  39. package/dist/types/client/annotations.d.ts +23 -0
  40. package/dist/types/client/iframe.d.ts +2 -0
  41. package/dist/types/client/index.d.ts +2 -0
  42. package/dist/types/client/logger.d.ts +6 -0
  43. package/dist/types/core/annotations.d.ts +92 -0
  44. package/dist/types/core/appearance.d.ts +2 -2
  45. package/dist/types/core/bridge-endpoint.d.ts +21 -0
  46. package/dist/types/core/bridge.d.ts +137 -16
  47. package/dist/types/core/contract.d.ts +2 -0
  48. package/dist/types/core/logger.d.ts +12 -0
  49. package/dist/types/core/presentation.d.ts +2 -0
  50. package/dist/types/core/variables.d.ts +2 -5
  51. package/dist/types/embed/host.d.ts +6 -2
  52. package/dist/types/embed/index.d.ts +1 -0
  53. package/dist/types/embed/source.d.ts +1 -1
  54. package/dist/types/react/annotations/AnnotationBar.d.ts +24 -0
  55. package/dist/types/react/annotations/AnnotationControls.d.ts +10 -0
  56. package/dist/types/react/annotations/AnnotationEditor.d.ts +15 -0
  57. package/dist/types/react/annotations/AnnotationMarkers.d.ts +19 -0
  58. package/dist/types/react/annotations/AnnotationSelectionLayer.d.ts +12 -0
  59. package/dist/types/react/annotations/AnnotationTarget.d.ts +9 -0
  60. package/dist/types/react/annotations/AnnotationTooltip.d.ts +9 -0
  61. package/dist/types/react/annotations/AnnotationTrigger.d.ts +10 -0
  62. package/dist/types/react/annotations/annotation-editor-state.d.ts +56 -0
  63. package/dist/types/react/annotations/annotation-screenshot.d.ts +4 -0
  64. package/dist/types/react/annotations/annotation-targets.d.ts +33 -0
  65. package/dist/types/react/annotations/getAnnotationProps.d.ts +15 -0
  66. package/dist/types/react/annotations/styles.d.ts +3 -0
  67. package/dist/types/react/annotations/useAnnotationGeometry.d.ts +22 -0
  68. package/dist/types/react/annotations/useDataAppAnnotations.d.ts +19 -0
  69. package/dist/types/react/bindings.d.ts +110 -0
  70. package/dist/types/react/content.d.ts +24 -11
  71. package/dist/types/react/embed/bridge.d.ts +1 -1
  72. package/dist/types/react/hooks.d.ts +29 -787
  73. package/dist/types/react/index.d.ts +30 -104
  74. package/dist/types/react/source-owner.d.ts +2 -0
  75. package/dist/types/react/style-contract.d.ts +60 -0
  76. package/dist/types/react/style-validation.d.ts +2 -0
  77. package/dist/types/react/ui/AboutData.d.ts +9 -1
  78. package/dist/types/react/ui/AppHeader.d.ts +1 -2
  79. package/dist/types/react/ui/AppLayout.d.ts +3 -9
  80. package/dist/types/react/ui/AppToolbar.d.ts +6 -7
  81. package/dist/types/react/ui/AreaChart.d.ts +7 -0
  82. package/dist/types/react/ui/BarChart.d.ts +6 -0
  83. package/dist/types/react/ui/{ComparisonVisual.d.ts → Comparison.d.ts} +3 -3
  84. package/dist/types/react/ui/ContentSkeleton.d.ts +2 -0
  85. package/dist/types/react/ui/DataApp.d.ts +17 -53
  86. package/dist/types/react/ui/DataAppFrame.d.ts +42 -0
  87. package/dist/types/react/ui/DataBoundary.d.ts +4 -5
  88. package/dist/types/react/ui/DataSection.d.ts +6 -18
  89. package/dist/types/react/ui/DataSectionBoundary.d.ts +30 -0
  90. package/dist/types/react/ui/DataValue.d.ts +9 -0
  91. package/dist/types/react/ui/DataWidget.d.ts +2 -1
  92. package/dist/types/react/ui/DateTimeTooltip.d.ts +1 -1
  93. package/dist/types/react/ui/ExportControl.d.ts +4 -0
  94. package/dist/types/react/ui/HelpPopover.d.ts +3 -4
  95. package/dist/types/react/ui/InspectionContext.d.ts +2 -0
  96. package/dist/types/react/ui/InspectionProvider.d.ts +29 -0
  97. package/dist/types/react/ui/LineChart.d.ts +7 -0
  98. package/dist/types/react/ui/MetricWidget.d.ts +4 -3
  99. package/dist/types/react/ui/PieChart.d.ts +8 -0
  100. package/dist/types/react/ui/PresentStory.d.ts +2 -5
  101. package/dist/types/react/ui/RefreshControl.d.ts +1 -2
  102. package/dist/types/react/ui/ScatterChart.d.ts +17 -0
  103. package/dist/types/react/ui/SearchField.d.ts +1 -2
  104. package/dist/types/react/ui/SearchInput.d.ts +3 -1
  105. package/dist/types/react/ui/Sheet.d.ts +2 -1
  106. package/dist/types/react/ui/Skeleton.d.ts +5 -2
  107. package/dist/types/react/ui/StaticDataApp.d.ts +4 -0
  108. package/dist/types/react/ui/TableWidget.d.ts +19 -16
  109. package/dist/types/react/ui/Tabs.d.ts +6 -2
  110. package/dist/types/react/ui/TextWidget.d.ts +2 -1
  111. package/dist/types/react/ui/Toast.d.ts +8 -0
  112. package/dist/types/react/ui/Tooltip.d.ts +4 -3
  113. package/dist/types/react/ui/TrendChart.d.ts +5 -0
  114. package/dist/types/react/ui/UpdatedAt.d.ts +1 -1
  115. package/dist/types/react/ui/VisualizationWidget.d.ts +12 -13
  116. package/dist/types/react/ui/WidgetViewTabs.d.ts +1 -1
  117. package/dist/types/react/ui/chart-data.d.ts +25 -0
  118. package/dist/types/react/ui/csv-export.d.ts +19 -0
  119. package/dist/types/react/ui/data-context.d.ts +18 -7
  120. package/dist/types/react/ui/icons.d.ts +2 -0
  121. package/dist/types/react/ui/index.d.ts +74 -0
  122. package/dist/types/react/ui/metric.d.ts +1 -1
  123. package/dist/types/react/ui/presentation.d.ts +5 -1
  124. package/dist/types/react/ui/shortcuts.d.ts +7 -1
  125. package/dist/types/react/view-runtime.d.ts +29 -0
  126. package/dist/types/react/view.d.ts +21 -4
  127. package/dist/types/react/widgets.d.ts +79 -0
  128. package/dist/worker.js +381 -79
  129. package/docs/app-authoring.md +64 -30
  130. package/docs/data-context.md +89 -0
  131. package/docs/embed.md +1 -1
  132. package/docs/formatting-and-appearance.md +52 -0
  133. package/docs/hosted-apps.md +2 -15
  134. package/docs/layout.md +33 -0
  135. package/docs/local-data-apps.md +1 -1
  136. package/docs/react-embed.md +2 -2
  137. package/docs/react.md +20 -254
  138. package/docs/stories-and-export.md +52 -0
  139. package/docs/styling.md +55 -0
  140. package/docs/ui-quality.md +20 -0
  141. package/docs/ui.md +41 -0
  142. package/docs/variables.md +98 -0
  143. package/docs/views.md +127 -0
  144. package/docs/widgets.md +142 -0
  145. package/examples/starter-data-app/index.tsx +89 -44
  146. package/package.json +13 -4
  147. package/dist/chunks/contract-cxr9t12b.js +0 -18
  148. package/dist/chunks/contract-cxr9t12b.js.map +0 -10
  149. package/dist/chunks/contract-mwe7gnmh.js.map +0 -13
  150. package/dist/chunks/contract-txjy0en2.js.map +0 -10
  151. package/dist/chunks/contract-xtxza1fy.js.map +0 -12
  152. package/dist/chunks/contract-yxbjea23.js.map +0 -12
  153. package/dist/chunks/contract-zr3jd7mr.js.map +0 -12
  154. package/dist/types/react/ui/RefreshRegion.d.ts +0 -9
  155. package/dist/types/react/ui/SelectableBarChart.d.ts +0 -15
  156. package/docs/releasing.md +0 -79
  157. /package/dist/types/react/ui/{comparison.d.ts → metric-comparison.d.ts} +0 -0
@@ -0,0 +1,1614 @@
1
+ import {
2
+ injectStyles,
3
+ injectDataAppStyles2,
4
+ AppIcon2,
5
+ classNames,
6
+ Button2,
7
+ TooltipProvider2,
8
+ Tooltip2,
9
+ GradientScroll2,
10
+ Sheet2,
11
+ TabList2,
12
+ TabPanels2,
13
+ Tab2,
14
+ TabPanel2,
15
+ Tabs2,
16
+ useViewTab2,
17
+ AboutData2,
18
+ DataAppProvider2,
19
+ useDeclaredResult,
20
+ useAppVariables2,
21
+ SearchField2,
22
+ Skeleton2,
23
+ SearchMatch2,
24
+ searchItems2,
25
+ Combobox2,
26
+ Checkbox2,
27
+ DateRangePicker2,
28
+ DimensionPicker2,
29
+ createDataHooks2,
30
+ LiveControl2,
31
+ PresentStory2,
32
+ DataAppFrame,
33
+ Grid2,
34
+ DataWidget2,
35
+ VisualizationWidget2,
36
+ MetricWidget2,
37
+ HelpPopover2,
38
+ DataTable2,
39
+ DataTableShare2,
40
+ DataTableEmptyRow2,
41
+ DataTableTimestamp2,
42
+ TableWidget2,
43
+ TextWidget2,
44
+ DataValue2,
45
+ createDataContext2
46
+ } from "../../chunks/contract-havnjmdr.js";
47
+ import"../../chunks/contract-wz59z8pq.js";
48
+ import"../../chunks/contract-mev09s5v.js";
49
+ import {
50
+ invariant
51
+ } from "../../chunks/contract-rfbakka4.js";
52
+ import"../../chunks/contract-m6n8ctfc.js";
53
+ import {
54
+ createDataClient2
55
+ } from "../../chunks/contract-19ckn3n7.js";
56
+ import"../../chunks/contract-pk603qj7.js";
57
+ import"../../chunks/contract-e11m4y7f.js";
58
+
59
+ // src/react/shellStyles.ts
60
+ function injectDataAppShellStyles(options = {}) {
61
+ return injectStyles({
62
+ name: "injectDataAppShellStyles",
63
+ attribute: "data-altertable-shell-styles",
64
+ css: `/* src/react/tokens.css */
65
+ @layer atbl.tokens {
66
+ :root {
67
+ --atbl-background: var(--atbl-palette-background);
68
+ --atbl-surface: var(--atbl-palette-surface);
69
+ --atbl-subtle: var(--atbl-palette-subtle);
70
+ --atbl-backdrop: #0f171e38;
71
+ --atbl-text: var(--atbl-palette-text);
72
+ --atbl-muted: var(--atbl-palette-muted);
73
+ --atbl-border: var(--atbl-palette-border);
74
+ --atbl-accent: var(--atbl-input-accent, #405d47);
75
+ --atbl-on-accent: var(--atbl-input-on-accent, #fff);
76
+ --atbl-danger: #b42318;
77
+ --atbl-danger-subtle: color-mix(in srgb, var(--atbl-danger) 9%, var(--atbl-surface));
78
+ --atbl-code-surface: #f4f6f9;
79
+ --atbl-code-text: #273242;
80
+ --atbl-mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
81
+ --atbl-focus-ring-offset: 2px;
82
+ --atbl-focus-ring-inset: -1px;
83
+ --atbl-font: var(--atbl-input-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, ui-sans-serif, sans-serif);
84
+ --atbl-space-xs: 5px;
85
+ --atbl-space-sm: 10px;
86
+ --atbl-space-md: 16px;
87
+ --atbl-space-lg: 24px;
88
+ --atbl-space-xl: 32px;
89
+ --atbl-content-width: 960px;
90
+ --atbl-control-height: 2.375rem;
91
+ --atbl-control-compact-height: 1.875rem;
92
+ --atbl-control-icon-size: 1rem;
93
+ --atbl-control-padding-inline: .75rem;
94
+ --atbl-control-padding-block: .375rem;
95
+ --atbl-control-gap: .5rem;
96
+ --atbl-control-disabled-opacity: .5;
97
+ --atbl-radius-control: 7px;
98
+ --atbl-radius-surface: 12px;
99
+ --atbl-radius-overlay: 16px;
100
+ --atbl-shadow-surface: 0 3px 16px #141c280d;
101
+ --atbl-shadow-overlay: 0 18px 50px #00000029;
102
+ --atbl-shadow-control: 0 1px 3px #0000001a;
103
+ --atbl-cursor-action: pointer;
104
+ --atbl-cursor-disabled: default;
105
+ --atbl-cursor-help: help;
106
+ --atbl-cursor-busy: progress;
107
+ --atbl-duration-fast: .12s;
108
+ --atbl-duration-normal: .18s;
109
+ --atbl-duration-slow: .24s;
110
+ --atbl-ease-standard: ease;
111
+ --atbl-ease-enter: cubic-bezier(.2, .7, .2, 1);
112
+ --atbl-chart-1: color-mix(in srgb, var(--atbl-input-chart-1, #285fc0) var(--atbl-chart-strength), white);
113
+ --atbl-chart-2: color-mix(in srgb, var(--atbl-input-chart-2, #a95319) var(--atbl-chart-strength), white);
114
+ --atbl-chart-3: color-mix(in srgb, var(--atbl-input-chart-3, #147862) var(--atbl-chart-strength), white);
115
+ --atbl-chart-4: color-mix(in srgb, var(--atbl-input-chart-4, #7243aa) var(--atbl-chart-strength), white);
116
+ --atbl-chart-5: color-mix(in srgb, var(--atbl-input-chart-5, #aa3958) var(--atbl-chart-strength), white);
117
+ --atbl-chart-6: color-mix(in srgb, var(--atbl-input-chart-6, #475569) var(--atbl-chart-strength), white);
118
+ --atbl-chart-7: color-mix(in srgb, var(--atbl-input-chart-7, #285fc0) var(--atbl-chart-strength), white);
119
+ --atbl-chart-8: color-mix(in srgb, var(--atbl-input-chart-8, #a95319) var(--atbl-chart-strength), white);
120
+ --atbl-type-emphasis-weight: 680;
121
+ --atbl-type-meta-weight: 500;
122
+ --atbl-type-page-size: clamp(1.375rem, 2.4vw, 1.75rem);
123
+ --atbl-type-section-size: 1.25rem;
124
+ --atbl-type-widget-size: 1.0625rem;
125
+ --atbl-type-body-size: .875rem;
126
+ --atbl-type-label-size: .8125rem;
127
+ --atbl-type-meta-size: .75rem;
128
+ --atbl-type-metric-size: clamp(1.625rem, 3vw, 2.125rem);
129
+ --atbl-type-heading-weight: 650;
130
+ --atbl-type-label-weight: 600;
131
+ --atbl-type-body-leading: 1.65;
132
+ --atbl-type-label-leading: 1.4;
133
+ --atbl-type-heading-leading: 1.3;
134
+ --atbl-type-metric-leading: 1.08;
135
+ --atbl-text-measure: 70ch;
136
+ }
137
+ }
138
+
139
+ /* src/react/appearance.css */
140
+ @layer atbl.tokens {
141
+ :root {
142
+ --atbl-palette-background: #fff;
143
+ --atbl-palette-surface: #fff;
144
+ --atbl-palette-subtle: #f6f7f7;
145
+ --atbl-palette-text: #202124;
146
+ --atbl-palette-muted: #687078;
147
+ --atbl-palette-border: #e3e6e8;
148
+ --atbl-chart-strength: 100%;
149
+ --atbl-accent-subtle-strength: 12%;
150
+ }
151
+
152
+ :root[data-atbl-theme="dark"] {
153
+ --atbl-palette-background: #151719;
154
+ --atbl-palette-surface: #202326;
155
+ --atbl-palette-subtle: #292d31;
156
+ --atbl-palette-text: #f2f3f4;
157
+ --atbl-palette-muted: #aeb5bc;
158
+ --atbl-palette-border: #3b4248;
159
+ }
160
+
161
+ :root[data-atbl-base-color="slate"] {
162
+ --atbl-palette-background: #f8fafc;
163
+ --atbl-palette-surface: #fff;
164
+ --atbl-palette-subtle: #f1f5f9;
165
+ --atbl-palette-text: #17212f;
166
+ --atbl-palette-muted: #607083;
167
+ --atbl-palette-border: #dce3ea;
168
+ }
169
+
170
+ :root[data-atbl-base-color="slate"][data-atbl-theme="dark"] {
171
+ --atbl-palette-background: #111820;
172
+ --atbl-palette-surface: #1b2530;
173
+ --atbl-palette-subtle: #263340;
174
+ --atbl-palette-text: #f0f4f8;
175
+ --atbl-palette-muted: #a8b5c3;
176
+ --atbl-palette-border: #3a4857;
177
+ }
178
+
179
+ :root[data-atbl-base-color="warm"] {
180
+ --atbl-palette-background: #fbfaf8;
181
+ --atbl-palette-surface: #fff;
182
+ --atbl-palette-subtle: #f5f2ed;
183
+ --atbl-palette-text: #292723;
184
+ --atbl-palette-muted: #736e66;
185
+ --atbl-palette-border: #e8e2da;
186
+ }
187
+
188
+ :root[data-atbl-base-color="warm"][data-atbl-theme="dark"] {
189
+ --atbl-palette-background: #1b1916;
190
+ --atbl-palette-surface: #25221e;
191
+ --atbl-palette-subtle: #302c27;
192
+ --atbl-palette-text: #f5f1eb;
193
+ --atbl-palette-muted: #bcb3a8;
194
+ --atbl-palette-border: #494239;
195
+ }
196
+
197
+ :root[data-atbl-theme="dark"] {
198
+ --atbl-accent: var(--atbl-input-dark-accent, color-mix(in srgb, var(--atbl-input-accent, #405d47) 50%, white));
199
+ --atbl-accent-subtle-strength: 22%;
200
+ --atbl-on-accent: var(--atbl-input-on-accent, var(--atbl-background));
201
+ --atbl-danger: #f97066;
202
+ --atbl-backdrop: #0000008c;
203
+ --atbl-code-surface: #242a31;
204
+ --atbl-code-text: #e5e9ef;
205
+ --atbl-chart-strength: 60%;
206
+ }
207
+
208
+ :root[data-atbl-density="compact"] {
209
+ --atbl-control-height: 2.125rem;
210
+ --atbl-control-padding-inline: .625rem;
211
+ --atbl-control-padding-block: .25rem;
212
+ --atbl-space-xs: 4px;
213
+ --atbl-space-sm: 8px;
214
+ --atbl-space-md: 12px;
215
+ --atbl-space-lg: 18px;
216
+ --atbl-space-xl: 24px;
217
+ }
218
+
219
+ :root[data-atbl-density="spacious"] {
220
+ --atbl-control-height: 2.625rem;
221
+ --atbl-control-padding-inline: 1rem;
222
+ --atbl-control-padding-block: .5rem;
223
+ --atbl-space-xs: 6px;
224
+ --atbl-space-sm: 12px;
225
+ --atbl-space-md: 20px;
226
+ --atbl-space-lg: 30px;
227
+ --atbl-space-xl: 40px;
228
+ }
229
+
230
+ :root[data-atbl-radius="none"] {
231
+ --atbl-radius-control: 0px;
232
+ --atbl-radius-surface: 0px;
233
+ --atbl-radius-overlay: 0px;
234
+ }
235
+
236
+ :root[data-atbl-radius="small"] {
237
+ --atbl-radius-control: 4px;
238
+ --atbl-radius-surface: 7px;
239
+ --atbl-radius-overlay: 9px;
240
+ }
241
+
242
+ :root[data-atbl-radius="large"] {
243
+ --atbl-radius-control: 10px;
244
+ --atbl-radius-surface: 18px;
245
+ --atbl-radius-overlay: 24px;
246
+ }
247
+
248
+ :root[data-atbl-elevation="flat"] {
249
+ --atbl-shadow-surface: none;
250
+ --atbl-shadow-overlay: none;
251
+ --atbl-shadow-control: none;
252
+ }
253
+
254
+ :root[data-atbl-elevation="raised"] {
255
+ --atbl-shadow-surface: 0 8px 28px #141c281a;
256
+ --atbl-shadow-overlay: 0 24px 72px #0000003d;
257
+ }
258
+
259
+ @media (forced-colors: active) {
260
+ :root {
261
+ --atbl-focus-color: Highlight !important;
262
+ --atbl-on-accent: HighlightText !important;
263
+ }
264
+ }
265
+ }
266
+
267
+ /* src/react/base.css */
268
+ @layer atbl.base {
269
+ :where([class^="altertable-"], [class*=" altertable-"]) {
270
+ box-sizing: border-box;
271
+ }
272
+
273
+ :where([class^="altertable-"], [class*=" altertable-"]) * {
274
+ box-sizing: border-box;
275
+ }
276
+
277
+ :where([class^="starter-"], [class*=" starter-"]) * {
278
+ box-sizing: border-box;
279
+ }
280
+
281
+ :where([class^="altertable-"], [class*=" altertable-"]) button {
282
+ font: inherit;
283
+ }
284
+
285
+ :root[data-atbl-appearance] {
286
+ scrollbar-gutter: stable;
287
+ font-family: var(--atbl-font);
288
+ color: var(--atbl-text);
289
+ background: var(--atbl-background);
290
+ font-synthesis: none;
291
+ -webkit-font-smoothing: antialiased;
292
+ text-rendering: optimizeLegibility;
293
+ }
294
+
295
+ :root[data-atbl-theme="light"] {
296
+ --buncss-light: initial;
297
+ --buncss-dark: ;
298
+ color-scheme: light;
299
+ }
300
+
301
+ :root[data-atbl-theme="dark"] {
302
+ --buncss-light: ;
303
+ --buncss-dark: initial;
304
+ color-scheme: dark;
305
+ }
306
+
307
+ :root[data-atbl-appearance] body, :root[data-atbl-appearance] #root {
308
+ margin: 0;
309
+ }
310
+
311
+ .altertable-sr-only {
312
+ position: fixed;
313
+ overflow: hidden;
314
+ clip: rect(0, 0, 0, 0);
315
+ clip-path: inset(50%);
316
+ white-space: nowrap;
317
+ border: 0;
318
+ width: 1px;
319
+ height: 1px;
320
+ margin: -1px;
321
+ padding: 0;
322
+ }
323
+ }
324
+
325
+ /* src/react/ui/Skeleton.css */
326
+ @layer atbl.components {
327
+ .altertable-skeleton {
328
+ display: block;
329
+ border-radius: var(--atbl-radius-control);
330
+ background: var(--atbl-subtle);
331
+ opacity: 0;
332
+ animation: altertable-skeleton-in .2s var(--atbl-ease-standard) .2s forwards, altertable-skeleton-pulse 1.4s ease-in-out .4s infinite alternate;
333
+ }
334
+
335
+ .altertable-skeleton[data-inline] {
336
+ display: inline-block;
337
+ vertical-align: middle;
338
+ width: 8ch;
339
+ height: 1em;
340
+ }
341
+
342
+ @keyframes altertable-skeleton-in {
343
+ to {
344
+ opacity: 1;
345
+ }
346
+ }
347
+
348
+ @keyframes altertable-skeleton-pulse {
349
+ to {
350
+ opacity: .5;
351
+ }
352
+ }
353
+
354
+ @media (prefers-reduced-motion: reduce) {
355
+ .altertable-skeleton {
356
+ animation: 1ms .2s forwards altertable-skeleton-in;
357
+ }
358
+ }
359
+ }
360
+
361
+ /* src/react/ui/Grid.css */
362
+ @layer atbl.components {
363
+ .altertable-grid {
364
+ display: grid;
365
+ container: altertable-grid / inline-size;
366
+ --atbl-grid-gap: var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
367
+ --atbl-grid-min-item-width: 240px;
368
+ --atbl-grid-column-width: 100%;
369
+ --atbl-grid-max-columns: 1;
370
+ align-content: start;
371
+ align-items: start;
372
+ gap: var(--atbl-grid-gap);
373
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, max(var(--atbl-grid-min-item-width), var(--atbl-grid-column-width))), 1fr));
374
+ min-width: 0;
375
+ }
376
+
377
+ .altertable-grid > * {
378
+ min-width: 0;
379
+ min-height: 0;
380
+ margin: 0;
381
+ }
382
+
383
+ .altertable-grid[data-align="stretch"] {
384
+ align-items: stretch;
385
+ }
386
+
387
+ .altertable-grid[data-gap="sm"] {
388
+ --atbl-grid-gap: var(--atbl-space-sm);
389
+ }
390
+
391
+ .altertable-grid[data-gap="md"] {
392
+ --atbl-grid-gap: var(--atbl-space-md);
393
+ }
394
+
395
+ .altertable-grid[data-gap="lg"] {
396
+ --atbl-grid-gap: var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
397
+ }
398
+
399
+ .altertable-grid[data-min-item-width="compact"] {
400
+ --atbl-grid-min-item-width: 192px;
401
+ }
402
+
403
+ .altertable-grid[data-min-item-width="wide"] {
404
+ --atbl-grid-min-item-width: 320px;
405
+ }
406
+
407
+ .altertable-grid[data-columns="2"] {
408
+ --atbl-grid-max-columns: 2;
409
+ --atbl-grid-column-width: calc((100% - var(--atbl-grid-gap)) / 2);
410
+ }
411
+
412
+ .altertable-grid[data-columns="3"] {
413
+ --atbl-grid-max-columns: 3;
414
+ --atbl-grid-column-width: calc((100% - var(--atbl-grid-gap) - var(--atbl-grid-gap)) / 3);
415
+ }
416
+
417
+ .altertable-grid[data-columns="4"] {
418
+ --atbl-grid-max-columns: 4;
419
+ --atbl-grid-column-width: calc((100% - var(--atbl-grid-gap) - var(--atbl-grid-gap) - var(--atbl-grid-gap)) / 4);
420
+ }
421
+
422
+ .altertable-grid-item {
423
+ min-width: 0;
424
+ min-height: 0;
425
+ }
426
+
427
+ .altertable-grid > * {
428
+ --atbl-grid-fitting-columns: clamp(1, round(down, tan(atan2(100cqw + var(--atbl-grid-gap) + .001px, var(--atbl-grid-min-item-width) + var(--atbl-grid-gap))), 1), var(--atbl-grid-max-columns));
429
+ }
430
+
431
+ .altertable-grid > .altertable-grid-item[data-span="2"] {
432
+ grid-column: span min(2, var(--atbl-grid-fitting-columns));
433
+ }
434
+
435
+ .altertable-grid[data-columns="3"]:has( > .altertable-grid-item[data-span="2"]) > :not(.altertable-grid-item[data-span="2"]) {
436
+ grid-column: span clamp(1, (3 - var(--atbl-grid-fitting-columns)) * 2, var(--atbl-grid-fitting-columns));
437
+ }
438
+
439
+ .altertable-grid[data-columns="3"]:not(:has( > .altertable-grid-item[data-span="2"])) > :last-child:nth-child(odd) {
440
+ grid-column: span clamp(1, (3 - var(--atbl-grid-fitting-columns)) * 2, var(--atbl-grid-fitting-columns));
441
+ }
442
+ }
443
+
444
+ /* src/react/ui/DataWidget.css */
445
+ @layer atbl.components {
446
+ .altertable-data-widget {
447
+ border: 1px solid var(--atbl-border);
448
+ border-radius: calc(var(--atbl-radius-surface) * 1.5);
449
+ corner-shape: squircle;
450
+ background: var(--atbl-surface);
451
+ box-shadow: var(--atbl-shadow-surface);
452
+ min-width: 0;
453
+ }
454
+
455
+ .altertable-data-widget-header {
456
+ display: flex;
457
+ justify-content: space-between;
458
+ align-items: flex-start;
459
+ gap: var(--atbl-space-md);
460
+ padding: var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg))) var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg))) 0;
461
+ min-height: 30px;
462
+ }
463
+
464
+ .altertable-data-widget-header > div:first-child {
465
+ flex: 1;
466
+ min-width: 0;
467
+ }
468
+
469
+ .altertable-data-widget-help {
470
+ display: flex;
471
+ flex: none;
472
+ align-items: flex-start;
473
+ }
474
+
475
+ .altertable-data-widget-header h2 {
476
+ color: var(--atbl-text);
477
+ font-family: var(--atbl-font-heading, var(--atbl-input-font-heading, var(--atbl-font)));
478
+ font-size: var(--atbl-type-widget-size);
479
+ font-weight: var(--atbl-type-heading-weight);
480
+ line-height: var(--atbl-type-heading-leading);
481
+ letter-spacing: -.02em;
482
+ margin: 0;
483
+ }
484
+
485
+ .altertable-data-widget-count {
486
+ color: var(--atbl-muted);
487
+ font-size: var(--atbl-type-meta-size);
488
+ font-weight: var(--atbl-type-meta-weight);
489
+ letter-spacing: 0;
490
+ white-space: nowrap;
491
+ margin-left: 8px;
492
+ }
493
+
494
+ .altertable-data-widget-header p {
495
+ color: var(--atbl-muted);
496
+ font-size: var(--atbl-type-meta-size);
497
+ margin: 4px 0 0;
498
+ line-height: 1.45;
499
+ }
500
+
501
+ .altertable-data-widget-body {
502
+ padding: var(--atbl-space-md) var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg))) var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
503
+ min-width: 0;
504
+ }
505
+
506
+ .altertable-data-widget-body[data-padding="flush"] {
507
+ padding: 0;
508
+ }
509
+
510
+ .altertable-data-widget-footer {
511
+ padding: var(--atbl-space-md) var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
512
+ }
513
+
514
+ .altertable-data-widget-body > .altertable-status-panel {
515
+ background: none;
516
+ border: 0;
517
+ border-radius: 0;
518
+ margin: 0;
519
+ padding: 0;
520
+ }
521
+ }
522
+
523
+ /* src/react/ui/MetricWidget.css */
524
+ @layer atbl.components {
525
+ .altertable-metric-widget {
526
+ display: flex;
527
+ padding: var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
528
+ border: 1px solid var(--atbl-border);
529
+ border-radius: calc(var(--atbl-radius-surface) * 1.5);
530
+ corner-shape: squircle;
531
+ background: var(--atbl-surface);
532
+ box-shadow: var(--atbl-shadow-surface);
533
+ flex-direction: column;
534
+ min-width: 0;
535
+ }
536
+
537
+ .altertable-metric-widget.altertable-data-widget {
538
+ padding: 0;
539
+ }
540
+
541
+ .altertable-metric-widget > .altertable-data-widget-header {
542
+ min-height: 0;
543
+ }
544
+
545
+ .altertable-metric-widget > .altertable-data-widget-header h2 {
546
+ color: var(--atbl-muted);
547
+ font-family: inherit;
548
+ font-size: var(--atbl-type-label-size);
549
+ font-weight: var(--atbl-type-label-weight);
550
+ letter-spacing: normal;
551
+ }
552
+
553
+ .altertable-metric-widget > .altertable-data-widget-body {
554
+ padding-top: 0;
555
+ }
556
+
557
+ .altertable-metric-widget > .altertable-data-widget-body:has( + footer) {
558
+ padding-bottom: 0;
559
+ }
560
+
561
+ .altertable-metric-widget > .altertable-data-widget-footer {
562
+ padding-top: 0;
563
+ padding-bottom: var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
564
+ }
565
+
566
+ .altertable-metric-value {
567
+ margin: var(--atbl-space-sm) 0 2px;
568
+ color: var(--atbl-text);
569
+ font-family: var(--atbl-font-heading, var(--atbl-input-font-heading, var(--atbl-font)));
570
+ font-size: var(--atbl-type-metric-size);
571
+ font-weight: var(--atbl-type-emphasis-weight);
572
+ line-height: var(--atbl-type-metric-leading);
573
+ letter-spacing: -.04em;
574
+ overflow-wrap: anywhere;
575
+ font-variant-numeric: tabular-nums;
576
+ max-inline-size: 100%;
577
+ }
578
+
579
+ .altertable-metric-reading {
580
+ display: flex;
581
+ flex-direction: column;
582
+ justify-content: flex-start;
583
+ align-items: flex-start;
584
+ gap: 4px;
585
+ }
586
+
587
+ .altertable-metric-trend {
588
+ font-size: var(--atbl-type-meta-size);
589
+ }
590
+
591
+ .altertable-metric-change {
592
+ display: inline-flex;
593
+ color: var(--atbl-muted);
594
+ font-variant-numeric: tabular-nums;
595
+ align-items: center;
596
+ gap: 3px;
597
+ }
598
+
599
+ .altertable-metric-change[data-tone="good"] {
600
+ color: var(--atbl-positive, var(--atbl-accent));
601
+ }
602
+
603
+ .altertable-metric-change[data-tone="bad"] {
604
+ color: var(--atbl-negative, var(--atbl-danger));
605
+ }
606
+
607
+ .altertable-metric-description {
608
+ color: var(--atbl-muted);
609
+ font-size: var(--atbl-type-meta-size);
610
+ line-height: 1.45;
611
+ }
612
+
613
+ .altertable-metric-visual {
614
+ margin-top: var(--atbl-space-sm);
615
+ min-width: 0;
616
+ }
617
+
618
+ .altertable-metric-value[data-unavailable] {
619
+ opacity: .6;
620
+ }
621
+
622
+ .altertable-metric-value > .altertable-skeleton {
623
+ width: 6ch;
624
+ height: 1em;
625
+ }
626
+ }
627
+
628
+ /* src/react/ui/VisualizationWidget.css */
629
+ @layer atbl.components {
630
+ .altertable-visualization-widget-content {
631
+ padding: var(--atbl-space-md) var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg))) var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
632
+ min-width: 0;
633
+ }
634
+
635
+ :where(.altertable-data-widget-body) > .altertable-visualization-widget-content {
636
+ padding: 0;
637
+ }
638
+ }
639
+
640
+ /* src/react/ui/ContentSkeleton.css */
641
+ @layer atbl.components {
642
+ .altertable-content-skeleton {
643
+ display: grid;
644
+ padding: var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
645
+ align-content: start;
646
+ gap: 14px;
647
+ min-width: 0;
648
+ }
649
+
650
+ .altertable-content-skeleton-label {
651
+ width: 38%;
652
+ height: 15px;
653
+ }
654
+
655
+ .altertable-content-skeleton-value {
656
+ width: 56%;
657
+ height: 38px;
658
+ }
659
+
660
+ .altertable-content-skeleton-chart {
661
+ width: 100%;
662
+ height: 180px;
663
+ }
664
+
665
+ .altertable-content-skeleton-foot {
666
+ width: 70%;
667
+ height: 12px;
668
+ }
669
+
670
+ .altertable-content-skeleton-subtitle {
671
+ width: 52%;
672
+ height: 12px;
673
+ }
674
+
675
+ .altertable-content-skeleton-rows {
676
+ display: grid;
677
+ gap: 18px;
678
+ margin-top: 12px;
679
+ }
680
+
681
+ .altertable-content-skeleton-row {
682
+ display: grid;
683
+ gap: 8px;
684
+ }
685
+
686
+ .altertable-content-skeleton-row-label {
687
+ width: 56%;
688
+ height: 14px;
689
+ }
690
+
691
+ .altertable-content-skeleton-row-track {
692
+ width: 100%;
693
+ height: 8px;
694
+ }
695
+
696
+ .altertable-content-skeleton-row:nth-child(2) .altertable-content-skeleton-row-track {
697
+ width: 72%;
698
+ }
699
+
700
+ .altertable-content-skeleton-row:nth-child(3) .altertable-content-skeleton-row-track {
701
+ width: 48%;
702
+ }
703
+
704
+ .altertable-content-skeleton-row:nth-child(4) .altertable-content-skeleton-row-track {
705
+ width: 30%;
706
+ }
707
+
708
+ .altertable-content-skeleton-body {
709
+ display: grid;
710
+ gap: 14px;
711
+ min-width: 0;
712
+ }
713
+ }
714
+
715
+ /* src/react/shared.css */
716
+
717
+
718
+ /* src/react/ui/DataAppSkeleton.css */
719
+ @layer atbl.components {
720
+ .altertable-data-app-skeleton {
721
+ display: flex;
722
+ overflow: hidden;
723
+ padding: var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
724
+ background: var(--atbl-background);
725
+ flex: 1;
726
+ min-width: 0;
727
+ min-height: 0;
728
+ }
729
+
730
+ .altertable-data-app-skeleton-content {
731
+ display: flex;
732
+ gap: var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
733
+ max-width: var(--atbl-content-width);
734
+ flex-direction: column;
735
+ width: 100%;
736
+ min-width: 0;
737
+ margin-inline-start: auto;
738
+ margin-inline-end: auto;
739
+ }
740
+
741
+ .altertable-data-app-skeleton-body {
742
+ display: flex;
743
+ gap: var(--atbl-layout-gap, clamp(var(--atbl-space-md), 2.5vw, var(--atbl-space-lg)));
744
+ flex-direction: column;
745
+ min-width: 0;
746
+ }
747
+
748
+ .altertable-data-app-skeleton-header, .altertable-data-app-skeleton-footer {
749
+ min-width: 0;
750
+ }
751
+
752
+ .altertable-data-app-skeleton-widget-title {
753
+ width: 144px;
754
+ max-width: 100%;
755
+ height: 16px;
756
+ }
757
+
758
+ .altertable-data-app-skeleton-chart {
759
+ display: flex;
760
+ align-items: flex-end;
761
+ gap: var(--atbl-space-sm);
762
+ height: 180px;
763
+ }
764
+
765
+ .altertable-data-app-skeleton-chart > * {
766
+ flex: 1;
767
+ min-width: 0;
768
+ }
769
+
770
+ .altertable-data-app-skeleton-rows {
771
+ display: grid;
772
+ gap: 20px;
773
+ }
774
+
775
+ .altertable-data-app-skeleton-row {
776
+ display: grid;
777
+ grid-template-columns: 2fr 1fr 1fr;
778
+ gap: var(--atbl-space-md);
779
+ }
780
+
781
+ .altertable-data-app-skeleton-row > * {
782
+ height: 16px;
783
+ }
784
+ }
785
+
786
+ /* src/react/shellStyles.css */
787
+ @layer atbl.tokens, atbl.base, atbl.components, atbl.interaction;
788
+ `,
789
+ options
790
+ });
791
+ }
792
+ // src/react/ui/StaticDataApp.tsx
793
+ import { jsx } from "react/jsx-runtime";
794
+ function DataApp(props) {
795
+ return /* @__PURE__ */ jsx(DataAppFrame, {
796
+ ...props
797
+ });
798
+ }
799
+
800
+ // src/react/ui/GettingStarted.tsx
801
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
802
+ var connectionContext = createDataContext2({})({
803
+ description: "Connection setup",
804
+ glossary: {}
805
+ });
806
+ var client = /* @__PURE__ */ createDataClient2();
807
+ var { defineDataView } = /* @__PURE__ */ createDataHooks2(client);
808
+ var connectionView = defineDataView({
809
+ dataContext: connectionContext,
810
+ operation: "connection",
811
+ describeInput: () => "the connection",
812
+ isEmpty: () => false,
813
+ emptyFallback: { title: "No connection" }
814
+ });
815
+ function GettingStarted({
816
+ config,
817
+ dataContext
818
+ }) {
819
+ const connection = useDeclaredResult(connectionView);
820
+ const state = connection.view.kind === "error" || connection.view.kind === "stale-error" ? "error" : connection.refreshing || !connection.snapshot ? "checking" : "connected";
821
+ return /* @__PURE__ */ jsxs(DataApp, {
822
+ config,
823
+ dataContext,
824
+ description: "Check your lakehouse connection, then build a view around a real question.",
825
+ queries: connection.queries,
826
+ toolbarActions: /* @__PURE__ */ jsx2(Button2, {
827
+ disabled: connection.refreshing,
828
+ onClick: () => connection.refetch(),
829
+ children: "Check connection"
830
+ }),
831
+ children: [
832
+ /* @__PURE__ */ jsxs("section", {
833
+ className: "starter-connection",
834
+ "data-state": state,
835
+ role: state === "error" ? "alert" : "status",
836
+ children: [
837
+ /* @__PURE__ */ jsx2("div", {
838
+ className: "starter-connection-icon",
839
+ children: /* @__PURE__ */ jsx2(AppIcon2, {
840
+ name: state === "connected" ? "check" : state === "error" ? "error" : "loading",
841
+ size: 24
842
+ })
843
+ }),
844
+ /* @__PURE__ */ jsxs("div", {
845
+ className: "starter-connection-copy",
846
+ children: [
847
+ /* @__PURE__ */ jsx2("span", {
848
+ className: "starter-eyebrow",
849
+ children: "Lakehouse connection"
850
+ }),
851
+ /* @__PURE__ */ jsx2("h2", {
852
+ children: state === "connected" ? "Connected" : state === "error" ? "Connection not verified" : "Checking connection…"
853
+ }),
854
+ /* @__PURE__ */ jsx2("p", {
855
+ children: state === "connected" ? "A query completed successfully using this app’s current profile. You’re ready to build your first view." : state === "error" ? connection.snapshot ? "An earlier query succeeded, but the latest check failed. Check the profile and try again." : "The query could not complete. Check the profile and lakehouse access, then try again." : "Running a lightweight query with this app’s current profile."
856
+ }),
857
+ state === "connected" && /* @__PURE__ */ jsx2("small", {
858
+ children: "This check does not verify access to every dataset."
859
+ })
860
+ ]
861
+ }),
862
+ state === "error" && /* @__PURE__ */ jsx2(Button2, {
863
+ onClick: () => connection.refetch(),
864
+ children: "Try again"
865
+ })
866
+ ]
867
+ }),
868
+ /* @__PURE__ */ jsxs("section", {
869
+ className: "starter-next",
870
+ "aria-labelledby": "starter-next-title",
871
+ children: [
872
+ /* @__PURE__ */ jsxs("div", {
873
+ className: "starter-next-heading",
874
+ children: [
875
+ /* @__PURE__ */ jsx2("span", {
876
+ className: "starter-eyebrow",
877
+ children: "Next steps"
878
+ }),
879
+ /* @__PURE__ */ jsx2("h2", {
880
+ id: "starter-next-title",
881
+ children: "Turn this starter into a useful app"
882
+ }),
883
+ /* @__PURE__ */ jsx2("p", {
884
+ children: "Start with one question your readers need answered."
885
+ })
886
+ ]
887
+ }),
888
+ /* @__PURE__ */ jsxs("ol", {
889
+ className: "starter-steps",
890
+ children: [
891
+ /* @__PURE__ */ jsxs("li", {
892
+ children: [
893
+ /* @__PURE__ */ jsx2("strong", {
894
+ children: "Choose a question"
895
+ }),
896
+ /* @__PURE__ */ jsx2("p", {
897
+ children: "Decide what someone should learn or do after opening this app."
898
+ })
899
+ ]
900
+ }),
901
+ /* @__PURE__ */ jsxs("li", {
902
+ children: [
903
+ /* @__PURE__ */ jsx2("strong", {
904
+ children: "Find the right data"
905
+ }),
906
+ /* @__PURE__ */ jsx2("p", {
907
+ children: "Inspect the relevant catalogs, tables, and columns before writing the query."
908
+ })
909
+ ]
910
+ }),
911
+ /* @__PURE__ */ jsxs("li", {
912
+ children: [
913
+ /* @__PURE__ */ jsx2("strong", {
914
+ children: "Build the first view"
915
+ }),
916
+ /* @__PURE__ */ jsxs("p", {
917
+ children: [
918
+ "Replace the connection check in ",
919
+ /* @__PURE__ */ jsx2("code", {
920
+ children: "src/operations.ts"
921
+ }),
922
+ ", then render its result in ",
923
+ /* @__PURE__ */ jsx2("code", {
924
+ children: "src/App.tsx"
925
+ }),
926
+ "."
927
+ ]
928
+ })
929
+ ]
930
+ })
931
+ ]
932
+ })
933
+ ]
934
+ })
935
+ ]
936
+ });
937
+ }
938
+ // src/react/ui/DataAppSkeleton.tsx
939
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
940
+ var chartHeights = [40, 60, 50, 80, 60, 100, 80, 60];
941
+ function DataAppSkeleton({
942
+ header,
943
+ footer,
944
+ className,
945
+ ...props
946
+ }) {
947
+ return /* @__PURE__ */ jsx3("output", {
948
+ "aria-label": "Loading data app",
949
+ ...props,
950
+ "aria-busy": "true",
951
+ className: classNames("altertable-data-app-skeleton", className),
952
+ children: /* @__PURE__ */ jsxs2("div", {
953
+ className: "altertable-data-app-skeleton-content",
954
+ children: [
955
+ header != null && header !== false && /* @__PURE__ */ jsx3("div", {
956
+ className: "altertable-data-app-skeleton-header",
957
+ children: header
958
+ }),
959
+ /* @__PURE__ */ jsxs2("div", {
960
+ className: "altertable-data-app-skeleton-body",
961
+ "aria-hidden": "true",
962
+ children: [
963
+ /* @__PURE__ */ jsx3(Grid2, {
964
+ columns: 3,
965
+ gap: "md",
966
+ children: [0, 1, 2].map((item) => /* @__PURE__ */ jsx3(MetricWidget2, {
967
+ label: "",
968
+ loading: true
969
+ }, item))
970
+ }),
971
+ /* @__PURE__ */ jsx3(VisualizationWidget2, {
972
+ title: /* @__PURE__ */ jsx3(Skeleton2, {
973
+ className: "altertable-data-app-skeleton-widget-title"
974
+ }),
975
+ visual: /* @__PURE__ */ jsx3("div", {
976
+ className: "altertable-data-app-skeleton-chart",
977
+ children: chartHeights.map((height, index) => /* @__PURE__ */ jsx3(Skeleton2, {
978
+ style: { height: `${height}%` }
979
+ }, index))
980
+ })
981
+ }),
982
+ /* @__PURE__ */ jsx3(DataWidget2, {
983
+ title: /* @__PURE__ */ jsx3(Skeleton2, {
984
+ className: "altertable-data-app-skeleton-widget-title"
985
+ }),
986
+ children: /* @__PURE__ */ jsx3("div", {
987
+ className: "altertable-data-app-skeleton-rows",
988
+ children: [0, 1, 2].map((row) => /* @__PURE__ */ jsxs2("div", {
989
+ className: "altertable-data-app-skeleton-row",
990
+ children: [
991
+ /* @__PURE__ */ jsx3(Skeleton2, {}),
992
+ /* @__PURE__ */ jsx3(Skeleton2, {}),
993
+ /* @__PURE__ */ jsx3(Skeleton2, {})
994
+ ]
995
+ }, row))
996
+ })
997
+ })
998
+ ]
999
+ }),
1000
+ footer != null && footer !== false && /* @__PURE__ */ jsx3("div", {
1001
+ className: "altertable-data-app-skeleton-footer",
1002
+ children: footer
1003
+ })
1004
+ ]
1005
+ })
1006
+ });
1007
+ }
1008
+ // src/react/ui/GlossaryExplanation.tsx
1009
+ import { jsx as jsx4 } from "react/jsx-runtime";
1010
+ function GlossaryExplanation({
1011
+ entry,
1012
+ empty,
1013
+ title,
1014
+ description,
1015
+ visual,
1016
+ queries,
1017
+ dataContext,
1018
+ className,
1019
+ ...props
1020
+ }) {
1021
+ return /* @__PURE__ */ jsx4(AboutData2, {
1022
+ ...props,
1023
+ shortcut: false,
1024
+ iconOnly: true,
1025
+ variant: "ghost",
1026
+ title: title ?? entry.term,
1027
+ description,
1028
+ visual,
1029
+ references: { kind: "entries", entries: [entry] },
1030
+ empty,
1031
+ dataContext,
1032
+ queries,
1033
+ className: className ?? "altertable-inspect-trigger",
1034
+ tooltip: "Explore this term",
1035
+ "aria-label": props["aria-label"] ?? `Explore ${entry.term}`,
1036
+ children: /* @__PURE__ */ jsx4(AppIcon2, {
1037
+ name: "openDetails"
1038
+ })
1039
+ });
1040
+ }
1041
+ // src/react/ui/GlossaryDefinition.tsx
1042
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1043
+ function GlossaryDefinition({
1044
+ entry,
1045
+ children
1046
+ }) {
1047
+ return /* @__PURE__ */ jsxs3(HelpPopover2, {
1048
+ trigger: children ?? entry.term,
1049
+ triggerLabel: `Explain ${entry.term}`,
1050
+ label: entry.term,
1051
+ triggerProps: {
1052
+ className: "altertable-glossary-definition-trigger",
1053
+ "data-atbl-control": "help"
1054
+ },
1055
+ panelProps: { className: "altertable-glossary-definition-popover" },
1056
+ children: [
1057
+ /* @__PURE__ */ jsx5("strong", {
1058
+ children: entry.term
1059
+ }),
1060
+ /* @__PURE__ */ jsx5("div", {
1061
+ children: entry.definition
1062
+ })
1063
+ ]
1064
+ });
1065
+ }
1066
+ // src/react/ui/TrendChart.tsx
1067
+ import { useLayoutEffect, useRef } from "react";
1068
+
1069
+ // src/react/ui/chart-data.ts
1070
+ function validateChartItems(kind, items) {
1071
+ const ids = new Set;
1072
+ for (const item of items) {
1073
+ invariant(item.id.trim().length > 0, `${kind} chart IDs must be nonempty and unique: blank ID.`);
1074
+ invariant(!ids.has(item.id), `${kind} chart IDs must be nonempty and unique: duplicate "${item.id}".`);
1075
+ ids.add(item.id);
1076
+ if (kind === "scatter") {
1077
+ const point = item;
1078
+ invariant(Number.isFinite(point.x) && Number.isFinite(point.y), `scatter chart "${item.id}" requires finite values for x and y.`);
1079
+ } else {
1080
+ const point = item;
1081
+ invariant(Number.isFinite(point.value), `${kind} chart "${item.id}" requires finite values.`);
1082
+ invariant(kind !== "bar" && kind !== "pie" || point.value >= 0, `${kind} chart "${item.id}" requires nonnegative values.`);
1083
+ }
1084
+ }
1085
+ }
1086
+
1087
+ // src/react/ui/TrendChart.tsx
1088
+ import { jsx as jsx6, jsxs as jsxs4, Fragment } from "react/jsx-runtime";
1089
+ function TrendChart({
1090
+ items,
1091
+ unit,
1092
+ ariaLabel,
1093
+ formatValue = (value) => new Intl.NumberFormat().format(value),
1094
+ area = false
1095
+ }) {
1096
+ validateChartItems(area ? "area" : "line", items);
1097
+ const scrollport = useRef(null);
1098
+ useLayoutEffect(() => {
1099
+ const element = scrollport.current;
1100
+ if (element)
1101
+ element.scrollLeft = element.scrollWidth - element.clientWidth;
1102
+ }, [items]);
1103
+ const magnitude = items.reduce((max, item) => Math.max(max, Math.abs(item.value)), 1);
1104
+ const low = items.reduce((min, item) => Math.min(min, item.value / magnitude), 0);
1105
+ const high = items.reduce((max, item) => Math.max(max, item.value / magnitude), 0);
1106
+ const span = high - low || 1;
1107
+ function y(value) {
1108
+ return 208 - (value / magnitude - low) / span * 196;
1109
+ }
1110
+ const points = items.map((item, index) => ({
1111
+ x: (index + 0.5) / items.length * 1000,
1112
+ y: y(item.value)
1113
+ }));
1114
+ const path = points.map((point, index) => `${index ? "L" : "M"}${point.x},${point.y}`).join(" ");
1115
+ const first = points[0];
1116
+ const last = points.at(-1);
1117
+ return /* @__PURE__ */ jsxs4("section", {
1118
+ className: "altertable-trend-chart",
1119
+ "aria-label": ariaLabel,
1120
+ children: [
1121
+ items.length === 0 && /* @__PURE__ */ jsx6("span", {
1122
+ children: "No data"
1123
+ }),
1124
+ items.length > 0 && /* @__PURE__ */ jsx6(Fragment, {
1125
+ children: /* @__PURE__ */ jsx6("div", {
1126
+ className: "altertable-trend-scroll",
1127
+ ref: scrollport,
1128
+ children: /* @__PURE__ */ jsxs4("div", {
1129
+ className: "altertable-trend-plot",
1130
+ style: { minWidth: items.length * 40 },
1131
+ children: [
1132
+ /* @__PURE__ */ jsxs4("svg", {
1133
+ viewBox: "0 0 1000 220",
1134
+ preserveAspectRatio: "none",
1135
+ "aria-hidden": "true",
1136
+ focusable: "false",
1137
+ children: [
1138
+ /* @__PURE__ */ jsx6("line", {
1139
+ className: "altertable-trend-baseline",
1140
+ x1: "0",
1141
+ x2: "1000",
1142
+ y1: y(0),
1143
+ y2: y(0),
1144
+ vectorEffect: "non-scaling-stroke"
1145
+ }),
1146
+ area && first && last && /* @__PURE__ */ jsx6("path", {
1147
+ className: "altertable-trend-fill",
1148
+ d: `${path} L${last.x},${y(0)} L${first.x},${y(0)} Z`
1149
+ }),
1150
+ /* @__PURE__ */ jsx6("path", {
1151
+ className: "altertable-trend-line",
1152
+ d: path,
1153
+ vectorEffect: "non-scaling-stroke"
1154
+ })
1155
+ ]
1156
+ }),
1157
+ /* @__PURE__ */ jsx6("div", {
1158
+ className: "altertable-trend-points",
1159
+ children: items.map((item, index) => /* @__PURE__ */ jsx6(Tooltip2, {
1160
+ variant: "chart",
1161
+ content: /* @__PURE__ */ jsxs4(Fragment, {
1162
+ children: [
1163
+ /* @__PURE__ */ jsx6("strong", {
1164
+ children: item.label
1165
+ }),
1166
+ /* @__PURE__ */ jsxs4("span", {
1167
+ children: [
1168
+ formatValue(item.value),
1169
+ " ",
1170
+ unit
1171
+ ]
1172
+ })
1173
+ ]
1174
+ }),
1175
+ className: "altertable-chart-column",
1176
+ children: /* @__PURE__ */ jsxs4("button", {
1177
+ "data-atbl-focus": "ring",
1178
+ "data-atbl-control": "action",
1179
+ type: "button",
1180
+ tabIndex: -1,
1181
+ className: "altertable-trend-point",
1182
+ "aria-label": `${item.label}: ${formatValue(item.value)} ${unit}`,
1183
+ children: [
1184
+ /* @__PURE__ */ jsx6("span", {
1185
+ className: "altertable-trend-hit",
1186
+ children: /* @__PURE__ */ jsx6("span", {
1187
+ className: "altertable-trend-dot",
1188
+ style: { top: `${points[index].y / 220 * 100}%` }
1189
+ })
1190
+ }),
1191
+ /* @__PURE__ */ jsx6("span", {
1192
+ className: "altertable-trend-label",
1193
+ children: item.label
1194
+ })
1195
+ ]
1196
+ })
1197
+ }, item.id))
1198
+ })
1199
+ ]
1200
+ })
1201
+ })
1202
+ })
1203
+ ]
1204
+ });
1205
+ }
1206
+
1207
+ // src/react/ui/LineChart.tsx
1208
+ import { jsx as jsx7 } from "react/jsx-runtime";
1209
+ function LineChart(props) {
1210
+ return /* @__PURE__ */ jsx7(TrendChart, {
1211
+ ...props
1212
+ });
1213
+ }
1214
+ // src/react/ui/AreaChart.tsx
1215
+ import { jsx as jsx8 } from "react/jsx-runtime";
1216
+ function AreaChart(props) {
1217
+ return /* @__PURE__ */ jsx8(TrendChart, {
1218
+ ...props,
1219
+ area: true
1220
+ });
1221
+ }
1222
+ // src/react/ui/PieChart.tsx
1223
+ import { useState } from "react";
1224
+ import { jsx as jsx9, jsxs as jsxs5, Fragment as Fragment2 } from "react/jsx-runtime";
1225
+ function PieChart({
1226
+ items,
1227
+ unit,
1228
+ ariaLabel,
1229
+ formatValue = (value) => new Intl.NumberFormat().format(value)
1230
+ }) {
1231
+ validateChartItems("pie", items);
1232
+ const [previewId, setPreviewId] = useState(null);
1233
+ const [plotOpen, setPlotOpen] = useState(false);
1234
+ const [legendId, setLegendId] = useState(null);
1235
+ const maximum = items.reduce((max, item) => Math.max(max, item.value), 0);
1236
+ const total = maximum ? items.reduce((sum, item) => sum + item.value / maximum, 0) : 0;
1237
+ let cursor = -Math.PI / 2;
1238
+ const slices = [];
1239
+ for (const [index, item] of items.entries()) {
1240
+ let point = function(angle) {
1241
+ return `${110 + Math.cos(angle) * 100},${110 + Math.sin(angle) * 100}`;
1242
+ };
1243
+ const share = total ? item.value / maximum / total : 0;
1244
+ const start = cursor;
1245
+ cursor += share * Math.PI * 2;
1246
+ const middle = (start + cursor) / 2;
1247
+ slices.push({
1248
+ ...item,
1249
+ share,
1250
+ color: `var(--atbl-chart-${index % 8 + 1})`,
1251
+ path: `${share === 1 ? "M" : "M110,110 L"}${point(start)} A100,100 0 0 1 ${point(middle)} A100,100 0 0 1 ${point(cursor)} Z`
1252
+ });
1253
+ }
1254
+ function percent(share) {
1255
+ return new Intl.NumberFormat("en-US", {
1256
+ style: "percent",
1257
+ maximumFractionDigits: 1
1258
+ }).format(share);
1259
+ }
1260
+ function detail(item) {
1261
+ return /* @__PURE__ */ jsxs5(Fragment2, {
1262
+ children: [
1263
+ /* @__PURE__ */ jsx9("strong", {
1264
+ children: item.label
1265
+ }),
1266
+ /* @__PURE__ */ jsxs5("span", {
1267
+ children: [
1268
+ formatValue(item.value),
1269
+ " ",
1270
+ unit,
1271
+ " · ",
1272
+ percent(item.share)
1273
+ ]
1274
+ })
1275
+ ]
1276
+ });
1277
+ }
1278
+ const preview = slices.find((item) => item.id === previewId);
1279
+ return /* @__PURE__ */ jsxs5("section", {
1280
+ className: "altertable-pie-chart",
1281
+ "aria-label": ariaLabel,
1282
+ children: [
1283
+ items.length === 0 && /* @__PURE__ */ jsx9("span", {
1284
+ children: "No data"
1285
+ }),
1286
+ items.length > 0 && /* @__PURE__ */ jsxs5(Fragment2, {
1287
+ children: [
1288
+ /* @__PURE__ */ jsxs5("div", {
1289
+ className: "altertable-pie-plot",
1290
+ children: [
1291
+ /* @__PURE__ */ jsx9(Tooltip2, {
1292
+ variant: "chart",
1293
+ className: "altertable-pie-tooltip",
1294
+ onOpenChange: setPlotOpen,
1295
+ content: preview ? detail(preview) : null,
1296
+ children: /* @__PURE__ */ jsx9("svg", {
1297
+ viewBox: "0 0 220 220",
1298
+ "aria-hidden": "true",
1299
+ focusable: "false",
1300
+ children: total === 0 ? /* @__PURE__ */ jsx9("circle", {
1301
+ cx: "110",
1302
+ cy: "110",
1303
+ r: "100",
1304
+ className: "altertable-pie-empty"
1305
+ }) : slices.filter((item) => item.share > 0).map((item) => /* @__PURE__ */ jsx9("path", {
1306
+ d: item.path,
1307
+ fill: item.color,
1308
+ className: "altertable-pie-slice",
1309
+ "data-active": item.id === (plotOpen && previewId ? previewId : legendId) || undefined,
1310
+ onPointerDown: (event) => {
1311
+ if (plotOpen && previewId !== item.id)
1312
+ event.preventDefault();
1313
+ setPreviewId(item.id);
1314
+ },
1315
+ onPointerEnter: (event) => {
1316
+ if (event.pointerType === "mouse")
1317
+ setPreviewId(item.id);
1318
+ },
1319
+ onPointerLeave: (event) => {
1320
+ if (event.pointerType === "mouse")
1321
+ setPreviewId(null);
1322
+ }
1323
+ }, item.id))
1324
+ })
1325
+ }),
1326
+ total === 0 && /* @__PURE__ */ jsx9("span", {
1327
+ className: "altertable-pie-empty-label",
1328
+ children: "No nonzero values"
1329
+ })
1330
+ ]
1331
+ }),
1332
+ /* @__PURE__ */ jsx9("div", {
1333
+ className: "altertable-pie-legend",
1334
+ children: slices.map((item) => /* @__PURE__ */ jsx9(Tooltip2, {
1335
+ variant: "chart",
1336
+ content: detail(item),
1337
+ onOpenChange: (open) => setLegendId((current) => open ? item.id : current === item.id ? null : current),
1338
+ children: /* @__PURE__ */ jsxs5("button", {
1339
+ "data-atbl-focus": "ring",
1340
+ "data-atbl-control": "action",
1341
+ type: "button",
1342
+ tabIndex: -1,
1343
+ "aria-label": `${item.label}: ${formatValue(item.value)} ${unit}, ${percent(item.share)}`,
1344
+ children: [
1345
+ /* @__PURE__ */ jsx9("span", {
1346
+ className: "altertable-pie-key",
1347
+ style: { background: item.color }
1348
+ }),
1349
+ /* @__PURE__ */ jsx9("span", {
1350
+ className: "altertable-pie-label",
1351
+ children: item.label
1352
+ }),
1353
+ /* @__PURE__ */ jsx9("strong", {
1354
+ children: formatValue(item.value)
1355
+ }),
1356
+ /* @__PURE__ */ jsx9("span", {
1357
+ children: percent(item.share)
1358
+ })
1359
+ ]
1360
+ })
1361
+ }, item.id))
1362
+ })
1363
+ ]
1364
+ })
1365
+ ]
1366
+ });
1367
+ }
1368
+ // src/react/ui/ScatterChart.tsx
1369
+ import { jsx as jsx10, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
1370
+ function formatNumber(value) {
1371
+ return new Intl.NumberFormat(undefined, { maximumFractionDigits: 1 }).format(value);
1372
+ }
1373
+ function scale(values) {
1374
+ const magnitude = values.reduce((max, value) => Math.max(max, Math.abs(value)), 1);
1375
+ const low = values.reduce((min, value) => Math.min(min, value / magnitude), 0);
1376
+ const high = values.reduce((max, value) => Math.max(max, value / magnitude), 0) || (low === 0 ? 1 : 0);
1377
+ const span = high - low;
1378
+ return {
1379
+ position(value) {
1380
+ return (value / magnitude - low) / span * 100;
1381
+ },
1382
+ ticks: [low, low + span / 2, high].map((value) => value * magnitude)
1383
+ };
1384
+ }
1385
+ function ScatterChart({
1386
+ items,
1387
+ xLabel,
1388
+ yLabel,
1389
+ xUnit,
1390
+ yUnit,
1391
+ ariaLabel,
1392
+ formatX = formatNumber,
1393
+ formatY = formatNumber
1394
+ }) {
1395
+ validateChartItems("scatter", items);
1396
+ const xScale = scale(items.map((item) => item.x));
1397
+ const yScale = scale(items.map((item) => item.y));
1398
+ return /* @__PURE__ */ jsxs6("section", {
1399
+ className: "altertable-scatter-chart",
1400
+ "aria-label": ariaLabel,
1401
+ children: [
1402
+ items.length === 0 && /* @__PURE__ */ jsx10("span", {
1403
+ children: "No data"
1404
+ }),
1405
+ items.length > 0 && /* @__PURE__ */ jsxs6(Fragment3, {
1406
+ children: [
1407
+ /* @__PURE__ */ jsxs6("p", {
1408
+ className: "altertable-scatter-axis-title",
1409
+ children: [
1410
+ yLabel,
1411
+ yUnit && ` (${yUnit})`
1412
+ ]
1413
+ }),
1414
+ /* @__PURE__ */ jsx10("div", {
1415
+ className: "altertable-scatter-axes",
1416
+ children: /* @__PURE__ */ jsxs6("div", {
1417
+ className: "altertable-scatter-plot",
1418
+ children: [
1419
+ yScale.ticks.map((value, index) => /* @__PURE__ */ jsx10("div", {
1420
+ className: "altertable-scatter-gridline",
1421
+ style: { bottom: `${index * 50}%` },
1422
+ "aria-hidden": "true",
1423
+ children: /* @__PURE__ */ jsx10("span", {
1424
+ title: formatY(value),
1425
+ children: formatY(value)
1426
+ })
1427
+ }, index)),
1428
+ xScale.ticks.map((value, index) => /* @__PURE__ */ jsx10("span", {
1429
+ className: "altertable-scatter-x-tick",
1430
+ "data-edge": index,
1431
+ style: { left: `${index * 50}%` },
1432
+ "aria-hidden": "true",
1433
+ title: formatX(value),
1434
+ children: formatX(value)
1435
+ }, index)),
1436
+ items.map((item) => /* @__PURE__ */ jsx10(Tooltip2, {
1437
+ variant: "chart",
1438
+ content: /* @__PURE__ */ jsxs6(Fragment3, {
1439
+ children: [
1440
+ /* @__PURE__ */ jsx10("strong", {
1441
+ children: item.label
1442
+ }),
1443
+ /* @__PURE__ */ jsxs6("span", {
1444
+ children: [
1445
+ xLabel,
1446
+ ": ",
1447
+ formatX(item.x),
1448
+ " ",
1449
+ xUnit
1450
+ ]
1451
+ }),
1452
+ /* @__PURE__ */ jsxs6("span", {
1453
+ children: [
1454
+ yLabel,
1455
+ ": ",
1456
+ formatY(item.y),
1457
+ " ",
1458
+ yUnit
1459
+ ]
1460
+ })
1461
+ ]
1462
+ }),
1463
+ className: "altertable-scatter-tooltip",
1464
+ style: {
1465
+ left: `${xScale.position(item.x)}%`,
1466
+ bottom: `${yScale.position(item.y)}%`
1467
+ },
1468
+ children: /* @__PURE__ */ jsx10("button", {
1469
+ "data-atbl-focus": "ring",
1470
+ "data-atbl-control": "action",
1471
+ type: "button",
1472
+ tabIndex: -1,
1473
+ className: "altertable-scatter-point",
1474
+ "aria-label": `${item.label}: ${xLabel} ${formatX(item.x)} ${xUnit}, ${yLabel} ${formatY(item.y)} ${yUnit}`,
1475
+ children: /* @__PURE__ */ jsx10("span", {})
1476
+ })
1477
+ }, item.id))
1478
+ ]
1479
+ })
1480
+ }),
1481
+ /* @__PURE__ */ jsxs6("p", {
1482
+ className: "altertable-scatter-axis-title altertable-scatter-x-title",
1483
+ children: [
1484
+ xLabel,
1485
+ xUnit && ` (${xUnit})`
1486
+ ]
1487
+ })
1488
+ ]
1489
+ })
1490
+ ]
1491
+ });
1492
+ }
1493
+ // src/react/ui/BarChart.tsx
1494
+ import { useLayoutEffect as useLayoutEffect2, useRef as useRef2 } from "react";
1495
+ import { jsx as jsx11, jsxs as jsxs7, Fragment as Fragment4 } from "react/jsx-runtime";
1496
+ function BarChart({
1497
+ items,
1498
+ unit,
1499
+ ariaLabel,
1500
+ formatValue = (value) => new Intl.NumberFormat().format(value)
1501
+ }) {
1502
+ validateChartItems("bar", items);
1503
+ const scrollport = useRef2(null);
1504
+ useLayoutEffect2(() => {
1505
+ const element = scrollport.current;
1506
+ if (element)
1507
+ element.scrollLeft = element.scrollWidth - element.clientWidth;
1508
+ }, [items]);
1509
+ const maximum = items.reduce((max, item) => Math.max(max, item.value), 1);
1510
+ return /* @__PURE__ */ jsxs7("section", {
1511
+ className: "altertable-selectable-bars",
1512
+ "aria-label": ariaLabel,
1513
+ children: [
1514
+ items.length === 0 && /* @__PURE__ */ jsx11("span", {
1515
+ children: "No data"
1516
+ }),
1517
+ /* @__PURE__ */ jsx11("div", {
1518
+ className: "altertable-selectable-bars-scroll",
1519
+ ref: scrollport,
1520
+ children: items.map((item) => /* @__PURE__ */ jsx11(Tooltip2, {
1521
+ variant: "chart",
1522
+ content: /* @__PURE__ */ jsxs7(Fragment4, {
1523
+ children: [
1524
+ /* @__PURE__ */ jsx11("strong", {
1525
+ children: item.label
1526
+ }),
1527
+ /* @__PURE__ */ jsxs7("span", {
1528
+ children: [
1529
+ formatValue(item.value),
1530
+ " ",
1531
+ unit
1532
+ ]
1533
+ })
1534
+ ]
1535
+ }),
1536
+ className: "altertable-chart-column",
1537
+ children: /* @__PURE__ */ jsxs7("button", {
1538
+ "data-atbl-focus": "ring",
1539
+ "data-atbl-control": "action",
1540
+ type: "button",
1541
+ tabIndex: -1,
1542
+ className: "altertable-selectable-bars-item",
1543
+ "aria-label": `${item.label}: ${formatValue(item.value)} ${unit}`,
1544
+ children: [
1545
+ /* @__PURE__ */ jsx11("span", {
1546
+ className: "altertable-selectable-bars-area",
1547
+ children: /* @__PURE__ */ jsx11("span", {
1548
+ className: "altertable-selectable-bars-bar",
1549
+ style: {
1550
+ height: `${Math.max(item.value > 0 ? 3 : 0, item.value / maximum * 100)}%`
1551
+ }
1552
+ })
1553
+ }),
1554
+ /* @__PURE__ */ jsx11("span", {
1555
+ className: "altertable-selectable-bars-label",
1556
+ children: item.label
1557
+ })
1558
+ ]
1559
+ })
1560
+ }, item.id))
1561
+ })
1562
+ ]
1563
+ });
1564
+ }
1565
+ export {
1566
+ AboutData2 as AboutData,
1567
+ AppIcon2 as AppIcon,
1568
+ AreaChart,
1569
+ BarChart,
1570
+ Checkbox2 as Checkbox,
1571
+ Combobox2 as Combobox,
1572
+ DataApp,
1573
+ DataAppProvider2 as DataAppProvider,
1574
+ DataAppSkeleton,
1575
+ DataTable2 as DataTable,
1576
+ DataTableEmptyRow2 as DataTableEmptyRow,
1577
+ DataTableShare2 as DataTableShare,
1578
+ DataTableTimestamp2 as DataTableTimestamp,
1579
+ DataValue2 as DataValue,
1580
+ DataWidget2 as DataWidget,
1581
+ DateRangePicker2 as DateRangePicker,
1582
+ DimensionPicker2 as DimensionPicker,
1583
+ GettingStarted,
1584
+ GlossaryDefinition,
1585
+ GlossaryExplanation,
1586
+ GradientScroll2 as GradientScroll,
1587
+ HelpPopover2 as HelpPopover,
1588
+ LineChart,
1589
+ LiveControl2 as LiveControl,
1590
+ MetricWidget2 as MetricWidget,
1591
+ PieChart,
1592
+ PresentStory2 as PresentStory,
1593
+ ScatterChart,
1594
+ SearchField2 as SearchField,
1595
+ SearchMatch2 as SearchMatch,
1596
+ Sheet2 as Sheet,
1597
+ Tab2 as Tab,
1598
+ TabList2 as TabList,
1599
+ TabPanel2 as TabPanel,
1600
+ TabPanels2 as TabPanels,
1601
+ TableWidget2 as TableWidget,
1602
+ Tabs2 as Tabs,
1603
+ TextWidget2 as TextWidget,
1604
+ Tooltip2 as Tooltip,
1605
+ TooltipProvider2 as TooltipProvider,
1606
+ VisualizationWidget2 as VisualizationWidget,
1607
+ injectDataAppShellStyles,
1608
+ injectDataAppStyles2 as injectDataAppStyles,
1609
+ searchItems2 as searchItems,
1610
+ useAppVariables2 as useAppVariables,
1611
+ useViewTab2 as useViewTab
1612
+ };
1613
+
1614
+ //# debugId=44AF1347DDC5E0E164756E2164756E21