@lilt-ui/charts 0.7.1 → 0.8.1
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/CHANGELOG.md +22 -0
- package/dist/cards/cartesian-card.d.ts +6 -2
- package/dist/chart-context.d.ts +1 -1
- package/dist/engine/lifecycle.d.ts +2 -2
- package/dist/finance.js +1 -1
- package/dist/index.js +1 -1
- package/dist/interaction/axis-cursor.d.ts +13 -1
- package/dist/interaction/inspection-layer.d.ts +6 -1
- package/dist/primitives/hover-band.d.ts +7 -0
- package/dist/{skeleton-block-DvtzSsgP.js → skeleton-block-JtV7oz8b.js} +1967 -1729
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +13 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- Data landing on a loading chart no longer flashes the finished chart before its entrance. The skeleton blurs away first, then the chart makes its usual entrance, so the two never share the plot. In 3D the flash showed a full chart for a frame; it is gone in every loading style.
|
|
8
|
+
|
|
9
|
+
## 0.8.0
|
|
10
|
+
|
|
11
|
+
A new tooltip, a dotted y axis, a band that lights the hovered column, and a readout that never covers the marks.
|
|
12
|
+
|
|
13
|
+
### Hover
|
|
14
|
+
|
|
15
|
+
- The tooltip's date sits in a recessed well, and each row reads marker, name, value, with the value right after its name. The panel hugs its rows.
|
|
16
|
+
- With a tooltip or strip readout, the crosshair turns dotted and hovered points become rings. Pills keep their filled hover dots.
|
|
17
|
+
- `hover="strip"` docks the reading in a one-line capsule above the plot, centered on the crosshair, so it never covers the marks. The headline rests, as with the tooltip. `Tooltip` takes `layout: 'strip'`.
|
|
18
|
+
- Bar and column charts light the inspected column with a soft band behind its bars, arriving in step with the bars that light up. `spotlight={false}` turns it off along with the background spotlight.
|
|
19
|
+
- When no pill covers it, the inspected observation's x label brightens.
|
|
20
|
+
|
|
21
|
+
### Axes
|
|
22
|
+
|
|
23
|
+
- `axis="dots"` now labels the y axis: each label sits in a gutter with a node and a dotted leader across the plot, and the value pill sits on the axis. The x axis keeps its dot under every observation. Loading skeletons match.
|
|
24
|
+
|
|
3
25
|
## 0.7.1
|
|
4
26
|
|
|
5
27
|
### Fixes
|
|
@@ -116,7 +116,10 @@ export interface CartesianCardProps<Row, Key extends NumericKey<Row>> {
|
|
|
116
116
|
axis?: ChartAxis;
|
|
117
117
|
/** Texture behind the plot: `dots` (default), `grid`, `lines`, or `none`. */
|
|
118
118
|
background?: ChartBackground;
|
|
119
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* Light up what is under the pointer: the background around a point, and on bar charts the
|
|
121
|
+
* whole column. Defaults to true.
|
|
122
|
+
*/
|
|
120
123
|
spotlight?: boolean;
|
|
121
124
|
/**
|
|
122
125
|
* Draw a long line or area from each pixel column's first, last, lowest and highest
|
|
@@ -145,7 +148,8 @@ export interface CartesianCardProps<Row, Key extends NumericKey<Row>> {
|
|
|
145
148
|
axisInset?: number;
|
|
146
149
|
/**
|
|
147
150
|
* What the hovered point shows, one readout at a time: `pills` (default) on the axes, a
|
|
148
|
-
* `tooltip` with every series,
|
|
151
|
+
* `tooltip` with every series, a `strip` docked above the plot, or `headline`, which leaves the
|
|
152
|
+
* plot to the hover dots.
|
|
149
153
|
*/
|
|
150
154
|
hover?: ChartHoverReadout;
|
|
151
155
|
/** How the pills or tooltip look: `soft` (default), `solid`, or `accent`. */
|
package/dist/chart-context.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ export interface ChartContextValue<T> {
|
|
|
89
89
|
revealProgress: number;
|
|
90
90
|
reducedMotion: boolean;
|
|
91
91
|
transitionDuration: number;
|
|
92
|
-
transitionKind: 'initial' | '
|
|
92
|
+
transitionKind: 'initial' | 'matched-update' | 'topology-update' | null;
|
|
93
93
|
axis: {
|
|
94
94
|
x: readonly AxisTick[];
|
|
95
95
|
y: readonly AxisTick[];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type LifecyclePhase = 'pending' | 'loading' | '
|
|
1
|
+
export type LifecyclePhase = 'pending' | 'loading' | 'revealing' | 'ready' | 'updating' | 'empty' | 'error';
|
|
2
2
|
export interface LifecycleGeneration {
|
|
3
3
|
next: () => number;
|
|
4
4
|
current: () => number;
|
|
5
5
|
isCurrent: (generation: number) => boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare function createLifecycleGeneration(): LifecycleGeneration;
|
|
8
|
-
export declare function durationForPhase(phase: 'initial' | '
|
|
8
|
+
export declare function durationForPhase(phase: 'initial' | 'matched-update' | 'topology-update', reducedMotion: boolean, animateIn?: boolean): number;
|
|
9
9
|
/** Preserve full data fidelity while avoiding repeated per-sample geometry tweens. */
|
|
10
10
|
export declare function skipDataTweenForWorkload(sampleCount: number, millisecondsSinceLastUpdate: number): boolean;
|
package/dist/finance.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as e, C as t, I as n, J as r, L as i, P as a, Q as o, R as s, S as c, T as l, _ as u, a as d, b as f, f as p, ht as m, i as h, n as g, nt as _, ot as v, q as y, t as b, u as x, v as S, w as C, x as w, y as T, z as E } from "./skeleton-block-
|
|
2
|
+
import { A as e, C as t, I as n, J as r, L as i, P as a, Q as o, R as s, S as c, T as l, _ as u, a as d, b as f, f as p, ht as m, i as h, n as g, nt as _, ot as v, q as y, t as b, u as x, v as S, w as C, x as w, y as T, z as E } from "./skeleton-block-JtV7oz8b.js";
|
|
3
3
|
import { S as D, d as O, g as k, h as A, p as j, u as ee } from "./report-context-CkzH-r8B.js";
|
|
4
4
|
import { useEffect as M, useMemo as N, useRef as P, useState as F } from "react";
|
|
5
5
|
import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, Q as g, R as _, S as v, T as y, U as ee, V as te, W as b, X as x, Y as S, Z as C, _ as ne, _t as w, at as T, b as re, c as E, ct as D, d as ie, dt as O, et as k, f as A, ft as j, g as M, gt as N, h as P, ht as F, i as I, it as L, j as R, k as z, l as B, lt as V, m as ae, mt as H, n as U, o as oe, ot as W, p as se, pt as G, q as ce, r as le, rt as ue, s as de, st as fe, t as pe, tt as K, u as me, ut as he, v as ge, vt as _e, w as ve, x as q, y as ye, yt as be, z as J } from "./skeleton-block-
|
|
2
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, Q as g, R as _, S as v, T as y, U as ee, V as te, W as b, X as x, Y as S, Z as C, _ as ne, _t as w, at as T, b as re, c as E, ct as D, d as ie, dt as O, et as k, f as A, ft as j, g as M, gt as N, h as P, ht as F, i as I, it as L, j as R, k as z, l as B, lt as V, m as ae, mt as H, n as U, o as oe, ot as W, p as se, pt as G, q as ce, r as le, rt as ue, s as de, st as fe, t as pe, tt as K, u as me, ut as he, v as ge, vt as _e, w as ve, x as q, y as ye, yt as be, z as J } from "./skeleton-block-JtV7oz8b.js";
|
|
3
3
|
import { n as xe, t as Se } from "./chart-data-CCwLQeXa.js";
|
|
4
4
|
import { S as Ce, _ as we, b as Te, c as Ee, d as De, f as Oe, g as ke, h as Ae, l as je, m as Me, p as Ne, u as Pe, x as Fe } from "./report-context-CkzH-r8B.js";
|
|
5
5
|
import { a as Ie, i as Le, n as Re, r as ze, t as Be } from "./analysis-BJRmXHOB.js";
|
|
@@ -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;
|