layerchart 0.59.6 → 0.60.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Brush.svelte.d.ts +1 -1
- package/dist/components/Calendar.svelte.d.ts +1 -1
- package/dist/components/ClipPath.svelte.d.ts +1 -1
- package/dist/components/ColorRamp.svelte.d.ts +2 -2
- package/dist/components/Dagre.svelte +151 -0
- package/dist/components/Dagre.svelte.d.ts +85 -0
- package/dist/components/GeoPath.svelte.d.ts +6 -6
- package/dist/components/Graticule.svelte.d.ts +28 -4
- package/dist/components/Hull.svelte.d.ts +1 -3
- package/dist/components/Labels.svelte.d.ts +1 -1
- package/dist/components/Legend.svelte.d.ts +4 -4
- package/dist/components/LinearGradient.svelte.d.ts +3 -3
- package/dist/components/Marker.svelte.d.ts +7 -7
- package/dist/components/Points.svelte.d.ts +5 -5
- package/dist/components/RadialGradient.svelte.d.ts +4 -4
- package/dist/components/Spline.svelte +0 -2
- package/dist/components/TransformControls.svelte +8 -1
- package/dist/components/TransformControls.svelte.d.ts +2 -1
- package/dist/components/charts/PieChart.svelte.d.ts +4 -4
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/layout/Canvas.svelte.d.ts +4 -4
- package/dist/components/layout/Html.svelte.d.ts +5 -5
- package/dist/components/layout/Svg.svelte.d.ts +7 -7
- package/dist/components/tooltip/Tooltip.svelte.d.ts +4 -4
- package/dist/components/tooltip/TooltipHeader.svelte.d.ts +1 -1
- package/dist/components/tooltip/TooltipItem.svelte.d.ts +2 -2
- package/dist/docs/Code.svelte.d.ts +1 -1
- package/dist/docs/CurveMenuField.svelte +8 -1
- package/dist/docs/CurveMenuField.svelte.d.ts +2 -1
- package/dist/docs/Preview.svelte.d.ts +1 -1
- package/dist/utils/graph.d.ts +9 -0
- package/dist/utils/graph.js +29 -0
- package/dist/utils/graph.test.d.ts +1 -0
- package/dist/utils/graph.test.js +84 -0
- package/package.json +18 -17
- package/dist/components/Arc.svelte.d.ts +0 -47
- package/dist/components/Area.svelte.d.ts +0 -36
- package/dist/components/Axis.svelte.d.ts +0 -49
- package/dist/components/Bar.svelte.d.ts +0 -38
- package/dist/components/Bars.svelte.d.ts +0 -34
- package/dist/components/Circle.svelte.d.ts +0 -29
- package/dist/components/CircleClipPath.svelte.d.ts +0 -28
- package/dist/components/Grid.svelte.d.ts +0 -35
- package/dist/components/Group.svelte.d.ts +0 -33
- package/dist/components/Highlight.svelte.d.ts +0 -78
- package/dist/components/Line.svelte.d.ts +0 -43
- package/dist/components/Link.svelte.d.ts +0 -48
- package/dist/components/Rect.svelte.d.ts +0 -39
- package/dist/components/RectClipPath.svelte.d.ts +0 -30
- package/dist/components/Spline.svelte.d.ts +0 -55
- package/dist/components/Text.svelte.d.ts +0 -33
- package/dist/components/charts/AreaChart.svelte.d.ts +0 -334
- package/dist/components/charts/BarChart.svelte.d.ts +0 -320
- package/dist/components/charts/LineChart.svelte.d.ts +0 -331
- package/dist/components/charts/ScatterChart.svelte.d.ts +0 -307
|
@@ -2,13 +2,13 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
x?: "pointer" | "data" | number | undefined;
|
|
6
|
-
y?: "pointer" | "data" | number | undefined;
|
|
5
|
+
x?: "pointer" | "data" | number | undefined | undefined;
|
|
6
|
+
y?: "pointer" | "data" | number | undefined | undefined;
|
|
7
7
|
xOffset?: number | undefined;
|
|
8
8
|
yOffset?: number | undefined;
|
|
9
9
|
anchor?: ("center" | "left" | "right" | "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right") | undefined;
|
|
10
|
-
contained?:
|
|
11
|
-
variant?:
|
|
10
|
+
contained?: "container" | false | undefined;
|
|
11
|
+
variant?: "default" | "invert" | "none" | undefined;
|
|
12
12
|
motion?: boolean | undefined;
|
|
13
13
|
classes?: {
|
|
14
14
|
root?: string;
|
|
@@ -6,8 +6,8 @@ declare const __propDef: {
|
|
|
6
6
|
label: any;
|
|
7
7
|
value?: any;
|
|
8
8
|
format?: FormatType | undefined;
|
|
9
|
-
valueAlign?:
|
|
10
|
-
color?: string | undefined;
|
|
9
|
+
valueAlign?: "left" | "right" | "center" | undefined;
|
|
10
|
+
color?: string | undefined | undefined;
|
|
11
11
|
classes?: {
|
|
12
12
|
root?: string;
|
|
13
13
|
label?: string;
|
package/dist/utils/graph.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SankeyExtraProperties, SankeyGraph, SankeyLink, SankeyNodeMinimal } from 'd3-sankey';
|
|
2
2
|
import type { hierarchy as d3Hierarchy } from 'd3-hierarchy';
|
|
3
|
+
import dagre from '@dagrejs/dagre';
|
|
3
4
|
/**
|
|
4
5
|
* Convert CSV rows in format: 'source,target,value' to SankeyGraph
|
|
5
6
|
*/
|
|
@@ -26,3 +27,11 @@ export declare function graphFromNode(node: SankeyNodeMinimal<any, any>): {
|
|
|
26
27
|
* Get distinct nodes from link.source and link.target
|
|
27
28
|
*/
|
|
28
29
|
export declare function nodesFromLinks<N extends SankeyExtraProperties, L extends SankeyExtraProperties>(links: Array<SankeyLink<N, L>>): any[];
|
|
30
|
+
/**
|
|
31
|
+
* Get all upstream predecessors for dagre nodeId
|
|
32
|
+
*/
|
|
33
|
+
export declare function ancestors(graph: dagre.graphlib.Graph, nodeId: string, maxDepth?: number, currentDepth?: number): dagre.Node[];
|
|
34
|
+
/**
|
|
35
|
+
* Get all downstream descendants for dagre nodeId
|
|
36
|
+
*/
|
|
37
|
+
export declare function descendants(graph: dagre.graphlib.Graph, nodeId: string, maxDepth?: number, currentDepth?: number): dagre.Node[];
|
package/dist/utils/graph.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { csvParseRows } from 'd3-dsv';
|
|
2
|
+
import dagre from '@dagrejs/dagre';
|
|
2
3
|
/**
|
|
3
4
|
* Convert CSV rows in format: 'source,target,value' to SankeyGraph
|
|
4
5
|
*/
|
|
@@ -64,3 +65,31 @@ export function nodesFromLinks(links) {
|
|
|
64
65
|
}
|
|
65
66
|
return Array.from(nodesByName.values());
|
|
66
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Get all upstream predecessors for dagre nodeId
|
|
70
|
+
*/
|
|
71
|
+
export function ancestors(graph, nodeId, maxDepth = Infinity, currentDepth = 0) {
|
|
72
|
+
if (currentDepth === maxDepth) {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
75
|
+
const predecessors = graph.predecessors(nodeId) ?? [];
|
|
76
|
+
return [
|
|
77
|
+
...predecessors,
|
|
78
|
+
// @ts-expect-error: Types from dagre appear incorrect
|
|
79
|
+
...predecessors.flatMap((pId) => ancestors(graph, pId, maxDepth, currentDepth + 1)),
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get all downstream descendants for dagre nodeId
|
|
84
|
+
*/
|
|
85
|
+
export function descendants(graph, nodeId, maxDepth = Infinity, currentDepth = 0) {
|
|
86
|
+
if (currentDepth === maxDepth) {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
const predecessors = graph.successors(nodeId) ?? [];
|
|
90
|
+
return [
|
|
91
|
+
...predecessors,
|
|
92
|
+
// @ts-expect-error: Types from dagre appear incorrect
|
|
93
|
+
...predecessors.flatMap((pId) => descendants(graph, pId, maxDepth, currentDepth + 1)),
|
|
94
|
+
];
|
|
95
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import dagre from '@dagrejs/dagre';
|
|
3
|
+
import { ancestors, descendants } from './graph.js';
|
|
4
|
+
const exampleGraph = {
|
|
5
|
+
nodes: [
|
|
6
|
+
{ id: 'A' },
|
|
7
|
+
{ id: 'B' },
|
|
8
|
+
{ id: 'C' },
|
|
9
|
+
{ id: 'D' },
|
|
10
|
+
{ id: 'E' },
|
|
11
|
+
{ id: 'F' },
|
|
12
|
+
{ id: 'G' },
|
|
13
|
+
{ id: 'H' },
|
|
14
|
+
{ id: 'I' },
|
|
15
|
+
],
|
|
16
|
+
edges: [
|
|
17
|
+
{ source: 'A', target: 'B' },
|
|
18
|
+
{ source: 'C', target: 'B' },
|
|
19
|
+
{ source: 'B', target: 'E' },
|
|
20
|
+
{ source: 'B', target: 'F' },
|
|
21
|
+
{ source: 'D', target: 'E' },
|
|
22
|
+
{ source: 'D', target: 'F' },
|
|
23
|
+
{ source: 'E', target: 'H' },
|
|
24
|
+
{ source: 'G', target: 'H' },
|
|
25
|
+
{ source: 'H', target: 'I' },
|
|
26
|
+
],
|
|
27
|
+
};
|
|
28
|
+
function buildGraph(data) {
|
|
29
|
+
const g = new dagre.graphlib.Graph();
|
|
30
|
+
g.setGraph({});
|
|
31
|
+
data.nodes.forEach((n) => {
|
|
32
|
+
g.setNode(n.id, {
|
|
33
|
+
label: n.id,
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
data.edges.forEach((e) => {
|
|
37
|
+
g.setEdge(e.source, e.target);
|
|
38
|
+
});
|
|
39
|
+
return g;
|
|
40
|
+
}
|
|
41
|
+
describe('accessors', () => {
|
|
42
|
+
it('start of graph ', () => {
|
|
43
|
+
const graph = buildGraph(exampleGraph);
|
|
44
|
+
const actual = ancestors(graph, 'A');
|
|
45
|
+
expect(actual).length(0);
|
|
46
|
+
});
|
|
47
|
+
it('middle of graph ', () => {
|
|
48
|
+
const graph = buildGraph(exampleGraph);
|
|
49
|
+
const actual = ancestors(graph, 'E');
|
|
50
|
+
expect(actual).to.have.members(['A', 'B', 'C', 'D']);
|
|
51
|
+
});
|
|
52
|
+
it('end of graph ', () => {
|
|
53
|
+
const graph = buildGraph(exampleGraph);
|
|
54
|
+
const actual = ancestors(graph, 'I');
|
|
55
|
+
expect(actual).to.have.members(['A', 'B', 'C', 'D', 'E', 'G', 'H']);
|
|
56
|
+
});
|
|
57
|
+
it('max depth', () => {
|
|
58
|
+
const graph = buildGraph(exampleGraph);
|
|
59
|
+
const actual = ancestors(graph, 'H', 2);
|
|
60
|
+
expect(actual).to.have.members(['B', 'D', 'E', 'G']);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
describe('descendants', () => {
|
|
64
|
+
it('start of graph ', () => {
|
|
65
|
+
const graph = buildGraph(exampleGraph);
|
|
66
|
+
const actual = descendants(graph, 'A');
|
|
67
|
+
expect(actual).to.have.members(['B', 'E', 'F', 'H', 'I']);
|
|
68
|
+
});
|
|
69
|
+
it('middle of graph ', () => {
|
|
70
|
+
const graph = buildGraph(exampleGraph);
|
|
71
|
+
const actual = descendants(graph, 'E');
|
|
72
|
+
expect(actual).to.have.members(['H', 'I']);
|
|
73
|
+
});
|
|
74
|
+
it('end of graph ', () => {
|
|
75
|
+
const graph = buildGraph(exampleGraph);
|
|
76
|
+
const actual = descendants(graph, 'I');
|
|
77
|
+
expect(actual).length(0);
|
|
78
|
+
});
|
|
79
|
+
it('max depth', () => {
|
|
80
|
+
const graph = buildGraph(exampleGraph);
|
|
81
|
+
const actual = descendants(graph, 'B', 2);
|
|
82
|
+
expect(actual).to.have.members(['E', 'F', 'H']);
|
|
83
|
+
});
|
|
84
|
+
});
|
package/package.json
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
"author": "Sean Lynch <techniq35@gmail.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "techniq/layerchart",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.60.1",
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@changesets/cli": "^2.27.10",
|
|
10
10
|
"@mdi/js": "^7.4.47",
|
|
11
11
|
"@rollup/plugin-dsv": "^3.0.5",
|
|
12
|
-
"@sveltejs/adapter-cloudflare": "^4.
|
|
13
|
-
"@sveltejs/kit": "^2.
|
|
12
|
+
"@sveltejs/adapter-cloudflare": "^4.8.0",
|
|
13
|
+
"@sveltejs/kit": "^2.11.1",
|
|
14
14
|
"@sveltejs/package": "^2.3.7",
|
|
15
|
-
"@sveltejs/vite-plugin-svelte": "^
|
|
15
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.2",
|
|
16
16
|
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
|
|
17
17
|
"@tailwindcss/typography": "^0.5.15",
|
|
18
18
|
"@types/d3-array": "^3.2.1",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"@types/d3-random": "^3.0.3",
|
|
30
30
|
"@types/d3-sankey": "^0.12.4",
|
|
31
31
|
"@types/d3-scale": "^4.0.8",
|
|
32
|
-
"@types/d3-scale-chromatic": "^3.0
|
|
32
|
+
"@types/d3-scale-chromatic": "^3.1.0",
|
|
33
33
|
"@types/d3-shape": "^3.1.6",
|
|
34
|
-
"@types/d3-time": "^3.0.
|
|
34
|
+
"@types/d3-time": "^3.0.4",
|
|
35
35
|
"@types/lodash-es": "^4.17.12",
|
|
36
36
|
"@types/prismjs": "^1.26.5",
|
|
37
37
|
"@types/shapefile": "^0.6.4",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@types/topojson-simplify": "^3.0.3",
|
|
40
40
|
"@types/topojson-specification": "^1.0.5",
|
|
41
41
|
"autoprefixer": "^10.4.20",
|
|
42
|
-
"marked": "^15.0.
|
|
42
|
+
"marked": "^15.0.3",
|
|
43
43
|
"mdsvex": "^0.12.3",
|
|
44
44
|
"posthog-js": "^1.95.1",
|
|
45
|
-
"prettier": "^3.
|
|
45
|
+
"prettier": "^3.4.2",
|
|
46
46
|
"prettier-plugin-svelte": "^3.3.2",
|
|
47
47
|
"prism-svelte": "^0.5.0",
|
|
48
48
|
"prism-themes": "^1.9.0",
|
|
@@ -50,23 +50,24 @@
|
|
|
50
50
|
"rehype-slug": "^6.0.0",
|
|
51
51
|
"shapefile": "^0.6.6",
|
|
52
52
|
"solar-calculator": "^0.3.0",
|
|
53
|
-
"svelte": "^5.
|
|
54
|
-
"svelte-check": "^4.1.
|
|
53
|
+
"svelte": "^5.13.0",
|
|
54
|
+
"svelte-check": "^4.1.1",
|
|
55
55
|
"svelte-json-tree": "^2.2.0",
|
|
56
|
-
"svelte-ux": "^0.
|
|
57
|
-
"svelte2tsx": "^0.7.
|
|
58
|
-
"tailwindcss": "^3.4.
|
|
56
|
+
"svelte-ux": "^0.76.0",
|
|
57
|
+
"svelte2tsx": "^0.7.30",
|
|
58
|
+
"tailwindcss": "^3.4.16",
|
|
59
59
|
"topojson-client": "^3.1.0",
|
|
60
60
|
"topojson-simplify": "^3.0.3",
|
|
61
61
|
"tslib": "^2.8.1",
|
|
62
|
-
"typescript": "^5.
|
|
62
|
+
"typescript": "^5.7.2",
|
|
63
63
|
"unist-util-visit": "^5.0.0",
|
|
64
64
|
"us-atlas": "^3.0.1",
|
|
65
|
-
"vite": "^
|
|
66
|
-
"vitest": "^2.1.
|
|
65
|
+
"vite": "^6.0.3",
|
|
66
|
+
"vitest": "^2.1.8"
|
|
67
67
|
},
|
|
68
68
|
"type": "module",
|
|
69
69
|
"dependencies": {
|
|
70
|
+
"@dagrejs/dagre": "^1.1.4",
|
|
70
71
|
"@layerstack/svelte-actions": "^0.0.9",
|
|
71
72
|
"@layerstack/svelte-stores": "^0.0.9",
|
|
72
73
|
"@layerstack/tailwind": "^0.0.11",
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
"date-fns": "^4.1.0",
|
|
94
95
|
"layercake": "^8.4.2",
|
|
95
96
|
"lodash-es": "^4.17.21",
|
|
96
|
-
"posthog-js": "^1.
|
|
97
|
+
"posthog-js": "^1.200.1",
|
|
97
98
|
"shapefile": "^0.6.6",
|
|
98
99
|
"topojson-client": "^3.1.0"
|
|
99
100
|
},
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { SVGAttributes } from 'svelte/elements';
|
|
3
|
-
import type { spring as springStore, tweened as tweenedStore } from 'svelte/motion';
|
|
4
|
-
import type { TooltipContextValue } from './tooltip/TooltipContext.svelte';
|
|
5
|
-
declare const __propDef: {
|
|
6
|
-
props: {
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
spring?: boolean | Parameters<typeof springStore>[1];
|
|
9
|
-
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
10
|
-
value?: number | undefined;
|
|
11
|
-
initialValue?: number | undefined;
|
|
12
|
-
domain?: number[] | undefined;
|
|
13
|
-
range?: number[] | undefined;
|
|
14
|
-
startAngle?: number | undefined;
|
|
15
|
-
endAngle?: number | undefined;
|
|
16
|
-
innerRadius?: number | undefined;
|
|
17
|
-
outerRadius?: number | undefined;
|
|
18
|
-
cornerRadius?: number | undefined;
|
|
19
|
-
padAngle?: number | undefined;
|
|
20
|
-
track?: (boolean | SVGAttributes<SVGPathElement>) | undefined;
|
|
21
|
-
offset?: number | undefined;
|
|
22
|
-
tooltip?: TooltipContextValue | undefined;
|
|
23
|
-
data?: any;
|
|
24
|
-
};
|
|
25
|
-
events: {
|
|
26
|
-
click: MouseEvent;
|
|
27
|
-
pointerenter: PointerEvent;
|
|
28
|
-
pointermove: PointerEvent;
|
|
29
|
-
pointerleave: PointerEvent;
|
|
30
|
-
touchmove: TouchEvent;
|
|
31
|
-
} & {
|
|
32
|
-
[evt: string]: CustomEvent<any>;
|
|
33
|
-
};
|
|
34
|
-
slots: {
|
|
35
|
-
default: {
|
|
36
|
-
value: number;
|
|
37
|
-
centroid: any;
|
|
38
|
-
boundingBox: DOMRect;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
export type ArcProps = typeof __propDef.props;
|
|
43
|
-
export type ArcEvents = typeof __propDef.events;
|
|
44
|
-
export type ArcSlots = typeof __propDef.slots;
|
|
45
|
-
export default class Arc extends SvelteComponentTyped<ArcProps, ArcEvents, ArcSlots> {
|
|
46
|
-
}
|
|
47
|
-
export {};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { type ComponentProps } from 'svelte';
|
|
3
|
-
import type { tweened as tweenedStore } from 'svelte/motion';
|
|
4
|
-
import { type Area } from 'd3-shape';
|
|
5
|
-
import type { CurveFactory } from 'd3-shape';
|
|
6
|
-
import Spline from './Spline.svelte';
|
|
7
|
-
import { type Accessor } from '../utils/common.js';
|
|
8
|
-
declare const __propDef: {
|
|
9
|
-
props: {
|
|
10
|
-
[x: string]: any;
|
|
11
|
-
data?: any;
|
|
12
|
-
pathData?: string | undefined | null;
|
|
13
|
-
x?: Accessor;
|
|
14
|
-
y0?: Accessor;
|
|
15
|
-
y1?: Accessor;
|
|
16
|
-
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
17
|
-
clipPath?: string | undefined;
|
|
18
|
-
curve?: CurveFactory | undefined;
|
|
19
|
-
defined?: Parameters<Area<any>["defined"]>[0] | undefined;
|
|
20
|
-
line?: (boolean | Partial<ComponentProps<Spline>>) | undefined;
|
|
21
|
-
};
|
|
22
|
-
events: {
|
|
23
|
-
click: MouseEvent;
|
|
24
|
-
pointermove: PointerEvent;
|
|
25
|
-
pointerleave: PointerEvent;
|
|
26
|
-
} & {
|
|
27
|
-
[evt: string]: CustomEvent<any>;
|
|
28
|
-
};
|
|
29
|
-
slots: {};
|
|
30
|
-
};
|
|
31
|
-
export type AreaProps = typeof __propDef.props;
|
|
32
|
-
export type AreaEvents = typeof __propDef.events;
|
|
33
|
-
export type AreaSlots = typeof __propDef.slots;
|
|
34
|
-
export default class Area extends SvelteComponentTyped<AreaProps, AreaEvents, AreaSlots> {
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { type ComponentProps } from 'svelte';
|
|
3
|
-
import { fade } from 'svelte/transition';
|
|
4
|
-
import type { SVGAttributes } from 'svelte/elements';
|
|
5
|
-
import type { spring as springStore, tweened as tweenedStore } from 'svelte/motion';
|
|
6
|
-
import { type FormatType } from '@layerstack/utils';
|
|
7
|
-
import type { TransitionParams } from 'svelte-ux';
|
|
8
|
-
import Rule from './Rule.svelte';
|
|
9
|
-
import Text from './Text.svelte';
|
|
10
|
-
import { type AnyScale } from '../utils/scales.js';
|
|
11
|
-
declare const __propDef: {
|
|
12
|
-
props: {
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
placement: "top" | "bottom" | "left" | "right" | "angle" | "radius";
|
|
15
|
-
label?: string | undefined;
|
|
16
|
-
labelPlacement?: ("start" | "middle" | "end") | undefined;
|
|
17
|
-
labelProps?: Partial<ComponentProps<Text>> | undefined;
|
|
18
|
-
rule?: (boolean | Partial<ComponentProps<Rule>>) | undefined;
|
|
19
|
-
grid?: (boolean | Pick<SVGAttributes<SVGElement>, "class" | "style">) | undefined;
|
|
20
|
-
ticks?: number | any[] | ((scale: AnyScale) => any) | null | undefined;
|
|
21
|
-
tickLength?: number | undefined;
|
|
22
|
-
format?: FormatType | undefined;
|
|
23
|
-
tickLabelProps?: Partial<ComponentProps<Text>> | undefined;
|
|
24
|
-
spring?: boolean | Parameters<typeof springStore>[1];
|
|
25
|
-
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
26
|
-
transitionIn?: (typeof fade | (() => {})) | undefined;
|
|
27
|
-
transitionInParams?: TransitionParams | undefined;
|
|
28
|
-
scale?: any;
|
|
29
|
-
classes?: {
|
|
30
|
-
root?: string;
|
|
31
|
-
label?: string;
|
|
32
|
-
} | undefined;
|
|
33
|
-
};
|
|
34
|
-
events: {
|
|
35
|
-
[evt: string]: CustomEvent<any>;
|
|
36
|
-
};
|
|
37
|
-
slots: {
|
|
38
|
-
tickLabel: {
|
|
39
|
-
labelProps: any;
|
|
40
|
-
index: any;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export type AxisProps = typeof __propDef.props;
|
|
45
|
-
export type AxisEvents = typeof __propDef.events;
|
|
46
|
-
export type AxisSlots = typeof __propDef.slots;
|
|
47
|
-
export default class Axis extends SvelteComponentTyped<AxisProps, AxisEvents, AxisSlots> {
|
|
48
|
-
}
|
|
49
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { type ComponentProps } from 'svelte';
|
|
3
|
-
import Rect from './Rect.svelte';
|
|
4
|
-
import { type Accessor } from '../utils/common.js';
|
|
5
|
-
declare const __propDef: {
|
|
6
|
-
props: {
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
bar: Object;
|
|
9
|
-
x?: Accessor;
|
|
10
|
-
y?: Accessor;
|
|
11
|
-
x1?: Accessor;
|
|
12
|
-
y1?: Accessor;
|
|
13
|
-
fill?: string | undefined;
|
|
14
|
-
stroke?: string | undefined;
|
|
15
|
-
strokeWidth?: number | undefined;
|
|
16
|
-
radius?: number | undefined;
|
|
17
|
-
rounded?: ("all" | "none" | "edge" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right") | undefined;
|
|
18
|
-
inset?: number | undefined;
|
|
19
|
-
spring?: ComponentProps<Rect>["spring"];
|
|
20
|
-
tweened?: ComponentProps<Rect>["tweened"];
|
|
21
|
-
};
|
|
22
|
-
events: {
|
|
23
|
-
click: MouseEvent;
|
|
24
|
-
pointerenter: PointerEvent;
|
|
25
|
-
pointermove: PointerEvent;
|
|
26
|
-
pointerleave: PointerEvent;
|
|
27
|
-
touchmove: CustomEvent<any>;
|
|
28
|
-
} & {
|
|
29
|
-
[evt: string]: CustomEvent<any>;
|
|
30
|
-
};
|
|
31
|
-
slots: {};
|
|
32
|
-
};
|
|
33
|
-
export type BarProps = typeof __propDef.props;
|
|
34
|
-
export type BarEvents = typeof __propDef.events;
|
|
35
|
-
export type BarSlots = typeof __propDef.slots;
|
|
36
|
-
export default class Bar extends SvelteComponentTyped<BarProps, BarEvents, BarSlots> {
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { type ComponentProps } from 'svelte';
|
|
3
|
-
import Rect from './Rect.svelte';
|
|
4
|
-
import { type Accessor } from '../utils/common.js';
|
|
5
|
-
declare const __propDef: {
|
|
6
|
-
props: {
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
data?: any;
|
|
9
|
-
x?: Accessor;
|
|
10
|
-
y?: Accessor;
|
|
11
|
-
x1?: Accessor;
|
|
12
|
-
y1?: Accessor;
|
|
13
|
-
stroke?: string | undefined;
|
|
14
|
-
strokeWidth?: number | undefined;
|
|
15
|
-
radius?: number | undefined;
|
|
16
|
-
fill?: string | undefined;
|
|
17
|
-
inset?: number | undefined;
|
|
18
|
-
key?: ((d: any, index: number) => any) | undefined;
|
|
19
|
-
spring?: ComponentProps<Rect>["spring"];
|
|
20
|
-
tweened?: ComponentProps<Rect>["tweened"];
|
|
21
|
-
};
|
|
22
|
-
events: {
|
|
23
|
-
[evt: string]: CustomEvent<any>;
|
|
24
|
-
};
|
|
25
|
-
slots: {
|
|
26
|
-
default: {};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export type BarsProps = typeof __propDef.props;
|
|
30
|
-
export type BarsEvents = typeof __propDef.events;
|
|
31
|
-
export type BarsSlots = typeof __propDef.slots;
|
|
32
|
-
export default class Bars extends SvelteComponentTyped<BarsProps, BarsEvents, BarsSlots> {
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { spring as springStore, tweened as tweenedStore } from 'svelte/motion';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
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
|
-
spring?: boolean | Parameters<typeof springStore>[1];
|
|
13
|
-
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
14
|
-
};
|
|
15
|
-
events: {
|
|
16
|
-
click: MouseEvent;
|
|
17
|
-
pointermove: PointerEvent;
|
|
18
|
-
pointerleave: PointerEvent;
|
|
19
|
-
} & {
|
|
20
|
-
[evt: string]: CustomEvent<any>;
|
|
21
|
-
};
|
|
22
|
-
slots: {};
|
|
23
|
-
};
|
|
24
|
-
export type CircleProps = typeof __propDef.props;
|
|
25
|
-
export type CircleEvents = typeof __propDef.events;
|
|
26
|
-
export type CircleSlots = typeof __propDef.slots;
|
|
27
|
-
export default class Circle extends SvelteComponentTyped<CircleProps, CircleEvents, CircleSlots> {
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { spring as springStore, tweened as tweenedStore } from 'svelte/motion';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
id?: string | undefined;
|
|
7
|
-
cx?: number | undefined;
|
|
8
|
-
cy?: number | undefined;
|
|
9
|
-
r: number;
|
|
10
|
-
spring?: boolean | Parameters<typeof springStore>[1];
|
|
11
|
-
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
12
|
-
};
|
|
13
|
-
events: {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
};
|
|
16
|
-
slots: {
|
|
17
|
-
default: {
|
|
18
|
-
id: string;
|
|
19
|
-
url: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export type CircleClipPathProps = typeof __propDef.props;
|
|
24
|
-
export type CircleClipPathEvents = typeof __propDef.events;
|
|
25
|
-
export type CircleClipPathSlots = typeof __propDef.slots;
|
|
26
|
-
export default class CircleClipPath extends SvelteComponentTyped<CircleClipPathProps, CircleClipPathEvents, CircleClipPathSlots> {
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { SVGAttributes } from 'svelte/elements';
|
|
3
|
-
import { fade } from 'svelte/transition';
|
|
4
|
-
import type { spring as springStore, tweened as tweenedStore } from 'svelte/motion';
|
|
5
|
-
import type { TransitionParams } from 'svelte-ux';
|
|
6
|
-
import { type AnyScale } from '../utils/scales.js';
|
|
7
|
-
declare const __propDef: {
|
|
8
|
-
props: {
|
|
9
|
-
[x: string]: any;
|
|
10
|
-
x?: (boolean | Pick<SVGAttributes<SVGElement>, "class" | "style">) | undefined;
|
|
11
|
-
y?: (boolean | Pick<SVGAttributes<SVGElement>, "class" | "style">) | undefined;
|
|
12
|
-
xTicks?: number | any[] | ((scale: AnyScale) => any) | null | undefined;
|
|
13
|
-
yTicks?: number | any[] | ((scale: AnyScale) => any) | null | undefined;
|
|
14
|
-
bandAlign?: ("center" | "between") | undefined;
|
|
15
|
-
radialY?: ("circle" | "linear") | undefined;
|
|
16
|
-
spring?: boolean | Parameters<typeof springStore>[1];
|
|
17
|
-
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
18
|
-
transitionIn?: (typeof fade | (() => {})) | undefined;
|
|
19
|
-
transitionInParams?: TransitionParams | undefined;
|
|
20
|
-
classes?: {
|
|
21
|
-
root?: string;
|
|
22
|
-
line?: string;
|
|
23
|
-
} | undefined;
|
|
24
|
-
};
|
|
25
|
-
events: {
|
|
26
|
-
[evt: string]: CustomEvent<any>;
|
|
27
|
-
};
|
|
28
|
-
slots: {};
|
|
29
|
-
};
|
|
30
|
-
export type GridProps = typeof __propDef.props;
|
|
31
|
-
export type GridEvents = typeof __propDef.events;
|
|
32
|
-
export type GridSlots = typeof __propDef.slots;
|
|
33
|
-
export default class Grid extends SvelteComponentTyped<GridProps, GridEvents, GridSlots> {
|
|
34
|
-
}
|
|
35
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { spring as springStore, tweened as tweenedStore } from 'svelte/motion';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
x?: number | undefined;
|
|
7
|
-
initialX?: number | undefined;
|
|
8
|
-
y?: number | undefined;
|
|
9
|
-
initialY?: number | undefined;
|
|
10
|
-
center?: (boolean | "x" | "y") | undefined;
|
|
11
|
-
preventTouchMove?: boolean | undefined;
|
|
12
|
-
spring?: boolean | Parameters<typeof springStore>[1];
|
|
13
|
-
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
14
|
-
};
|
|
15
|
-
events: {
|
|
16
|
-
click: MouseEvent;
|
|
17
|
-
pointerdown: PointerEvent;
|
|
18
|
-
pointerenter: PointerEvent;
|
|
19
|
-
pointermove: PointerEvent;
|
|
20
|
-
pointerleave: PointerEvent;
|
|
21
|
-
} & {
|
|
22
|
-
[evt: string]: CustomEvent<any>;
|
|
23
|
-
};
|
|
24
|
-
slots: {
|
|
25
|
-
default: {};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export type GroupProps = typeof __propDef.props;
|
|
29
|
-
export type GroupEvents = typeof __propDef.events;
|
|
30
|
-
export type GroupSlots = typeof __propDef.slots;
|
|
31
|
-
export default class Group extends SvelteComponentTyped<GroupProps, GroupEvents, GroupSlots> {
|
|
32
|
-
}
|
|
33
|
-
export {};
|