@altertable/data-app 0.66.0 → 0.68.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/CONTRIBUTING.md +22 -16
  2. package/dist/chunks/{contract-19ckn3n7.js → index-23dktynd.js} +8 -6
  3. package/dist/chunks/index-23dktynd.js.map +10 -0
  4. package/dist/chunks/{contract-rfbakka4.js → index-ag0cgnvq.js} +169 -35
  5. package/dist/chunks/index-ag0cgnvq.js.map +13 -0
  6. package/dist/chunks/index-dq7b35fn.js +307 -0
  7. package/dist/chunks/index-dq7b35fn.js.map +13 -0
  8. package/dist/chunks/{contract-e11m4y7f.js → index-ev2b5aaf.js} +11 -6
  9. package/dist/chunks/{contract-e11m4y7f.js.map → index-ev2b5aaf.js.map} +3 -3
  10. package/dist/chunks/{contract-awa2d5b1.js → index-f5cnbrjz.js} +19 -2
  11. package/dist/chunks/{contract-awa2d5b1.js.map → index-f5cnbrjz.js.map} +4 -3
  12. package/dist/chunks/{contract-havnjmdr.js → index-gvers8jw.js} +2429 -1110
  13. package/dist/chunks/index-gvers8jw.js.map +109 -0
  14. package/dist/chunks/{contract-13j5zb3c.js → index-ktmvs916.js} +8 -7
  15. package/dist/chunks/index-ktmvs916.js.map +13 -0
  16. package/dist/chunks/index-mt93ff2b.js +28 -0
  17. package/dist/chunks/index-mt93ff2b.js.map +10 -0
  18. package/dist/chunks/{contract-tf8c3qpv.js → index-qd5xgx6y.js} +46 -5
  19. package/dist/chunks/index-qd5xgx6y.js.map +13 -0
  20. package/dist/chunks/{contract-pk603qj7.js → index-x69p7cv7.js} +12 -9
  21. package/dist/chunks/index-x69p7cv7.js.map +10 -0
  22. package/dist/client/index.js +6 -6
  23. package/dist/core/appearance.js +1 -1
  24. package/dist/core/config.js +7 -3
  25. package/dist/core/config.js.map +1 -1
  26. package/dist/core/contract.js +14 -6
  27. package/dist/core/contract.js.map +1 -1
  28. package/dist/core/format.js +1 -1
  29. package/dist/embed/index.js +12 -10
  30. package/dist/embed/index.js.map +4 -4
  31. package/dist/index.js +12 -0
  32. package/dist/index.js.map +9 -0
  33. package/dist/local.js +20 -30
  34. package/dist/local.js.map +7 -8
  35. package/dist/react/embed/index.js +1 -1
  36. package/dist/react/embed/index.js.map +2 -2
  37. package/dist/react/index.js +79 -29
  38. package/dist/react/index.js.map +5 -6
  39. package/dist/react/ui/index.js +1702 -177
  40. package/dist/react/ui/index.js.map +20 -9
  41. package/dist/server.js +13 -26
  42. package/dist/server.js.map +6 -7
  43. package/dist/types/client/annotations.d.ts +4 -0
  44. package/dist/types/client/data-client.d.ts +1 -2
  45. package/dist/types/client/iframe.d.ts +4 -2
  46. package/dist/types/core/annotations.d.ts +2 -0
  47. package/dist/types/core/config.d.ts +48 -4
  48. package/dist/types/core/contract.d.ts +20 -12
  49. package/dist/types/core/dimension.d.ts +6 -4
  50. package/dist/types/core/filters.d.ts +44 -0
  51. package/dist/types/core/messages.d.ts +2 -0
  52. package/dist/types/core/operation-types.d.ts +5 -2
  53. package/dist/types/core/operation.d.ts +3 -4
  54. package/dist/types/core/queries.d.ts +16 -0
  55. package/dist/types/core/uuid.d.ts +2 -0
  56. package/dist/types/core/variables.d.ts +32 -13
  57. package/dist/types/embed/runtime-html.d.ts +2 -0
  58. package/dist/types/embed/source.d.ts +2 -1
  59. package/dist/types/index.d.ts +3 -0
  60. package/dist/types/react/annotations/AnnotationBar.d.ts +7 -1
  61. package/dist/types/react/annotations/AnnotationEditor.d.ts +2 -1
  62. package/dist/types/react/annotations/useDataAppAnnotations.d.ts +3 -0
  63. package/dist/types/react/app-context.d.ts +3 -0
  64. package/dist/types/react/index.d.ts +3 -3
  65. package/dist/types/react/mount.d.ts +6 -4
  66. package/dist/types/react/style-contract.d.ts +34 -2
  67. package/dist/types/react/ui/Button.d.ts +3 -3
  68. package/dist/types/react/ui/ChartLegend.d.ts +31 -0
  69. package/dist/types/react/ui/Checkbox.d.ts +15 -4
  70. package/dist/types/react/ui/CheckboxGroup.d.ts +7 -0
  71. package/dist/types/react/ui/{Combobox.d.ts → ChoicePicker.d.ts} +10 -15
  72. package/dist/types/react/ui/ComposedChart.d.ts +41 -0
  73. package/dist/types/react/ui/ComposedChartLegend.d.ts +8 -0
  74. package/dist/types/react/ui/DataAppFrame.d.ts +1 -2
  75. package/dist/types/react/ui/DimensionPicker.d.ts +1 -1
  76. package/dist/types/react/ui/FilterActions.d.ts +10 -0
  77. package/dist/types/react/ui/FilterBar.d.ts +3 -0
  78. package/dist/types/react/ui/FunnelChart.d.ts +20 -0
  79. package/dist/types/react/ui/GettingStarted.d.ts +2 -4
  80. package/dist/types/react/ui/JourneyChart.d.ts +10 -0
  81. package/dist/types/react/ui/Menu.d.ts +12 -0
  82. package/dist/types/react/ui/NumberField.d.ts +27 -0
  83. package/dist/types/react/ui/NumberFilterPicker.d.ts +9 -0
  84. package/dist/types/react/ui/PieChart.d.ts +5 -2
  85. package/dist/types/react/ui/RadioGroup.d.ts +18 -0
  86. package/dist/types/react/ui/RetentionChart.d.ts +27 -0
  87. package/dist/types/react/ui/SearchInput.d.ts +2 -2
  88. package/dist/types/react/ui/Select.d.ts +14 -0
  89. package/dist/types/react/ui/SelectionMark.d.ts +2 -1
  90. package/dist/types/react/ui/TooltipSurface.d.ts +3 -0
  91. package/dist/types/react/ui/chart-data.d.ts +10 -1
  92. package/dist/types/react/ui/chart-primitives.d.ts +22 -0
  93. package/dist/types/react/ui/chartColor.d.ts +1 -0
  94. package/dist/types/react/ui/icons.d.ts +1 -0
  95. package/dist/types/react/ui/index.d.ts +33 -2
  96. package/dist/types/react/ui/journey-flow.d.ts +49 -0
  97. package/dist/types/react/ui/keyboard.d.ts +6 -0
  98. package/dist/types/react/ui/shortcuts.d.ts +7 -0
  99. package/dist/types/react/ui/useAppAppearance.d.ts +1 -1
  100. package/dist/types/react/ui/useSvgId.d.ts +2 -0
  101. package/dist/types/react/ui/variables.d.ts +4 -2
  102. package/dist/types/react/view-controls.d.ts +3 -1
  103. package/dist/types/server/handler.d.ts +4 -4
  104. package/dist/worker.js +21 -738
  105. package/docs/app-authoring.md +15 -1
  106. package/docs/client.md +8 -8
  107. package/docs/contract.md +43 -20
  108. package/docs/data-context.md +8 -6
  109. package/docs/embed.md +10 -2
  110. package/docs/formatting-and-appearance.md +23 -7
  111. package/docs/hosted-apps.md +9 -2
  112. package/docs/layout.md +1 -1
  113. package/docs/react-embed.md +3 -2
  114. package/docs/react.md +4 -3
  115. package/docs/server-bun.md +1 -1
  116. package/docs/server.md +4 -4
  117. package/docs/styling.md +10 -3
  118. package/docs/ui.md +176 -3
  119. package/docs/variables.md +80 -7
  120. package/docs/views.md +4 -8
  121. package/docs/widgets.md +19 -13
  122. package/docs/worker.md +2 -1
  123. package/examples/starter-data-app/index.tsx +34 -32
  124. package/package.json +16 -11
  125. package/dist/chunks/contract-13j5zb3c.js.map +0 -13
  126. package/dist/chunks/contract-19ckn3n7.js.map +0 -10
  127. package/dist/chunks/contract-h8a6f559.js +0 -286
  128. package/dist/chunks/contract-h8a6f559.js.map +0 -12
  129. package/dist/chunks/contract-havnjmdr.js.map +0 -99
  130. package/dist/chunks/contract-pk603qj7.js.map +0 -10
  131. package/dist/chunks/contract-rfbakka4.js.map +0 -13
  132. package/dist/chunks/contract-tf8c3qpv.js.map +0 -11
  133. package/dist/chunks/contract-wz59z8pq.js +0 -8
  134. package/dist/chunks/contract-wz59z8pq.js.map +0 -10
  135. /package/dist/chunks/{contract-m6n8ctfc.js → index-m6n8ctfc.js} +0 -0
  136. /package/dist/chunks/{contract-m6n8ctfc.js.map → index-m6n8ctfc.js.map} +0 -0
  137. /package/dist/chunks/{contract-mev09s5v.js → index-mev09s5v.js} +0 -0
  138. /package/dist/chunks/{contract-mev09s5v.js.map → index-mev09s5v.js.map} +0 -0
