@altertable/data-app 0.65.0 → 0.66.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 +38 -1
- package/CONTRIBUTING.md +37 -3
- package/README.md +1 -1
- package/dist/chunks/{contract-sm7j7k95.js → contract-13j5zb3c.js} +2 -144
- package/dist/chunks/contract-13j5zb3c.js.map +13 -0
- package/dist/chunks/contract-19ckn3n7.js +78 -0
- package/dist/chunks/contract-19ckn3n7.js.map +10 -0
- package/dist/chunks/{contract-a061yj6r.js → contract-e11m4y7f.js} +34 -70
- package/dist/chunks/contract-e11m4y7f.js.map +12 -0
- package/dist/chunks/{contract-g6hky7x6.js → contract-h8a6f559.js} +8 -4
- package/dist/chunks/contract-h8a6f559.js.map +12 -0
- package/dist/chunks/contract-havnjmdr.js +13011 -0
- package/dist/chunks/contract-havnjmdr.js.map +99 -0
- package/dist/chunks/{contract-txjy0en2.js → contract-m6n8ctfc.js} +64 -72
- package/dist/chunks/contract-m6n8ctfc.js.map +10 -0
- package/dist/chunks/contract-pk603qj7.js +146 -0
- package/dist/chunks/contract-pk603qj7.js.map +10 -0
- package/dist/chunks/{contract-yxbjea23.js → contract-rfbakka4.js} +179 -2
- package/dist/chunks/contract-rfbakka4.js.map +13 -0
- package/dist/client/index.js +11 -6
- package/dist/client/index.js.map +1 -1
- package/dist/core/appearance.js +1 -1
- package/dist/core/contract.js +13 -3
- package/dist/core/contract.js.map +1 -1
- package/dist/embed/index.js +9 -7
- package/dist/embed/index.js.map +2 -2
- package/dist/local.js +1 -1
- package/dist/local.js.map +2 -2
- package/dist/react/embed/index.js +1 -1
- package/dist/react/index.js +2532 -11545
- package/dist/react/index.js.map +16 -91
- package/dist/react/ui/index.js +1614 -0
- package/dist/react/ui/index.js.map +22 -0
- package/dist/server.js +1 -1
- package/dist/server.js.map +2 -2
- package/dist/types/client/annotations.d.ts +23 -0
- package/dist/types/client/index.d.ts +1 -0
- package/dist/types/core/annotations.d.ts +92 -0
- package/dist/types/core/appearance.d.ts +2 -2
- package/dist/types/core/contract.d.ts +2 -0
- package/dist/types/core/presentation.d.ts +2 -0
- package/dist/types/core/variables.d.ts +2 -5
- package/dist/types/react/annotations/AnnotationBar.d.ts +24 -0
- package/dist/types/react/annotations/AnnotationControls.d.ts +10 -0
- package/dist/types/react/annotations/AnnotationEditor.d.ts +15 -0
- package/dist/types/react/annotations/AnnotationMarkers.d.ts +19 -0
- package/dist/types/react/annotations/AnnotationSelectionLayer.d.ts +12 -0
- package/dist/types/react/annotations/AnnotationTarget.d.ts +9 -0
- package/dist/types/react/annotations/AnnotationTooltip.d.ts +9 -0
- package/dist/types/react/annotations/AnnotationTrigger.d.ts +10 -0
- package/dist/types/react/annotations/annotation-editor-state.d.ts +56 -0
- package/dist/types/react/annotations/annotation-screenshot.d.ts +4 -0
- package/dist/types/react/annotations/annotation-targets.d.ts +33 -0
- package/dist/types/react/annotations/getAnnotationProps.d.ts +15 -0
- package/dist/types/react/annotations/styles.d.ts +3 -0
- package/dist/types/react/annotations/useAnnotationGeometry.d.ts +22 -0
- package/dist/types/react/annotations/useDataAppAnnotations.d.ts +19 -0
- package/dist/types/react/bindings.d.ts +110 -0
- package/dist/types/react/content.d.ts +24 -11
- package/dist/types/react/hooks.d.ts +29 -787
- package/dist/types/react/index.d.ts +30 -105
- package/dist/types/react/source-owner.d.ts +2 -0
- package/dist/types/react/style-contract.d.ts +60 -0
- package/dist/types/react/style-validation.d.ts +2 -0
- package/dist/types/react/ui/AboutData.d.ts +9 -1
- package/dist/types/react/ui/AppHeader.d.ts +1 -2
- package/dist/types/react/ui/AppLayout.d.ts +3 -9
- package/dist/types/react/ui/AppToolbar.d.ts +5 -8
- package/dist/types/react/ui/AreaChart.d.ts +7 -0
- package/dist/types/react/ui/BarChart.d.ts +6 -0
- package/dist/types/react/ui/{ComparisonVisual.d.ts → Comparison.d.ts} +3 -3
- package/dist/types/react/ui/ContentSkeleton.d.ts +2 -0
- package/dist/types/react/ui/DataApp.d.ts +17 -58
- package/dist/types/react/ui/DataAppFrame.d.ts +42 -0
- package/dist/types/react/ui/DataBoundary.d.ts +4 -5
- package/dist/types/react/ui/DataSection.d.ts +6 -18
- package/dist/types/react/ui/DataSectionBoundary.d.ts +30 -0
- package/dist/types/react/ui/DataValue.d.ts +9 -0
- package/dist/types/react/ui/DataWidget.d.ts +2 -1
- package/dist/types/react/ui/DateTimeTooltip.d.ts +1 -1
- package/dist/types/react/ui/ExportControl.d.ts +1 -1
- package/dist/types/react/ui/HelpPopover.d.ts +3 -4
- package/dist/types/react/ui/InspectionContext.d.ts +2 -0
- package/dist/types/react/ui/InspectionProvider.d.ts +29 -0
- package/dist/types/react/ui/LineChart.d.ts +7 -0
- package/dist/types/react/ui/MetricWidget.d.ts +4 -3
- package/dist/types/react/ui/PieChart.d.ts +8 -0
- package/dist/types/react/ui/PresentStory.d.ts +2 -5
- package/dist/types/react/ui/RefreshControl.d.ts +1 -2
- package/dist/types/react/ui/ScatterChart.d.ts +17 -0
- package/dist/types/react/ui/SearchField.d.ts +1 -2
- package/dist/types/react/ui/SearchInput.d.ts +3 -1
- package/dist/types/react/ui/Sheet.d.ts +2 -1
- package/dist/types/react/ui/Skeleton.d.ts +5 -2
- package/dist/types/react/ui/StaticDataApp.d.ts +4 -0
- package/dist/types/react/ui/TableWidget.d.ts +19 -16
- package/dist/types/react/ui/Tabs.d.ts +6 -2
- package/dist/types/react/ui/TextWidget.d.ts +2 -1
- package/dist/types/react/ui/Tooltip.d.ts +4 -3
- package/dist/types/react/ui/TrendChart.d.ts +5 -0
- package/dist/types/react/ui/UpdatedAt.d.ts +1 -1
- package/dist/types/react/ui/VisualizationWidget.d.ts +12 -13
- package/dist/types/react/ui/WidgetViewTabs.d.ts +1 -1
- package/dist/types/react/ui/chart-data.d.ts +25 -0
- package/dist/types/react/ui/data-context.d.ts +18 -7
- package/dist/types/react/ui/icons.d.ts +1 -0
- package/dist/types/react/ui/index.d.ts +74 -0
- package/dist/types/react/ui/metric.d.ts +1 -1
- package/dist/types/react/ui/presentation.d.ts +5 -1
- package/dist/types/react/ui/shortcuts.d.ts +7 -1
- package/dist/types/react/view-runtime.d.ts +29 -0
- package/dist/types/react/view.d.ts +21 -4
- package/dist/types/react/widgets.d.ts +79 -0
- package/docs/app-authoring.md +58 -50
- package/docs/data-context.md +89 -0
- package/docs/formatting-and-appearance.md +52 -0
- package/docs/hosted-apps.md +0 -13
- package/docs/layout.md +4 -2
- package/docs/react-embed.md +2 -2
- package/docs/react.md +20 -316
- package/docs/stories-and-export.md +52 -0
- package/docs/styling.md +55 -0
- package/docs/ui-quality.md +20 -0
- package/docs/ui.md +41 -0
- package/docs/variables.md +98 -0
- package/docs/views.md +127 -0
- package/docs/widgets.md +142 -0
- package/examples/starter-data-app/index.tsx +82 -55
- package/package.json +12 -4
- package/dist/chunks/contract-a061yj6r.js.map +0 -12
- package/dist/chunks/contract-g6hky7x6.js.map +0 -12
- package/dist/chunks/contract-sm7j7k95.js.map +0 -14
- package/dist/chunks/contract-txjy0en2.js.map +0 -10
- package/dist/chunks/contract-yxbjea23.js.map +0 -12
- package/dist/types/react/ui/RefreshRegion.d.ts +0 -9
- package/dist/types/react/ui/SelectableBarChart.d.ts +0 -15
- package/docs/releasing.md +0 -79
- /package/dist/types/react/ui/{comparison.d.ts → metric-comparison.d.ts} +0 -0
|
@@ -6,4 +6,4 @@ export type DateTimeTooltipProps = {
|
|
|
6
6
|
children?: ReactNode;
|
|
7
7
|
} & Omit<HelpPopoverProps, 'trigger' | 'triggerLabel' | 'label' | 'children'>;
|
|
8
8
|
/** Pass the viewer's account time zone when known; the popover also exposes UTC and Unix time. */
|
|
9
|
-
export declare function DateTimeTooltip({ date, timeZone, children,
|
|
9
|
+
export declare function DateTimeTooltip({ date, timeZone, children, panelProps, ...props }: DateTimeTooltipProps): import("react").JSX.Element;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ReactNode, type RefObject } from 'react';
|
|
2
2
|
import { type Placement } from '@floating-ui/react';
|
|
3
|
-
|
|
3
|
+
import type { DataAppStyleHooks } from '../style-contract.js';
|
|
4
|
+
export type HelpPopoverTriggerProps = Omit<ComponentPropsWithRef<'button'>, 'children' | 'type'> & DataAppStyleHooks;
|
|
4
5
|
export type HelpPopoverPanelProps = Omit<ComponentPropsWithRef<'section'>, 'children' | 'role'>;
|
|
5
6
|
export type HelpPopoverProps = {
|
|
6
7
|
trigger: ReactNode;
|
|
7
8
|
triggerLabel: string;
|
|
8
9
|
label: string;
|
|
9
10
|
children: ReactNode;
|
|
10
|
-
triggerClassName?: string;
|
|
11
|
-
panelClassName?: string;
|
|
12
11
|
placement?: Placement;
|
|
13
12
|
portalRoot?: RefObject<HTMLElement | null>;
|
|
14
13
|
triggerProps?: HelpPopoverTriggerProps;
|
|
@@ -19,4 +18,4 @@ export type HelpPopoverProps = {
|
|
|
19
18
|
/** A supplemental explanation that opens on click, Enter, or a deliberate mouse hover. Tabbing
|
|
20
19
|
* past the trigger does not open it, and a click keeps a hover-opened panel in place.
|
|
21
20
|
* triggerProps and panelProps target its two surfaces. */
|
|
22
|
-
export declare function HelpPopover({ trigger, triggerLabel, label, children,
|
|
21
|
+
export declare function HelpPopover({ trigger, triggerLabel, label, children, portalRoot, triggerProps, panelProps, placement, open: openProp, onOpenChange, }: HelpPopoverProps): import("react").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { DataView } from '../../core/data-view.js';
|
|
1
2
|
import type { DisclosedQuery } from '../../core/contract.js';
|
|
2
3
|
import type { AboutEmpty } from './AboutData.js';
|
|
3
4
|
import type { DataContext } from './data-context.js';
|
|
4
5
|
export type InspectionDefaults = {
|
|
5
6
|
dataContext: DataContext;
|
|
7
|
+
primaryView?: DataView<unknown, unknown>;
|
|
6
8
|
empty?: AboutEmpty;
|
|
7
9
|
queries?: DisclosedQuery[];
|
|
8
10
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { type AboutDataProps, type AboutTab } from './AboutData.js';
|
|
3
|
+
type Inspection = {
|
|
4
|
+
key: string;
|
|
5
|
+
id: string;
|
|
6
|
+
props: AboutDataProps;
|
|
7
|
+
trigger: RefObject<HTMLButtonElement | null>;
|
|
8
|
+
};
|
|
9
|
+
type Selection = {
|
|
10
|
+
inspection: Inspection;
|
|
11
|
+
open: boolean;
|
|
12
|
+
tab: AboutTab;
|
|
13
|
+
} | null;
|
|
14
|
+
export declare const InspectionOwner: import("react").Context<{
|
|
15
|
+
subscribe(this: void, listener: () => void): () => void;
|
|
16
|
+
snapshot: () => Selection;
|
|
17
|
+
sync: () => void;
|
|
18
|
+
register(inspection: Inspection): void;
|
|
19
|
+
remove(key: string): void;
|
|
20
|
+
open(inspection: Inspection): void;
|
|
21
|
+
close(key: string): void;
|
|
22
|
+
controlled(inspection: Inspection, open: boolean | undefined): void;
|
|
23
|
+
selectTab(this: void, tab: AboutTab): void;
|
|
24
|
+
} | null>;
|
|
25
|
+
export declare const InspectionVisual: import("react").Context<boolean>;
|
|
26
|
+
export declare function InspectionProvider({ children }: {
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | null | undefined> | null | undefined;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChartItem, ValueChartProps } from './chart-data.js';
|
|
2
|
+
export type LineChartItem = ChartItem;
|
|
3
|
+
export type LineChartProps = ValueChartProps;
|
|
4
|
+
/** Equally spaced finite samples in supplied order; fill missing periods explicitly.
|
|
5
|
+
* Supports negative values, single points, and horizontal scrolling for long series.
|
|
6
|
+
* Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
|
|
7
|
+
export declare function LineChart(props: LineChartProps): import("react").JSX.Element;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { WidgetStatus } from './RequestHint.js';
|
|
3
3
|
import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
4
|
-
import { type MetricComparison } from './comparison.js';
|
|
4
|
+
import { type MetricComparison } from './metric-comparison.js';
|
|
5
5
|
import { type MetricFormat } from '../../core/format.js';
|
|
6
6
|
import type { MetricReading } from '../../core/reading.js';
|
|
7
7
|
import { type MetricDefinition } from './metric.js';
|
|
8
8
|
type MetricWidgetBaseProps = {
|
|
9
9
|
label: string;
|
|
10
|
+
annotationId?: string;
|
|
10
11
|
description?: ReactNode;
|
|
11
12
|
comparison?: MetricComparison;
|
|
12
13
|
evidence?: WidgetEvidence;
|
|
13
14
|
action?: ReactNode;
|
|
14
|
-
insight?: ReactNode;
|
|
15
15
|
status?: WidgetStatus;
|
|
16
16
|
visual?: ReactNode;
|
|
17
17
|
} & Omit<ComponentPropsWithRef<'div'>, 'about' | 'children'>;
|
|
@@ -31,6 +31,7 @@ type UnboundMetricWidgetProps = MetricWidgetBaseProps & ({
|
|
|
31
31
|
value?: never;
|
|
32
32
|
format?: never;
|
|
33
33
|
})));
|
|
34
|
+
/** VisualizationWidget with a formatted metric, optional comparison, and evidence. */
|
|
34
35
|
export type MetricWidgetProps = UnboundMetricWidgetProps | (Omit<MetricWidgetBaseProps, 'label' | 'comparison' | 'evidence'> & {
|
|
35
36
|
metric: MetricDefinition;
|
|
36
37
|
reading: MetricReading;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ChartItem, ValueChartProps } from './chart-data.js';
|
|
2
|
+
export type PieChartItem = ChartItem;
|
|
3
|
+
export type PieChartProps = ValueChartProps;
|
|
4
|
+
/** Nonnegative, mutually exclusive parts; shares use the sum of supplied items.
|
|
5
|
+
* Include Other to represent the whole. Zero values remain in the legend; all-zero
|
|
6
|
+
* data shows an empty circle. Colors follow item order. Compose inside VisualizationWidget;
|
|
7
|
+
* 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;
|
|
@@ -20,14 +20,11 @@ export type PresentStoryProps = {
|
|
|
20
20
|
scope?: ReactNode;
|
|
21
21
|
dataContext: DataContext;
|
|
22
22
|
theme?: ThemeController;
|
|
23
|
-
launcherProps?: Omit<ComponentPropsWithRef<'span'>, 'children'>;
|
|
24
|
-
dialogProps?: Omit<ComponentPropsWithRef<'dialog'>, 'children' | 'aria-labelledby' | 'open'>;
|
|
25
23
|
headerActions?: ReactNode;
|
|
26
24
|
footer?: ReactNode;
|
|
27
25
|
} & Omit<ComponentPropsWithRef<'button'>, 'title'>;
|
|
28
26
|
/**
|
|
29
27
|
* Uses an already loaded snapshot. Navigation is stored in `?present=1&step=`, and step
|
|
30
|
-
* inspection uses `?about=`.
|
|
31
|
-
* modal.
|
|
28
|
+
* inspection uses `?about=`. The presentation owns its modal structure.
|
|
32
29
|
*/
|
|
33
|
-
export declare function PresentStory({ title, findings, empty, scope, dataContext, theme,
|
|
30
|
+
export declare function PresentStory({ title, findings, empty, scope, dataContext, theme, headerActions, footer, children, className, onClick, disabled, ref, ...props }: PresentStoryProps): import("react").JSX.Element;
|
|
@@ -3,8 +3,7 @@ export type RefreshControlProps = {
|
|
|
3
3
|
refreshing: boolean;
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
label?: string;
|
|
6
|
-
statusProps?: Omit<ComponentPropsWithRef<'div'>, 'children' | 'role'>;
|
|
7
6
|
status?: ReactNode;
|
|
8
7
|
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
9
8
|
/** Show refresh progress just before its action after a short delay. */
|
|
10
|
-
export declare function RefreshControl({ refreshing, children, label,
|
|
9
|
+
export declare function RefreshControl({ refreshing, children, label, status, className, ...props }: RefreshControlProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ScatterChartItem } from './chart-data.js';
|
|
2
|
+
export type { ScatterChartItem } from './chart-data.js';
|
|
3
|
+
export type ScatterChartProps = {
|
|
4
|
+
items: readonly ScatterChartItem[];
|
|
5
|
+
xLabel: string;
|
|
6
|
+
yLabel: string;
|
|
7
|
+
xUnit: string;
|
|
8
|
+
yUnit: string;
|
|
9
|
+
ariaLabel: string;
|
|
10
|
+
formatX?: (value: number) => string;
|
|
11
|
+
formatY?: (value: number) => string;
|
|
12
|
+
};
|
|
13
|
+
/** Independent finite X/Y observations on linear axes that include zero.
|
|
14
|
+
* Negative and constant coordinates are supported. Axis labels and units describe
|
|
15
|
+
* tooltips as well as the plot; formatX/formatY format ticks and tooltip values.
|
|
16
|
+
* Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
|
|
17
|
+
export declare function ScatterChart({ items, xLabel, yLabel, xUnit, yUnit, ariaLabel, formatX, formatY, }: ScatterChartProps): import("react").JSX.Element;
|
|
@@ -12,11 +12,10 @@ export type SearchFieldProps = {
|
|
|
12
12
|
busy?: boolean;
|
|
13
13
|
resetValue?: string;
|
|
14
14
|
inputProps?: Omit<ComponentPropsWithRef<'input'>, 'type' | 'value' | 'children'>;
|
|
15
|
-
clearButtonProps?: Omit<ComponentPropsWithRef<'button'>, 'type' | 'children'>;
|
|
16
15
|
children?: ReactNode;
|
|
17
16
|
} & Omit<ComponentPropsWithRef<'form'>, 'onChange' | 'onSubmit' | 'children'>;
|
|
18
17
|
/**
|
|
19
18
|
* The caller owns filtering, URL state, and whether search runs while typing or on submit.
|
|
20
19
|
* Escape and Clear reset the query.
|
|
21
20
|
*/
|
|
22
|
-
export declare function SearchField({ label, value, onChange, onSubmit, placeholder, showLabel, size, description, status, busy, resetValue, inputProps,
|
|
21
|
+
export declare function SearchField({ label, value, onChange, onSubmit, placeholder, showLabel, size, description, status, busy, resetValue, inputProps, children, className, ...props }: SearchFieldProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
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({ size, endAction, loading, className, onKeyDown, ...props }: Omit<ComponentPropsWithRef<'input'>, 'size' | 'children'> & {
|
|
3
|
+
export declare function SearchInput({ focusRing, size, endAction, loading, className, onKeyDown, ...props }: Omit<ComponentPropsWithRef<'input'>, 'size' | 'children'> & {
|
|
4
4
|
size?: 'default' | 'compact';
|
|
5
|
+
/** Menu search delegates focus indication to the active option. */
|
|
6
|
+
focusRing?: boolean;
|
|
5
7
|
endAction?: ReactNode;
|
|
6
8
|
/** Replaces the search glyph in its existing space; input and results remain usable. */
|
|
7
9
|
loading?: boolean;
|
|
@@ -9,10 +9,11 @@ export type SheetProps = {
|
|
|
9
9
|
headerActions?: ReactNode;
|
|
10
10
|
footer?: ReactNode;
|
|
11
11
|
wide?: boolean;
|
|
12
|
+
placement?: 'side' | 'center';
|
|
12
13
|
returnFocus?: RefObject<HTMLElement | null>;
|
|
13
14
|
} & SheetDialogProps;
|
|
14
15
|
/**
|
|
15
16
|
* Uses the native dialog top layer and focus trap. Closing keeps the modal mounted until its
|
|
16
17
|
* exit transition completes.
|
|
17
18
|
*/
|
|
18
|
-
export declare function Sheet({ open, onOpenChange, title, description, children, headerActions, footer, wide, returnFocus, className, onCancel, onClose, onClick, onTransitionEnd, ref, ...props }: SheetProps): import("react").JSX.Element;
|
|
19
|
+
export declare function Sheet({ open, onOpenChange, title, description, children, headerActions, footer, wide, placement, returnFocus, className, onCancel, onClose, onClick, onTransitionEnd, ref, ...props }: SheetProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
-
export type SkeletonProps = Omit<ComponentPropsWithRef<'span'>, 'children' | 'aria-hidden'
|
|
2
|
+
export type SkeletonProps = Omit<ComponentPropsWithRef<'span'>, 'children' | 'aria-hidden'> & {
|
|
3
|
+
/** Align a text-sized placeholder with surrounding prose. */
|
|
4
|
+
inline?: boolean;
|
|
5
|
+
};
|
|
3
6
|
/** Decorative loading placeholder that fades in only when loading takes a moment.
|
|
4
7
|
* Put the accessible status on its container. */
|
|
5
|
-
export declare function Skeleton({ className, ...props }: SkeletonProps): import("react").JSX.Element;
|
|
8
|
+
export declare function Skeleton({ inline, className, ...props }: SkeletonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type StaticDataAppProps } from './DataAppFrame.js';
|
|
2
|
+
export type DataAppProps = StaticDataAppProps;
|
|
3
|
+
/** Setup and static screens; fetched data uses the declared-view DataApp. */
|
|
4
|
+
export declare function DataApp(props: DataAppProps): import("react").JSX.Element;
|
|
@@ -14,34 +14,37 @@ export type TableWidgetColumn<Row> = {
|
|
|
14
14
|
cell: (row: Row, hit?: SearchHit<Row>) => ReactNode;
|
|
15
15
|
};
|
|
16
16
|
export type TableWidgetSearch<Row> = Omit<DataTableSearch, 'itemCount'> & Pick<SearchItemsOptions<Row>, 'attributes' | 'mode' | 'fuzzyThreshold'>;
|
|
17
|
+
export type TableDisplayMode = {
|
|
18
|
+
/** Positive integer preview cap after search; disables pagination. */
|
|
19
|
+
limit: number;
|
|
20
|
+
pagination?: never;
|
|
21
|
+
} | {
|
|
22
|
+
/** Local pagination after search: 10 rows by default, false shows all supplied rows.
|
|
23
|
+
* pageSize must be a positive integer. Counts refer only to supplied rows.
|
|
24
|
+
* The widget owns bottom-footer controls and shares the current page with inspection. */
|
|
25
|
+
pagination?: {
|
|
26
|
+
pageSize: number;
|
|
27
|
+
} | false;
|
|
28
|
+
limit?: never;
|
|
29
|
+
};
|
|
17
30
|
type TableWidgetBaseProps<Row> = {
|
|
18
31
|
title: ReactNode;
|
|
32
|
+
annotationId?: string;
|
|
19
33
|
count?: number;
|
|
20
34
|
description?: ReactNode;
|
|
21
35
|
columns: readonly [TableWidgetColumn<Row>, ...TableWidgetColumn<Row>[]];
|
|
22
36
|
/** Unique, nonempty row identity. Numeric keys must be finite; 1 and "1" collide. */
|
|
23
37
|
rowKey: (row: Row) => string | number;
|
|
24
|
-
insight?: ReactNode;
|
|
25
38
|
status?: WidgetStatus;
|
|
26
39
|
action?: ReactNode;
|
|
27
40
|
evidence?: WidgetEvidence;
|
|
28
41
|
search?: TableWidgetSearch<Row>;
|
|
29
42
|
/** Valid result with no rows; the header remains visible. */
|
|
30
|
-
|
|
31
|
-
} &
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} | {
|
|
36
|
-
/** Local pagination after search: 10 rows by default, false shows all supplied rows.
|
|
37
|
-
* pageSize must be a positive integer. Counts refer only to supplied rows.
|
|
38
|
-
* The widget owns bottom-footer controls and shares the current page with inspection. */
|
|
39
|
-
pagination?: {
|
|
40
|
-
pageSize: number;
|
|
41
|
-
} | false;
|
|
42
|
-
limit?: never;
|
|
43
|
-
}) & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
|
|
44
|
-
/** Column definitions own both header and body semantics; the first column is the row header. */
|
|
43
|
+
emptyFallback: EmptyContent;
|
|
44
|
+
} & TableDisplayMode & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
|
|
45
|
+
/** Composes VisualizationWidget with DataTable, search, and local pagination.
|
|
46
|
+
* Columns own header and body semantics; the first column is the row header.
|
|
47
|
+
* Use DataTable inside VisualizationWidget directly for custom table markup. */
|
|
45
48
|
export type TableWidgetProps<Row> = TableWidgetBaseProps<Row> & ({
|
|
46
49
|
rows: readonly Row[];
|
|
47
50
|
reading?: never;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { Tabs as AriaTabs, TabList, Tab as AriaTab, TabPanels, TabPanel as AriaTabPanel } from 'react-aria-components/Tabs';
|
|
2
3
|
/** React Aria tabs with keyboard and ARIA behavior; pair each Tab and TabPanel by stable id. */
|
|
3
|
-
export {
|
|
4
|
+
export { TabList, TabPanels };
|
|
5
|
+
export declare function Tab(props: ComponentPropsWithRef<typeof AriaTab>): import("react").JSX.Element;
|
|
6
|
+
export declare function TabPanel(props: ComponentPropsWithRef<typeof AriaTabPanel>): import("react").JSX.Element;
|
|
7
|
+
export declare function Tabs({ className, ...props }: ComponentPropsWithRef<typeof AriaTabs>): import("react").JSX.Element;
|
|
4
8
|
/** Keep a page-level tab in `?view=`; reserve `?tab=` for the inspect sheet. */
|
|
5
9
|
export declare function useViewTab<View extends string>(views: readonly View[], fallback: View): [View, (key: string | number) => void];
|
|
@@ -5,7 +5,8 @@ import type { WidgetEvidence } from './WidgetEvidence.js';
|
|
|
5
5
|
type TextWidgetBaseProps = Omit<Extract<DataWidgetProps, {
|
|
6
6
|
reading?: never;
|
|
7
7
|
}>, 'reading' | 'children' | 'isEmpty' | 'empty' | 'skeleton' | 'bodyPadding'>;
|
|
8
|
-
/**
|
|
8
|
+
/** Narrative sibling of VisualizationWidget, composing DataWidget with TextContent.
|
|
9
|
+
* Use TextContent directly for borderless prose. Bind claims and scope to the same displayed reading.
|
|
9
10
|
* The renderer handles every ready value, including zero and empty collections. */
|
|
10
11
|
export type TextWidgetProps<Data = unknown> = TextWidgetBaseProps & ({
|
|
11
12
|
reading: DataReading<Data>;
|
|
@@ -11,12 +11,13 @@ export type TooltipProps = {
|
|
|
11
11
|
content: ReactNode;
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
variant?: 'hint' | 'chart';
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
14
15
|
align?: 'start' | 'center' | 'end';
|
|
15
16
|
placement?: 'top' | 'bottom';
|
|
16
17
|
portalRoot?: RefObject<HTMLElement | null>;
|
|
17
|
-
tooltipProps?: Omit<ComponentPropsWithRef<'span'>, 'children' | 'role'>;
|
|
18
18
|
} & Omit<ComponentPropsWithRef<'span'>, 'children' | 'content'>;
|
|
19
19
|
/** Short visual hint for an already labeled control. variant="chart" follows the cursor
|
|
20
|
-
* on hover and toggles on tap so a bar or point can show the period and value.
|
|
20
|
+
* on hover and toggles on tap so a bar or point can show the period and value. Chart
|
|
21
|
+
* tooltips dismiss on scroll and do not open on keyboard focus. Hint
|
|
21
22
|
* tooltips hide once the control is pressed. Escape closes either. */
|
|
22
|
-
export declare function Tooltip({ content, children, variant, align, placement, portalRoot,
|
|
23
|
+
export declare function Tooltip({ content, children, onOpenChange, variant, align, placement, portalRoot, className, ref, onPointerEnter, onPointerMove, onPointerLeave, onPointerDown, onFocusCapture, onBlurCapture, ...props }: TooltipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ValueChartProps } from './chart-data.js';
|
|
2
|
+
/** Ordered, equally spaced samples; negative values share an explicit zero baseline. */
|
|
3
|
+
export declare function TrendChart({ items, unit, ariaLabel, formatValue, area, }: ValueChartProps & {
|
|
4
|
+
area?: boolean;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -6,4 +6,4 @@ export type UpdatedAtProps = {
|
|
|
6
6
|
label?: string;
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
} & Omit<DateTimeTooltipProps, 'date' | 'children'>;
|
|
9
|
-
export declare function UpdatedAt({ timestamp, locale, label, children,
|
|
9
|
+
export declare function UpdatedAt({ timestamp, locale, label, children, triggerProps, ...props }: UpdatedAtProps): import("react").JSX.Element;
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
description?: ReactNode;
|
|
8
|
-
insight?: ReactNode;
|
|
9
|
-
action?: ReactNode;
|
|
10
|
-
evidence?: WidgetEvidence;
|
|
11
|
-
status?: WidgetStatus;
|
|
12
|
-
empty?: EmptyContent;
|
|
2
|
+
import { type DataWidgetProps } from './DataWidget.js';
|
|
3
|
+
import type { BoundWidgetReading } from './presentation.js';
|
|
4
|
+
type VisualizationWidgetBaseProps = Pick<DataWidgetProps, 'title' | 'annotationId' | 'description' | 'count' | 'action' | 'evidence' | 'status' | 'emptyFallback'> & {
|
|
5
|
+
/** Footer controls, such as table pagination. */
|
|
6
|
+
footer?: ReactNode;
|
|
13
7
|
} & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
|
|
14
8
|
type UnboundVisualizationWidgetProps = VisualizationWidgetBaseProps & ({
|
|
15
9
|
loading: true;
|
|
10
|
+
loadingContent?: ReactNode;
|
|
16
11
|
visual?: never;
|
|
17
12
|
} | {
|
|
18
13
|
loading?: false;
|
|
19
14
|
visual: ReactNode;
|
|
15
|
+
loadingContent?: never;
|
|
20
16
|
});
|
|
21
17
|
export type VisualizationWidgetView<Data> = {
|
|
22
18
|
/** Stable, nonempty identity; unique within this widget. */
|
|
@@ -28,8 +24,10 @@ type BoundVisualizationWidgetBase<Data> = VisualizationWidgetBaseProps & BoundWi
|
|
|
28
24
|
visual?: never;
|
|
29
25
|
loading?: never;
|
|
30
26
|
};
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
27
|
+
/** DataWidget frame for charts, DataTable, metrics, or a custom data display.
|
|
28
|
+
* Owns alternate-view selection and shares it with inspection. Built-in charts own
|
|
29
|
+
* transient tooltips; lift persistent custom interactions above both mounts.
|
|
30
|
+
* For narrative prose use the sibling TextWidget, which composes DataWidget directly. */
|
|
33
31
|
export type VisualizationWidgetProps<Data = unknown> = UnboundVisualizationWidgetProps | (BoundVisualizationWidgetBase<Data> & {
|
|
34
32
|
children: (data: Data) => ReactNode;
|
|
35
33
|
views?: never;
|
|
@@ -40,5 +38,6 @@ export type VisualizationWidgetProps<Data = unknown> = UnboundVisualizationWidge
|
|
|
40
38
|
initialView?: string;
|
|
41
39
|
children?: never;
|
|
42
40
|
});
|
|
41
|
+
/** Compose an unframed visual with the shared heading and inspection. */
|
|
43
42
|
export declare function VisualizationWidget<Data>(props: VisualizationWidgetProps<Data>): import("react").JSX.Element;
|
|
44
43
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Ordered category or time-series sample. IDs are unique and nonblank; values are finite. */
|
|
2
|
+
export type ChartItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value: number;
|
|
6
|
+
};
|
|
7
|
+
export type ValueChartProps = {
|
|
8
|
+
/** Ordered samples; the chart validates IDs and values when rendering. */
|
|
9
|
+
items: readonly ChartItem[];
|
|
10
|
+
unit: string;
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
formatValue?: (value: number) => string;
|
|
13
|
+
};
|
|
14
|
+
/** Independent observation on two finite numeric axes. */
|
|
15
|
+
export type ScatterChartItem = {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
type ChartKind = 'bar' | 'line' | 'area' | 'pie' | 'scatter';
|
|
22
|
+
type ItemFor<Kind extends ChartKind> = Kind extends 'scatter' ? ScatterChartItem : ChartItem;
|
|
23
|
+
/** Validate the data consumed by every chart. */
|
|
24
|
+
export declare function validateChartItems<Kind extends ChartKind>(kind: Kind, items: readonly ItemFor<Kind>[]): void;
|
|
25
|
+
export {};
|
|
@@ -15,15 +15,26 @@ export type DataContext = {
|
|
|
15
15
|
identifiers?: Readonly<Record<string, DataIdentifierDefinition>>;
|
|
16
16
|
queryNames?: Readonly<Record<string, string>>;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
19
|
-
export declare function evidenceFor<const Context extends DataContext, const Names extends Record<string, string> = Record<string, string>>(context: Context, names?: Names): (evidence: {
|
|
18
|
+
export type MetricDeclaration = {
|
|
20
19
|
id: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
glossaryId: string;
|
|
21
|
+
label?: string;
|
|
22
|
+
format: MetricFormat;
|
|
23
|
+
favorableDirection?: 'up' | 'down';
|
|
24
|
+
queryNames?: readonly string[];
|
|
25
|
+
};
|
|
26
|
+
export type EvidenceDeclaration = {
|
|
24
27
|
id: string;
|
|
25
|
-
|
|
26
|
-
|
|
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;
|
|
27
38
|
};
|
|
28
39
|
/** Bind glossary query references and card evidence to the same registry. */
|
|
29
40
|
export declare function createDataContext<const Names extends Record<string, string>>(queryNames: Names): <const Context extends Omit<DataContext, 'glossary'> & {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type LucideProps } from 'lucide-react';
|
|
2
2
|
/** Use semantic names to keep icon meaning and optical size consistent across controls. */
|
|
3
3
|
declare const brandedIcons: {
|
|
4
|
+
readonly annotate: import("lucide-react").LucideIcon;
|
|
4
5
|
readonly cancel: import("lucide-react").LucideIcon;
|
|
5
6
|
readonly calendar: import("lucide-react").LucideIcon;
|
|
6
7
|
readonly clock: import("lucide-react").LucideIcon;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/** Direct UI composition and static screens. Requests use declared views from /react. */
|
|
2
|
+
export { injectDataAppShellStyles } from '../shellStyles.js';
|
|
3
|
+
export { DataAppProvider } from '../mount.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 { DataAppSkeleton } from './DataAppSkeleton.js';
|
|
20
|
+
export type { DataAppSkeletonProps } from './DataAppSkeleton.js';
|
|
21
|
+
export { LiveControl } from './LiveControl.js';
|
|
22
|
+
export type { LiveControlProps, LiveIntervalSeconds, } from './LiveControl.js';
|
|
23
|
+
export { DateRangePicker } from './DateRangePicker.js';
|
|
24
|
+
export type { DatePresetId, DateRange, DateRangePickerProps, } from './DateRangePicker.js';
|
|
25
|
+
export { useAppVariables } from './variables.js';
|
|
26
|
+
export { SearchField } from './SearchField.js';
|
|
27
|
+
export type { SearchFieldProps } from './SearchField.js';
|
|
28
|
+
export { searchItems } from './searchItems.js';
|
|
29
|
+
export type { SearchAttribute, SearchHit, SearchItemsOptions, SearchMatchValue, SearchRange, } from './searchItems.js';
|
|
30
|
+
export { SearchMatch } from './SearchMatch.js';
|
|
31
|
+
export type { SearchMatchProps } from './SearchMatch.js';
|
|
32
|
+
export { Combobox } from './Combobox.js';
|
|
33
|
+
export type { ComboboxOption, ComboboxProps } from './Combobox.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';
|
|
@@ -8,4 +8,4 @@ export type MetricDefinition = {
|
|
|
8
8
|
favorableDirection?: 'up' | 'down';
|
|
9
9
|
evidence: WidgetEvidence;
|
|
10
10
|
};
|
|
11
|
-
export declare function metricComparison(metric: MetricDefinition, reading: MetricReading): import("./comparison.js").MetricComparison | undefined;
|
|
11
|
+
export declare function metricComparison(metric: MetricDefinition, reading: MetricReading): import("./metric-comparison.js").MetricComparison | undefined;
|
|
@@ -7,13 +7,17 @@ export type EmptyContent = {
|
|
|
7
7
|
};
|
|
8
8
|
export type SkeletonContent = {
|
|
9
9
|
variant: 'metric' | 'panel' | 'ranking';
|
|
10
|
+
/**
|
|
11
|
+
* Placeholder rows, clamped to 0–100.
|
|
12
|
+
* @default 4
|
|
13
|
+
*/
|
|
10
14
|
rows?: number;
|
|
11
15
|
};
|
|
12
16
|
/** A bound widget must explain empty results and link the reading to its evidence. */
|
|
13
17
|
export type BoundWidgetReading<Data> = {
|
|
14
18
|
reading: DataReading<Data>;
|
|
15
19
|
isEmpty: (data: Data) => boolean;
|
|
16
|
-
|
|
20
|
+
emptyFallback: EmptyContent;
|
|
17
21
|
evidence: WidgetEvidence;
|
|
18
22
|
skeleton?: SkeletonContent;
|
|
19
23
|
};
|
|
@@ -9,6 +9,12 @@ export type Shortcut = {
|
|
|
9
9
|
key: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const shortcuts: {
|
|
12
|
+
readonly annotate: {
|
|
13
|
+
readonly modifier: 'mod';
|
|
14
|
+
readonly shift: true;
|
|
15
|
+
readonly code: 'Period';
|
|
16
|
+
readonly key: '.';
|
|
17
|
+
};
|
|
12
18
|
readonly refresh: {
|
|
13
19
|
readonly modifier: 'alt';
|
|
14
20
|
readonly code: 'KeyR';
|
|
@@ -29,4 +35,4 @@ export declare function shortcutLabel({ modifier, shift, key }: Shortcut): strin
|
|
|
29
35
|
export declare function ariaKeyShortcuts({ modifier, shift, key }: Shortcut): string;
|
|
30
36
|
export declare function isEditingTarget(target: EventTarget | null): boolean;
|
|
31
37
|
/** Bind a page-level shortcut. Ignored while typing or while a modal layer is open. */
|
|
32
|
-
export declare function useShortcut(shortcut: Shortcut, action: () => void, enabled?: boolean): void;
|
|
38
|
+
export declare function useShortcut(shortcut: Shortcut, action: () => void, enabled?: boolean, allowWhileEditing?: boolean): void;
|