@fundar/data-chart-telling 1.18.0 → 1.20.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 +53 -0
- package/README.md +2 -1
- package/dist/configuration/config.svelte.js +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/layout/coordinates/CoordinatesLayout.svelte +3 -1
- package/dist/layout/facet/FacetLayout.svelte +54 -41
- package/dist/layout/geometry/GeometryLayout.svelte +57 -22
- package/dist/layout/geometry/ScaleFreeContext.d.ts +31 -0
- package/dist/layout/geometry/ScaleFreeContext.js +65 -0
- package/dist/layout/geometry/ScaleFreeMarks.svelte +14 -0
- package/dist/layout/geometry/ScaleFreeMarks.svelte.d.ts +7 -0
- package/dist/layout/geometry/ScaleGate.svelte.d.ts +8 -0
- package/dist/layout/geometry/ScaleGate.svelte.js +95 -0
- package/dist/layout/geometry/ScaleGateMarks.svelte +15 -0
- package/dist/layout/geometry/ScaleGateMarks.svelte.d.ts +7 -0
- package/dist/layout/hover/HoverShapes.d.ts +20 -8
- package/dist/layout/hover/HoverShapes.js +119 -59
- package/dist/layout/legend/ContinuousSection.svelte +10 -0
- package/dist/layout/legend/LegendState.svelte.d.ts +13 -1
- package/dist/layout/legend/LegendState.svelte.js +32 -0
- package/dist/layout/margins/Box.d.ts +4 -0
- package/dist/layout/margins/Box.js +14 -0
- package/dist/layout/margins/PlotMargins.svelte.js +26 -1
- package/dist/layout/plot/{Plot.svelte → AbstractPlot.svelte} +83 -6
- package/dist/layout/plot/{Plot.svelte.d.ts → AbstractPlot.svelte.d.ts} +4 -4
- package/dist/layout/plot/PublicPlotContext.d.ts +5 -0
- package/dist/layout/plot/PublicPlotContext.js +7 -0
- package/dist/layout/styles/ValueLabels.d.ts +109 -58
- package/dist/layout/styles/ValueLabels.js +299 -141
- package/dist/markers/MarkerKinds.d.ts +79 -1
- package/dist/markers/MarkerKinds.js +149 -23
- package/dist/markers/area/AreaMarker.svelte +1 -1
- package/dist/markers/band/BandMarker.svelte +2 -1
- package/dist/markers/bar/BarMarker.svelte +8 -6
- package/dist/markers/bollinger/BollingerMarker.svelte +1 -1
- package/dist/markers/box/BoxMarker.svelte +1 -1
- package/dist/markers/dot/DotRadius.d.ts +11 -0
- package/dist/markers/dot/DotRadius.js +21 -0
- package/dist/markers/geo/GeoHoverMarker.svelte +14 -11
- package/dist/markers/labels/CurveLabel.svelte +56 -0
- package/dist/markers/labels/CurveLabel.svelte.d.ts +9 -0
- package/dist/markers/labels/LabelMerge.d.ts +11 -0
- package/dist/markers/labels/LabelMerge.js +87 -0
- package/dist/markers/labels/MarkerLabel.svelte +36 -0
- package/dist/markers/labels/MarkerLabel.svelte.d.ts +10 -0
- package/dist/markers/labels/MarkerLabels.d.ts +52 -0
- package/dist/markers/labels/MarkerLabels.js +97 -0
- package/dist/markers/labels/geometry/BoxGeometry.d.ts +8 -0
- package/dist/markers/labels/geometry/BoxGeometry.js +101 -0
- package/dist/markers/labels/geometry/CurveGeometry.d.ts +34 -0
- package/dist/markers/labels/geometry/CurveGeometry.js +193 -0
- package/dist/markers/labels/geometry/PointGeometry.d.ts +9 -0
- package/dist/markers/labels/geometry/PointGeometry.js +22 -0
- package/dist/markers/labels/layouts/BoxLayout.d.ts +10 -0
- package/dist/markers/labels/layouts/BoxLayout.js +49 -0
- package/dist/markers/labels/layouts/PathLayout.d.ts +11 -0
- package/dist/markers/labels/layouts/PathLayout.js +91 -0
- package/dist/markers/labels/layouts/PointLayout.d.ts +19 -0
- package/dist/markers/labels/layouts/PointLayout.js +94 -0
- package/dist/markers/regression/RegressionMarker.svelte +1 -1
- package/dist/markers/text/Covering.d.ts +13 -0
- package/dist/markers/text/Covering.js +29 -0
- package/dist/markers/text/Declutter.d.ts +24 -3
- package/dist/markers/text/Declutter.js +46 -3
- package/dist/markers/text/TextMarker.svelte +90 -17
- package/dist/markers/text/TextMarker.svelte.d.ts +1 -1
- package/dist/markers/tick/TickMarker.svelte +1 -1
- package/dist/markers/utils/MarkerChannels.d.ts +1 -1
- package/dist/markers/utils/MarkerChannels.js +3 -2
- package/dist/markers/violin/ViolinMarker.svelte +1 -1
- package/dist/markers/waffle/WaffleMarker.svelte +1 -1
- package/dist/phases/context/RowContext.d.ts +2 -0
- package/dist/phases/context/RowContext.js +4 -2
- package/dist/phases/context/rowContextKey.d.ts +2 -0
- package/dist/phases/context/rowContextKey.js +2 -0
- package/dist/phases/markers/MarkerStyles.js +14 -11
- package/dist/phases/markers/MarkersPhase.d.ts +2 -3
- package/dist/phases/markers/MarkersPhase.js +17 -11
- package/dist/phases/sharedScales/SharedStepScales.d.ts +10 -0
- package/dist/phases/sharedScales/SharedStepScales.js +43 -0
- package/dist/phases/statistics/MarkerGrouping.js +5 -32
- package/dist/phases/statistics/MarkerInheritance.d.ts +11 -0
- package/dist/phases/statistics/MarkerInheritance.js +25 -0
- package/dist/phases/statistics/MarkerOrientation.d.ts +26 -0
- package/dist/phases/statistics/MarkerOrientation.js +29 -0
- package/dist/phases/statistics/StatisticsPhase.js +15 -15
- package/dist/phases/transforms/TransformsPhase.js +5 -3
- package/dist/plots/correlation/heatmap/Plot.svelte +2 -2
- package/dist/plots/correlation/heatmap/Plot.svelte.d.ts +0 -1
- package/dist/plots/correlation/heatmap/defaults.js +14 -1
- package/dist/plots/correlation/heatmap/markers.d.ts +0 -6
- package/dist/plots/correlation/heatmap/markers.js +5 -9
- package/dist/plots/correlation/scatter/Plot.svelte +2 -2
- package/dist/plots/correlation/scatter/Plot.svelte.d.ts +0 -1
- package/dist/plots/correlation/scatter/defaults.js +9 -3
- package/dist/plots/correlation/scatter/markers.d.ts +0 -9
- package/dist/plots/correlation/scatter/markers.js +21 -28
- package/dist/plots/distribution/box/BoxSummaries.d.ts +5 -0
- package/dist/plots/distribution/box/BoxSummaries.js +9 -0
- package/dist/plots/distribution/box/Plot.svelte +2 -2
- package/dist/plots/distribution/box/Plot.svelte.d.ts +0 -1
- package/dist/plots/distribution/box/defaults.js +11 -0
- package/dist/plots/distribution/box/markers.js +10 -1
- package/dist/plots/distribution/density/Plot.svelte +2 -2
- package/dist/plots/distribution/density/Plot.svelte.d.ts +0 -1
- package/dist/plots/distribution/density/defaults.js +16 -0
- package/dist/plots/distribution/density/markers.js +5 -1
- package/dist/plots/distribution/histogram/Plot.svelte +2 -2
- package/dist/plots/distribution/histogram/Plot.svelte.d.ts +0 -1
- package/dist/plots/distribution/histogram/defaults.js +16 -11
- package/dist/plots/distribution/histogram/markers.js +3 -3
- package/dist/plots/distribution/pyramid/Plot.svelte +2 -2
- package/dist/plots/distribution/pyramid/Plot.svelte.d.ts +0 -1
- package/dist/plots/distribution/pyramid/defaults.js +9 -2
- package/dist/plots/distribution/pyramid/markers.d.ts +0 -8
- package/dist/plots/distribution/pyramid/markers.js +6 -16
- package/dist/plots/distribution/violin/Plot.svelte +2 -2
- package/dist/plots/distribution/violin/Plot.svelte.d.ts +0 -1
- package/dist/plots/distribution/violin/defaults.js +11 -0
- package/dist/plots/distribution/violin/markers.js +27 -3
- package/dist/plots/evolution/area/Plot.svelte +2 -2
- package/dist/plots/evolution/area/Plot.svelte.d.ts +0 -1
- package/dist/plots/evolution/area/defaults.js +4 -7
- package/dist/plots/evolution/area/markers.js +3 -1
- package/dist/plots/evolution/line/Plot.svelte +2 -2
- package/dist/plots/evolution/line/Plot.svelte.d.ts +0 -1
- package/dist/plots/evolution/line/defaults.js +4 -6
- package/dist/plots/evolution/line/markers.js +3 -1
- package/dist/plots/evolution/slope/Plot.svelte +2 -2
- package/dist/plots/evolution/slope/Plot.svelte.d.ts +0 -1
- package/dist/plots/evolution/slope/defaults.js +4 -3
- package/dist/plots/evolution/slope/markers.d.ts +4 -3
- package/dist/plots/evolution/slope/markers.js +16 -9
- package/dist/plots/evolution/sparkline/Plot.svelte +2 -2
- package/dist/plots/evolution/sparkline/Plot.svelte.d.ts +0 -1
- package/dist/plots/evolution/sparkline/defaults.js +1 -1
- package/dist/plots/evolution/sparkline/markers.js +3 -1
- package/dist/plots/generic/Plot.svelte +42 -0
- package/dist/plots/generic/Plot.svelte.d.ts +25 -0
- package/dist/plots/generic/defaults.d.ts +4 -0
- package/dist/plots/generic/defaults.js +7 -0
- package/dist/plots/map/geo/Core.svelte +29 -6
- package/dist/plots/map/geo/Plot.svelte +40 -12
- package/dist/plots/map/geo/Plot.svelte.d.ts +0 -1
- package/dist/plots/map/geo/phases/data.d.ts +2 -1
- package/dist/plots/map/geo/phases/data.js +8 -2
- package/dist/plots/map/geo/phases/scales.js +6 -2
- package/dist/plots/map/geo/slices.d.ts +27 -3
- package/dist/plots/map/geo/slices.js +58 -5
- package/dist/plots/part-of-a-whole/treemap/Plot.svelte +2 -2
- package/dist/plots/part-of-a-whole/treemap/Plot.svelte.d.ts +0 -1
- package/dist/plots/part-of-a-whole/treemap/defaults.js +2 -2
- package/dist/plots/ranking/bar/Plot.svelte +2 -2
- package/dist/plots/ranking/bar/Plot.svelte.d.ts +0 -1
- package/dist/plots/ranking/bar/defaults.js +13 -3
- package/dist/plots/ranking/bar/markers.js +12 -29
- package/dist/plots/ranking/bullet/Plot.svelte +2 -2
- package/dist/plots/ranking/bullet/Plot.svelte.d.ts +0 -1
- package/dist/plots/ranking/bullet/defaults.js +20 -0
- package/dist/plots/ranking/bullet/markers.js +7 -1
- package/dist/plots/ranking/cleveland/ClevelandMarkers.d.ts +2 -9
- package/dist/plots/ranking/cleveland/ClevelandMarkers.js +65 -47
- package/dist/plots/ranking/cleveland/Plot.svelte +2 -2
- package/dist/plots/ranking/cleveland/Plot.svelte.d.ts +0 -1
- package/dist/plots/ranking/cleveland/defaults.js +33 -2
- package/dist/plots/ranking/dumbbell/Plot.svelte +2 -2
- package/dist/plots/ranking/dumbbell/Plot.svelte.d.ts +0 -1
- package/dist/plots/ranking/forest/Plot.svelte +2 -2
- package/dist/plots/ranking/forest/Plot.svelte.d.ts +0 -1
- package/dist/plots/ranking/lollipop/Plot.svelte +2 -2
- package/dist/plots/ranking/lollipop/Plot.svelte.d.ts +0 -1
- package/dist/types/layout/context.d.ts +2 -0
- package/dist/types/layout/plot.d.ts +2 -0
- package/dist/types/layout/styles/bullet.d.ts +4 -1
- package/dist/types/layout/styles/geo.d.ts +3 -3
- package/dist/types/layout/styles/values.d.ts +51 -11
- package/dist/types/markers/axis/area.d.ts +5 -1
- package/dist/types/markers/axis/bar.d.ts +5 -2
- package/dist/types/markers/axis/bollinger.d.ts +2 -1
- package/dist/types/markers/axis/box.d.ts +2 -1
- package/dist/types/markers/axis/cell.d.ts +4 -1
- package/dist/types/markers/axis/line.d.ts +4 -1
- package/dist/types/markers/axis/rect.d.ts +4 -1
- package/dist/types/markers/axis/regression.d.ts +2 -1
- package/dist/types/markers/axis/tick.d.ts +2 -1
- package/dist/types/markers/axis/trail.d.ts +4 -1
- package/dist/types/markers/axis/violin.d.ts +2 -1
- package/dist/types/markers/axis/waffle.d.ts +5 -1
- package/dist/types/markers/basic/dot.d.ts +4 -1
- package/dist/types/markers/basic/text.d.ts +25 -21
- package/dist/types/markers/channels/commonMarkerConfigWithLabel.d.ts +5 -9
- package/dist/types/markers/channels/commonMarkerConfigWithOrientation.d.ts +5 -0
- package/dist/types/markers/channels/commonMarkerConfigWithOrientation.js +1 -0
- package/dist/types/markers/labels/box.d.ts +57 -0
- package/dist/types/markers/labels/box.js +1 -0
- package/dist/types/markers/labels/common.d.ts +15 -0
- package/dist/types/markers/labels/common.js +1 -0
- package/dist/types/markers/labels/path.d.ts +52 -0
- package/dist/types/markers/labels/path.js +1 -0
- package/dist/types/markers/labels/point.d.ts +40 -0
- package/dist/types/markers/labels/point.js +1 -0
- package/dist/types/markers/traits.d.ts +10 -0
- package/dist/types/phases/markers/phase.d.ts +1 -8
- package/dist/types/phases/statistics/phase.d.ts +8 -3
- package/dist/types/phases/styles/phase.d.ts +15 -3
- package/dist/types/phases/transforms/phase.d.ts +2 -0
- package/dist/types/plots/constants.d.ts +0 -12
- package/dist/types/plots/correlation/heatmap/props.d.ts +3 -2
- package/dist/types/plots/correlation/scatter/props.d.ts +3 -2
- package/dist/types/plots/data/geo.d.ts +19 -5
- package/dist/types/plots/distribution/box/props.d.ts +6 -2
- package/dist/types/plots/distribution/density/props.d.ts +2 -1
- package/dist/types/plots/distribution/histogram/props.d.ts +3 -2
- package/dist/types/plots/distribution/pyramid/props.d.ts +3 -2
- package/dist/types/plots/distribution/violin/props.d.ts +4 -1
- package/dist/types/plots/evolution/area/props.d.ts +3 -2
- package/dist/types/plots/evolution/line/props.d.ts +3 -2
- package/dist/types/plots/generic/props.d.ts +16 -0
- package/dist/types/plots/generic/props.js +1 -0
- package/dist/types/plots/generic/state.d.ts +4 -0
- package/dist/types/plots/generic/state.js +1 -0
- package/dist/types/plots/map/geo/props.d.ts +9 -3
- package/dist/types/plots/map/geo/state.d.ts +3 -1
- package/dist/types/plots/part-of-a-whole/treemap/props.d.ts +4 -2
- package/dist/types/plots/ranking/bar/props.d.ts +3 -2
- package/dist/types/plots/ranking/cleveland/props.d.ts +3 -2
- package/dist/types/plots/ranking/dumbbell/props.d.ts +3 -2
- package/dist/types/plots/ranking/forest/props.d.ts +5 -2
- package/dist/types/plots/ranking/lollipop/props.d.ts +3 -2
- package/dist/utils/ConfigEquality.d.ts +11 -0
- package/dist/utils/ConfigEquality.js +37 -0
- package/docs/architecture.md +9 -9
- package/docs/facets.md +12 -0
- package/docs/geo.md +35 -7
- package/docs/legend.md +6 -0
- package/docs/markers.md +2 -4
- package/docs/plots/ranking/bar.md +1 -1
- package/docs/plots/ranking/cleveland.md +1 -1
- package/docs/state.md +1 -1
- package/docs/styles-and-segments.md +1 -14
- package/docs/timeline.md +1 -1
- package/docs/transforms-and-statistics.md +1 -1
- package/docs/value-labels.md +159 -0
- package/examples/BarValues.svelte +1 -1
- package/llms-full.txt +5 -5
- package/llms.txt +1 -0
- package/package.json +3 -1
- package/dist/markers/utils/BoxLabel.d.ts +0 -58
- package/dist/markers/utils/BoxLabel.js +0 -175
- package/dist/markers/utils/MarkerLabel.svelte +0 -33
- package/dist/markers/utils/MarkerLabel.svelte.d.ts +0 -10
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { LabelBaseConfig } from './common';
|
|
2
|
+
import type { ValueSelect } from '../../layout/styles';
|
|
3
|
+
import type { LabelAnchor } from '../../plots/constants';
|
|
4
|
+
import type { BoxScales, BoxSizer } from './box';
|
|
5
|
+
/** A label written beside a point of its shape, spread apart from the others with `declutter`. */
|
|
6
|
+
export type PointLabelConfig = LabelBaseConfig & {
|
|
7
|
+
layout?: 'point';
|
|
8
|
+
/** The rows labelled, of each `grouping` of the marker. Every row by default. */
|
|
9
|
+
select?: ValueSelect | ValueSelect[] | ((row: any) => boolean);
|
|
10
|
+
/** On a shape with a box (a bar, a cell): the point of its box the label starts at, `'middle'` by default. */
|
|
11
|
+
anchor?: LabelAnchor;
|
|
12
|
+
/** Which side of its point the text is written on, as it reads: after it (to its right), before it, above, below or on it. */
|
|
13
|
+
side?: PointSide;
|
|
14
|
+
/** The gap from its point. Defaults to the configuration's `text.label.gap` on a box, else 6px across and 8px up or down. */
|
|
15
|
+
gap?: number;
|
|
16
|
+
};
|
|
17
|
+
export type PointSide = 'after' | 'before' | 'above' | 'below' | 'on';
|
|
18
|
+
/**
|
|
19
|
+
* `'row'` labels each row at its `x`/`y`; `'top'` at its `x`/`y2` (a stacked area); `'box'` at a point of its box;
|
|
20
|
+
* `'dot'` at its center, in a round shape of its radius.
|
|
21
|
+
*/
|
|
22
|
+
export type PointShape = 'row' | 'top' | 'box' | 'dot';
|
|
23
|
+
/** Where a marker's rows are labelled; `size` is the shape around each point, when it has one, `round` a circle in it. */
|
|
24
|
+
export type PointGeometryOf = {
|
|
25
|
+
x: unknown;
|
|
26
|
+
y: unknown;
|
|
27
|
+
size?: BoxSizer;
|
|
28
|
+
round?: boolean;
|
|
29
|
+
/** How far each row's point sits off its `x`/`y`, in pixels: a series' own slot of its category's band. */
|
|
30
|
+
shift?: (row: unknown, scales: BoxScales) => {
|
|
31
|
+
dx: number;
|
|
32
|
+
dy: number;
|
|
33
|
+
} | undefined;
|
|
34
|
+
};
|
|
35
|
+
/** The shape a row's point sits in, in pixels around it: a box, or the circle in it. */
|
|
36
|
+
export type CoveringShape = {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
round?: boolean;
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import type { ChannelName } from '../layout/mapping';
|
|
1
2
|
import type { LegendMark } from '../layout/legend';
|
|
3
|
+
import type { MarkerLabelTraits } from './labels/common';
|
|
4
|
+
/** A plot channel a marker can take from its plot; `x`/`y` are each taken only by a marker setting no position on that axis. */
|
|
5
|
+
export type InheritedChannel = Exclude<ChannelName, 'value'>;
|
|
2
6
|
/** What the rest of the system needs to know about a marker kind, declared once per kind in `MarkerKinds`. */
|
|
3
7
|
export type MarkerTraits = {
|
|
4
8
|
/**
|
|
@@ -19,4 +23,10 @@ export type MarkerTraits = {
|
|
|
19
23
|
* dot, an area, a bar... A marker without one shows as a plain swatch.
|
|
20
24
|
*/
|
|
21
25
|
legendSymbol?: LegendMark;
|
|
26
|
+
/** The plot's channels the marker takes in place of those it leaves unset, with the plot's scales for those that have one. */
|
|
27
|
+
inherits?: InheritedChannel[];
|
|
28
|
+
/** Whether it runs one way or the other (svelteplot's `*X`/`*Y` pair): the plot's way, else its own channels'. */
|
|
29
|
+
oriented?: boolean;
|
|
30
|
+
/** The labels the marker can write over its shapes; none without it. */
|
|
31
|
+
labels?: MarkerLabelTraits;
|
|
22
32
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { AxisBasedMarkersConfig, TextMarkerConfig } from '../../markers/common';
|
|
1
|
+
import type { AxisBasedMarkersConfig } from '../../markers/common';
|
|
3
2
|
/** What a plot kind adds to the shared "markers" stage. */
|
|
4
3
|
export type MarkersStageOptions<TState, TEnv> = {
|
|
5
4
|
/** The plot's own marks - its bars, lines, dots... - drawn under every other marker. */
|
|
6
5
|
marks: (state: TState, env: TEnv) => AxisBasedMarkersConfig[];
|
|
7
|
-
/**
|
|
8
|
-
* Its value labels, once they show: `text` markers drawn over everything.
|
|
9
|
-
* The stage adds what every label shares - see {@link ValueLabels.hooks}.
|
|
10
|
-
* Without it, the plot draws none.
|
|
11
|
-
*/
|
|
12
|
-
valueLabels?: (labels: ValueLabels, state: TState, env: TEnv) => TextMarkerConfig[];
|
|
13
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ScopedMarkerGroup } from '../../layout/geometry';
|
|
2
2
|
import type { Accessor, Series } from '../../plots/data/common';
|
|
3
|
-
import type { AxisValue } from '../../layout/mapping';
|
|
3
|
+
import type { AxisChannelName, AxisValue } from '../../layout/mapping';
|
|
4
4
|
import type { StatisticConfig } from '../../layout/statistics';
|
|
5
5
|
import type { AxisBasedMarkersConfig } from '../../markers/common';
|
|
6
6
|
import type { ProcessedData, TransformsStageState } from '../transforms/phase';
|
|
@@ -16,10 +16,17 @@ export type StatisticsStageState = Pick<FacetStageState, 'panels'> & {
|
|
|
16
16
|
/** The key the "data" phase split the rows into series by, which an author marker inherits. */
|
|
17
17
|
seriesGrouping?: Accessor<any, unknown>;
|
|
18
18
|
color?: Accessor<any, unknown>;
|
|
19
|
+
opacity?: Accessor<any, unknown>;
|
|
20
|
+
symbol?: Accessor<any, unknown>;
|
|
21
|
+
r?: number | Accessor<any, number>;
|
|
22
|
+
length?: number | Accessor<any, number>;
|
|
19
23
|
statistics?: StatisticConfig[];
|
|
20
24
|
authorMarkers?: AxisBasedMarkersConfig[];
|
|
21
25
|
resolvedSeries?: Series<any>[];
|
|
22
26
|
axes?: PlotAxes;
|
|
27
|
+
scales?: Partial<Record<AxisChannelName, {
|
|
28
|
+
type?: string;
|
|
29
|
+
}>>;
|
|
23
30
|
flat?: any[];
|
|
24
31
|
colorForSeries?: (name: string) => string;
|
|
25
32
|
/** Each series' segments, which a `scope: 'segment'` author marker splits by. */
|
|
@@ -39,6 +46,4 @@ export type StatisticsStageOptions<TState extends StatisticsStageState> = {
|
|
|
39
46
|
* default; off for a plot whose `color` is a value channel, not a group.
|
|
40
47
|
*/
|
|
41
48
|
inheritGrouping?: boolean;
|
|
42
|
-
/** Whether a line/area/dot author marker with no `x`/`y` takes the plot's own. */
|
|
43
|
-
inheritPositions?: boolean;
|
|
44
49
|
};
|
|
@@ -1,15 +1,27 @@
|
|
|
1
1
|
import type { PlotRowContext } from '../../layout/context';
|
|
2
2
|
import type { EdgeBox } from '../../layout/box';
|
|
3
3
|
import type { ValueLabels } from '../../../layout/styles/ValueLabels';
|
|
4
|
-
import type {
|
|
4
|
+
import type { LabelLayout } from '../../markers/labels/common';
|
|
5
5
|
/** A plot kind's own defaults for its value labels, under the author's `styles.values`. */
|
|
6
6
|
export type ValueLabelsOptions<TState> = {
|
|
7
7
|
/** Whether the labels draw when `styles.values.show` is unset. Defaults to `false`. */
|
|
8
8
|
show?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/** The layout the labels take when `styles.values.layout` is unset. Defaults to `'point'`. */
|
|
10
|
+
layout?: LabelLayout | ((state: TState) => LabelLayout);
|
|
11
|
+
/** The kind's own options for each layout it takes, under the author's: a bar's `path` at its `tip`, say. */
|
|
12
|
+
/**
|
|
13
|
+
* On a kind whose rows have several values, the parts it can label: each one's own placement, over the layout's,
|
|
14
|
+
* and those it labels when `styles.values.parts` is unset.
|
|
15
|
+
*/
|
|
16
|
+
parts?: {
|
|
17
|
+
placements: Record<string, Record<string, unknown>> | ((state: TState) => Record<string, Record<string, unknown>>);
|
|
18
|
+
default: string[];
|
|
19
|
+
};
|
|
20
|
+
layouts?: Partial<Record<LabelLayout, Record<string, unknown>>> | ((state: TState) => Partial<Record<LabelLayout, Record<string, unknown>>>);
|
|
11
21
|
/** A label's text when `styles.values.format` is unset. Defaults to the bare value. `number` writes a value as the plot's `styles.values` display fields (`decimals`, `prefix`, `suffix`, `signDisplay`) ask, and `context` is what the plot knows of the labelled row. */
|
|
12
22
|
format?: (value: number, number: (value: number) => string, context: PlotRowContext) => string;
|
|
23
|
+
/** `format`, chosen off the plot's state: a curve named when there are several, its peak's position when alone. */
|
|
24
|
+
formatFor?: (state: TState) => (value: number, number: (value: number) => string, context: PlotRowContext) => string;
|
|
13
25
|
/**
|
|
14
26
|
* Where the labels are expected to sit, from the whole data: boxes around
|
|
15
27
|
* the points they label, on the plot edges those points can reach (see
|
|
@@ -77,6 +77,8 @@ export type TransformsStageOptions<TState extends TransformsStageState, TEnv> =
|
|
|
77
77
|
show?: boolean;
|
|
78
78
|
/** The rows picked when `styles.values.select` is unset. Defaults to every row. */
|
|
79
79
|
select?: ValueSelect | ValueSelect[];
|
|
80
|
+
/** What `'min'` and `'max'` compare: the plot's value axis by default, or this (a heatmap's `color`). */
|
|
81
|
+
measure?: (state: TransformsStageState) => ((row: ProcessedRow) => unknown) | undefined;
|
|
80
82
|
/** What a selector picks among: each series (the default), or each category. */
|
|
81
83
|
group?: 'series' | 'category';
|
|
82
84
|
/** A test for the rows that cannot be labelled (a gap), read off the state once. */
|
|
@@ -3,18 +3,6 @@
|
|
|
3
3
|
* the page, or in one of its corners. The anchors of a text marker's `frameAnchor`, and of a shape's `label`.
|
|
4
4
|
*/
|
|
5
5
|
export type LabelAnchor = 'middle' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
6
|
-
/**
|
|
7
|
-
* Where a value label sits on its mark. Two vocabularies share the type, one per family of plots:
|
|
8
|
-
*
|
|
9
|
-
* - The plots that label a point or the end of a line (`LinePlot`, `AreaPlot`, `SlopePlot`, `ScatterPlot`...) read
|
|
10
|
-
* the side of the point its text is written on: `'start'` after it (right of a line's last point), `'end'` before
|
|
11
|
-
* it, `'middle'` on it and `'outside'` beyond it.
|
|
12
|
-
* - The plots that label a shape (`BarPlot`, `BulletPlot`, `PyramidPlot`, `HistogramPlot`) read where in it the
|
|
13
|
-
* label is. Inside the shape: a {@link LabelAnchor} - its `'middle'`, an edge as it is drawn on the page
|
|
14
|
-
* (`'top'`, `'left'`...) or a corner (`'top-left'`...) - or, whichever side of zero the value is, the end of the bar
|
|
15
|
-
* away from zero, `'tip'`, or the one at zero, `'base'`. Beyond the tip, outside the shape: `'outside'`.
|
|
16
|
-
*/
|
|
17
|
-
export type ValueAnchor = LabelAnchor | 'outside' | 'start' | 'end' | 'tip' | 'base';
|
|
18
6
|
/**
|
|
19
7
|
* Shared by two unrelated renderers: a `dot` mark's own point shape
|
|
20
8
|
* (delegated to svelteplot/d3-shape) and a discrete legend item's own icon
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, CellValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,6 +6,6 @@ import type { SeriesProps, DualAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { AxisBasedStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { CellSegmentStyle } from '../../segments/common';
|
|
7
8
|
/** `HeatmapPlot`'s public props. */
|
|
8
|
-
export type HeatmapPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, AxisBasedStylesConfig, CellSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
|
+
export type HeatmapPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, CellValueLabel>, CellSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
10
|
/** What `HeatmapPlot`'s core draws from. */
|
|
10
|
-
export type HeatmapPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, AxisBasedStylesConfig, CellSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
11
|
+
export type HeatmapPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, CellValueLabel>, CellSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, DotValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,6 +6,6 @@ import type { SeriesProps, DualAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { AxisBasedStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { ScatterSegmentStyle } from '../../segments/common';
|
|
7
8
|
/** `ScatterPlot`'s public props. */
|
|
8
|
-
export type ScatterPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, AxisBasedStylesConfig, ScatterSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
|
+
export type ScatterPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, DotValueLabel>, ScatterSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
10
|
/** What `ScatterPlot`'s core draws from. */
|
|
10
|
-
export type ScatterPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, AxisBasedStylesConfig, ScatterSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
11
|
+
export type ScatterPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, DotValueLabel>, ScatterSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TimeValue } from '../../layout/timeline';
|
|
2
2
|
/**
|
|
3
3
|
* One GeoJSON feature, generically typed over its `properties`. Intersected
|
|
4
4
|
* with `Record<string, unknown>` so it satisfies the same generic bound
|
|
@@ -7,6 +7,20 @@ import type { Accessor } from './common';
|
|
|
7
7
|
* index signature on its own.
|
|
8
8
|
*/
|
|
9
9
|
export type GeoFeature<TProps extends Record<string, unknown> = Record<string, unknown>> = GeoJSON.Feature<GeoJSON.Geometry, TProps> & Record<string, unknown>;
|
|
10
|
+
/**
|
|
11
|
+
* Which slice of a `timeline` and `facet` a feature is being read for: the callbacks of a sliced map get it as
|
|
12
|
+
* their last argument. Empty on a map without either.
|
|
13
|
+
*/
|
|
14
|
+
export type GeoSliceContext = {
|
|
15
|
+
/** The facet panel: its label (a grid's `row · col`), and the `rows` and `cols` values it sits at. */
|
|
16
|
+
facet?: {
|
|
17
|
+
value: string;
|
|
18
|
+
row?: string;
|
|
19
|
+
col?: string;
|
|
20
|
+
};
|
|
21
|
+
/** The timeline step. */
|
|
22
|
+
time?: TimeValue;
|
|
23
|
+
};
|
|
10
24
|
export type GeoJsonInput<TProps extends Record<string, unknown>> = GeoJSON.FeatureCollection<GeoJSON.Geometry, TProps> | GeoFeature<TProps>[];
|
|
11
25
|
/**
|
|
12
26
|
* Minimal structural shape of a TopoJSON `Topology` object. Deliberately not
|
|
@@ -46,14 +60,14 @@ export type GeoDataProps<TProps extends Record<string, unknown> = Record<string,
|
|
|
46
60
|
* (e.g. `segments.argentina`) and for hover/click identification. Defaults
|
|
47
61
|
* to `feature.id ?? feature.properties?.id ?? feature.properties?.name`.
|
|
48
62
|
*/
|
|
49
|
-
featureId?:
|
|
63
|
+
featureId?: keyof GeoFeature<TProps> | ((feature: GeoFeature<TProps>, slice: GeoSliceContext) => string);
|
|
50
64
|
/**
|
|
51
65
|
* Optional continuous color-value accessor for choropleth coloring - the
|
|
52
66
|
* channel driving the ramp (mirrors heatmap's `color`), configured via
|
|
53
67
|
* `scales.color`. A feature with no `color` (or when omitted entirely)
|
|
54
68
|
* falls back to `styles.fill`/`segments`.
|
|
55
69
|
*/
|
|
56
|
-
color?: (feature: GeoFeature<TProps
|
|
70
|
+
color?: (feature: GeoFeature<TProps>, slice: GeoSliceContext) => number | undefined;
|
|
57
71
|
/**
|
|
58
72
|
* Optional structural grouping key - splits features into named buckets
|
|
59
73
|
* for `segments` to address by name (e.g. `segments.global_south`),
|
|
@@ -64,9 +78,9 @@ export type GeoDataProps<TProps extends Record<string, unknown> = Record<string,
|
|
|
64
78
|
* ungrouped. A feature whose `grouping` value has no matching `segments`
|
|
65
79
|
* key simply falls through to `segments.default`/the plot-level ramp.
|
|
66
80
|
*/
|
|
67
|
-
grouping?: (feature: GeoFeature<TProps
|
|
81
|
+
grouping?: (feature: GeoFeature<TProps>, slice: GeoSliceContext) => string | undefined;
|
|
68
82
|
/** Continuous or categorical opacity-value accessor - configure the ramp via `scales.opacity`. */
|
|
69
|
-
opacity?: (feature: GeoFeature<TProps
|
|
83
|
+
opacity?: (feature: GeoFeature<TProps>, slice: GeoSliceContext) => number | undefined;
|
|
70
84
|
/**
|
|
71
85
|
* Excludes matching parts of a feature's geometry from the map's own
|
|
72
86
|
* rendering and hover/click matching - e.g. so a separate `inset` marker
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { WithValues } from '../../../layout/styles';
|
|
2
|
+
import type { PointLabelConfig } from '../../../markers/labels/point';
|
|
1
3
|
import type { KindRowContext } from '../../../layout/context';
|
|
2
4
|
import type { AxisValue } from '../../../layout/mapping';
|
|
3
5
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
@@ -26,7 +28,9 @@ export type BoxSummary = {
|
|
|
26
28
|
* hovered box's is its median.
|
|
27
29
|
*/
|
|
28
30
|
export type BoxRowContext = KindRowContext<BoxSummary>;
|
|
31
|
+
/** The values of a box its value labels can write: its quartiles, its whiskers' ends and the values past them. */
|
|
32
|
+
export type BoxValuePart = Exclude<keyof BoxSummary, 'category' | 'count'>;
|
|
29
33
|
/** `BoxPlot`'s public props. */
|
|
30
|
-
export type BoxPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, AxisBasedStylesConfig, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>, undefined, BoxRowContext>;
|
|
34
|
+
export type BoxPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, PointLabelConfig, BoxValuePart>, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>, undefined, BoxRowContext>;
|
|
31
35
|
/** What `BoxPlot`'s core draws from. */
|
|
32
|
-
export type BoxPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, AxisBasedStylesConfig, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
36
|
+
export type BoxPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, PointLabelConfig, BoxValuePart>, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AreaValueLabel, LineValueLabel, WithValues } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,7 +6,7 @@ import type { SeriesProps, SingleAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { CurveAwarePlotStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { AreaStyle } from '../../styling';
|
|
7
8
|
/** `styles` of `DensityPlot`: the curve of the estimate, and the mark that draws it. */
|
|
8
|
-
export type DensityPlotStylesConfig = CurveAwarePlotStylesConfig & {
|
|
9
|
+
export type DensityPlotStylesConfig = WithValues<CurveAwarePlotStylesConfig, AreaValueLabel | LineValueLabel> & {
|
|
9
10
|
/** The mark drawing each estimate: a filled `'area'` or a `'line'`. Defaults to `'area'`. */
|
|
10
11
|
mark?: 'area' | 'line';
|
|
11
12
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, CellValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { KindRowContext } from '../../../layout/context';
|
|
2
3
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
3
4
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
@@ -18,6 +19,6 @@ export type HistogramRowContext = KindRowContext<{
|
|
|
18
19
|
to: number;
|
|
19
20
|
}>;
|
|
20
21
|
/** `HistogramPlot`'s public props. */
|
|
21
|
-
export type HistogramPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | SingleAxisDataProps<TData>, TData, AxisBasedStylesConfig, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>, undefined, HistogramRowContext>;
|
|
22
|
+
export type HistogramPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | SingleAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, CellValueLabel>, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>, undefined, HistogramRowContext>;
|
|
22
23
|
/** What `HistogramPlot`'s core draws from. */
|
|
23
|
-
export type HistogramPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | SingleAxisDataProps<TData>, TData, AxisBasedStylesConfig, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
24
|
+
export type HistogramPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | SingleAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, CellValueLabel>, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, BarValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,6 +6,6 @@ import type { SeriesProps, DualAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { GapsAwarePlotStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { BarSegmentStyle } from '../../segments/common';
|
|
7
8
|
/** `PyramidPlot`'s public props. */
|
|
8
|
-
export type PyramidPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, GapsAwarePlotStylesConfig<BarSegmentStyle>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
|
+
export type PyramidPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<GapsAwarePlotStylesConfig<BarSegmentStyle>, BarValueLabel>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
10
|
/** What `PyramidPlot`'s core draws from. */
|
|
10
|
-
export type PyramidPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, GapsAwarePlotStylesConfig<BarSegmentStyle>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
11
|
+
export type PyramidPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<GapsAwarePlotStylesConfig<BarSegmentStyle>, BarValueLabel>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { WithValues } from '../../../layout/styles';
|
|
2
|
+
import type { PointLabelConfig } from '../../../markers/labels/point';
|
|
3
|
+
import type { BoxValuePart } from '../box/props';
|
|
1
4
|
import type { BoxRowContext } from '../box/props';
|
|
2
5
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
3
6
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
@@ -7,7 +10,7 @@ import type { AxisBasedStylesConfig } from '../../../layout/styles';
|
|
|
7
10
|
import type { AreaStyle } from '../../styling';
|
|
8
11
|
import type { DensityKernel } from '../../../transforms/density';
|
|
9
12
|
/** `styles` of `ViolinPlot`: how each category's density is estimated and drawn. */
|
|
10
|
-
export type ViolinPlotStylesConfig = AxisBasedStylesConfig & {
|
|
13
|
+
export type ViolinPlotStylesConfig = WithValues<AxisBasedStylesConfig, PointLabelConfig, BoxValuePart> & {
|
|
11
14
|
kernel?: DensityKernel;
|
|
12
15
|
/** Kernel bandwidth in data units; Silverman's rule picks one per violin when unset. */
|
|
13
16
|
bandwidth?: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, AreaValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,6 +6,6 @@ import type { SeriesProps, DualAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { AxisBasedStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { AreaStyle } from '../../styling';
|
|
7
8
|
/** `AreaPlot`'s public props. */
|
|
8
|
-
export type AreaPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, AxisBasedStylesConfig, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
|
+
export type AreaPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, AreaValueLabel>, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
10
|
/** What `AreaPlot`'s core draws from. */
|
|
10
|
-
export type AreaPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, AxisBasedStylesConfig, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
11
|
+
export type AreaPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<AxisBasedStylesConfig, AreaValueLabel>, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, LineValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,6 +6,6 @@ import type { SeriesProps, DualAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { CurveAwarePlotStylesConfig, GapsAwarePlotStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { LineSegmentStyle } from '../../segments/common';
|
|
7
8
|
/** `LinePlot`'s public props. */
|
|
8
|
-
export type LinePlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, GapsAwarePlotStylesConfig<LineSegmentStyle> & CurveAwarePlotStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
|
+
export type LinePlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<GapsAwarePlotStylesConfig<LineSegmentStyle> & CurveAwarePlotStylesConfig, LineValueLabel>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
10
|
/** What `LinePlot`'s core draws from. */
|
|
10
|
-
export type LinePlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, GapsAwarePlotStylesConfig<LineSegmentStyle> & CurveAwarePlotStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
11
|
+
export type LinePlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<GapsAwarePlotStylesConfig<LineSegmentStyle> & CurveAwarePlotStylesConfig, LineValueLabel>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BasePlotProps, PlotCoreProps } from '../props';
|
|
2
|
+
import type { AxisBasedScalesConfig } from '../../layout/scales';
|
|
3
|
+
import type { AxisBasedMarkersConfig } from '../../markers/common';
|
|
4
|
+
import type { ChannelAccessors } from '../../layout/mapping';
|
|
5
|
+
import type { Series } from '../data/common';
|
|
6
|
+
import type { AxisBasedStylesConfig } from '../../layout/styles';
|
|
7
|
+
import type { AreaStyle } from '../styling';
|
|
8
|
+
/** Rows, series or neither, and every channel optional: what markers without their own take. */
|
|
9
|
+
export type GenericDataProps<TData extends Record<string, unknown>> = {
|
|
10
|
+
data?: TData[];
|
|
11
|
+
series?: Series<TData>[];
|
|
12
|
+
} & ChannelAccessors<TData>;
|
|
13
|
+
/** `Plot`'s public props. */
|
|
14
|
+
export type GenericPlotProps<TData extends Record<string, unknown>> = BasePlotProps<GenericDataProps<TData>, TData, AxisBasedStylesConfig, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
15
|
+
/** What `Plot`'s core draws from. */
|
|
16
|
+
export type GenericPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<GenericDataProps<TData>, TData, AxisBasedStylesConfig, AreaStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
2
|
import type { GeoScalesConfig, CoordinatesConfig } from '../../../layout/coordinates';
|
|
3
|
-
import type { GeoFeature, GeoDataProps } from '../../data/geo';
|
|
3
|
+
import type { GeoFeature, GeoDataProps, GeoSliceContext } from '../../data/geo';
|
|
4
|
+
import type { PlotRowContext } from '../../../layout/context';
|
|
4
5
|
import type { GeoStylesConfig } from '../../../layout/styles';
|
|
5
6
|
import type { GeoSegmentStyle } from '../../segments/common';
|
|
6
7
|
import type { GeoMarkersConfig } from '../../../markers/geo';
|
|
@@ -14,10 +15,15 @@ type OmitEach<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never
|
|
|
14
15
|
* marker's own `data` rows; a feature or row without the field is context,
|
|
15
16
|
* drawn in every slice.
|
|
16
17
|
*/
|
|
17
|
-
export type GeoPlotProps<TProps extends Record<string, unknown>> = OmitEach<BasePlotProps<GeoDataProps<TProps>, GeoFeature<TProps>, GeoStylesConfig<TProps>, GeoSegmentStyle, GeoMarkersConfig, GeoScalesConfig, CoordinatesConfig>, 'timeline' | 'facet'> & {
|
|
18
|
+
export type GeoPlotProps<TProps extends Record<string, unknown>> = OmitEach<BasePlotProps<GeoDataProps<TProps>, GeoFeature<TProps>, GeoStylesConfig<TProps>, GeoSegmentStyle, GeoMarkersConfig, GeoScalesConfig, CoordinatesConfig, GeoTooltipContext>, 'timeline' | 'facet'> & {
|
|
18
19
|
timeline?: TimelineConfig<Record<string, unknown>>;
|
|
19
20
|
facet?: FacetConfig<Record<string, unknown>>;
|
|
20
21
|
};
|
|
22
|
+
/** What a tooltip's `format` knows of a hovered feature: the shared row context, and the slice it was drawn in. */
|
|
23
|
+
export type GeoTooltipContext = PlotRowContext & GeoSliceContext;
|
|
21
24
|
/** What `GeoPlot`'s core draws from. */
|
|
22
|
-
export type GeoPlotCoreProps<TProps extends Record<string, unknown>> = PlotCoreProps<GeoDataProps<TProps>, GeoFeature<TProps>, GeoStylesConfig<TProps>, GeoSegmentStyle, GeoMarkersConfig, GeoScalesConfig, CoordinatesConfig
|
|
25
|
+
export type GeoPlotCoreProps<TProps extends Record<string, unknown>> = PlotCoreProps<GeoDataProps<TProps>, GeoFeature<TProps>, GeoStylesConfig<TProps>, GeoSegmentStyle, GeoMarkersConfig, GeoScalesConfig, CoordinatesConfig> & {
|
|
26
|
+
/** The slice of the `timeline` and `facet` this core draws - what its callbacks read its features in. */
|
|
27
|
+
sliceContext?: GeoSliceContext;
|
|
28
|
+
};
|
|
23
29
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Accessor } from '../../data/common';
|
|
2
|
-
import type { GeoFeature } from '../../data/geo';
|
|
2
|
+
import type { GeoFeature, GeoSliceContext } from '../../data/geo';
|
|
3
3
|
import type { ColorScaleConfig } from '../../../layout/scales';
|
|
4
4
|
import type { GeoScalesConfig } from '../../../layout/coordinates';
|
|
5
5
|
import type { SegmentsConfig, MarginConfig, HoverConfig } from '../../props';
|
|
@@ -46,6 +46,8 @@ export type GeoPlotState<TProps extends Record<string, unknown>> = {
|
|
|
46
46
|
}, feature: TaggedGeoFeature<TProps>) => boolean;
|
|
47
47
|
segments: SegmentsConfig<GeoSegmentStyle>;
|
|
48
48
|
scales: GeoScalesConfig;
|
|
49
|
+
/** The slice of the `timeline` and `facet` this core draws, kept on each of its features for a tooltip's `format` to read. */
|
|
50
|
+
slice?: GeoSliceContext;
|
|
49
51
|
/** The plot's `tooltip`, which the "hover" phase reads. */
|
|
50
52
|
tooltip?: TooltipProp<TaggedGeoFeature<TProps>>;
|
|
51
53
|
/** The raw `markers` prop - GeoPlot interleaves it with the base map by draw order, not a plain append. */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { WithValues } from '../../../layout/styles';
|
|
2
|
+
import type { BoxLabelConfig } from '../../../markers/labels/box';
|
|
1
3
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
4
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
5
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -24,6 +26,6 @@ export type TreemapTooltipContext = TreemapRowContext;
|
|
|
24
26
|
* `TreemapPlot`'s public props: flat rows, a tile each, on no axes. `value` is a tile's area, and `grouping` what
|
|
25
27
|
* the tiles nest by (`'sector.branch'`, outermost first), whose outermost level colors them.
|
|
26
28
|
*/
|
|
27
|
-
export type TreemapPlotProps<TData extends Record<string, unknown>> = BasePlotProps<NonAxisDataProps<TData, 'value'>, TData, AxisBasedStylesConfig, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>, undefined, TreemapTooltipContext>;
|
|
29
|
+
export type TreemapPlotProps<TData extends Record<string, unknown>> = BasePlotProps<NonAxisDataProps<TData, 'value'>, TData, WithValues<AxisBasedStylesConfig, BoxLabelConfig>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>, undefined, TreemapTooltipContext>;
|
|
28
30
|
/** What `TreemapPlot`'s core draws from. */
|
|
29
|
-
export type TreemapPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<NonAxisDataProps<TData, 'value'>, TData, AxisBasedStylesConfig, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
31
|
+
export type TreemapPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<NonAxisDataProps<TData, 'value'>, TData, WithValues<AxisBasedStylesConfig, BoxLabelConfig>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, BarValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,6 +6,6 @@ import type { SeriesProps, DualAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { GapsAwarePlotStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { BarSegmentStyle } from '../../segments/common';
|
|
7
8
|
/** `BarPlot`'s public props. */
|
|
8
|
-
export type BarPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, GapsAwarePlotStylesConfig<BarSegmentStyle>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
|
+
export type BarPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<GapsAwarePlotStylesConfig<BarSegmentStyle>, BarValueLabel>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
10
|
/** What `BarPlot`'s core draws from. */
|
|
10
|
-
export type BarPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, GapsAwarePlotStylesConfig<BarSegmentStyle>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
11
|
+
export type BarPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<GapsAwarePlotStylesConfig<BarSegmentStyle>, BarValueLabel>, BarSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, DotValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,6 +6,6 @@ import type { SeriesProps, DualAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { ConnectorBasedStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { LineSegmentStyle } from '../../segments/common';
|
|
7
8
|
/** `ClevelandPlot`'s public props. */
|
|
8
|
-
export type ClevelandPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, ConnectorBasedStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
|
+
export type ClevelandPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<ConnectorBasedStylesConfig, DotValueLabel>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
10
|
/** What `ClevelandPlot`'s core draws from. */
|
|
10
|
-
export type ClevelandPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, ConnectorBasedStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
11
|
+
export type ClevelandPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<ConnectorBasedStylesConfig, DotValueLabel>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, DotValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,6 +6,6 @@ import type { SeriesProps, DualAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { ConnectorBasedStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { LineSegmentStyle } from '../../segments/common';
|
|
7
8
|
/** `DumbbellPlot`'s public props. */
|
|
8
|
-
export type DumbbellPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, ConnectorBasedStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
|
+
export type DumbbellPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<ConnectorBasedStylesConfig, DotValueLabel>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
10
|
/** What `DumbbellPlot`'s core draws from. */
|
|
10
|
-
export type DumbbellPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, ConnectorBasedStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
11
|
+
export type DumbbellPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<ConnectorBasedStylesConfig, DotValueLabel>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, DotValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -17,7 +18,9 @@ export type ForestIntervalProps<TData extends Record<string, unknown>> = {
|
|
|
17
18
|
/** The half-width of each row's interval: it reaches `error` below and above its value. `lower` and `upper` win where they are set. */
|
|
18
19
|
error?: Accessor<TData, number>;
|
|
19
20
|
};
|
|
21
|
+
/** The values of a forest's row its value labels can write: its estimate, and its interval's ends. */
|
|
22
|
+
export type ForestValuePart = 'value' | 'lower' | 'upper';
|
|
20
23
|
/** `ForestPlot`'s public props. */
|
|
21
|
-
export type ForestPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, ConnectorBasedStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>> & ForestIntervalProps<TData>;
|
|
24
|
+
export type ForestPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<ConnectorBasedStylesConfig, DotValueLabel, ForestValuePart>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>> & ForestIntervalProps<TData>;
|
|
22
25
|
/** What `ForestPlot`'s core draws from. */
|
|
23
|
-
export type ForestPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, ConnectorBasedStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>> & ForestIntervalProps<TData>;
|
|
26
|
+
export type ForestPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<ConnectorBasedStylesConfig, DotValueLabel, ForestValuePart>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>> & ForestIntervalProps<TData>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WithValues, DotValueLabel } from '../../../layout/styles';
|
|
1
2
|
import type { BasePlotProps, PlotCoreProps } from '../../props';
|
|
2
3
|
import type { AxisBasedScalesConfig } from '../../../layout/scales';
|
|
3
4
|
import type { AxisBasedMarkersConfig } from '../../../markers/common';
|
|
@@ -5,6 +6,6 @@ import type { SeriesProps, DualAxisDataProps } from '../../data/common';
|
|
|
5
6
|
import type { ConnectorBasedStylesConfig } from '../../../layout/styles';
|
|
6
7
|
import type { LineSegmentStyle } from '../../segments/common';
|
|
7
8
|
/** `LollipopPlot`'s public props. */
|
|
8
|
-
export type LollipopPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, ConnectorBasedStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
|
+
export type LollipopPlotProps<TData extends Record<string, unknown>> = BasePlotProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<ConnectorBasedStylesConfig, DotValueLabel>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
9
10
|
/** What `LollipopPlot`'s core draws from. */
|
|
10
|
-
export type LollipopPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, ConnectorBasedStylesConfig, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
11
|
+
export type LollipopPlotCoreProps<TData extends Record<string, unknown>> = PlotCoreProps<SeriesProps<TData> | DualAxisDataProps<TData>, TData, WithValues<ConnectorBasedStylesConfig, DotValueLabel>, LineSegmentStyle, AxisBasedMarkersConfig, AxisBasedScalesConfig<TData>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Whether two configuration values hold the same, for a plot to tell a new configuration from one built again. */
|
|
2
|
+
export declare class ConfigEquality {
|
|
3
|
+
#private;
|
|
4
|
+
/** How many levels of objects and arrays it looks into; a value nested deeper only matches as the same object. */
|
|
5
|
+
static readonly MAX_DEPTH = 6;
|
|
6
|
+
/**
|
|
7
|
+
* Whether `a` and `b` are the same value, or plain objects and arrays alike all the way down, dates of one
|
|
8
|
+
* time; anything else - a function, a class instance - only if it is the same object.
|
|
9
|
+
*/
|
|
10
|
+
static same(a: unknown, b: unknown, depth?: number): boolean;
|
|
11
|
+
}
|