layerchart 0.43.6 → 0.43.8
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/LICENSE +2 -2
- package/dist/components/Arc.svelte.d.ts +8 -8
- package/dist/components/Area.svelte +13 -6
- package/dist/components/Area.svelte.d.ts +6 -5
- package/dist/components/Bar.svelte.d.ts +7 -7
- package/dist/components/Bars.svelte.d.ts +6 -6
- package/dist/components/Brush.svelte.d.ts +6 -6
- package/dist/components/Calendar.svelte.d.ts +1 -1
- package/dist/components/Chart.svelte +1 -1
- package/dist/components/ChartClipPath.svelte.d.ts +1 -1
- package/dist/components/Circle.svelte.d.ts +6 -6
- package/dist/components/CircleClipPath.svelte.d.ts +3 -3
- package/dist/components/ClipPath.svelte.d.ts +2 -2
- package/dist/components/ColorRamp.svelte.d.ts +3 -3
- package/dist/components/Frame.svelte.d.ts +1 -1
- package/dist/components/GeoCircle.svelte.d.ts +3 -3
- package/dist/components/GeoPath.svelte +3 -1
- package/dist/components/GeoPath.svelte.d.ts +1 -1
- package/dist/components/GeoPoint.svelte.d.ts +2 -2
- package/dist/components/GeoSpline.svelte.d.ts +1 -1
- package/dist/components/Graticule.svelte.d.ts +1 -1
- package/dist/components/Group.svelte.d.ts +2 -2
- package/dist/components/Highlight.svelte +15 -8
- package/dist/components/Highlight.svelte.d.ts +7 -7
- package/dist/components/Hull.svelte.d.ts +1 -1
- package/dist/components/Labels.svelte.d.ts +4 -4
- package/dist/components/Legend.svelte.d.ts +7 -7
- package/dist/components/Line.svelte.d.ts +4 -4
- package/dist/components/LinearGradient.svelte.d.ts +8 -8
- package/dist/components/Link.svelte.d.ts +7 -7
- package/dist/components/Points.svelte.d.ts +3 -3
- package/dist/components/RadialGradient.svelte.d.ts +9 -9
- package/dist/components/Rect.svelte.d.ts +6 -6
- package/dist/components/RectClipPath.svelte.d.ts +3 -3
- package/dist/components/Rule.svelte.d.ts +2 -2
- package/dist/components/Spline.svelte +12 -6
- package/dist/components/Spline.svelte.d.ts +4 -3
- package/dist/components/Text.svelte.d.ts +12 -12
- package/dist/components/Threshold.svelte +20 -16
- package/dist/components/Threshold.svelte.d.ts +4 -3
- package/dist/components/Tooltip.svelte.d.ts +7 -7
- package/dist/components/TooltipItem.svelte.d.ts +2 -2
- package/dist/components/TransformControls.svelte.d.ts +3 -3
- package/dist/components/Voronoi.svelte.d.ts +1 -1
- package/dist/components/layout/Canvas.svelte.d.ts +3 -3
- package/dist/docs/Code.svelte.d.ts +4 -4
- package/dist/docs/Json.svelte.d.ts +1 -1
- package/dist/docs/Preview.svelte.d.ts +3 -3
- package/package.json +18 -18
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2024 Sean Lynch
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -6,18 +6,18 @@ declare const __propDef: {
|
|
|
6
6
|
[x: string]: any;
|
|
7
7
|
spring?: boolean | Parameters<typeof springStore>[1];
|
|
8
8
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
9
|
-
value?: number;
|
|
10
|
-
initialValue?: number;
|
|
11
|
-
domain?: number[];
|
|
12
|
-
range?: number[];
|
|
9
|
+
value?: number | undefined;
|
|
10
|
+
initialValue?: number | undefined;
|
|
11
|
+
domain?: number[] | undefined;
|
|
12
|
+
range?: number[] | undefined;
|
|
13
13
|
startAngle?: number | undefined;
|
|
14
14
|
endAngle?: number | undefined;
|
|
15
15
|
innerRadius?: number | undefined;
|
|
16
16
|
outerRadius?: number | undefined;
|
|
17
|
-
cornerRadius?: number;
|
|
18
|
-
padAngle?: number;
|
|
19
|
-
track?: boolean | SVGAttributes<SVGPathElement
|
|
20
|
-
offset?: number;
|
|
17
|
+
cornerRadius?: number | undefined;
|
|
18
|
+
padAngle?: number | undefined;
|
|
19
|
+
track?: (boolean | SVGAttributes<SVGPathElement>) | undefined;
|
|
20
|
+
offset?: number | undefined;
|
|
21
21
|
};
|
|
22
22
|
events: {
|
|
23
23
|
click: MouseEvent;
|
|
@@ -6,6 +6,8 @@ import { cls } from 'svelte-ux';
|
|
|
6
6
|
import { motionStore } from '../stores/motionStore.js';
|
|
7
7
|
import { chartContext } from './ChartContext.svelte';
|
|
8
8
|
import Spline from './Spline.svelte';
|
|
9
|
+
import { accessor } from '../utils/common.js';
|
|
10
|
+
import { isScaleBand } from '../utils/scales.js';
|
|
9
11
|
const { data: contextData, xScale, yScale, xGet, yGet, yRange } = chartContext();
|
|
10
12
|
/** Override data instead of using context */
|
|
11
13
|
export let data = undefined;
|
|
@@ -26,6 +28,11 @@ export let curve = undefined;
|
|
|
26
28
|
export let defined = undefined;
|
|
27
29
|
/** Enable showing line */
|
|
28
30
|
export let line = false;
|
|
31
|
+
const _x = accessor(x);
|
|
32
|
+
const _y0 = accessor(y0);
|
|
33
|
+
const _y1 = accessor(y1);
|
|
34
|
+
$: xOffset = isScaleBand($xScale) ? $xScale.bandwidth() / 2 : 0;
|
|
35
|
+
$: yOffset = isScaleBand($yScale) ? $yScale.bandwidth() / 2 : 0;
|
|
29
36
|
$: tweenedOptions = tweened
|
|
30
37
|
? { interpolate: interpolatePath, ...(typeof tweened === 'object' ? tweened : null) }
|
|
31
38
|
: false;
|
|
@@ -33,13 +40,13 @@ $: tweened_d = motionStore('', { tweened: tweenedOptions });
|
|
|
33
40
|
$: {
|
|
34
41
|
const path = radial
|
|
35
42
|
? areaRadial()
|
|
36
|
-
.angle((d) => (x ? $xScale(
|
|
37
|
-
.innerRadius((d) => (y0 ? $yScale(
|
|
38
|
-
.outerRadius((d) => (y1 ? $yScale(
|
|
43
|
+
.angle((d) => (x ? $xScale(_x(d)) : $xGet(d)))
|
|
44
|
+
.innerRadius((d) => (y0 ? $yScale(_y0(d)) : max($yRange)))
|
|
45
|
+
.outerRadius((d) => (y1 ? $yScale(_y1(d)) : $yGet(d)))
|
|
39
46
|
: d3Area()
|
|
40
|
-
.x((d) => (x ? $xScale(
|
|
41
|
-
.y0((d) => (y0 ? $yScale(
|
|
42
|
-
.y1((d) => (y1 ? $yScale(
|
|
47
|
+
.x((d) => (x ? $xScale(_x(d)) : $xGet(d)) + xOffset)
|
|
48
|
+
.y0((d) => (y0 ? $yScale(_y0(d)) : max($yRange)) + yOffset)
|
|
49
|
+
.y1((d) => (y1 ? $yScale(_y1(d)) : $yGet(d)) + yOffset);
|
|
43
50
|
if (curve)
|
|
44
51
|
path.curve(curve);
|
|
45
52
|
if (defined)
|
|
@@ -3,20 +3,21 @@ import { type ComponentProps } from 'svelte';
|
|
|
3
3
|
import type { tweened as tweenedStore } from 'svelte/motion';
|
|
4
4
|
import type { CurveFactory } from 'd3-shape';
|
|
5
5
|
import Spline from './Spline.svelte';
|
|
6
|
+
import { type Accessor } from '../utils/common.js';
|
|
6
7
|
declare const __propDef: {
|
|
7
8
|
props: {
|
|
8
9
|
[x: string]: any;
|
|
9
10
|
data?: any;
|
|
10
11
|
pathData?: string | undefined | null;
|
|
11
|
-
radial?: boolean;
|
|
12
|
-
x?:
|
|
13
|
-
y0?:
|
|
14
|
-
y1?:
|
|
12
|
+
radial?: boolean | undefined;
|
|
13
|
+
x?: Accessor;
|
|
14
|
+
y0?: Accessor;
|
|
15
|
+
y1?: Accessor;
|
|
15
16
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
16
17
|
clipPath?: string | undefined;
|
|
17
18
|
curve?: CurveFactory | undefined;
|
|
18
19
|
defined?: Parameters<Area<any>["defined"]>[0] | undefined;
|
|
19
|
-
line?: boolean | Partial<ComponentProps<Spline
|
|
20
|
+
line?: (boolean | Partial<ComponentProps<Spline>>) | undefined;
|
|
20
21
|
};
|
|
21
22
|
events: {
|
|
22
23
|
click: MouseEvent;
|
|
@@ -9,14 +9,14 @@ declare const __propDef: {
|
|
|
9
9
|
x?: Accessor;
|
|
10
10
|
y?: Accessor;
|
|
11
11
|
fill?: string | undefined;
|
|
12
|
-
stroke?: string;
|
|
13
|
-
strokeWidth?: number;
|
|
14
|
-
radius?: number;
|
|
15
|
-
rounded?: "all" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
16
|
-
inset?: number;
|
|
12
|
+
stroke?: string | undefined;
|
|
13
|
+
strokeWidth?: number | undefined;
|
|
14
|
+
radius?: number | undefined;
|
|
15
|
+
rounded?: ("all" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right") | undefined;
|
|
16
|
+
inset?: number | undefined;
|
|
17
17
|
groupBy?: string | undefined;
|
|
18
|
-
groupPaddingInner?: number;
|
|
19
|
-
groupPaddingOuter?: number;
|
|
18
|
+
groupPaddingInner?: number | undefined;
|
|
19
|
+
groupPaddingOuter?: number | undefined;
|
|
20
20
|
spring?: ComponentProps<Rect>["spring"];
|
|
21
21
|
tweened?: ComponentProps<Rect>["tweened"];
|
|
22
22
|
};
|
|
@@ -7,15 +7,15 @@ declare const __propDef: {
|
|
|
7
7
|
[x: string]: any;
|
|
8
8
|
x?: Accessor;
|
|
9
9
|
y?: Accessor;
|
|
10
|
-
stroke?: string;
|
|
11
|
-
strokeWidth?: number;
|
|
12
|
-
radius?: number;
|
|
13
|
-
inset?: number;
|
|
10
|
+
stroke?: string | undefined;
|
|
11
|
+
strokeWidth?: number | undefined;
|
|
12
|
+
radius?: number | undefined;
|
|
13
|
+
inset?: number | undefined;
|
|
14
14
|
spring?: ComponentProps<Rect>["spring"];
|
|
15
15
|
tweened?: ComponentProps<Rect>["tweened"];
|
|
16
16
|
groupBy?: string | undefined;
|
|
17
|
-
groupPaddingInner?: number;
|
|
18
|
-
groupPaddingOuter?: number;
|
|
17
|
+
groupPaddingInner?: number | undefined;
|
|
18
|
+
groupPaddingOuter?: number | undefined;
|
|
19
19
|
};
|
|
20
20
|
events: {
|
|
21
21
|
[evt: string]: CustomEvent<any>;
|
|
@@ -3,11 +3,11 @@ import type { SVGAttributes } from 'svelte/elements';
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
axis?: "x" | "y" | "both";
|
|
7
|
-
handleSize?: number;
|
|
8
|
-
resetOnEnd?: boolean;
|
|
9
|
-
xDomain?: [number | Date | null, number | Date | null];
|
|
10
|
-
yDomain?: [number | Date | null, number | Date | null];
|
|
6
|
+
axis?: ("x" | "y" | "both") | undefined;
|
|
7
|
+
handleSize?: number | undefined;
|
|
8
|
+
resetOnEnd?: boolean | undefined;
|
|
9
|
+
xDomain?: [number | Date | null, number | Date | null] | undefined;
|
|
10
|
+
yDomain?: [number | Date | null, number | Date | null] | undefined;
|
|
11
11
|
range?: SVGAttributes<SVGRectElement> | undefined;
|
|
12
12
|
handle?: SVGAttributes<SVGRectElement> | undefined;
|
|
13
13
|
classes?: {
|
|
@@ -15,7 +15,7 @@ declare const __propDef: {
|
|
|
15
15
|
frame?: string;
|
|
16
16
|
range?: string;
|
|
17
17
|
handle?: string;
|
|
18
|
-
};
|
|
18
|
+
} | undefined;
|
|
19
19
|
};
|
|
20
20
|
events: {
|
|
21
21
|
change: CustomEvent<{
|
|
@@ -8,7 +8,7 @@ declare const __propDef: {
|
|
|
8
8
|
start: Date;
|
|
9
9
|
end: Date;
|
|
10
10
|
cellSize?: number | [number, number] | undefined;
|
|
11
|
-
monthPath?: boolean | Partial<ComponentProps<MonthPath
|
|
11
|
+
monthPath?: (boolean | Partial<ComponentProps<MonthPath>>) | undefined;
|
|
12
12
|
tooltip?: TooltipContextValue | undefined;
|
|
13
13
|
};
|
|
14
14
|
events: {
|
|
@@ -106,7 +106,7 @@ onMount(() => {
|
|
|
106
106
|
{#key isMounted}
|
|
107
107
|
<TransformContext
|
|
108
108
|
bind:this={transformContext}
|
|
109
|
-
mode={transform?.mode ?? geo?.applyTransform?.length ? 'manual' : 'none'}
|
|
109
|
+
mode={(transform?.mode ?? geo?.applyTransform?.length) ? 'manual' : 'none'}
|
|
110
110
|
initialTranslate={initialTransform?.translate}
|
|
111
111
|
initialScale={initialTransform?.scale}
|
|
112
112
|
processTranslate={geo
|
|
@@ -3,12 +3,12 @@ import type { spring as springStore, tweened as tweenedStore } from 'svelte/moti
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
cx?: number;
|
|
7
|
-
initialCx?: number;
|
|
8
|
-
cy?: number;
|
|
9
|
-
initialCy?: number;
|
|
10
|
-
r?: number;
|
|
11
|
-
initialR?: number;
|
|
6
|
+
cx?: number | undefined;
|
|
7
|
+
initialCx?: number | undefined;
|
|
8
|
+
cy?: number | undefined;
|
|
9
|
+
initialCy?: number | undefined;
|
|
10
|
+
r?: number | undefined;
|
|
11
|
+
initialR?: number | undefined;
|
|
12
12
|
spring?: boolean | Parameters<typeof springStore>[1];
|
|
13
13
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
14
14
|
};
|
|
@@ -3,9 +3,9 @@ import type { spring as springStore, tweened as tweenedStore } from 'svelte/moti
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
id?: string;
|
|
7
|
-
cx?: number;
|
|
8
|
-
cy?: number;
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
cx?: number | undefined;
|
|
8
|
+
cy?: number | undefined;
|
|
9
9
|
r: number;
|
|
10
10
|
spring?: boolean | Parameters<typeof springStore>[1];
|
|
11
11
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
@@ -2,9 +2,9 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
id?: string;
|
|
5
|
+
id?: string | undefined;
|
|
6
6
|
useId?: string | undefined;
|
|
7
|
-
disabled?: boolean;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
8
|
};
|
|
9
9
|
events: {
|
|
10
10
|
click: MouseEvent;
|
|
@@ -3,9 +3,9 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
interpolator: (t: number) => string;
|
|
6
|
-
steps?: number;
|
|
7
|
-
height?: string | number;
|
|
8
|
-
width?: string | number;
|
|
6
|
+
steps?: number | undefined;
|
|
7
|
+
height?: (string | number) | undefined;
|
|
8
|
+
width?: (string | number) | undefined;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,9 +2,9 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
radius?: number;
|
|
6
|
-
center?: [number, number];
|
|
7
|
-
precision?: number;
|
|
5
|
+
radius?: number | undefined;
|
|
6
|
+
center?: [number, number] | undefined;
|
|
7
|
+
precision?: number | undefined;
|
|
8
8
|
};
|
|
9
9
|
events: {
|
|
10
10
|
pointermove: PointerEvent;
|
|
@@ -69,7 +69,9 @@ $: if (renderContext === 'canvas' && $ctx) {
|
|
|
69
69
|
$ctx.fill();
|
|
70
70
|
$ctx.lineWidth = Number(strokeWidth ?? 0);
|
|
71
71
|
$ctx.strokeStyle =
|
|
72
|
-
stroke ?? computedStyles.stroke === 'none'
|
|
72
|
+
(stroke ?? computedStyles.stroke === 'none')
|
|
73
|
+
? 'transparent'
|
|
74
|
+
: (computedStyles.stroke ?? '');
|
|
73
75
|
$ctx.stroke();
|
|
74
76
|
}
|
|
75
77
|
}
|
|
@@ -14,7 +14,7 @@ declare const __propDef: {
|
|
|
14
14
|
stroke?: string | undefined;
|
|
15
15
|
strokeWidth?: number | string | undefined;
|
|
16
16
|
tooltip?: TooltipContextValue | undefined;
|
|
17
|
-
curve?: CurveFactory | CurveFactoryLineOnly;
|
|
17
|
+
curve?: (CurveFactory | CurveFactoryLineOnly) | undefined;
|
|
18
18
|
class?: string | undefined;
|
|
19
19
|
geoTransform?: ((projection: GeoProjection | GeoIdentityTransform) => GeoTransformPrototype) | undefined;
|
|
20
20
|
};
|
|
@@ -4,10 +4,10 @@ declare const __propDef: {
|
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
lat: number;
|
|
6
6
|
long: number;
|
|
7
|
-
render?: (ctx: CanvasRenderingContext2D, coords: {
|
|
7
|
+
render?: ((ctx: CanvasRenderingContext2D, coords: {
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
|
-
}) => any;
|
|
10
|
+
}) => any) | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
[evt: string]: CustomEvent<any>;
|
|
@@ -6,7 +6,7 @@ declare const __propDef: {
|
|
|
6
6
|
[x: string]: any;
|
|
7
7
|
lines?: Partial<ComponentProps<GeoPath>> | boolean | undefined;
|
|
8
8
|
outline?: Partial<ComponentProps<GeoPath>> | boolean | undefined;
|
|
9
|
-
step?: [number, number];
|
|
9
|
+
step?: [number, number] | undefined;
|
|
10
10
|
};
|
|
11
11
|
events: {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
@@ -7,8 +7,8 @@ declare const __propDef: {
|
|
|
7
7
|
initialX?: number | undefined;
|
|
8
8
|
y?: number | undefined;
|
|
9
9
|
initialY?: number | undefined;
|
|
10
|
-
center?: boolean | "x" | "y";
|
|
11
|
-
preventTouchMove?: boolean;
|
|
10
|
+
center?: (boolean | "x" | "y") | undefined;
|
|
11
|
+
preventTouchMove?: boolean | undefined;
|
|
12
12
|
spring?: boolean | Parameters<typeof springStore>[1];
|
|
13
13
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
14
14
|
};
|
|
@@ -163,17 +163,22 @@ $: if (highlightData) {
|
|
|
163
163
|
// Ignore non-array data such as hierarchy and graph (make Typescript happy)
|
|
164
164
|
if (Array.isArray($contextData)) {
|
|
165
165
|
// For each series, find the related data point
|
|
166
|
-
const seriesPointsData = $contextData
|
|
166
|
+
const seriesPointsData = $contextData
|
|
167
|
+
.map((series) => {
|
|
167
168
|
return {
|
|
168
169
|
series,
|
|
169
170
|
point: series.find((d) => _y(d) === _y(highlightSeriesPoint)),
|
|
170
171
|
};
|
|
172
|
+
})
|
|
173
|
+
.filter((d) => d.point); // remove if no point found (ex. Histogram);
|
|
174
|
+
_points = seriesPointsData.map((seriesPoint, i) => {
|
|
175
|
+
console.log({ seriesPoint });
|
|
176
|
+
return {
|
|
177
|
+
x: $xScale(seriesPoint.point[1]) + xOffset,
|
|
178
|
+
y: yCoord + yOffset,
|
|
179
|
+
fill: $config.r ? $rGet(seriesPoint.series) : null,
|
|
180
|
+
};
|
|
171
181
|
});
|
|
172
|
-
_points = seriesPointsData.map((seriesPoint, i) => ({
|
|
173
|
-
x: $xScale(seriesPoint.point[1]) + xOffset,
|
|
174
|
-
y: yCoord + yOffset,
|
|
175
|
-
fill: $config.r ? $rGet(seriesPoint.series) : null,
|
|
176
|
-
}));
|
|
177
182
|
}
|
|
178
183
|
}
|
|
179
184
|
else {
|
|
@@ -198,12 +203,14 @@ $: if (highlightData) {
|
|
|
198
203
|
// Ignore non-array data such as hierarchy and graph (make Typescript happy)
|
|
199
204
|
if (Array.isArray($contextData)) {
|
|
200
205
|
// For each series, find the related data point
|
|
201
|
-
const seriesPointsData = $contextData
|
|
206
|
+
const seriesPointsData = $contextData
|
|
207
|
+
.map((series) => {
|
|
202
208
|
return {
|
|
203
209
|
series,
|
|
204
210
|
point: series.find((d) => _x(d) === _x(highlightSeriesPoint)),
|
|
205
211
|
};
|
|
206
|
-
})
|
|
212
|
+
})
|
|
213
|
+
.filter((d) => d.point); // remove if no point found (ex. Histogram)
|
|
207
214
|
_points = seriesPointsData.map((seriesPoint, i) => ({
|
|
208
215
|
x: xCoord + xOffset,
|
|
209
216
|
y: $yScale(seriesPoint.point[1]) + yOffset,
|
|
@@ -42,14 +42,14 @@ declare const __propDef: {
|
|
|
42
42
|
x?: Accessor;
|
|
43
43
|
y?: Accessor;
|
|
44
44
|
fill?: string | undefined;
|
|
45
|
-
stroke?: string;
|
|
46
|
-
strokeWidth?: number;
|
|
47
|
-
radius?: number;
|
|
48
|
-
rounded?: "all" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
49
|
-
inset?: number;
|
|
45
|
+
stroke?: string | undefined;
|
|
46
|
+
strokeWidth?: number | undefined;
|
|
47
|
+
radius?: number | undefined;
|
|
48
|
+
rounded?: ("all" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right") | undefined;
|
|
49
|
+
inset?: number | undefined;
|
|
50
50
|
groupBy?: string | undefined;
|
|
51
|
-
groupPaddingInner?: number;
|
|
52
|
-
groupPaddingOuter?: number;
|
|
51
|
+
groupPaddingInner?: number | undefined;
|
|
52
|
+
groupPaddingOuter?: number | undefined;
|
|
53
53
|
spring?: ComponentProps<Rect>["spring"];
|
|
54
54
|
tweened?: ComponentProps<Rect>["tweened"];
|
|
55
55
|
}>;
|
|
@@ -3,12 +3,12 @@ import { type FormatType } from 'svelte-ux';
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
placement?: "inside" | "outside";
|
|
7
|
-
offset?: number;
|
|
6
|
+
placement?: ("inside" | "outside") | undefined;
|
|
7
|
+
offset?: number | undefined;
|
|
8
8
|
format?: FormatType | undefined;
|
|
9
9
|
groupBy?: string | undefined;
|
|
10
|
-
groupPaddingInner?: number;
|
|
11
|
-
groupPaddingOuter?: number;
|
|
10
|
+
groupPaddingInner?: number | undefined;
|
|
11
|
+
groupPaddingOuter?: number | undefined;
|
|
12
12
|
};
|
|
13
13
|
events: {
|
|
14
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -4,21 +4,21 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
scale?: any;
|
|
7
|
-
title?: string;
|
|
8
|
-
width?: number;
|
|
9
|
-
height?: number;
|
|
10
|
-
ticks?: number;
|
|
7
|
+
title?: string | undefined;
|
|
8
|
+
width?: number | undefined;
|
|
9
|
+
height?: number | undefined;
|
|
10
|
+
ticks?: number | undefined;
|
|
11
11
|
tickFormat?: FormatType | undefined;
|
|
12
12
|
tickValues?: any[] | undefined;
|
|
13
|
-
tickFontSize?: number;
|
|
14
|
-
tickLength?: number;
|
|
13
|
+
tickFontSize?: number | undefined;
|
|
14
|
+
tickLength?: number | undefined;
|
|
15
15
|
placement?: ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right") | undefined;
|
|
16
16
|
classes?: {
|
|
17
17
|
root?: string;
|
|
18
18
|
title?: string;
|
|
19
19
|
label?: string;
|
|
20
20
|
tick?: string;
|
|
21
|
-
};
|
|
21
|
+
} | undefined;
|
|
22
22
|
};
|
|
23
23
|
events: {
|
|
24
24
|
[evt: string]: CustomEvent<any>;
|
|
@@ -4,13 +4,13 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
x1: number;
|
|
7
|
-
initialX1?: number;
|
|
7
|
+
initialX1?: number | undefined;
|
|
8
8
|
y1: number;
|
|
9
|
-
initialY1?: number;
|
|
9
|
+
initialY1?: number | undefined;
|
|
10
10
|
x2: number;
|
|
11
|
-
initialX2?: number;
|
|
11
|
+
initialX2?: number | undefined;
|
|
12
12
|
y2: number;
|
|
13
|
-
initialY2?: number;
|
|
13
|
+
initialY2?: number | undefined;
|
|
14
14
|
spring?: boolean | Parameters<typeof springStore>[1];
|
|
15
15
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
16
16
|
};
|
|
@@ -2,15 +2,15 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
id?: string;
|
|
6
|
-
stops?: string[] | [string | number, string][];
|
|
7
|
-
vertical?: boolean;
|
|
8
|
-
x1?: string;
|
|
9
|
-
y1?: string;
|
|
10
|
-
x2?: string;
|
|
11
|
-
y2?: string;
|
|
5
|
+
id?: string | undefined;
|
|
6
|
+
stops?: (string[] | [string | number, string][]) | undefined;
|
|
7
|
+
vertical?: boolean | undefined;
|
|
8
|
+
x1?: string | undefined;
|
|
9
|
+
y1?: string | undefined;
|
|
10
|
+
x2?: string | undefined;
|
|
11
|
+
y2?: string | undefined;
|
|
12
12
|
rotate?: number | undefined;
|
|
13
|
-
units?: "objectBoundingBox" | "userSpaceOnUse";
|
|
13
|
+
units?: ("objectBoundingBox" | "userSpaceOnUse") | undefined;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
@@ -4,13 +4,13 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
data?: any;
|
|
7
|
-
sankey?: boolean;
|
|
8
|
-
source?: (d: any) => any;
|
|
9
|
-
target?: (d: any) => any;
|
|
10
|
-
orientation?: "vertical" | "horizontal";
|
|
11
|
-
x?: (d: any) => any;
|
|
12
|
-
y?: (d: any) => any;
|
|
13
|
-
curve?: import("d3-shape").CurveFactory;
|
|
7
|
+
sankey?: boolean | undefined;
|
|
8
|
+
source?: ((d: any) => any) | undefined;
|
|
9
|
+
target?: ((d: any) => any) | undefined;
|
|
10
|
+
orientation?: ("vertical" | "horizontal") | undefined;
|
|
11
|
+
x?: ((d: any) => any) | undefined;
|
|
12
|
+
y?: ((d: any) => any) | undefined;
|
|
13
|
+
curve?: import("d3-shape").CurveFactory | undefined;
|
|
14
14
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
15
15
|
};
|
|
16
16
|
events: {
|
|
@@ -5,11 +5,11 @@ declare const __propDef: {
|
|
|
5
5
|
props: {
|
|
6
6
|
[x: string]: any;
|
|
7
7
|
data?: any;
|
|
8
|
-
r?: number;
|
|
8
|
+
r?: number | undefined;
|
|
9
9
|
offsetX?: number | ((value: number, context: any) => number) | undefined;
|
|
10
10
|
offsetY?: number | ((value: number, context: any) => number) | undefined;
|
|
11
|
-
radial?: boolean;
|
|
12
|
-
links?: boolean | Partial<ComponentProps<Link
|
|
11
|
+
radial?: boolean | undefined;
|
|
12
|
+
links?: (boolean | Partial<ComponentProps<Link>>) | undefined;
|
|
13
13
|
};
|
|
14
14
|
events: {
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,16 +2,16 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
id?: string;
|
|
6
|
-
stops?: string[] | [string | number, string][];
|
|
7
|
-
cx?: string;
|
|
8
|
-
cy?: string;
|
|
9
|
-
fx?: string;
|
|
10
|
-
fy?: string;
|
|
11
|
-
r?: string;
|
|
12
|
-
spreadMethod?: "pad" | "reflect" | "repeat";
|
|
5
|
+
id?: string | undefined;
|
|
6
|
+
stops?: (string[] | [string | number, string][]) | undefined;
|
|
7
|
+
cx?: string | undefined;
|
|
8
|
+
cy?: string | undefined;
|
|
9
|
+
fx?: string | undefined;
|
|
10
|
+
fy?: string | undefined;
|
|
11
|
+
r?: string | undefined;
|
|
12
|
+
spreadMethod?: ("pad" | "reflect" | "repeat") | undefined;
|
|
13
13
|
transform?: string | null | undefined;
|
|
14
|
-
units?: "objectBoundingBox" | "userSpaceOnUse";
|
|
14
|
+
units?: ("objectBoundingBox" | "userSpaceOnUse") | undefined;
|
|
15
15
|
};
|
|
16
16
|
events: {
|
|
17
17
|
[evt: string]: CustomEvent<any>;
|
|
@@ -3,14 +3,14 @@ import { type SpringOptions, type TweenedOptions } from '../stores/motionStore.j
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
x?: number;
|
|
7
|
-
initialX?: number;
|
|
8
|
-
y?: number;
|
|
9
|
-
initialY?: number;
|
|
6
|
+
x?: number | undefined;
|
|
7
|
+
initialX?: number | undefined;
|
|
8
|
+
y?: number | undefined;
|
|
9
|
+
initialY?: number | undefined;
|
|
10
10
|
width: number;
|
|
11
|
-
initialWidth?: number;
|
|
11
|
+
initialWidth?: number | undefined;
|
|
12
12
|
height: number;
|
|
13
|
-
initialHeight?: number;
|
|
13
|
+
initialHeight?: number | undefined;
|
|
14
14
|
spring?: boolean | SpringOptions | {
|
|
15
15
|
[prop: string]: SpringOptions;
|
|
16
16
|
};
|
|
@@ -4,9 +4,9 @@ import Rect from './Rect.svelte';
|
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
[x: string]: any;
|
|
7
|
-
id?: string;
|
|
8
|
-
x?: number;
|
|
9
|
-
y?: number;
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
x?: number | undefined;
|
|
9
|
+
y?: number | undefined;
|
|
10
10
|
width: number;
|
|
11
11
|
height: number;
|
|
12
12
|
spring?: ComponentProps<Rect>["spring"];
|
|
@@ -2,8 +2,8 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
x?: number | Date | boolean | "left" | "right";
|
|
6
|
-
y?: number | Date | boolean | "top" | "bottom";
|
|
5
|
+
x?: (number | Date | boolean | "left" | "right") | undefined;
|
|
6
|
+
y?: (number | Date | boolean | "top" | "bottom") | undefined;
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
9
9
|
[evt: string]: CustomEvent<any>;
|
|
@@ -10,6 +10,8 @@ import { cls } from 'svelte-ux';
|
|
|
10
10
|
import { chartContext } from './ChartContext.svelte';
|
|
11
11
|
import Group from './Group.svelte';
|
|
12
12
|
import { motionStore } from '../stores/motionStore.js';
|
|
13
|
+
import { accessor } from '../utils/common.js';
|
|
14
|
+
import { isScaleBand } from '../utils/scales.js';
|
|
13
15
|
const { data: contextData, xScale, yScale, x: contextX, y: contextY } = chartContext();
|
|
14
16
|
/** Override data instead of using context */
|
|
15
17
|
export let data = undefined;
|
|
@@ -18,9 +20,9 @@ export let pathData = undefined;
|
|
|
18
20
|
/** Use radial instead of cartesian line generator, mapping `x` to `angle` and `y` to `radius`. Radial lines are positioned relative to the origin, use transform (ex. `<Group center>`) to change the origin */
|
|
19
21
|
export let radial = false;
|
|
20
22
|
/** Override `x` accessor from Chart context. Applies to `angle` when `radial=true` */
|
|
21
|
-
export let x = undefined;
|
|
23
|
+
export let x = undefined;
|
|
22
24
|
/** Override `y` accessor from Chart context. Applies to `radius` when `radial=true` */
|
|
23
|
-
export let y = undefined;
|
|
25
|
+
export let y = undefined;
|
|
24
26
|
/** Interpolate path data using d3-interpolate-path. Works best without `draw` enabled */
|
|
25
27
|
export let tweened = undefined;
|
|
26
28
|
/** Draw path over time. Works best without `tweened` enabled */
|
|
@@ -46,6 +48,10 @@ function getScaleValue(data, scale, accessor) {
|
|
|
46
48
|
return accessor(data);
|
|
47
49
|
}
|
|
48
50
|
}
|
|
51
|
+
const _x = accessor(x);
|
|
52
|
+
const _y = accessor(y);
|
|
53
|
+
$: xOffset = isScaleBand($xScale) ? $xScale.bandwidth() / 2 : 0;
|
|
54
|
+
$: yOffset = isScaleBand($yScale) ? $yScale.bandwidth() / 2 : 0;
|
|
49
55
|
let d = '';
|
|
50
56
|
// @ts-expect-error
|
|
51
57
|
$: tweenedOptions = tweened ? { interpolate: interpolatePath, ...tweened } : false;
|
|
@@ -53,11 +59,11 @@ $: tweened_d = motionStore('', { tweened: tweenedOptions });
|
|
|
53
59
|
$: {
|
|
54
60
|
const path = radial
|
|
55
61
|
? lineRadial()
|
|
56
|
-
.angle((d) => getScaleValue(d, $xScale, x
|
|
57
|
-
.radius((d) => getScaleValue(d, $yScale, y
|
|
62
|
+
.angle((d) => getScaleValue(d, $xScale, x ? _x : $contextX))
|
|
63
|
+
.radius((d) => getScaleValue(d, $yScale, y ? _y : $contextY))
|
|
58
64
|
: d3Line()
|
|
59
|
-
.x((d) => getScaleValue(d, $xScale, x
|
|
60
|
-
.y((d) => getScaleValue(d, $yScale, y
|
|
65
|
+
.x((d) => getScaleValue(d, $xScale, x ? _x : $contextX) + xOffset)
|
|
66
|
+
.y((d) => getScaleValue(d, $yScale, y ? _y : $contextY) + yOffset);
|
|
61
67
|
if (curve)
|
|
62
68
|
path.curve(curve);
|
|
63
69
|
if (defined)
|
|
@@ -2,14 +2,15 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import { tweened as tweenedStore } from 'svelte/motion';
|
|
3
3
|
import { draw as _drawTransition } from 'svelte/transition';
|
|
4
4
|
import type { CurveFactory, CurveFactoryLineOnly, Line } from 'd3-shape';
|
|
5
|
+
import { type Accessor } from '../utils/common.js';
|
|
5
6
|
declare const __propDef: {
|
|
6
7
|
props: {
|
|
7
8
|
[x: string]: any;
|
|
8
9
|
data?: any;
|
|
9
10
|
pathData?: string | undefined | null;
|
|
10
|
-
radial?: boolean;
|
|
11
|
-
x?:
|
|
12
|
-
y?:
|
|
11
|
+
radial?: boolean | undefined;
|
|
12
|
+
x?: Accessor;
|
|
13
|
+
y?: Accessor;
|
|
13
14
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
14
15
|
draw?: boolean | Parameters<typeof _drawTransition>[1];
|
|
15
16
|
curve?: CurveFactory | CurveFactoryLineOnly | undefined;
|
|
@@ -3,19 +3,19 @@ import type { spring as springStore, tweened as tweenedStore } from 'svelte/moti
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
value?: string | number;
|
|
6
|
+
value?: (string | number) | undefined;
|
|
7
7
|
width?: number | undefined;
|
|
8
|
-
x?: string | number;
|
|
9
|
-
initialX?: string | number;
|
|
10
|
-
y?: string | number;
|
|
11
|
-
initialY?: string | number;
|
|
12
|
-
dx?: string | number;
|
|
13
|
-
dy?: string | number;
|
|
14
|
-
lineHeight?: string;
|
|
15
|
-
capHeight?: string;
|
|
16
|
-
scaleToFit?: boolean;
|
|
17
|
-
textAnchor?: "start" | "middle" | "end" | "inherit";
|
|
18
|
-
verticalAnchor?: "start" | "middle" | "end" | "inherit";
|
|
8
|
+
x?: (string | number) | undefined;
|
|
9
|
+
initialX?: (string | number) | undefined;
|
|
10
|
+
y?: (string | number) | undefined;
|
|
11
|
+
initialY?: (string | number) | undefined;
|
|
12
|
+
dx?: (string | number) | undefined;
|
|
13
|
+
dy?: (string | number) | undefined;
|
|
14
|
+
lineHeight?: string | undefined;
|
|
15
|
+
capHeight?: string | undefined;
|
|
16
|
+
scaleToFit?: boolean | undefined;
|
|
17
|
+
textAnchor?: ("start" | "middle" | "end" | "inherit") | undefined;
|
|
18
|
+
verticalAnchor?: ("start" | "middle" | "end" | "inherit") | undefined;
|
|
19
19
|
rotate?: number | undefined;
|
|
20
20
|
spring?: boolean | Parameters<typeof springStore>[1];
|
|
21
21
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
@@ -6,49 +6,53 @@
|
|
|
6
6
|
import { area as d3Area, line as d3Line } from 'd3-shape';
|
|
7
7
|
import { min, max } from 'd3-array';
|
|
8
8
|
import { chartContext } from './ChartContext.svelte';
|
|
9
|
+
import { accessor } from '../utils/common.js';
|
|
9
10
|
const { data: contextData, xGet, yGet, yRange } = chartContext();
|
|
10
11
|
// Properties to override what is used from context
|
|
11
12
|
export let data = undefined; // TODO: Update Type
|
|
12
|
-
export let x = undefined;
|
|
13
|
-
export let y0 = undefined;
|
|
14
|
-
export let y1 = undefined;
|
|
13
|
+
export let x = undefined;
|
|
14
|
+
export let y0 = undefined;
|
|
15
|
+
export let y1 = undefined;
|
|
15
16
|
export let curve = undefined;
|
|
16
17
|
export let defined = undefined;
|
|
17
18
|
export let id = Math.random().toString(16).slice(-4);
|
|
19
|
+
const _x = accessor(x);
|
|
20
|
+
const _y0 = accessor(y0);
|
|
21
|
+
const _y1 = accessor(y1);
|
|
18
22
|
$: areaPath = d3Area()
|
|
19
|
-
.x(x
|
|
20
|
-
.y0(y0
|
|
21
|
-
.y1(y1
|
|
23
|
+
.x(x ? _x : $xGet)
|
|
24
|
+
.y0(y0 ? _y0 : (d) => $yGet(d)[0])
|
|
25
|
+
.y1(y1 ? _y1 : (d) => $yGet(d)[1]);
|
|
22
26
|
$: if (curve)
|
|
23
27
|
areaPath.curve(curve);
|
|
24
28
|
$: if (defined)
|
|
25
29
|
areaPath.defined(defined);
|
|
26
30
|
$: clipPathBelow = d3Area()
|
|
27
|
-
.x(x
|
|
28
|
-
.y0(y0
|
|
29
|
-
.y1(y1
|
|
31
|
+
.x(x ? _x : $xGet)
|
|
32
|
+
.y0(y0 ? _y0 : (d) => $yGet(d)[0])
|
|
33
|
+
.y1(y1 ? _y1 : (d) => max($yRange));
|
|
30
34
|
$: if (curve)
|
|
31
35
|
clipPathBelow.curve(curve);
|
|
32
36
|
$: if (defined)
|
|
33
37
|
clipPathBelow.defined(defined);
|
|
34
38
|
$: clipPathAbove = d3Area()
|
|
35
|
-
.x(x
|
|
36
|
-
.y0(y0
|
|
37
|
-
.y1(y1
|
|
39
|
+
.x(x ? _x : $xGet)
|
|
40
|
+
.y0(y0 ? _y0 : (d) => max($yRange))
|
|
41
|
+
.y1(y1 ? _y1 : (d) => $yGet(d)[1]);
|
|
38
42
|
$: if (curve)
|
|
39
43
|
clipPathAbove.curve(curve);
|
|
40
44
|
$: if (defined)
|
|
41
45
|
clipPathAbove.defined(defined);
|
|
42
46
|
$: linePathAbove = d3Line()
|
|
43
|
-
.x(x
|
|
44
|
-
.y(y0
|
|
47
|
+
.x(x ? _x : $xGet)
|
|
48
|
+
.y(y0 ? _y0 : (d) => $yGet(d)[0]);
|
|
45
49
|
$: if (curve)
|
|
46
50
|
linePathAbove.curve(curve);
|
|
47
51
|
$: if (defined)
|
|
48
52
|
linePathAbove.defined(defined);
|
|
49
53
|
$: linePathBelow = d3Line()
|
|
50
|
-
.x(x
|
|
51
|
-
.y(y1
|
|
54
|
+
.x(x ? _x : $xGet)
|
|
55
|
+
.y(y1 ? _y1 : (d) => $yGet(d)[1]);
|
|
52
56
|
$: if (curve)
|
|
53
57
|
linePathBelow.curve(curve);
|
|
54
58
|
$: if (defined)
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { CurveFactory } from 'd3-shape';
|
|
3
|
+
import { type Accessor } from '../utils/common.js';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
6
|
data?: any;
|
|
6
|
-
x?:
|
|
7
|
-
y0?:
|
|
8
|
-
y1?:
|
|
7
|
+
x?: Accessor;
|
|
8
|
+
y0?: Accessor;
|
|
9
|
+
y1?: Accessor;
|
|
9
10
|
curve?: CurveFactory | undefined;
|
|
10
11
|
defined?: Parameters<{
|
|
11
12
|
(): (d: [number, number], index: number, data: [number, number][]) => boolean;
|
|
@@ -4,19 +4,19 @@ declare const __propDef: {
|
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
x?: "pointer" | "data" | number | undefined;
|
|
6
6
|
y?: "pointer" | "data" | number | undefined;
|
|
7
|
-
xOffset?: number;
|
|
8
|
-
yOffset?: number;
|
|
9
|
-
anchor?: "center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
10
|
-
contained?: "container" | false;
|
|
11
|
-
variant?: "default" | "invert" | "none";
|
|
12
|
-
motion?: boolean;
|
|
7
|
+
xOffset?: number | undefined;
|
|
8
|
+
yOffset?: number | undefined;
|
|
9
|
+
anchor?: ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right") | undefined;
|
|
10
|
+
contained?: ("container" | false) | undefined;
|
|
11
|
+
variant?: ("default" | "invert" | "none") | undefined;
|
|
12
|
+
motion?: boolean | undefined;
|
|
13
13
|
header?: ((data: any) => any) | undefined;
|
|
14
14
|
classes?: {
|
|
15
15
|
root?: string;
|
|
16
16
|
container?: string;
|
|
17
17
|
header?: string;
|
|
18
18
|
content?: string;
|
|
19
|
-
};
|
|
19
|
+
} | undefined;
|
|
20
20
|
};
|
|
21
21
|
events: {
|
|
22
22
|
[evt: string]: CustomEvent<any>;
|
|
@@ -6,11 +6,11 @@ declare const __propDef: {
|
|
|
6
6
|
label: any;
|
|
7
7
|
value?: any;
|
|
8
8
|
format?: FormatType | undefined;
|
|
9
|
-
valueAlign?: "left" | "right" | "center";
|
|
9
|
+
valueAlign?: ("left" | "right" | "center") | undefined;
|
|
10
10
|
classes?: {
|
|
11
11
|
label?: string;
|
|
12
12
|
value?: string;
|
|
13
|
-
};
|
|
13
|
+
} | undefined;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,9 +2,9 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
placement?: "center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
6
|
-
orientation?: "horizontal" | "vertical";
|
|
7
|
-
show?: ("reset" | "center" | "scrollMode" | "zoomIn" | "zoomOut")[];
|
|
5
|
+
placement?: ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right") | undefined;
|
|
6
|
+
orientation?: ("horizontal" | "vertical") | undefined;
|
|
7
|
+
show?: ("reset" | "center" | "scrollMode" | "zoomIn" | "zoomOut")[] | undefined;
|
|
8
8
|
};
|
|
9
9
|
events: {
|
|
10
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -3,11 +3,11 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
element?: HTMLCanvasElement | undefined;
|
|
6
|
-
context?: CanvasRenderingContext2D;
|
|
7
|
-
willReadFrequently?: boolean;
|
|
6
|
+
context?: CanvasRenderingContext2D | undefined;
|
|
7
|
+
willReadFrequently?: boolean | undefined;
|
|
8
8
|
zIndex?: undefined;
|
|
9
9
|
pointerEvents?: boolean | undefined;
|
|
10
|
-
fallback?: string;
|
|
10
|
+
fallback?: string | undefined;
|
|
11
11
|
label?: string | undefined;
|
|
12
12
|
labelledBy?: string | undefined;
|
|
13
13
|
describedBy?: string | undefined;
|
|
@@ -3,14 +3,14 @@ import 'prism-svelte';
|
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
|
-
source?: string | null;
|
|
7
|
-
language?: string;
|
|
8
|
-
highlightedSource?: string;
|
|
6
|
+
source?: (string | null) | undefined;
|
|
7
|
+
language?: string | undefined;
|
|
8
|
+
highlightedSource?: string | undefined;
|
|
9
9
|
classes?: {
|
|
10
10
|
root?: string;
|
|
11
11
|
pre?: string;
|
|
12
12
|
code?: string;
|
|
13
|
-
};
|
|
13
|
+
} | undefined;
|
|
14
14
|
};
|
|
15
15
|
events: {
|
|
16
16
|
[evt: string]: CustomEvent<any>;
|
|
@@ -5,9 +5,9 @@ declare const __propDef: {
|
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
code?: string | undefined;
|
|
7
7
|
data?: any | undefined;
|
|
8
|
-
language?: string;
|
|
9
|
-
highlightedCode?: string;
|
|
10
|
-
showCode?: boolean;
|
|
8
|
+
language?: string | undefined;
|
|
9
|
+
highlightedCode?: string | undefined;
|
|
10
|
+
showCode?: boolean | undefined;
|
|
11
11
|
};
|
|
12
12
|
events: {
|
|
13
13
|
[evt: string]: CustomEvent<any>;
|
package/package.json
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
"author": "Sean Lynch <techniq35@gmail.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "techniq/layerchart",
|
|
7
|
-
"version": "0.43.
|
|
7
|
+
"version": "0.43.8",
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@changesets/cli": "^2.27.
|
|
9
|
+
"@changesets/cli": "^2.27.7",
|
|
10
10
|
"@mdi/js": "^7.4.47",
|
|
11
11
|
"@rollup/plugin-dsv": "^3.0.4",
|
|
12
|
-
"@sveltejs/adapter-
|
|
13
|
-
"@sveltejs/kit": "^2.5.
|
|
12
|
+
"@sveltejs/adapter-cloudflare": "^4.7.0",
|
|
13
|
+
"@sveltejs/kit": "^2.5.20",
|
|
14
14
|
"@sveltejs/package": "^2.3.2",
|
|
15
15
|
"@sveltejs/vite-plugin-svelte": "^3.1.1",
|
|
16
16
|
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
|
|
17
|
-
"@tailwindcss/typography": "^0.5.
|
|
17
|
+
"@tailwindcss/typography": "^0.5.14",
|
|
18
18
|
"@types/d3-array": "^3.2.1",
|
|
19
19
|
"@types/d3-color": "^3.1.3",
|
|
20
20
|
"@types/d3-delaunay": "^6.0.4",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"@types/topojson-client": "^3.1.4",
|
|
39
39
|
"@types/topojson-simplify": "^3.0.3",
|
|
40
40
|
"@types/topojson-specification": "^1.0.5",
|
|
41
|
-
"autoprefixer": "^10.4.
|
|
42
|
-
"marked": "^
|
|
41
|
+
"autoprefixer": "^10.4.20",
|
|
42
|
+
"marked": "^14.0.0",
|
|
43
43
|
"mdsvex": "^0.11.2",
|
|
44
44
|
"posthog-js": "^1.95.1",
|
|
45
|
-
"prettier": "^3.3.
|
|
46
|
-
"prettier-plugin-svelte": "^3.2.
|
|
45
|
+
"prettier": "^3.3.3",
|
|
46
|
+
"prettier-plugin-svelte": "^3.2.6",
|
|
47
47
|
"prism-svelte": "^0.5.0",
|
|
48
48
|
"prism-themes": "^1.9.0",
|
|
49
49
|
"prismjs": "^1.29.0",
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
"shapefile": "^0.6.6",
|
|
52
52
|
"solar-calculator": "^0.3.0",
|
|
53
53
|
"svelte": "^4.2.18",
|
|
54
|
-
"svelte-check": "^3.8.
|
|
54
|
+
"svelte-check": "^3.8.5",
|
|
55
55
|
"svelte-json-tree": "^2.2.0",
|
|
56
|
-
"svelte-preprocess": "^6.0.
|
|
57
|
-
"svelte2tsx": "^0.7.
|
|
58
|
-
"tailwindcss": "^3.4.
|
|
56
|
+
"svelte-preprocess": "^6.0.2",
|
|
57
|
+
"svelte2tsx": "^0.7.15",
|
|
58
|
+
"tailwindcss": "^3.4.9",
|
|
59
59
|
"topojson-client": "^3.1.0",
|
|
60
60
|
"topojson-simplify": "^3.0.3",
|
|
61
61
|
"tslib": "^2.6.3",
|
|
62
|
-
"typescript": "^5.5.
|
|
62
|
+
"typescript": "^5.5.4",
|
|
63
63
|
"unist-util-visit": "^5.0.0",
|
|
64
64
|
"us-atlas": "^3.0.1",
|
|
65
|
-
"vite": "^5.
|
|
65
|
+
"vite": "^5.4.0"
|
|
66
66
|
},
|
|
67
67
|
"type": "module",
|
|
68
68
|
"dependencies": {
|
|
@@ -86,11 +86,11 @@
|
|
|
86
86
|
"d3-tile": "^1.0.0",
|
|
87
87
|
"d3-time": "^3.1.0",
|
|
88
88
|
"date-fns": "^3.6.0",
|
|
89
|
-
"layercake": "^8.3.
|
|
89
|
+
"layercake": "^8.3.4",
|
|
90
90
|
"lodash-es": "^4.17.21",
|
|
91
|
-
"posthog-js": "^1.
|
|
91
|
+
"posthog-js": "^1.154.5",
|
|
92
92
|
"shapefile": "^0.6.6",
|
|
93
|
-
"svelte-ux": "^0.
|
|
93
|
+
"svelte-ux": "^0.74.3",
|
|
94
94
|
"topojson-client": "^3.1.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|