@@ -1,8 +1,11 @@
1
1
  import type { ChartItem, ValueChartProps } from './chart-data.js';
2
2
  export type PieChartItem = ChartItem;
3
- export type PieChartProps = ValueChartProps;
3
+ export type PieChartProps = ValueChartProps & {
4
+ /** Omit the built-in key when composing a separate ChartLegend. */
5
+ showLegend?: boolean;
6
+ };
4
7
  /** Nonnegative, mutually exclusive parts; shares use the sum of supplied items.
5
8
  * Include Other to represent the whole. Zero values remain in the legend; all-zero
6
9
  * data shows an empty circle. Colors follow item order. Compose inside VisualizationWidget;
7
10
  * hover/touch tooltips coordinate slice and legend emphasis without caller state. */
8
- export declare function PieChart({ items, unit, ariaLabel, formatValue, }: PieChartProps): import("react").JSX.Element;
11
+ export declare function PieChart({ items, unit, ariaLabel, showLegend, formatValue, }: PieChartProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import type { ComponentPropsWithRef, ReactNode } from 'react';
2
+ import { RadioGroup as AriaRadioGroup, Radio as AriaRadio } from 'react-aria-components';
3
+ import { type ChoiceOption } from '../../core/variables.js';
4
+ export type RadioGroupProps = Omit<ComponentPropsWithRef<typeof AriaRadioGroup>, 'className' | 'children'> & {
5
+ children: ReactNode;
6
+ label: string;
7
+ className?: string;
8
+ };
9
+ export declare function RadioGroup({ label, className, children, ...props }: RadioGroupProps): import("react").JSX.Element;
10
+ export type RadioProps = Omit<ComponentPropsWithRef<typeof AriaRadio>, 'className'> & {
11
+ className?: string;
12
+ };
13
+ export declare function Radio({ className, children, ...props }: RadioProps): import("react").JSX.Element;
14
+ export type SegmentedControlProps = Omit<RadioGroupProps, 'children'> & {
15
+ options: readonly ChoiceOption[];
16
+ };
17
+ /** A compact radio group; arrow keys follow standard radio selection behavior. */
18
+ export declare function SegmentedControl({ options, className, ...props }: SegmentedControlProps): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import type { CountChartProps } from './chart-data.js';
2
+ export type RetentionChartPoint = {
3
+ /** Nonnegative integer, unique per series; uneven offsets retain their distance. */
4
+ offset: number;
5
+ /** Must agree across series for the same offset. */
6
+ label: string;
7
+ /** Observed retention fraction in [0, 1], or null for an unobserved period. */
8
+ rate: number | null;
9
+ /** Finite count in [0, cohortSize]; null exactly when rate is null. */
10
+ retainedCount: number | null;
11
+ /** Observed but still accumulating; drawn as a dotted tail. */
12
+ incomplete?: boolean;
13
+ };
14
+ export type RetentionChartSeries = {
15
+ /** Unique, nonblank cohort or segment ID. */
16
+ id: string;
17
+ label: string;
18
+ /** Finite, nonnegative starting population. */
19
+ cohortSize: number;
20
+ points: readonly RetentionChartPoint[];
21
+ };
22
+ export type RetentionChartProps = CountChartProps & {
23
+ series: readonly RetentionChartSeries[];
24
+ };
25
+ /** Query-defined retention curves with count inspection and dotted incomplete periods.
26
+ * Rates are not recomputed from counts. Compose inside VisualizationWidget. */
27
+ export declare function RetentionChart({ series, unit, ariaLabel, className, formatValue, }: RetentionChartProps): import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import type { ComponentPropsWithRef, ReactNode } from 'react';
2
2
  /** One search control surface for picker search and table/page search. */
3
- export declare function SearchInput({ focusRing, size, endAction, loading, className, onKeyDown, ...props }: Omit<ComponentPropsWithRef<'input'>, 'size' | 'children'> & {
3
+ export declare function SearchInput({ focusRing, size, endAction, loading, className, ...props }: Omit<ComponentPropsWithRef<'input'>, 'size' | 'children'> & {
4
4
  size?: 'default' | 'compact';
5
- /** Menu search delegates focus indication to the active option. */
5
+ /** Picker search delegates focus indication to the active option. */
6
6
  focusRing?: boolean;
7
7
  endAction?: ReactNode;
8
8
  /** Replaces the search glyph in its existing space; input and results remain usable. */
@@ -0,0 +1,14 @@
1
+ import { type ChoiceOption } from '../../core/variables.js';
2
+ export type SelectProps = {
3
+ label: string;
4
+ options: readonly ChoiceOption[];
5
+ value: string;
6
+ onChange: (value: string) => void;
7
+ disabled?: boolean;
8
+ required?: boolean;
9
+ name?: string;
10
+ id?: string;
11
+ className?: string;
12
+ };
13
+ /** Labeled single selection with keyboard navigation and a styled listbox. */
14
+ export declare function Select({ label, options, value, onChange, disabled, required, className, ...props }: SelectProps): import("react").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  /** Decorative selection indicator; the containing control owns its accessible semantics. */
2
- export declare function SelectionMark({ selected }: {
2
+ export declare function SelectionMark({ selected, multiple, }: {
3
3
  selected: boolean;
4
+ multiple?: boolean;
4
5
  }): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ /** Shared surface for floating hints and chart value inspection. */
3
+ export declare function TooltipSurface({ className, ...props }: ComponentPropsWithRef<'span'>): import("react").JSX.Element;
@@ -11,6 +11,15 @@ export type ValueChartProps = {
11
11
  ariaLabel: string;
12
12
  formatValue?: (value: number) => string;
13
13
  };
14
+ export type CountChartProps = {
15
+ /** Accessible measure and scope description. */
16
+ ariaLabel: string;
17
+ /** Population unit, such as users or sessions. */
18
+ unit: string;
19
+ /** Formats counts; rates use percentage formatting. */
20
+ formatValue?: (value: number) => string;
21
+ className?: string;
22
+ };
14
23
  /** Independent observation on two finite numeric axes. */
15
24
  export type ScatterChartItem = {
16
25
  id: string;
@@ -20,6 +29,6 @@ export type ScatterChartItem = {
20
29
  };
21
30
  type ChartKind = 'bar' | 'line' | 'area' | 'pie' | 'scatter';
22
31
  type ItemFor<Kind extends ChartKind> = Kind extends 'scatter' ? ScatterChartItem : ChartItem;
23
- /** Validate the data consumed by every chart. */
32
+ /** Validate standalone item-based chart inputs. */
24
33
  export declare function validateChartItems<Kind extends ChartKind>(kind: Kind, items: readonly ItemFor<Kind>[]): void;
25
34
  export {};
@@ -0,0 +1,22 @@
1
+ import type { ComponentProps } from 'react';
2
+ import { type DotProps, Scatter, XAxis, YAxis, CartesianGrid, Tooltip, DefaultTooltipContent, type BarProps, type LineProps, type AreaProps } from 'recharts';
3
+ /** Hollow sample marker shared by standalone and composed series. */
4
+ export declare function ChartDot({ active, stroke, fill, r, ...props }: DotProps & {
5
+ active?: boolean;
6
+ }): import("react").JSX.Element;
7
+ /** Shared series defaults; native props override every authored choice. */
8
+ export declare function ChartBar<Row = unknown, Value = number | null>(props: BarProps<Row, Value>): import("react").JSX.Element;
9
+ /** Themed hollow sample dots are enabled by default; dot=false hides them.
10
+ * activeDot independently controls the hovered point. Native dot props and renderers remain available. */
11
+ export declare function ChartLine<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: LineProps<Row, Value>): import("react").JSX.Element;
12
+ /** Filled series with the same sample-dot and activeDot options as ChartLine. */
13
+ export declare function ChartArea<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: AreaProps<Row, Value>): import("react").JSX.Element;
14
+ export declare function ChartScatter<Row = unknown, Value = number>(props: ComponentProps<typeof Scatter<Row, Value>>): import("react").JSX.Element;
15
+ export declare function ChartXAxis<Row = unknown, Value = string | number>(props: ComponentProps<typeof XAxis<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 +1,2 @@
1
1
  export declare function chartColor(id: string): string;
2
+ export declare const chartBarFill = "var(--atbl-chart-fill, color-mix(in srgb, var(--atbl-accent) 75%, var(--atbl-surface)))";
@@ -18,6 +18,7 @@ declare const brandedIcons: {
18
18
  readonly export: import("lucide-react").LucideIcon;
19
19
  readonly error: import("lucide-react").LucideIcon;
20
20
  readonly close: import("lucide-react").LucideIcon;
21
+ readonly clearFilters: import("lucide-react").LucideIcon;
21
22
  readonly previous: import("lucide-react").LucideIcon;
22
23
  readonly next: import("lucide-react").LucideIcon;
23
24
  readonly lightTheme: import("lucide-react").LucideIcon;
@@ -1,6 +1,7 @@
1
1
  /** Direct UI composition and static screens. Requests use declared views from /react. */
2
2
  export { injectDataAppShellStyles } from '../shellStyles.js';
3
3
  export { DataAppProvider } from '../mount.js';
4
+ export { isPlainKeyEvent } from './keyboard.js';
4
5
  export { GettingStarted } from './GettingStarted.js';
5
6
  export { DataWidget } from './DataWidget.js';
6
7
  export type { WidgetStatus } from './RequestHint.js';
@@ -29,8 +30,10 @@ export { searchItems } from './searchItems.js';
29
30
  export type { SearchAttribute, SearchHit, SearchItemsOptions, SearchMatchValue, SearchRange, } from './searchItems.js';
30
31
  export { SearchMatch } from './SearchMatch.js';
31
32
  export type { SearchMatchProps } from './SearchMatch.js';
32
- export { Combobox } from './Combobox.js';
33
- export type { ComboboxOption, ComboboxProps } from './Combobox.js';
33
+ export { ChoicePicker } from './ChoicePicker.js';
34
+ export type { ChoiceOption, ChoicePickerProps, } from './ChoicePicker.js';
35
+ export { MenuTrigger, MenuButton, MenuPopover, Menu, MenuItem, MenuSection, MenuSeparator, } from './Menu.js';
36
+ export type { MenuTriggerProps, MenuPopoverProps, MenuProps, MenuItemProps, } from './Menu.js';
34
37
  export { GradientScroll } from './GradientScroll.js';
35
38
  export type { GradientScrollProps } from './GradientScroll.js';
36
39
  export { Tabs, TabList, Tab, TabPanels, TabPanel, useViewTab, } from './Tabs.js';
@@ -72,3 +75,31 @@ export type { CsvExport, CsvTable } from './csv-export.js';
72
75
  export type { TableWidgetColumn } from './TableWidget.js';
73
76
  export type { DataReading, MetricReading } from '../../core/reading.js';
74
77
  export type { DataAppStyle, DataAppStyleToken, DataAppStyleHooks, } from '../style-contract.js';
78
+ export { Select } from './Select.js';
79
+ export type { SelectProps } from './Select.js';
80
+ export { RadioGroup, Radio, SegmentedControl } from './RadioGroup.js';
81
+ export type { RadioGroupProps, RadioProps, SegmentedControlProps, } from './RadioGroup.js';
82
+ export { CheckboxGroup } from './CheckboxGroup.js';
83
+ export type { CheckboxGroupProps } from './CheckboxGroup.js';
84
+ export { NumberField, NumberRangeField } from './NumberField.js';
85
+ export type { NumberFieldProps, NumberRangeFieldProps, NumberRange, } from './NumberField.js';
86
+ export { FilterBar } from './FilterBar.js';
87
+ export type { FilterBarProps } from './FilterBar.js';
88
+ export { VariableBar } from './VariableBar.js';
89
+ export type { VariableBarProps } from './VariableBar.js';
90
+ export { FilterActions } from './FilterActions.js';
91
+ export type { FilterActionsProps } from './FilterActions.js';
92
+ export { NumberFilterPicker } from './NumberFilterPicker.js';
93
+ export type { NumberFilterPickerProps } from './NumberFilterPicker.js';
94
+ export { ComposedChart } from './ComposedChart.js';
95
+ export type { ComposedChartProps } from './ComposedChart.js';
96
+ export { ChartLegend } from './ChartLegend.js';
97
+ export type { ChartLegendProps, ChartLegendItemProps, ChartLegendMarkerProps, ChartLegendLabelProps, ChartLegendMarkerKind, } from './ChartLegend.js';
98
+ export type { ComposedChartLegendProps } from './ComposedChartLegend.js';
99
+ export { FunnelChart } from './FunnelChart.js';
100
+ export type { FunnelChartProps, FunnelChartStep, FunnelChartSeries, } from './FunnelChart.js';
101
+ export { RetentionChart } from './RetentionChart.js';
102
+ export type { RetentionChartProps, RetentionChartPoint, RetentionChartSeries, } from './RetentionChart.js';
103
+ export { JourneyChart } from './JourneyChart.js';
104
+ export type { JourneyChartProps, JourneyChartPath, } from './JourneyChart.js';
105
+ export { useSvgId } from './useSvgId.js';
@@ -0,0 +1,49 @@
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
+ };
@@ -0,0 +1,6 @@
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 {};
@@ -15,6 +15,11 @@ export declare const shortcuts: {
15
15
  readonly code: 'Period';
16
16
  readonly key: '.';
17
17
  };
18
+ readonly sendAnnotations: {
19
+ readonly modifier: 'mod';
20
+ readonly code: 'Enter';
21
+ readonly key: 'Enter';
22
+ };
18
23
  readonly refresh: {
19
24
  readonly modifier: 'alt';
20
25
  readonly code: 'KeyR';
@@ -27,6 +32,7 @@ export declare const shortcuts: {
27
32
  };
28
33
  readonly playStory: {
29
34
  readonly modifier: 'mod';
35
+ readonly shift: true;
30
36
  readonly code: 'Enter';
31
37
  readonly key: 'Enter';
32
38
  };
@@ -34,5 +40,6 @@ export declare const shortcuts: {
34
40
  export declare function shortcutLabel({ modifier, shift, key }: Shortcut): string;
35
41
  export declare function ariaKeyShortcuts({ modifier, shift, key }: Shortcut): string;
36
42
  export declare function isEditingTarget(target: EventTarget | null): boolean;
43
+ export declare function matchesShortcut(event: KeyboardEvent, shortcut: Shortcut): boolean;
37
44
  /** Bind a page-level shortcut. Ignored while typing or while a modal layer is open. */
38
45
  export declare function useShortcut(shortcut: Shortcut, action: () => void, enabled?: boolean, allowWhileEditing?: boolean): void;
@@ -1,3 +1,3 @@
1
1
  import { type Theme, type AppearanceOptions } from '../../core/appearance.js';
2
2
  /** The parent theme takes precedence; only standalone viewers receive controls. */
3
- export declare function useAppAppearance(appearance: AppearanceOptions, hostTheme?: Theme): import("../../core/appearance.js").ThemeController | undefined;
3
+ export declare function useAppAppearance(appearance: AppearanceOptions | undefined, hostTheme?: Theme): import("../../core/appearance.js").ThemeController | undefined;
@@ -0,0 +1,2 @@
1
+ /** Stable React ID for SVG definitions and their URL references; safe with identifier prefixes. */
2
+ export declare function useSvgId(): string;
@@ -1,7 +1,7 @@
1
1
  import type { DatePresetId, DateRange } from '../../core/date-range.js';
2
2
  import { type AppVariableValues, type DateRangeSelection, type DateRangeVariable, type HistoryMode, type VariableCollection } from '../../core/variables.js';
3
- export { defineAppVariables, textVariable, selectVariable, dateRangeVariable, } from '../../core/variables.js';
4
- export type { AppVariable, AppVariableValues, DateRangeSelection, DateRangeVariable, DateRangeVariableOptions, VariableCollection, } from '../../core/variables.js';
3
+ export { defineAppVariables, searchVariable, choiceVariable, multiChoiceVariable, dateRangeVariable, } from '../../core/variables.js';
4
+ export type { AppVariable, AppVariableValues, ChoiceOption, ChoiceVariable, MultiChoiceVariable, SearchVariable, DateRangeSelection, DateRangeVariable, DateRangeVariableOptions, VariableCollection, } from '../../core/variables.js';
5
5
  /** Adapt one date variable to the controlled picker without giving the picker URL ownership. */
6
6
  export declare function dateRangeControl(variable: DateRangeVariable, selection: DateRangeSelection, onChange: (selection: DateRangeSelection) => void): {
7
7
  minDate?: string;
@@ -27,6 +27,8 @@ export declare function useAppVariables<const Variables extends VariableCollecti
27
27
  values: AppVariableValues<Variables>;
28
28
  set: <Key extends keyof Variables & string>(name: Key, value: AppVariableValues<Variables>[Key]) => void;
29
29
  reset: <Key extends keyof Variables & string>(name: Key) => void;
30
+ resetAll: () => void;
31
+ clearAll: () => void;
30
32
  update: (next: Partial<AppVariableValues<Variables>>, history?: HistoryMode) => void;
31
33
  bind: <Key extends keyof Variables & string>(name: Key) => {
32
34
  value: AppVariableValues<Variables>[Key];
@@ -6,7 +6,9 @@ export declare function useViewVariables<Variables extends VariableCollection>(d
6
6
  values: AppVariableValues<Variables>;
7
7
  set: <Key extends keyof Variables & string>(name: Key, value: AppVariableValues<Variables>[Key]) => void;
8
8
  reset: <Key extends keyof Variables & string>(name: Key) => void;
9
- update: (next: Partial<AppVariableValues<Variables>>, history?: import("../core/navigation.js").HistoryMode) => void;
9
+ resetAll: () => void;
10
+ clearAll: () => void;
11
+ update: (next: Partial<AppVariableValues<Variables>>, history?: import("../core/variables.js").HistoryMode) => void;
10
12
  bind: <Key extends keyof Variables & string>(name: Key) => {
11
13
  value: AppVariableValues<Variables>[Key];
12
14
  onChange(value: AppVariableValues<Variables>[Key]): void;
@@ -1,13 +1,13 @@
1
- import { type DataOperations, type Lakehouse } from '../core/contract.js';
1
+ import { type DataOperations, type Lakehouse, type QueryParameters } from '../core/contract.js';
2
2
  /** Authorization result for one viewer request. A hosted adapter must scope its lakehouse client. */
3
3
  export type RequestAccess = {
4
4
  lakehouse: Lakehouse;
5
- canDiscloseSql: boolean;
5
+ /** Trusted values shared across queries; each query uses only its declared keys. */
6
+ queryParams?: QueryParameters;
6
7
  };
7
8
  /**
8
9
  * Execute named operations on the server. The app supplies operations and viewer authorization.
9
10
  * JSON, Origin, and Fetch Metadata checks reject cross-site browser POSTs; they do not
10
- * authenticate another local process. SQL is returned only when both the operation and
11
- * authorization result permit disclosure.
11
+ * authenticate another local process. Query evidence accompanies every result.
12
12
  */
13
13
  export declare function createDataHandler(operations: DataOperations, authorize: (request: Request, operation: string) => Promise<RequestAccess>): (request: Request) => Promise<Response>;