@altertable/data-app-react 0.72.0 → 0.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +3 -7
  2. package/dist/chunks/SectionHeading-CVenpddF.js +7813 -0
  3. package/dist/chunks/SectionHeading-CVenpddF.js.map +1 -0
  4. package/dist/index.js +1004 -2847
  5. package/dist/index.js.map +1 -23
  6. package/dist/types/chunks/date-formatting.d.ts +863 -0
  7. package/dist/types/index.d.ts +745 -78
  8. package/dist/types/ui/index.d.ts +572 -111
  9. package/dist/ui/index.js +2779 -3403
  10. package/dist/ui/index.js.map +1 -36
  11. package/package.json +7 -6
  12. package/dist/chunks/index-xwy62xrb.js +0 -16996
  13. package/dist/chunks/index-xwy62xrb.js.map +0 -120
  14. package/dist/types/actions.d.ts +0 -53
  15. package/dist/types/annotations/AnnotationBar.d.ts +0 -30
  16. package/dist/types/annotations/AnnotationControls.d.ts +0 -10
  17. package/dist/types/annotations/AnnotationEditor.d.ts +0 -16
  18. package/dist/types/annotations/AnnotationMarkers.d.ts +0 -19
  19. package/dist/types/annotations/AnnotationSelectionLayer.d.ts +0 -12
  20. package/dist/types/annotations/AnnotationTarget.d.ts +0 -9
  21. package/dist/types/annotations/AnnotationTooltip.d.ts +0 -9
  22. package/dist/types/annotations/AnnotationTrigger.d.ts +0 -10
  23. package/dist/types/annotations/annotation-editor-state.d.ts +0 -58
  24. package/dist/types/annotations/annotation-screenshot.d.ts +0 -4
  25. package/dist/types/annotations/annotation-targets.d.ts +0 -34
  26. package/dist/types/annotations/getAnnotationProps.d.ts +0 -17
  27. package/dist/types/annotations/styles.d.ts +0 -3
  28. package/dist/types/annotations/useAnnotationGeometry.d.ts +0 -22
  29. package/dist/types/annotations/useDataAppAnnotations.d.ts +0 -22
  30. package/dist/types/app-context.d.ts +0 -3
  31. package/dist/types/bindings.d.ts +0 -169
  32. package/dist/types/content.d.ts +0 -36
  33. package/dist/types/date-formatting.d.ts +0 -12
  34. package/dist/types/details.d.ts +0 -46
  35. package/dist/types/exploration.d.ts +0 -44
  36. package/dist/types/hooks.d.ts +0 -114
  37. package/dist/types/injectStyles.d.ts +0 -7
  38. package/dist/types/mount.d.ts +0 -13
  39. package/dist/types/search-suggestions.d.ts +0 -8
  40. package/dist/types/source-owner.d.ts +0 -2
  41. package/dist/types/style-contract.d.ts +0 -88
  42. package/dist/types/style-validation.d.ts +0 -2
  43. package/dist/types/styles.d.ts +0 -8
  44. package/dist/types/ui/AboutData.d.ts +0 -73
  45. package/dist/types/ui/AltertableLogo.d.ts +0 -3
  46. package/dist/types/ui/AppFooter.d.ts +0 -6
  47. package/dist/types/ui/AppHeader.d.ts +0 -10
  48. package/dist/types/ui/AppLayout.d.ts +0 -10
  49. package/dist/types/ui/AppScope.d.ts +0 -7
  50. package/dist/types/ui/AppToolbar.d.ts +0 -30
  51. package/dist/types/ui/AreaChart.d.ts +0 -7
  52. package/dist/types/ui/BarChart.d.ts +0 -6
  53. package/dist/types/ui/Breakdown.d.ts +0 -13
  54. package/dist/types/ui/Button.d.ts +0 -12
  55. package/dist/types/ui/ChartLegend.d.ts +0 -32
  56. package/dist/types/ui/Checkbox.d.ts +0 -21
  57. package/dist/types/ui/CheckboxGroup.d.ts +0 -7
  58. package/dist/types/ui/ChoicePicker.d.ts +0 -39
  59. package/dist/types/ui/Comparison.d.ts +0 -14
  60. package/dist/types/ui/ComposedChart.d.ts +0 -41
  61. package/dist/types/ui/ComposedChartLegend.d.ts +0 -9
  62. package/dist/types/ui/ContentSkeleton.d.ts +0 -7
  63. package/dist/types/ui/DataApp.d.ts +0 -24
  64. package/dist/types/ui/DataAppFrame.d.ts +0 -52
  65. package/dist/types/ui/DataBoundary.d.ts +0 -14
  66. package/dist/types/ui/DataSection.d.ts +0 -14
  67. package/dist/types/ui/DataSectionBoundary.d.ts +0 -30
  68. package/dist/types/ui/DataTable.d.ts +0 -29
  69. package/dist/types/ui/DataValue.d.ts +0 -9
  70. package/dist/types/ui/DataViewToast.d.ts +0 -11
  71. package/dist/types/ui/DataWidget.d.ts +0 -37
  72. package/dist/types/ui/DateDisplay.d.ts +0 -9
  73. package/dist/types/ui/DateRangePicker.d.ts +0 -30
  74. package/dist/types/ui/DateTimeTooltip.d.ts +0 -10
  75. package/dist/types/ui/DimensionPicker.d.ts +0 -14
  76. package/dist/types/ui/EmptyState.d.ts +0 -6
  77. package/dist/types/ui/ExplorationActionControl.d.ts +0 -60
  78. package/dist/types/ui/ExportControl.d.ts +0 -4
  79. package/dist/types/ui/FilterActions.d.ts +0 -10
  80. package/dist/types/ui/FilterBar.d.ts +0 -3
  81. package/dist/types/ui/FunnelChart.d.ts +0 -20
  82. package/dist/types/ui/GettingStarted.d.ts +0 -6
  83. package/dist/types/ui/GlossaryDefinition.d.ts +0 -7
  84. package/dist/types/ui/GlossaryExplanation.d.ts +0 -16
  85. package/dist/types/ui/GradientScroll.d.ts +0 -23
  86. package/dist/types/ui/Grid.d.ts +0 -12
  87. package/dist/types/ui/GridItem.d.ts +0 -7
  88. package/dist/types/ui/HelpPopover.d.ts +0 -21
  89. package/dist/types/ui/IconButton.d.ts +0 -19
  90. package/dist/types/ui/InspectionContext.d.ts +0 -12
  91. package/dist/types/ui/InspectionProvider.d.ts +0 -29
  92. package/dist/types/ui/JourneyChart.d.ts +0 -10
  93. package/dist/types/ui/Kbd.d.ts +0 -7
  94. package/dist/types/ui/LineChart.d.ts +0 -7
  95. package/dist/types/ui/LiveControl.d.ts +0 -10
  96. package/dist/types/ui/Menu.d.ts +0 -13
  97. package/dist/types/ui/MetricWidget.d.ts +0 -51
  98. package/dist/types/ui/NumberField.d.ts +0 -27
  99. package/dist/types/ui/NumberFilterPicker.d.ts +0 -11
  100. package/dist/types/ui/PeriodSummary.d.ts +0 -17
  101. package/dist/types/ui/PickerField.d.ts +0 -23
  102. package/dist/types/ui/PieChart.d.ts +0 -11
  103. package/dist/types/ui/PopoverSurface.d.ts +0 -5
  104. package/dist/types/ui/PresentStory.d.ts +0 -30
  105. package/dist/types/ui/QueryList.d.ts +0 -14
  106. package/dist/types/ui/RadioGroup.d.ts +0 -18
  107. package/dist/types/ui/Ranking.d.ts +0 -13
  108. package/dist/types/ui/RefreshControl.d.ts +0 -9
  109. package/dist/types/ui/RequestHint.d.ts +0 -20
  110. package/dist/types/ui/RetentionChart.d.ts +0 -27
  111. package/dist/types/ui/ScatterChart.d.ts +0 -17
  112. package/dist/types/ui/SearchField.d.ts +0 -23
  113. package/dist/types/ui/SearchInput.d.ts +0 -10
  114. package/dist/types/ui/SearchMatch.d.ts +0 -6
  115. package/dist/types/ui/SearchTypeahead.d.ts +0 -15
  116. package/dist/types/ui/SectionHeading.d.ts +0 -8
  117. package/dist/types/ui/Select.d.ts +0 -22
  118. package/dist/types/ui/SelectionMark.d.ts +0 -5
  119. package/dist/types/ui/Sheet.d.ts +0 -21
  120. package/dist/types/ui/Skeleton.d.ts +0 -8
  121. package/dist/types/ui/Stack.d.ts +0 -7
  122. package/dist/types/ui/StaticDataApp.d.ts +0 -4
  123. package/dist/types/ui/StatusPanel.d.ts +0 -10
  124. package/dist/types/ui/TableWidget.d.ts +0 -67
  125. package/dist/types/ui/Tabs.d.ts +0 -10
  126. package/dist/types/ui/TextContent.d.ts +0 -4
  127. package/dist/types/ui/TextWidget.d.ts +0 -20
  128. package/dist/types/ui/ThemeSelector.d.ts +0 -12
  129. package/dist/types/ui/Toast.d.ts +0 -8
  130. package/dist/types/ui/Tooltip.d.ts +0 -23
  131. package/dist/types/ui/TooltipSurface.d.ts +0 -3
  132. package/dist/types/ui/TrendChart.d.ts +0 -5
  133. package/dist/types/ui/UpdatedAt.d.ts +0 -9
  134. package/dist/types/ui/VariableBar.d.ts +0 -6
  135. package/dist/types/ui/VisualizationWidget.d.ts +0 -43
  136. package/dist/types/ui/WidgetDisclosure.d.ts +0 -6
  137. package/dist/types/ui/WidgetEvidence.d.ts +0 -12
  138. package/dist/types/ui/WidgetViewTabs.d.ts +0 -16
  139. package/dist/types/ui/chart-data.d.ts +0 -36
  140. package/dist/types/ui/chart-date-axis.d.ts +0 -15
  141. package/dist/types/ui/chart-interaction.d.ts +0 -27
  142. package/dist/types/ui/chart-primitives.d.ts +0 -22
  143. package/dist/types/ui/chart-time.d.ts +0 -19
  144. package/dist/types/ui/chartColor.d.ts +0 -2
  145. package/dist/types/ui/classNames.d.ts +0 -1
  146. package/dist/types/ui/csv-export.d.ts +0 -19
  147. package/dist/types/ui/data-context.d.ts +0 -76
  148. package/dist/types/ui/data-identifiers.d.ts +0 -32
  149. package/dist/types/ui/icons.d.ts +0 -49
  150. package/dist/types/ui/journey-flow.d.ts +0 -49
  151. package/dist/types/ui/keyboard.d.ts +0 -6
  152. package/dist/types/ui/metric-comparison.d.ts +0 -30
  153. package/dist/types/ui/metric.d.ts +0 -11
  154. package/dist/types/ui/presentation.d.ts +0 -25
  155. package/dist/types/ui/search.d.ts +0 -6
  156. package/dist/types/ui/searchItems.d.ts +0 -36
  157. package/dist/types/ui/shortcuts.d.ts +0 -45
  158. package/dist/types/ui/story.d.ts +0 -20
  159. package/dist/types/ui/time-interval.d.ts +0 -96
  160. package/dist/types/ui/use-chart-scroll-to-end.d.ts +0 -2
  161. package/dist/types/ui/useAppAppearance.d.ts +0 -3
  162. package/dist/types/ui/useDataAppPresentation.d.ts +0 -3
  163. package/dist/types/ui/useSvgId.d.ts +0 -2
  164. package/dist/types/ui/variables.d.ts +0 -36
  165. package/dist/types/ui/widget-views.d.ts +0 -3
  166. package/dist/types/view-control-bar.d.ts +0 -18
  167. package/dist/types/view-controls.d.ts +0 -20
  168. package/dist/types/view-runtime.d.ts +0 -34
  169. package/dist/types/view.d.ts +0 -87
  170. package/dist/types/widgets.d.ts +0 -90
package/dist/index.js CHANGED
@@ -1,2888 +1,1045 @@
1
- import {
2
- injectStyles,
3
- injectDataAppStyles2,
4
- useDataApp,
5
- DateFormattingContext,
6
- useDateFormatting2,
7
- AppIcon2,
8
- classNames,
9
- Button2,
10
- EmptyState2,
11
- shortcuts,
12
- Kbd,
13
- TooltipProvider2,
14
- Tooltip2,
15
- Sheet2,
16
- InspectionContext,
17
- useInspectionDefaults,
18
- mountDataApp2,
19
- breakdownState,
20
- useDeclaredResult,
21
- PrimaryViewContext,
22
- ownedSource,
23
- DataSectionBoundary,
24
- DetailView2,
25
- DetailContent2,
26
- useDetailNavigation2,
27
- DetailRoutes,
28
- resolveActions,
29
- DateTimeTooltip2,
30
- DateDisplay2,
31
- RegisteredBinding,
32
- registeredEvidence,
33
- datasetTable,
34
- MetricRecords,
35
- exportDatasets,
36
- searchVariable2,
37
- choiceVariable2,
38
- multiChoiceVariable2,
39
- dateRangeVariable2,
40
- sectionContent,
41
- SearchSuggestionsContext,
42
- Select2,
43
- Skeleton2,
44
- createDataHooks2,
45
- useDataAppAnnotations2,
46
- AnnotationTooltip,
47
- IconButton2,
48
- TextContent2,
49
- Stack2,
50
- DataAppFrame,
51
- ExplorationActionControl2,
52
- getAnnotationProps,
53
- ContentSkeleton,
54
- VisualizationWidget2,
55
- comparisonChange,
56
- metricComparison,
57
- MetricWidget2,
58
- TableWidget2,
59
- TextWidget2,
60
- DataValue2,
61
- chartColor2,
62
- createDataContext2,
63
- SectionHeading2
64
- } from "./chunks/index-xwy62xrb.js";
65
- // packages/data-app-react/src/ui/DataApp.tsx
66
- import { KEY_SEPARATOR } from "@altertable/data-app/internal";
67
- import { jsx } from "react/jsx-runtime";
1
+ import { $t as DateFormattingContext, B as createDataHooks, Ct as DetailRoutes, D as Stack, Dt as ownedSource, E as TextContent, Et as DataSectionBoundary, Gt as shortcuts, H as useDeclaredResult, Ht as TooltipProvider, I as IconButton, Jt as AppIcon, Kt as InspectionContext, L as useDataAppAnnotations, Ot as resolveActions, Qt as classNames, R as AnnotationTooltip, St as DetailContent, T as DataAppFrame, Tt as useDetailNavigation, V as PrimaryViewContext, Vt as Tooltip, Wt as Kbd, Xt as Button, Yt as EmptyState, Z as Select, _ as comparisonChange, _t as exportDatasets, a as TextWidget$1, at as SearchSuggestionsContext, bt as DateTimeTooltip, ct as choiceVariable, d as MetricWidget$1, dt as searchVariable, en as useDateFormatting, f as VisualizationWidget$1, g as metricComparison, gt as datasetTable, h as ContentSkeleton, ht as RegisteredBinding, i as chartColor, jt as mountDataApp, kt as breakdownState, lt as dateRangeVariable, m as getAnnotationProps, mt as MetricRecords, n as createDataContext, nn as injectDataAppStyles, o as TableWidget$1, pt as sectionContent, qt as useInspectionDefaults, rn as injectStyles, rt as Skeleton, t as SectionHeading, tn as useDataApp, ut as multiChoiceVariable, v as ExplorationActionControl, vt as registeredEvidence, w as DataValue$1, wt as DetailView, yt as DateDisplay, zt as Sheet } from "./chunks/SectionHeading-CVenpddF.js";
2
+ import { KEY_SEPARATOR, invariant } from "@altertable/data-app/internal";
3
+ import { useContext, useEffect, useEffectEvent, useImperativeHandle, useReducer, useRef, useState } from "react";
4
+ import { autoUpdate, flip, offset, shift, useFloating, useMergeRefs } from "@floating-ui/react";
5
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
+ import { Eye, EyeOff, GripVertical, LoaderCircle, Minus, Trash2, X } from "lucide-react";
7
+ import { formatCount, formatDateRange, formatDateTime, formatMetric, formatPercent, parseDateTime } from "@altertable/data-app/format";
8
+ import { parseDataAppAnnotationDraft } from "@altertable/data-app/contract";
9
+ import { createPortal } from "react-dom";
10
+ //#region src/ui/DataApp.tsx
11
+ /** Executes the primary view and owns its controls, inspection, exports, and stories. */
68
12
  function DataApp(props) {
69
- const {
70
- view,
71
- datasets,
72
- story,
73
- showSearchSuggestions = true,
74
- details = [],
75
- children,
76
- ...frame
77
- } = props;
78
- const app = useDataApp();
79
- const result = useDeclaredResult(view);
80
- const source = ownedSource(view, result.snapshot ?? { loading: true });
81
- const suggestionGroups = showSearchSuggestions && frame.showSearch !== false && result.searchControls ? datasets.flatMap((dataset, index) => {
82
- const reading = dataset.readSearchSuggestions(source);
83
- if (!reading)
84
- return [];
85
- return [
86
- reading.loading ? [] : reading.value.map((item) => ({
87
- ...item,
88
- id: [index, item.id].join(KEY_SEPARATOR)
89
- }))
90
- ];
91
- }) : [];
92
- return /* @__PURE__ */ jsx(DateFormattingContext, {
93
- value: { timeZone: result.timeZone },
94
- children: /* @__PURE__ */ jsx(SearchSuggestionsContext, {
95
- value: suggestionGroups.length ? {
96
- groups: suggestionGroups,
97
- busy: result.refreshing
98
- } : null,
99
- children: /* @__PURE__ */ jsx(PrimaryViewContext, {
100
- value: { declaration: view, result },
101
- children: /* @__PURE__ */ jsx(DetailRoutes, {
102
- details,
103
- children: /* @__PURE__ */ jsx(DataAppFrame, {
104
- ...frame,
105
- request: result,
106
- dataContext: result.dataContext,
107
- story: (snapshot) => story(ownedSource(view, snapshot)).map((finding) => ({
108
- ...finding,
109
- evidence: registeredEvidence(finding.evidence, view)
110
- })),
111
- csvExport: (snapshot) => exportDatasets(datasets, ownedSource(view, snapshot), view.scope(snapshot), app.title),
112
- children
113
- })
114
- })
115
- })
116
- })
117
- });
13
+ const { view, datasets, story, showSearchSuggestions = true, details = [], children, ...frame } = props;
14
+ const app = useDataApp();
15
+ const result = useDeclaredResult(view);
16
+ const source = ownedSource(view, result.snapshot ?? { loading: true });
17
+ const suggestionGroups = showSearchSuggestions && frame.showSearch !== false && result.searchControls ? datasets.flatMap((dataset, index) => {
18
+ const reading = dataset.readSearchSuggestions(source);
19
+ if (!reading) return [];
20
+ return [reading.loading ? [] : reading.value.map((item) => ({
21
+ ...item,
22
+ id: [index, item.id].join(KEY_SEPARATOR)
23
+ }))];
24
+ }) : [];
25
+ return /* @__PURE__ */ jsx(DateFormattingContext, {
26
+ value: { timeZone: result.timeZone },
27
+ children: /* @__PURE__ */ jsx(SearchSuggestionsContext, {
28
+ value: suggestionGroups.length ? {
29
+ groups: suggestionGroups,
30
+ busy: result.refreshing
31
+ } : null,
32
+ children: /* @__PURE__ */ jsx(PrimaryViewContext, {
33
+ value: {
34
+ declaration: view,
35
+ result
36
+ },
37
+ children: /* @__PURE__ */ jsx(DetailRoutes, {
38
+ details,
39
+ children: /* @__PURE__ */ jsx(DataAppFrame, {
40
+ ...frame,
41
+ request: result,
42
+ dataContext: result.dataContext,
43
+ story: (snapshot) => story(ownedSource(view, snapshot)).map((finding) => ({
44
+ ...finding,
45
+ evidence: registeredEvidence(finding.evidence, view)
46
+ })),
47
+ csvExport: (snapshot) => exportDatasets(datasets, ownedSource(view, snapshot), view.scope(snapshot), app.title),
48
+ children
49
+ })
50
+ })
51
+ })
52
+ })
53
+ });
118
54
  }
