@lilt-ui/charts 0.5.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0
4
+
5
+ Charts have three loading styles, with skeletons shaped for each family and refreshed palettes.
6
+
7
+ ### Loading
8
+
9
+ - `loadingStyle` accepts `shimmer` (the default), `draw`, or `breathe` on charts and cards, including finance charts. `ChartLoadingStyle` is exported for typed consumers.
10
+ - Loading skeletons follow each chart's geometry, including candles, range marks, rings, funnels, and flows. Moving skeletons share a clock so cards on a page move together.
11
+ - Loading motion respects reduced-motion preferences and `motion="none"`; placeholders do not present invented readings as data.
12
+
13
+ ### Palettes
14
+
15
+ - Iris uses violet, rose, and amber; Cobalt uses blue, cyan, and indigo; Emerald uses green, lime, and teal. Default series colors follow Iris, with matching light and dark palettes.
16
+
3
17
  ## 0.5.0
4
18
 
5
19
  Every chart that can carry it gets depth with one prop, and legends come in five layouts.
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { ChartMotion } from './types';
2
+ import { ChartLoadingStyle, ChartMotion } from './types';
3
3
  export interface ActivitySelection<Row> {
4
4
  hour: number;
5
5
  row: Row | null;
@@ -23,6 +23,7 @@ export interface ActivityRingProps<Row> {
23
23
  onSelectionChange?: (selection: ActivitySelection<Row> | null) => void;
24
24
  /** `loading` keeps showing the last accepted day until new data is ready. */
25
25
  status?: 'ready' | 'loading';
26
+ loadingStyle?: ChartLoadingStyle;
26
27
  /** A new key drops the accepted day and any selection. */
27
28
  resetKey?: string | number;
28
29
  motion?: ChartMotion;
@@ -42,5 +43,5 @@ export declare function activitySlots<Row>(data: readonly Row[], hour: (row: Row
42
43
  * The 24-hour dot ring inside `ActivityRingCard`: one column of dots per time slot, filled by
43
44
  * how much happened then. One tab stop; arrow keys step around the day and Enter pins a slot.
44
45
  */
45
- export declare function ActivityRing<Row>({ data, hour, value, maximum, bucketMinutes, dotDensity, unit, formatValue, center, onSelectionChange, status, resetKey, motion, height, depth, className, 'aria-label': ariaLabel, }: ActivityRingProps<Row>): import("react/jsx-runtime").JSX.Element;
46
+ export declare function ActivityRing<Row>({ data, hour, value, maximum, bucketMinutes, dotDensity, unit, formatValue, center, onSelectionChange, status, loadingStyle, resetKey, motion, height, depth, className, 'aria-label': ariaLabel, }: ActivityRingProps<Row>): import("react/jsx-runtime").JSX.Element;
46
47
  export {};
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
2
+ import { ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
3
3
  import { CardRange } from './cartesian-card';
4
4
  import { NumericKey } from './keys';
5
5
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -47,6 +47,7 @@ export interface ActivityRingCardProps<Row, Key extends NumericKey<Row>> {
47
47
  numberStyle?: AnimatedNumberVariant;
48
48
  palette?: ChartPalette;
49
49
  loading?: boolean;
50
+ loadingStyle?: ChartLoadingStyle;
50
51
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
51
52
  motion?: ChartMotion;
52
53
  className?: string;
@@ -59,4 +60,4 @@ export declare function clockLabel(hour: number): string;
59
60
  * filled by how much happened then. Hovering or stepping around the ring reads each slot in the
60
61
  * headline; tiles name the busiest and quietest times.
61
62
  */
62
- export declare function ActivityRingCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, hour, value, bucketMinutes, unit, maximum: suppliedMaximum, aggregate, height, depth, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, loading, motion, className, style, }: ActivityRingCardProps<Row, Key>): ReactElement;
63
+ export declare function ActivityRingCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, hour, value, bucketMinutes, unit, maximum: suppliedMaximum, aggregate, height, depth, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, loading, loadingStyle, motion, className, style, }: ActivityRingCardProps<Row, Key>): ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { ChartController, ChartMargins, ChartTooltipContext, NumericXConfig, TimeXConfig, ChartAxis, ChartBarAppearance, ChartBackground, ChartCurve, ChartMotion, ChartPalette, ChartHoverReadout, ChartHoverStyle, ChartSeries, ChartTooltipIndicator, ChartStyle, ChartSurface, CardLegend, ChartLegendSwatch } from '../types';
2
+ import { ChartController, ChartMargins, ChartTooltipContext, NumericXConfig, TimeXConfig, ChartAxis, ChartBarAppearance, ChartBackground, ChartCurve, ChartMotion, ChartPalette, ChartHoverReadout, ChartHoverStyle, ChartSeries, ChartTooltipIndicator, ChartStyle, ChartSurface, CardLegend, ChartLegendSwatch, ChartLoadingStyle } from '../types';
3
3
  import { NumericKey, ResolvedX, XKey, XKind } from './keys';
4
4
  import { CardAggregate } from './format';
5
5
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -184,6 +184,12 @@ export interface CartesianCardProps<Row, Key extends NumericKey<Row>> {
184
184
  */
185
185
  sync?: string;
186
186
  loading?: boolean;
187
+ /**
188
+ * How the skeleton moves while `loading`: `shimmer` (default) sweeps a highlight over still
189
+ * shapes, `draw` reveals bars or contours in order, `breathe` lets them rise and settle.
190
+ * Moving skeletons on a page share a clock.
191
+ */
192
+ loadingStyle?: ChartLoadingStyle;
187
193
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
188
194
  motion?: ChartMotion;
189
195
  className?: string;
@@ -258,6 +264,7 @@ export interface CardMarks {
258
264
  }
259
265
  /** Panes drawn under the main plot, linked to it: same data, x, margins and crosshair. */
260
266
  export interface CardPaneContext<Row> {
267
+ loadingStyle?: ChartLoadingStyle;
261
268
  data: readonly Row[];
262
269
  x: TimeXConfig<Row> | NumericXConfig<Row>;
263
270
  controller: ChartController;
@@ -278,7 +285,7 @@ export declare const CARD_PADDING = 20;
278
285
  * The shared card body: headline, delta, period, plot, and value tiles, with hover sync and
279
286
  * range comparison. Area, Line, and Bar cards differ only in their `shape`.
280
287
  */
281
- export declare function CartesianCard<Row, Key extends NumericKey<Row>>({ shape, title, data: suppliedData, x, series: seriesInput, headline: suppliedHeadline, aggregate: suppliedAggregate, headlineSeries, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, tiles, legend, legendSwatch, depth, height, valueFormat, locale, formatValue: suppliedFormatValue, formatAxisValue: suppliedFormatAxisValue, formatX, xType, compare, target: suppliedTarget, forecast, sync, axis, hover, hoverStyle, background, spotlight, surface, badge, numberStyle, palette, bleed, axisInset, pillSeries, pillValue, pillPosition, tooltipIndicator, loading, motion, className, style, panes, live, heading, restCaption, normal, onNormalChange, }: Omit<CartesianCardProps<Row, Key>, 'series'> & {
288
+ export declare function CartesianCard<Row, Key extends NumericKey<Row>>({ shape, title, data: suppliedData, x, series: seriesInput, headline: suppliedHeadline, aggregate: suppliedAggregate, headlineSeries, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, tiles, legend, legendSwatch, depth, height, valueFormat, locale, formatValue: suppliedFormatValue, formatAxisValue: suppliedFormatAxisValue, formatX, xType, compare, target: suppliedTarget, forecast, sync, axis, hover, hoverStyle, background, spotlight, surface, badge, numberStyle, palette, bleed, axisInset, pillSeries, pillValue, pillPosition, tooltipIndicator, loading, loadingStyle, motion, className, style, panes, live, heading, restCaption, normal, onNormalChange, }: Omit<CartesianCardProps<Row, Key>, 'series'> & {
282
289
  series: readonly CoreSeries<Key>[];
283
290
  shape: CardShape;
284
291
  /** Linked panes under the plot, such as volume or indicators. */
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface, CardLegend, ChartLegendSwatch } from '../types';
2
+ import { ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface, CardLegend, ChartLegendSwatch } from '../types';
3
3
  import { CardRange } from './cartesian-card';
4
4
  import { NumericKey, TextKey } from './keys';
5
5
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -53,6 +53,7 @@ export interface FunnelChartCardProps<Row, Key extends NumericKey<Row>> {
53
53
  numberStyle?: AnimatedNumberVariant;
54
54
  palette?: ChartPalette;
55
55
  loading?: boolean;
56
+ loadingStyle?: ChartLoadingStyle;
56
57
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
57
58
  motion?: ChartMotion;
58
59
  className?: string;
@@ -83,4 +84,4 @@ export declare function pipeEnd(x: number, half: number, rx: number, side: 'left
83
84
  * its percentage on the band and its count in a tile beneath. Hovering a stage reads it in the
84
85
  * headline with the conversion from the step before.
85
86
  */
86
- export declare function FunnelChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, value, curve, colors, tracks, depth, height, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, legend, legendSwatch, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, loading, motion: motionMode, className, style, }: FunnelChartCardProps<Row, Key>): ReactElement;
87
+ export declare function FunnelChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, value, curve, colors, tracks, depth, height, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, legend, legendSwatch, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, loading, loadingStyle, motion: motionMode, className, style, }: FunnelChartCardProps<Row, Key>): ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
2
+ import { ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
3
3
  import { CardRange } from './cartesian-card';
4
4
  import { NumericKey, TextKey } from './keys';
5
5
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -59,6 +59,7 @@ export interface HeatmapChartCardProps<Row, Key extends NumericKey<Row>> {
59
59
  numberStyle?: AnimatedNumberVariant;
60
60
  palette?: ChartPalette;
61
61
  loading?: boolean;
62
+ loadingStyle?: ChartLoadingStyle;
62
63
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
63
64
  motion?: ChartMotion;
64
65
  className?: string;
@@ -109,4 +110,4 @@ export declare function labelTier(index: number, count: number): 'major' | 'mino
109
110
  * labeled. Hovering or focusing a cell reads it in the headline; arrow keys move between cells.
110
111
  * Missing cells are hatched and say "No data", so they never read as zero.
111
112
  */
112
- export declare function HeatmapChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, x, y, value, columns, rows: rowOrder, domain, aggregate, height, radius, gap, depth, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, loading, motion: motionMode, className, style, }: HeatmapChartCardProps<Row, Key>): ReactElement;
113
+ export declare function HeatmapChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, x, y, value, columns, rows: rowOrder, domain, aggregate, height, radius, gap, depth, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, loading, loadingStyle, motion: motionMode, className, style, }: HeatmapChartCardProps<Row, Key>): ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface, RankingOrder } from '../types';
2
+ import { ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface, RankingOrder } from '../types';
3
3
  import { CardRange } from './cartesian-card';
4
4
  import { NumericKey, TextKey } from './keys';
5
5
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -52,6 +52,7 @@ export interface HorizontalBarChartCardProps<Row, Key extends NumericKey<Row>> {
52
52
  numberStyle?: AnimatedNumberVariant;
53
53
  palette?: ChartPalette;
54
54
  loading?: boolean;
55
+ loadingStyle?: ChartLoadingStyle;
55
56
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
56
57
  motion?: ChartMotion;
57
58
  className?: string;
@@ -61,4 +62,4 @@ export interface HorizontalBarChartCardProps<Row, Key extends NumericKey<Row>> {
61
62
  * A ranked list card: each row carries a bar, its value, and its share of the total. Hovering a
62
63
  * row reads it in the headline; click pins it and the arrow keys move through the list.
63
64
  */
64
- export declare function HorizontalBarChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, value, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, sort, limit, otherLabel, share, rank, depth, barStyle, valueFormat, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, loading, motion: motionMode, className, style, }: HorizontalBarChartCardProps<Row, Key>): ReactElement;
65
+ export declare function HorizontalBarChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, value, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, sort, limit, otherLabel, share, rank, depth, barStyle, valueFormat, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, loading, loadingStyle, motion: motionMode, className, style, }: HorizontalBarChartCardProps<Row, Key>): ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
2
  import { AnimatedNumberVariant } from '../motion/animated-number';
