@altertable/data-app-react 0.74.0 → 0.76.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.
@@ -1,9 +1,9 @@
1
- import { $ as TableWidgetColumn, $t as defineDataIdentifiers, A as AppVariableValues, At as EmptyContent, B as dateRangeVariable, Bt as DataContext, C as MetricWidgetProps$1, Ct as CsvCell, D as DataAppControlProps, E as DataAppBaseProps, F as DateRangeVariableOptions, G as mountDataApp, Gt as StoryFinding, H as searchVariable, Ht as GlossaryEntry, I as MultiChoiceVariable, J as DataAppStyleToken, Jt as MetricDefinition, K as DataAppStyle, L as SearchVariable, M as ChoiceVariable, N as DateRangeSelection, P as DateRangeVariable, Qt as TableIdentifier, R as VariablePresentation, T as DataValueProps$1, Tt as CsvTable, Ut as createDataContext, V as multiChoiceVariable, Vt as EvidenceDeclaration, X as injectDataAppStyles, Xt as ColumnIdentifier, Y as DataAppStylesOptions, Yt as MetricComparison, Z as TableDisplayMode, Zt as DataIdentifierDefinition, _ as VisualizationWidgetView$1, a as SectionHeadingProps, c as TooltipProvider, d as AppIconName, en as Button, et as TableWidgetProps$1, g as VisualizationWidgetProps$1, i as SectionHeading, j as ChoiceOption, jt as WidgetEvidence, k as AppVariable, kt as ItemActions, l as TooltipProviderProps, m as HelpPopoverProps, n as DateDisplay, o as Tooltip, q as DataAppStyleHooks, r as DateDisplayProps, s as TooltipProps, t as useDateFormatting, tn as ButtonProps, tt as TableWidgetSearch, vt as SearchSuggestion, y as TextWidgetProps$1, z as choiceVariable, zt as AuthoringDataContext } from "./chunks/date-formatting.js";
1
+ import { $ as mountDataApp, $t as StoryFinding, A as DataAppControlProps, B as DateTimeRangePreset, E as MetricWidgetProps$1, Et as SearchSuggestion, F as ChoiceVariable, G as VariablePresentation, H as DateTimeRangeVariableOptions, I as DateTimeRangeComparisonRequest, J as dateTimeRangeVariable, Jt as DataContext, K as choiceVariable, L as DateTimeRangeComparisonSelection, Lt as ItemActions, M as AppVariable, N as AppVariableValues, Nt as CsvTable, O as DataValueProps$1, P as ChoiceOption, R as DateTimeRangeComparisonVariable, Rt as EmptyContent, S as TextWidgetProps$1, U as MultiChoiceVariable, V as DateTimeRangeVariable, W as SearchVariable, X as searchVariable, Xt as GlossaryEntry, Y as multiChoiceVariable, Yt as EvidenceDeclaration, Zt as createDataContext, _ as HelpPopoverProps, a as DateDisplay, an as DataIdentifierDefinition, at as TableDisplayMode, b as VisualizationWidgetView$1, c as SectionHeadingProps, cn as Button, ct as TableWidgetProps$1, d as TooltipProvider, et as DataAppStyle, f as TooltipProviderProps, i as useDateFormatting, in as ColumnIdentifier, it as injectDataAppStyles, jt as CsvCell, k as DataAppBaseProps, l as Tooltip, ln as ButtonProps, lt as TableWidgetSearch, m as AppIconName, n as DateTimeRangePickerProps, nn as MetricDefinition, nt as DataAppStyleToken, o as DateDisplayProps, on as TableIdentifier, q as dateTimeRangePresets, qt as AuthoringDataContext, rn as MetricComparison, rt as DataAppStylesOptions, s as SectionHeading, sn as defineDataIdentifiers, st as TableWidgetColumn, t as DateTimeRangePicker, tt as DataAppStyleHooks, u as TooltipProps, y as VisualizationWidgetProps$1, z as DateTimeRangeComparisonVariableOptions, zt as WidgetEvidence } from "./chunks/DateTimeRangePicker.js";
2
2
  import { DataClient, InputOf, OutputOf } from "@altertable/data-app/client";
3
- import { AppVariableValues as AppVariableValues$1, CheckedFacetContexts, CheckedVariableDeclarations, ChoiceVariable as ChoiceVariable$1, DataReading, DataView, DateRangeVariable as DateRangeVariable$1, DimensionFilterSettings, DimensionValue, DisplayedSnapshot, FacetVariable, IsUnion, MetricReading, MetricValues, MetricValues as MetricValues$1, VariableCollection } from "@altertable/data-app/internal";
3
+ import { AppVariableValues as AppVariableValues$1, CheckedFacetContexts, CheckedVariableDeclarations, ChoiceVariable as ChoiceVariable$1, DataReading, DataView, DimensionFilterSettings, DimensionValue, DisplayedSnapshot, FacetVariable, IsUnion, MetricReading, MetricValues, MetricValues as MetricValues$1, VariableCollection } from "@altertable/data-app/internal";
4
4
  import { ComponentPropsWithRef, ReactNode, Ref, RefObject } from "react";
5
+ import { DataAppAnnotationDraft, DataOperations, DateTimeRangeComparisonRequest as DateTimeRangeComparisonRequest$1, DateTimeRangeComparisonVariable as DateTimeRangeComparisonVariable$1, DimensionOption, DisclosedQuery, ReportingPeriod, ReportingPeriod as ReportingPeriod$1 } from "@altertable/data-app/contract";
5
6
  import { DateFormat, MetricFormat } from "@altertable/data-app/format";
6
- import { DataAppAnnotationDraft, DataOperations, DateRangeRequest, DimensionOption, DisclosedQuery, ReportingPeriod, ReportingPeriod as ReportingPeriod$1 } from "@altertable/data-app/contract";
7
7
  import { Theme } from "@altertable/data-app/appearance";
8
8
  //#region src/view-runtime.d.ts