119
- // packages/data-app-react/src/ui/Grid.tsx
120
- import { jsx as jsx2 } from "react/jsx-runtime";
121
- function Grid({
122
- children,
123
- columns = 1,
124
- minItemWidth = "regular",
125
- gap = "lg",
126
- align = "start",
127
- className,
128
- ...props
129
- }) {
130
- return /* @__PURE__ */ jsx2("div", {
131
- ...props,
132
- className: classNames("altertable-grid", className),
133
- "data-columns": columns,
134
- "data-min-item-width": minItemWidth,
135
- "data-gap": gap,
136
- "data-align": align,
137
- children
138
- });
55
+ //#endregion
56
+ //#region src/ui/Grid.tsx
57
+ /** Responsive layout for peer cards and panels. Cards keep their content height by default. */
58
+ function Grid({ children, columns = 1, minItemWidth = "regular", gap = "lg", align = "start", className, ...props }) {
59
+ return /* @__PURE__ */ jsx("div", {
60
+ ...props,
61
+ className: classNames("altertable-grid", className),
62
+ "data-columns": columns,
63
+ "data-min-item-width": minItemWidth,
64
+ "data-gap": gap,
65
+ "data-align": align,
66
+ children
67
+ });
139
68
  }
140
- // packages/data-app-react/src/ui/GridItem.tsx
141
- import { jsx as jsx3 } from "react/jsx-runtime";
142
- function GridItem({
143
- children,
144
- span = 1,
145
- className,
146
- ...props
147
- }) {
148
- return /* @__PURE__ */ jsx3("div", {
149
- ...props,
150
- className: classNames("altertable-grid-item", className),
151
- "data-span": span,
152
- children
153
- });
69
+ //#endregion
70
+ //#region src/ui/GridItem.tsx
71
+ function GridItem({ children, span = 1, className, ...props }) {
72
+ return /* @__PURE__ */ jsx("div", {
73
+ ...props,
74
+ className: classNames("altertable-grid-item", className),
75
+ "data-span": span,
76
+ children
77
+ });
154
78
  }
155
- // packages/data-app-react/src/widgets.tsx
156
- import { useEffect, useRef, useState } from "react";
157
- import { formatMetric } from "@altertable/data-app/format";
158
- import { jsx as jsx4, jsxs, Fragment } from "react/jsx-runtime";
159
- function MetricWidget({
160
- metric,
161
- source,
162
- records,
163
- actions,
164
- action,
165
- ...presentation
166
- }) {
167
- const navigation = useDetailNavigation2();
168
- const itemActions = resolveActions(actions, metric, RegisteredBinding.owner(metric), source, (target, input, trigger) => navigation.open(target, input, trigger));
169
- const [widgetElement, setWidgetElement] = useState(null);
170
- const availableActions = itemActions(undefined);
171
- return /* @__PURE__ */ jsx4(MetricWidget2, {
172
- ...presentation,
173
- ref: setWidgetElement,
174
- metric: metric.definition,
175
- reading: metric.read(source),
176
- action: action || availableActions.length ? /* @__PURE__ */ jsxs(Fragment, {
177
- children: [
178
- action,
179
- /* @__PURE__ */ jsx4(ExplorationActionControl2, {
180
- actions: availableActions,
181
- ariaLabel: metric.definition.label
182
- })
183
- ]
184
- }) : undefined,
185
- records: records ? MetricRecords.render(records, metric, source, {
186
- open(target, input) {
187
- navigation.open(target, input, widgetElement?.querySelector("header button"));
188
- }
189
- }) : undefined
190
- });
79
+ //#endregion
80
+ //#region src/widgets.tsx
81
+ function MetricWidget({ metric, source, records, actions, action, ...presentation }) {
82
+ const navigation = useDetailNavigation();
83
+ const itemActions = resolveActions(actions, metric, RegisteredBinding.owner(metric), source, (target, input, trigger) => navigation.open(target, input, trigger));
84
+ const [widgetElement, setWidgetElement] = useState(null);
85
+ const availableActions = itemActions(void 0);
86
+ return /* @__PURE__ */ jsx(MetricWidget$1, {
87
+ ...presentation,
88
+ ref: setWidgetElement,
89
+ metric: metric.definition,
90
+ reading: metric.read(source),
91
+ action: action || availableActions.length ? /* @__PURE__ */ jsxs(Fragment$1, { children: [action, /* @__PURE__ */ jsx(ExplorationActionControl, {
92
+ actions: availableActions,
93
+ ariaLabel: metric.definition.label
94
+ })] }) : void 0,
95
+ records: records ? MetricRecords.render(records, metric, source, { open(target, input) {
96
+ navigation.open(target, input, widgetElement?.querySelector("header button"));
97
+ } }) : void 0
98
+ });
191
99
  }
192
- function TableWidget({
193
- dataset,
194
- source,
195
- title,
196
- actions,
197
- ...presentation
198
- }) {
199
- const data = datasetTable(dataset, source);
200
- const navigation = useDetailNavigation2();
201
- const itemActions = resolveActions(actions, dataset, RegisteredBinding.owner(dataset), source, (target, input, trigger) => navigation.open(target, input, trigger));
202
- const hasRowActions = actions && (data.reading.loading || data.reading.value.some((row) => itemActions(row).length > 0));
203
- return /* @__PURE__ */ jsx4(TableWidget2, {
204
- ...presentation,
205
- ...data,
206
- title: title ?? data.title,
207
- columns: hasRowActions ? [
208
- ...data.columns,
209
- {
210
- id: "$exploration-actions",
211
- header: "Actions",
212
- cell: (row) => /* @__PURE__ */ jsx4(ExplorationActionControl2, {
213
- actions: itemActions(row),
214
- ariaLabel: `${data.title}: ${data.rowKey(row)}`
215
- })
216
- }
217
- ] : data.columns
218
- });
100
+ function TableWidget({ dataset, source, title, actions, ...presentation }) {
101
+ const data = datasetTable(dataset, source);
102
+ const navigation = useDetailNavigation();
103
+ const itemActions = resolveActions(actions, dataset, RegisteredBinding.owner(dataset), source, (target, input, trigger) => navigation.open(target, input, trigger));
104
+ const hasRowActions = actions && (data.reading.loading || data.reading.value.some((row) => itemActions(row).length > 0));
105
+ return /* @__PURE__ */ jsx(TableWidget$1, {
106
+ ...presentation,
107
+ ...data,
108
+ title: title ?? data.title,
109
+ columns: hasRowActions ? [...data.columns, {
110
+ id: "$exploration-actions",
111
+ header: "Actions",
112
+ cell: (row) => /* @__PURE__ */ jsx(ExplorationActionControl, {
113
+ actions: itemActions(row),
114
+ ariaLabel: `${data.title}: ${data.rowKey(row)}`
115
+ })
116
+ }] : data.columns
117
+ });
219
118
  }
220
- function VisualizationWidget({
221
- dataset,
222
- source,
223
- title,
224
- actions,
225
- breakdown,
226
- children,
227
- views,
228
- viewLabel,
229
- initialView,
230
- ...presentation
231
- }) {
232
- const data = datasetTable(dataset, source);
233
- const navigation = useDetailNavigation2();
234
- const itemActions = resolveActions(actions, dataset, RegisteredBinding.owner(dataset), source, (target, input, trigger) => navigation.open(target, input, trigger));
235
- const state = breakdown && breakdownState(breakdown, RegisteredBinding.owner(dataset));
236
- const controlRef = useRef(null);
237
- const recoverFocus = useRef(false);
238
- useEffect(() => {
239
- if (recoverFocus.current) {
240
- recoverFocus.current = false;
241
- controlRef.current?.querySelector("button")?.focus();
242
- }
243
- }, [state?.value]);
244
- function resolvedActions(row) {
245
- return itemActions(row).map((action) => ({
246
- ...action,
247
- onSelect(trigger) {
248
- recoverFocus.current = true;
249
- action.onSelect(trigger);
250
- }
251
- }));
252
- }
253
- const action = state ? /* @__PURE__ */ jsx4("div", {
254
- ref: controlRef,
255
- children: /* @__PURE__ */ jsx4(Select2, {
256
- label: state.variable.label ?? "Break down by",
257
- labelPlacement: "inline",
258
- icon: "breakdown",
259
- size: "compact",
260
- align: "end",
261
- options: state.options.map((level) => ({
262
- id: level.id,
263
- label: level.label
264
- })),
265
- value: state.value,
266
- onChange: (id) => state.set(id)
267
- })
268
- }) : presentation.action;
269
- const common = {
270
- ...presentation,
271
- action,
272
- title: title ?? data.title,
273
- reading: data.reading,
274
- evidence: data.evidence,
275
- emptyFallback: data.emptyFallback,
276
- isEmpty: (rows) => rows.length === 0
277
- };
278
- return children ? /* @__PURE__ */ jsx4(VisualizationWidget2, {
279
- ...common,
280
- children: (rows) => children(rows, resolvedActions)
281
- }) : /* @__PURE__ */ jsx4(VisualizationWidget2, {
282
- ...common,
283
- views: views.map((view) => ({
284
- ...view,
285
- render: (rows) => view.render(rows, resolvedActions)
286
- })),
287
- viewLabel,
288
- initialView
289
- });
119
+ function VisualizationWidget({ dataset, source, title, actions, breakdown, children, views, viewLabel, initialView, ...presentation }) {
120
+ const data = datasetTable(dataset, source);
121
+ const navigation = useDetailNavigation();
122
+ const itemActions = resolveActions(actions, dataset, RegisteredBinding.owner(dataset), source, (target, input, trigger) => navigation.open(target, input, trigger));
123
+ const state = breakdown && breakdownState(breakdown, RegisteredBinding.owner(dataset));
124
+ const controlRef = useRef(null);
125
+ const recoverFocus = useRef(false);
126
+ useEffect(() => {
127
+ if (recoverFocus.current) {
128
+ recoverFocus.current = false;
129
+ controlRef.current?.querySelector("button")?.focus();
130
+ }
131
+ }, [state?.value]);
132
+ function resolvedActions(row) {
133
+ return itemActions(row).map((action) => ({
134
+ ...action,
135
+ onSelect(trigger) {
136
+ recoverFocus.current = true;
137
+ action.onSelect(trigger);
138
+ }
139
+ }));
140
+ }
141
+ const action = state ? /* @__PURE__ */ jsx("div", {
142
+ ref: controlRef,
143
+ children: /* @__PURE__ */ jsx(Select, {
144
+ label: state.variable.label ?? "Break down by",
145
+ labelPlacement: "inline",
146
+ icon: "breakdown",
147
+ size: "compact",
148
+ align: "end",
149
+ options: state.options.map((level) => ({
150
+ id: level.id,
151
+ label: level.label
152
+ })),
153
+ value: state.value,
154
+ onChange: (id) => state.set(id)
155
+ })
156
+ }) : presentation.action;
157
+ const common = {
158
+ ...presentation,
159
+ action,
160
+ title: title ?? data.title,
161
+ reading: data.reading,
162
+ evidence: data.evidence,
163
+ emptyFallback: data.emptyFallback,
164
+ isEmpty: (rows) => rows.length === 0
165
+ };
166
+ return children ? /* @__PURE__ */ jsx(VisualizationWidget$1, {
167
+ ...common,
168
+ children: (rows) => children(rows, resolvedActions)
169
+ }) : /* @__PURE__ */ jsx(VisualizationWidget$1, {
170
+ ...common,
171
+ views: views.map((view) => ({
172
+ ...view,
173
+ render: (rows) => view.render(rows, resolvedActions)
174
+ })),
175
+ viewLabel,
176
+ initialView
177
+ });
290
178
  }
291
179
  function TextWidget(props) {
292
- if (props.metric) {
293
- const { metric, source, title, children, ...presentation } = props;
294
- return /* @__PURE__ */ jsx4(TextWidget2, {
295
- ...presentation,
296
- title: title ?? metric.definition.label,
297
- evidence: metric.definition.evidence,
298
- reading: metric.read(source),
299
- children: children ?? ((values) => formatMetric(values.current, metric.definition.format))
300
- });
301
- }
302
- const { dataset, source, title, children, ...presentation } = props;
303
- return /* @__PURE__ */ jsx4(TextWidget2, {
304
- ...presentation,
305
- title: title ?? dataset.name,
306
- evidence: dataset.evidence,
307
- reading: dataset.read(source),
308
- children
309
- });
180
+ if (props.metric) {
181
+ const { metric, source, title, children, ...presentation } = props;
182
+ return /* @__PURE__ */ jsx(TextWidget$1, {
183
+ ...presentation,
184
+ title: title ?? metric.definition.label,
185
+ evidence: metric.definition.evidence,
186
+ reading: metric.read(source),
187
+ children: children ?? ((values) => formatMetric(values.current, metric.definition.format))
188
+ });
189
+ }
190
+ const { dataset, source, title, children, ...presentation } = props;
191
+ return /* @__PURE__ */ jsx(TextWidget$1, {
192
+ ...presentation,
193
+ title: title ?? dataset.name,
194
+ evidence: dataset.evidence,
195
+ reading: dataset.read(source),
196
+ children
197
+ });
310
198
  }
311
199
  function DataValue(props) {
312
- if (props.metric) {
313
- const {
314
- metric,
315
- source,
316
- children,
317
- loadingFallback = /* @__PURE__ */ jsx4(Skeleton2, {
318
- inline: true
319
- }),
320
- ...presentation
321
- } = props;
322
- return /* @__PURE__ */ jsx4(DataValue2, {
323
- ...presentation,
324
- reading: metric.read(source),
325
- loadingFallback,
326
- children: children ?? ((values) => formatMetric(values.current, metric.definition.format))
327
- });
328
- }
329
- if (props.dataset) {
330
- const {
331
- dataset,
332
- source,
333
- children,
334
- loadingFallback = /* @__PURE__ */ jsx4(Skeleton2, {
335
- inline: true
336
- }),
337
- ...presentation
338
- } = props;
339
- return /* @__PURE__ */ jsx4(DataValue2, {
340
- ...presentation,
341
- reading: dataset.read(source),
342
- loadingFallback,
343
- children
344
- });
345
- }
346
- const {
347
- scope,
348
- children,
349
- loadingFallback = /* @__PURE__ */ jsx4(Skeleton2, {
350
- inline: true
351
- }),
352
- ...presentation
353
- } = props;
354
- return /* @__PURE__ */ jsx4(DataValue2, {
355
- ...presentation,
356
- reading: scope,
357
- loadingFallback,
358
- children: children ?? ((value) => value)
359
- });
200
+ if (props.metric) {
201
+ const { metric, source, children, loadingFallback = /* @__PURE__ */ jsx(Skeleton, { inline: true }), ...presentation } = props;
202
+ return /* @__PURE__ */ jsx(DataValue$1, {
203
+ ...presentation,
204
+ reading: metric.read(source),
205
+ loadingFallback,
206
+ children: children ?? ((values) => formatMetric(values.current, metric.definition.format))
207
+ });
208
+ }
209
+ if (props.dataset) {
210
+ const { dataset, source, children, loadingFallback = /* @__PURE__ */ jsx(Skeleton, { inline: true }), ...presentation } = props;
211
+ return /* @__PURE__ */ jsx(DataValue$1, {
212
+ ...presentation,
213
+ reading: dataset.read(source),
214
+ loadingFallback,
215
+ children
216
+ });
217
+ }
218
+ const { scope, children, loadingFallback = /* @__PURE__ */ jsx(Skeleton, { inline: true }), ...presentation } = props;
219
+ return /* @__PURE__ */ jsx(DataValue$1, {
220
+ ...presentation,
221
+ reading: scope,
222
+ loadingFallback,
223
+ children: children ?? ((value) => value)
224
+ });
360
225
  }
361
- // packages/data-app-react/src/ui/Breakdown.tsx
362
- import { formatCount, formatPercent } from "@altertable/data-app/format";
363
- import { invariant } from "@altertable/data-app/internal";
364
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
365
- function Breakdown({
366
- total,
367
- items,
368
- formatValue = formatCount,
369
- className,
370
- ...props
371
- }) {
372
- invariant(Number.isFinite(total) && total >= 0 && items.every((item) => Number.isFinite(item.value) && item.value >= 0) && items.reduce((sum, item) => sum + item.value, 0) <= total, "Breakdown items must be nonnegative parts of the observed total.");
373
- const dominant = total > 0 && items.some((item) => item.value / total >= 0.85);
374
- return /* @__PURE__ */ jsxs2("div", {
375
- ...props,
376
- className: classNames("altertable-breakdown", className),
377
- "data-dominant": dominant || undefined,
378
- children: [
379
- /* @__PURE__ */ jsxs2("div", {
380
- className: "altertable-breakdown-summary",
381
- children: [
382
- /* @__PURE__ */ jsx5("span", {
383
- children: "Share of total"
384
- }),
385
- /* @__PURE__ */ jsxs2("strong", {
386
- children: [
387
- formatValue(total),
388
- " total"
389
- ]
390
- })
391
- ]
392
- }),
393
- /* @__PURE__ */ jsx5("div", {
394
- className: "altertable-breakdown-bar",
395
- "aria-hidden": "true",
396
- children: items.map((item) => /* @__PURE__ */ jsx5("span", {
397
- style: {
398
- width: `${total ? item.value / total * 100 : 0}%`,
399
- backgroundColor: chartColor2(item.id)
400
- }
401
- }, item.id))
402
- }),
403
- /* @__PURE__ */ jsx5("dl", {
404
- className: "altertable-breakdown-list",
405
- children: items.map((item) => {
406
- const share = total ? item.value / total : 0;
407
- const color = {
408
- "--altertable-breakdown-color": chartColor2(item.id)
409
- };
410
- return /* @__PURE__ */ jsxs2("div", {
411
- className: "altertable-breakdown-row",
412
- "data-empty": item.value === 0 || undefined,
413
- style: color,
414
- children: [
415
- /* @__PURE__ */ jsxs2("dt", {
416
- children: [
417
- /* @__PURE__ */ jsx5("span", {
418
- className: "altertable-breakdown-swatch",
419
- "aria-hidden": "true"
420
- }),
421
- item.label
422
- ]
423
- }),
424
- /* @__PURE__ */ jsx5("dd", {
425
- className: "altertable-breakdown-value",
426
- children: formatValue(item.value)
427
- }),
428
- /* @__PURE__ */ jsx5("dd", {
429
- className: "altertable-breakdown-share",
430
- children: formatPercent(share)
431
- })
432
- ]
433
- }, item.id);
434
- })
435
- })
436
- ]
437
- });
226
+ //#endregion
227
+ //#region src/ui/Breakdown.tsx
228
+ /** Mutually exclusive parts of one observed whole. Every share uses the supplied total. */
229
+ function Breakdown({ total, items, formatValue = formatCount, className, ...props }) {
230
+ invariant(Number.isFinite(total) && total >= 0 && items.every((item) => Number.isFinite(item.value) && item.value >= 0) && items.reduce((sum, item) => sum + item.value, 0) <= total, "Breakdown items must be nonnegative parts of the observed total.");
231
+ const dominant = total > 0 && items.some((item) => item.value / total >= .85);
232
+ return /* @__PURE__ */ jsxs("div", {
233
+ ...props,
234
+ className: classNames("altertable-breakdown", className),
235
+ "data-dominant": dominant || void 0,
236
+ children: [
237
+ /* @__PURE__ */ jsxs("div", {
238
+ className: "altertable-breakdown-summary",
239
+ children: [/* @__PURE__ */ jsx("span", { children: "Share of total" }), /* @__PURE__ */ jsxs("strong", { children: [formatValue(total), " total"] })]
240
+ }),
241
+ /* @__PURE__ */ jsx("div", {
242
+ className: "altertable-breakdown-bar",
243
+ "aria-hidden": "true",
244
+ children: items.map((item) => /* @__PURE__ */ jsx("span", { style: {
245
+ width: `${total ? item.value / total * 100 : 0}%`,
246
+ backgroundColor: chartColor(item.id)
247
+ } }, item.id))
248
+ }),
249
+ /* @__PURE__ */ jsx("dl", {
250
+ className: "altertable-breakdown-list",
251
+ children: items.map((item) => {
252
+ const share = total ? item.value / total : 0;
253
+ const color = { "--altertable-breakdown-color": chartColor(item.id) };
254
+ return /* @__PURE__ */ jsxs("div", {
255
+ className: "altertable-breakdown-row",
256
+ "data-empty": item.value === 0 || void 0,
257
+ style: color,
258
+ children: [
259
+ /* @__PURE__ */ jsxs("dt", { children: [/* @__PURE__ */ jsx("span", {
260
+ className: "altertable-breakdown-swatch",
261
+ "aria-hidden": "true"
262
+ }), item.label] }),
263
+ /* @__PURE__ */ jsx("dd", {
264
+ className: "altertable-breakdown-value",
265
+ children: formatValue(item.value)
266
+ }),
267
+ /* @__PURE__ */ jsx("dd", {
268
+ className: "altertable-breakdown-share",
269
+ children: formatPercent(share)
270
+ })
271
+ ]
272
+ }, item.id);
273
+ })
274
+ })
275
+ ]
276
+ });
438
277
  }
439
- // packages/data-app-react/src/ui/Ranking.tsx
440
- import { formatCount as formatCount2 } from "@altertable/data-app/format";
441
- import { invariant as invariant2 } from "@altertable/data-app/internal";
442
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
443
- function Ranking({
444
- items,
445
- formatValue = formatCount2,
446
- className,
447
- ...props
448
- }) {
449
- invariant2(items.every((item) => Number.isFinite(item.value) && item.value >= 0), "Ranking values must be finite and nonnegative.");
450
- const max = Math.max(0, ...items.map((item) => item.value));
451
- return /* @__PURE__ */ jsx6("ol", {
452
- ...props,
453
- className: classNames("altertable-ranking", className),
454
- children: items.map((item) => /* @__PURE__ */ jsxs3("li", {
455
- children: [
456
- /* @__PURE__ */ jsxs3("div", {
457
- className: "altertable-ranking-reading",
458
- children: [
459
- /* @__PURE__ */ jsx6("span", {
460
- children: item.label
461
- }),
462
- /* @__PURE__ */ jsx6("strong", {
463
- children: formatValue(item.value)
464
- })
465
- ]
466
- }),
467
- /* @__PURE__ */ jsx6("div", {
468
- className: "altertable-ranking-track",
469
- "aria-hidden": "true",
470
- children: /* @__PURE__ */ jsx6("span", {
471
- style: { width: `${max ? item.value / max * 100 : 0}%` }
472
- })
473
- }),
474
- item.detail != null && /* @__PURE__ */ jsx6("div", {
475
- className: "altertable-ranking-detail",
476
- children: item.detail
477
- })
478
- ]
479
- }, item.id))
480
- });
278
+ //#endregion
279
+ //#region src/ui/Ranking.tsx
280
+ /** Ordered values scaled to the largest visible item, not shares of a whole. */
281
+ function Ranking({ items, formatValue = formatCount, className, ...props }) {
282
+ invariant(items.every((item) => Number.isFinite(item.value) && item.value >= 0), "Ranking values must be finite and nonnegative.");
283
+ const max = Math.max(0, ...items.map((item) => item.value));
284
+ return /* @__PURE__ */ jsx("ol", {
285
+ ...props,
286
+ className: classNames("altertable-ranking", className),
287
+ children: items.map((item) => /* @__PURE__ */ jsxs("li", { children: [
288
+ /* @__PURE__ */ jsxs("div", {
289
+ className: "altertable-ranking-reading",
290
+ children: [/* @__PURE__ */ jsx("span", { children: item.label }), /* @__PURE__ */ jsx("strong", { children: formatValue(item.value) })]
291
+ }),
292
+ /* @__PURE__ */ jsx("div", {
293
+ className: "altertable-ranking-track",
294
+ "aria-hidden": "true",
295
+ children: /* @__PURE__ */ jsx("span", { style: { width: `${max ? item.value / max * 100 : 0}%` } })
296
+ }),
297
+ item.detail != null && /* @__PURE__ */ jsx("div", {
298
+ className: "altertable-ranking-detail",
299
+ children: item.detail
300
+ })
301
+ ] }, item.id))
302
+ });
481
303
  }
482
- // packages/data-app-react/src/ui/Comparison.tsx
483
- import { jsx as jsx7, jsxs as jsxs4, Fragment as Fragment2 } from "react/jsx-runtime";
304
+ //#endregion
305
+ //#region src/ui/Comparison.tsx
484
306
  function Comparison(props) {
485
- const dateFormatting = useDateFormatting2();
486
- if ("metric" in props) {
487
- if (props.reading.loading)
488
- return /* @__PURE__ */ jsx7(ContentSkeleton, {
489
- variant: "panel"
490
- });
491
- const comparison = metricComparison(props.metric, props.reading, dateFormatting);
492
- if (!comparison)
493
- return null;
494
- return /* @__PURE__ */ jsx7(ComparisonContent, {
495
- ...comparison,
496
- label: props.metric.label,
497
- emphasis: props.emphasis
498
- });
499
- }
500
- return /* @__PURE__ */ jsx7(ComparisonContent, {
501
- ...props
502
- });
307
+ const dateFormatting = useDateFormatting();
308
+ if ("metric" in props) {
309
+ if (props.reading.loading) return /* @__PURE__ */ jsx(ContentSkeleton, { variant: "panel" });
310
+ const comparison = metricComparison(props.metric, props.reading, dateFormatting);
311
+ if (!comparison) return null;
312
+ return /* @__PURE__ */ jsx(ComparisonContent, {
313
+ ...comparison,
314
+ label: props.metric.label,
315
+ emphasis: props.emphasis
316
+ });
317
+ }
318
+ return /* @__PURE__ */ jsx(ComparisonContent, { ...props });
503
319
  }
504
- function ComparisonContent({
505
- label,
506
- current,
507
- previous,
508
- favorableDirection,
509
- emphasis = "standard"
510
- }) {
511
- const max = Math.max(current.value, previous?.value ?? 0, 1);
512
- const { percent, tone, icon } = comparisonChange({
513
- current,
514
- previous,
515
- favorableDirection
516
- });
517
- return /* @__PURE__ */ jsxs4("figure", {
518
- className: "altertable-comparison-visual",
519
- "data-emphasis": emphasis,
520
- "aria-label": `${label} comparison`,
521
- children: [
522
- /* @__PURE__ */ jsx7("figcaption", {
523
- children: label
524
- }),
525
- /* @__PURE__ */ jsxs4("div", {
526
- className: "altertable-comparison-row",
527
- "data-period": "current",
528
- children: [
529
- /* @__PURE__ */ jsxs4("div", {
530
- children: [
531
- /* @__PURE__ */ jsx7("span", {
532
- children: current.periodLabel ?? "Current period"
533
- }),
534
- /* @__PURE__ */ jsx7("strong", {
535
- children: current.formattedValue
536
- })
537
- ]
538
- }),
539
- /* @__PURE__ */ jsx7("span", {
540
- className: "altertable-comparison-track",
541
- children: /* @__PURE__ */ jsx7("span", {
542
- style: { width: `${current.value / max * 100}%` }
543
- })
544
- })
545
- ]
546
- }),
547
- previous && /* @__PURE__ */ jsxs4("div", {
548
- className: "altertable-comparison-row",
549
- "data-period": "previous",
550
- children: [
551
- /* @__PURE__ */ jsxs4("div", {
552
- children: [
553
- /* @__PURE__ */ jsx7("span", {
554
- children: previous.periodLabel ?? "Previous period"
555
- }),
556
- /* @__PURE__ */ jsx7("strong", {
557
- children: previous.formattedValue
558
- })
559
- ]
560
- }),
561
- /* @__PURE__ */ jsx7("span", {
562
- className: "altertable-comparison-track",
563
- children: /* @__PURE__ */ jsx7("span", {
564
- style: { width: `${(previous.value ?? 0) / max * 100}%` }
565
- })
566
- })
567
- ]
568
- }),
569
- /* @__PURE__ */ jsx7("p", {
570
- className: "altertable-comparison-change",
571
- "data-tone": tone,
572
- children: percent === null ? "No comparable previous value" : /* @__PURE__ */ jsxs4(Fragment2, {
573
- children: [
574
- /* @__PURE__ */ jsx7(AppIcon2, {
575
- name: icon,
576
- size: 17
577
- }),
578
- Math.abs(percent).toFixed(1),
579
- "% vs",
580
- " ",
581
- previous?.periodLabel?.toLowerCase() ?? "previous period"
582
- ]
583
- })
584
- })
585
- ]
586
- });
320
+ function ComparisonContent({ label, current, previous, favorableDirection, emphasis = "standard" }) {
321
+ const max = Math.max(current.value, previous?.value ?? 0, 1);
322
+ const { percent, tone, icon } = comparisonChange({
323
+ current,
324
+ previous,
325
+ favorableDirection
326
+ });
327
+ return /* @__PURE__ */ jsxs("figure", {
328
+ className: "altertable-comparison-visual",
329
+ "data-emphasis": emphasis,
330
+ "aria-label": `${label} comparison`,
331
+ children: [
332
+ /* @__PURE__ */ jsx("figcaption", { children: label }),
333
+ /* @__PURE__ */ jsxs("div", {
334
+ className: "altertable-comparison-row",
335
+ "data-period": "current",
336
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", { children: current.periodLabel ?? "Current period" }), /* @__PURE__ */ jsx("strong", { children: current.formattedValue })] }), /* @__PURE__ */ jsx("span", {
337
+ className: "altertable-comparison-track",
338
+ children: /* @__PURE__ */ jsx("span", { style: { width: `${current.value / max * 100}%` } })
339
+ })]
340
+ }),
341
+ previous && /* @__PURE__ */ jsxs("div", {
342
+ className: "altertable-comparison-row",
343
+ "data-period": "previous",
344
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", { children: previous.periodLabel ?? "Previous period" }), /* @__PURE__ */ jsx("strong", { children: previous.formattedValue })] }), /* @__PURE__ */ jsx("span", {
345
+ className: "altertable-comparison-track",
346
+ children: /* @__PURE__ */ jsx("span", { style: { width: `${(previous.value ?? 0) / max * 100}%` } })
347
+ })]
348
+ }),
349
+ /* @__PURE__ */ jsx("p", {
350
+ className: "altertable-comparison-change",
351
+ "data-tone": tone,
352
+ children: percent === null ? "No comparable previous value" : /* @__PURE__ */ jsxs(Fragment$1, { children: [
353
+ /* @__PURE__ */ jsx(AppIcon, {
354
+ name: icon,
355
+ size: 17
356
+ }),
357
+ Math.abs(percent).toFixed(1),
358
+ "% vs",
359
+ " ",
360
+ previous?.periodLabel?.toLowerCase() ?? "previous period"
361
+ ] })
362
+ })
363
+ ]
364
+ });
587
365
  }
588
- // packages/data-app-react/src/ui/DataSection.tsx
589
- import { useContext } from "react";
590
- import { jsx as jsx8 } from "react/jsx-runtime";
591
- function DataSection({
592
- content,
593
- ...presentation
594
- }) {
595
- const primary = useContext(PrimaryViewContext);
596
- const { view, ...section } = sectionContent(content);
597
- if (primary?.declaration === view) {
598
- const result = primary.result;
599
- return /* @__PURE__ */ jsx8(DataSectionBoundary, {
600
- ...section,
601
- ...presentation,
602
- result,
603
- notice: "none"
604
- });
605
- }
606
- return /* @__PURE__ */ jsx8(IndependentSection, {
607
- view,
608
- ...section,
609
- ...presentation
610
- });
366
+ //#endregion
367
+ //#region src/ui/DataSection.tsx
368
+ function DataSection({ content, ...presentation }) {
369
+ const primary = useContext(PrimaryViewContext);
370
+ const { view, ...section } = sectionContent(content);
371
+ if (primary?.declaration === view) {
372
+ const result = primary.result;
373
+ return /* @__PURE__ */ jsx(DataSectionBoundary, {
374
+ ...section,
375
+ ...presentation,
376
+ result,
377
+ notice: "none"
378
+ });
379
+ }
380
+ return /* @__PURE__ */ jsx(IndependentSection, {
381
+ view,
382
+ ...section,
383
+ ...presentation
384
+ });
611
385
  }
612
- function IndependentSection({
613
- view,
614
- ...props
615
- }) {
616
- const result = useDeclaredResult(view);
617
- const defaults = useInspectionDefaults();
618
- const section = /* @__PURE__ */ jsx8(DataSectionBoundary, {
619
- ...props,
620
- result,
621
- notice: "inline"
622
- });
623
- return /* @__PURE__ */ jsx8(DateFormattingContext, {
624
- value: { timeZone: result.timeZone },
625
- children: /* @__PURE__ */ jsx8(InspectionContext, {
626
- value: {
627
- ...defaults,
628
- dataContext: result.dataContext,
629
- queries: result.queries
630
- },
631
- children: section
632
- })
633
- });
386
+ function IndependentSection({ view, ...props }) {
387
+ const result = useDeclaredResult(view);
388
+ const defaults = useInspectionDefaults();
389
+ const section = /* @__PURE__ */ jsx(DataSectionBoundary, {
390
+ ...props,
391
+ result,
392
+ notice: "inline"
393
+ });
394
+ return /* @__PURE__ */ jsx(DateFormattingContext, {
395
+ value: { timeZone: result.timeZone },
396
+ children: /* @__PURE__ */ jsx(InspectionContext, {
397
+ value: {
398
+ ...defaults,
399
+ dataContext: result.dataContext,
400
+ queries: result.queries
401
+ },
402
+ children: section
403
+ })
404
+ });
634
405
  }
635
- // packages/data-app-react/src/ui/UpdatedAt.tsx
636
- import { parseDateTime } from "@altertable/data-app/format";
637
- import { useEffect as useEffect2, useState as useState2 } from "react";
638
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
639
- function UpdatedAt({
640
- timestamp,
641
- locale,
642
- label = "Updated",
643
- children,
644
- triggerProps,
645
- ...props
646
- }) {
647
- const defaults = useDateFormatting2({ locale, timeZone: props.timeZone });
648
- const [now, setNow] = useState2(Date.now);
649
- useEffect2(() => {
650
- const interval = window.setInterval(() => setNow(Date.now()), 30000);
651
- return () => window.clearInterval(interval);
652
- }, []);
653
- const elapsedMinutes = Math.floor(Math.max(0, now - timestamp) / 60000);
654
- const relative = new Intl.RelativeTimeFormat(defaults.locale, {
655
- numeric: "auto"
656
- });
657
- let age = "just now";
658
- if (elapsedMinutes >= 1440)
659
- age = relative.format(-Math.floor(elapsedMinutes / 1440), "day");
660
- else if (elapsedMinutes >= 60)
661
- age = relative.format(-Math.floor(elapsedMinutes / 60), "hour");
662
- else if (elapsedMinutes >= 1)
663
- age = relative.format(-elapsedMinutes, "minute");
664
- const date = parseDateTime(timestamp);
665
- if (!date)
666
- return /* @__PURE__ */ jsx9("span", {
667
- children: children ?? `${label} —`
668
- });
669
- return /* @__PURE__ */ jsx9(DateTimeTooltip2, {
670
- ...props,
671
- ...defaults,
672
- date,
673
- triggerProps: {
674
- ...triggerProps,
675
- className: ["altertable-updated-at", triggerProps?.className].filter(Boolean).join(" ")
676
- },
677
- children: children ?? /* @__PURE__ */ jsxs5("time", {
678
- dateTime: date.toISOString(),
679
- children: [
680
- label,
681
- " ",
682
- age
683
- ]
684
- })
685
- });
406
+ //#endregion
407
+ //#region src/ui/UpdatedAt.tsx
408
+ function UpdatedAt({ timestamp, locale, label = "Updated", children, triggerProps, ...props }) {
409
+ const defaults = useDateFormatting({
410
+ locale,
411
+ timeZone: props.timeZone
412
+ });
413
+ const [now, setNow] = useState(Date.now);
414
+ useEffect(() => {
415
+ const interval = window.setInterval(() => setNow(Date.now()), 3e4);
416
+ return () => window.clearInterval(interval);
417
+ }, []);
418
+ const elapsedMinutes = Math.floor(Math.max(0, now - timestamp) / 6e4);
419
+ const relative = new Intl.RelativeTimeFormat(defaults.locale, { numeric: "auto" });
420
+ let age = "just now";
421
+ if (elapsedMinutes >= 1440) age = relative.format(-Math.floor(elapsedMinutes / 1440), "day");
422
+ else if (elapsedMinutes >= 60) age = relative.format(-Math.floor(elapsedMinutes / 60), "hour");
423
+ else if (elapsedMinutes >= 1) age = relative.format(-elapsedMinutes, "minute");
424
+ const date = parseDateTime(timestamp);
425
+ if (!date) return /* @__PURE__ */ jsx("span", { children: children ?? `${label} —` });
426
+ return /* @__PURE__ */ jsx(DateTimeTooltip, {
427
+ ...props,
428
+ ...defaults,
429
+ date,
430
+ triggerProps: {
431
+ ...triggerProps,
432
+ className: ["altertable-updated-at", triggerProps?.className].filter(Boolean).join(" ")
433
+ },
434
+ children: children ?? /* @__PURE__ */ jsxs("time", {
435
+ dateTime: date.toISOString(),
436
+ children: [
437
+ label,
438
+ " ",
439
+ age
440
+ ]
441
+ })
442
+ });
686
443
  }
687
- // packages/data-app-react/src/ui/PeriodSummary.tsx
688
- import {
689
- formatDateRange,
690
- formatDateTime,
691
- parseDateTime as parseDateTime2
692
- } from "@altertable/data-app/format";
693
- import { jsx as jsx10, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
444
+ //#endregion
445
+ //#region src/ui/PeriodSummary.tsx
694
446
  function duration(period) {
695
- return `${period.amount} ${period.unit}${period.amount === 1 ? "" : "s"}`;
447
+ return `${period.amount} ${period.unit}${period.amount === 1 ? "" : "s"}`;
696
448
  }
697
449
  function label(period, options = {}) {
698
- if (period.kind === "rolling")
699
- return `Last ${duration(period)}`;
700
- return formatDateRange(period, options);
450
+ if (period.kind === "rolling") return `Last ${duration(period)}`;
451
+ return formatDateRange(period, options);
701
452
  }
702
453
  function comparisonLabel(period, comparison, options) {
703
- if (comparison.kind === "period") {
704
- if (comparison.period.kind === "calendar")
705
- return label(comparison.period, options);
706
- return `${duration(comparison.period)} ending ${formatDateTime(comparison.period.end, options)}`;
707
- }
708
- return period.kind === "rolling" ? `Previous ${duration(period)}` : "Previous period";
454
+ if (comparison.kind === "period") {
455
+ if (comparison.period.kind === "calendar") return label(comparison.period, options);
456
+ return `${duration(comparison.period)} ending ${formatDateTime(comparison.period.end, options)}`;
457
+ }
458
+ return period.kind === "rolling" ? `Previous ${duration(period)}` : "Previous period";
709
459
  }
710
460
  function reportingPeriodText(period, options = {}) {
711
- if (period.kind === "calendar")
712
- return `${label(period, options)} in ${period.timeZone}`;
713
- const end = parseDateTime2(period.end);
714
- if (!end)
715
- return label(period, options);
716
- const start = new Date(end.getTime() - period.amount * (period.unit === "hour" ? 3600000 : 86400000));
717
- return `${label(period, options)}, ${formatDateTime(start, options)} to ${formatDateTime(end, options)} in ${options.timeZone ?? "UTC"}`;
461
+ if (period.kind === "calendar") return `${label(period, options)} in ${period.timeZone}`;
462
+ const end = parseDateTime(period.end);
463
+ if (!end) return label(period, options);
464
+ const start = /* @__PURE__ */ new Date(end.getTime() - period.amount * (period.unit === "hour" ? 36e5 : 864e5));
465
+ return `${label(period, options)}, ${formatDateTime(start, options)} to ${formatDateTime(end, options)} in ${options.timeZone ?? "UTC"}`;
718
466
  }
719
- function PeriodSummary({
720
- period,
721
- comparison,
722
- className
723
- }) {
724
- const options = useDateFormatting2();
725
- const comparisonText = comparison ? comparisonLabel(period, comparison, options) : null;
726
- const comparisonDetail = comparison?.kind === "period" ? reportingPeriodText(comparison.period, options) : comparisonText;
727
- return /* @__PURE__ */ jsxs6("p", {
728
- className: classNames("altertable-period-summary", className),
729
- children: [
730
- /* @__PURE__ */ jsx10("span", {
731
- className: "altertable-sr-only",
732
- children: `Reporting period: ${reportingPeriodText(period, options)}${comparisonDetail ? `, compared with ${comparisonDetail}` : ""}`
733
- }),
734
- /* @__PURE__ */ jsxs6("span", {
735
- "aria-hidden": "true",
736
- className: "altertable-period-summary-visible",
737
- children: [
738
- /* @__PURE__ */ jsx10(AppIcon2, {
739
- name: period.kind === "rolling" ? "clock" : "calendar",
740
- size: 16
741
- }),
742
- /* @__PURE__ */ jsx10("span", {
743
- className: "altertable-period-summary-current",
744
- children: label(period, options)
745
- }),
746
- comparisonText && /* @__PURE__ */ jsxs6(Fragment3, {
747
- children: [
748
- /* @__PURE__ */ jsx10("span", {
749
- className: "altertable-period-summary-vs",
750
- "aria-hidden": "true",
751
- children: "vs"
752
- }),
753
- /* @__PURE__ */ jsx10("span", {
754
- children: comparisonText
755
- })
756
- ]
757
- })
758
- ]
759
- })
760
- ]
761
- });
467
+ /** Read-only period context for the variable bar, including exact bounds for assistive technology. */
468
+ function PeriodSummary({ period, comparison, className }) {
469
+ const options = useDateFormatting();
470
+ const comparisonText = comparison ? comparisonLabel(period, comparison, options) : null;
471
+ const comparisonDetail = comparison?.kind === "period" ? reportingPeriodText(comparison.period, options) : comparisonText;
472
+ return /* @__PURE__ */ jsxs("p", {
473
+ className: classNames("altertable-period-summary", className),
474
+ children: [/* @__PURE__ */ jsx("span", {
475
+ className: "altertable-sr-only",
476
+ children: `Reporting period: ${reportingPeriodText(period, options)}${comparisonDetail ? `, compared with ${comparisonDetail}` : ""}`
477
+ }), /* @__PURE__ */ jsxs("span", {
478
+ "aria-hidden": "true",
479
+ className: "altertable-period-summary-visible",
480
+ children: [
481
+ /* @__PURE__ */ jsx(AppIcon, {
482
+ name: period.kind === "rolling" ? "clock" : "calendar",
483
+ size: 16
484
+ }),
485
+ /* @__PURE__ */ jsx("span", {
486
+ className: "altertable-period-summary-current",
487
+ children: label(period, options)
488
+ }),
489
+ comparisonText && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
490
+ className: "altertable-period-summary-vs",
491
+ "aria-hidden": "true",
492
+ children: "vs"
493
+ }), /* @__PURE__ */ jsx("span", { children: comparisonText })] })
494
+ ]
495
+ })]
496
+ });
762
497
  }
763
- // packages/data-app-react/src/ui/data-identifiers.tsx
764
- import { invariant as invariant3 } from "@altertable/data-app/internal";
765
- import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
498
+ //#endregion
499
+ //#region src/ui/data-identifiers.tsx
766
500
  function qualifiedName(definition) {
767
- const table = definition.kind === "table" ? definition : definition.table;
768
- const path = [table.catalog, table.schema, table.name].join(".");
769
- return definition.kind === "column" ? `${path}.${definition.name}` : path;
501
+ const table = definition.kind === "table" ? definition : definition.table;
502
+ const path = [
503
+ table.catalog,
504
+ table.schema,
505
+ table.name
506
+ ].join(".");
507
+ return definition.kind === "column" ? `${path}.${definition.name}` : path;
770
508
  }
771
509
  function assertAlias(id) {
772
- invariant3(!!id && !id.includes("."), `Invalid data identifier alias ${id}.`);
510
+ invariant(!!id && !id.includes("."), `Invalid data identifier alias ${id}.`);
773
511
  }
512
+ /** Register exact source names once; returned JSX IDs are checked against this registry. */
774
513
  function defineDataIdentifiers({ tables, columns }) {
775
- const definitions = Object.create(null);
776
- for (const [id, table] of Object.entries(tables)) {
777
- assertAlias(id);
778
- definitions[`tables.${id}`] = { kind: "table", ...table };
779
- }
780
- for (const [id, column] of Object.entries(columns)) {
781
- assertAlias(id);
782
- const table = tables[column.table];
783
- invariant3(table, `Unknown table ${column.table} for column ${id}.`);
784
- definitions[`columns.${column.table}.${id}`] = {
785
- kind: "column",
786
- tableId: `tables.${column.table}`,
787
- table,
788
- name: column.name
789
- };
790
- }
791
- function DataIdentifier({
792
- id,
793
- display
794
- }) {
795
- const definition = definitions[id];
796
- invariant3(definition, `Unknown data identifier ${id}.`);
797
- const qualified = qualifiedName(definition);
798
- const shown = display ?? (definition.kind === "table" ? "qualified" : "short");
799
- const table = definition.kind === "table" ? definition : definition.table;
800
- const prefix = definition.kind === "table" ? [table.catalog, table.schema] : [table.catalog, table.schema, table.name];
801
- return /* @__PURE__ */ jsxs7("code", {
802
- className: "altertable-data-identifier",
803
- "data-kind": definition.kind,
804
- title: qualified,
805
- "data-identifier-id": id,
806
- children: [
807
- shown === "qualified" && /* @__PURE__ */ jsx11("span", {
808
- className: "altertable-data-identifier-path",
809
- children: prefix.map((segment, index) => /* @__PURE__ */ jsxs7("span", {
810
- children: [
811
- segment,
812
- ".",
813
- /* @__PURE__ */ jsx11("wbr", {})
814
- ]
815
- }, index))
816
- }),
817
- /* @__PURE__ */ jsx11("span", {
818
- className: "altertable-data-identifier-name",
819
- children: definition.name
820
- })
821
- ]
822
- });
823
- }
824
- return {
825
- definitions,
826
- DataIdentifier
827
- };
514
+ const definitions = Object.create(null);
515
+ for (const [id, table] of Object.entries(tables)) {
516
+ assertAlias(id);
517
+ definitions[`tables.${id}`] = {
518
+ kind: "table",
519
+ ...table
520
+ };
521
+ }
522
+ for (const [id, column] of Object.entries(columns)) {
523
+ assertAlias(id);
524
+ const table = tables[column.table];
525
+ invariant(table, `Unknown table ${column.table} for column ${id}.`);
526
+ definitions[`columns.${column.table}.${id}`] = {
527
+ kind: "column",
528
+ tableId: `tables.${column.table}`,
529
+ table,
530
+ name: column.name
531
+ };
532
+ }
533
+ function DataIdentifier({ id, display }) {
534
+ const definition = definitions[id];
535
+ invariant(definition, `Unknown data identifier ${id}.`);
536
+ const qualified = qualifiedName(definition);
537
+ const shown = display ?? (definition.kind === "table" ? "qualified" : "short");
538
+ const table = definition.kind === "table" ? definition : definition.table;
539
+ const prefix = definition.kind === "table" ? [table.catalog, table.schema] : [
540
+ table.catalog,
541
+ table.schema,
542
+ table.name
543
+ ];
544
+ return /* @__PURE__ */ jsxs("code", {
545
+ className: "altertable-data-identifier",
546
+ "data-kind": definition.kind,
547
+ title: qualified,
548
+ "data-identifier-id": id,
549
+ children: [shown === "qualified" && /* @__PURE__ */ jsx("span", {
550
+ className: "altertable-data-identifier-path",
551
+ children: prefix.map((segment, index) => /* @__PURE__ */ jsxs("span", { children: [
552
+ segment,
553
+ ".",
554
+ /* @__PURE__ */ jsx("wbr", {})
555
+ ] }, index))
556
+ }), /* @__PURE__ */ jsx("span", {
557
+ className: "altertable-data-identifier-name",
558
+ children: definition.name
559
+ })]
560
+ });
561
+ }
562
+ return {
563
+ definitions,
564
+ DataIdentifier
565
+ };
828
566
  }
829
- // packages/data-app-react/src/annotations/AnnotationTarget.tsx
830
- import { jsx as jsx12 } from "react/jsx-runtime";
831
- function AnnotationTarget({
832
- annotationId,
833
- label,
834
- evidence,
835
- ...props
836
- }) {
837
- return /* @__PURE__ */ jsx12("div", {
838
- ...props,
839
- ...getAnnotationProps({
840
- id: annotationId,
841
- label,
842
- evidence,
843
- kind: "element"
844
- })
845
- });
567
+ //#endregion
568
+ //#region src/annotations/AnnotationTarget.tsx
569
+ /** A stable feedback target for app-owned content outside the built-in widgets. */
570
+ function AnnotationTarget({ annotationId, label, evidence, ...props }) {
571
+ return /* @__PURE__ */ jsx("div", {
572
+ ...props,
573
+ ...getAnnotationProps({
574
+ id: annotationId,
575
+ label,
576
+ evidence,
577
+ kind: "element"
578
+ })
579
+ });
846
580
  }
847
- // packages/data-app-react/src/annotations/AnnotationBar.tsx
848
- import {
849
- useEffect as useEffect3,
850
- useEffectEvent,
851
- useRef as useRef2,
852
- useReducer,
853
- useImperativeHandle
854
- } from "react";
855
- import { createPortal } from "react-dom";
856
- import {
857
- autoUpdate,
858
- flip,
859
- offset,
860
- shift,
861
- useFloating,
862
- useMergeRefs
863
- } from "@floating-ui/react";
864
- import {
865
- GripVertical,
866
- Eye,
867
- EyeOff,
868
- Trash2,
869
- X,
870
- Minus,
871
- LoaderCircle
872
- } from "lucide-react";
873
- import {
874
- parseDataAppAnnotationDraft
875
- } from "@altertable/data-app/contract";
876
- import { jsx as jsx13, jsxs as jsxs8, Fragment as Fragment4 } from "react/jsx-runtime";
581
+ //#endregion
582
+ //#region src/annotations/AnnotationBar.tsx
877
583
  function annotationBarReducer(state, action) {
878
- switch (action.type) {
879
- case "positionMoved":
880
- return { ...state, position: action.position };
881
- case "reviewToggled":
882
- return { ...state, reviewOpen: !state.reviewOpen };
883
- case "reviewClosed":
884
- return { ...state, reviewOpen: false };
885
- case "previewOpened":
886
- return { ...state, previewId: action.id };
887
- case "previewClosed":
888
- return { ...state, previewId: undefined };
889
- case "discardDialogChanged":
890
- return { ...state, discardOpen: action.open };
891
- case "annotationsDiscarded":
892
- return { ...state, discardOpen: false, reviewOpen: false };
893
- case "submissionStarted":
894
- return { ...state, pending: true, error: "" };
895
- case "submissionAccepted":
896
- return { ...state, reviewOpen: false };
897
- case "submissionFailed":
898
- return { ...state, error: "Could not send annotations. Try again." };
899
- case "submissionFinished":
900
- return { ...state, pending: false };
901
- case "annotationModeObserved":
902
- return {
903
- ...state,
904
- observedActive: action.active,
905
- ...!action.active ? { reviewOpen: false, previewId: undefined } : {}
906
- };
907
- }
584
+ switch (action.type) {
585
+ case "positionMoved": return {
586
+ ...state,
587
+ position: action.position
588
+ };
589
+ case "reviewToggled": return {
590
+ ...state,
591
+ reviewOpen: !state.reviewOpen
592
+ };
593
+ case "reviewClosed": return {
594
+ ...state,
595
+ reviewOpen: false
596
+ };
597
+ case "previewOpened": return {
598
+ ...state,
599
+ previewId: action.id
600
+ };
601
+ case "previewClosed": return {
602
+ ...state,
603
+ previewId: void 0
604
+ };
605
+ case "discardDialogChanged": return {
606
+ ...state,
607
+ discardOpen: action.open
608
+ };
609
+ case "annotationsDiscarded": return {
610
+ ...state,
611
+ discardOpen: false,
612
+ reviewOpen: false
613
+ };
614
+ case "submissionStarted": return {
615
+ ...state,
616
+ pending: true,
617
+ error: ""
618
+ };
619
+ case "submissionAccepted": return {
620
+ ...state,
621
+ reviewOpen: false
622
+ };
623
+ case "submissionFailed": return {
624
+ ...state,
625
+ error: "Could not send annotations. Try again."
626
+ };
627
+ case "submissionFinished": return {
628
+ ...state,
629
+ pending: false
630
+ };
631
+ case "annotationModeObserved": return {
632
+ ...state,
633
+ observedActive: action.active,
634
+ ...!action.active ? {
635
+ reviewOpen: false,
636
+ previewId: void 0
637
+ } : {}
638
+ };
639
+ }
908
640
  }
909
- function AnnotationBar({
910
- ref,
911
- annotations,
912
- active = true,
913
- theme = "light",
914
- disabled = false,
915
- deletedAnnotationId,
916
- onUndoDelete,
917
- onDismissUndo,
918
- hasUnsavedChanges = false,
919
- pinsVisible,
920
- onPinsVisibleChange,
921
- onSelect,
922
- onDelete,
923
- onClear,
924
- requestDiscard,
925
- onSend,
926
- onClose
927
- }) {
928
- const reviewElement = useRef2(null);
929
- const reviewTrigger = useRef2(null);
930
- const cancelDiscard = useRef2(null);
931
- const barRef = useRef2(null);
932
- const drag = useRef2(undefined);
933
- const submitting = useRef2(false);
934
- const [state, dispatch] = useReducer(annotationBarReducer, {
935
- reviewOpen: false,
936
- pending: false,
937
- error: "",
938
- discardOpen: false,
939
- observedActive: active
940
- });
941
- const { position, reviewOpen, pending, error, discardOpen, previewId } = state;
942
- const preview = annotations.find((annotation) => annotation.id === previewId);
943
- const locked = disabled || pending;
944
- const canSend = active && !locked && !hasUnsavedChanges && annotations.length > 0;
945
- const { refs, floatingStyles } = useFloating({
946
- placement: "top",
947
- strategy: "fixed",
948
- middleware: [offset(10), flip(), shift({ padding: 12 })],
949
- whileElementsMounted: autoUpdate
950
- });
951
- const barElementRef = useMergeRefs([refs.setReference, barRef]);
952
- const reviewRef = useMergeRefs([refs.setFloating, reviewElement]);
953
- function move(left, top) {
954
- const rect = barRef.current?.getBoundingClientRect();
955
- if (!rect)
956
- return;
957
- dispatch({
958
- type: "positionMoved",
959
- position: {
960
- left: Math.max(12, Math.min(left, window.innerWidth - rect.width - 12)),
961
- top: Math.max(12, Math.min(top, window.innerHeight - rect.height - 12))
962
- }
963
- });
964
- }
965
- const keepInViewport = useEffectEvent(() => {
966
- if (position)
967
- move(position.left, position.top);
968
- });
969
- useEffect3(() => {
970
- window.addEventListener("resize", keepInViewport);
971
- return () => window.removeEventListener("resize", keepInViewport);
972
- }, []);
973
- useEffect3(() => {
974
- if (reviewOpen)
975
- reviewElement.current?.querySelector("button")?.focus();
976
- }, [reviewOpen]);
977
- if (state.observedActive !== active)
978
- dispatch({ type: "annotationModeObserved", active });
979
- function closeReview() {
980
- dispatch({ type: "reviewClosed" });
981
- reviewTrigger.current?.focus();
982
- }
983
- async function send() {
984
- if (submitting.current || !canSend)
985
- return;
986
- submitting.current = true;
987
- dispatch({ type: "submissionStarted" });
988
- try {
989
- const snapshot = annotations.map(parseDataAppAnnotationDraft);
990
- await onSend(snapshot);
991
- dispatch({ type: "submissionAccepted" });
992
- } catch {
993
- dispatch({ type: "submissionFailed" });
994
- } finally {
995
- submitting.current = false;
996
- dispatch({ type: "submissionFinished" });
997
- }
998
- }
999
- useImperativeHandle(ref, () => ({ send }));
1000
- useEffect3(() => {
1001
- if (discardOpen)
1002
- cancelDiscard.current?.focus();
1003
- }, [discardOpen]);
1004
- function discardAnnotations() {
1005
- dispatch({ type: "annotationsDiscarded" });
1006
- onClear();
1007
- onClose();
1008
- }
1009
- const undo = deletedAnnotationId && onUndoDelete ? /* @__PURE__ */ jsxs8("div", {
1010
- className: "altertable-annotation-undo",
1011
- "data-theme": theme,
1012
- "data-inline": active && reviewOpen && annotations.length > 0 || undefined,
1013
- "data-bar-visible": active && annotations.length > 0 || undefined,
1014
- children: [
1015
- /* @__PURE__ */ jsx13("output", {
1016
- children: "Annotation deleted"
1017
- }),
1018
- /* @__PURE__ */ jsx13(Button2, {
1019
- variant: "ghost",
1020
- onClick: () => onUndoDelete(deletedAnnotationId),
1021
- children: "Undo"
1022
- }),
1023
- onDismissUndo && /* @__PURE__ */ jsx13(Button2, {
1024
- variant: "ghost",
1025
- size: "icon-compact",
1026
- "aria-label": "Dismiss deleted annotation",
1027
- onClick: onDismissUndo,
1028
- children: /* @__PURE__ */ jsx13(X, {
1029
- size: 14,
1030
- "aria-hidden": true
1031
- })
1032
- })
1033
- ]
1034
- }) : null;
1035
- if (annotations.length === 0 && !deletedAnnotationId)
1036
- return null;
1037
- const style = position ? {
1038
- left: position.left,
1039
- top: position.top,
1040
- bottom: "auto",
1041
- transform: "none"
1042
- } : {};
1043
- return /* @__PURE__ */ jsxs8(TooltipProvider2, {
1044
- children: [
1045
- active && annotations.length > 0 && /* @__PURE__ */ jsxs8("div", {
1046
- ref: barElementRef,
1047
- className: "altertable-annotation-bar",
1048
- "data-theme": theme,
1049
- style,
1050
- tabIndex: -1,
1051
- role: "toolbar",
1052
- "aria-label": "Annotations",
1053
- onKeyDown: (event) => {
1054
- if (event.key !== "Escape" || locked || hasUnsavedChanges)
1055
- return;
1056
- event.preventDefault();
1057
- if (reviewOpen)
1058
- closeReview();
1059
- else
1060
- onClose();
1061
- },
1062
- children: [
1063
- /* @__PURE__ */ jsx13(Button2, {
1064
- variant: "ghost",
1065
- size: "icon-compact",
1066
- "aria-label": "Move annotation bar",
1067
- "data-atbl-internal-drag-handle": true,
1068
- disabled: locked,
1069
- onPointerDown: (event) => {
1070
- const rect = barRef.current?.getBoundingClientRect();
1071
- if (!rect)
1072
- return;
1073
- drag.current = {
1074
- x: event.clientX,
1075
- y: event.clientY,
1076
- left: rect.left,
1077
- top: rect.top
1078
- };
1079
- event.currentTarget.setPointerCapture(event.pointerId);
1080
- },
1081
- onPointerMove: (event) => {
1082
- const origin = drag.current;
1083
- if (origin)
1084
- move(origin.left + event.clientX - origin.x, origin.top + event.clientY - origin.y);
1085
- },
1086
- onPointerUp: () => {
1087
- drag.current = undefined;
1088
- },
1089
- onPointerCancel: () => {
1090
- drag.current = undefined;
1091
- },
1092
- onKeyDown: (event) => {
1093
- const delta = {
1094
- ArrowLeft: [-10, 0],
1095
- ArrowRight: [10, 0],
1096
- ArrowUp: [0, -10],
1097
- ArrowDown: [0, 10]
1098
- }[event.key];
1099
- const rect = barRef.current?.getBoundingClientRect();
1100
- if (!delta || !rect)
1101
- return;
1102
- event.preventDefault();
1103
- move(rect.left + delta[0], rect.top + delta[1]);
1104
- },
1105
- children: /* @__PURE__ */ jsx13(GripVertical, {
1106
- size: 16,
1107
- "aria-hidden": true
1108
- })
1109
- }),
1110
- /* @__PURE__ */ jsxs8(Button2, {
1111
- ref: reviewTrigger,
1112
- className: "altertable-annotation-bar-count",
1113
- variant: "ghost",
1114
- size: "compact",
1115
- "aria-label": "Review annotations",
1116
- "aria-expanded": reviewOpen && annotations.length > 0,
1117
- "aria-haspopup": "dialog",
1118
- disabled: locked || !annotations.length,
1119
- onClick: () => dispatch({ type: "reviewToggled" }),
1120
- children: [
1121
- "Annotating · ",
1122
- annotations.length
1123
- ]
1124
- }),
1125
- /* @__PURE__ */ jsx13(AnnotationTooltip, {
1126
- content: pinsVisible ? "Hide annotation pins" : "Show annotation pins",
1127
- theme,
1128
- children: /* @__PURE__ */ jsx13(Button2, {
1129
- variant: "ghost",
1130
- size: "icon-compact",
1131
- "aria-label": pinsVisible ? "Hide annotation pins" : "Show annotation pins",
1132
- "aria-pressed": !pinsVisible,
1133
- disabled: locked,
1134
- onClick: () => onPinsVisibleChange(!pinsVisible),
1135
- children: pinsVisible ? /* @__PURE__ */ jsx13(EyeOff, {
1136
- size: 16,
1137
- "aria-hidden": true
1138
- }) : /* @__PURE__ */ jsx13(Eye, {
1139
- size: 16,
1140
- "aria-hidden": true
1141
- })
1142
- })
1143
- }),
1144
- /* @__PURE__ */ jsx13(AnnotationTooltip, {
1145
- content: "Discard all annotations",
1146
- theme,
1147
- children: /* @__PURE__ */ jsx13(Button2, {
1148
- variant: "ghost",
1149
- size: "icon-compact",
1150
- "aria-label": "Discard all annotations",
1151
- disabled: locked,
1152
- onClick: () => requestDiscard ? requestDiscard(discardAnnotations) : dispatch({ type: "discardDialogChanged", open: true }),
1153
- children: /* @__PURE__ */ jsx13(Trash2, {
1154
- size: 16,
1155
- "aria-hidden": true
1156
- })
1157
- })
1158
- }),
1159
- /* @__PURE__ */ jsx13(AnnotationTooltip, {
1160
- content: hasUnsavedChanges ? "Save the open annotation before sending" : /* @__PURE__ */ jsxs8(Fragment4, {
1161
- children: [
1162
- "Send annotations ",
1163
- /* @__PURE__ */ jsx13(Kbd, {
1164
- shortcut: shortcuts.sendAnnotations
1165
- })
1166
- ]
1167
- }),
1168
- theme,
1169
- children: /* @__PURE__ */ jsxs8(Button2, {
1170
- className: "altertable-annotation-bar-send",
1171
- "data-pending": pending || undefined,
1172
- "aria-busy": pending,
1173
- size: "compact",
1174
- "aria-label": "Send annotations",
1175
- disabled: !canSend,
1176
- onClick: () => void send(),
1177
- children: [
1178
- /* @__PURE__ */ jsx13("span", {
1179
- className: "altertable-annotation-bar-send-label",
1180
- children: "Send"
1181
- }),
1182
- pending && /* @__PURE__ */ jsx13(LoaderCircle, {
1183
- className: "altertable-annotation-bar-spinner",
1184
- size: 16,
1185
- "aria-hidden": true
1186
- })
1187
- ]
1188
- })
1189
- }),
1190
- /* @__PURE__ */ jsx13(AnnotationTooltip, {
1191
- content: /* @__PURE__ */ jsxs8(Fragment4, {
1192
- children: [
1193
- hasUnsavedChanges ? "Save or discard the open annotation first" : "Exit annotation mode",
1194
- " ",
1195
- /* @__PURE__ */ jsx13(Kbd, {
1196
- children: "Esc"
1197
- })
1198
- ]
1199
- }),
1200
- theme,
1201
- children: /* @__PURE__ */ jsx13(Button2, {
1202
- variant: "ghost",
1203
- size: "icon-compact",
1204
- "aria-label": "Exit annotation mode",
1205
- disabled: locked || hasUnsavedChanges,
1206
- onClick: onClose,
1207
- children: /* @__PURE__ */ jsx13(X, {
1208
- size: 16,
1209
- "aria-hidden": true
1210
- })
1211
- })
1212
- }),
1213
- error && /* @__PURE__ */ jsx13("output", {
1214
- className: "altertable-annotation-bar-error",
1215
- role: "alert",
1216
- children: error
1217
- })
1218
- ]
1219
- }),
1220
- (!active || !reviewOpen || annotations.length === 0) && undo && createPortal(undo, document.body),
1221
- active && reviewOpen && annotations.length > 0 && createPortal(/* @__PURE__ */ jsxs8("dialog", {
1222
- open: true,
1223
- ref: reviewRef,
1224
- className: "altertable-annotation-bar-panel",
1225
- "data-theme": theme,
1226
- style: floatingStyles,
1227
- "aria-label": "Review annotations",
1228
- onKeyDown: (event) => {
1229
- if (event.key === "Escape") {
1230
- event.preventDefault();
1231
- closeReview();
1232
- }
1233
- },
1234
- children: [
1235
- /* @__PURE__ */ jsxs8("header", {
1236
- children: [
1237
- /* @__PURE__ */ jsx13("strong", {
1238
- children: "Annotations"
1239
- }),
1240
- /* @__PURE__ */ jsx13(Button2, {
1241
- variant: "ghost",
1242
- size: "icon-compact",
1243
- "aria-label": "Minimize annotation review",
1244
- onClick: closeReview,
1245
- children: /* @__PURE__ */ jsx13(Minus, {
1246
- size: 16,
1247
- "aria-hidden": true
1248
- })
1249
- })
1250
- ]
1251
- }),
1252
- /* @__PURE__ */ jsx13("div", {
1253
- "aria-label": "Annotation drafts",
1254
- children: annotations.map((annotation, index) => /* @__PURE__ */ jsxs8("div", {
1255
- className: "altertable-annotation-bar-row",
1256
- children: [
1257
- annotation.context.screenshot && /* @__PURE__ */ jsx13("button", {
1258
- "data-atbl-focus": "ring",
1259
- "data-atbl-control": "action",
1260
- type: "button",
1261
- className: "altertable-annotation-thumbnail",
1262
- "aria-label": `View screenshot of ${annotation.target.label}`,
1263
- onClick: () => dispatch({ type: "previewOpened", id: annotation.id }),
1264
- children: /* @__PURE__ */ jsx13("img", {
1265
- src: annotation.context.screenshot.dataUrl,
1266
- alt: ""
1267
- })
1268
- }),
1269
- /* @__PURE__ */ jsxs8(Button2, {
1270
- variant: "ghost",
1271
- className: "altertable-annotation-bar-open",
1272
- "aria-label": `Open annotation ${index + 1}`,
1273
- disabled: locked,
1274
- onClick: () => {
1275
- onPinsVisibleChange(true);
1276
- onSelect(annotation.id);
1277
- dispatch({ type: "reviewClosed" });
1278
- },
1279
- children: [
1280
- /* @__PURE__ */ jsx13("strong", {
1281
- children: annotation.target.label
1282
- }),
1283
- /* @__PURE__ */ jsx13("span", {
1284
- children: annotation.comment
1285
- })
1286
- ]
1287
- }),
1288
- /* @__PURE__ */ jsx13(Button2, {
1289
- variant: "ghost",
1290
- size: "icon-compact",
1291
- "aria-label": `Delete annotation ${index + 1}`,
1292
- disabled: locked,
1293
- onClick: () => onDelete(annotation.id),
1294
- children: /* @__PURE__ */ jsx13(Trash2, {
1295
- size: 16,
1296
- "aria-hidden": true
1297
- })
1298
- })
1299
- ]
1300
- }, annotation.id))
1301
- }),
1302
- undo
1303
- ]
1304
- }), document.body),
1305
- /* @__PURE__ */ jsx13(Sheet2, {
1306
- open: Boolean(preview),
1307
- onOpenChange: (open) => {
1308
- if (!open)
1309
- dispatch({ type: "previewClosed" });
1310
- },
1311
- placement: "center",
1312
- className: "altertable-annotation-image-dialog",
1313
- title: preview?.target.label ?? "Screenshot",
1314
- description: preview?.comment,
1315
- returnFocus: reviewTrigger,
1316
- children: preview?.context.screenshot && /* @__PURE__ */ jsx13("img", {
1317
- className: "altertable-annotation-preview",
1318
- src: preview.context.screenshot.dataUrl,
1319
- alt: `Captured area for ${preview.target.label}`
1320
- })
1321
- }),
1322
- !requestDiscard && /* @__PURE__ */ jsx13(Sheet2, {
1323
- open: discardOpen,
1324
- onOpenChange: (open) => dispatch({ type: "discardDialogChanged", open }),
1325
- placement: "center",
1326
- title: "Discard all pending annotations?",
1327
- returnFocus: barRef,
1328
- footer: /* @__PURE__ */ jsxs8(Fragment4, {
1329
- children: [
1330
- /* @__PURE__ */ jsx13(Button2, {
1331
- ref: cancelDiscard,
1332
- variant: "ghost",
1333
- onClick: () => dispatch({ type: "discardDialogChanged", open: false }),
1334
- children: "Cancel"
1335
- }),
1336
- /* @__PURE__ */ jsx13(Button2, {
1337
- className: "altertable-annotation-discard-confirm",
1338
- disabled: locked,
1339
- onClick: discardAnnotations,
1340
- children: "Discard"
1341
- })
1342
- ]
1343
- }),
1344
- children: /* @__PURE__ */ jsx13("p", {
1345
- className: "altertable-annotation-discard-description",
1346
- children: "These annotations will be removed and won’t be sent to the agent."
1347
- })
1348
- })
1349
- ]
1350
- });
641
+ /** Host-owned batch controls. Collection changes and agent submission stay with the outer app. */
642
+ function AnnotationBar({ ref, annotations, active = true, theme = "light", disabled = false, deletedAnnotationId, onUndoDelete, onDismissUndo, hasUnsavedChanges = false, pinsVisible, onPinsVisibleChange, onSelect, onDelete, onClear, requestDiscard, onSend, onClose }) {
643
+ const reviewElement = useRef(null);
644
+ const reviewTrigger = useRef(null);
645
+ const cancelDiscard = useRef(null);
646
+ const barRef = useRef(null);
647
+ const drag = useRef(void 0);
648
+ const submitting = useRef(false);
649
+ const [state, dispatch] = useReducer(annotationBarReducer, {
650
+ reviewOpen: false,
651
+ pending: false,
652
+ error: "",
653
+ discardOpen: false,
654
+ observedActive: active
655
+ });
656
+ const { position, reviewOpen, pending, error, discardOpen, previewId } = state;
657
+ const preview = annotations.find((annotation) => annotation.id === previewId);
658
+ const locked = disabled || pending;
659
+ const canSend = active && !locked && !hasUnsavedChanges && annotations.length > 0;
660
+ const { refs, floatingStyles } = useFloating({
661
+ placement: "top",
662
+ strategy: "fixed",
663
+ middleware: [
664
+ offset(10),
665
+ flip(),
666
+ shift({ padding: 12 })
667
+ ],
668
+ whileElementsMounted: autoUpdate
669
+ });
670
+ const barElementRef = useMergeRefs([refs.setReference, barRef]);
671
+ const reviewRef = useMergeRefs([refs.setFloating, reviewElement]);
672
+ function move(left, top) {
673
+ const rect = barRef.current?.getBoundingClientRect();
674
+ if (!rect) return;
675
+ dispatch({
676
+ type: "positionMoved",
677
+ position: {
678
+ left: Math.max(12, Math.min(left, window.innerWidth - rect.width - 12)),
679
+ top: Math.max(12, Math.min(top, window.innerHeight - rect.height - 12))
680
+ }
681
+ });
682
+ }
683
+ const keepInViewport = useEffectEvent(() => {
684
+ if (position) move(position.left, position.top);
685
+ });
686
+ useEffect(() => {
687
+ window.addEventListener("resize", keepInViewport);
688
+ return () => window.removeEventListener("resize", keepInViewport);
689
+ }, []);
690
+ useEffect(() => {
691
+ if (reviewOpen) reviewElement.current?.querySelector("button")?.focus();
692
+ }, [reviewOpen]);
693
+ if (state.observedActive !== active) dispatch({
694
+ type: "annotationModeObserved",
695
+ active
696
+ });
697
+ function closeReview() {
698
+ dispatch({ type: "reviewClosed" });
699
+ reviewTrigger.current?.focus();
700
+ }
701
+ async function send() {
702
+ if (submitting.current || !canSend) return;
703
+ submitting.current = true;
704
+ dispatch({ type: "submissionStarted" });
705
+ try {
706
+ await onSend(annotations.map(parseDataAppAnnotationDraft));
707
+ dispatch({ type: "submissionAccepted" });
708
+ } catch {
709
+ dispatch({ type: "submissionFailed" });
710
+ } finally {
711
+ submitting.current = false;
712
+ dispatch({ type: "submissionFinished" });
713
+ }
714
+ }
715
+ useImperativeHandle(ref, () => ({ send }));
716
+ useEffect(() => {
717
+ if (discardOpen) cancelDiscard.current?.focus();
718
+ }, [discardOpen]);
719
+ function discardAnnotations() {
720
+ dispatch({ type: "annotationsDiscarded" });
721
+ onClear();
722
+ onClose();
723
+ }
724
+ const undo = deletedAnnotationId && onUndoDelete ? /* @__PURE__ */ jsxs("div", {
725
+ className: "altertable-annotation-undo",
726
+ "data-theme": theme,
727
+ "data-inline": active && reviewOpen && annotations.length > 0 || void 0,
728
+ "data-bar-visible": active && annotations.length > 0 || void 0,
729
+ children: [
730
+ /* @__PURE__ */ jsx("output", { children: "Annotation deleted" }),
731
+ /* @__PURE__ */ jsx(Button, {
732
+ variant: "ghost",
733
+ onClick: () => onUndoDelete(deletedAnnotationId),
734
+ children: "Undo"
735
+ }),
736
+ onDismissUndo && /* @__PURE__ */ jsx(Button, {
737
+ variant: "ghost",
738
+ size: "icon-compact",
739
+ "aria-label": "Dismiss deleted annotation",
740
+ onClick: onDismissUndo,
741
+ children: /* @__PURE__ */ jsx(X, {
742
+ size: 14,
743
+ "aria-hidden": true
744
+ })
745
+ })
746
+ ]
747
+ }) : null;
748
+ if (annotations.length === 0 && !deletedAnnotationId) return null;
749
+ const style = position ? {
750
+ left: position.left,
751
+ top: position.top,
752
+ bottom: "auto",
753
+ transform: "none"
754
+ } : {};
755
+ return /* @__PURE__ */ jsxs(TooltipProvider, { children: [
756
+ active && annotations.length > 0 && /* @__PURE__ */ jsxs("div", {
757
+ ref: barElementRef,
758
+ className: "altertable-annotation-bar",
759
+ "data-theme": theme,
760
+ style,
761
+ tabIndex: -1,
762
+ role: "toolbar",
763
+ "aria-label": "Annotations",
764
+ onKeyDown: (event) => {
765
+ if (event.key !== "Escape" || locked || hasUnsavedChanges) return;
766
+ event.preventDefault();
767
+ if (reviewOpen) closeReview();
768
+ else onClose();
769
+ },
770
+ children: [
771
+ /* @__PURE__ */ jsx(Button, {
772
+ variant: "ghost",
773
+ size: "icon-compact",
774
+ "aria-label": "Move annotation bar",
775
+ "data-atbl-internal-drag-handle": true,
776
+ disabled: locked,
777
+ onPointerDown: (event) => {
778
+ const rect = barRef.current?.getBoundingClientRect();
779
+ if (!rect) return;
780
+ drag.current = {
781
+ x: event.clientX,
782
+ y: event.clientY,
783
+ left: rect.left,
784
+ top: rect.top
785
+ };
786
+ event.currentTarget.setPointerCapture(event.pointerId);
787
+ },
788
+ onPointerMove: (event) => {
789
+ const origin = drag.current;
790
+ if (origin) move(origin.left + event.clientX - origin.x, origin.top + event.clientY - origin.y);
791
+ },
792
+ onPointerUp: () => {
793
+ drag.current = void 0;
794
+ },
795
+ onPointerCancel: () => {
796
+ drag.current = void 0;
797
+ },
798
+ onKeyDown: (event) => {
799
+ const delta = {
800
+ ArrowLeft: [-10, 0],
801
+ ArrowRight: [10, 0],
802
+ ArrowUp: [0, -10],
803
+ ArrowDown: [0, 10]
804
+ }[event.key];
805
+ const rect = barRef.current?.getBoundingClientRect();
806
+ if (!delta || !rect) return;
807
+ event.preventDefault();
808
+ move(rect.left + delta[0], rect.top + delta[1]);
809
+ },
810
+ children: /* @__PURE__ */ jsx(GripVertical, {
811
+ size: 16,
812
+ "aria-hidden": true
813
+ })
814
+ }),
815
+ /* @__PURE__ */ jsxs(Button, {
816
+ ref: reviewTrigger,
817
+ className: "altertable-annotation-bar-count",
818
+ variant: "ghost",
819
+ size: "compact",
820
+ "aria-label": "Review annotations",
821
+ "aria-expanded": reviewOpen && annotations.length > 0,
822
+ "aria-haspopup": "dialog",
823
+ disabled: locked || !annotations.length,
824
+ onClick: () => dispatch({ type: "reviewToggled" }),
825
+ children: ["Annotating · ", annotations.length]
826
+ }),
827
+ /* @__PURE__ */ jsx(AnnotationTooltip, {
828
+ content: pinsVisible ? "Hide annotation pins" : "Show annotation pins",
829
+ theme,
830
+ children: /* @__PURE__ */ jsx(Button, {
831
+ variant: "ghost",
832
+ size: "icon-compact",
833
+ "aria-label": pinsVisible ? "Hide annotation pins" : "Show annotation pins",
834
+ "aria-pressed": !pinsVisible,
835
+ disabled: locked,
836
+ onClick: () => onPinsVisibleChange(!pinsVisible),
837
+ children: pinsVisible ? /* @__PURE__ */ jsx(EyeOff, {
838
+ size: 16,
839
+ "aria-hidden": true
840
+ }) : /* @__PURE__ */ jsx(Eye, {
841
+ size: 16,
842
+ "aria-hidden": true
843
+ })
844
+ })
845
+ }),
846
+ /* @__PURE__ */ jsx(AnnotationTooltip, {
847
+ content: "Discard all annotations",
848
+ theme,
849
+ children: /* @__PURE__ */ jsx(Button, {
850
+ variant: "ghost",
851
+ size: "icon-compact",
852
+ "aria-label": "Discard all annotations",
853
+ disabled: locked,
854
+ onClick: () => requestDiscard ? requestDiscard(discardAnnotations) : dispatch({
855
+ type: "discardDialogChanged",
856
+ open: true
857
+ }),
858
+ children: /* @__PURE__ */ jsx(Trash2, {
859
+ size: 16,
860
+ "aria-hidden": true
861
+ })
862
+ })
863
+ }),
864
+ /* @__PURE__ */ jsx(AnnotationTooltip, {
865
+ content: hasUnsavedChanges ? "Save the open annotation before sending" : /* @__PURE__ */ jsxs(Fragment$1, { children: ["Send annotations ", /* @__PURE__ */ jsx(Kbd, { shortcut: shortcuts.sendAnnotations })] }),
866
+ theme,
867
+ children: /* @__PURE__ */ jsxs(Button, {
868
+ className: "altertable-annotation-bar-send",
869
+ "data-pending": pending || void 0,
870
+ "aria-busy": pending,
871
+ size: "compact",
872
+ "aria-label": "Send annotations",
873
+ disabled: !canSend,
874
+ onClick: () => void send(),
875
+ children: [/* @__PURE__ */ jsx("span", {
876
+ className: "altertable-annotation-bar-send-label",
877
+ children: "Send"
878
+ }), pending && /* @__PURE__ */ jsx(LoaderCircle, {
879
+ className: "altertable-annotation-bar-spinner",
880
+ size: 16,
881
+ "aria-hidden": true
882
+ })]
883
+ })
884
+ }),
885
+ /* @__PURE__ */ jsx(AnnotationTooltip, {
886
+ content: /* @__PURE__ */ jsxs(Fragment$1, { children: [
887
+ hasUnsavedChanges ? "Save or discard the open annotation first" : "Exit annotation mode",
888
+ " ",
889
+ /* @__PURE__ */ jsx(Kbd, { children: "Esc" })
890
+ ] }),
891
+ theme,
892
+ children: /* @__PURE__ */ jsx(Button, {
893
+ variant: "ghost",
894
+ size: "icon-compact",
895
+ "aria-label": "Exit annotation mode",
896
+ disabled: locked || hasUnsavedChanges,
897
+ onClick: onClose,
898
+ children: /* @__PURE__ */ jsx(X, {
899
+ size: 16,
900
+ "aria-hidden": true
901
+ })
902
+ })
903
+ }),
904
+ error && /* @__PURE__ */ jsx("output", {
905
+ className: "altertable-annotation-bar-error",
906
+ role: "alert",
907
+ children: error
908
+ })
909
+ ]
910
+ }),
911
+ (!active || !reviewOpen || annotations.length === 0) && undo && createPortal(undo, document.body),
912
+ active && reviewOpen && annotations.length > 0 && createPortal(/* @__PURE__ */ jsxs("dialog", {
913
+ open: true,
914
+ ref: reviewRef,
915
+ className: "altertable-annotation-bar-panel",
916
+ "data-theme": theme,
917
+ style: floatingStyles,
918
+ "aria-label": "Review annotations",
919
+ onKeyDown: (event) => {
920
+ if (event.key === "Escape") {
921
+ event.preventDefault();
922
+ closeReview();
923
+ }
924
+ },
925
+ children: [
926
+ /* @__PURE__ */ jsxs("header", { children: [/* @__PURE__ */ jsx("strong", { children: "Annotations" }), /* @__PURE__ */ jsx(Button, {
927
+ variant: "ghost",
928
+ size: "icon-compact",
929
+ "aria-label": "Minimize annotation review",
930
+ onClick: closeReview,
931
+ children: /* @__PURE__ */ jsx(Minus, {
932
+ size: 16,
933
+ "aria-hidden": true
934
+ })
935
+ })] }),
936
+ /* @__PURE__ */ jsx("div", {
937
+ "aria-label": "Annotation drafts",
938
+ children: annotations.map((annotation, index) => /* @__PURE__ */ jsxs("div", {
939
+ className: "altertable-annotation-bar-row",
940
+ children: [
941
+ annotation.context.screenshot && /* @__PURE__ */ jsx("button", {
942
+ "data-atbl-focus": "ring",
943
+ "data-atbl-control": "action",
944
+ type: "button",
945
+ className: "altertable-annotation-thumbnail",
946
+ "aria-label": `View screenshot of ${annotation.target.label}`,
947
+ onClick: () => dispatch({
948
+ type: "previewOpened",
949
+ id: annotation.id
950
+ }),
951
+ children: /* @__PURE__ */ jsx("img", {
952
+ src: annotation.context.screenshot.dataUrl,
953
+ alt: ""
954
+ })
955
+ }),
956
+ /* @__PURE__ */ jsxs(Button, {
957
+ variant: "ghost",
958
+ className: "altertable-annotation-bar-open",
959
+ "aria-label": `Open annotation ${index + 1}`,
960
+ disabled: locked,
961
+ onClick: () => {
962
+ onPinsVisibleChange(true);
963
+ onSelect(annotation.id);
964
+ dispatch({ type: "reviewClosed" });
965
+ },
966
+ children: [/* @__PURE__ */ jsx("strong", { children: annotation.target.label }), /* @__PURE__ */ jsx("span", { children: annotation.comment })]
967
+ }),
968
+ /* @__PURE__ */ jsx(Button, {
969
+ variant: "ghost",
970
+ size: "icon-compact",
971
+ "aria-label": `Delete annotation ${index + 1}`,
972
+ disabled: locked,
973
+ onClick: () => onDelete(annotation.id),
974
+ children: /* @__PURE__ */ jsx(Trash2, {
975
+ size: 16,
976
+ "aria-hidden": true
977
+ })
978
+ })
979
+ ]
980
+ }, annotation.id))
981
+ }),
982
+ undo
983
+ ]
984
+ }), document.body),
985
+ /* @__PURE__ */ jsx(Sheet, {
986
+ open: Boolean(preview),
987
+ onOpenChange: (open) => {
988
+ if (!open) dispatch({ type: "previewClosed" });
989
+ },
990
+ placement: "center",
991
+ className: "altertable-annotation-image-dialog",
992
+ title: preview?.target.label ?? "Screenshot",
993
+ description: preview?.comment,
994
+ returnFocus: reviewTrigger,
995
+ children: preview?.context.screenshot && /* @__PURE__ */ jsx("img", {
996
+ className: "altertable-annotation-preview",
997
+ src: preview.context.screenshot.dataUrl,
998
+ alt: `Captured area for ${preview.target.label}`
999
+ })
1000
+ }),
1001
+ !requestDiscard && /* @__PURE__ */ jsx(Sheet, {
1002
+ open: discardOpen,
1003
+ onOpenChange: (open) => dispatch({
1004
+ type: "discardDialogChanged",
1005
+ open
1006
+ }),
1007
+ placement: "center",
1008
+ title: "Discard all pending annotations?",
1009
+ returnFocus: barRef,
1010
+ footer: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
1011
+ ref: cancelDiscard,
1012
+ variant: "ghost",
1013
+ onClick: () => dispatch({
1014
+ type: "discardDialogChanged",
1015
+ open: false
1016
+ }),
1017
+ children: "Cancel"
1018
+ }), /* @__PURE__ */ jsx(Button, {
1019
+ className: "altertable-annotation-discard-confirm",
1020
+ disabled: locked,
1021
+ onClick: discardAnnotations,
1022
+ children: "Discard"
1023
+ })] }),
1024
+ children: /* @__PURE__ */ jsx("p", {
1025
+ className: "altertable-annotation-discard-description",
1026
+ children: "These annotations will be removed and won’t be sent to the agent."
1027
+ })
1028
+ })
1029
+ ] });
1351
1030
  }