3
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
3
+ import { ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
4
4
  export interface ProgressRange {
5
5
  id: string;
6
6
  label: string;
@@ -49,6 +49,7 @@ export interface ProgressCardProps {
49
49
  numberStyle?: AnimatedNumberVariant;
50
50
  palette?: ChartPalette;
51
51
  loading?: boolean;
52
+ loadingStyle?: ChartLoadingStyle;
52
53
  motion?: ChartMotion;
53
54
  className?: string;
54
55
  style?: CSSProperties | ChartStyle;
@@ -57,4 +58,4 @@ export interface ProgressCardProps {
57
58
  * One value against a goal: the value in the header, and a large ring or gauge with the
58
59
  * percentage reached. Past the goal the ring stays full and the percentage keeps counting.
59
60
  */
60
- export declare function ProgressCard({ title, value: suppliedValue, target: suppliedTarget, label, variant, depth, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, footer, valueFormat, locale, formatValue, color, surface, badge, numberStyle, palette, loading, motion: motionMode, className, style, }: ProgressCardProps): ReactElement;
61
+ export declare function ProgressCard({ title, value: suppliedValue, target: suppliedTarget, label, variant, depth, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, footer, valueFormat, locale, formatValue, color, surface, badge, numberStyle, palette, loading, loadingStyle, motion: motionMode, className, style, }: ProgressCardProps): ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface, CardLegend, ChartLegendSwatch } from '../types';
2
+ import { ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface, CardLegend, ChartLegendSwatch } from '../types';
3
3
  import { CardRange, CardSeries } from './cartesian-card';
4
4
  import { NumericKey, TextKey } from './keys';
5
5
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -51,6 +51,7 @@ export interface RadarChartCardProps<Row, Key extends NumericKey<Row>> {
51
51
  numberStyle?: AnimatedNumberVariant;
52
52
  palette?: ChartPalette;
53
53
  loading?: boolean;
54
+ loadingStyle?: ChartLoadingStyle;
54
55
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
55
56
  motion?: ChartMotion;
56
57
  className?: string;
@@ -96,5 +97,5 @@ export declare function profilePath(fractions: readonly (number | null)[], radiu
96
97
  * shape of strengths and gaps reads at a glance. Hovering or stepping around the spokes reads
97
98
  * every profile at that dimension.
98
99
  */
99
- export declare function RadarChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, series, domain: suppliedDomain, aggregate, grid, height, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, legend, legendSwatch, locale, formatValue: suppliedFormatValue, surface, badge, numberStyle, palette, loading, motion: motionMode, className, style, }: RadarChartCardProps<Row, Key>): ReactElement;
100
+ export declare function RadarChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, series, domain: suppliedDomain, aggregate, grid, height, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, legend, legendSwatch, locale, formatValue: suppliedFormatValue, surface, badge, numberStyle, palette, loading, loadingStyle, motion: motionMode, className, style, }: RadarChartCardProps<Row, Key>): ReactElement;
100
101
  export {};
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface, RankingOrder, CardLegend, ChartLegendSwatch } from '../types';
2
+ import { ChartMotion, ChartLoadingStyle, ChartPalette, ChartStyle, ChartSurface, RankingOrder, CardLegend, ChartLegendSwatch } from '../types';
3
3
  import { CardRange } from './cartesian-card';
