@lilt-ui/charts 0.7.0 → 0.8.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.
@@ -8,9 +8,16 @@ export interface AxisCursor {
8
8
  x: MotionValue<number>;
9
9
  /** The inspected position itself, for marks that must line up with the crosshair. */
10
10
  pointerX: MotionValue<number>;
11
+ /**
12
+ * The inspected column, unsprung: it jumps to each observation the moment it is read, in step
13
+ * with the bars that light up, for marks that snap to a column rather than glide.
14
+ */
15
+ columnX: MotionValue<number>;
11
16
  y: MotionValue<number>;
12
- /** 1 while this chart owns an inspection, else 0. */
17
+ /** 1 while this chart owns an inspection with pills on its axes, else 0. */
13
18
  active: MotionValue<number>;
19
+ /** 1 while any reading is shown, whatever the readout, else 0. */
20
+ inspecting: MotionValue<number>;
14
21
  /** The preset each axis uses. */
15
22
  axis: ResolvedAxis;
16
23
  pill: ChartHoverStyle;
@@ -36,5 +43,10 @@ export interface ResolvedAxis {
36
43
  }
37
44
  /** Split an `axis` prop into one preset per axis. An axis left out is `minimal`. */
38
45
  export declare function resolveAxis(axis: ChartAxis | undefined): ResolvedAxis;
46
+ /**
47
+ * Y axes that keep their labels in a gutter beside the plot: classic, segmented, and dots, whose
48
+ * labels lead into the plot along a dotted line.
49
+ */
50
+ export declare function hasYGutter(style: ChartAxisStyle): boolean;
39
51
  /** Pills sit on the y axis when it has labels, and above the hovered mark when it does not. */
40
52
  export declare function resolvePillPosition(position: 'auto' | 'axis' | 'mark', style: ChartAxisStyle): 'axis' | 'mark';
@@ -29,10 +29,15 @@ interface InspectionLayerProps<T> {
29
29
  compactPlot?: boolean;
30
30
  inlineOnly?: boolean;
31
31
  hideAxisBadges?: boolean;
32
+ /**
33
+ * A panel (tooltip or strip) reads the values out away from the point, so the crosshair turns
34
+ * dotted and the point becomes a ring that marks the spot instead of sitting on it.
35
+ */
36
+ panel?: boolean;
32
37
  peer?: boolean;
33
38
  onCompareFromHere?: () => void;
34
39
  /** Range marks in the plot; column marks draw their own highlight instead of a point. */
35
40
  marks?: readonly PlotMark[];
36
41
  }
37
- export declare function InspectionLayer<T>({ snapshot, selection, series, seriesColors, paintId, renderContent, inspectionSeries, stackedPill, pinIcon, tooltipClassName, tooltipAriaLabel, width, height, reducedMotion, highlightMaskId, crossGradientId, compactPlot, inlineOnly, hideAxisBadges, peer, onCompareFromHere, marks, }: InspectionLayerProps<T>): ReactElement;
42
+ export declare function InspectionLayer<T>({ snapshot, selection, series, seriesColors, paintId, renderContent, inspectionSeries, stackedPill, pinIcon, tooltipClassName, tooltipAriaLabel, width, height, reducedMotion, highlightMaskId, crossGradientId, compactPlot, inlineOnly, hideAxisBadges, panel, peer, onCompareFromHere, marks, }: InspectionLayerProps<T>): ReactElement;
38
43
  export {};
@@ -0,0 +1,7 @@
1
+ import { ReactElement } from 'react';
2
+ /**
3
+ * Behind a bar or column chart, the inspected column is lit as a whole: a soft band the height of
4
+ * the plot, a little wider than its bars. A column is what a reader inspects on a bar chart, so
5
+ * the band says so where a thin crosshair would not.
6
+ */
7
+ export declare function HoverBand(): ReactElement | null;