1352
- // packages/data-app-react/src/annotations/styles.ts
1031
+ //#endregion
1032
+ //#region src/annotations/styles.ts
1033
+ /** Install only the outer-frame annotation controls; leave host page typography and layout intact. */
1353
1034
  function injectDataAppAnnotationStyles(options = {}) {
1354
- return injectStyles({
1355
- name: "injectDataAppAnnotationStyles",
1356
- attribute: "data-altertable-annotation-styles",
1357
- css: `/* packages/data-app-react/src/tokens.css */
1358
- @layer atbl.tokens {
1359
- :root {
1360
- --atbl-background: var(--atbl-palette-background);
1361
- --atbl-surface: var(--atbl-palette-surface);
1362
- --atbl-subtle: var(--atbl-palette-subtle);
1363
- --atbl-backdrop: #0f171e38;
1364
- --atbl-text: var(--atbl-palette-text);
1365
- --atbl-muted: var(--atbl-palette-muted);
1366
- --atbl-border: var(--atbl-palette-border);
1367
- --atbl-accent: var(--atbl-palette-accent);
1368
- --atbl-on-accent: var(--atbl-palette-on-accent);
1369
- --atbl-positive: var(--atbl-palette-positive);
1370
- --atbl-danger: var(--atbl-palette-danger);
1371
- --atbl-code-surface: #f4f6f9;
1372
- --atbl-code-text: #273242;
1373
- --atbl-mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
1374
- --atbl-focus-ring-offset: 2px;
1375
- --atbl-focus-ring-inset: -1px;
1376
- --atbl-font: var(--atbl-input-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, ui-sans-serif, sans-serif);
1377
- --atbl-space-xs: 5px;
1378
- --atbl-space-sm: 10px;
1379
- --atbl-space-md: 16px;
1380
- --atbl-space-lg: 24px;
1381
- --atbl-space-xl: 32px;
1382
- --atbl-content-width: 1920px;
1383
- --atbl-control-height: 2.375rem;
1384
- --atbl-control-compact-height: 1.875rem;
1385
- --atbl-control-icon-size: 1rem;
1386
- --atbl-control-padding-inline: .75rem;
1387
- --atbl-control-padding-block: .375rem;
1388
- --atbl-control-gap: .5rem;
1389
- --atbl-control-disabled-opacity: .5;
1390
- --atbl-dropdown-padding: calc(var(--atbl-control-padding-block) * 2 / 3);
1391
- --atbl-dropdown-item-padding-block: var(--atbl-control-padding-block);
1392
- --atbl-dropdown-item-padding-inline: calc(var(--atbl-control-padding-inline) * 3 / 4);
1393
- --atbl-dropdown-item-gap: 2px;
1394
- --atbl-radius-control: 7px;
1395
- --atbl-radius-surface: 12px;
1396
- --atbl-radius-overlay: 16px;
1397
- --atbl-shadow-surface: 0 3px 16px #141c280d;
1398
- --atbl-shadow-overlay: 0 18px 50px #00000029;
1399
- --atbl-shadow-control: 0 1px 3px #0000001a;
1400
- --atbl-cursor-action: pointer;
1401
- --atbl-cursor-disabled: default;
1402
- --atbl-cursor-help: help;
1403
- --atbl-cursor-busy: progress;
1404
- --atbl-duration-fast: .12s;
1405
- --atbl-duration-normal: .18s;
1406
- --atbl-duration-slow: .24s;
1407
- --atbl-ease-standard: ease;
1408
- --atbl-ease-enter: cubic-bezier(.2, .7, .2, 1);
1409
- --atbl-chart-1: color-mix(in srgb, var(--atbl-input-chart-1, #285fc0) var(--atbl-chart-strength), white);
1410
- --atbl-chart-2: color-mix(in srgb, var(--atbl-input-chart-2, #a95319) var(--atbl-chart-strength), white);
1411
- --atbl-chart-3: color-mix(in srgb, var(--atbl-input-chart-3, #147862) var(--atbl-chart-strength), white);
1412
- --atbl-chart-4: color-mix(in srgb, var(--atbl-input-chart-4, #7243aa) var(--atbl-chart-strength), white);
1413
- --atbl-chart-5: color-mix(in srgb, var(--atbl-input-chart-5, #aa3958) var(--atbl-chart-strength), white);
1414
- --atbl-chart-6: color-mix(in srgb, var(--atbl-input-chart-6, #475569) var(--atbl-chart-strength), white);
1415
- --atbl-chart-7: color-mix(in srgb, var(--atbl-input-chart-7, #285fc0) var(--atbl-chart-strength), white);
1416
- --atbl-chart-8: color-mix(in srgb, var(--atbl-input-chart-8, #a95319) var(--atbl-chart-strength), white);
1417
- --atbl-type-emphasis-weight: 680;
1418
- --atbl-type-meta-weight: 500;
1419
- --atbl-type-page-size: clamp(1.375rem, 2.4vw, 1.75rem);
1420
- --atbl-type-section-size: 1.25rem;
1421
- --atbl-type-widget-size: var(--atbl-type-label-size);
1422
- --atbl-type-body-size: .875rem;
1423
- --atbl-type-label-size: .8125rem;
1424
- --atbl-type-meta-size: .75rem;
1425
- --atbl-type-metric-size: clamp(1.625rem, 3vw, 2.125rem);
1426
- --atbl-type-heading-weight: 650;
1427
- --atbl-type-label-weight: 600;
1428
- --atbl-type-body-leading: 1.65;
1429
- --atbl-type-label-leading: 1.4;
1430
- --atbl-type-heading-leading: 1.3;
1431
- --atbl-type-metric-leading: 1.08;
1432
- --atbl-text-measure: 70ch;
1433
- }
1434
- }
1435
-
1436
- /* packages/data-app-react/src/appearance.css */
1437
- @layer atbl.tokens {
1438
- :root {
1439
- --atbl-palette-background: #fff;
1440
- --atbl-palette-surface: #fff;
1441
- --atbl-palette-subtle: #f6f7f7;
1442
- --atbl-palette-text: #202124;
1443
- --atbl-palette-muted: #687078;
1444
- --atbl-palette-border: #e3e6e8;
1445
- --atbl-palette-accent: var(--atbl-input-accent, var(--atbl-text));
1446
- --atbl-palette-on-accent: var(--atbl-input-on-accent, #fff);
1447
- --atbl-palette-positive: #147862;
1448
- --atbl-palette-danger: #b42318;
1449
- --atbl-chart-strength: 100%;
1450
- --atbl-accent-subtle-strength: 12%;
1451
- }
1452
-
1453
- :root[data-atbl-theme="dark"] {
1454
- --atbl-palette-background: #151719;
1455
- --atbl-palette-surface: #202326;
1456
- --atbl-palette-subtle: #292d31;
1457
- --atbl-palette-text: #f2f3f4;
1458
- --atbl-palette-muted: #aeb5bc;
1459
- --atbl-palette-border: #3b4248;
1460
- }
1461
-
1462
- :root[data-atbl-base-color="slate"] {
1463
- --atbl-palette-background: #f8fafc;
1464
- --atbl-palette-surface: #fff;
1465
- --atbl-palette-subtle: #f1f5f9;
1466
- --atbl-palette-text: #17212f;
1467
- --atbl-palette-muted: #607083;
1468
- --atbl-palette-border: #dce3ea;
1469
- }
1470
-
1471
- :root[data-atbl-base-color="slate"][data-atbl-theme="dark"] {
1472
- --atbl-palette-background: #111820;
1473
- --atbl-palette-surface: #1b2530;
1474
- --atbl-palette-subtle: #263340;
1475
- --atbl-palette-text: #f0f4f8;
1476
- --atbl-palette-muted: #a8b5c3;
1477
- --atbl-palette-border: #3a4857;
1478
- }
1479
-
1480
- :root[data-atbl-base-color="warm"] {
1481
- --atbl-palette-background: #fbfaf8;
1482
- --atbl-palette-surface: #fff;
1483
- --atbl-palette-subtle: #f5f2ed;
1484
- --atbl-palette-text: #292723;
1485
- --atbl-palette-muted: #736e66;
1486
- --atbl-palette-border: #e8e2da;
1487
- }
1488
-
1489
- :root[data-atbl-base-color="warm"][data-atbl-theme="dark"] {
1490
- --atbl-palette-background: #1b1916;
1491
- --atbl-palette-surface: #25221e;
1492
- --atbl-palette-subtle: #302c27;
1493
- --atbl-palette-text: #f5f1eb;
1494
- --atbl-palette-muted: #bcb3a8;
1495
- --atbl-palette-border: #494239;
1496
- }
1497
-
1498
- :root[data-atbl-theme="dark"] {
1499
- --atbl-palette-accent: var(--atbl-input-dark-accent, var(--atbl-text));
1500
- --atbl-accent-subtle-strength: 22%;
1501
- --atbl-palette-on-accent: var(--atbl-input-on-accent, var(--atbl-background));
1502
- --atbl-palette-positive: #6bc39a;
1503
- --atbl-palette-danger: #f97066;
1504
- --atbl-backdrop: #0000008c;
1505
- --atbl-code-surface: #242a31;
1506
- --atbl-code-text: #e5e9ef;
1507
- --atbl-chart-strength: 60%;
1508
- }
1509
-
1510
- :root[data-atbl-density="compact"] {
1511
- --atbl-control-height: 2.125rem;
1512
- --atbl-control-compact-height: 1.625rem;
1513
- --atbl-control-gap: .375rem;
1514
- --atbl-control-padding-inline: .625rem;
1515
- --atbl-control-padding-block: .25rem;
1516
- --atbl-space-xs: 4px;
1517
- --atbl-space-sm: 8px;
1518
- --atbl-space-md: 12px;
1519
- --atbl-space-lg: 18px;
1520
- --atbl-space-xl: 24px;
1521
- }
1522
-
1523
- :root[data-atbl-density="spacious"] {
1524
- --atbl-control-height: 2.625rem;
1525
- --atbl-control-compact-height: 2.125rem;
1526
- --atbl-control-gap: .625rem;
1527
- --atbl-control-padding-inline: 1rem;
1528
- --atbl-control-padding-block: .5rem;
1529
- --atbl-space-xs: 6px;
1530
- --atbl-space-sm: 12px;
1531
- --atbl-space-md: 20px;
1532
- --atbl-space-lg: 30px;
1533
- --atbl-space-xl: 40px;
1534
- }
1535
-
1536
- :root[data-atbl-radius="none"] {
1537
- --atbl-radius-control: 0px;
1538
- --atbl-radius-surface: 0px;
1539
- --atbl-radius-overlay: 0px;
1540
- }
1541
-
1542
- :root[data-atbl-radius="small"] {
1543
- --atbl-radius-control: 4px;
1544
- --atbl-radius-surface: 7px;
1545
- --atbl-radius-overlay: 9px;
1546
- }
1547
-
1548
- :root[data-atbl-radius="large"] {
1549
- --atbl-radius-control: 10px;
1550
- --atbl-radius-surface: 18px;
1551
- --atbl-radius-overlay: 24px;
1552
- }
1553
-
1554
- :root[data-atbl-elevation="flat"] {
1555
- --atbl-shadow-surface: none;
1556
- --atbl-shadow-overlay: none;
1557
- --atbl-shadow-control: none;
1558
- }
1559
-
1560
- :root[data-atbl-elevation="raised"] {
1561
- --atbl-shadow-surface: 0 8px 28px #141c281a;
1562
- --atbl-shadow-overlay: 0 24px 72px #0000003d;
1563
- --atbl-shadow-control: 0 2px 6px #00000029;
1564
- }
1565
-
1566
- @media (forced-colors: active) {
1567
- :root {
1568
- --atbl-focus-color: Highlight !important;
1569
- --atbl-on-accent: HighlightText !important;
1570
- }
1571
- }
1572
- }
1573
-
1574
- /* packages/data-app-react/src/base.css */
1575
- @layer atbl.base {
1576
- :where([class^="altertable-"], [class*=" altertable-"]) {
1577
- box-sizing: border-box;
1578
- }
1579
-
1580
- :where([class^="altertable-"], [class*=" altertable-"]) * {
1581
- box-sizing: border-box;
1582
- }
1583
-
1584
- :where([class^="starter-"], [class*=" starter-"]) * {
1585
- box-sizing: border-box;
1586
- }
1587
-
1588
- :where([class^="altertable-"], [class*=" altertable-"]) button {
1589
- font: inherit;
1590
- }
1591
-
1592
- :root[data-atbl-appearance] {
1593
- scrollbar-gutter: stable;
1594
- font-family: var(--atbl-font);
1595
- color: var(--atbl-text);
1596
- background: var(--atbl-background);
1597
- font-synthesis: none;
1598
- -webkit-font-smoothing: antialiased;
1599
- text-rendering: optimizeLegibility;
1600
- }
1601
-
1602
- :root[data-atbl-theme="light"] {
1603
- --buncss-light: initial;
1604
- --buncss-dark: ;
1605
- color-scheme: light;
1606
- }
1607
-
1608
- :root[data-atbl-theme="dark"] {
1609
- --buncss-light: ;
1610
- --buncss-dark: initial;
1611
- color-scheme: dark;
1612
- }
1613
-
1614
- :root[data-atbl-appearance] body, :root[data-atbl-appearance] #root {
1615
- margin: 0;
1616
- }
1617
-
1618
- .altertable-sr-only {
1619
- position: fixed;
1620
- overflow: hidden;
1621
- clip: rect(0, 0, 0, 0);
1622
- clip-path: inset(50%);
1623
- white-space: nowrap;
1624
- border: 0;
1625
- width: 1px;
1626
- height: 1px;
1627
- margin: -1px;
1628
- padding: 0;
1629
- }
1630
- }
1631
-
1632
- /* packages/data-app-react/src/annotations/colors.css */
1633
- @layer atbl.components {
1634
- :root {
1635
- --atbl-annotation-accent: #c026d3;
1636
- --atbl-annotation-accent-hover: #a21caf;
1637
- --atbl-annotation-on-accent: #fff;
1638
- }
1639
-
1640
- .altertable-annotation-trigger, .altertable-annotation-composer {
1641
- --atbl-control-selected-surface: var(--atbl-annotation-accent);
1642
- --atbl-control-selected-text: var(--atbl-annotation-on-accent);
1643
- --atbl-focus-outline: 2px solid var(--atbl-annotation-accent);
1644
- }
1645
-
1646
- .altertable-annotation-trigger[aria-pressed="true"], .altertable-annotation-trigger:not([aria-pressed]) {
1647
- background: var(--atbl-annotation-accent);
1648
- color: var(--atbl-annotation-on-accent);
1649
- border-color: #0000;
1650
- }
1651
-
1652
- .altertable-annotation-trigger[aria-pressed="true"]:hover:not(:disabled) {
1653
- --atbl-control-selected-surface: var(--atbl-annotation-accent-hover);
1654
- }
1655
-
1656
- .altertable-annotation-trigger:not([aria-pressed]) {
1657
- --atbl-control-hover-surface: var(--atbl-annotation-accent-hover);
1658
- --atbl-control-pressed-surface: var(--atbl-annotation-accent-hover);
1659
- }
1660
- }
1661
-
1662
- /* packages/data-app-react/src/ui/Button.css */
1663
- @layer atbl.components {
1664
- .altertable-button {
1665
- display: inline-flex;
1666
- justify-content: center;
1667
- align-items: center;
1668
- gap: var(--atbl-control-gap);
1669
- min-height: var(--atbl-control-height);
1670
- padding: var(--atbl-control-padding-block) var(--atbl-control-padding-inline);
1671
- border: 1px solid var(--atbl-border);
1672
- border-radius: var(--atbl-radius-control);
1673
- background: var(--atbl-surface);
1674
- color: var(--atbl-text);
1675
- font: inherit;
1676
- font-size: var(--atbl-type-label-size);
1677
- font-weight: var(--atbl-type-label-weight);
1678
- line-height: var(--atbl-type-label-leading);
1679
- overflow-wrap: anywhere;
1680
- transition: background-color var(--atbl-duration-fast) var(--atbl-ease-standard), border-color var(--atbl-duration-fast) var(--atbl-ease-standard), color var(--atbl-duration-fast) var(--atbl-ease-standard);
1681
- -webkit-tap-highlight-color: transparent;
1682
- max-inline-size: 100%;
1683
- }
1684
-
1685
- .altertable-button[data-size="icon"] {
1686
- width: var(--atbl-control-height);
1687
- min-width: var(--atbl-control-height);
1688
- height: var(--atbl-control-height);
1689
- min-height: var(--atbl-control-height);
1690
- flex: none;
1691
- padding: 0;
1692
- }
1693
-
1694
- .altertable-button[data-variant="primary"] {
1695
- border-color: var(--atbl-text);
1696
- background: var(--atbl-text);
1697
- color: var(--atbl-background);
1698
- --atbl-control-hover-surface: color-mix(in srgb, var(--atbl-text) 92%, var(--atbl-background));
1699
- --atbl-control-pressed-surface: color-mix(in srgb, var(--atbl-text) 84%, var(--atbl-background));
1700
- }
1701
-
1702
- .altertable-button[data-variant="outline"] {
1703
- box-shadow: none;
1704
- }
1705
-
1706
- .altertable-button[data-variant="elevated"] {
1707
- box-shadow: var(--atbl-shadow-surface);
1708
- }
1709
-
1710
- .altertable-button[data-variant="ghost"] {
1711
- box-shadow: none;
1712
- background: none;
1713
- border-color: #0000;
1714
- }
1715
-
1716
- @media (prefers-reduced-motion: reduce) {
1717
- .altertable-button {
1718
- transition: none;
1719
- }
1720
- }
1721
-
1722
- .altertable-button[data-size="compact"] {
1723
- min-height: var(--atbl-control-compact-height);
1724
- padding: calc(var(--atbl-control-padding-block) * 2 / 3) calc(var(--atbl-control-padding-inline) * 2 / 3);
1725
- font-size: var(--atbl-type-meta-size);
1726
- }
1727
-
1728
- .altertable-button[data-size="icon-compact"] {
1729
- width: var(--atbl-control-compact-height);
1730
- min-width: var(--atbl-control-compact-height);
1731
- height: var(--atbl-control-compact-height);
1732
- min-height: var(--atbl-control-compact-height);
1733
- flex: none;
1734
- padding: 0;
1735
- }
1736
-
1737
- .altertable-button[data-size^="icon"] > svg {
1738
- inline-size: var(--atbl-control-icon-size);
1739
- block-size: var(--atbl-control-icon-size);
1740
- }
1741
-
1742
- .altertable-button[data-variant="inline"] {
1743
- --atbl-control-hover-surface: transparent;
1744
- --atbl-control-pressed-surface: transparent;
1745
- --atbl-control-open-surface: transparent;
1746
- box-shadow: none;
1747
- font: inherit;
1748
- text-underline-offset: .2em;
1749
- background: none;
1750
- border: 0;
1751
- border-radius: 0;
1752
- min-height: 0;
1753
- padding: 0;
1754
- }
1755
-
1756
- .altertable-button[data-variant="inline"]:-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, [data-disabled])) {
1757
- text-decoration: underline;
1758
- }
1759
-
1760
- .altertable-button[data-variant="inline"]:-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, [data-disabled])) {
1761
- text-decoration: underline;
1762
- }
1763
-
1764
- .altertable-button[data-variant="inline"]:is(:hover, [data-hovered]):not(:is(:disabled, [data-disabled])) {
1765
- text-decoration: underline;
1766
- }
1767
- }
1768
-
1769
- /* packages/data-app-react/src/ui/Tooltip.css */
1770
- @layer atbl.components {
1771
- .altertable-tooltip-trigger {
1772
- display: inline-flex;
1773
- align-items: center;
1774
- }
1775
-
1776
- .altertable-tooltip-trigger[data-variant="chart"] {
1777
- display: flex;
1778
- align-items: flex-end;
1779
- width: 100%;
1780
- min-width: 0;
1781
- height: 100%;
1782
- }
1783
-
1784
- .altertable-tooltip-content {
1785
- z-index: 1300;
1786
- border: 1px solid var(--atbl-border);
1787
- border-radius: var(--atbl-radius-control);
1788
- background: var(--atbl-surface);
1789
- color: var(--atbl-text);
1790
- box-shadow: var(--atbl-shadow-overlay);
1791
- font: var(--atbl-type-meta-weight) var(--atbl-type-meta-size) / var(--atbl-type-label-leading) var(--atbl-font);
1792
- white-space: normal;
1793
- pointer-events: none;
1794
- animation: altertable-tooltip-in var(--atbl-duration-fast) ease-out;
1795
- width: max-content;
1796
- max-width: min(240px, 100vw - 24px);
1797
- padding: 6px 9px;
1798
- }
1799
-
1800
- .altertable-tooltip-content[data-variant="chart"] {
1801
- display: grid;
1802
- font-variant-numeric: tabular-nums;
1803
- gap: 2px;
1804
- padding: 8px 10px;
1805
- }
1806
-
1807
- .altertable-tooltip-content[data-variant="chart"] strong {
1808
- font-size: var(--atbl-type-body-size);
1809
- font-weight: 650;
1810
- line-height: 1.2;
1811
- }
1812
-
1813
- @keyframes altertable-tooltip-in {
1814
- from {
1815
- opacity: 0;
1816
- }
1817
- }
1818
-
1819
- @media (prefers-reduced-motion: reduce) {
1820
- .altertable-tooltip-content {
1821
- animation: none;
1822
- }
1823
- }
1824
-
1825
- .altertable-chart-tooltip-row {
1826
- display: flex;
1827
- align-items: flex-start;
1828
- gap: 6px;
1829
- }
1830
-
1831
- .altertable-chart-tooltip-marker {
1832
- flex-shrink: 0;
1833
- width: 8px;
1834
- height: 8px;
1835
- margin-top: .3em;
1836
- }
1837
-
1838
- .altertable-chart-tooltip-reading {
1839
- overflow-wrap: anywhere;
1840
- min-width: 0;
1841
- }
1842
- }
1843
-
1844
- /* packages/data-app-react/src/ui/Kbd.css */
1845
- @layer atbl.components {
1846
- .altertable-kbd {
1847
- display: inline-flex;
1848
- border: 1px solid var(--atbl-border);
1849
- background: var(--atbl-subtle);
1850
- color: var(--atbl-muted);
1851
- font: var(--atbl-type-label-weight) var(--atbl-type-meta-size) / var(--atbl-type-label-leading) var(--atbl-font);
1852
- font-variant-numeric: tabular-nums;
1853
- white-space: nowrap;
1854
- border-radius: 5px;
1855
- justify-content: center;
1856
- align-items: center;
1857
- min-width: 1.6em;
1858
- padding: 2px 5px;
1859
- }
1860
-
1861
- .altertable-button[data-variant="primary"] .altertable-kbd {
1862
- color: inherit;
1863
- border-color: color-mix(in srgb, currentColor 30%, transparent);
1864
- background: none;
1865
- }
1866
- }
1867
-
1868
- /* packages/data-app-react/src/annotations/AnnotationBar.css */
1869
- @layer atbl.components {
1870
- .altertable-annotation-bar, .altertable-annotation-bar-panel {
1871
- --bar-surface: #202326;
1872
- --bar-text: #f2f3f4;
1873
- --bar-muted: #aeb5bc;
1874
- --bar-border: #3b4248;
1875
- --bar-danger: #ffa6a0;
1876
- --bar-danger-surface: #572723;
1877
- --atbl-control-selected-surface: var(--atbl-subtle);
1878
- --atbl-control-selected-text: var(--bar-text);
1879
- --atbl-control-disabled-opacity: 1;
1880
- --atbl-surface: var(--bar-surface);
1881
- --atbl-text: var(--bar-text);
1882
- --atbl-muted: var(--bar-muted);
1883
- --atbl-border: var(--bar-border);
1884
- --atbl-focus-outline: 2px solid var(--atbl-annotation-accent);
1885
- --atbl-subtle: color-mix(in srgb, var(--bar-text) 8%, var(--bar-surface));
1886
- color: var(--bar-text);
1887
- background: var(--bar-surface);
1888
- font: 14px / 1.5 var(--atbl-font);
1889
- box-sizing: border-box;
1890
- border: 1px solid var(--bar-border);
1891
- box-shadow: 0 8px 28px #0003;
1892
- }
1893
-
1894
- .altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip) {
1895
- --bar-surface: #202326;
1896
- --bar-text: #f2f3f4;
1897
- --bar-muted: #aeb5bc;
1898
- --bar-border: #3b4248;
1899
- --bar-danger: #ffa6a0;
1900
- --bar-danger-surface: #572723;
1901
- --atbl-control-selected-surface: var(--atbl-subtle);
1902
- --atbl-control-selected-text: var(--bar-text);
1903
- --atbl-control-disabled-opacity: 1;
1904
- --atbl-surface: var(--bar-surface);
1905
- --atbl-text: var(--bar-text);
1906
- --atbl-muted: var(--bar-muted);
1907
- --atbl-border: var(--bar-border);
1908
- --atbl-focus-outline: 2px solid var(--atbl-annotation-accent);
1909
- --atbl-subtle: color-mix(in srgb, var(--bar-text) 8%, var(--bar-surface));
1910
- color: var(--bar-text);
1911
- background: var(--bar-surface);
1912
- font: 14px / 1.5 var(--atbl-font);
1913
- box-sizing: border-box;
1914
- border: 1px solid var(--bar-border);
1915
- box-shadow: 0 8px 28px #0003;
1916
- }
1917
-
1918
- .altertable-annotation-bar[data-theme="dark"], .altertable-annotation-bar-panel[data-theme="dark"] {
1919
- --bar-surface: #f2f3f4;
1920
- --bar-text: #151719;
1921
- --bar-muted: #505963;
1922
- --bar-border: #dfe3e6;
1923
- --bar-danger: #b42318;
1924
- --bar-danger-surface: #ffe3e3;
1925
- }
1926
-
1927
- .altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip[data-theme="dark"]) {
1928
- --bar-surface: #f2f3f4;
1929
- --bar-text: #151719;
1930
- --bar-muted: #505963;
1931
- --bar-border: #dfe3e6;
1932
- --bar-danger: #b42318;
1933
- --bar-danger-surface: #ffe3e3;
1934
- }
1935
-
1936
- .altertable-annotation-bar {
1937
- position: fixed;
1938
- z-index: 1200;
1939
- display: flex;
1940
- border-radius: 18px;
1941
- align-items: center;
1942
- gap: 4px;
1943
- max-width: calc(100vw - 24px);
1944
- padding: 8px;
1945
- bottom: 16px;
1946
- left: 50%;
1947
- transform: translateX(-50%);
1948
- }
1949
-
1950
- .altertable-annotation-bar .altertable-button, .altertable-annotation-bar-panel .altertable-button {
1951
- color: var(--bar-muted);
1952
- font: inherit;
1953
- flex-shrink: 0;
1954
- width: auto;
1955
- transition: none;
1956
- }
1957
-
1958
- .altertable-annotation-bar .altertable-annotation-bar-count {
1959
- white-space: nowrap;
1960
- color: var(--bar-text);
1961
- padding-inline-start: 6px;
1962
- padding-inline-end: 6px;
1963
- }
1964
-
1965
- .altertable-annotation-bar .altertable-button[data-atbl-internal-drag-handle] {
1966
- --atbl-cursor-action: grab;
1967
- touch-action: none;
1968
- }
1969
-
1970
- .altertable-annotation-bar .altertable-button[data-atbl-internal-drag-handle]:active {
1971
- --atbl-cursor-action: grabbing;
1972
- }
1973
-
1974
- .altertable-annotation-bar .altertable-annotation-bar-send {
1975
- --atbl-control-hover-surface: var(--atbl-annotation-accent-hover);
1976
- --atbl-control-pressed-surface: var(--atbl-annotation-accent-hover);
1977
- background: var(--atbl-annotation-accent);
1978
- color: var(--atbl-annotation-on-accent);
1979
- border-color: #0000;
1980
- border-radius: 12px;
1981
- padding-inline-start: 14px;
1982
- padding-inline-end: 14px;
1983
- font-weight: 600;
1984
- line-height: 1.25;
1985
- }
1986
-
1987
- .altertable-annotation-bar-panel {
1988
- position: fixed;
1989
- z-index: 1201;
1990
- overflow: auto;
1991
- border-radius: 16px;
1992
- width: min(420px, 100vw - 24px);
1993
- max-height: min(440px, 45vh);
1994
- margin: 0;
1995
- padding: 6px;
1996
- }
1997
-
1998
- .altertable-annotation-bar-panel header {
1999
- display: flex;
2000
- justify-content: space-between;
2001
- align-items: center;
2002
- padding: 4px 8px;
2003
- }
2004
-
2005
- .altertable-annotation-bar-row {
2006
- display: flex;
2007
- border-radius: 10px;
2008
- align-items: center;
2009
- gap: 8px;
2010
- padding: 4px;
2011
- }
2012
-
2013
- .altertable-annotation-bar-row:hover, .altertable-annotation-bar-row:focus-within {
2014
- background: var(--atbl-subtle);
2015
- }
2016
-
2017
- .altertable-annotation-bar-row + .altertable-annotation-bar-row {
2018
- border-top: 1px solid var(--bar-border);
2019
- }
2020
-
2021
- .altertable-annotation-bar-panel .altertable-annotation-bar-open {
2022
- display: grid;
2023
- text-align: left;
2024
- flex: 1;
2025
- justify-content: stretch;
2026
- gap: 2px;
2027
- min-width: 0;
2028
- height: auto;
2029
- padding: 4px 6px;
2030
- }
2031
-
2032
- .altertable-annotation-bar-open strong {
2033
- color: var(--bar-text);
2034
- font-weight: 600;
2035
- }
2036
-
2037
- .altertable-annotation-bar-open span {
2038
- color: var(--bar-muted);
2039
- overflow-wrap: anywhere;
2040
- font-size: 13px;
2041
- }
2042
-
2043
- .altertable-annotation-bar-panel .altertable-annotation-bar-open:hover:not(:disabled) {
2044
- background: none;
2045
- }
2046
-
2047
- .altertable-annotation-bar-error {
2048
- position: absolute;
2049
- background: var(--bar-surface);
2050
- color: var(--bar-text);
2051
- border: 1px solid var(--bar-border);
2052
- border-radius: 10px;
2053
- padding: 8px 12px;
2054
- font-size: 12px;
2055
- bottom: calc(100% + 8px);
2056
- left: 0;
2057
- right: 0;
2058
- }
2059
-
2060
- @media (max-width: 420px) {
2061
- .altertable-annotation-bar {
2062
- gap: 0;
2063
- padding: 6px;
2064
- font-size: 12px;
2065
- }
2066
-
2067
- .altertable-annotation-bar .altertable-annotation-bar-send {
2068
- padding-inline-start: 10px;
2069
- padding-inline-end: 10px;
2070
- }
2071
- }
2072
-
2073
- @media (max-width: 360px) {
2074
- .altertable-annotation-bar .altertable-button[data-size="icon-compact"] {
2075
- width: 26px;
2076
- min-width: 26px;
2077
- }
2078
- }
2079
-
2080
- .altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip) {
2081
- font-size: 12px;
2082
- line-height: 1.3;
2083
- }
2084
-
2085
- .altertable-annotation-bar .altertable-button:hover:not(:disabled), .altertable-annotation-bar-panel .altertable-button:hover:not(:disabled) {
2086
- color: var(--bar-text);
2087
- background: var(--atbl-subtle);
2088
- }
2089
-
2090
- .altertable-annotation-bar .altertable-annotation-bar-send:hover:not(:disabled) {
2091
- color: var(--atbl-annotation-on-accent);
2092
- background: var(--atbl-annotation-accent-hover);
2093
- }
2094
-
2095
- .altertable-annotation-bar .altertable-button:disabled, .altertable-annotation-bar-panel .altertable-button:disabled {
2096
- color: var(--bar-muted);
2097
- }
2098
-
2099
- .altertable-annotation-bar .altertable-annotation-bar-send:disabled {
2100
- color: var(--bar-muted);
2101
- background: var(--atbl-subtle);
2102
- }
2103
-
2104
- .altertable-annotation-bar .altertable-annotation-bar-send {
2105
- position: relative;
2106
- }
2107
-
2108
- .altertable-annotation-bar-send[data-pending] .altertable-annotation-bar-send-label {
2109
- visibility: hidden;
2110
- }
2111
-
2112
- .altertable-annotation-bar-spinner {
2113
- position: absolute;
2114
- animation: 1s linear infinite annotation-bar-spin;
2115
- margin: auto;
2116
- inset: 0;
2117
- }
2118
-
2119
- @keyframes annotation-bar-spin {
2120
- to {
2121
- rotate: 360deg;
2122
- }
2123
- }
2124
-
2125
- .altertable-annotation-discard-description {
2126
- color: var(--atbl-muted);
2127
- font: 14px / 1.55 var(--atbl-font);
2128
- margin: 0;
2129
- }
2130
-
2131
- .altertable-annotation-discard-confirm {
2132
- color: var(--atbl-danger);
2133
- }
2134
-
2135
- @media (prefers-reduced-motion: reduce) {
2136
- .altertable-annotation-bar-spinner {
2137
- animation: none;
2138
- }
2139
- }
2140
-
2141
- .altertable-annotation-bar .altertable-button[aria-pressed="true"] {
2142
- color: var(--bar-text);
2143
- background: var(--atbl-subtle);
2144
- }
2145
-
2146
- .altertable-annotation-undo {
2147
- position: fixed;
2148
- z-index: 1202;
2149
- display: flex;
2150
- border: 1px solid var(--atbl-border);
2151
- border-radius: var(--atbl-radius-overlay);
2152
- background: var(--atbl-surface);
2153
- color: var(--atbl-text);
2154
- box-shadow: var(--atbl-shadow-overlay);
2155
- font: 13px / 1.5 var(--atbl-font);
2156
- align-items: center;
2157
- gap: 12px;
2158
- padding: 8px 12px;
2159
- bottom: 16px;
2160
- left: 16px;
2161
- }
2162
-
2163
- .altertable-annotation-thumbnail {
2164
- border: 1px solid var(--bar-border);
2165
- overflow: hidden;
2166
- background: var(--bar-surface);
2167
- --atbl-cursor-action: zoom-in;
2168
- border-radius: 6px;
2169
- flex-shrink: 0;
2170
- width: 56px;
2171
- height: 40px;
2172
- padding: 0;
2173
- }
2174
-
2175
- .altertable-annotation-thumbnail img {
2176
- object-fit: contain;
2177
- display: block;
2178
- width: 100%;
2179
- height: 100%;
2180
- }
2181
-
2182
- .altertable-annotation-thumbnail:focus-visible {
2183
- outline: 2px solid var(--atbl-annotation-accent);
2184
- outline-offset: 2px;
2185
- }
2186
-
2187
- .altertable-annotation-preview {
2188
- display: block;
2189
- object-fit: contain;
2190
- width: 100%;
2191
- max-height: 65vh;
2192
- }
2193
-
2194
- .altertable-annotation-undo[data-bar-visible] {
2195
- bottom: 88px;
2196
- }
2197
-
2198
- .altertable-annotation-undo[data-inline] {
2199
- position: static;
2200
- box-shadow: none;
2201
- border-radius: 8px;
2202
- margin-top: 6px;
2203
- }
2204
-
2205
- .altertable-sheet.altertable-annotation-image-dialog[data-placement="center"] {
2206
- width: min(960px, 100vw - 32px);
2207
- }
2208
- }
2209
-
2210
- /* packages/data-app-react/src/ui/Sheet.css */
2211
- @layer atbl.components {
2212
- :root:has(.altertable-sheet:modal) {
2213
- overflow: hidden;
2214
- }
2215
-
2216
- .altertable-sheet:not([open]) {
2217
- display: none;
2218
- }
2219
-
2220
- .altertable-sheet {
2221
- position: fixed;
2222
- overflow: visible;
2223
- border: 0;
2224
- border-left: 1px solid var(--atbl-border);
2225
- background: var(--atbl-surface);
2226
- color: var(--atbl-text);
2227
- box-shadow: var(--atbl-shadow-overlay);
2228
- font: var(--atbl-type-body-size) / var(--atbl-type-label-leading) var(--atbl-font);
2229
- opacity: 0;
2230
- transition: translate var(--atbl-duration-slow) cubic-bezier(.22, 1, .36, 1), opacity var(--atbl-duration-slow) var(--atbl-ease-standard);
2231
- border-radius: 0;
2232
- width: min(640px, 100vw);
2233
- max-width: none;
2234
- height: 100dvh;
2235
- max-height: none;
2236
- margin: 0;
2237
- padding: 0;
2238
- inset: 0 0 0 auto;
2239
- translate: 100%;
2240
- }
2241
-
2242
- .altertable-sheet[data-wide] {
2243
- width: min(960px, 100vw);
2244
- }
2245
-
2246
- .altertable-sheet[open] {
2247
- opacity: 1;
2248
- translate: 0;
2249
- }
2250
-
2251
- @starting-style {
2252
- .altertable-sheet[open] {
2253
- opacity: 0;
2254
- translate: 100%;
2255
- }
2256
- }
2257
-
2258
- .altertable-sheet[open][data-closing] {
2259
- opacity: 0;
2260
- transition-timing-function: ease-in;
2261
- translate: 100%;
2262
- }
2263
-
2264
- .altertable-sheet::backdrop {
2265
- background: var(--atbl-backdrop);
2266
- opacity: 0;
2267
- transition: opacity var(--atbl-duration-slow) var(--atbl-ease-standard);
2268
- }
2269
-
2270
- .altertable-sheet[open]::backdrop {
2271
- opacity: 1;
2272
- }
2273
-
2274
- .altertable-sheet[open][data-closing]::backdrop {
2275
- opacity: 0;
2276
- }
2277
-
2278
- @starting-style {
2279
- .altertable-sheet[open]::backdrop {
2280
- opacity: 0;
2281
- }
2282
- }
2283
-
2284
- .altertable-sheet-shell {
2285
- display: grid;
2286
- grid-template-rows: auto minmax(0, 1fr) auto;
2287
- height: 100%;
2288
- }
2289
-
2290
- .altertable-sheet-header {
2291
- display: flex;
2292
- justify-content: space-between;
2293
- align-items: flex-start;
2294
- gap: var(--atbl-space-md);
2295
- padding: var(--atbl-space-lg) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2) calc((var(--atbl-space-md) + var(--atbl-space-lg)) / 2);
2296
- border-bottom: 1px solid var(--atbl-border);
2297
- }
2298
-
2299
- .altertable-sheet-header h2 {
2300
- font-size: var(--atbl-type-section-size);
2301
- font-weight: var(--atbl-type-heading-weight);
2302
- line-height: var(--atbl-type-heading-leading);
2303
- letter-spacing: -.02em;
2304
- overflow-wrap: anywhere;
2305
- margin: 0;
2306
- }
2307
-
2308
- .altertable-sheet-header p {
2309
- color: var(--atbl-muted);
2310
- font-size: var(--atbl-type-label-size);
2311
- margin: 4px 0 0;
2312
- line-height: 1.45;
2313
- }
2314
-
2315
- .altertable-sheet-actions {
2316
- display: flex;
2317
- align-items: center;
2318
- gap: 4px;
2319
- margin: -4px -8px 0 0;
2320
- }
2321
-
2322
- .altertable-sheet-close {
2323
- color: var(--atbl-muted);
2324
- }
2325
-
2326
- .altertable-sheet-body {
2327
- overflow-y: auto;
2328
- overscroll-behavior: contain;
2329
- padding: var(--atbl-space-lg) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2) calc(var(--atbl-space-xl) + var(--atbl-space-md) / 2);
2330
- min-height: 0;
2331
- }
2332
-
2333
- .altertable-sheet-footer {
2334
- padding: var(--atbl-space-md) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2);
2335
- border-top: 1px solid var(--atbl-border);
2336
- }
2337
-
2338
- @media (min-width: 601px) {
2339
- .altertable-sheet:where([data-placement="side"][data-side="left"]) {
2340
- border-left: 0;
2341
- border-right: 1px solid var(--atbl-border);
2342
- inset: 0 auto 0 0;
2343
- translate: -100%;
2344
- }
2345
-
2346
- .altertable-sheet:where([data-placement="side"][data-side="left"])[open] {
2347
- translate: 0;
2348
- }
2349
-
2350
- .altertable-sheet:where([data-placement="side"][data-side="left"])[open][data-closing] {
2351
- translate: -100%;
2352
- }
2353
-
2354
- @starting-style {
2355
- .altertable-sheet:where([data-placement="side"][data-side="left"])[open] {
2356
- translate: -100%;
2357
- }
2358
- }
2359
- }
2360
-
2361
- @media (max-width: 960px) {
2362
- .altertable-sheet[data-wide] {
2363
- box-shadow: none;
2364
- border: 0;
2365
- inset: auto 0 0;
2366
- translate: 0 100%;
2367
- }
2368
-
2369
- .altertable-sheet[data-wide][open] {
2370
- translate: 0;
2371
- }
2372
-
2373
- .altertable-sheet[data-wide][open][data-closing] {
2374
- translate: 0 100%;
2375
- }
2376
-
2377
- @starting-style {
2378
- .altertable-sheet[data-wide][open] {
2379
- translate: 0 100%;
2380
- }
2381
- }
2382
- }
2383
-
2384
- @media (max-width: 600px) {
2385
- .altertable-sheet {
2386
- box-shadow: none;
2387
- border: 0;
2388
- inset: auto 0 0;
2389
- translate: 0 100%;
2390
- }
2391
-
2392
- .altertable-sheet[open] {
2393
- translate: 0;
2394
- }
2395
-
2396
- .altertable-sheet[open][data-closing] {
2397
- translate: 0 100%;
2398
- }
2399
-
2400
- @starting-style {
2401
- .altertable-sheet[open] {
2402
- translate: 0 100%;
2403
- }
2404
- }
2405
-
2406
- .altertable-sheet-header {
2407
- padding: 20px 20px 16px;
2408
- }
2409
-
2410
- .altertable-sheet-body {
2411
- padding: 20px 20px 32px;
2412
- }
2413
-
2414
- .altertable-sheet-footer {
2415
- padding: 14px 20px;
2416
- }
2417
- }
2418
-
2419
- @media (prefers-reduced-motion: reduce) {
2420
- .altertable-sheet, .altertable-sheet[open][data-closing] {
2421
- transition: none;
2422
- translate: 0;
2423
- }
2424
-
2425
- .altertable-sheet::backdrop {
2426
- transition: none;
2427
- }
2428
-
2429
- @starting-style {
2430
- .altertable-sheet[open] {
2431
- translate: 0;
2432
- }
2433
- }
2434
- }
2435
-
2436
- .altertable-sheet[data-placement="center"] {
2437
- border: 1px solid var(--atbl-border, #e3e6e8);
2438
- border-radius: var(--atbl-radius-overlay);
2439
- width: min(480px, 100vw - 32px);
2440
- height: -moz-fit-content;
2441
- height: fit-content;
2442
- max-height: calc(100dvh - 32px);
2443
- margin: auto;
2444
- inset: 0;
2445
- translate: 0;
2446
- }
2447
-
2448
- .altertable-sheet[data-placement="center"] .altertable-sheet-shell {
2449
- height: auto;
2450
- }
2451
-
2452
- .altertable-sheet[data-placement="center"] .altertable-sheet-header {
2453
- padding: 20px 24px 16px;
2454
- }
2455
-
2456
- .altertable-sheet[data-placement="center"] .altertable-sheet-body {
2457
- padding: 0 24px 20px;
2458
- }
2459
-
2460
- .altertable-sheet[data-placement="center"] .altertable-sheet-footer {
2461
- padding: 16px 24px;
2462
- }
2463
- }
2464
-
2465
- /* packages/data-app-react/src/ui/GradientScroll.css */
2466
- @layer atbl.components {
2467
- .altertable-gradient-scroll {
2468
- overflow: auto;
2469
- --atbl-scroll-fade-size: 1.5rem;
2470
- min-width: 0;
2471
- min-height: 0;
2472
- }
2473
-
2474
- .altertable-gradient-scroll[data-axis="vertical"] {
2475
- overflow-x: hidden;
2476
- }
2477
-
2478
- .altertable-gradient-scroll[data-axis="horizontal"] {
2479
- overflow-y: hidden;
2480
- }
2481
-
2482
- .altertable-gradient-scroll[data-axis="vertical"][data-fade-start][data-fade-end] {
2483
- mask-image: linear-gradient(to bottom, transparent, black var(--atbl-scroll-fade-size), black calc(100% - var(--atbl-scroll-fade-size)), transparent);
2484
- }
2485
-
2486
- .altertable-gradient-scroll[data-axis="vertical"][data-fade-start]:not([data-fade-end]) {
2487
- mask-image: linear-gradient(to bottom, transparent, black var(--atbl-scroll-fade-size));
2488
- }
2489
-
2490
- .altertable-gradient-scroll[data-axis="vertical"][data-fade-end]:not([data-fade-start]) {
2491
- mask-image: linear-gradient(to bottom, black, black calc(100% - var(--atbl-scroll-fade-size)), transparent);
2492
- }
2493
-
2494
- .altertable-gradient-scroll[data-axis="horizontal"][data-fade-start][data-fade-end] {
2495
- mask-image: linear-gradient(to right, transparent, black var(--atbl-scroll-fade-size), black calc(100% - var(--atbl-scroll-fade-size)), transparent);
2496
- }
2497
-
2498
- .altertable-gradient-scroll[data-axis="horizontal"][data-fade-start]:not([data-fade-end]) {
2499
- mask-image: linear-gradient(to right, transparent, black var(--atbl-scroll-fade-size));
2500
- }
2501
-
2502
- .altertable-gradient-scroll[data-axis="horizontal"][data-fade-end]:not([data-fade-start]) {
2503
- mask-image: linear-gradient(to right, black, black calc(100% - var(--atbl-scroll-fade-size)), transparent);
2504
- }
2505
- }
2506
-
2507
- /* packages/data-app-react/src/ui/Focus.css */
2508
- @layer atbl.interaction {
2509
- [data-atbl-focus="inset"][data-atbl-internal-focus-state="focused"][data-focused] {
2510
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2511
- outline-offset: var(--atbl-focus-ring-offset);
2512
- }
2513
-
2514
- [data-atbl-focus="ring"]:-webkit-any(:focus-visible, [data-focus-visible]) {
2515
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2516
- outline-offset: var(--atbl-focus-ring-offset);
2517
- }
2518
-
2519
- [data-atbl-focus="ring"]:-moz-any(:focus-visible, [data-focus-visible]) {
2520
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2521
- outline-offset: var(--atbl-focus-ring-offset);
2522
- }
2523
-
2524
- [data-atbl-focus="ring"]:is(:focus-visible, [data-focus-visible]) {
2525
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2526
- outline-offset: var(--atbl-focus-ring-offset);
2527
- }
2528
-
2529
- [data-atbl-focus="ring"]:has( > input:focus-visible) {
2530
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2531
- outline-offset: var(--atbl-focus-ring-offset);
2532
- }
2533
-
2534
- [data-atbl-focus="inset"]:-webkit-any(:focus-visible, [data-focus-visible]) {
2535
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2536
- outline-offset: var(--atbl-focus-ring-offset);
2537
- }
2538
-
2539
- [data-atbl-focus="inset"]:-moz-any(:focus-visible, [data-focus-visible]) {
2540
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2541
- outline-offset: var(--atbl-focus-ring-offset);
2542
- }
2543
-
2544
- [data-atbl-focus="inset"]:is(:focus-visible, [data-focus-visible]) {
2545
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2546
- outline-offset: var(--atbl-focus-ring-offset);
2547
- }
2548
-
2549
- [data-atbl-internal-prose] a:focus-visible {
2550
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2551
- outline-offset: var(--atbl-focus-ring-offset);
2552
- }
2553
-
2554
- [data-atbl-focus="inset"][data-atbl-internal-focus-state="focused"][data-focused] {
2555
- outline-offset: var(--atbl-focus-ring-inset);
2556
- }
2557
-
2558
- [data-atbl-focus="inset"]:-webkit-any(:focus-visible, [data-focus-visible]) {
2559
- outline-offset: var(--atbl-focus-ring-inset);
2560
- }
2561
-
2562
- [data-atbl-focus="inset"]:-moz-any(:focus-visible, [data-focus-visible]) {
2563
- outline-offset: var(--atbl-focus-ring-inset);
2564
- }
2565
-
2566
- [data-atbl-focus="inset"]:is(:focus-visible, [data-focus-visible]) {
2567
- outline-offset: var(--atbl-focus-ring-inset);
2568
- }
2569
-
2570
- [data-atbl-focus="group"]:-webkit-any(:focus-within, [data-focus-within], [data-focus-visible]) {
2571
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2572
- outline-offset: var(--atbl-focus-ring-inset);
2573
- }
2574
-
2575
- [data-atbl-focus="group"]:-moz-any(:focus-within, [data-focus-within], [data-focus-visible]) {
2576
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2577
- outline-offset: var(--atbl-focus-ring-inset);
2578
- }
2579
-
2580
- [data-atbl-focus="group"]:is(:focus-within, [data-focus-within], [data-focus-visible]) {
2581
- outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));
2582
- outline-offset: var(--atbl-focus-ring-inset);
2583
- }
2584
-
2585
- [data-atbl-focus="group"] input:focus-visible {
2586
- outline: none;
2587
- }
2588
-
2589
- @media (forced-colors: active) {
2590
- [data-atbl-focus]:-webkit-any(:focus-visible, :focus-within, [data-focus-visible]) {
2591
- outline-color: highlight !important;
2592
- }
2593
-
2594
- [data-atbl-focus]:-moz-any(:focus-visible, :focus-within, [data-focus-visible]) {
2595
- outline-color: highlight !important;
2596
- }
2597
-
2598
- [data-atbl-focus]:is(:focus-visible, :focus-within, [data-focus-visible]) {
2599
- outline-color: highlight !important;
2600
- }
2601
-
2602
- [data-atbl-internal-prose] a:focus-visible {
2603
- outline-color: highlight !important;
2604
- }
2605
- }
2606
- }
2607
-
2608
- /* packages/data-app-react/src/interaction.css */
2609
- @layer atbl.interaction {
2610
- [data-atbl-control="default"] {
2611
- cursor: default;
2612
- }
2613
-
2614
- [data-atbl-control="action"], [data-atbl-internal-prose] a {
2615
- cursor: var(--atbl-cursor-action);
2616
- }
2617
-
2618
- [data-atbl-control="help"] {
2619
- cursor: var(--atbl-cursor-help);
2620
- }
2621
-
2622
- [data-atbl-control="text"] {
2623
- cursor: text;
2624
- font-size: var(--atbl-control-text-size, var(--atbl-type-body-size));
2625
- }
2626
-
2627
- @media (max-width: 560px), (any-pointer: coarse) {
2628
- [data-atbl-control="text"] {
2629
- font-size: max(16px, var(--atbl-control-text-size, var(--atbl-type-body-size)));
2630
- }
2631
- }
2632
-
2633
- [data-atbl-control]:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], [data-unavailable]) {
2634
- cursor: var(--atbl-cursor-disabled);
2635
- }
2636
-
2637
- [data-atbl-control]:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], [data-unavailable]) {
2638
- cursor: var(--atbl-cursor-disabled);
2639
- }
2640
-
2641
- [data-atbl-control]:is(:disabled, [data-disabled], [aria-disabled="true"], [data-unavailable]) {
2642
- cursor: var(--atbl-cursor-disabled);
2643
- }
2644
-
2645
- [data-atbl-control]:has( > input:disabled) {
2646
- cursor: var(--atbl-cursor-disabled);
2647
- }
2648
-
2649
- [data-atbl-control="action"]:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"]) {
2650
- opacity: var(--atbl-control-disabled-opacity);
2651
- }
2652
-
2653
- [data-atbl-control="action"]:-moz-any(:disabled, [data-disabled], [aria-disabled="true"]) {
2654
- opacity: var(--atbl-control-disabled-opacity);
2655
- }
2656
-
2657
- [data-atbl-control="action"]:is(:disabled, [data-disabled], [aria-disabled="true"]) {
2658
- opacity: var(--atbl-control-disabled-opacity);
2659
- }
2660
-
2661
- [data-atbl-control="help"]:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"]) {
2662
- opacity: var(--atbl-control-disabled-opacity);
2663
- }
2664
-
2665
- [data-atbl-control="help"]:-moz-any(:disabled, [data-disabled], [aria-disabled="true"]) {
2666
- opacity: var(--atbl-control-disabled-opacity);
2667
- }
2668
-
2669
- [data-atbl-control="help"]:is(:disabled, [data-disabled], [aria-disabled="true"]) {
2670
- opacity: var(--atbl-control-disabled-opacity);
2671
- }
2672
-
2673
- [data-atbl-control]:has( > input:disabled) {
2674
- opacity: var(--atbl-control-disabled-opacity);
2675
- }
2676
-
2677
- [data-atbl-control][aria-busy="true"]:not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2678
- cursor: var(--atbl-cursor-busy);
2679
- }
2680
-
2681
- [data-atbl-control][aria-busy="true"]:not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2682
- cursor: var(--atbl-cursor-busy);
2683
- }
2684
-
2685
- [data-atbl-control][aria-busy="true"]:not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2686
- cursor: var(--atbl-cursor-busy);
2687
- }
2688
-
2689
- :where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):-webkit-any(:hover, [data-hovered], [data-focused], [data-open="true"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2690
- background: var(--atbl-control-hover-surface, var(--atbl-subtle));
2691
- }
2692
-
2693
- :where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):-moz-any(:hover, [data-hovered], [data-focused], [data-open="true"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2694
- background: var(--atbl-control-hover-surface, var(--atbl-subtle));
2695
- }
2696
-
2697
- :where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):is(:hover, [data-hovered], [data-focused], [data-open="true"]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2698
- background: var(--atbl-control-hover-surface, var(--atbl-subtle));
2699
- }
2700
-
2701
- :where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):-webkit-any(:active, [data-pressed]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2702
- background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));
2703
- }
2704
-
2705
- :where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):-moz-any(:active, [data-pressed]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2706
- background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));
2707
- }
2708
-
2709
- :where([data-atbl-internal-surface="control"], [data-atbl-internal-surface="option"]):is(:active, [data-pressed]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2710
- background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));
2711
- }
2712
-
2713
- :where([data-atbl-internal-surface="control"]):-webkit-any([aria-expanded="true"], [data-open="true"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2714
- background: var(--atbl-control-open-surface, var(--atbl-surface));
2715
- }
2716
-
2717
- :where([data-atbl-internal-surface="control"]):-moz-any([aria-expanded="true"], [data-open="true"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2718
- background: var(--atbl-control-open-surface, var(--atbl-surface));
2719
- }
2720
-
2721
- :where([data-atbl-internal-surface="control"]):is([aria-expanded="true"], [data-open="true"]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2722
- background: var(--atbl-control-open-surface, var(--atbl-surface));
2723
- }
2724
-
2725
- :where([data-atbl-internal-surface="control"]):-webkit-any([data-variant="outline"], [data-variant="elevated"]):-webkit-any([aria-expanded="true"], [data-open="true"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2726
- border-color: var(--atbl-control-open-border, var(--atbl-muted));
2727
- }
2728
-
2729
- :where([data-atbl-internal-surface="control"]):-moz-any([data-variant="outline"], [data-variant="elevated"]):-moz-any([aria-expanded="true"], [data-open="true"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2730
- border-color: var(--atbl-control-open-border, var(--atbl-muted));
2731
- }
2732
-
2733
- :where([data-atbl-internal-surface="control"]):is([data-variant="outline"], [data-variant="elevated"]):is([aria-expanded="true"], [data-open="true"]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2734
- border-color: var(--atbl-control-open-border, var(--atbl-muted));
2735
- }
2736
-
2737
- :where([data-atbl-internal-surface="control"]):-webkit-any([aria-pressed="true"], [data-selected], [aria-current="true"], :has( > input:checked)):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2738
- background: var(--atbl-control-selected-surface, var(--atbl-subtle));
2739
- color: var(--atbl-control-selected-text, var(--atbl-text));
2740
- }
2741
-
2742
- :where([data-atbl-internal-surface="control"]):-moz-any([aria-pressed="true"], [data-selected], [aria-current="true"], :has( > input:checked)):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2743
- background: var(--atbl-control-selected-surface, var(--atbl-subtle));
2744
- color: var(--atbl-control-selected-text, var(--atbl-text));
2745
- }
2746
-
2747
- :where([data-atbl-internal-surface="control"]):is([aria-pressed="true"], [data-selected], [aria-current="true"], :has( > input:checked)):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2748
- background: var(--atbl-control-selected-surface, var(--atbl-subtle));
2749
- color: var(--atbl-control-selected-text, var(--atbl-text));
2750
- }
2751
-
2752
- :where([data-atbl-internal-surface="option"])[data-selected]:not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2753
- background: var(--atbl-control-selected-surface, var(--atbl-subtle));
2754
- color: var(--atbl-control-selected-text, var(--atbl-text));
2755
- }
2756
-
2757
- :where([data-atbl-internal-surface="option"])[data-selected]:not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2758
- background: var(--atbl-control-selected-surface, var(--atbl-subtle));
2759
- color: var(--atbl-control-selected-text, var(--atbl-text));
2760
- }
2761
-
2762
- :where([data-atbl-internal-surface="option"])[data-selected]:not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2763
- background: var(--atbl-control-selected-surface, var(--atbl-subtle));
2764
- color: var(--atbl-control-selected-text, var(--atbl-text));
2765
- }
2766
-
2767
- :where([data-atbl-internal-surface="option"])[data-selected]:-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2768
- background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
2769
- }
2770
-
2771
- :where([data-atbl-internal-surface="option"])[data-selected]:-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2772
- background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
2773
- }
2774
-
2775
- :where([data-atbl-internal-surface="option"])[data-selected]:is(:hover, [data-hovered]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2776
- background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
2777
- }
2778
-
2779
- :where([data-atbl-internal-surface="option"])[data-selected]:-webkit-any(:active, [data-pressed]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2780
- background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
2781
- }
2782
-
2783
- :where([data-atbl-internal-surface="option"])[data-selected]:-moz-any(:active, [data-pressed]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2784
- background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
2785
- }
2786
-
2787
- :where([data-atbl-internal-surface="option"])[data-selected]:is(:active, [data-pressed]):not(:is(:disabled, [data-disabled], [aria-disabled="true"], :has( > input:disabled))) {
2788
- background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));
2789
- }
2790
-
2791
- :where([data-atbl-internal-surface="field"], [data-atbl-internal-surface="control"][data-variant="outline"], [data-atbl-internal-surface="control"][data-variant="elevated"]):-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, :has(input:disabled), [data-disabled], [aria-disabled="true"], [data-invalid], [aria-invalid="true"], :has(input[aria-invalid="true"]))) {
2792
- border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));
2793
- }
2794
-
2795
- :where([data-atbl-internal-surface="field"], [data-atbl-internal-surface="control"][data-variant="outline"], [data-atbl-internal-surface="control"][data-variant="elevated"]):-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, :has(input:disabled), [data-disabled], [aria-disabled="true"], [data-invalid], [aria-invalid="true"], :has(input[aria-invalid="true"]))) {
2796
- border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));
2797
- }
2798
-
2799
- :where([data-atbl-internal-surface="field"], [data-atbl-internal-surface="control"][data-variant="outline"], [data-atbl-internal-surface="control"][data-variant="elevated"]):is(:hover, [data-hovered]):not(:is(:disabled, :has(input:disabled), [data-disabled], [aria-disabled="true"], [data-invalid], [aria-invalid="true"], :has(input[aria-invalid="true"]))) {
2800
- border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));
2801
- }
2802
-
2803
- [data-atbl-internal-surface="field"]:-webkit-any([data-invalid], [aria-invalid="true"]) {
2804
- border-color: var(--atbl-danger);
2805
- --atbl-focus-color: var(--atbl-danger);
2806
- }
2807
-
2808
- [data-atbl-internal-surface="field"]:-moz-any([data-invalid], [aria-invalid="true"]) {
2809
- border-color: var(--atbl-danger);
2810
- --atbl-focus-color: var(--atbl-danger);
2811
- }
2812
-
2813
- [data-atbl-internal-surface="field"]:is([data-invalid], [aria-invalid="true"]) {
2814
- border-color: var(--atbl-danger);
2815
- --atbl-focus-color: var(--atbl-danger);
2816
- }
2817
-
2818
- [data-atbl-internal-surface="field"]:has(input[aria-invalid="true"]) {
2819
- border-color: var(--atbl-danger);
2820
- --atbl-focus-color: var(--atbl-danger);
2821
- }
2822
-
2823
- [data-atbl-control="text"]:-webkit-any(:disabled, [data-disabled], [aria-disabled="true"]) {
2824
- color: var(--atbl-muted);
2825
- }
2826
-
2827
- [data-atbl-control="text"]:-moz-any(:disabled, [data-disabled], [aria-disabled="true"]) {
2828
- color: var(--atbl-muted);
2829
- }
2830
-
2831
- [data-atbl-control="text"]:is(:disabled, [data-disabled], [aria-disabled="true"]) {
2832
- color: var(--atbl-muted);
2833
- }
2834
- }
2835
-
2836
- /* packages/data-app-react/src/annotations/styles.css */
2837
- @layer atbl.tokens, atbl.base, atbl.components, atbl.interaction;
2838
- `,
2839
- options
2840
- });
1035
+ return injectStyles({
1036
+ name: "injectDataAppAnnotationStyles",
1037
+ attribute: "data-altertable-annotation-styles",
1038
+ css: "/* packages/data-app-react/src/tokens.css */\n@layer atbl.tokens {\n :root {\n --atbl-background: var(--atbl-palette-background);\n --atbl-surface: var(--atbl-palette-surface);\n --atbl-subtle: var(--atbl-palette-subtle);\n --atbl-backdrop: #0f171e38;\n --atbl-text: var(--atbl-palette-text);\n --atbl-muted: var(--atbl-palette-muted);\n --atbl-border: var(--atbl-palette-border);\n --atbl-accent: var(--atbl-palette-accent);\n --atbl-on-accent: var(--atbl-palette-on-accent);\n --atbl-positive: var(--atbl-palette-positive);\n --atbl-danger: var(--atbl-palette-danger);\n --atbl-code-surface: #f4f6f9;\n --atbl-code-text: #273242;\n --atbl-mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n --atbl-focus-ring-offset: 2px;\n --atbl-focus-ring-inset: -1px;\n --atbl-font: var(--atbl-input-font, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, ui-sans-serif, sans-serif);\n --atbl-space-xs: 5px;\n --atbl-space-sm: 10px;\n --atbl-space-md: 16px;\n --atbl-space-lg: 24px;\n --atbl-space-xl: 32px;\n --atbl-content-width: 1920px;\n --atbl-control-height: 2.375rem;\n --atbl-control-compact-height: 1.875rem;\n --atbl-control-icon-size: 1rem;\n --atbl-control-padding-inline: .75rem;\n --atbl-control-padding-block: .375rem;\n --atbl-control-gap: .5rem;\n --atbl-control-disabled-opacity: .5;\n --atbl-dropdown-padding: calc(var(--atbl-control-padding-block) * 2 / 3);\n --atbl-dropdown-item-padding-block: var(--atbl-control-padding-block);\n --atbl-dropdown-item-padding-inline: calc(var(--atbl-control-padding-inline) * 3 / 4);\n --atbl-dropdown-item-gap: 2px;\n --atbl-radius-control: 7px;\n --atbl-radius-surface: 12px;\n --atbl-radius-overlay: 16px;\n --atbl-shadow-surface: 0 3px 16px #141c280d;\n --atbl-shadow-overlay: 0 18px 50px #00000029;\n --atbl-shadow-control: 0 1px 3px #0000001a;\n --atbl-cursor-action: pointer;\n --atbl-cursor-disabled: default;\n --atbl-cursor-help: help;\n --atbl-cursor-busy: progress;\n --atbl-duration-fast: .12s;\n --atbl-duration-normal: .18s;\n --atbl-duration-slow: .24s;\n --atbl-ease-standard: ease;\n --atbl-ease-enter: cubic-bezier(.2, .7, .2, 1);\n --atbl-chart-1: color-mix(in srgb, var(--atbl-input-chart-1, #285fc0) var(--atbl-chart-strength), white);\n --atbl-chart-2: color-mix(in srgb, var(--atbl-input-chart-2, #a95319) var(--atbl-chart-strength), white);\n --atbl-chart-3: color-mix(in srgb, var(--atbl-input-chart-3, #147862) var(--atbl-chart-strength), white);\n --atbl-chart-4: color-mix(in srgb, var(--atbl-input-chart-4, #7243aa) var(--atbl-chart-strength), white);\n --atbl-chart-5: color-mix(in srgb, var(--atbl-input-chart-5, #aa3958) var(--atbl-chart-strength), white);\n --atbl-chart-6: color-mix(in srgb, var(--atbl-input-chart-6, #475569) var(--atbl-chart-strength), white);\n --atbl-chart-7: color-mix(in srgb, var(--atbl-input-chart-7, #285fc0) var(--atbl-chart-strength), white);\n --atbl-chart-8: color-mix(in srgb, var(--atbl-input-chart-8, #a95319) var(--atbl-chart-strength), white);\n --atbl-type-emphasis-weight: 680;\n --atbl-type-meta-weight: 500;\n --atbl-type-page-size: clamp(1.375rem, 2.4vw, 1.75rem);\n --atbl-type-section-size: 1.25rem;\n --atbl-type-widget-size: var(--atbl-type-label-size);\n --atbl-type-body-size: .875rem;\n --atbl-type-label-size: .8125rem;\n --atbl-type-meta-size: .75rem;\n --atbl-type-metric-size: clamp(1.625rem, 3vw, 2.125rem);\n --atbl-type-heading-weight: 650;\n --atbl-type-label-weight: 600;\n --atbl-type-body-leading: 1.65;\n --atbl-type-label-leading: 1.4;\n --atbl-type-heading-leading: 1.3;\n --atbl-type-metric-leading: 1.08;\n --atbl-text-measure: 70ch;\n }\n}\n\n/* packages/data-app-react/src/appearance.css */\n@layer atbl.tokens {\n :root {\n --atbl-palette-background: #fff;\n --atbl-palette-surface: #fff;\n --atbl-palette-subtle: #f6f7f7;\n --atbl-palette-text: #202124;\n --atbl-palette-muted: #687078;\n --atbl-palette-border: #e3e6e8;\n --atbl-palette-accent: var(--atbl-input-accent, var(--atbl-text));\n --atbl-palette-on-accent: var(--atbl-input-on-accent, #fff);\n --atbl-palette-positive: #147862;\n --atbl-palette-danger: #b42318;\n --atbl-chart-strength: 100%;\n --atbl-accent-subtle-strength: 12%;\n }\n\n :root[data-atbl-theme=\"dark\"] {\n --atbl-palette-background: #151719;\n --atbl-palette-surface: #202326;\n --atbl-palette-subtle: #292d31;\n --atbl-palette-text: #f2f3f4;\n --atbl-palette-muted: #aeb5bc;\n --atbl-palette-border: #3b4248;\n }\n\n :root[data-atbl-base-color=\"slate\"] {\n --atbl-palette-background: #f8fafc;\n --atbl-palette-surface: #fff;\n --atbl-palette-subtle: #f1f5f9;\n --atbl-palette-text: #17212f;\n --atbl-palette-muted: #607083;\n --atbl-palette-border: #dce3ea;\n }\n\n :root[data-atbl-base-color=\"slate\"][data-atbl-theme=\"dark\"] {\n --atbl-palette-background: #111820;\n --atbl-palette-surface: #1b2530;\n --atbl-palette-subtle: #263340;\n --atbl-palette-text: #f0f4f8;\n --atbl-palette-muted: #a8b5c3;\n --atbl-palette-border: #3a4857;\n }\n\n :root[data-atbl-base-color=\"warm\"] {\n --atbl-palette-background: #fbfaf8;\n --atbl-palette-surface: #fff;\n --atbl-palette-subtle: #f5f2ed;\n --atbl-palette-text: #292723;\n --atbl-palette-muted: #736e66;\n --atbl-palette-border: #e8e2da;\n }\n\n :root[data-atbl-base-color=\"warm\"][data-atbl-theme=\"dark\"] {\n --atbl-palette-background: #1b1916;\n --atbl-palette-surface: #25221e;\n --atbl-palette-subtle: #302c27;\n --atbl-palette-text: #f5f1eb;\n --atbl-palette-muted: #bcb3a8;\n --atbl-palette-border: #494239;\n }\n\n :root[data-atbl-theme=\"dark\"] {\n --atbl-palette-accent: var(--atbl-input-dark-accent, var(--atbl-text));\n --atbl-accent-subtle-strength: 22%;\n --atbl-palette-on-accent: var(--atbl-input-on-accent, var(--atbl-background));\n --atbl-palette-positive: #6bc39a;\n --atbl-palette-danger: #f97066;\n --atbl-backdrop: #0000008c;\n --atbl-code-surface: #242a31;\n --atbl-code-text: #e5e9ef;\n --atbl-chart-strength: 60%;\n }\n\n :root[data-atbl-density=\"compact\"] {\n --atbl-control-height: 2.125rem;\n --atbl-control-compact-height: 1.625rem;\n --atbl-control-gap: .375rem;\n --atbl-control-padding-inline: .625rem;\n --atbl-control-padding-block: .25rem;\n --atbl-space-xs: 4px;\n --atbl-space-sm: 8px;\n --atbl-space-md: 12px;\n --atbl-space-lg: 18px;\n --atbl-space-xl: 24px;\n }\n\n :root[data-atbl-density=\"spacious\"] {\n --atbl-control-height: 2.625rem;\n --atbl-control-compact-height: 2.125rem;\n --atbl-control-gap: .625rem;\n --atbl-control-padding-inline: 1rem;\n --atbl-control-padding-block: .5rem;\n --atbl-space-xs: 6px;\n --atbl-space-sm: 12px;\n --atbl-space-md: 20px;\n --atbl-space-lg: 30px;\n --atbl-space-xl: 40px;\n }\n\n :root[data-atbl-radius=\"none\"] {\n --atbl-radius-control: 0px;\n --atbl-radius-surface: 0px;\n --atbl-radius-overlay: 0px;\n }\n\n :root[data-atbl-radius=\"small\"] {\n --atbl-radius-control: 4px;\n --atbl-radius-surface: 7px;\n --atbl-radius-overlay: 9px;\n }\n\n :root[data-atbl-radius=\"large\"] {\n --atbl-radius-control: 10px;\n --atbl-radius-surface: 18px;\n --atbl-radius-overlay: 24px;\n }\n\n :root[data-atbl-elevation=\"flat\"] {\n --atbl-shadow-surface: none;\n --atbl-shadow-overlay: none;\n --atbl-shadow-control: none;\n }\n\n :root[data-atbl-elevation=\"raised\"] {\n --atbl-shadow-surface: 0 8px 28px #141c281a;\n --atbl-shadow-overlay: 0 24px 72px #0000003d;\n --atbl-shadow-control: 0 2px 6px #00000029;\n }\n\n @media (forced-colors: active) {\n :root {\n --atbl-focus-color: Highlight !important;\n --atbl-on-accent: HighlightText !important;\n }\n }\n}\n\n/* packages/data-app-react/src/base.css */\n@layer atbl.base {\n :where([class^=\"altertable-\"], [class*=\" altertable-\"]) {\n box-sizing: border-box;\n }\n\n :where([class^=\"altertable-\"], [class*=\" altertable-\"]) * {\n box-sizing: border-box;\n }\n\n :where([class^=\"starter-\"], [class*=\" starter-\"]) * {\n box-sizing: border-box;\n }\n\n :where([class^=\"altertable-\"], [class*=\" altertable-\"]) button {\n font: inherit;\n }\n\n :root[data-atbl-appearance] {\n scrollbar-gutter: stable;\n font-family: var(--atbl-font);\n color: var(--atbl-text);\n background: var(--atbl-background);\n font-synthesis: none;\n -webkit-font-smoothing: antialiased;\n text-rendering: optimizeLegibility;\n }\n\n :root[data-atbl-frame-sizing=\"content\"] {\n overflow: hidden;\n scrollbar-gutter: auto;\n }\n\n :root {\n --atbl-frame-visible-height: calc(100dvh - var(--atbl-frame-inset-top, 0px) - var(--atbl-frame-inset-bottom, 0px));\n }\n\n :root[data-atbl-theme=\"light\"] {\n --buncss-light: initial;\n --buncss-dark: ;\n color-scheme: light;\n }\n\n :root[data-atbl-theme=\"dark\"] {\n --buncss-light: ;\n --buncss-dark: initial;\n color-scheme: dark;\n }\n\n :root[data-atbl-appearance] body, :root[data-atbl-appearance] #root {\n margin: 0;\n }\n\n .altertable-sr-only {\n position: fixed;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n }\n}\n\n/* packages/data-app-react/src/annotations/colors.css */\n@layer atbl.components {\n :root {\n --atbl-annotation-accent: #c026d3;\n --atbl-annotation-accent-hover: #a21caf;\n --atbl-annotation-on-accent: #fff;\n }\n\n .altertable-annotation-trigger, .altertable-annotation-composer {\n --atbl-control-selected-surface: var(--atbl-annotation-accent);\n --atbl-control-selected-text: var(--atbl-annotation-on-accent);\n --atbl-focus-outline: 2px solid var(--atbl-annotation-accent);\n }\n\n .altertable-annotation-trigger[aria-pressed=\"true\"], .altertable-annotation-trigger:not([aria-pressed]) {\n background: var(--atbl-annotation-accent);\n color: var(--atbl-annotation-on-accent);\n border-color: #0000;\n }\n\n .altertable-annotation-trigger[aria-pressed=\"true\"]:hover:not(:disabled) {\n --atbl-control-selected-surface: var(--atbl-annotation-accent-hover);\n }\n\n .altertable-annotation-trigger:not([aria-pressed]) {\n --atbl-control-hover-surface: var(--atbl-annotation-accent-hover);\n --atbl-control-pressed-surface: var(--atbl-annotation-accent-hover);\n }\n}\n\n/* packages/data-app-react/src/ui/Button.css */\n@layer atbl.components {\n .altertable-button {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n gap: var(--atbl-control-gap);\n min-height: var(--atbl-control-height);\n padding: var(--atbl-control-padding-block) var(--atbl-control-padding-inline);\n border: 1px solid var(--atbl-border);\n border-radius: var(--atbl-radius-control);\n background: var(--atbl-surface);\n color: var(--atbl-text);\n font: inherit;\n font-size: var(--atbl-type-label-size);\n font-weight: var(--atbl-type-label-weight);\n line-height: var(--atbl-type-label-leading);\n overflow-wrap: anywhere;\n transition: background-color var(--atbl-duration-fast) var(--atbl-ease-standard), border-color var(--atbl-duration-fast) var(--atbl-ease-standard), color var(--atbl-duration-fast) var(--atbl-ease-standard);\n -webkit-tap-highlight-color: transparent;\n max-inline-size: 100%;\n }\n\n .altertable-button[data-size=\"icon\"] {\n width: var(--atbl-control-height);\n min-width: var(--atbl-control-height);\n height: var(--atbl-control-height);\n min-height: var(--atbl-control-height);\n flex: none;\n padding: 0;\n }\n\n .altertable-button[data-variant=\"primary\"] {\n border-color: var(--atbl-text);\n background: var(--atbl-text);\n color: var(--atbl-background);\n --atbl-control-hover-surface: color-mix(in srgb, var(--atbl-text) 92%, var(--atbl-background));\n --atbl-control-pressed-surface: color-mix(in srgb, var(--atbl-text) 84%, var(--atbl-background));\n }\n\n .altertable-button[data-variant=\"outline\"] {\n box-shadow: none;\n }\n\n .altertable-button[data-variant=\"elevated\"] {\n box-shadow: var(--atbl-shadow-surface);\n }\n\n .altertable-button[data-variant=\"ghost\"] {\n box-shadow: none;\n background: none;\n border-color: #0000;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .altertable-button {\n transition: none;\n }\n }\n\n .altertable-button[data-size=\"compact\"] {\n min-height: var(--atbl-control-compact-height);\n padding: calc(var(--atbl-control-padding-block) * 2 / 3) calc(var(--atbl-control-padding-inline) * 2 / 3);\n font-size: var(--atbl-type-meta-size);\n }\n\n .altertable-button[data-size=\"icon-compact\"] {\n width: var(--atbl-control-compact-height);\n min-width: var(--atbl-control-compact-height);\n height: var(--atbl-control-compact-height);\n min-height: var(--atbl-control-compact-height);\n flex: none;\n padding: 0;\n }\n\n .altertable-button[data-size^=\"icon\"] > svg {\n inline-size: var(--atbl-control-icon-size);\n block-size: var(--atbl-control-icon-size);\n }\n\n .altertable-button[data-variant=\"inline\"] {\n --atbl-control-hover-surface: transparent;\n --atbl-control-pressed-surface: transparent;\n --atbl-control-open-surface: transparent;\n box-shadow: none;\n font: inherit;\n text-underline-offset: .2em;\n background: none;\n border: 0;\n border-radius: 0;\n min-height: 0;\n padding: 0;\n }\n\n .altertable-button[data-variant=\"inline\"]:-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, [data-disabled])) {\n text-decoration: underline;\n }\n\n .altertable-button[data-variant=\"inline\"]:-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, [data-disabled])) {\n text-decoration: underline;\n }\n\n .altertable-button[data-variant=\"inline\"]:is(:hover, [data-hovered]):not(:is(:disabled, [data-disabled])) {\n text-decoration: underline;\n }\n}\n\n/* packages/data-app-react/src/ui/Tooltip.css */\n@layer atbl.components {\n .altertable-tooltip-trigger {\n display: inline-flex;\n align-items: center;\n }\n\n .altertable-tooltip-trigger[data-variant=\"chart\"] {\n display: flex;\n align-items: flex-end;\n width: 100%;\n min-width: 0;\n height: 100%;\n }\n\n .altertable-tooltip-content {\n z-index: 1300;\n border: 1px solid var(--atbl-border);\n border-radius: var(--atbl-radius-control);\n background: var(--atbl-surface);\n color: var(--atbl-text);\n box-shadow: var(--atbl-shadow-overlay);\n font: var(--atbl-type-meta-weight) var(--atbl-type-meta-size) / var(--atbl-type-label-leading) var(--atbl-font);\n white-space: normal;\n pointer-events: none;\n animation: altertable-tooltip-in var(--atbl-duration-fast) ease-out;\n width: max-content;\n max-width: min(240px, 100vw - 24px);\n padding: 6px 9px;\n }\n\n .altertable-tooltip-content[data-variant=\"chart\"] {\n display: grid;\n font-variant-numeric: tabular-nums;\n gap: 2px;\n padding: 8px 10px;\n }\n\n .altertable-tooltip-content[data-variant=\"chart\"] strong {\n font-size: var(--atbl-type-body-size);\n font-weight: 650;\n line-height: 1.2;\n }\n\n @keyframes altertable-tooltip-in {\n from {\n opacity: 0;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .altertable-tooltip-content {\n animation: none;\n }\n }\n\n .altertable-chart-tooltip-row {\n display: flex;\n align-items: flex-start;\n gap: 6px;\n }\n\n .altertable-chart-tooltip-marker {\n flex-shrink: 0;\n width: 8px;\n height: 8px;\n margin-top: .3em;\n }\n\n .altertable-chart-tooltip-reading {\n overflow-wrap: anywhere;\n min-width: 0;\n }\n}\n\n/* packages/data-app-react/src/ui/Kbd.css */\n@layer atbl.components {\n .altertable-kbd {\n display: inline-flex;\n border: 1px solid var(--atbl-border);\n background: var(--atbl-subtle);\n color: var(--atbl-muted);\n font: var(--atbl-type-label-weight) var(--atbl-type-meta-size) / var(--atbl-type-label-leading) var(--atbl-font);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n border-radius: 5px;\n justify-content: center;\n align-items: center;\n min-width: 1.6em;\n padding: 2px 5px;\n }\n\n .altertable-button[data-variant=\"primary\"] .altertable-kbd {\n color: inherit;\n border-color: color-mix(in srgb, currentColor 30%, transparent);\n background: none;\n }\n}\n\n/* packages/data-app-react/src/annotations/AnnotationBar.css */\n@layer atbl.components {\n .altertable-annotation-bar, .altertable-annotation-bar-panel {\n --bar-surface: #202326;\n --bar-text: #f2f3f4;\n --bar-muted: #aeb5bc;\n --bar-border: #3b4248;\n --bar-danger: #ffa6a0;\n --bar-danger-surface: #572723;\n --atbl-control-selected-surface: var(--atbl-subtle);\n --atbl-control-selected-text: var(--bar-text);\n --atbl-control-disabled-opacity: 1;\n --atbl-surface: var(--bar-surface);\n --atbl-text: var(--bar-text);\n --atbl-muted: var(--bar-muted);\n --atbl-border: var(--bar-border);\n --atbl-focus-outline: 2px solid var(--atbl-annotation-accent);\n --atbl-subtle: color-mix(in srgb, var(--bar-text) 8%, var(--bar-surface));\n color: var(--bar-text);\n background: var(--bar-surface);\n font: 14px / 1.5 var(--atbl-font);\n box-sizing: border-box;\n border: 1px solid var(--bar-border);\n box-shadow: 0 8px 28px #0003;\n }\n\n .altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip) {\n --bar-surface: #202326;\n --bar-text: #f2f3f4;\n --bar-muted: #aeb5bc;\n --bar-border: #3b4248;\n --bar-danger: #ffa6a0;\n --bar-danger-surface: #572723;\n --atbl-control-selected-surface: var(--atbl-subtle);\n --atbl-control-selected-text: var(--bar-text);\n --atbl-control-disabled-opacity: 1;\n --atbl-surface: var(--bar-surface);\n --atbl-text: var(--bar-text);\n --atbl-muted: var(--bar-muted);\n --atbl-border: var(--bar-border);\n --atbl-focus-outline: 2px solid var(--atbl-annotation-accent);\n --atbl-subtle: color-mix(in srgb, var(--bar-text) 8%, var(--bar-surface));\n color: var(--bar-text);\n background: var(--bar-surface);\n font: 14px / 1.5 var(--atbl-font);\n box-sizing: border-box;\n border: 1px solid var(--bar-border);\n box-shadow: 0 8px 28px #0003;\n }\n\n .altertable-annotation-bar[data-theme=\"dark\"], .altertable-annotation-bar-panel[data-theme=\"dark\"] {\n --bar-surface: #f2f3f4;\n --bar-text: #151719;\n --bar-muted: #505963;\n --bar-border: #dfe3e6;\n --bar-danger: #b42318;\n --bar-danger-surface: #ffe3e3;\n }\n\n .altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip[data-theme=\"dark\"]) {\n --bar-surface: #f2f3f4;\n --bar-text: #151719;\n --bar-muted: #505963;\n --bar-border: #dfe3e6;\n --bar-danger: #b42318;\n --bar-danger-surface: #ffe3e3;\n }\n\n .altertable-annotation-bar {\n position: fixed;\n z-index: 1200;\n display: flex;\n border-radius: 18px;\n align-items: center;\n gap: 4px;\n max-width: calc(100vw - 24px);\n padding: 8px;\n bottom: 16px;\n left: 50%;\n transform: translateX(-50%);\n }\n\n .altertable-annotation-bar .altertable-button, .altertable-annotation-bar-panel .altertable-button {\n color: var(--bar-muted);\n font: inherit;\n flex-shrink: 0;\n width: auto;\n transition: none;\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-count {\n white-space: nowrap;\n color: var(--bar-text);\n padding-inline-start: 6px;\n padding-inline-end: 6px;\n }\n\n .altertable-annotation-bar .altertable-button[data-atbl-internal-drag-handle] {\n --atbl-cursor-action: grab;\n touch-action: none;\n }\n\n .altertable-annotation-bar .altertable-button[data-atbl-internal-drag-handle]:active {\n --atbl-cursor-action: grabbing;\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send {\n --atbl-control-hover-surface: var(--atbl-annotation-accent-hover);\n --atbl-control-pressed-surface: var(--atbl-annotation-accent-hover);\n background: var(--atbl-annotation-accent);\n color: var(--atbl-annotation-on-accent);\n border-color: #0000;\n border-radius: 12px;\n padding-inline-start: 14px;\n padding-inline-end: 14px;\n font-weight: 600;\n line-height: 1.25;\n }\n\n .altertable-annotation-bar-panel {\n position: fixed;\n z-index: 1201;\n overflow: auto;\n border-radius: 16px;\n width: min(420px, 100vw - 24px);\n max-height: min(440px, 45vh);\n margin: 0;\n padding: 6px;\n }\n\n .altertable-annotation-bar-panel header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 8px;\n }\n\n .altertable-annotation-bar-row {\n display: flex;\n border-radius: 10px;\n align-items: center;\n gap: 8px;\n padding: 4px;\n }\n\n .altertable-annotation-bar-row:hover, .altertable-annotation-bar-row:focus-within {\n background: var(--atbl-subtle);\n }\n\n .altertable-annotation-bar-row + .altertable-annotation-bar-row {\n border-top: 1px solid var(--bar-border);\n }\n\n .altertable-annotation-bar-panel .altertable-annotation-bar-open {\n display: grid;\n text-align: left;\n flex: 1;\n justify-content: stretch;\n gap: 2px;\n min-width: 0;\n height: auto;\n padding: 4px 6px;\n }\n\n .altertable-annotation-bar-open strong {\n color: var(--bar-text);\n font-weight: 600;\n }\n\n .altertable-annotation-bar-open span {\n color: var(--bar-muted);\n overflow-wrap: anywhere;\n font-size: 13px;\n }\n\n .altertable-annotation-bar-panel .altertable-annotation-bar-open:hover:not(:disabled) {\n background: none;\n }\n\n .altertable-annotation-bar-error {\n position: absolute;\n background: var(--bar-surface);\n color: var(--bar-text);\n border: 1px solid var(--bar-border);\n border-radius: 10px;\n padding: 8px 12px;\n font-size: 12px;\n bottom: calc(100% + 8px);\n left: 0;\n right: 0;\n }\n\n @media (max-width: 420px) {\n .altertable-annotation-bar {\n gap: 0;\n padding: 6px;\n font-size: 12px;\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send {\n padding-inline-start: 10px;\n padding-inline-end: 10px;\n }\n }\n\n @media (max-width: 360px) {\n .altertable-annotation-bar .altertable-button[data-size=\"icon-compact\"] {\n width: 26px;\n min-width: 26px;\n }\n }\n\n .altertable-tooltip-content:has( > .altertable-annotation-bar-tooltip) {\n font-size: 12px;\n line-height: 1.3;\n }\n\n .altertable-annotation-bar .altertable-button:hover:not(:disabled), .altertable-annotation-bar-panel .altertable-button:hover:not(:disabled) {\n color: var(--bar-text);\n background: var(--atbl-subtle);\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send:hover:not(:disabled) {\n color: var(--atbl-annotation-on-accent);\n background: var(--atbl-annotation-accent-hover);\n }\n\n .altertable-annotation-bar .altertable-button:disabled, .altertable-annotation-bar-panel .altertable-button:disabled {\n color: var(--bar-muted);\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send:disabled {\n color: var(--bar-muted);\n background: var(--atbl-subtle);\n }\n\n .altertable-annotation-bar .altertable-annotation-bar-send {\n position: relative;\n }\n\n .altertable-annotation-bar-send[data-pending] .altertable-annotation-bar-send-label {\n visibility: hidden;\n }\n\n .altertable-annotation-bar-spinner {\n position: absolute;\n animation: 1s linear infinite annotation-bar-spin;\n margin: auto;\n inset: 0;\n }\n\n @keyframes annotation-bar-spin {\n to {\n rotate: 360deg;\n }\n }\n\n .altertable-annotation-discard-description {\n color: var(--atbl-muted);\n font: 14px / 1.55 var(--atbl-font);\n margin: 0;\n }\n\n .altertable-annotation-discard-confirm {\n color: var(--atbl-danger);\n }\n\n @media (prefers-reduced-motion: reduce) {\n .altertable-annotation-bar-spinner {\n animation: none;\n }\n }\n\n .altertable-annotation-bar .altertable-button[aria-pressed=\"true\"] {\n color: var(--bar-text);\n background: var(--atbl-subtle);\n }\n\n .altertable-annotation-undo {\n position: fixed;\n z-index: 1202;\n display: flex;\n border: 1px solid var(--atbl-border);\n border-radius: var(--atbl-radius-overlay);\n background: var(--atbl-surface);\n color: var(--atbl-text);\n box-shadow: var(--atbl-shadow-overlay);\n font: 13px / 1.5 var(--atbl-font);\n align-items: center;\n gap: 12px;\n padding: 8px 12px;\n bottom: 16px;\n left: 16px;\n }\n\n .altertable-annotation-thumbnail {\n border: 1px solid var(--bar-border);\n overflow: hidden;\n background: var(--bar-surface);\n --atbl-cursor-action: zoom-in;\n border-radius: 6px;\n flex-shrink: 0;\n width: 56px;\n height: 40px;\n padding: 0;\n }\n\n .altertable-annotation-thumbnail img {\n object-fit: contain;\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .altertable-annotation-thumbnail:focus-visible {\n outline: 2px solid var(--atbl-annotation-accent);\n outline-offset: 2px;\n }\n\n .altertable-annotation-preview {\n display: block;\n object-fit: contain;\n width: 100%;\n max-height: 65vh;\n }\n\n .altertable-annotation-undo[data-bar-visible] {\n bottom: 88px;\n }\n\n .altertable-annotation-undo[data-inline] {\n position: static;\n box-shadow: none;\n border-radius: 8px;\n margin-top: 6px;\n }\n\n .altertable-sheet.altertable-annotation-image-dialog[data-placement=\"center\"] {\n width: min(960px, 100vw - 32px);\n }\n}\n\n/* packages/data-app-react/src/ui/Sheet.css */\n@layer atbl.components {\n :root:has(.altertable-sheet:modal) {\n overflow: hidden;\n }\n\n .altertable-sheet:not([open]) {\n display: none;\n }\n\n .altertable-sheet {\n position: fixed;\n inset: var(--atbl-frame-inset-top, 0px) 0 auto auto;\n height: var(--atbl-frame-visible-height);\n overflow: visible;\n border: 0;\n border-left: 1px solid var(--atbl-border);\n background: var(--atbl-surface);\n color: var(--atbl-text);\n box-shadow: var(--atbl-shadow-overlay);\n font: var(--atbl-type-body-size) / var(--atbl-type-label-leading) var(--atbl-font);\n opacity: 0;\n transition: translate var(--atbl-duration-slow) cubic-bezier(.22, 1, .36, 1), opacity var(--atbl-duration-slow) var(--atbl-ease-standard);\n border-radius: 0;\n width: min(640px, 100vw);\n max-width: none;\n max-height: none;\n margin: 0;\n padding: 0;\n translate: 100%;\n }\n\n .altertable-sheet[data-wide] {\n width: min(960px, 100vw);\n }\n\n .altertable-sheet[open] {\n opacity: 1;\n translate: 0;\n }\n\n @starting-style {\n .altertable-sheet[open] {\n opacity: 0;\n translate: 100%;\n }\n }\n\n .altertable-sheet[open][data-closing] {\n opacity: 0;\n transition-timing-function: ease-in;\n translate: 100%;\n }\n\n .altertable-sheet::backdrop {\n background: var(--atbl-backdrop);\n opacity: 0;\n transition: opacity var(--atbl-duration-slow) var(--atbl-ease-standard);\n }\n\n .altertable-sheet[open]::backdrop {\n opacity: 1;\n }\n\n .altertable-sheet[open][data-closing]::backdrop {\n opacity: 0;\n }\n\n @starting-style {\n .altertable-sheet[open]::backdrop {\n opacity: 0;\n }\n }\n\n .altertable-sheet-shell {\n display: grid;\n grid-template-rows: auto minmax(0, 1fr) auto;\n height: 100%;\n }\n\n .altertable-sheet-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: var(--atbl-space-md);\n padding: var(--atbl-space-lg) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2) calc((var(--atbl-space-md) + var(--atbl-space-lg)) / 2);\n border-bottom: 1px solid var(--atbl-border);\n }\n\n .altertable-sheet-header h2 {\n font-size: var(--atbl-type-section-size);\n font-weight: var(--atbl-type-heading-weight);\n line-height: var(--atbl-type-heading-leading);\n letter-spacing: -.02em;\n overflow-wrap: anywhere;\n margin: 0;\n }\n\n .altertable-sheet-header p {\n color: var(--atbl-muted);\n font-size: var(--atbl-type-label-size);\n margin: 4px 0 0;\n line-height: 1.45;\n }\n\n .altertable-sheet-actions {\n display: flex;\n align-items: center;\n gap: 4px;\n margin: -4px -8px 0 0;\n }\n\n .altertable-sheet-close {\n color: var(--atbl-muted);\n }\n\n .altertable-sheet-body {\n overflow-y: auto;\n overscroll-behavior: contain;\n padding: var(--atbl-space-lg) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2) calc(var(--atbl-space-xl) + var(--atbl-space-md) / 2);\n min-height: 0;\n }\n\n .altertable-sheet-footer {\n padding: var(--atbl-space-md) calc((var(--atbl-space-lg) + var(--atbl-space-xl)) / 2);\n border-top: 1px solid var(--atbl-border);\n }\n\n @media (min-width: 601px) {\n .altertable-sheet:where([data-placement=\"side\"][data-side=\"left\"]) {\n inset: var(--atbl-frame-inset-top, 0px) auto auto 0;\n border-left: 0;\n border-right: 1px solid var(--atbl-border);\n translate: -100%;\n }\n\n .altertable-sheet:where([data-placement=\"side\"][data-side=\"left\"])[open] {\n translate: 0;\n }\n\n .altertable-sheet:where([data-placement=\"side\"][data-side=\"left\"])[open][data-closing] {\n translate: -100%;\n }\n\n @starting-style {\n .altertable-sheet:where([data-placement=\"side\"][data-side=\"left\"])[open] {\n translate: -100%;\n }\n }\n }\n\n @media (max-width: 960px) {\n .altertable-sheet[data-wide] {\n inset: auto 0 var(--atbl-frame-inset-bottom, 0px);\n box-shadow: none;\n border: 0;\n translate: 0 100%;\n }\n\n .altertable-sheet[data-wide][open] {\n translate: 0;\n }\n\n .altertable-sheet[data-wide][open][data-closing] {\n translate: 0 100%;\n }\n\n @starting-style {\n .altertable-sheet[data-wide][open] {\n translate: 0 100%;\n }\n }\n }\n\n @media (max-width: 600px) {\n .altertable-sheet {\n inset: auto 0 var(--atbl-frame-inset-bottom, 0px);\n box-shadow: none;\n border: 0;\n translate: 0 100%;\n }\n\n .altertable-sheet[open] {\n translate: 0;\n }\n\n .altertable-sheet[open][data-closing] {\n translate: 0 100%;\n }\n\n @starting-style {\n .altertable-sheet[open] {\n translate: 0 100%;\n }\n }\n\n .altertable-sheet-header {\n padding: 20px 20px 16px;\n }\n\n .altertable-sheet-body {\n padding: 20px 20px 32px;\n }\n\n .altertable-sheet-footer {\n padding: 14px 20px;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .altertable-sheet, .altertable-sheet[open][data-closing] {\n transition: none;\n translate: 0;\n }\n\n .altertable-sheet::backdrop {\n transition: none;\n }\n\n @starting-style {\n .altertable-sheet[open] {\n translate: 0;\n }\n }\n }\n\n .altertable-sheet[data-placement=\"center\"] {\n inset: var(--atbl-frame-inset-top, 0px) 0 var(--atbl-frame-inset-bottom, 0px);\n max-height: calc(var(--atbl-frame-visible-height) - 32px);\n border: 1px solid var(--atbl-border, #e3e6e8);\n border-radius: var(--atbl-radius-overlay);\n width: min(480px, 100vw - 32px);\n height: -moz-fit-content;\n height: fit-content;\n margin: auto;\n translate: 0;\n }\n\n .altertable-sheet[data-placement=\"center\"] .altertable-sheet-shell {\n height: auto;\n }\n\n .altertable-sheet[data-placement=\"center\"] .altertable-sheet-header {\n padding: 20px 24px 16px;\n }\n\n .altertable-sheet[data-placement=\"center\"] .altertable-sheet-body {\n padding: 0 24px 20px;\n }\n\n .altertable-sheet[data-placement=\"center\"] .altertable-sheet-footer {\n padding: 16px 24px;\n }\n}\n\n/* packages/data-app-react/src/ui/GradientScroll.css */\n@layer atbl.components {\n .altertable-gradient-scroll {\n overflow: auto;\n --atbl-scroll-fade-size: 1.5rem;\n min-width: 0;\n min-height: 0;\n }\n\n .altertable-gradient-scroll[data-axis=\"vertical\"] {\n overflow-x: hidden;\n }\n\n .altertable-gradient-scroll[data-axis=\"horizontal\"] {\n overflow-y: hidden;\n }\n\n .altertable-gradient-scroll[data-axis=\"vertical\"][data-fade-start][data-fade-end] {\n mask-image: linear-gradient(to bottom, transparent, black var(--atbl-scroll-fade-size), black calc(100% - var(--atbl-scroll-fade-size)), transparent);\n }\n\n .altertable-gradient-scroll[data-axis=\"vertical\"][data-fade-start]:not([data-fade-end]) {\n mask-image: linear-gradient(to bottom, transparent, black var(--atbl-scroll-fade-size));\n }\n\n .altertable-gradient-scroll[data-axis=\"vertical\"][data-fade-end]:not([data-fade-start]) {\n mask-image: linear-gradient(to bottom, black, black calc(100% - var(--atbl-scroll-fade-size)), transparent);\n }\n\n .altertable-gradient-scroll[data-axis=\"horizontal\"][data-fade-start][data-fade-end] {\n mask-image: linear-gradient(to right, transparent, black var(--atbl-scroll-fade-size), black calc(100% - var(--atbl-scroll-fade-size)), transparent);\n }\n\n .altertable-gradient-scroll[data-axis=\"horizontal\"][data-fade-start]:not([data-fade-end]) {\n mask-image: linear-gradient(to right, transparent, black var(--atbl-scroll-fade-size));\n }\n\n .altertable-gradient-scroll[data-axis=\"horizontal\"][data-fade-end]:not([data-fade-start]) {\n mask-image: linear-gradient(to right, black, black calc(100% - var(--atbl-scroll-fade-size)), transparent);\n }\n}\n\n/* packages/data-app-react/src/ui/Focus.css */\n@layer atbl.interaction {\n [data-atbl-focus=\"inset\"][data-atbl-internal-focus-state=\"focused\"][data-focused] {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"ring\"]:-webkit-any(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"ring\"]:-moz-any(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"ring\"]:is(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"ring\"]:has( > input:focus-visible) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"inset\"]:-webkit-any(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"inset\"]:-moz-any(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"inset\"]:is(:focus-visible, [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-internal-prose] a:focus-visible {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-offset);\n }\n\n [data-atbl-focus=\"inset\"][data-atbl-internal-focus-state=\"focused\"][data-focused] {\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"inset\"]:-webkit-any(:focus-visible, [data-focus-visible]) {\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"inset\"]:-moz-any(:focus-visible, [data-focus-visible]) {\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"inset\"]:is(:focus-visible, [data-focus-visible]) {\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"group\"]:-webkit-any(:focus-within, [data-focus-within], [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"group\"]:-moz-any(:focus-within, [data-focus-within], [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"group\"]:is(:focus-within, [data-focus-within], [data-focus-visible]) {\n outline: var(--atbl-focus-outline, 1px solid var(--atbl-focus-color, var(--atbl-muted)));\n outline-offset: var(--atbl-focus-ring-inset);\n }\n\n [data-atbl-focus=\"group\"] input:focus-visible {\n outline: none;\n }\n\n @media (forced-colors: active) {\n [data-atbl-focus]:-webkit-any(:focus-visible, :focus-within, [data-focus-visible]) {\n outline-color: highlight !important;\n }\n\n [data-atbl-focus]:-moz-any(:focus-visible, :focus-within, [data-focus-visible]) {\n outline-color: highlight !important;\n }\n\n [data-atbl-focus]:is(:focus-visible, :focus-within, [data-focus-visible]) {\n outline-color: highlight !important;\n }\n\n [data-atbl-internal-prose] a:focus-visible {\n outline-color: highlight !important;\n }\n }\n}\n\n/* packages/data-app-react/src/interaction.css */\n@layer atbl.interaction {\n [data-atbl-control=\"default\"] {\n cursor: default;\n }\n\n [data-atbl-control=\"action\"], [data-atbl-internal-prose] a {\n cursor: var(--atbl-cursor-action);\n }\n\n [data-atbl-control=\"help\"] {\n cursor: var(--atbl-cursor-help);\n }\n\n [data-atbl-control=\"text\"] {\n cursor: text;\n font-size: var(--atbl-control-text-size, var(--atbl-type-body-size));\n }\n\n @media (max-width: 560px), (any-pointer: coarse) {\n [data-atbl-control=\"text\"] {\n font-size: max(16px, var(--atbl-control-text-size, var(--atbl-type-body-size)));\n }\n }\n\n [data-atbl-control]:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], [data-unavailable]) {\n cursor: var(--atbl-cursor-disabled);\n }\n\n [data-atbl-control]:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], [data-unavailable]) {\n cursor: var(--atbl-cursor-disabled);\n }\n\n [data-atbl-control]:is(:disabled, [data-disabled], [aria-disabled=\"true\"], [data-unavailable]) {\n cursor: var(--atbl-cursor-disabled);\n }\n\n [data-atbl-control]:has( > input:disabled) {\n cursor: var(--atbl-cursor-disabled);\n }\n\n [data-atbl-control=\"action\"]:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"action\"]:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"action\"]:is(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"help\"]:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"help\"]:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control=\"help\"]:is(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control]:has( > input:disabled) {\n opacity: var(--atbl-control-disabled-opacity);\n }\n\n [data-atbl-control][aria-busy=\"true\"]:not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n cursor: var(--atbl-cursor-busy);\n }\n\n [data-atbl-control][aria-busy=\"true\"]:not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n cursor: var(--atbl-cursor-busy);\n }\n\n [data-atbl-control][aria-busy=\"true\"]:not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n cursor: var(--atbl-cursor-busy);\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):-webkit-any(:hover, [data-hovered], [data-focused], [data-open=\"true\"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, var(--atbl-subtle));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):-moz-any(:hover, [data-hovered], [data-focused], [data-open=\"true\"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, var(--atbl-subtle));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):is(:hover, [data-hovered], [data-focused], [data-open=\"true\"]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, var(--atbl-subtle));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):-webkit-any(:active, [data-pressed]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):-moz-any(:active, [data-pressed]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));\n }\n\n :where([data-atbl-internal-surface=\"control\"], [data-atbl-internal-surface=\"option\"]):is(:active, [data-pressed]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-surface)));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-webkit-any([aria-expanded=\"true\"], [data-open=\"true\"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-open-surface, var(--atbl-surface));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-moz-any([aria-expanded=\"true\"], [data-open=\"true\"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-open-surface, var(--atbl-surface));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):is([aria-expanded=\"true\"], [data-open=\"true\"]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-open-surface, var(--atbl-surface));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-webkit-any([data-variant=\"outline\"], [data-variant=\"elevated\"]):-webkit-any([aria-expanded=\"true\"], [data-open=\"true\"]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n border-color: var(--atbl-control-open-border, var(--atbl-muted));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-moz-any([data-variant=\"outline\"], [data-variant=\"elevated\"]):-moz-any([aria-expanded=\"true\"], [data-open=\"true\"]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n border-color: var(--atbl-control-open-border, var(--atbl-muted));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):is([data-variant=\"outline\"], [data-variant=\"elevated\"]):is([aria-expanded=\"true\"], [data-open=\"true\"]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n border-color: var(--atbl-control-open-border, var(--atbl-muted));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-webkit-any([aria-pressed=\"true\"], [data-selected], [aria-current=\"true\"], :has( > input:checked)):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):-moz-any([aria-pressed=\"true\"], [data-selected], [aria-current=\"true\"], :has( > input:checked)):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"control\"]):is([aria-pressed=\"true\"], [data-selected], [aria-current=\"true\"], :has( > input:checked)):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-selected-surface, var(--atbl-subtle));\n color: var(--atbl-control-selected-text, var(--atbl-text));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:is(:hover, [data-hovered]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-hover-surface, color-mix(in srgb, var(--atbl-text) 4%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:-webkit-any(:active, [data-pressed]):not(:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:-moz-any(:active, [data-pressed]):not(:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"option\"])[data-selected]:is(:active, [data-pressed]):not(:is(:disabled, [data-disabled], [aria-disabled=\"true\"], :has( > input:disabled))) {\n background: var(--atbl-control-pressed-surface, color-mix(in srgb, var(--atbl-text) 8%, var(--atbl-control-selected-surface, var(--atbl-subtle))));\n }\n\n :where([data-atbl-internal-surface=\"field\"], [data-atbl-internal-surface=\"control\"][data-variant=\"outline\"], [data-atbl-internal-surface=\"control\"][data-variant=\"elevated\"]):-webkit-any(:hover, [data-hovered]):not(:-webkit-any(:disabled, :has(input:disabled), [data-disabled], [aria-disabled=\"true\"], [data-invalid], [aria-invalid=\"true\"], :has(input[aria-invalid=\"true\"]))) {\n border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));\n }\n\n :where([data-atbl-internal-surface=\"field\"], [data-atbl-internal-surface=\"control\"][data-variant=\"outline\"], [data-atbl-internal-surface=\"control\"][data-variant=\"elevated\"]):-moz-any(:hover, [data-hovered]):not(:-moz-any(:disabled, :has(input:disabled), [data-disabled], [aria-disabled=\"true\"], [data-invalid], [aria-invalid=\"true\"], :has(input[aria-invalid=\"true\"]))) {\n border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));\n }\n\n :where([data-atbl-internal-surface=\"field\"], [data-atbl-internal-surface=\"control\"][data-variant=\"outline\"], [data-atbl-internal-surface=\"control\"][data-variant=\"elevated\"]):is(:hover, [data-hovered]):not(:is(:disabled, :has(input:disabled), [data-disabled], [aria-disabled=\"true\"], [data-invalid], [aria-invalid=\"true\"], :has(input[aria-invalid=\"true\"]))) {\n border-color: var(--atbl-control-hover-border, color-mix(in srgb, var(--atbl-muted) 45%, var(--atbl-border)));\n }\n\n [data-atbl-internal-surface=\"field\"]:-webkit-any([data-invalid], [aria-invalid=\"true\"]) {\n border-color: var(--atbl-danger);\n --atbl-focus-color: var(--atbl-danger);\n }\n\n [data-atbl-internal-surface=\"field\"]:-moz-any([data-invalid], [aria-invalid=\"true\"]) {\n border-color: var(--atbl-danger);\n --atbl-focus-color: var(--atbl-danger);\n }\n\n [data-atbl-internal-surface=\"field\"]:is([data-invalid], [aria-invalid=\"true\"]) {\n border-color: var(--atbl-danger);\n --atbl-focus-color: var(--atbl-danger);\n }\n\n [data-atbl-internal-surface=\"field\"]:has(input[aria-invalid=\"true\"]) {\n border-color: var(--atbl-danger);\n --atbl-focus-color: var(--atbl-danger);\n }\n\n [data-atbl-control=\"text\"]:-webkit-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n color: var(--atbl-muted);\n }\n\n [data-atbl-control=\"text\"]:-moz-any(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n color: var(--atbl-muted);\n }\n\n [data-atbl-control=\"text\"]:is(:disabled, [data-disabled], [aria-disabled=\"true\"]) {\n color: var(--atbl-muted);\n }\n}\n\n/* packages/data-app-react/src/annotations/styles.css */\n@layer atbl.tokens, atbl.base, atbl.components, atbl.interaction;\n",
1039
+ options
1040
+ });
2841
1041
  }