4
4
  import { NumericKey, TextKey } from './keys';
5
5
  import { RankedRow } from './rank';
@@ -61,6 +61,8 @@ export interface RadialChartCardProps<Row, Key extends NumericKey<Row>> {
61
61
  numberStyle?: AnimatedNumberVariant;
62
62
  palette?: ChartPalette;
63
63
  loading?: boolean;
64
+ /** Shimmer (default), a clockwise draw, or a gentle pulse. Honors reduced motion. */
65
+ loadingStyle?: ChartLoadingStyle;
64
66
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
65
67
  motion?: ChartMotion;
66
68
  className?: string;
@@ -84,5 +86,5 @@ export declare function ringAngles(rows: readonly RankedRow[]): Slice[];
84
86
  * A donut or pie card: the headline total, slices with a matching legend, and each slice's
85
87
  * share. Hovering a slice or a legend row reads it in the headline.
86
88
  */
87
- export declare function RadialChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, value, variant, depth, legend, legendSwatch, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, limit, otherLabel, sort, valueFormat, locale, formatValue: suppliedFormatValue, surface, badge, numberStyle, palette, loading, motion: motionMode, className, style, }: RadialChartCardProps<Row, Key>): ReactElement;
89
+ export declare function RadialChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, value, variant, depth, legend, legendSwatch, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, limit, otherLabel, sort, valueFormat, locale, formatValue: suppliedFormatValue, surface, badge, numberStyle, palette, loading, loadingStyle, motion: motionMode, className, style, }: RadialChartCardProps<Row, Key>): ReactElement;
88
90
  export {};
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
2
  import { SankeyGraph, SankeyLink, SankeyNode } from '../engine/sankey';