9
9
  type ViewResult<Data, Input> = {
@@ -61,19 +61,19 @@ type DetailNavigation = {
61
61
  export declare function useDetailNavigation(): DetailNavigation;
62
62
  //#endregion
63
63
  //#region src/view.d.ts
64
- type ResolvedVariable<Variable> = Variable extends DateRangeVariable$1 ? DateRangeRequest : AppVariableValues$1<{
64
+ type ResolvedVariable<Variable> = Variable extends DateTimeRangeComparisonVariable$1 ? DateTimeRangeComparisonRequest$1 : AppVariableValues$1<{
65
65
  value: Variable;
66
66
  }>['value'];
67
67
  type ResolvedVariables<Variables extends VariableCollection> = { [Key in keyof Variables]: ResolvedVariable<Variables[Key]> | (string extends keyof Variables ? undefined : never); };
68
- type DateVariableKey<Variables extends VariableCollection> = { [Key in keyof Variables]: Variables[Key] extends DateRangeVariable$1 ? Key : never; }[keyof Variables] & string;
68
+ type DateVariableKey<Variables extends VariableCollection> = { [Key in keyof Variables]: Variables[Key] extends DateTimeRangeComparisonVariable$1 ? Key : never; }[keyof Variables] & string;
69
+ /** Extract the selected range and comparison unchanged, including from nested inputs. */
69
70
  type ViewDate<Variables extends VariableCollection, Input> = {
70
71
  variable: DateVariableKey<Variables>;
71
- /** Extract the selected range and comparison unchanged, including from nested inputs. */
72
- input: (input: Input) => DateRangeRequest;
72
+ input: (input: Input) => DateTimeRangeComparisonRequest$1;
73
73
  };
74
74
  /** Read variable values from a custom operation input; omitted keys use top-level fields. */
75
75
  type ViewBindings<Variables extends VariableCollection, Input> = Partial<{ [Key in keyof Variables]: (input: Input) => ResolvedVariables<Variables>[Key]; }>;
76
- type RequiredFilterBindingKeys<Variables extends VariableCollection, Input> = { [Key in keyof Variables]: Variables[Key]['kind'] extends 'dateRange' ? never : Variables[Key]['kind'] extends 'choice' ? [Input] extends [Record<Key, unknown>] ? ResolvedVariables<Variables>[Key] extends Input[Key] ? never : Key : Key : Extract<Variables[Key]['presentation'], {
76
+ type RequiredFilterBindingKeys<Variables extends VariableCollection, Input> = { [Key in keyof Variables]: Variables[Key]['kind'] extends 'dateTimeRangeComparison' ? never : Variables[Key]['kind'] extends 'choice' ? [Input] extends [Record<Key, unknown>] ? ResolvedVariables<Variables>[Key] extends Input[Key] ? never : Key : Key : Extract<Variables[Key]['presentation'], {
77
77
  group: 'display';
78
78
  }> extends never ? [Input] extends [Record<Key, ResolvedVariables<Variables>[Key]>] ? [ResolvedVariables<Variables>[Key]] extends [Input[Key]] ? never : Key : Key : never; }[keyof Variables];
79
79
  /** Derive compatible top-level filter bindings; require readers for other input shapes. */
@@ -266,9 +266,9 @@ declare class Dataset<Data, Input, Row> extends ExportDataset<Data, Input> {
266
266
  declare class Metric<Data, Input> extends RegisteredBinding {
267
267
  #private;
268
268
  readonly definition: MetricDefinition;
269
- constructor(definition: MetricDefinition, select: (data: Data, input: Input) => MetricValues$1, date?: (input: Input) => DateRangeRequest, owner?: object);
269
+ constructor(definition: MetricDefinition, select: (data: Data, input: Input) => MetricValues$1, date?: (input: Input) => DateTimeRangeComparisonRequest$1, owner?: object);
270
270
  read: <Source extends ViewSource<Data, Input>>(source: Source) => SourceReading<Source, MetricValues$1 & {
271
- period?: DateRangeRequest;
271
+ period?: DateTimeRangeComparisonRequest$1;
272
272
  }>;
273
273
  records<DetailData, DetailInput>(options: {
274
274
  target: DetailView<DetailData, DetailInput>;
@@ -324,19 +324,24 @@ declare class ViewContent<Data, Input> {
324
324
  }
325
325
  //#endregion
326
326
  //#region src/hooks.d.ts
327
- type TimeVariables<Additional extends VariableCollection> = {
328
- period: ReturnType<typeof dateRangeVariable>;
329
- } & Additional;
330
- type TimeInput<Additional extends VariableCollection> = keyof Additional extends never ? DateRangeRequest : ResolvedVariables<TimeVariables<Additional>>;
331
- type TimeInputMapping<Additional extends VariableCollection, Input> = TimeInput<Additional> extends Input ? {
332
- input?: (values: ResolvedVariables<TimeVariables<Additional>>) => Input;
333
- } : {
334
- input: (values: ResolvedVariables<TimeVariables<Additional>>) => Input;
335
- };
336
- /** Match the period reader's precedence for each possible operation input. */
337
- type RequiredPeriodBinding<Input> = Input extends unknown ? 'period' extends keyof Input ? Input extends {
338
- period: DateRangeRequest;
339
- } ? never : 'period' : Input extends DateRangeRequest ? never : 'period' : never;
327
+ type DateTimeViewDefinition<Operations extends DataOperations, Name extends keyof Operations & string, Additional extends VariableCollection, Context extends AuthoringDataContext, Period extends DateTimeRangeVariable | DateTimeRangeComparisonVariable = DateTimeRangeVariable> = Omit<DataViewDefinition<Name, {
328
+ period: Period;
329
+ } & NoInfer<Additional>, InputOf<Operations[Name]>, OutputOf<Operations[Name]>>, 'variables' | 'describeInput' | 'date'> & {
330
+ operation: Name & (true extends IsUnion<NoInfer<Name>> ? never : unknown);
331
+ dataContext: Context;
332
+ time: Period;
333
+ variables?: Additional & CheckedVariableDeclarations<NoInfer<Additional>> & {
334
+ period?: never;
335
+ } & Omit<CheckedFacetContexts<{
336
+ period: Period;
337
+ } & NoInfer<Additional>>, 'period'> & Omit<CheckedFacetSources<Operations, {
338
+ period: Period;
339
+ } & NoInfer<Additional>>, 'period'>;
340
+ } & ViewBindingOptions<{
341
+ period: Period;
342
+ } & NoInfer<Additional>, InputOf<Operations[Name]>, Period extends DateTimeRangeComparisonVariable ? InputOf<Operations[Name]> extends {
343
+ period: DateTimeRangeComparisonRequest;
344
+ } ? never : 'period' : never>;
340
345
  type NonEmptyColumns<Columns extends object> = keyof Columns extends never ? never : Columns;
341
346
  type BoundDataView<Name extends string, Variables extends VariableCollection, Input, Data, Context extends AuthoringDataContext, HasDate extends boolean> = DeclaredView<Data, Input, ResolvedDataViewDefinition<Name, Variables, Input, Data> & {
342
347
  describeInput: (input: Input) => string;
@@ -394,18 +399,9 @@ export declare function createDataHooks<Operations extends DataOperations>(clien
394
399
  operation: Name;
395
400
  dataContext: Context;
396
401
  }) => BoundDetailView<OutputOf<Operations[Name]>, InputOf<Operations[Name]>, Context>;
397
- defineTimeView: <Name extends keyof Operations & string, const Additional extends VariableCollection = {}, const Context extends AuthoringDataContext = AuthoringDataContext>(definition: {
398
- operation: Name & (true extends IsUnion<NoInfer<Name>> ? never : unknown);
399
- dataContext: Context;
400
- time: Omit<DateRangeVariableOptions, 'key'>;
401
- variables?: Additional & CheckedVariableDeclarations<NoInfer<Additional>> & {
402
- period?: never;
403
- } & Omit<CheckedFacetContexts<TimeVariables<NoInfer<Additional>>>, 'period'> & Omit<CheckedFacetSources<Operations, TimeVariables<NoInfer<Additional>>>, 'period'>;
404
- isEmpty: (data: OutputOf<Operations[Name]>) => boolean;
405
- emptyFallback: EmptyContent;
406
- } & TimeInputMapping<NoInfer<Additional>, InputOf<Operations[Name]>> & ViewBindingOptions<TimeVariables<NoInfer<Additional>>, InputOf<Operations[Name]>, RequiredPeriodBinding<InputOf<Operations[Name]>>>) => BoundDataView<Name, {
407
- period: DateRangeVariable;
408
- } & Additional, InputOf<Operations[Name]>, OutputOf<Operations[Name]>, Context, true>;
402
+ defineTimeView: <Name extends keyof Operations & string, const Additional extends VariableCollection = {}, const Context extends AuthoringDataContext = AuthoringDataContext, Period extends DateTimeRangeVariable | DateTimeRangeComparisonVariable = DateTimeRangeVariable>(definition: DateTimeViewDefinition<Operations, Name, Additional, Context, Period>) => BoundDataView<Name, {
403
+ period: Period;
404
+ } & Additional, InputOf<Operations[Name]>, OutputOf<Operations[Name]>, Context, Period extends DateTimeRangeComparisonVariable ? true : false>;
409
405
  defineFacetFilter: {
410
406
  <const Context extends VariableCollection, const Name extends FacetOperationName<Operations, string>>(config: FacetConfig<Operations, string, Context, Name>): FacetVariable<string, Readonly<Context>, Name, InputOf<Operations[Name]>>;
411
407
  <const Context extends VariableCollection, const Name extends FacetOperationName<Operations, number>>(config: FacetConfig<Operations, number, Context, Name>): FacetVariable<number, Readonly<Context>, Name, InputOf<Operations[Name]>>;
@@ -419,10 +415,12 @@ type DataAppProps<Data, Input = unknown> = Omit<DataAppBaseProps, 'dataContext'>
419
415
  };
420
416
  /** Show supplied datasets’ record suggestions on the first declared search. Defaults to true. */
421
417
  showSearchSuggestions?: boolean;
422
- story: (snapshot: DisplayedSnapshot<Data, Input>) => readonly (Omit<StoryFinding, 'evidence'> & {
418
+ /** Omit to leave presentation out of the toolbar. */
419
+ story?: (snapshot: DisplayedSnapshot<Data, Input>) => readonly (Omit<StoryFinding, 'evidence'> & {
423
420
  evidence: RegisteredBinding;
424
421
  })[];
425
- datasets: readonly [ExportDataset<Data, Input>, ...ExportDataset<Data, Input>[]];
422
+ /** Omit to leave CSV export out of the toolbar. */
423
+ datasets?: readonly [ExportDataset<Data, Input>, ...ExportDataset<Data, Input>[]];
426
424
  /** Detail destinations available to dataset actions and metric record inspection. */
427
425
  details?: readonly DetailContent<any, any>[];
428
426
  };
@@ -688,6 +686,16 @@ type AnnotationTargetProps = ComponentPropsWithRef<'div'> & {
688
686
  /** A stable feedback target for app-owned content outside the built-in widgets. */
689
687
  export declare function AnnotationTarget({ annotationId, label, evidence, ...props }: AnnotationTargetProps): import("react").JSX.Element;
690
688
  //#endregion
689
+ //#region src/ui/ExternalLink.d.ts
690
+ type ExternalLinkProps = {
691
+ href: string;
692
+ children: ReactNode;
693
+ className?: string;
694
+ title?: string;
695
+ };
696
+ /** Open HTTPS links through the host when embedded, or a native new tab when standalone. */
697
+ export declare function ExternalLink({ href, children, className, title }: ExternalLinkProps): import("react").JSX.Element;
698
+ //#endregion
691
699
  //#region src/annotations/useDataAppAnnotations.d.ts
692
700
  /** Bind annotation delivery to this app's current iframe bridge. The host owns storage and submission. */
693
701
  export declare function useDataAppAnnotations(): {
@@ -745,5 +753,5 @@ export declare function AnnotationBar({ ref, annotations, active, theme, disable
745
753
  /** Install only the outer-frame annotation controls; leave host page typography and layout intact. */
746
754
  export declare function injectDataAppAnnotationStyles(options?: DataAppStylesOptions): HTMLStyleElement;
747
755
  //#endregion
748
- export { type AnnotationBarHandle, type AnnotationBarProps, type AnnotationTargetProps, type AppVariable, type AppVariableValues, type BreakdownItem, type BreakdownProps, Button, type ButtonProps, type ChoiceOption, type ChoiceVariable, type ColumnIdentifier, type ComparisonProps, type CsvCell, type DataAppProps, type DataAppStyle, type DataAppStyleHooks, type DataAppStyleToken, type DataAppStylesOptions, type DataContext, type DataIdentifierDefinition, type DataSectionProps, type DataValueProps, type DatasetColumn, type DatasetDeclaration as DatasetDefinition, type DatasetSuggestionOptions, DateDisplay, type DateDisplayProps, type DateRangeSelection, type DateRangeVariable, type DateRangeVariableOptions, type DateTimeTooltipProps, type DetailViewDefinition, type EmptyStateProps, type GlossaryEntry, type GridItemProps, type GridProps, type IconButtonProps, type MetricDefinition, type MetricRecords, type MetricValues, type MetricWidgetProps, type MultiChoiceVariable, type PeriodComparison, type PeriodSummaryProps, type RankingItem, type RankingProps, type ReportingPeriod, type SearchVariable, SectionHeading, type SectionHeadingProps, type SkeletonProps, type StackProps, type TableIdentifier, type TableWidgetProps, type TableWidgetSearch, type TextContentProps, type TextWidgetProps, Tooltip, type TooltipProps, TooltipProvider, type TooltipProviderProps, type UpdatedAtProps, type VariablePresentation, type VisualizationWidgetProps, type VisualizationWidgetView, type WidgetEvidence, choiceVariable, createDataContext, dateRangeVariable, defineDataIdentifiers, injectDataAppStyles, mountDataApp, multiChoiceVariable, searchVariable, useDateFormatting };
756
+ export { type AnnotationBarHandle, type AnnotationBarProps, type AnnotationTargetProps, type AppVariable, type AppVariableValues, type BreakdownItem, type BreakdownProps, Button, type ButtonProps, type ChoiceOption, type ChoiceVariable, type ColumnIdentifier, type ComparisonProps, type CsvCell, type DataAppProps, type DataAppStyle, type DataAppStyleHooks, type DataAppStyleToken, type DataAppStylesOptions, type DataContext, type DataIdentifierDefinition, type DataSectionProps, type DataValueProps, type DatasetColumn, type DatasetDeclaration as DatasetDefinition, type DatasetSuggestionOptions, DateDisplay, type DateDisplayProps, type DateTimeRangeComparisonRequest, type DateTimeRangeComparisonSelection, type DateTimeRangeComparisonVariable, type DateTimeRangeComparisonVariableOptions, DateTimeRangePicker, type DateTimeRangePickerProps, type DateTimeRangePreset, type DateTimeRangeVariable, type DateTimeRangeVariableOptions, type DateTimeTooltipProps, type DetailViewDefinition, type EmptyStateProps, type ExternalLinkProps, type GlossaryEntry, type GridItemProps, type GridProps, type IconButtonProps, type MetricDefinition, type MetricRecords, type MetricValues, type MetricWidgetProps, type MultiChoiceVariable, type PeriodComparison, type PeriodSummaryProps, type RankingItem, type RankingProps, type ReportingPeriod, type SearchVariable, SectionHeading, type SectionHeadingProps, type SkeletonProps, type StackProps, type TableIdentifier, type TableWidgetProps, type TableWidgetSearch, type TextContentProps, type TextWidgetProps, Tooltip, type TooltipProps, TooltipProvider, type TooltipProviderProps, type UpdatedAtProps, type VariablePresentation, type VisualizationWidgetProps, type VisualizationWidgetView, type WidgetEvidence, choiceVariable, createDataContext, dateTimeRangePresets, dateTimeRangeVariable, defineDataIdentifiers, injectDataAppStyles, mountDataApp, multiChoiceVariable, searchVariable, useDateFormatting };
749
757
  //# sourceMappingURL=index.d.ts.map
@@ -1,11 +1,10 @@
1
- import { $ as TableWidgetColumn, Bt as DataContext, C as MetricWidgetProps, Dt as ExplorationActionControl, Et as ExplorationAction, Ft as AboutSubject, Gt as StoryFinding, Ht as GlossaryEntry, It as AboutTab, J as DataAppStyleToken, K as DataAppStyle, Kt as PresentStory, Lt as Sheet, Mt as AboutData, Nt as AboutDataProps, O as StaticDataAppProps, Ot as ExplorationActionControlProps, Pt as AboutEmpty, Q as TableWidget$1, Rt as SheetProps, S as MetricWidget$1, St as SearchFieldProps, T as DataValueProps, Tt as CsvTable, U as useAppVariables, W as DataAppProvider, Wt as BoundStory, X as injectDataAppStyles, _t as DataTableTimestampProps, a as SectionHeadingProps, at as SearchMatchValue, b as DataWidget, bt as SearchTypeaheadProps, c as TooltipProvider, ct as searchItems, d as AppIconName, dt as DataTableEmptyRow, et as TableWidgetProps, f as AppIconProps, ft as DataTableEmptyRowProps, g as VisualizationWidgetProps, gt as DataTableTimestamp, h as VisualizationWidget$1, ht as DataTableShare, i as SectionHeading, it as SearchItemsOptions, kt as ItemActions, l as TooltipProviderProps, lt as WidgetStatus, m as HelpPopoverProps, mt as DataTableSearch, n as DateDisplay, nn as PressButton, nt as SearchAttribute, o as Tooltip, ot as SearchRange, p as HelpPopover, pt as DataTableProps, q as DataAppStyleHooks, qt as PresentStoryProps, r as DateDisplayProps, rt as SearchHit, s as TooltipProps, st as matchSearchText, t as useDateFormatting, u as AppIcon, ut as DataTable, v as TextWidget$1, vt as SearchSuggestion, w as DataValue, wt as CsvExport, x as DataWidgetProps, xt as SearchField, y as TextWidgetProps, yt as SearchTypeahead } from "../chunks/date-formatting.js";
2
- import { ChoiceOption, ChoiceOption as ChoiceOption$1, DataReading, DatePresetId, DatePresetId as DatePresetId$1, DateRange, DateRange as DateRange$1, DimensionSelectionVariable, DimensionValue, MetricReading } from "@altertable/data-app/internal";
1
+ import { $t as StoryFinding, At as SearchFieldProps, B as DateTimeRangePreset, Bt as AboutData, C as DataWidget, Ct as DataTableShare, D as DataValue, Dt as SearchTypeahead, E as MetricWidgetProps, Et as SearchSuggestion, Ft as ExplorationActionControl, Gt as Sheet, H as DateTimeRangeVariableOptions, Ht as AboutEmpty, I as DateTimeRangeComparisonRequest, It as ExplorationActionControlProps, J as dateTimeRangeVariable, Jt as DataContext, Kt as SheetProps, L as DateTimeRangeComparisonSelection, Lt as ItemActions, Mt as CsvExport, Nt as CsvTable, O as DataValueProps, Ot as SearchTypeaheadProps, Pt as ExplorationAction, Q as DataAppProvider, Qt as BoundStory, R as DateTimeRangeComparisonVariable, S as TextWidgetProps, St as DataTableSearch, T as MetricWidget$1, Tt as DataTableTimestampProps, Ut as AboutSubject, V as DateTimeRangeVariable, Vt as AboutDataProps, Wt as AboutTab, Xt as GlossaryEntry, Z as useAppVariables, _ as HelpPopoverProps, _t as WidgetStatus, a as DateDisplay, bt as DataTableEmptyRowProps, c as SectionHeadingProps, ct as TableWidgetProps, d as TooltipProvider, dt as SearchHit, en as PresentStory, et as DataAppStyle, f as TooltipProviderProps, ft as SearchItemsOptions, g as HelpPopover, gt as searchItems, h as AppIconProps, ht as matchSearchText, i as useDateFormatting, it as injectDataAppStyles, j as StaticDataAppProps, kt as SearchField, l as Tooltip, m as AppIconName, mt as SearchRange, n as DateTimeRangePickerProps, nt as DataAppStyleToken, o as DateDisplayProps, ot as TableWidget$1, p as AppIcon, pt as SearchMatchValue, q as dateTimeRangePresets, r as ControlLabelPlacement, s as SectionHeading, st as TableWidgetColumn, t as DateTimeRangePicker, tn as PresentStoryProps, tt as DataAppStyleHooks, u as TooltipProps, un as PressButton, ut as SearchAttribute, v as VisualizationWidget$1, vt as DataTable, w as DataWidgetProps, wt as DataTableTimestamp, x as TextWidget$1, xt as DataTableProps, y as VisualizationWidgetProps, yt as DataTableEmptyRow, z as DateTimeRangeComparisonVariableOptions } from "../chunks/DateTimeRangePicker.js";
2
+ import { ChoiceOption, ChoiceOption as ChoiceOption$1, DataReading, DimensionSelectionVariable, DimensionValue, MetricReading } from "@altertable/data-app/internal";
3
3
  import { ComponentProps, ComponentPropsWithRef, ReactNode, RefAttributes } from "react";
4
- import { DateRangePicker as DateRangePicker$1, MenuItemProps, MenuProps, MenuSection, MenuTrigger, MenuTriggerProps, NumberField as NumberField$1, Popover, Radio as Radio$1, RadioGroup as RadioGroup$1, Separator } from "react-aria-components";
4
+ import { MenuItemProps, MenuProps, MenuSection, MenuTrigger, MenuTriggerProps, NumberField as NumberField$1, Popover, Radio as Radio$1, RadioGroup as RadioGroup$1, Separator } from "react-aria-components";
5
5
  import { Tab as Tab$1, TabListProps, TabPanel as TabPanel$1, TabPanels, Tabs as Tabs$1 } from "react-aria-components/Tabs";
6
- import { MetricFormat } from "@altertable/data-app/format";
7
- import { CalendarDate } from "@internationalized/date";
8
6
  import { DimensionOption, DimensionSelection, DisclosedQuery, NumberFilter, NumberSelection } from "@altertable/data-app/contract";
7
+ import { MetricFormat } from "@altertable/data-app/format";
9
8
  import { AreaProps, BarProps, Brush, CartesianGrid, ComposedChart as ComposedChart$1, DefaultTooltipContent, DotProps, ErrorBar, Label as Label$1, LabelList, Legend, LineProps, ReferenceArea, ReferenceDot, ReferenceLine, Scatter, Tooltip as Tooltip$1, XAxis, YAxis, ZAxis } from "recharts";
10
9
  //#region src/ui/keyboard.d.ts
11
10
  type KeyEvent = Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'isComposing'>;
@@ -21,10 +20,6 @@ export declare function GettingStarted({ dataContext }: {
21
20
  dataContext: DataContext;
22
21
  }): import("react").JSX.Element;
23
22
  //#endregion
24
- //#region src/ui/PickerField.d.ts
25
- /** Inline labels sit with the value; above and beside labels have a separate layout slot. */
26
- type ControlLabelPlacement = 'inline' | 'above' | 'beside';
27
- //#endregion
28
23
  //#region src/ui/DimensionPicker.d.ts
29
24
  /** Adapts the typed dimension contract to the shared ChoicePicker control. */
30
25
  export declare function DimensionPicker<T extends DimensionValue>({ filter, labelPlacement, value, onChange, options: suppliedOptions, loading, error, onRetry }: {
@@ -49,32 +44,6 @@ type LiveControlProps = {
49
44
  /** Toggle an app-owned recurring refresh. The app supplies the timer and its cadence. */
50
45
  export declare function LiveControl({ enabled, onChange, intervalSeconds, onIntervalChange, className, ...props }: LiveControlProps): import("react").JSX.Element;
51
46
  //#endregion
52
- //#region src/ui/DateRangePicker.d.ts
53
- type DateRangePickerProps = {
54
- label?: string;
55
- labelPlacement?: Exclude<ControlLabelPlacement, 'inline'>;
56
- value: DateRange$1 | null;
57
- onChange: (range: DateRange$1 | null) => void;
58
- minDate?: string;
59
- maxDate?: string;
60
- maxRangeDays?: number;
61
- timeZone?: string;
62
- /** Used to display the reset affordance. The app variable owns the URL and reset meaning. */
63
- resetValue?: DateRange$1;
64
- isDefault?: boolean;
65
- onReset?: () => void;
66
- onPresetChange?: (id: DatePresetId$1) => void;
67
- selectedPresetId?: DatePresetId$1 | null;
68
- calendarFooter?: ReactNode;
69
- comparison?: {
70
- enabled: boolean;
71
- range: DateRange$1 | null;
72
- onChange: (enabled: boolean) => void;
73
- };
74
- } & Omit<ComponentProps<typeof DateRangePicker$1<CalendarDate>>, 'children' | 'value' | 'onChange' | 'minValue' | 'maxValue' | 'isOpen' | 'onOpenChange' | 'defaultValue' | 'defaultOpen'>;
75
- /** The app owns URL state; `dateRangeControl` binds a date variable to this picker. */
76
- export declare function DateRangePicker({ label, labelPlacement, value, onChange, minDate, maxDate, maxRangeDays, timeZone, resetValue, isDefault, onReset, onPresetChange, selectedPresetId, calendarFooter, comparison, className, ...props }: DateRangePickerProps): import("react").JSX.Element;
77
- //#endregion
78
47
  //#region src/ui/SearchMatch.d.ts
79
48
  type SearchMatchProps = {
80
49
  match: SearchMatchValue;
@@ -200,6 +169,27 @@ type DataAppProps = StaticDataAppProps;
200
169
  /** Setup and static screens; fetched data uses the declared-view DataApp. */
201
170
  export declare function DataApp(props: DataAppProps): import("react").JSX.Element;
202
171
  //#endregion
172
+ //#region src/ui/use-chart-cursor-group.d.ts
173
+ declare const groupBrand: unique symbol;
174
+ /** Opaque shared-cursor handle. Create with useChartCursorGroup and pass through chart cursorGroup props. */
175
+ type ChartCursorGroup = {
176
+ readonly [groupBrand]: true;
177
+ };
178
+ /** Creates a stable shared mouse-hover cursor handle. Pass it explicitly to each participating chart's cursorGroup prop.
179
+ * Peers indicate exact timestamp matches while tooltips remain local. Mouse leave clears the cursor.
180
+ * Each hook call creates an independent group; handles can be passed through component props.
181
+ * @example
182
+ * function Dashboard() {
183
+ * const operations = useChartCursorGroup();
184
+ * const samples = [{ id: 'noon', label: '12:00', time: 1767268800000, value: 42 }];
185
+ * return <>
186
+ * <BarChart cursorGroup={operations} items={samples} unit="requests" ariaLabel="Traffic" />
187
+ * <LineChart cursorGroup={operations} items={samples} unit="ms" ariaLabel="Latency" />
188
+ * </>;
189
+ * }
190
+ */
191
+ export declare function useChartCursorGroup(): ChartCursorGroup;
192
+ //#endregion
203
193
  //#region src/ui/chart-data.d.ts
204
194
  /** Ordered category or time-series sample. IDs are unique and nonblank; values are finite. */
205
195
  type ChartItem = {
@@ -207,6 +197,18 @@ type ChartItem = {
207
197
  label: string;
208
198
  value: number;
209
199
  };
200
+ type CartesianChartItem = ChartItem & {
201
+ /** Optional timestamp in epoch milliseconds for cursor linking. Omit for category samples. */
202
+ time?: number;
203
+ };
204
+ type HorizontalGridProps = {
205
+ /** Draw horizontal grid lines behind the plotted values. */
206
+ horizontalGrid?: boolean;
207
+ };
208
+ type CartesianChartProps<Row extends CartesianChartItem> = ValueChartProps<Row> & HorizontalGridProps & {
209
+ /** Share mouse-hover timestamps with charts receiving the same handle. Matches each item's time exactly. */
210
+ cursorGroup?: ChartCursorGroup;
211
+ };
210
212
  type ValueChartProps<Row extends ChartItem = ChartItem> = {
211
213
  /** Ordered samples; the chart validates IDs and values when rendering. */
212
214
  items: readonly Row[];
@@ -234,16 +236,16 @@ type ScatterChartItem = {
234
236
  };
235
237
  //#endregion
236
238
  //#region src/ui/LineChart.d.ts
237
- type LineChartItem = ChartItem;
238
- type LineChartProps<Row extends LineChartItem = LineChartItem> = ValueChartProps<Row>;
239
+ type LineChartItem = CartesianChartItem;
240
+ type LineChartProps<Row extends LineChartItem = LineChartItem> = CartesianChartProps<Row>;
239
241
  /** Equally spaced finite samples in supplied order; fill missing periods explicitly.
240
242
  * Supports negative values, single points, and horizontal scrolling for long series.
241
243
  * Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
242
244
  export declare function LineChart<Row extends LineChartItem>(props: LineChartProps<Row>): import("react").JSX.Element;
243
245
  //#endregion
244
246
  //#region src/ui/AreaChart.d.ts
245
- type AreaChartItem = ChartItem;
246
- type AreaChartProps<Row extends AreaChartItem = AreaChartItem> = ValueChartProps<Row>;
247
+ type AreaChartItem = CartesianChartItem;
248
+ type AreaChartProps<Row extends AreaChartItem = AreaChartItem> = CartesianChartProps<Row>;
247
249
  /** Ordered finite samples filled to a zero baseline, including negative values.
248
250
  * Samples are equally spaced; supply missing periods explicitly.
249
251
  * Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
@@ -262,7 +264,7 @@ type PieChartProps<Row extends PieChartItem = PieChartItem> = ValueChartProps<Ro
262
264
  export declare function PieChart<Row extends PieChartItem>({ items, unit, ariaLabel, showLegend, formatValue, itemActions }: PieChartProps<Row>): import("react").JSX.Element;
263
265
  //#endregion
264
266
  //#region src/ui/ScatterChart.d.ts
265
- type ScatterChartProps = {
267
+ type ScatterChartProps = HorizontalGridProps & {
266
268
  items: readonly ScatterChartItem[];
267
269
  xLabel: string;
268
270
  yLabel: string;
@@ -276,14 +278,17 @@ type ScatterChartProps = {
276
278
  * Negative and constant coordinates are supported. Axis labels and units describe
277
279
  * tooltips as well as the plot; formatX/formatY format ticks and tooltip values.
278
280
  * Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
279
- export declare function ScatterChart({ items, xLabel, yLabel, xUnit, yUnit, ariaLabel, formatX, formatY }: ScatterChartProps): import("react").JSX.Element;
281
+ export declare function ScatterChart({ items, xLabel, yLabel, xUnit, yUnit, ariaLabel, formatX, formatY, horizontalGrid }: ScatterChartProps): import("react").JSX.Element;
280
282
  //#endregion
281
283
  //#region src/ui/BarChart.d.ts
282
- type BarChartItem = ChartItem;
283
- type BarChartProps<Row extends BarChartItem = BarChartItem> = ValueChartProps<Row>;
284
+ type BarChartItem = ChartItem & {
285
+ /** Milliseconds since the Unix epoch. Enables adaptive time ticks when no item actions are supplied. */
286
+ time?: number;
287
+ };
288
+ type BarChartProps<Row extends BarChartItem = BarChartItem> = CartesianChartProps<Row>;
284
289
  /** Nonnegative category values. Compose inside VisualizationWidget for a titled panel.
285
290
  * Owns hover/touch tooltips; no selection state or keyboard navigation. */
286
- export declare function BarChart<Row extends BarChartItem>({ items, unit, ariaLabel, formatValue, itemActions }: BarChartProps<Row>): import("react").JSX.Element;
291
+ export declare function BarChart<Row extends BarChartItem>({ items, unit, ariaLabel, formatValue, itemActions, cursorGroup, horizontalGrid }: BarChartProps<Row>): import("react").JSX.Element;
287
292
  //#endregion
288
293
  //#region src/ui/Select.d.ts
289
294
  type SelectProps = {
@@ -428,7 +433,7 @@ type ComposedChartLegendProps = ComponentProps<typeof Legend> & {
428
433
  declare function ComposedChartLegend({ maxVisibleItems, ...props }: ComposedChartLegendProps): import("react").JSX.Element;
429
434
  //#endregion
430
435
  //#region src/ui/ComposedChart.d.ts
431
- type ComposedChartProps<Row = unknown> = Omit<ComponentProps<typeof ComposedChart$1<Row>>, 'data' | 'title'> & {
436
+ type ComposedChartProps<Row = unknown> = HorizontalGridProps & Omit<ComponentProps<typeof ComposedChart$1<Row>>, 'data' | 'title'> & {
432
437
  /** Displayed rows; series and axes select fields with Recharts dataKey props. */
433
438
  data: readonly Row[];
434
439
  /** Describes the measures and scope for assistive technology. */
@@ -436,6 +441,8 @@ type ComposedChartProps<Row = unknown> = Omit<ComponentProps<typeof ComposedChar
436
441
  /** Shared measure semantics: compact numeric axes and precise tooltips.
437
442
  * For mixed units, use explicit axis tickFormatter and series/tooltip formatters. */
438
443
  valueFormat?: MetricFormat;
444
+ /** Share mouse-hover timestamps with charts receiving the same handle, using the temporal X axis. */
445
+ cursorGroup?: ChartCursorGroup;
439
446
  };
440
447
  /** Compose Cartesian series inside VisualizationWidget. Defaults to responsive
441
448
  * full width and 300px height. Children retain native Recharts props and behavior,
@@ -444,7 +451,7 @@ type ComposedChartProps<Row = unknown> = Omit<ComponentProps<typeof ComposedChar
444
451
  * for stacks. Preserve missing measures as null and choose connectNulls deliberately.
445
452
  * Use public chart tokens for series colors. Dataset bindings own
446
453
  * loading, empty results, evidence, and CSV; this primitive owns only the plot. */
447
- declare function ComposedChartRoot<Row>({ data, ariaLabel, valueFormat, width, height, responsive, className, ...props }: ComposedChartProps<Row>): import("react").JSX.Element;
454
+ declare function ComposedChartRoot<Row>({ data, ariaLabel, valueFormat, cursorGroup, horizontalGrid, children, width, height, responsive, className, ...props }: ComposedChartProps<Row>): import("react").JSX.Element;
448
455
  /** Shared themed series and controls; other children retain native Recharts defaults. */
449
456
  export declare const ComposedChart: typeof ComposedChartRoot & {
450
457
  Dot: typeof ChartDot;
@@ -513,13 +520,13 @@ type FunnelChartSeries = {
513
520
  /** Finite, nonnegative counts aligned with steps and nonincreasing. */
514
521
  values: readonly number[];
515
522
  };
516
- type FunnelChartProps = CountChartProps & {
523
+ type FunnelChartProps = CountChartProps & HorizontalGridProps & {
517
524
  steps: readonly FunnelChartStep[];
518
525
  series: readonly FunnelChartSeries[];
519
526
  };
520
527
  /** Conversion columns with previous-step drop-off, normalized to each series' first step.
521
528
  * Owns series highlighting and portion-specific inspection; compose inside VisualizationWidget. */
522
- export declare function FunnelChart({ steps, series, unit, ariaLabel, className, formatValue }: FunnelChartProps): import("react").JSX.Element;
529
+ export declare function FunnelChart({ steps, series, unit, ariaLabel, className, formatValue, horizontalGrid }: FunnelChartProps): import("react").JSX.Element;
523
530
  //#endregion
524
531
  //#region src/ui/RetentionChart.d.ts
525
532
  type RetentionChartPoint = {
@@ -542,12 +549,12 @@ type RetentionChartSeries = {
542
549
  cohortSize: number;
543
550
  points: readonly RetentionChartPoint[];
544
551
  };
545
- type RetentionChartProps = CountChartProps & {
552
+ type RetentionChartProps = CountChartProps & HorizontalGridProps & {
546
553
  series: readonly RetentionChartSeries[];
547
554
  };
548
555
  /** Query-defined retention curves with count inspection and dotted incomplete periods.
549
556
  * Rates are not recomputed from counts. Compose inside VisualizationWidget. */
550
- export declare function RetentionChart({ series, unit, ariaLabel, className, formatValue }: RetentionChartProps): import("react").JSX.Element;
557
+ export declare function RetentionChart({ series, unit, ariaLabel, className, formatValue, horizontalGrid }: RetentionChartProps): import("react").JSX.Element;
551
558
  //#endregion
552
559
  //#region src/ui/journey-flow.d.ts
553
560
  /** Aggregated route; repeated events remain distinct by depth and prefix. */
@@ -587,5 +594,5 @@ export declare const VisualizationWidget: typeof VisualizationWidget$1;
587
594
  export declare const TableWidget: typeof TableWidget$1;
588
595
  export declare const MetricWidget: typeof MetricWidget$1;
589
596
  //#endregion
590
- export { AboutData, type AboutDataProps, type AboutEmpty, type AboutSubject, type AboutTab, AppIcon, type AppIconName, type AppIconProps, type AreaChartItem, type AreaChartProps, type BarChartItem, type BarChartProps, type BoundStory, type ChartLegendItemProps, type ChartLegendLabelProps, type ChartLegendMarkerKind, type ChartLegendMarkerProps, type ChartLegendProps, type CheckboxGroupProps, type CheckboxProps, type ChoiceOption, type ChoicePickerProps, type ComposedChartLegendProps, type ComposedChartProps, type CsvExport, type CsvTable, type DataAppProps, DataAppProvider, type DataAppStyle, type DataAppStyleHooks, type DataAppStyleToken, type DataReading, DataTable, DataTableEmptyRow, type DataTableEmptyRowProps, type DataTableProps, type DataTableSearch, DataTableShare, DataTableTimestamp, type DataTableTimestampProps, DataValue, type DataValueProps, DataWidget, type DataWidgetProps, DateDisplay, type DateDisplayProps, type DatePresetId, type DateRange, type DateRangePickerProps, type ExplorationAction, ExplorationActionControl, type ExplorationActionControlProps, type FilterActionsProps, type FilterBarProps, type FunnelChartProps, type FunnelChartSeries, type FunnelChartStep, type GlossaryDefinitionProps, type GlossaryExplanationProps, type GradientScrollProps, HelpPopover, type HelpPopoverProps, type ItemActions, type JourneyChartPath, type JourneyChartProps, type LineChartItem, type LineChartProps, type LiveControlProps, type LiveIntervalSeconds, PressButton as MenuButton, type MenuItemProps, type MenuPopoverProps, type MenuProps, MenuSection, MenuTrigger, type MenuTriggerProps, type MetricReading, type MetricWidgetProps, type NumberFieldProps, type NumberFilterPickerProps, type NumberRange, type NumberRangeFieldProps, type PieChartItem, type PieChartProps, PresentStory, type PresentStoryProps, type RadioGroupProps, type RadioProps, type RetentionChartPoint, type RetentionChartProps, type RetentionChartSeries, type ScatterChartItem, type ScatterChartProps, type SearchAttribute, SearchField, type SearchFieldProps, type SearchHit, type SearchItemsOptions, type SearchMatchProps, type SearchMatchValue, type SearchRange, type SearchSuggestion, SearchTypeahead, type SearchTypeaheadProps, SectionHeading, type SectionHeadingProps, type SegmentedControlProps, type SelectProps, Sheet, type SheetProps, type ShimmerTextProps, type StoryFinding, TabPanels, type TableWidgetColumn, type TableWidgetProps, type TextWidgetProps, Tooltip, type TooltipProps, TooltipProvider, type TooltipProviderProps, type VariableBarProps, type VisualizationWidgetProps, type WidgetStatus, injectDataAppStyles, matchSearchText, searchItems, useAppVariables, useDateFormatting };
597
+ export { AboutData, type AboutDataProps, type AboutEmpty, type AboutSubject, type AboutTab, AppIcon, type AppIconName, type AppIconProps, type AreaChartItem, type AreaChartProps, type BarChartItem, type BarChartProps, type BoundStory, type ChartCursorGroup, type ChartLegendItemProps, type ChartLegendLabelProps, type ChartLegendMarkerKind, type ChartLegendMarkerProps, type ChartLegendProps, type CheckboxGroupProps, type CheckboxProps, type ChoiceOption, type ChoicePickerProps, type ComposedChartLegendProps, type ComposedChartProps, type CsvExport, type CsvTable, type DataAppProps, DataAppProvider, type DataAppStyle, type DataAppStyleHooks, type DataAppStyleToken, type DataReading, DataTable, DataTableEmptyRow, type DataTableEmptyRowProps, type DataTableProps, type DataTableSearch, DataTableShare, DataTableTimestamp, type DataTableTimestampProps, DataValue, type DataValueProps, DataWidget, type DataWidgetProps, DateDisplay, type DateDisplayProps, type DateTimeRangeComparisonRequest, type DateTimeRangeComparisonSelection, type DateTimeRangeComparisonVariable, type DateTimeRangeComparisonVariableOptions, DateTimeRangePicker, type DateTimeRangePickerProps, type DateTimeRangePreset, type DateTimeRangeVariable, type DateTimeRangeVariableOptions, type ExplorationAction, ExplorationActionControl, type ExplorationActionControlProps, type FilterActionsProps, type FilterBarProps, type FunnelChartProps, type FunnelChartSeries, type FunnelChartStep, type GlossaryDefinitionProps, type GlossaryExplanationProps, type GradientScrollProps, HelpPopover, type HelpPopoverProps, type ItemActions, type JourneyChartPath, type JourneyChartProps, type LineChartItem, type LineChartProps, type LiveControlProps, type LiveIntervalSeconds, PressButton as MenuButton, type MenuItemProps, type MenuPopoverProps, type MenuProps, MenuSection, MenuTrigger, type MenuTriggerProps, type MetricReading, type MetricWidgetProps, type NumberFieldProps, type NumberFilterPickerProps, type NumberRange, type NumberRangeFieldProps, type PieChartItem, type PieChartProps, PresentStory, type PresentStoryProps, type RadioGroupProps, type RadioProps, type RetentionChartPoint, type RetentionChartProps, type RetentionChartSeries, type ScatterChartItem, type ScatterChartProps, type SearchAttribute, SearchField, type SearchFieldProps, type SearchHit, type SearchItemsOptions, type SearchMatchProps, type SearchMatchValue, type SearchRange, type SearchSuggestion, SearchTypeahead, type SearchTypeaheadProps, SectionHeading, type SectionHeadingProps, type SegmentedControlProps, type SelectProps, Sheet, type SheetProps, type ShimmerTextProps, type StoryFinding, TabPanels, type TableWidgetColumn, type TableWidgetProps, type TextWidgetProps, Tooltip, type TooltipProps, TooltipProvider, type TooltipProviderProps, type VariableBarProps, type VisualizationWidgetProps, type WidgetStatus, dateTimeRangePresets, dateTimeRangeVariable, injectDataAppStyles, matchSearchText, searchItems, useAppVariables, useDateFormatting };
591
598
  //# sourceMappingURL=index.d.ts.map