2842
- export {
2843
- AnnotationBar,
2844
- AnnotationTarget,
2845
- Breakdown,
2846
- Button2 as Button,
2847
- Comparison,
2848
- DataApp,
2849
- DataSection,
2850
- DataValue,
2851
- DateDisplay2 as DateDisplay,
2852
- DateTimeTooltip2 as DateTimeTooltip,
2853
- DetailContent2 as DetailContent,
2854
- DetailView2 as DetailView,
2855
- EmptyState2 as EmptyState,
2856
- Grid,
2857
- GridItem,
2858
- IconButton2 as IconButton,
2859
- MetricWidget,
2860
- PeriodSummary,
2861
- Ranking,
2862
- SectionHeading2 as SectionHeading,
2863
- Skeleton2 as Skeleton,
2864
- Stack2 as Stack,
2865
- TableWidget,
2866
- TextContent2 as TextContent,
2867
- TextWidget,
2868
- Tooltip2 as Tooltip,
2869
- TooltipProvider2 as TooltipProvider,
2870
- UpdatedAt,
2871
- VisualizationWidget,
2872
- chartColor2 as chartColor,
2873
- choiceVariable2 as choiceVariable,
2874
- createDataContext2 as createDataContext,
2875
- createDataHooks2 as createDataHooks,
2876
- dateRangeVariable2 as dateRangeVariable,
2877
- defineDataIdentifiers,
2878
- injectDataAppAnnotationStyles,
2879
- injectDataAppStyles2 as injectDataAppStyles,
2880
- mountDataApp2 as mountDataApp,
2881
- multiChoiceVariable2 as multiChoiceVariable,
2882
- searchVariable2 as searchVariable,
2883
- useDataAppAnnotations2 as useDataAppAnnotations,
2884
- useDateFormatting2 as useDateFormatting,
2885
- useDetailNavigation2 as useDetailNavigation
2886
- };
1042
+ //#endregion
1043
+ export { AnnotationBar, AnnotationTarget, Breakdown, Button, Comparison, DataApp, DataSection, DataValue, DateDisplay, DateTimeTooltip, DetailContent, DetailView, EmptyState, Grid, GridItem, IconButton, MetricWidget, PeriodSummary, Ranking, SectionHeading, Skeleton, Stack, TableWidget, TextContent, TextWidget, Tooltip, TooltipProvider, UpdatedAt, VisualizationWidget, chartColor, choiceVariable, createDataContext, createDataHooks, dateRangeVariable, defineDataIdentifiers, injectDataAppAnnotationStyles, injectDataAppStyles, mountDataApp, multiChoiceVariable, searchVariable, useDataAppAnnotations, useDateFormatting, useDetailNavigation };
2887
1044
 
2888
- //# debugId=8E81DE85752CDA4F64756E2164756E21
1045
+ //# sourceMappingURL=index.js.map