3
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
3
+ import { ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
4
4
  import { CardRange } from './cartesian-card';
5
5
  import { NumericKey, TextKey } from './keys';
6
6
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -46,6 +46,7 @@ export interface SankeyChartCardProps<Row, Key extends NumericKey<Row>> {
46
46
  numberStyle?: AnimatedNumberVariant;
47
47
  palette?: ChartPalette;
48
48
  loading?: boolean;
49
+ loadingStyle?: ChartLoadingStyle;
49
50
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
50
51
  motion?: ChartMotion;
51
52
  className?: string;
@@ -70,5 +71,5 @@ export declare function sankeyGraph<Row>({ data, source, target, value, conserva
70
71
  * amount that moved. Hovering or stepping through flows with the arrow keys reads each in the
71
72
  * headline with its share of the step it left.
72
73
  */
73
- export declare function SankeyChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, source, target, value, conservation, depth, height, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, locale, formatValue: suppliedFormatValue, surface, badge, numberStyle, palette, loading, motion: motionMode, className, style, }: SankeyChartCardProps<Row, Key>): ReactElement;
74
+ export declare function SankeyChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, source, target, value, conservation, depth, height, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, locale, formatValue: suppliedFormatValue, surface, badge, numberStyle, palette, loading, loadingStyle, motion: motionMode, className, style, }: SankeyChartCardProps<Row, Key>): ReactElement;
74
75
  export {};
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface, CardLegend, ChartLegendSwatch } from '../types';
2
+ import { ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface, CardLegend, ChartLegendSwatch } from '../types';
3
3
  import { CardRange } from './cartesian-card';
