@altertable/data-app 0.70.0 → 0.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +7 -1
- package/CONTRIBUTING.md +59 -26
- package/README.md +22 -26
- package/REFERENCE.md +1900 -0
- package/dist/chunks/index-5a27erdg.js +54 -0
- package/dist/chunks/index-5a27erdg.js.map +10 -0
- package/dist/chunks/{index-58kks6a8.js → index-9yxr7nmm.js} +330 -21
- package/dist/chunks/index-9yxr7nmm.js.map +17 -0
- package/dist/chunks/{index-wjt6cavj.js → index-j5q5n3ra.js} +5 -5
- package/dist/chunks/index-j5q5n3ra.js.map +10 -0
- package/dist/chunks/{index-22d576sn.js → index-q75zm3a7.js} +3 -3
- package/dist/chunks/{index-22d576sn.js.map → index-q75zm3a7.js.map} +3 -3
- package/dist/chunks/{index-9zqbrv2z.js → index-vhaec7m5.js} +4 -6
- package/dist/chunks/index-vhaec7m5.js.map +10 -0
- package/dist/chunks/{index-q1w84fv9.js → index-zp78caex.js} +345 -84
- package/dist/chunks/index-zp78caex.js.map +19 -0
- package/dist/client/index.js +284 -16
- package/dist/client/index.js.map +7 -3
- package/dist/core/appearance.js +181 -11
- package/dist/core/appearance.js.map +4 -3
- package/dist/core/config.js +3 -3
- package/dist/core/contract.js +10 -12
- package/dist/core/contract.js.map +1 -1
- package/dist/core/format.js +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/internal.js +418 -0
- package/dist/internal.js.map +15 -0
- package/dist/server/index.js +102 -0
- package/dist/server/index.js.map +10 -0
- package/dist/types/client/annotations.d.ts +1 -1
- package/dist/types/client/iframe.d.ts +6 -6
- package/dist/types/client/index.d.ts +3 -4
- package/dist/types/client/location.d.ts +2 -2
- package/dist/types/client/logger.d.ts +1 -1
- package/dist/types/client/navigation.d.ts +1 -1
- package/dist/types/client/transport.d.ts +1 -1
- package/dist/types/core/bridge.d.ts +1 -1
- package/dist/types/core/filters.d.ts +1 -1
- package/dist/types/core/format.d.ts +1 -2
- package/dist/types/core/messages.d.ts +3 -3
- package/dist/types/core/operation-types.d.ts +1 -1
- package/dist/types/core/presentation.d.ts +1 -1
- package/dist/types/core/reading.d.ts +1 -1
- package/dist/types/internal.d.ts +22 -0
- package/dist/types/server/index.d.ts +1 -2
- package/docs/app-authoring.md +2 -1
- package/docs/contract.md +1 -1
- package/docs/data-context.md +3 -3
- package/docs/embed.md +4 -4
- package/docs/formatting-and-appearance.md +1 -1
- package/docs/hosted-apps.md +4 -0
- package/docs/react-embed.md +7 -6
- package/docs/react.md +5 -5
- package/docs/server-bun.md +5 -5
- package/docs/stories-and-export.md +3 -3
- package/docs/styling.md +2 -2
- package/docs/ui.md +6 -6
- package/docs/views.md +1 -1
- package/docs/widgets.md +4 -4
- package/docs/worker.md +4 -4
- package/examples/starter-data-app/index.tsx +1 -1
- package/examples/starter-local-data-app/AGENTS.md +1 -1
- package/examples/starter-local-data-app/README.md +12 -10
- package/examples/starter-local-data-app/package.json +3 -1
- package/examples/starter-local-data-app/src/App.tsx +1 -1
- package/examples/starter-local-data-app/src/data-context.ts +1 -1
- package/examples/starter-local-data-app/src/main.tsx +1 -1
- package/examples/starter-local-data-app/src/server.ts +1 -1
- package/package.json +16 -92
- package/THIRD_PARTY_NOTICES +0 -18
- package/dist/chunks/index-2ajhmsc4.js +0 -355
- package/dist/chunks/index-2ajhmsc4.js.map +0 -13
- package/dist/chunks/index-58kks6a8.js.map +0 -13
- package/dist/chunks/index-7q99hf1z.js +0 -87
- package/dist/chunks/index-7q99hf1z.js.map +0 -10
- package/dist/chunks/index-9zqbrv2z.js.map +0 -10
- package/dist/chunks/index-cv36cyna.js +0 -180
- package/dist/chunks/index-cv36cyna.js.map +0 -10
- package/dist/chunks/index-q1w84fv9.js.map +0 -15
- package/dist/chunks/index-rew95tbg.js +0 -272
- package/dist/chunks/index-rew95tbg.js.map +0 -13
- package/dist/chunks/index-vtpygsbq.js +0 -17270
- package/dist/chunks/index-vtpygsbq.js.map +0 -126
- package/dist/chunks/index-wjt6cavj.js.map +0 -10
- package/dist/chunks/index-wss3gd3h.js +0 -319
- package/dist/chunks/index-wss3gd3h.js.map +0 -13
- package/dist/chunks/index-xzb7sx6g.js +0 -221
- package/dist/chunks/index-xzb7sx6g.js.map +0 -12
- package/dist/embed/index.js +0 -138
- package/dist/embed/index.js.map +0 -12
- package/dist/local.js +0 -465
- package/dist/local.js.map +0 -16
- package/dist/preview.js +0 -1456
- package/dist/preview.js.map +0 -17
- package/dist/react/embed/index.js +0 -117
- package/dist/react/embed/index.js.map +0 -10
- package/dist/react/index.js +0 -2890
- package/dist/react/index.js.map +0 -23
- package/dist/react/ui/index.js +0 -3514
- package/dist/react/ui/index.js.map +0 -36
- package/dist/server.js +0 -334
- package/dist/server.js.map +0 -15
- package/dist/types/core/time-interval.d.ts +0 -96
- package/dist/types/embed/bootstrap.d.ts +0 -5
- package/dist/types/embed/bridge.d.ts +0 -12
- package/dist/types/embed/host.d.ts +0 -36
- package/dist/types/embed/index.d.ts +0 -14
- package/dist/types/embed/navigation.d.ts +0 -6
- package/dist/types/embed/runtime-html.d.ts +0 -2
- package/dist/types/embed/source.d.ts +0 -16
- package/dist/types/embed/sql.d.ts +0 -4
- package/dist/types/react/actions.d.ts +0 -53
- package/dist/types/react/annotations/AnnotationBar.d.ts +0 -30
- package/dist/types/react/annotations/AnnotationControls.d.ts +0 -10
- package/dist/types/react/annotations/AnnotationEditor.d.ts +0 -16
- package/dist/types/react/annotations/AnnotationMarkers.d.ts +0 -19
- package/dist/types/react/annotations/AnnotationSelectionLayer.d.ts +0 -12
- package/dist/types/react/annotations/AnnotationTarget.d.ts +0 -9
- package/dist/types/react/annotations/AnnotationTooltip.d.ts +0 -9
- package/dist/types/react/annotations/AnnotationTrigger.d.ts +0 -10
- package/dist/types/react/annotations/annotation-editor-state.d.ts +0 -58
- package/dist/types/react/annotations/annotation-screenshot.d.ts +0 -4
- package/dist/types/react/annotations/annotation-targets.d.ts +0 -34
- package/dist/types/react/annotations/getAnnotationProps.d.ts +0 -17
- package/dist/types/react/annotations/styles.d.ts +0 -3
- package/dist/types/react/annotations/useAnnotationGeometry.d.ts +0 -22
- package/dist/types/react/annotations/useDataAppAnnotations.d.ts +0 -22
- package/dist/types/react/app-context.d.ts +0 -3
- package/dist/types/react/bindings.d.ts +0 -169
- package/dist/types/react/content.d.ts +0 -36
- package/dist/types/react/date-formatting.d.ts +0 -12
- package/dist/types/react/details.d.ts +0 -46
- package/dist/types/react/embed/bridge.d.ts +0 -21
- package/dist/types/react/embed/index.d.ts +0 -7
- package/dist/types/react/exploration.d.ts +0 -44
- package/dist/types/react/hooks.d.ts +0 -113
- package/dist/types/react/index.d.ts +0 -78
- package/dist/types/react/injectStyles.d.ts +0 -7
- package/dist/types/react/mount.d.ts +0 -13
- package/dist/types/react/search-suggestions.d.ts +0 -8
- package/dist/types/react/source-owner.d.ts +0 -2
- package/dist/types/react/style-contract.d.ts +0 -88
- package/dist/types/react/style-validation.d.ts +0 -2
- package/dist/types/react/styles.d.ts +0 -8
- package/dist/types/react/ui/AboutData.d.ts +0 -73
- package/dist/types/react/ui/AltertableLogo.d.ts +0 -3
- package/dist/types/react/ui/AppFooter.d.ts +0 -6
- package/dist/types/react/ui/AppHeader.d.ts +0 -10
- package/dist/types/react/ui/AppLayout.d.ts +0 -10
- package/dist/types/react/ui/AppScope.d.ts +0 -7
- package/dist/types/react/ui/AppToolbar.d.ts +0 -30
- package/dist/types/react/ui/AreaChart.d.ts +0 -7
- package/dist/types/react/ui/BarChart.d.ts +0 -6
- package/dist/types/react/ui/Breakdown.d.ts +0 -13
- package/dist/types/react/ui/Button.d.ts +0 -12
- package/dist/types/react/ui/ChartLegend.d.ts +0 -32
- package/dist/types/react/ui/Checkbox.d.ts +0 -21
- package/dist/types/react/ui/CheckboxGroup.d.ts +0 -7
- package/dist/types/react/ui/ChoicePicker.d.ts +0 -39
- package/dist/types/react/ui/Comparison.d.ts +0 -14
- package/dist/types/react/ui/ComposedChart.d.ts +0 -41
- package/dist/types/react/ui/ComposedChartLegend.d.ts +0 -9
- package/dist/types/react/ui/ContentSkeleton.d.ts +0 -7
- package/dist/types/react/ui/DataApp.d.ts +0 -24
- package/dist/types/react/ui/DataAppFrame.d.ts +0 -52
- package/dist/types/react/ui/DataBoundary.d.ts +0 -14
- package/dist/types/react/ui/DataSection.d.ts +0 -14
- package/dist/types/react/ui/DataSectionBoundary.d.ts +0 -30
- package/dist/types/react/ui/DataTable.d.ts +0 -29
- package/dist/types/react/ui/DataValue.d.ts +0 -9
- package/dist/types/react/ui/DataViewToast.d.ts +0 -11
- package/dist/types/react/ui/DataWidget.d.ts +0 -37
- package/dist/types/react/ui/DateDisplay.d.ts +0 -9
- package/dist/types/react/ui/DateRangePicker.d.ts +0 -30
- package/dist/types/react/ui/DateTimeTooltip.d.ts +0 -10
- package/dist/types/react/ui/DimensionPicker.d.ts +0 -13
- package/dist/types/react/ui/EmptyState.d.ts +0 -6
- package/dist/types/react/ui/ExplorationActionControl.d.ts +0 -60
- package/dist/types/react/ui/ExportControl.d.ts +0 -4
- package/dist/types/react/ui/FilterActions.d.ts +0 -10
- package/dist/types/react/ui/FilterBar.d.ts +0 -3
- package/dist/types/react/ui/FunnelChart.d.ts +0 -20
- package/dist/types/react/ui/GettingStarted.d.ts +0 -6
- package/dist/types/react/ui/GlossaryDefinition.d.ts +0 -7
- package/dist/types/react/ui/GlossaryExplanation.d.ts +0 -16
- package/dist/types/react/ui/GradientScroll.d.ts +0 -23
- package/dist/types/react/ui/Grid.d.ts +0 -12
- package/dist/types/react/ui/GridItem.d.ts +0 -7
- package/dist/types/react/ui/HelpPopover.d.ts +0 -21
- package/dist/types/react/ui/IconButton.d.ts +0 -19
- package/dist/types/react/ui/InspectionContext.d.ts +0 -12
- package/dist/types/react/ui/InspectionProvider.d.ts +0 -29
- package/dist/types/react/ui/JourneyChart.d.ts +0 -10
- package/dist/types/react/ui/Kbd.d.ts +0 -7
- package/dist/types/react/ui/LineChart.d.ts +0 -7
- package/dist/types/react/ui/LiveControl.d.ts +0 -10
- package/dist/types/react/ui/Menu.d.ts +0 -13
- package/dist/types/react/ui/MetricWidget.d.ts +0 -51
- package/dist/types/react/ui/NumberField.d.ts +0 -27
- package/dist/types/react/ui/NumberFilterPicker.d.ts +0 -11
- package/dist/types/react/ui/PeriodSummary.d.ts +0 -17
- package/dist/types/react/ui/PickerField.d.ts +0 -23
- package/dist/types/react/ui/PieChart.d.ts +0 -11
- package/dist/types/react/ui/PopoverSurface.d.ts +0 -5
- package/dist/types/react/ui/PresentStory.d.ts +0 -30
- package/dist/types/react/ui/QueryList.d.ts +0 -14
- package/dist/types/react/ui/RadioGroup.d.ts +0 -18
- package/dist/types/react/ui/Ranking.d.ts +0 -13
- package/dist/types/react/ui/RefreshControl.d.ts +0 -9
- package/dist/types/react/ui/RequestHint.d.ts +0 -20
- package/dist/types/react/ui/RetentionChart.d.ts +0 -27
- package/dist/types/react/ui/ScatterChart.d.ts +0 -17
- package/dist/types/react/ui/SearchField.d.ts +0 -23
- package/dist/types/react/ui/SearchInput.d.ts +0 -10
- package/dist/types/react/ui/SearchMatch.d.ts +0 -6
- package/dist/types/react/ui/SearchTypeahead.d.ts +0 -15
- package/dist/types/react/ui/SectionHeading.d.ts +0 -8
- package/dist/types/react/ui/Select.d.ts +0 -22
- package/dist/types/react/ui/SelectionMark.d.ts +0 -5
- package/dist/types/react/ui/Sheet.d.ts +0 -21
- package/dist/types/react/ui/Skeleton.d.ts +0 -8
- package/dist/types/react/ui/Stack.d.ts +0 -7
- package/dist/types/react/ui/StaticDataApp.d.ts +0 -4
- package/dist/types/react/ui/StatusPanel.d.ts +0 -10
- package/dist/types/react/ui/TableWidget.d.ts +0 -67
- package/dist/types/react/ui/Tabs.d.ts +0 -10
- package/dist/types/react/ui/TextContent.d.ts +0 -4
- package/dist/types/react/ui/TextWidget.d.ts +0 -20
- package/dist/types/react/ui/ThemeSelector.d.ts +0 -12
- package/dist/types/react/ui/Toast.d.ts +0 -8
- package/dist/types/react/ui/Tooltip.d.ts +0 -23
- package/dist/types/react/ui/TooltipSurface.d.ts +0 -3
- package/dist/types/react/ui/TrendChart.d.ts +0 -5
- package/dist/types/react/ui/UpdatedAt.d.ts +0 -9
- package/dist/types/react/ui/VariableBar.d.ts +0 -6
- package/dist/types/react/ui/VisualizationWidget.d.ts +0 -43
- package/dist/types/react/ui/WidgetDisclosure.d.ts +0 -6
- package/dist/types/react/ui/WidgetEvidence.d.ts +0 -12
- package/dist/types/react/ui/WidgetViewTabs.d.ts +0 -16
- package/dist/types/react/ui/chart-data.d.ts +0 -36
- package/dist/types/react/ui/chart-date-axis.d.ts +0 -15
- package/dist/types/react/ui/chart-interaction.d.ts +0 -27
- package/dist/types/react/ui/chart-primitives.d.ts +0 -22
- package/dist/types/react/ui/chart-time.d.ts +0 -19
- package/dist/types/react/ui/chartColor.d.ts +0 -2
- package/dist/types/react/ui/classNames.d.ts +0 -1
- package/dist/types/react/ui/csv-export.d.ts +0 -19
- package/dist/types/react/ui/data-context.d.ts +0 -76
- package/dist/types/react/ui/data-identifiers.d.ts +0 -32
- package/dist/types/react/ui/icons.d.ts +0 -49
- package/dist/types/react/ui/index.d.ts +0 -111
- package/dist/types/react/ui/journey-flow.d.ts +0 -49
- package/dist/types/react/ui/keyboard.d.ts +0 -6
- package/dist/types/react/ui/metric-comparison.d.ts +0 -30
- package/dist/types/react/ui/metric.d.ts +0 -11
- package/dist/types/react/ui/presentation.d.ts +0 -25
- package/dist/types/react/ui/search.d.ts +0 -6
- package/dist/types/react/ui/searchItems.d.ts +0 -36
- package/dist/types/react/ui/shortcuts.d.ts +0 -45
- package/dist/types/react/ui/story.d.ts +0 -20
- package/dist/types/react/ui/use-chart-scroll-to-end.d.ts +0 -2
- package/dist/types/react/ui/useAppAppearance.d.ts +0 -3
- package/dist/types/react/ui/useDataAppPresentation.d.ts +0 -3
- package/dist/types/react/ui/useSvgId.d.ts +0 -2
- package/dist/types/react/ui/variables.d.ts +0 -38
- package/dist/types/react/ui/widget-views.d.ts +0 -3
- package/dist/types/react/view-control-bar.d.ts +0 -18
- package/dist/types/react/view-controls.d.ts +0 -20
- package/dist/types/react/view-runtime.d.ts +0 -34
- package/dist/types/react/view.d.ts +0 -87
- package/dist/types/react/widgets.d.ts +0 -90
- package/dist/types/server/local.d.ts +0 -19
- package/dist/types/server/preview/host.d.ts +0 -1
- package/dist/types/server/preview/index.d.ts +0 -16
- package/dist/types/server/reload-channel.d.ts +0 -6
- package/dist/worker.js +0 -106
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type ComponentRef, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { type DataAppBridgeOptions } from '../../embed/bridge.js';
|
|
3
|
-
import type { DataAppConnection } from '../../embed/host.js';
|
|
4
|
-
import type { DataAppSource } from '../../embed/source.js';
|
|
5
|
-
export type DataAppBridgeProps = Pick<DataAppBridgeOptions, 'onMessage' | 'onStatusChange' | 'onDiagnostic' | 'presentation' | 'logger'> & ({
|
|
6
|
-
source: DataAppSource;
|
|
7
|
-
title: string;
|
|
8
|
-
startupTimeoutMs?: number;
|
|
9
|
-
iframeProps?: Omit<ComponentPropsWithoutRef<'iframe'>, 'src' | 'srcDoc' | 'sandbox' | 'referrerPolicy' | 'loading' | 'children' | 'title'>;
|
|
10
|
-
iframe?: never;
|
|
11
|
-
connection?: never;
|
|
12
|
-
} | {
|
|
13
|
-
iframe: ComponentRef<'iframe'> | null;
|
|
14
|
-
connection: DataAppConnection;
|
|
15
|
-
source?: never;
|
|
16
|
-
title?: never;
|
|
17
|
-
startupTimeoutMs?: never;
|
|
18
|
-
iframeProps?: never;
|
|
19
|
-
});
|
|
20
|
-
/** Owns iframe setup and delivery. The consuming shell owns loading, error UI, and retries. */
|
|
21
|
-
export declare function DataAppBridge(props: DataAppBridgeProps): import("react").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* React iframe hosts; independent of the app UI and its stylesheet.
|
|
3
|
-
* @module @altertable/data-app/react/embed
|
|
4
|
-
* @see https://github.com/altertable-ai/data-app/blob/main/docs/react-embed.md
|
|
5
|
-
*/
|
|
6
|
-
export { DataAppBridge } from './bridge.js';
|
|
7
|
-
export type { DataAppBridgeProps } from './bridge.js';
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { DateRangeRequest } from '../core/contract.js';
|
|
2
|
-
import type { AppVariableValues, VariableCollection } from '../core/variables.js';
|
|
3
|
-
import type { ChoiceVariable } from '../core/variables.js';
|
|
4
|
-
import { type ViewBindings } from './view.js';
|
|
5
|
-
declare const filterPatch: unique symbol;
|
|
6
|
-
declare const breakdownValue: unique symbol;
|
|
7
|
-
export declare class FilterTarget<Patch> {
|
|
8
|
-
readonly [filterPatch]: Patch;
|
|
9
|
-
}
|
|
10
|
-
export declare class BreakdownTarget<Value extends string> {
|
|
11
|
-
readonly [breakdownValue]: Value;
|
|
12
|
-
}
|
|
13
|
-
export type FilterPatch<Variables extends VariableCollection> = Partial<{
|
|
14
|
-
[Key in keyof Variables]: Extract<Variables[Key]['presentation'], {
|
|
15
|
-
group: 'display';
|
|
16
|
-
}> extends never ? AppVariableValues<Variables>[Key] : never;
|
|
17
|
-
}>;
|
|
18
|
-
type TargetDefinition = {
|
|
19
|
-
owner: object;
|
|
20
|
-
variables: VariableCollection;
|
|
21
|
-
input: (values: any) => unknown;
|
|
22
|
-
bindings?: ViewBindings<any, any>;
|
|
23
|
-
date?: {
|
|
24
|
-
variable: string;
|
|
25
|
-
input: (input: any) => DateRangeRequest;
|
|
26
|
-
};
|
|
27
|
-
key?: string;
|
|
28
|
-
};
|
|
29
|
-
export declare function createFilterTarget<Variables extends VariableCollection>(definition: TargetDefinition): FilterTarget<FilterPatch<Variables>>;
|
|
30
|
-
export declare function createBreakdownTarget<Value extends string>(definition: TargetDefinition): BreakdownTarget<Value>;
|
|
31
|
-
export declare function breakdownDefinition(target: BreakdownTarget<any>): TargetDefinition;
|
|
32
|
-
export declare function targetAvailable(target: object, displayedInput: unknown, owner: object): boolean;
|
|
33
|
-
/** Apply an explicit scope patch and optional chart choice in one history entry. */
|
|
34
|
-
export declare function applyFilter(target: object, patch: Record<string, unknown>, breakdown?: {
|
|
35
|
-
target: BreakdownTarget<any>;
|
|
36
|
-
value: string;
|
|
37
|
-
}): void;
|
|
38
|
-
export declare function breakdownState(target: BreakdownTarget<any>, owner: object | undefined, input?: unknown): {
|
|
39
|
-
variable: ChoiceVariable;
|
|
40
|
-
value: string;
|
|
41
|
-
options: readonly import("../core/variables.js").ChoiceOption[];
|
|
42
|
-
set(id: string): void;
|
|
43
|
-
};
|
|
44
|
-
export {};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import type { CheckedVariableDeclarations } from '../core/variables.js';
|
|
2
|
-
import type { IsUnion } from '../core/queries.js';
|
|
3
|
-
import { type FacetVariable } from '../core/facets.js';
|
|
4
|
-
import { type FilterTarget, type BreakdownTarget, type FilterPatch } from './exploration.js';
|
|
5
|
-
import type { ChoiceVariable } from '../core/variables.js';
|
|
6
|
-
import { DeclaredView } from './view-runtime.js';
|
|
7
|
-
import { type DatasetDefinition, type Dataset, type Metric } from './bindings.js';
|
|
8
|
-
import type { AuthoringDataContext } from './ui/data-context.js';
|
|
9
|
-
import type { MetricValues } from '../core/reading.js';
|
|
10
|
-
import type { DisplayedSnapshot } from '../core/data-view.js';
|
|
11
|
-
import { type ReactNode } from 'react';
|
|
12
|
-
import type { DataOperations, DateRangeRequest } from '../core/contract.js';
|
|
13
|
-
import type { DataClient } from '../client/data-client.js';
|
|
14
|
-
import type { InputOf, OutputOf } from '../core/operation-types.js';
|
|
15
|
-
import { type VariableCollection, type CheckedFacetContexts } from '../core/variables.js';
|
|
16
|
-
import { dateRangeVariable, type DateRangeVariable, type DateRangeVariableOptions } from './ui/variables.js';
|
|
17
|
-
import { type DimensionFilterSettings, type DimensionOption, type DimensionValue } from '../core/dimension.js';
|
|
18
|
-
import type { EmptyContent } from './ui/presentation.js';
|
|
19
|
-
import { ViewContent, type DataContentState } from './content.js';
|
|
20
|
-
import { type DataViewDefinition, type ResolvedDataViewDefinition, type ResolvedVariables, type ViewBindingOptions, type ViewDate } from './view.js';
|
|
21
|
-
import { DetailView, type DetailViewDefinition } from './details.js';
|
|
22
|
-
type TimeVariables<Additional extends VariableCollection> = {
|
|
23
|
-
period: ReturnType<typeof dateRangeVariable>;
|
|
24
|
-
} & Additional;
|
|
25
|
-
type TimeInput<Additional extends VariableCollection> = keyof Additional extends never ? DateRangeRequest : ResolvedVariables<TimeVariables<Additional>>;
|
|
26
|
-
type TimeInputMapping<Additional extends VariableCollection, Input> = TimeInput<Additional> extends Input ? {
|
|
27
|
-
input?: (values: ResolvedVariables<TimeVariables<Additional>>) => Input;
|
|
28
|
-
} : {
|
|
29
|
-
input: (values: ResolvedVariables<TimeVariables<Additional>>) => Input;
|
|
30
|
-
};
|
|
31
|
-
/** Match the period reader's precedence for each possible operation input. */
|
|
32
|
-
type RequiredPeriodBinding<Input> = Input extends unknown ? 'period' extends keyof Input ? Input extends {
|
|
33
|
-
period: DateRangeRequest;
|
|
34
|
-
} ? never : 'period' : Input extends DateRangeRequest ? never : 'period' : never;
|
|
35
|
-
type NonEmptyColumns<Columns extends object> = keyof Columns extends never ? never : Columns;
|
|
36
|
-
type BoundDataView<Name extends string, Variables extends VariableCollection, Input, Data, Context extends AuthoringDataContext, HasDate extends boolean> = DeclaredView<Data, Input, ResolvedDataViewDefinition<Name, Variables, Input, Data> & {
|
|
37
|
-
describeInput: (input: Input) => string;
|
|
38
|
-
}> & {
|
|
39
|
-
filter(): FilterTarget<FilterPatch<Variables>>;
|
|
40
|
-
breakdown<Key extends keyof Variables & string>(key: Key & (Variables[Key] extends ChoiceVariable<any> ? Extract<Variables[Key]['presentation'], {
|
|
41
|
-
group: 'display';
|
|
42
|
-
}> extends never ? never : unknown : never)): Variables[Key] extends ChoiceVariable<infer Value> ? BreakdownTarget<Value> : never;
|
|
43
|
-
dataset<Row, const Columns extends Record<string, object> = Record<string, object>>(definition: DatasetDefinition<Data, Input, Row, Parameters<Context['evidence']>[0]> & {
|
|
44
|
-
columns: Columns & NonEmptyColumns<Columns>;
|
|
45
|
-
}): Dataset<Data, Input, Row>;
|
|
46
|
-
metric(definition: Parameters<Context['metric']>[0], select: (data: Data, input: Input) => HasDate extends true ? MetricValues : {
|
|
47
|
-
current: number;
|
|
48
|
-
previous?: never;
|
|
49
|
-
}): Metric<Data, Input>;
|
|
50
|
-
scope(snapshot: DisplayedSnapshot<Data, Input>): string;
|
|
51
|
-
content(render: (state: DataContentState<Data, Input>) => ReactNode): ViewContent<Data, Input>;
|
|
52
|
-
};
|
|
53
|
-
type FacetOperationName<Operations extends DataOperations, Value extends DimensionValue> = {
|
|
54
|
-
[Name in keyof Operations & string]: OutputOf<Operations[Name]> extends readonly DimensionOption<Value>[] ? Name : never;
|
|
55
|
-
}[keyof Operations & string];
|
|
56
|
-
type FacetConfig<Operations extends DataOperations, Value extends DimensionValue, Context extends VariableCollection, Name extends keyof Operations & string> = DimensionFilterSettings<Value> & {
|
|
57
|
-
facet: {
|
|
58
|
-
context: Context & CheckedVariableDeclarations<NoInfer<Context>> & (string extends keyof Context ? never : unknown);
|
|
59
|
-
operation: Name & (true extends IsUnion<NoInfer<Name>> ? never : unknown);
|
|
60
|
-
input: (values: ResolvedVariables<NoInfer<Context>>) => InputOf<Operations[NoInfer<Name>]>;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
type CheckedFacetSources<Operations extends DataOperations, Variables extends VariableCollection> = CheckedVariableDeclarations<Variables> & {
|
|
64
|
-
[Key in keyof Variables]: Variables[Key] extends FacetVariable<infer Value, infer _Context, infer Name, infer Input> ? Name extends keyof Operations ? Input extends InputOf<Operations[Name]> ? OutputOf<Operations[Name]> extends readonly DimensionOption<Value>[] ? Variables[Key] : never : never : never : Variables[Key];
|
|
65
|
-
};
|
|
66
|
-
type BoundDetailView<Data, Input, Context extends AuthoringDataContext> = DetailView<Data, Input> & {
|
|
67
|
-
dataset<Row, const Columns extends Record<string, object> = Record<string, object>>(definition: DatasetDefinition<Data, Input, Row, Parameters<Context['evidence']>[0]> & {
|
|
68
|
-
columns: Columns & NonEmptyColumns<Columns>;
|
|
69
|
-
}): Dataset<Data, Input, Row>;
|
|
70
|
-
metric(definition: Parameters<Context['metric']>[0], select: (data: Data, input: Input) => {
|
|
71
|
-
current: number;
|
|
72
|
-
previous?: never;
|
|
73
|
-
}): Metric<Data, Input>;
|
|
74
|
-
};
|
|
75
|
-
/** Bind declared operations to URL variables, displayed readings, and request feedback. */
|
|
76
|
-
export declare function createDataHooks<Operations extends DataOperations>(client: DataClient<Operations>): {
|
|
77
|
-
defineDataView: {
|
|
78
|
-
<Name extends keyof Operations & string, const Variables extends VariableCollection = {}, const Context extends AuthoringDataContext = AuthoringDataContext>(definition: DataViewDefinition<Name, Variables, InputOf<Operations[Name]>, OutputOf<Operations[Name]>> & {
|
|
79
|
-
operation: Name & (true extends IsUnion<NoInfer<Name>> ? never : unknown);
|
|
80
|
-
variables?: Variables & CheckedFacetSources<Operations, NoInfer<Variables>>;
|
|
81
|
-
} & {
|
|
82
|
-
dataContext: Context;
|
|
83
|
-
date: ViewDate<Variables, InputOf<Operations[Name]>>;
|
|
84
|
-
}): BoundDataView<Name, Variables, InputOf<Operations[Name]>, OutputOf<Operations[Name]>, Context, true>;
|
|
85
|
-
<Name extends keyof Operations & string, const Variables extends VariableCollection = {}, const Context extends AuthoringDataContext = AuthoringDataContext>(definition: DataViewDefinition<Name, Variables, InputOf<Operations[Name]>, OutputOf<Operations[Name]>> & {
|
|
86
|
-
operation: Name & (true extends IsUnion<NoInfer<Name>> ? never : unknown);
|
|
87
|
-
variables?: Variables & CheckedFacetSources<Operations, NoInfer<Variables>>;
|
|
88
|
-
} & {
|
|
89
|
-
dataContext: Context;
|
|
90
|
-
}): BoundDataView<Name, Variables, InputOf<Operations[Name]>, OutputOf<Operations[Name]>, Context, false>;
|
|
91
|
-
};
|
|
92
|
-
defineDetailView: <Name extends keyof Operations & string, const Context extends AuthoringDataContext = AuthoringDataContext>(definition: DetailViewDefinition<OutputOf<Operations[Name]>, InputOf<Operations[Name]>> & {
|
|
93
|
-
operation: Name;
|
|
94
|
-
dataContext: Context;
|
|
95
|
-
}) => BoundDetailView<OutputOf<Operations[Name]>, InputOf<Operations[Name]>, Context>;
|
|
96
|
-
defineTimeView: <Name extends keyof Operations & string, const Additional extends VariableCollection = {}, const Context extends AuthoringDataContext = AuthoringDataContext>(definition: {
|
|
97
|
-
operation: Name & (true extends IsUnion<NoInfer<Name>> ? never : unknown);
|
|
98
|
-
dataContext: Context;
|
|
99
|
-
time: Omit<DateRangeVariableOptions, 'key'>;
|
|
100
|
-
variables?: Additional & CheckedVariableDeclarations<NoInfer<Additional>> & {
|
|
101
|
-
period?: never;
|
|
102
|
-
} & Omit<CheckedFacetContexts<TimeVariables<NoInfer<Additional>>>, 'period'> & Omit<CheckedFacetSources<Operations, TimeVariables<NoInfer<Additional>>>, 'period'>;
|
|
103
|
-
isEmpty: (data: OutputOf<Operations[Name]>) => boolean;
|
|
104
|
-
emptyFallback: EmptyContent;
|
|
105
|
-
} & TimeInputMapping<NoInfer<Additional>, InputOf<Operations[Name]>> & ViewBindingOptions<TimeVariables<NoInfer<Additional>>, InputOf<Operations[Name]>, RequiredPeriodBinding<InputOf<Operations[Name]>>>) => BoundDataView<Name, {
|
|
106
|
-
period: DateRangeVariable;
|
|
107
|
-
} & Additional, InputOf<Operations[Name]>, OutputOf<Operations[Name]>, Context, true>;
|
|
108
|
-
defineFacetFilter: {
|
|
109
|
-
<const Context extends VariableCollection, const Name extends FacetOperationName<Operations, string>>(config: FacetConfig<Operations, string, Context, Name>): FacetVariable<string, Readonly<Context>, Name, InputOf<Operations[Name]>>;
|
|
110
|
-
<const Context extends VariableCollection, const Name extends FacetOperationName<Operations, number>>(config: FacetConfig<Operations, number, Context, Name>): FacetVariable<number, Readonly<Context>, Name, InputOf<Operations[Name]>>;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
export {};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/** Declared views, bound widgets, and layouts for data-app authoring. */
|
|
2
|
-
export type { DatasetColumn, DatasetSuggestionOptions, DatasetDeclaration as DatasetDefinition, } from './bindings.js';
|
|
3
|
-
export type { MetricRecords } from './bindings.js';
|
|
4
|
-
export { injectDataAppStyles } from './styles.js';
|
|
5
|
-
export type { DataAppStylesOptions } from './styles.js';
|
|
6
|
-
export type { DataAppStyle, DataAppStyleToken, DataAppStyleHooks, } from './style-contract.js';
|
|
7
|
-
export { mountDataApp } from './mount.js';
|
|
8
|
-
export { createDataHooks } from './hooks.js';
|
|
9
|
-
export { DetailView, DetailContent, useDetailNavigation, } from './details.js';
|
|
10
|
-
export type { DetailViewDefinition } from './details.js';
|
|
11
|
-
export type { CsvCell } from './ui/csv-export.js';
|
|
12
|
-
export { DataApp } from './ui/DataApp.js';
|
|
13
|
-
export type { DataAppProps } from './ui/DataApp.js';
|
|
14
|
-
export { Stack } from './ui/Stack.js';
|
|
15
|
-
export type { StackProps } from './ui/Stack.js';
|
|
16
|
-
export { Grid } from './ui/Grid.js';
|
|
17
|
-
export type { GridProps } from './ui/Grid.js';
|
|
18
|
-
export { GridItem } from './ui/GridItem.js';
|
|
19
|
-
export type { GridItemProps } from './ui/GridItem.js';
|
|
20
|
-
export type { WidgetEvidence } from './ui/WidgetEvidence.js';
|
|
21
|
-
export { TextContent } from './ui/TextContent.js';
|
|
22
|
-
export type { TextContentProps } from './ui/TextContent.js';
|
|
23
|
-
export { DataValue } from './widgets.js';
|
|
24
|
-
export type { DataValueProps } from './widgets.js';
|
|
25
|
-
export { TextWidget } from './widgets.js';
|
|
26
|
-
export type { TextWidgetProps } from './widgets.js';
|
|
27
|
-
export { VisualizationWidget } from './widgets.js';
|
|
28
|
-
export type { VisualizationWidgetProps } from './widgets.js';
|
|
29
|
-
export type { VisualizationWidgetView } from './widgets.js';
|
|
30
|
-
export { TableWidget } from './widgets.js';
|
|
31
|
-
export type { TableWidgetProps } from './widgets.js';
|
|
32
|
-
export type { TableWidgetSearch } from './ui/TableWidget.js';
|
|
33
|
-
export { chartColor } from './ui/chartColor.js';
|
|
34
|
-
export { Breakdown } from './ui/Breakdown.js';
|
|
35
|
-
export type { BreakdownItem, BreakdownProps } from './ui/Breakdown.js';
|
|
36
|
-
export { Ranking } from './ui/Ranking.js';
|
|
37
|
-
export type { RankingItem, RankingProps } from './ui/Ranking.js';
|
|
38
|
-
export { Comparison } from './ui/Comparison.js';
|
|
39
|
-
export type { ComparisonProps } from './ui/Comparison.js';
|
|
40
|
-
export { MetricWidget } from './widgets.js';
|
|
41
|
-
export type { MetricWidgetProps } from './widgets.js';
|
|
42
|
-
export { EmptyState } from './ui/EmptyState.js';
|
|
43
|
-
export type { EmptyStateProps } from './ui/EmptyState.js';
|
|
44
|
-
export { Skeleton } from './ui/Skeleton.js';
|
|
45
|
-
export type { SkeletonProps } from './ui/Skeleton.js';
|
|
46
|
-
export { DataSection } from './ui/DataSection.js';
|
|
47
|
-
export type { DataSectionProps } from './ui/DataSection.js';
|
|
48
|
-
export { UpdatedAt } from './ui/UpdatedAt.js';
|
|
49
|
-
export type { UpdatedAtProps } from './ui/UpdatedAt.js';
|
|
50
|
-
export { DateTimeTooltip } from './ui/DateTimeTooltip.js';
|
|
51
|
-
export type { DateTimeTooltipProps } from './ui/DateTimeTooltip.js';
|
|
52
|
-
export { searchVariable, choiceVariable, multiChoiceVariable, dateRangeVariable, } from './ui/variables.js';
|
|
53
|
-
export type { AppVariable, VariablePresentation, AppVariableValues, ChoiceOption, ChoiceVariable, MultiChoiceVariable, SearchVariable, DateRangeSelection, DateRangeVariable, DateRangeVariableOptions, } from './ui/variables.js';
|
|
54
|
-
export { PeriodSummary } from './ui/PeriodSummary.js';
|
|
55
|
-
export type { ReportingPeriod, PeriodComparison, PeriodSummaryProps, } from './ui/PeriodSummary.js';
|
|
56
|
-
export { createDataContext } from './ui/data-context.js';
|
|
57
|
-
export type { DataContext, GlossaryEntry } from './ui/data-context.js';
|
|
58
|
-
export { defineDataIdentifiers } from './ui/data-identifiers.js';
|
|
59
|
-
export type { DataIdentifierDefinition, TableIdentifier, ColumnIdentifier, } from './ui/data-identifiers.js';
|
|
60
|
-
export { IconButton } from './ui/IconButton.js';
|
|
61
|
-
export type { IconButtonProps } from './ui/IconButton.js';
|
|
62
|
-
export { Tooltip, TooltipProvider } from './ui/Tooltip.js';
|
|
63
|
-
export type { TooltipProps, TooltipProviderProps, } from './ui/Tooltip.js';
|
|
64
|
-
export { Button } from './ui/Button.js';
|
|
65
|
-
export type { ButtonProps } from './ui/Button.js';
|
|
66
|
-
export type { MetricDefinition } from './ui/metric.js';
|
|
67
|
-
export type { MetricValues } from '../core/reading.js';
|
|
68
|
-
export { AnnotationTarget } from './annotations/AnnotationTarget.js';
|
|
69
|
-
export type { AnnotationTargetProps } from './annotations/AnnotationTarget.js';
|
|
70
|
-
export { useDataAppAnnotations } from './annotations/useDataAppAnnotations.js';
|
|
71
|
-
export { AnnotationBar } from './annotations/AnnotationBar.js';
|
|
72
|
-
export type { AnnotationBarHandle, AnnotationBarProps, } from './annotations/AnnotationBar.js';
|
|
73
|
-
export { injectDataAppAnnotationStyles } from './annotations/styles.js';
|
|
74
|
-
export { SectionHeading } from './ui/SectionHeading.js';
|
|
75
|
-
export type { SectionHeadingProps } from './ui/SectionHeading.js';
|
|
76
|
-
export { DateDisplay } from './ui/DateDisplay.js';
|
|
77
|
-
export type { DateDisplayProps } from './ui/DateDisplay.js';
|
|
78
|
-
export { useDateFormatting } from './date-formatting.js';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
-
import { type DataAppDefinition, type QueryDefinitions } from '../core/config.js';
|
|
3
|
-
/** Mount once per document; installs document identity and the shared request provider. */
|
|
4
|
-
export declare function mountDataApp<const Queries extends QueryDefinitions>({ app, component: Component, root, }: {
|
|
5
|
-
app: DataAppDefinition<Queries>;
|
|
6
|
-
component: ComponentType;
|
|
7
|
-
root?: HTMLElement | null;
|
|
8
|
-
}): void;
|
|
9
|
-
/** Provide one app identity and shared requests to a custom React root. */
|
|
10
|
-
export declare function DataAppProvider<const Queries extends QueryDefinitions>({ app, children, }: {
|
|
11
|
-
app: DataAppDefinition<Queries>;
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
}): import("react").JSX.Element;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { SearchSuggestion } from './ui/SearchTypeahead.js';
|
|
2
|
-
/** The primary view supplies suggestions from exactly the source displayed by its widgets. */
|
|
3
|
-
export declare const SearchSuggestionsContext: import("react").Context<{
|
|
4
|
-
groups: readonly (readonly SearchSuggestion[])[];
|
|
5
|
-
busy: boolean;
|
|
6
|
-
} | null>;
|
|
7
|
-
/** Share five slots across datasets, then prioritize title matches without filtering source rows. */
|
|
8
|
-
export declare function balanceSearchSuggestions(groups: readonly (readonly SearchSuggestion[])[], query?: string): SearchSuggestion[];
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import type { CSSProperties } from 'react';
|
|
2
|
-
/** Public custom-property names for authoring types and validation. CSS owns their defaults. */
|
|
3
|
-
export declare const dataAppStyleTokens: readonly ['--atbl-control-text-size', '--atbl-annotation-accent', '--atbl-annotation-accent-hover', '--atbl-annotation-on-accent', '--atbl-annotation-highlight', '--atbl-background', '--atbl-surface', '--atbl-subtle', '--atbl-text', '--atbl-muted', '--atbl-border', '--atbl-accent', '--atbl-accent-subtle', '--atbl-on-accent', '--atbl-positive', '--atbl-negative', '--atbl-danger', '--atbl-danger-subtle', '--atbl-backdrop', '--atbl-code-surface', '--atbl-code-text', '--atbl-code-keyword', '--atbl-chart-fill', '--atbl-control-hover-border', '--atbl-focus-color', '--atbl-focus-outline', '--atbl-focus-ring-offset', '--atbl-focus-ring-inset', '--atbl-font', '--atbl-font-heading', '--atbl-mono-font', '--atbl-space-xs', '--atbl-space-sm', '--atbl-space-md', '--atbl-space-lg', '--atbl-space-xl', '--atbl-layout-gap', '--atbl-surface-padding', '--atbl-content-width', '--atbl-control-height', '--atbl-dropdown-padding', '--atbl-dropdown-item-padding-block', '--atbl-dropdown-item-padding-inline', '--atbl-dropdown-item-gap', '--atbl-radius-control', '--atbl-radius-surface', '--atbl-radius-overlay', '--atbl-shadow-surface', '--atbl-shadow-overlay', '--atbl-shadow-control', '--atbl-cursor-action', '--atbl-cursor-disabled', '--atbl-cursor-help', '--atbl-duration-fast', '--atbl-duration-normal', '--atbl-duration-slow', '--atbl-ease-standard', '--atbl-ease-enter', '--atbl-chart-1', '--atbl-chart-2', '--atbl-chart-3', '--atbl-chart-4', '--atbl-chart-5', '--atbl-chart-6', '--atbl-chart-7', '--atbl-chart-8', '--atbl-type-emphasis-weight', '--atbl-type-meta-weight', '--atbl-type-page-size', '--atbl-type-section-size', '--atbl-type-widget-size', '--atbl-type-body-size', '--atbl-type-label-size', '--atbl-type-meta-size', '--atbl-type-metric-size', '--atbl-type-heading-weight', '--atbl-type-label-weight', '--atbl-type-body-leading', '--atbl-type-label-leading', '--atbl-type-heading-leading', '--atbl-type-metric-leading', '--atbl-text-measure', '--atbl-control-compact-height', '--atbl-control-icon-size', '--atbl-control-padding-inline', '--atbl-control-padding-block', '--atbl-control-gap', '--atbl-control-disabled-opacity', '--atbl-cursor-busy', '--atbl-control-hover-surface', '--atbl-control-pressed-surface', '--atbl-control-open-surface', '--atbl-control-open-border', '--atbl-control-selected-surface', '--atbl-control-selected-text'];
|
|
4
|
-
/** Stable component roots for CSS customization; only utilities may be placed on native markup. */
|
|
5
|
-
export declare const dataAppStyleClasses: {
|
|
6
|
-
readonly 'altertable-app-layout': {
|
|
7
|
-
readonly component: 'AppLayout';
|
|
8
|
-
readonly kind: 'root';
|
|
9
|
-
};
|
|
10
|
-
readonly 'altertable-stack': {
|
|
11
|
-
readonly component: 'Stack';
|
|
12
|
-
readonly kind: 'root';
|
|
13
|
-
};
|
|
14
|
-
readonly 'altertable-grid': {
|
|
15
|
-
readonly component: 'Grid';
|
|
16
|
-
readonly kind: 'root';
|
|
17
|
-
};
|
|
18
|
-
readonly 'altertable-grid-item': {
|
|
19
|
-
readonly component: 'GridItem';
|
|
20
|
-
readonly kind: 'root';
|
|
21
|
-
};
|
|
22
|
-
readonly 'altertable-text-content': {
|
|
23
|
-
readonly component: 'TextContent';
|
|
24
|
-
readonly kind: 'root';
|
|
25
|
-
};
|
|
26
|
-
readonly 'altertable-button': {
|
|
27
|
-
readonly component: 'Button';
|
|
28
|
-
readonly kind: 'root';
|
|
29
|
-
};
|
|
30
|
-
readonly 'altertable-tabs': {
|
|
31
|
-
readonly component: 'Tabs';
|
|
32
|
-
readonly kind: 'root';
|
|
33
|
-
};
|
|
34
|
-
readonly 'altertable-data-widget': {
|
|
35
|
-
readonly component: 'DataWidget';
|
|
36
|
-
readonly kind: 'root';
|
|
37
|
-
};
|
|
38
|
-
readonly 'altertable-metric-widget': {
|
|
39
|
-
readonly component: 'MetricWidget';
|
|
40
|
-
readonly kind: 'root';
|
|
41
|
-
};
|
|
42
|
-
readonly 'altertable-chart-legend': {
|
|
43
|
-
readonly component: 'ChartLegend';
|
|
44
|
-
readonly kind: 'root';
|
|
45
|
-
};
|
|
46
|
-
readonly 'altertable-chart-legend-item': {
|
|
47
|
-
readonly component: 'ChartLegend.Item';
|
|
48
|
-
readonly kind: 'root';
|
|
49
|
-
};
|
|
50
|
-
readonly 'altertable-chart-legend-marker': {
|
|
51
|
-
readonly component: 'ChartLegend.Marker';
|
|
52
|
-
readonly kind: 'root';
|
|
53
|
-
};
|
|
54
|
-
readonly 'altertable-chart-legend-label': {
|
|
55
|
-
readonly component: 'ChartLegend.Label';
|
|
56
|
-
readonly kind: 'root';
|
|
57
|
-
};
|
|
58
|
-
readonly 'altertable-funnel-chart': {
|
|
59
|
-
readonly component: 'FunnelChart';
|
|
60
|
-
readonly kind: 'root';
|
|
61
|
-
};
|
|
62
|
-
readonly 'altertable-retention-chart': {
|
|
63
|
-
readonly component: 'RetentionChart';
|
|
64
|
-
readonly kind: 'root';
|
|
65
|
-
};
|
|
66
|
-
readonly 'altertable-journey-chart': {
|
|
67
|
-
readonly component: 'JourneyChart';
|
|
68
|
-
readonly kind: 'root';
|
|
69
|
-
};
|
|
70
|
-
readonly 'altertable-composed-chart': {
|
|
71
|
-
readonly component: 'ComposedChart';
|
|
72
|
-
readonly kind: 'root';
|
|
73
|
-
};
|
|
74
|
-
readonly 'altertable-sr-only': {
|
|
75
|
-
readonly component: null;
|
|
76
|
-
readonly kind: 'utility';
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
export declare const dataAppStyleHooks: {
|
|
80
|
-
readonly 'data-atbl-focus': readonly ['ring', 'inset', 'group'];
|
|
81
|
-
readonly 'data-atbl-control': readonly ['default', 'action', 'help', 'text'];
|
|
82
|
-
};
|
|
83
|
-
export type DataAppStyleToken = (typeof dataAppStyleTokens)[number];
|
|
84
|
-
/** React style properties with checked public Altertable custom properties. */
|
|
85
|
-
export type DataAppStyle = CSSProperties & Partial<Record<DataAppStyleToken, string | number>>;
|
|
86
|
-
export type DataAppStyleHooks = {
|
|
87
|
-
[Name in keyof typeof dataAppStyleHooks]?: (typeof dataAppStyleHooks)[Name][number];
|
|
88
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface DataAppStylesOptions {
|
|
2
|
-
/** Defaults to the current browser document. */
|
|
3
|
-
document?: Document;
|
|
4
|
-
/** Nonce permitted by the document's style-src CSP. */
|
|
5
|
-
nonce?: string;
|
|
6
|
-
}
|
|
7
|
-
/** Install the complete UI stylesheet once per document, before mounting. */
|
|
8
|
-
export declare function injectDataAppStyles(options?: DataAppStylesOptions): HTMLStyleElement;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithRef, type ComponentRef, type ReactNode, type RefObject } from 'react';
|
|
2
|
-
import type { DisclosedQuery } from '../../core/contract.js';
|
|
3
|
-
import type { DataContext, GlossaryEntry } from './data-context.js';
|
|
4
|
-
import { type ButtonProps } from './Button.js';
|
|
5
|
-
import { type SheetDialogProps } from './Sheet.js';
|
|
6
|
-
export type InspectionRecords = {
|
|
7
|
-
scope: string;
|
|
8
|
-
content: ReactNode;
|
|
9
|
-
};
|
|
10
|
-
export type AboutTab = 'records' | 'glossary' | 'queries';
|
|
11
|
-
export declare function resolveAboutTab(tab: string | null | undefined): AboutTab;
|
|
12
|
-
export type AboutEmpty = {
|
|
13
|
-
glossary: {
|
|
14
|
-
title: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
};
|
|
17
|
-
queries: {
|
|
18
|
-
title: string;
|
|
19
|
-
description?: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export declare const defaultAboutEmpty: AboutEmpty;
|
|
23
|
-
export type AboutSubject = {
|
|
24
|
-
empty?: AboutEmpty;
|
|
25
|
-
id?: string;
|
|
26
|
-
title?: ReactNode;
|
|
27
|
-
description?: ReactNode;
|
|
28
|
-
visual?: ReactNode;
|
|
29
|
-
visualKind?: 'metric' | 'chart' | 'widget';
|
|
30
|
-
dataContext?: DataContext;
|
|
31
|
-
references?: {
|
|
32
|
-
kind: 'ids';
|
|
33
|
-
glossaryIds?: readonly string[];
|
|
34
|
-
queryNames?: readonly string[];
|
|
35
|
-
} | {
|
|
36
|
-
kind: 'entries';
|
|
37
|
-
entries: readonly GlossaryEntry[];
|
|
38
|
-
};
|
|
39
|
-
queries?: DisclosedQuery[];
|
|
40
|
-
records?: InspectionRecords;
|
|
41
|
-
};
|
|
42
|
-
export type AboutDataProps = AboutSubject & {
|
|
43
|
-
variant?: ButtonProps['variant'];
|
|
44
|
-
iconOnly?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Register the global inspect shortcut. Defaults on for existing toolbar triggers; local
|
|
47
|
-
* triggers set false.
|
|
48
|
-
*/
|
|
49
|
-
shortcut?: boolean;
|
|
50
|
-
tooltip?: ReactNode;
|
|
51
|
-
children?: ReactNode;
|
|
52
|
-
footer?: ReactNode;
|
|
53
|
-
portalRoot?: RefObject<HTMLElement | null>;
|
|
54
|
-
sheetProps?: SheetDialogProps;
|
|
55
|
-
headerActions?: ReactNode;
|
|
56
|
-
open?: boolean;
|
|
57
|
-
onOpenChange?: (open: boolean) => void;
|
|
58
|
-
/** Initial inspect tab. While open, the URL's `tab` parameter tracks selection. */
|
|
59
|
-
tab?: AboutTab;
|
|
60
|
-
trigger?: boolean;
|
|
61
|
-
} & Omit<ComponentPropsWithRef<'button'>, 'children' | 'title'>;
|
|
62
|
-
/**
|
|
63
|
-
* Open state uses `?about=`; tab selection uses `?tab=`. Enable the global shortcut only on the
|
|
64
|
-
* page-level trigger.
|
|
65
|
-
*/
|
|
66
|
-
export declare function InspectionSheet({ id, title, description, visual, visualKind, dataContext, references, queries, records, empty, footer, sheetProps, headerActions, open, onOpenChange, tab, onTabChange, returnFocus, }: AboutDataProps & {
|
|
67
|
-
open: boolean;
|
|
68
|
-
onOpenChange: (open: boolean) => void;
|
|
69
|
-
tab: AboutTab;
|
|
70
|
-
onTabChange: (tab: AboutTab) => void;
|
|
71
|
-
returnFocus: RefObject<ComponentRef<'button'> | null>;
|
|
72
|
-
}): import("react").JSX.Element;
|
|
73
|
-
export declare function AboutData(props: AboutDataProps): import("react").JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
export type AppFooterProps = ComponentPropsWithRef<'footer'> & {
|
|
3
|
-
attribution?: ReactNode;
|
|
4
|
-
};
|
|
5
|
-
/** `children` fills the action slot; `attribution` replaces the default link. */
|
|
6
|
-
export declare function AppFooter({ children, attribution, className, ...props }: AppFooterProps): import("react").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
export type AppHeaderProps = {
|
|
3
|
-
scope?: ReactNode;
|
|
4
|
-
title: ReactNode;
|
|
5
|
-
description?: ReactNode;
|
|
6
|
-
toolbar?: ReactNode;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
} & Omit<ComponentPropsWithRef<'header'>, 'children' | 'title'>;
|
|
9
|
-
/** Page identity and actions; on narrow screens the scope shares a row with actions. */
|
|
10
|
-
export declare function AppHeader({ scope, title, description, toolbar, children, className, ...props }: AppHeaderProps): import("react").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
export type AppLayoutProps = {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
footerActions?: ReactNode;
|
|
5
|
-
footer?: ReactNode;
|
|
6
|
-
} & Omit<ComponentPropsWithRef<'main'>, 'children'>;
|
|
7
|
-
/**
|
|
8
|
-
* Native props target `<main>`. The shell owns its wrapper and tooltip defaults.
|
|
9
|
-
*/
|
|
10
|
-
export declare function AppLayout({ children, footerActions, footer, className, ...props }: AppLayoutProps): import("react").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
export type AppScopeProps = {
|
|
3
|
-
organization: string;
|
|
4
|
-
environment: string;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
7
|
-
export declare function AppScope({ organization, environment, children, className, ...props }: AppScopeProps): import("react").JSX.Element;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { ComponentProps, ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
import type { DataView } from '../../core/data-view.js';
|
|
3
|
-
import type { CsvExport } from './csv-export.js';
|
|
4
|
-
import { type LiveControlProps } from './LiveControl.js';
|
|
5
|
-
import { PresentStory } from './PresentStory.js';
|
|
6
|
-
export type AppToolbarProps = {
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
end?: ReactNode;
|
|
9
|
-
updatedAt?: ReactNode;
|
|
10
|
-
requestState?: DataView<unknown, unknown>['kind'];
|
|
11
|
-
refresh?: {
|
|
12
|
-
refreshing: boolean;
|
|
13
|
-
onRefresh: () => void;
|
|
14
|
-
onCancel?: () => void;
|
|
15
|
-
label?: string;
|
|
16
|
-
tooltip?: ReactNode;
|
|
17
|
-
};
|
|
18
|
-
live?: LiveControlProps;
|
|
19
|
-
aboutData?: ReactNode;
|
|
20
|
-
/** Null reserves a disabled story action while its findings are unavailable. */
|
|
21
|
-
story?: ComponentProps<typeof PresentStory> | null;
|
|
22
|
-
/** Null reserves a disabled export action while its data is unavailable. */
|
|
23
|
-
csvExport?: CsvExport | null;
|
|
24
|
-
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
25
|
-
/** Header actions only. Put reader-controlled inputs in DataApp.variables below the header.
|
|
26
|
-
* Observation time, or an initial loading status, sits before Refresh. Children prepend app controls in the right
|
|
27
|
-
* cluster; end follows the built-in actions. Live sits beside Refresh when supplied. Refresh also
|
|
28
|
-
* answers Alt/Option+R and uses the button to cancel a running request when onCancel is provided;
|
|
29
|
-
* refresh.tooltip overrides its static label. All built-in controls are optional. */
|
|
30
|
-
export declare function AppToolbar({ children, updatedAt, requestState, refresh, live, aboutData, story, csvExport, end, className, role, 'aria-label': ariaLabel, ...props }: AppToolbarProps): import("react").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ChartItem, ValueChartProps } from './chart-data.js';
|
|
2
|
-
export type AreaChartItem = ChartItem;
|
|
3
|
-
export type AreaChartProps<Row extends AreaChartItem = AreaChartItem> = ValueChartProps<Row>;
|
|
4
|
-
/** Ordered finite samples filled to a zero baseline, including negative values.
|
|
5
|
-
* Samples are equally spaced; supply missing periods explicitly.
|
|
6
|
-
* Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
|
|
7
|
-
export declare function AreaChart<Row extends AreaChartItem>(props: AreaChartProps<Row>): import("react").JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type ChartItem, type ValueChartProps } from './chart-data.js';
|
|
2
|
-
export type BarChartItem = ChartItem;
|
|
3
|
-
export type BarChartProps<Row extends BarChartItem = BarChartItem> = ValueChartProps<Row>;
|
|
4
|
-
/** Nonnegative category values. Compose inside VisualizationWidget for a titled panel.
|
|
5
|
-
* Owns hover/touch tooltips; no selection state or keyboard navigation. */
|
|
6
|
-
export declare function BarChart<Row extends BarChartItem>({ items, unit, ariaLabel, formatValue, itemActions, }: BarChartProps<Row>): import("react").JSX.Element;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
export type BreakdownItem = {
|
|
3
|
-
id: string;
|
|
4
|
-
label: ReactNode;
|
|
5
|
-
value: number;
|
|
6
|
-
};
|
|
7
|
-
export type BreakdownProps = {
|
|
8
|
-
total: number;
|
|
9
|
-
items: readonly BreakdownItem[];
|
|
10
|
-
formatValue?: (value: number) => ReactNode;
|
|
11
|
-
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
12
|
-
/** Mutually exclusive parts of one observed whole. Every share uses the supplied total. */
|
|
13
|
-
export declare function Breakdown({ total, items, formatValue, className, ...props }: BreakdownProps): import("react").JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
-
import { Button as AriaButton } from 'react-aria-components';
|
|
3
|
-
export type ButtonProps = ComponentPropsWithRef<'button'> & {
|
|
4
|
-
/** Inline actions retain button semantics without a padded control surface. */
|
|
5
|
-
variant?: 'primary' | 'elevated' | 'outline' | 'ghost' | 'inline';
|
|
6
|
-
size?: 'default' | 'compact' | 'icon' | 'icon-compact';
|
|
7
|
-
};
|
|
8
|
-
export declare function Button({ className, type, variant, size, disabled, ...props }: ButtonProps): import("react").JSX.Element;
|
|
9
|
-
/** React Aria trigger behavior with the same presentation as the native Button. */
|
|
10
|
-
export declare function PressButton({ variant, size, className, ...props }: Omit<ComponentPropsWithRef<typeof AriaButton>, 'className'> & Pick<ButtonProps, 'variant' | 'size'> & {
|
|
11
|
-
className?: string;
|
|
12
|
-
}): import("react").JSX.Element;
|