@altertable/data-app 0.69.0 → 0.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +11 -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-2sbp9h2b.js → index-9yxr7nmm.js} +330 -21
- package/dist/chunks/index-9yxr7nmm.js.map +17 -0
- package/dist/chunks/{index-r7b1ftwy.js → index-j5q5n3ra.js} +8 -6
- 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-kwnqycjt.js → index-vhaec7m5.js} +8 -6
- package/dist/chunks/index-vhaec7m5.js.map +10 -0
- package/dist/chunks/index-zp78caex.js +1047 -0
- 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 +13 -15
- 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/data-client.d.ts +21 -10
- 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/config.d.ts +20 -17
- package/dist/types/core/contract.d.ts +23 -13
- package/dist/types/core/dimension-source.d.ts +64 -0
- package/dist/types/core/dimension.d.ts +31 -23
- package/dist/types/core/facets.d.ts +13 -0
- package/dist/types/core/filters.d.ts +1 -1
- package/dist/types/core/format.d.ts +1 -2
- package/dist/types/core/keys.d.ts +2 -0
- package/dist/types/core/messages.d.ts +3 -3
- package/dist/types/core/operation-types.d.ts +7 -6
- package/dist/types/core/presentation.d.ts +1 -1
- package/dist/types/core/queries.d.ts +75 -7
- package/dist/types/core/reading.d.ts +1 -1
- package/dist/types/core/variables.d.ts +38 -12
- package/dist/types/index.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 +12 -4
- package/docs/client.md +5 -6
- package/docs/composition.md +84 -0
- package/docs/contract.md +41 -21
- package/docs/data-context.md +5 -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/server.md +1 -1
- package/docs/stories-and-export.md +3 -3
- package/docs/styling.md +6 -2
- package/docs/ui.md +18 -7
- package/docs/variables.md +83 -11
- package/docs/views.md +57 -3
- package/docs/widgets.md +97 -4
- package/docs/worker.md +4 -4
- package/examples/starter-data-app/index.tsx +11 -23
- 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/app.ts +7 -1
- 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/examples/starter-local-data-app/tsconfig.json +7 -1
- package/package.json +16 -92
- package/THIRD_PARTY_NOTICES +0 -18
- package/dist/chunks/index-2sbp9h2b.js.map +0 -13
- package/dist/chunks/index-ap60vggk.js +0 -80
- package/dist/chunks/index-ap60vggk.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-k766wwwr.js +0 -643
- package/dist/chunks/index-k766wwwr.js.map +0 -13
- package/dist/chunks/index-kwnqycjt.js.map +0 -10
- package/dist/chunks/index-m0gbxtgp.js +0 -355
- package/dist/chunks/index-m0gbxtgp.js.map +0 -13
- package/dist/chunks/index-qhzdzca2.js +0 -15869
- package/dist/chunks/index-qhzdzca2.js.map +0 -118
- package/dist/chunks/index-r7b1ftwy.js.map +0 -10
- package/dist/chunks/index-sx488hvs.js +0 -221
- package/dist/chunks/index-sx488hvs.js.map +0 -12
- package/dist/chunks/index-wss3gd3h.js +0 -319
- package/dist/chunks/index-wss3gd3h.js.map +0 -13
- package/dist/chunks/index-zcqxfwdq.js +0 -197
- package/dist/chunks/index-zcqxfwdq.js.map +0 -13
- package/dist/embed/index.js +0 -138
- package/dist/embed/index.js.map +0 -12
- package/dist/local.js +0 -432
- package/dist/local.js.map +0 -14
- 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 -2948
- package/dist/react/index.js.map +0 -26
- package/dist/react/ui/index.js +0 -3142
- package/dist/react/ui/index.js.map +0 -35
- package/dist/server.js +0 -301
- package/dist/server.js.map +0 -13
- 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/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 -133
- package/dist/types/react/content.d.ts +0 -36
- package/dist/types/react/date-formatting.d.ts +0 -12
- package/dist/types/react/embed/bridge.d.ts +0 -21
- package/dist/types/react/embed/index.d.ts +0 -7
- package/dist/types/react/hooks.d.ts +0 -75
- package/dist/types/react/index.d.ts +0 -75
- 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 -68
- 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 -11
- 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 -8
- package/dist/types/react/ui/ContentSkeleton.d.ts +0 -7
- package/dist/types/react/ui/DataApp.d.ts +0 -21
- 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 -34
- 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/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 -12
- package/dist/types/react/ui/MetricWidget.d.ts +0 -49
- 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 -15
- 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 -18
- 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 -34
- package/dist/types/react/ui/chart-date-axis.d.ts +0 -15
- package/dist/types/react/ui/chart-interaction.d.ts +0 -21
- package/dist/types/react/ui/chart-primitives.d.ts +0 -22
- package/dist/types/react/ui/chart-time.d.ts +0 -16
- 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 -47
- package/dist/types/react/ui/index.d.ts +0 -109
- 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/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 -16
- package/dist/types/react/view-controls.d.ts +0 -20
- package/dist/types/react/view-runtime.d.ts +0 -31
- package/dist/types/react/view.d.ts +0 -78
- package/dist/types/react/widgets.d.ts +0 -79
- 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,15 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
-
import { XAxis } from 'recharts';
|
|
3
|
-
type LabelFormatter = (value: unknown) => string;
|
|
4
|
-
export declare function ChartDateAxes({ data, children, }: {
|
|
5
|
-
data: readonly unknown[];
|
|
6
|
-
children: ReactNode;
|
|
7
|
-
}): import("react").JSX.Element;
|
|
8
|
-
export declare function useDateAxisLabel(id?: string | number): LabelFormatter | undefined;
|
|
9
|
-
/**
|
|
10
|
-
* Infers temporal input from ISO dates, zoned ISO timestamps, and Date values.
|
|
11
|
-
* Use scale="utc" for epoch milliseconds or type="category" for date-like categories.
|
|
12
|
-
* Explicit tick formatters and tick lists retain authored axis behavior.
|
|
13
|
-
*/
|
|
14
|
-
export declare function ChartXAxis<Row = unknown, Value = string | number>(props: ComponentProps<typeof XAxis<Row, Value>>): import("react").JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
2
|
-
export declare const ChartInteraction: import("react").Context<{
|
|
3
|
-
pointer: boolean;
|
|
4
|
-
point: {
|
|
5
|
-
x: number;
|
|
6
|
-
y: number;
|
|
7
|
-
} | undefined;
|
|
8
|
-
seriesCount: number;
|
|
9
|
-
registerPoint: (id: string, x: number, y: number) => () => void;
|
|
10
|
-
registerSeries: (id: string) => () => void;
|
|
11
|
-
hovered: string | null;
|
|
12
|
-
setHovered: (id: string | null) => void;
|
|
13
|
-
} | null>;
|
|
14
|
-
export declare function useChartSeries(id?: string): {
|
|
15
|
-
id: string;
|
|
16
|
-
active: boolean;
|
|
17
|
-
};
|
|
18
|
-
export declare function ChartSeries({ id, children, }: {
|
|
19
|
-
id: string;
|
|
20
|
-
children: ReactNode;
|
|
21
|
-
}): import("react").JSX.Element;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export { ChartXAxis } from './chart-date-axis.js';
|
|
2
|
-
import { type ComponentProps } from 'react';
|
|
3
|
-
import { type DotProps, Scatter, YAxis, CartesianGrid, Tooltip, DefaultTooltipContent, type BarProps, type LineProps, type AreaProps } from 'recharts';
|
|
4
|
-
/** Hollow sample marker shared by standalone and composed series. */
|
|
5
|
-
export declare function ChartDot({ active, stroke, fill, r, ...props }: DotProps & {
|
|
6
|
-
active?: boolean;
|
|
7
|
-
}): import("react").JSX.Element;
|
|
8
|
-
/** Shared series defaults; native props override every authored choice. */
|
|
9
|
-
export declare function ChartBar<Row = unknown, Value = number | null>(props: BarProps<Row, Value>): import("react").JSX.Element;
|
|
10
|
-
/** Sample dots are opt-in with dot=true.
|
|
11
|
-
* activeDot independently controls the hovered point. Native dot props and renderers remain available. */
|
|
12
|
-
export declare function ChartLine<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: LineProps<Row, Value>): import("react").JSX.Element;
|
|
13
|
-
/** Filled series with the same sample-dot and activeDot options as ChartLine. */
|
|
14
|
-
export declare function ChartArea<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: AreaProps<Row, Value>): import("react").JSX.Element;
|
|
15
|
-
export declare function ChartScatter<Row = unknown, Value = number>(props: ComponentProps<typeof Scatter<Row, Value>>): import("react").JSX.Element;
|
|
16
|
-
export declare function ChartYAxis<Row = unknown, Value = number>(props: ComponentProps<typeof YAxis<Row, Value>>): import("react").JSX.Element;
|
|
17
|
-
export declare function ChartGrid(props: ComponentProps<typeof CartesianGrid>): import("react").JSX.Element;
|
|
18
|
-
export declare function ChartTooltipContent(props: ComponentProps<typeof DefaultTooltipContent> & {
|
|
19
|
-
active?: boolean;
|
|
20
|
-
}): import("react").JSX.Element | null;
|
|
21
|
-
/** Uses the same surface as single-series inspection; Recharts owns interaction. */
|
|
22
|
-
export declare function ChartTooltip(props: ComponentProps<typeof Tooltip>): import("react").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/** Only ISO calendar dates and zoned instants are inferred. Numbers require scale="utc". */
|
|
2
|
-
export declare function chartTimestamp(value: unknown, numeric?: boolean): number | null;
|
|
3
|
-
export declare function timeModel(values: readonly unknown[], numeric?: boolean): {
|
|
4
|
-
start: number;
|
|
5
|
-
end: number;
|
|
6
|
-
times: number[];
|
|
7
|
-
precision: number;
|
|
8
|
-
tooltip: (value: unknown) => string;
|
|
9
|
-
} | null;
|
|
10
|
-
export declare function timeTicks(model: NonNullable<ReturnType<typeof timeModel>>, width: number): {
|
|
11
|
-
ticks: number[];
|
|
12
|
-
label: (value: number, index: number) => {
|
|
13
|
-
main: string;
|
|
14
|
-
context: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function classNames(...values: Array<string | false | null | undefined>): string;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type CsvCell = string | number | boolean | null | undefined;
|
|
2
|
-
/** One named dataset with ordered columns and raw displayed values. */
|
|
3
|
-
export type CsvTable = {
|
|
4
|
-
name: string;
|
|
5
|
-
columns: readonly string[];
|
|
6
|
-
rows: readonly (readonly CsvCell[])[];
|
|
7
|
-
};
|
|
8
|
-
/** All distinct datasets in the displayed result; filename names the download. */
|
|
9
|
-
export type CsvExport = {
|
|
10
|
-
filename: string;
|
|
11
|
-
tables: readonly [CsvTable, ...CsvTable[]];
|
|
12
|
-
};
|
|
13
|
-
export declare function formatCsv({ columns, rows, }: Pick<CsvTable, 'columns' | 'rows'>): string;
|
|
14
|
-
export declare function createCsvDownload(data: CsvExport, selectedTable?: CsvTable): {
|
|
15
|
-
filename: string;
|
|
16
|
-
blob: Blob;
|
|
17
|
-
route: 'export:csv' | 'export:zip';
|
|
18
|
-
};
|
|
19
|
-
export declare function exportCsv(data: CsvExport, table?: CsvTable): Promise<void>;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { DataIdentifierDefinition } from './data-identifiers.js';
|
|
3
|
-
import type { MetricFormat } from '../../core/format.js';
|
|
4
|
-
import type { MetricDefinition } from './metric.js';
|
|
5
|
-
import type { StoryFinding } from './story.js';
|
|
6
|
-
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
7
|
-
export type GlossaryEntry = {
|
|
8
|
-
term: string;
|
|
9
|
-
definition: ReactNode;
|
|
10
|
-
queryNames?: string[];
|
|
11
|
-
};
|
|
12
|
-
export type DataContext = {
|
|
13
|
-
description: ReactNode;
|
|
14
|
-
glossary: Record<string, GlossaryEntry>;
|
|
15
|
-
identifiers?: Readonly<Record<string, DataIdentifierDefinition>>;
|
|
16
|
-
queryNames?: Readonly<Record<string, string>>;
|
|
17
|
-
};
|
|
18
|
-
export type MetricDeclaration = {
|
|
19
|
-
id: string;
|
|
20
|
-
glossaryId: string;
|
|
21
|
-
label?: string;
|
|
22
|
-
format: MetricFormat;
|
|
23
|
-
favorableDirection?: 'up' | 'down';
|
|
24
|
-
queryNames?: readonly string[];
|
|
25
|
-
};
|
|
26
|
-
export type EvidenceDeclaration = {
|
|
27
|
-
id: string;
|
|
28
|
-
} & ({
|
|
29
|
-
glossaryIds: readonly [string, ...string[]];
|
|
30
|
-
queryNames?: readonly string[];
|
|
31
|
-
} | {
|
|
32
|
-
queryNames: readonly [string, ...string[]];
|
|
33
|
-
glossaryIds?: readonly string[];
|
|
34
|
-
});
|
|
35
|
-
export type AuthoringDataContext = DataContext & {
|
|
36
|
-
metric(definition: MetricDeclaration): MetricDefinition;
|
|
37
|
-
evidence(definition: EvidenceDeclaration): WidgetEvidence;
|
|
38
|
-
};
|
|
39
|
-
/** Bind glossary query references and card evidence to the same registry. */
|
|
40
|
-
export declare function createDataContext<const Names extends Record<string, string>>(queryNames: Names): <const Context extends Omit<DataContext, 'glossary'> & {
|
|
41
|
-
glossary: Record<string, Omit<GlossaryEntry, 'queryNames'> & {
|
|
42
|
-
queryNames?: Names[keyof Names][];
|
|
43
|
-
}>;
|
|
44
|
-
}>(context: Context) => Context & {
|
|
45
|
-
queryNames: Names;
|
|
46
|
-
evidence: (input: {
|
|
47
|
-
id: string;
|
|
48
|
-
} & ({
|
|
49
|
-
glossaryIds: readonly [keyof Context["glossary"] & string, ...(keyof Context["glossary"] & string)[]];
|
|
50
|
-
queryNames?: readonly Names[keyof Names][];
|
|
51
|
-
} | {
|
|
52
|
-
queryNames: readonly [Names[keyof Names], ...Names[keyof Names][]];
|
|
53
|
-
glossaryIds?: readonly (keyof Context["glossary"] & string)[];
|
|
54
|
-
})) => WidgetEvidence;
|
|
55
|
-
finding: (input: Omit<StoryFinding, 'evidence'> & {
|
|
56
|
-
evidence: Parameters<(input: {
|
|
57
|
-
id: string;
|
|
58
|
-
} & ({
|
|
59
|
-
glossaryIds: readonly [keyof Context["glossary"] & string, ...(keyof Context["glossary"] & string)[]];
|
|
60
|
-
queryNames?: readonly Names[keyof Names][];
|
|
61
|
-
} | {
|
|
62
|
-
queryNames: readonly [Names[keyof Names], ...Names[keyof Names][]];
|
|
63
|
-
glossaryIds?: readonly (keyof Context["glossary"] & string)[];
|
|
64
|
-
})) => WidgetEvidence>[0];
|
|
65
|
-
}) => StoryFinding & {
|
|
66
|
-
evidence: WidgetEvidence;
|
|
67
|
-
};
|
|
68
|
-
metric: (definition: {
|
|
69
|
-
id: string;
|
|
70
|
-
glossaryId: keyof Context['glossary'] & string;
|
|
71
|
-
label?: string;
|
|
72
|
-
format: MetricFormat;
|
|
73
|
-
favorableDirection?: 'up' | 'down';
|
|
74
|
-
queryNames?: readonly Names[keyof Names][];
|
|
75
|
-
}) => MetricDefinition;
|
|
76
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export type TableIdentifier = {
|
|
2
|
-
catalog: string;
|
|
3
|
-
schema: string;
|
|
4
|
-
name: string;
|
|
5
|
-
};
|
|
6
|
-
export type ColumnIdentifier<TableId extends string = string> = {
|
|
7
|
-
table: TableId;
|
|
8
|
-
name: string;
|
|
9
|
-
};
|
|
10
|
-
export type DataIdentifierDefinition = ({
|
|
11
|
-
kind: 'table';
|
|
12
|
-
} & TableIdentifier) | {
|
|
13
|
-
kind: 'column';
|
|
14
|
-
tableId: `tables.${string}`;
|
|
15
|
-
table: TableIdentifier;
|
|
16
|
-
name: string;
|
|
17
|
-
};
|
|
18
|
-
type IdentifierId<Tables extends Record<string, TableIdentifier>, Columns extends Record<string, ColumnIdentifier<Extract<keyof Tables, string>>>> = `tables.${Extract<keyof Tables, string>}` | {
|
|
19
|
-
[Id in Extract<keyof Columns, string>]: `columns.${Columns[Id]['table']}.${Id}`;
|
|
20
|
-
}[Extract<keyof Columns, string>];
|
|
21
|
-
/** Register exact source names once; returned JSX IDs are checked against this registry. */
|
|
22
|
-
export declare function defineDataIdentifiers<const Tables extends Record<string, TableIdentifier>, const Columns extends Record<string, ColumnIdentifier<Extract<keyof Tables, string>>>>({ tables, columns }: {
|
|
23
|
-
tables: Tables;
|
|
24
|
-
columns: Columns;
|
|
25
|
-
}): {
|
|
26
|
-
definitions: Readonly<Record<IdentifierId<Tables, Columns>, DataIdentifierDefinition>>;
|
|
27
|
-
DataIdentifier: ({ id, display, }: {
|
|
28
|
-
id: IdentifierId<Tables, Columns>;
|
|
29
|
-
display?: 'short' | 'qualified';
|
|
30
|
-
}) => import("react").JSX.Element;
|
|
31
|
-
};
|
|
32
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { type LucideProps } from 'lucide-react';
|
|
2
|
-
/** Use semantic names to keep icon meaning and optical size consistent across controls. */
|
|
3
|
-
declare const brandedIcons: {
|
|
4
|
-
readonly annotate: import("lucide-react").LucideIcon;
|
|
5
|
-
readonly cancel: import("lucide-react").LucideIcon;
|
|
6
|
-
readonly calendar: import("lucide-react").LucideIcon;
|
|
7
|
-
readonly clock: import("lucide-react").LucideIcon;
|
|
8
|
-
readonly check: import("lucide-react").LucideIcon;
|
|
9
|
-
readonly disclosure: import("lucide-react").LucideIcon;
|
|
10
|
-
readonly previousMonth: import("lucide-react").LucideIcon;
|
|
11
|
-
readonly nextMonth: import("lucide-react").LucideIcon;
|
|
12
|
-
readonly explore: import("lucide-react").LucideIcon;
|
|
13
|
-
/** @deprecated Use openDetails for inspection triggers. */
|
|
14
|
-
readonly inspect: import("lucide-react").LucideIcon;
|
|
15
|
-
readonly info: import("lucide-react").LucideIcon;
|
|
16
|
-
readonly openDetails: import("lucide-react").LucideIcon;
|
|
17
|
-
readonly present: import("lucide-react").LucideIcon;
|
|
18
|
-
readonly export: import("lucide-react").LucideIcon;
|
|
19
|
-
readonly error: import("lucide-react").LucideIcon;
|
|
20
|
-
readonly close: import("lucide-react").LucideIcon;
|
|
21
|
-
readonly filters: import("lucide-react").LucideIcon;
|
|
22
|
-
readonly clearFilters: import("lucide-react").LucideIcon;
|
|
23
|
-
readonly displayOptions: import("lucide-react").LucideIcon;
|
|
24
|
-
readonly previous: import("lucide-react").LucideIcon;
|
|
25
|
-
readonly next: import("lucide-react").LucideIcon;
|
|
26
|
-
readonly lightTheme: import("lucide-react").LucideIcon;
|
|
27
|
-
readonly darkTheme: import("lucide-react").LucideIcon;
|
|
28
|
-
readonly live: import("lucide-react").LucideIcon;
|
|
29
|
-
readonly loading: import("lucide-react").LucideIcon;
|
|
30
|
-
readonly refresh: import("lucide-react").LucideIcon;
|
|
31
|
-
readonly stop: import("lucide-react").LucideIcon;
|
|
32
|
-
readonly reset: import("lucide-react").LucideIcon;
|
|
33
|
-
readonly search: import("lucide-react").LucideIcon;
|
|
34
|
-
readonly copy: import("lucide-react").LucideIcon;
|
|
35
|
-
readonly sql: import("lucide-react").LucideIcon;
|
|
36
|
-
readonly wrap: import("lucide-react").LucideIcon;
|
|
37
|
-
readonly trendDown: import("lucide-react").LucideIcon;
|
|
38
|
-
readonly trendFlat: import("lucide-react").LucideIcon;
|
|
39
|
-
readonly trendUp: import("lucide-react").LucideIcon;
|
|
40
|
-
};
|
|
41
|
-
export type AppIconName = keyof typeof brandedIcons;
|
|
42
|
-
export type AppIconProps = Omit<LucideProps, 'size'> & {
|
|
43
|
-
name: AppIconName;
|
|
44
|
-
size?: number | string;
|
|
45
|
-
};
|
|
46
|
-
export declare function AppIcon({ name, size, strokeWidth, style, ...props }: AppIconProps): import("react").FunctionComponentElement<Omit<LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
47
|
-
export {};
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/** Direct UI composition and static screens. Requests use declared views from /react. */
|
|
2
|
-
export { DataAppProvider } from '../mount.js';
|
|
3
|
-
export { isPlainKeyEvent } from './keyboard.js';
|
|
4
|
-
export { GettingStarted } from './GettingStarted.js';
|
|
5
|
-
export { DataWidget } from './DataWidget.js';
|
|
6
|
-
export type { WidgetStatus } from './RequestHint.js';
|
|
7
|
-
export type { DataWidgetProps } from './DataWidget.js';
|
|
8
|
-
export { TextWidget } from './TextWidget.js';
|
|
9
|
-
export type { TextWidgetProps } from './TextWidget.js';
|
|
10
|
-
export { VisualizationWidget } from './VisualizationWidget.js';
|
|
11
|
-
export type { VisualizationWidgetProps } from './VisualizationWidget.js';
|
|
12
|
-
export { TableWidget } from './TableWidget.js';
|
|
13
|
-
export type { TableWidgetProps } from './TableWidget.js';
|
|
14
|
-
export { DataTable, DataTableEmptyRow, DataTableTimestamp, DataTableShare, } from './DataTable.js';
|
|
15
|
-
export type { DataTableProps, DataTableSearch, DataTableEmptyRowProps, DataTableTimestampProps, } from './DataTable.js';
|
|
16
|
-
export { MetricWidget } from './MetricWidget.js';
|
|
17
|
-
export type { MetricWidgetProps } from './MetricWidget.js';
|
|
18
|
-
export { DimensionPicker } from './DimensionPicker.js';
|
|
19
|
-
export { LiveControl } from './LiveControl.js';
|
|
20
|
-
export type { LiveControlProps, LiveIntervalSeconds, } from './LiveControl.js';
|
|
21
|
-
export { DateRangePicker } from './DateRangePicker.js';
|
|
22
|
-
export type { DatePresetId, DateRange, DateRangePickerProps, } from './DateRangePicker.js';
|
|
23
|
-
export { useAppVariables } from './variables.js';
|
|
24
|
-
export { SearchField } from './SearchField.js';
|
|
25
|
-
export type { SearchFieldProps } from './SearchField.js';
|
|
26
|
-
export { searchItems, matchSearchText } from './searchItems.js';
|
|
27
|
-
export type { SearchAttribute, SearchHit, SearchItemsOptions, SearchMatchValue, SearchRange, } from './searchItems.js';
|
|
28
|
-
export { SearchMatch } from './SearchMatch.js';
|
|
29
|
-
export type { SearchMatchProps } from './SearchMatch.js';
|
|
30
|
-
export { ChoicePicker } from './ChoicePicker.js';
|
|
31
|
-
export type { ChoiceOption, ChoicePickerProps, } from './ChoicePicker.js';
|
|
32
|
-
export { MenuTrigger, MenuButton, MenuPopover, Menu, MenuItem, MenuSection, MenuSeparator, } from './Menu.js';
|
|
33
|
-
export type { MenuTriggerProps, MenuPopoverProps, MenuProps, MenuItemProps, } from './Menu.js';
|
|
34
|
-
export { GradientScroll } from './GradientScroll.js';
|
|
35
|
-
export type { GradientScrollProps } from './GradientScroll.js';
|
|
36
|
-
export { Tabs, TabList, Tab, TabPanels, TabPanel, useViewTab, } from './Tabs.js';
|
|
37
|
-
export { GlossaryExplanation } from './GlossaryExplanation.js';
|
|
38
|
-
export type { GlossaryExplanationProps } from './GlossaryExplanation.js';
|
|
39
|
-
export { GlossaryDefinition } from './GlossaryDefinition.js';
|
|
40
|
-
export type { GlossaryDefinitionProps } from './GlossaryDefinition.js';
|
|
41
|
-
export { AboutData } from './AboutData.js';
|
|
42
|
-
export type { AboutDataProps, AboutEmpty, AboutSubject, AboutTab, } from './AboutData.js';
|
|
43
|
-
export { PresentStory } from './PresentStory.js';
|
|
44
|
-
export type { PresentStoryProps } from './PresentStory.js';
|
|
45
|
-
export type { StoryFinding, BoundStory } from './story.js';
|
|
46
|
-
export { Checkbox } from './Checkbox.js';
|
|
47
|
-
export type { CheckboxProps } from './Checkbox.js';
|
|
48
|
-
export { AppIcon } from './icons.js';
|
|
49
|
-
export type { AppIconName, AppIconProps } from './icons.js';
|
|
50
|
-
export { Sheet } from './Sheet.js';
|
|
51
|
-
export type { SheetProps } from './Sheet.js';
|
|
52
|
-
export { HelpPopover } from './HelpPopover.js';
|
|
53
|
-
export type { HelpPopoverProps } from './HelpPopover.js';
|
|
54
|
-
export { DataApp } from './StaticDataApp.js';
|
|
55
|
-
export type { DataAppProps } from './StaticDataApp.js';
|
|
56
|
-
export { injectDataAppStyles } from '../styles.js';
|
|
57
|
-
export { Tooltip, TooltipProvider } from './Tooltip.js';
|
|
58
|
-
export type { TooltipProps, TooltipProviderProps, } from './Tooltip.js';
|
|
59
|
-
export { LineChart } from './LineChart.js';
|
|
60
|
-
export type { LineChartProps, LineChartItem } from './LineChart.js';
|
|
61
|
-
export { AreaChart } from './AreaChart.js';
|
|
62
|
-
export type { AreaChartProps, AreaChartItem } from './AreaChart.js';
|
|
63
|
-
export { PieChart } from './PieChart.js';
|
|
64
|
-
export type { PieChartProps, PieChartItem } from './PieChart.js';
|
|
65
|
-
export { ScatterChart } from './ScatterChart.js';
|
|
66
|
-
export type { ScatterChartProps, ScatterChartItem, } from './ScatterChart.js';
|
|
67
|
-
export { BarChart } from './BarChart.js';
|
|
68
|
-
export type { BarChartProps, BarChartItem } from './BarChart.js';
|
|
69
|
-
export { DataValue } from './DataValue.js';
|
|
70
|
-
export type { DataValueProps } from './DataValue.js';
|
|
71
|
-
export type { CsvExport, CsvTable } from './csv-export.js';
|
|
72
|
-
export type { TableWidgetColumn } from './TableWidget.js';
|
|
73
|
-
export type { DataReading, MetricReading } from '../../core/reading.js';
|
|
74
|
-
export type { DataAppStyle, DataAppStyleToken, DataAppStyleHooks, } from '../style-contract.js';
|
|
75
|
-
export { Select } from './Select.js';
|
|
76
|
-
export type { SelectProps } from './Select.js';
|
|
77
|
-
export { RadioGroup, Radio, SegmentedControl } from './RadioGroup.js';
|
|
78
|
-
export type { RadioGroupProps, RadioProps, SegmentedControlProps, } from './RadioGroup.js';
|
|
79
|
-
export { CheckboxGroup } from './CheckboxGroup.js';
|
|
80
|
-
export type { CheckboxGroupProps } from './CheckboxGroup.js';
|
|
81
|
-
export { NumberField, NumberRangeField } from './NumberField.js';
|
|
82
|
-
export type { NumberFieldProps, NumberRangeFieldProps, NumberRange, } from './NumberField.js';
|
|
83
|
-
export { FilterBar } from './FilterBar.js';
|
|
84
|
-
export type { FilterBarProps } from './FilterBar.js';
|
|
85
|
-
export { VariableBar } from './VariableBar.js';
|
|
86
|
-
export type { VariableBarProps } from './VariableBar.js';
|
|
87
|
-
export { FilterActions } from './FilterActions.js';
|
|
88
|
-
export type { FilterActionsProps } from './FilterActions.js';
|
|
89
|
-
export { NumberFilterPicker } from './NumberFilterPicker.js';
|
|
90
|
-
export type { NumberFilterPickerProps } from './NumberFilterPicker.js';
|
|
91
|
-
export { ComposedChart } from './ComposedChart.js';
|
|
92
|
-
export type { ComposedChartProps } from './ComposedChart.js';
|
|
93
|
-
export { ChartLegend } from './ChartLegend.js';
|
|
94
|
-
export type { ChartLegendProps, ChartLegendItemProps, ChartLegendMarkerProps, ChartLegendLabelProps, ChartLegendMarkerKind, } from './ChartLegend.js';
|
|
95
|
-
export type { ComposedChartLegendProps } from './ComposedChartLegend.js';
|
|
96
|
-
export { FunnelChart } from './FunnelChart.js';
|
|
97
|
-
export type { FunnelChartProps, FunnelChartStep, FunnelChartSeries, } from './FunnelChart.js';
|
|
98
|
-
export { RetentionChart } from './RetentionChart.js';
|
|
99
|
-
export type { RetentionChartProps, RetentionChartPoint, RetentionChartSeries, } from './RetentionChart.js';
|
|
100
|
-
export { JourneyChart } from './JourneyChart.js';
|
|
101
|
-
export type { JourneyChartProps, JourneyChartPath, } from './JourneyChart.js';
|
|
102
|
-
export { useSvgId } from './useSvgId.js';
|
|
103
|
-
export { SearchTypeahead } from './SearchTypeahead.js';
|
|
104
|
-
export type { SearchTypeaheadProps, SearchSuggestion, } from './SearchTypeahead.js';
|
|
105
|
-
export { SectionHeading } from './SectionHeading.js';
|
|
106
|
-
export type { SectionHeadingProps } from './SectionHeading.js';
|
|
107
|
-
export { DateDisplay } from './DateDisplay.js';
|
|
108
|
-
export type { DateDisplayProps } from './DateDisplay.js';
|
|
109
|
-
export { useDateFormatting } from '../date-formatting.js';
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/** Aggregated route; repeated events remain distinct by depth and prefix. */
|
|
2
|
-
export type JourneyChartPath = {
|
|
3
|
-
/** Unique, nonblank path ID. */
|
|
4
|
-
id: string;
|
|
5
|
-
/** At least one nonblank event; null property means no property grouping. */
|
|
6
|
-
steps: readonly {
|
|
7
|
-
event: string;
|
|
8
|
-
property: string | null;
|
|
9
|
-
}[];
|
|
10
|
-
/** Finite, nonnegative population following this route. */
|
|
11
|
-
count: number;
|
|
12
|
-
/** True: converted; false: dropped off; null: no conversion classification. */
|
|
13
|
-
converted: boolean | null;
|
|
14
|
-
/** Stops at the last loaded event, without adding an outcome or expand control. */
|
|
15
|
-
truncated: boolean;
|
|
16
|
-
};
|
|
17
|
-
export type JourneyNode = {
|
|
18
|
-
key: string;
|
|
19
|
-
label: string;
|
|
20
|
-
depth: number;
|
|
21
|
-
outcome: 'event' | 'converted' | 'drop-off' | 'truncated' | 'end' | 'other';
|
|
22
|
-
count: number;
|
|
23
|
-
pathKeys: string[];
|
|
24
|
-
branchKeys?: string[];
|
|
25
|
-
expandable?: boolean;
|
|
26
|
-
expanded?: boolean;
|
|
27
|
-
hiddenBranchCount?: number;
|
|
28
|
-
};
|
|
29
|
-
export declare function journeyNodes(path: JourneyChartPath): Omit<JourneyNode, 'count' | 'pathKeys'>[];
|
|
30
|
-
export declare function buildJourneyFlow(paths: readonly JourneyChartPath[], expandedBranch?: string[]): {
|
|
31
|
-
nodes: JourneyNode[];
|
|
32
|
-
links: {
|
|
33
|
-
key: string;
|
|
34
|
-
source: string;
|
|
35
|
-
target: string;
|
|
36
|
-
count: number;
|
|
37
|
-
pathKeys: string[];
|
|
38
|
-
}[];
|
|
39
|
-
};
|
|
40
|
-
export declare function limitJourneyFlow(graph: ReturnType<typeof buildJourneyFlow>, visibleEventsByDepth?: Record<number, number>): {
|
|
41
|
-
nodes: JourneyNode[];
|
|
42
|
-
links: {
|
|
43
|
-
key: string;
|
|
44
|
-
source: string;
|
|
45
|
-
target: string;
|
|
46
|
-
count: number;
|
|
47
|
-
pathKeys: string[];
|
|
48
|
-
}[];
|
|
49
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
type KeyEvent = Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'isComposing'>;
|
|
2
|
-
/** Keep local key actions separate from shortcuts and IME composition. Pass React's nativeEvent. */
|
|
3
|
-
export declare function isPlainKeyEvent(event: KeyEvent, { allowShift }?: {
|
|
4
|
-
allowShift?: boolean;
|
|
5
|
-
}): boolean;
|
|
6
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { DateRangeRequest } from '../../core/contract.js';
|
|
2
|
-
import { type MetricFormat, type DateFormatOptions } from '../../core/format.js';
|
|
3
|
-
export type MetricComparison = {
|
|
4
|
-
current: {
|
|
5
|
-
value: number;
|
|
6
|
-
formattedValue: string;
|
|
7
|
-
periodLabel?: string;
|
|
8
|
-
};
|
|
9
|
-
previous?: {
|
|
10
|
-
value: number | null;
|
|
11
|
-
formattedValue: string;
|
|
12
|
-
periodLabel?: string;
|
|
13
|
-
};
|
|
14
|
-
favorableDirection?: 'up' | 'down';
|
|
15
|
-
};
|
|
16
|
-
/** Label a comparison from the input that produced the displayed result. Null means the
|
|
17
|
-
* requested previous period has no comparable value; zero remains a measured value. */
|
|
18
|
-
export declare function calendarMetricComparison(displayedInput: DateRangeRequest, values: {
|
|
19
|
-
current: number;
|
|
20
|
-
previous: number | null;
|
|
21
|
-
format: MetricFormat;
|
|
22
|
-
favorableDirection?: MetricComparison['favorableDirection'];
|
|
23
|
-
}, options?: DateFormatOptions): MetricComparison | undefined;
|
|
24
|
-
/** A zero or missing baseline has no meaningful relative percentage. */
|
|
25
|
-
export declare function comparisonChange({ current, previous, favorableDirection, }: MetricComparison): {
|
|
26
|
-
readonly percent: number | null;
|
|
27
|
-
readonly direction: "down" | "flat" | "up";
|
|
28
|
-
readonly tone: "bad" | "good" | "neutral";
|
|
29
|
-
readonly icon: "trendDown" | "trendFlat" | "trendUp";
|
|
30
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { MetricFormat, DateFormatOptions } from '../../core/format.js';
|
|
2
|
-
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
3
|
-
import type { MetricReading } from '../../core/reading.js';
|
|
4
|
-
export type MetricDefinition = {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
format: MetricFormat;
|
|
8
|
-
favorableDirection?: 'up' | 'down';
|
|
9
|
-
evidence: WidgetEvidence;
|
|
10
|
-
};
|
|
11
|
-
export declare function metricComparison(metric: MetricDefinition, reading: MetricReading, options?: DateFormatOptions): import("./metric-comparison.js").MetricComparison | undefined;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { DataReading } from '../../core/reading.js';
|
|
3
|
-
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
4
|
-
export type EmptyContent = {
|
|
5
|
-
title: ReactNode;
|
|
6
|
-
description?: ReactNode;
|
|
7
|
-
/** A relevant recovery action; omit when there is nothing the user can change. */
|
|
8
|
-
action?: ReactNode;
|
|
9
|
-
};
|
|
10
|
-
export type SkeletonContent = {
|
|
11
|
-
variant: 'metric' | 'panel' | 'ranking';
|
|
12
|
-
/**
|
|
13
|
-
* Placeholder rows, clamped to 0–100.
|
|
14
|
-
* @default 4
|
|
15
|
-
*/
|
|
16
|
-
rows?: number;
|
|
17
|
-
};
|
|
18
|
-
/** A bound widget must explain empty results and link the reading to its evidence. */
|
|
19
|
-
export type BoundWidgetReading<Data> = {
|
|
20
|
-
reading: DataReading<Data>;
|
|
21
|
-
isEmpty: (data: Data) => boolean;
|
|
22
|
-
emptyFallback: EmptyContent;
|
|
23
|
-
evidence: WidgetEvidence;
|
|
24
|
-
skeleton?: SkeletonContent;
|
|
25
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function searchParams(): URLSearchParams;
|
|
2
|
-
/** Listen to Back/Forward and writes made by another runtime control. */
|
|
3
|
-
export declare function subscribeSearch(listener: () => void): () => void;
|
|
4
|
-
/** Write search keys. `null` removes a key. Skips the history write when nothing changed. */
|
|
5
|
-
export declare function writeSearch(update: Record<string, string | null>, mode?: 'replace' | 'push'): void;
|
|
6
|
-
export declare function slug(value: string): string;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export type SearchRange = {
|
|
2
|
-
start: number;
|
|
3
|
-
end: number;
|
|
4
|
-
};
|
|
5
|
-
/** The exact displayed text and its offsets stay together for safe rendering. */
|
|
6
|
-
export type SearchMatchValue = {
|
|
7
|
-
text: string;
|
|
8
|
-
ranges: readonly SearchRange[];
|
|
9
|
-
};
|
|
10
|
-
export type SearchAttribute<Item> = {
|
|
11
|
-
name: string;
|
|
12
|
-
getter: (item: Item) => string;
|
|
13
|
-
weight?: number;
|
|
14
|
-
};
|
|
15
|
-
export type SearchHit<Item> = {
|
|
16
|
-
item: Item;
|
|
17
|
-
score: number;
|
|
18
|
-
/** Render displayed fields with <SearchMatch match={hit.matches.fieldName} />. */
|
|
19
|
-
matches: Record<string, SearchMatchValue>;
|
|
20
|
-
};
|
|
21
|
-
export type SearchItemsOptions<Item> = {
|
|
22
|
-
attributes: readonly [SearchAttribute<Item>, ...SearchAttribute<Item>[]];
|
|
23
|
-
/** Literal filtering preserves source order; fuzzy search ranks discovery results. */
|
|
24
|
-
mode?: 'literal' | 'fuzzy';
|
|
25
|
-
limit?: number;
|
|
26
|
-
fuzzyThreshold?: number;
|
|
27
|
-
};
|
|
28
|
-
/** Highlight literal query terms in supplied text without filtering or reordering results. */
|
|
29
|
-
export declare function matchSearchText(text: string, query: string): SearchMatchValue;
|
|
30
|
-
/**
|
|
31
|
-
* Search only a complete local collection. Empty queries retain every item.
|
|
32
|
-
* When a searched field is displayed, render its match with SearchMatch:
|
|
33
|
-
* `hits.map(hit => <SearchMatch match={hit.matches.name} />)`.
|
|
34
|
-
* Fields used only to find a row need no visible highlight.
|
|
35
|
-
*/
|
|
36
|
-
export declare function searchItems<Item>(items: readonly Item[], query: string, options: SearchItemsOptions<Item>): SearchHit<Item>[];
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `alt` is Alt/Option, leaving character keys and browser refresh untouched; `mod` is ⌘ on Apple
|
|
3
|
-
* platforms and Ctrl elsewhere.
|
|
4
|
-
*/
|
|
5
|
-
export type Shortcut = {
|
|
6
|
-
modifier: 'alt' | 'mod';
|
|
7
|
-
shift?: boolean;
|
|
8
|
-
code: string;
|
|
9
|
-
key: string;
|
|
10
|
-
};
|
|
11
|
-
export declare const shortcuts: {
|
|
12
|
-
readonly annotate: {
|
|
13
|
-
readonly modifier: 'mod';
|
|
14
|
-
readonly shift: true;
|
|
15
|
-
readonly code: 'Period';
|
|
16
|
-
readonly key: '.';
|
|
17
|
-
};
|
|
18
|
-
readonly sendAnnotations: {
|
|
19
|
-
readonly modifier: 'mod';
|
|
20
|
-
readonly code: 'Enter';
|
|
21
|
-
readonly key: 'Enter';
|
|
22
|
-
};
|
|
23
|
-
readonly refresh: {
|
|
24
|
-
readonly modifier: 'alt';
|
|
25
|
-
readonly code: 'KeyR';
|
|
26
|
-
readonly key: 'R';
|
|
27
|
-
};
|
|
28
|
-
readonly aboutData: {
|
|
29
|
-
readonly modifier: 'alt';
|
|
30
|
-
readonly code: 'KeyI';
|
|
31
|
-
readonly key: 'I';
|
|
32
|
-
};
|
|
33
|
-
readonly playStory: {
|
|
34
|
-
readonly modifier: 'mod';
|
|
35
|
-
readonly shift: true;
|
|
36
|
-
readonly code: 'Enter';
|
|
37
|
-
readonly key: 'Enter';
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export declare function shortcutLabel({ modifier, shift, key }: Shortcut): string;
|
|
41
|
-
export declare function ariaKeyShortcuts({ modifier, shift, key }: Shortcut): string;
|
|
42
|
-
export declare function isEditingTarget(target: EventTarget | null): boolean;
|
|
43
|
-
export declare function matchesShortcut(event: KeyboardEvent, shortcut: Shortcut): boolean;
|
|
44
|
-
/** Bind a page-level shortcut. Ignored while typing or while a modal layer is open. */
|
|
45
|
-
export declare function useShortcut(shortcut: Shortcut, action: () => void, enabled?: boolean, allowWhileEditing?: boolean): void;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { DisplayedSnapshot } from '../../core/data-view.js';
|
|
3
|
-
import type { MetricDefinition } from './metric.js';
|
|
4
|
-
import type { StoryStep } from './PresentStory.js';
|
|
5
|
-
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
6
|
-
import type { DataContext } from './data-context.js';
|
|
7
|
-
/** One consequential, inspectable finding from the displayed result. */
|
|
8
|
-
export type StoryFinding = {
|
|
9
|
-
id: string;
|
|
10
|
-
headline: string;
|
|
11
|
-
context?: string;
|
|
12
|
-
visual: ReactNode;
|
|
13
|
-
visualKind?: 'metric' | 'chart';
|
|
14
|
-
evidence: WidgetEvidence | MetricDefinition;
|
|
15
|
-
};
|
|
16
|
-
/** One to four findings with unique, nonempty IDs and registered evidence.
|
|
17
|
-
* Receives the displayed result and its original input during refresh or failure. */
|
|
18
|
-
export type BoundStory<Data, Input> = (snapshot: DisplayedSnapshot<Data, Input>) => readonly StoryFinding[];
|
|
19
|
-
/** Validate the authored findings before handing them to the presentation UI. */
|
|
20
|
-
export declare function storySteps(findings: readonly StoryFinding[], context: DataContext): StoryStep[];
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type Theme, type AppearanceOptions } from '../../core/appearance.js';
|
|
2
|
-
/** The parent theme takes precedence; only standalone viewers receive controls. */
|
|
3
|
-
export declare function useAppAppearance(appearance: AppearanceOptions | undefined, hostTheme?: Theme): import("../../core/appearance.js").ThemeController | undefined;
|