4
4
  import { NumericKey, TextKey } from './keys';
5
5
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -65,6 +65,7 @@ export interface ScatterChartCardProps<Row, Key extends NumericKey<Row>> {
65
65
  numberStyle?: AnimatedNumberVariant;
66
66
  palette?: ChartPalette;
67
67
  loading?: boolean;
68
+ loadingStyle?: ChartLoadingStyle;
68
69
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
69
70
  motion?: ChartMotion;
70
71
  className?: string;
@@ -97,4 +98,4 @@ export declare function clipTrend(fit: {
97
98
  * and colored by group. Hovering or stepping through points with the arrow keys reads each one in
98
99
  * the headline, with its position marked on both axes.
99
100
  */
100
- export declare function ScatterChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, x, y, size, sizeLabel, group, label, xLabel, yLabel, trend, depth, height, aggregate, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, legend, legendSwatch, xFormat, locale, formatValue: suppliedFormatValue, formatX: suppliedFormatX, color, surface, badge, numberStyle, palette, loading, motion: motionMode, className, style, }: ScatterChartCardProps<Row, Key>): ReactElement;
101
+ export declare function ScatterChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, x, y, size, sizeLabel, group, label, xLabel, yLabel, trend, depth, height, aggregate, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, legend, legendSwatch, xFormat, locale, formatValue: suppliedFormatValue, formatX: suppliedFormatX, color, surface, badge, numberStyle, palette, loading, loadingStyle, motion: motionMode, className, style, }: ScatterChartCardProps<Row, Key>): ReactElement;
@@ -1,6 +1,6 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
2
  import { SlopeOrder } from '../engine/slope';
3
- import { ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
3
+ import { ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
4
4
  import { CardRange } from './cartesian-card';
5
5
  import { NumericKey, TextKey } from './keys';
6
6
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -64,6 +64,7 @@ export interface SlopeChartCardProps<Row, Key extends NumericKey<Row>> {
64
64
  numberStyle?: AnimatedNumberVariant;
65
65
  palette?: ChartPalette;
66
66
  loading?: boolean;
67
+ loadingStyle?: ChartLoadingStyle;
67
68
  /** `none` turns off decorative motion; reduced-motion users get this automatically. */
68
69
  motion?: ChartMotion;
69
70
  className?: string;
@@ -75,4 +76,4 @@ export interface SlopeChartCardProps<Row, Key extends NumericKey<Row>> {
75
76
  * category reads its later value and change in the headline; click pins it, and the arrow keys
76
77
  * move through categories.
77
78
  */
78
- export declare function SlopeChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, from, to, fromLabel, toLabel, variant, depth, sort, aggregate, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, color, height, valueFormat, locale, formatValue: suppliedFormatValue, surface, badge, numberStyle, palette, loading, motion: motionMode, className, style, }: SlopeChartCardProps<Row, Key>): ReactElement;
79
+ export declare function SlopeChartCard<Row, const Key extends NumericKey<Row>>({ title, data: suppliedData, category, from, to, fromLabel, toLabel, variant, depth, sort, aggregate, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, color, height, valueFormat, locale, formatValue: suppliedFormatValue, surface, badge, numberStyle, palette, loading, loadingStyle, motion: motionMode, className, style, }: SlopeChartCardProps<Row, Key>): ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import { ChartBarAppearance, ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
2
+ import { ChartBarAppearance, ChartLoadingStyle, ChartMotion, ChartPalette, ChartStyle, ChartSurface } from '../types';
3
3
  import { NumericKey, XKey, XKind } from './keys';
4
4
  import { CardAggregate } from './format';
5
5
  import { AnimatedNumberVariant } from '../motion/animated-number';
@@ -64,10 +64,11 @@ export interface StatCardProps<Row, Key extends NumericKey<Row>> {
64
64
  numberStyle?: AnimatedNumberVariant;
65
65
  palette?: ChartPalette;
66
66
  loading?: boolean;
67
+ loadingStyle?: ChartLoadingStyle;
67
68
  motion?: ChartMotion;
68
69
  className?: string;
69
70
  style?: CSSProperties | ChartStyle;
70
71
  }
71
72
  /** Cells of a meter: whole cells up to the value, then one cell trimmed to the exact remainder. */
72
73
  export declare function meterCells(ratio: number, count?: number): number[];
73
- export declare function StatCard<Row, const Key extends NumericKey<Row>>({ title, data, value: valueKey, x, xType, headline: suppliedHeadline, aggregate, delta, deltaTone, caption, chart, depth, barStyle, target, sync, height, color, aside, valueFormat, locale, formatValue: suppliedFormatValue, formatX, surface, badge, numberStyle, palette, loading, motion, className, style, }: StatCardProps<Row, Key>): ReactElement;
74
+ export declare function StatCard<Row, const Key extends NumericKey<Row>>({ title, data, value: valueKey, x, xType, headline: suppliedHeadline, aggregate, delta, deltaTone, caption, chart, depth, barStyle, target, sync, height, color, aside, valueFormat, locale, formatValue: suppliedFormatValue, formatX, surface, badge, numberStyle, palette, loading, motion, loadingStyle, className, style, }: StatCardProps<Row, Key>): ReactElement;
package/dist/chart.d.ts CHANGED
@@ -15,5 +15,5 @@ type ChartPlotRendererProps<T> = Omit<ChartProps<T>, 'className' | 'style'> & Om
15
15
  controllerLinked?: boolean;
16
16
  tooltipNode?: ReactNode;
17
17
  };
18
- export declare function ChartPlotRenderer<T>({ data, x, y, series, height, compactHeight, margins: marginProps, arrangement, marks, barLayout: barsProps, compact, tooltipNode, inspectionSeries: plotInspectionSeries, className, style, 'aria-label': ariaLabel, children, status, interactive, error, renderRetry, motion: motionPreference, animateIn, resetKey, onSelectionChange, controller, linkedSelection, selectedCategoryId, onSelectedCategoryIdChange, compare, focus, live, brush, visibleSeries, onVisibleSeriesChange, toolkit, model, controllerLinked, axis: axisProp, pill, pillSeries, pillValue, pillPosition, axisInset, runoff, labelOverhang, }: ChartPlotRendererProps<T>): ReactElement;
18
+ export declare function ChartPlotRenderer<T>({ data, x, y, series, height, compactHeight, margins: marginProps, arrangement, marks, barLayout: barsProps, compact, tooltipNode, inspectionSeries: plotInspectionSeries, className, style, 'aria-label': ariaLabel, children, status, loadingStyle, interactive, error, renderRetry, motion: motionPreference, animateIn, resetKey, onSelectionChange, controller, linkedSelection, selectedCategoryId, onSelectedCategoryIdChange, compare, focus, live, brush, visibleSeries, onVisibleSeriesChange, toolkit, model, controllerLinked, axis: axisProp, pill, pillSeries, pillValue, pillPosition, axisInset, runoff, labelOverhang, }: ChartPlotRendererProps<T>): ReactElement;
19
19
  export {};
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement } from 'react';
2
- import { ChartAxis, ChartBackground, ChartHoverStyle, ChartMotion, ChartStyle, ChartSurface } from '../../types';
2
+ import { ChartAxis, ChartBackground, ChartHoverStyle, ChartLoadingStyle, ChartMotion, ChartStyle, ChartSurface } from '../../types';
3
3
  import { AnimatedNumberVariant } from '../../motion/animated-number';
4
4
  import { BookLevel } from '../indicators';
5
5
  export interface DepthChartCardProps {
@@ -23,6 +23,7 @@ export interface DepthChartCardProps {
23
23
  surface?: ChartSurface;
24
24
  numberStyle?: AnimatedNumberVariant;
25
25
  loading?: boolean;
26
+ loadingStyle?: ChartLoadingStyle;
26
27
  motion?: ChartMotion;
27
28
  className?: string;
28
29
  style?: CSSProperties | ChartStyle;
@@ -31,4 +32,4 @@ export interface DepthChartCardProps {
31
32
  * Order book depth: how much could trade at each price, buying and selling, as stepped areas, with
32
33
  * the mid, spread and total depth in the header. Hover reads the size resting at each price.
33
34
  */
34
- export declare function DepthChartCard({ title, bids, asks, valueFormat, sizeFormat, locale, height, axis, background, hoverStyle, surface, numberStyle, loading, motion, className, style, depth, }: DepthChartCardProps): ReactElement;
35
+ export declare function DepthChartCard({ title, bids, asks, valueFormat, sizeFormat, locale, height, axis, background, hoverStyle, surface, numberStyle, loading, loadingStyle, motion, className, style, depth, }: DepthChartCardProps): ReactElement;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement } from 'react';
2
- import { ChartMotion, ChartStyle, ChartSurface } from '../types';
2
+ import { ChartLoadingStyle, ChartMotion, ChartStyle, ChartSurface } from '../types';
3
3
  import { BookLevel } from './indicators';
4
4
  export interface OrderBookProps {
5
5
  title: string;
@@ -17,6 +17,8 @@ export interface OrderBookProps {
17
17
  /** Briefly highlight levels whose size changed. Defaults to true; reduced motion turns it off. */
18
18
  flash?: boolean;
19
19
  surface?: ChartSurface;
20
+ loading?: boolean;
21
+ loadingStyle?: ChartLoadingStyle;
20
22
  motion?: ChartMotion;
21
23
  className?: string;
22
24
  style?: CSSProperties | ChartStyle;
@@ -25,4 +27,4 @@ export interface OrderBookProps {
25
27
  * A price ladder: asks above, bids below, a spread row between, and a depth bar behind each
26
28
  * level sized by its running total. It is a real table, so screen readers read it row by row.
27
29
  */
28
- export declare function OrderBook({ title, bids, asks, levels, depth, valueFormat, sizeFormat, locale, flash, surface, motion, className, style, }: OrderBookProps): ReactElement;
30
+ export declare function OrderBook({ title, bids, asks, levels, depth, valueFormat, sizeFormat, locale, flash, surface, loading, loadingStyle, motion, className, style, }: OrderBookProps): ReactElement;