layerchart 0.50.0 → 0.51.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- Wrapper to allow getting LayerCake context from <Chart> and exposing with a strongly type context getter -->
|
|
2
|
-
<script context="module">import { createScale } from '../
|
|
2
|
+
<script context="module">import { createScale } from '../utils/scales.js';
|
|
3
3
|
import { createEventDispatcher, getContext, onMount, setContext, } from 'svelte';
|
|
4
4
|
import { derived, writable } from 'svelte/store';
|
|
5
5
|
export const chartContextKey = Symbol();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { type AnyScale } from '../
|
|
2
|
+
import { type AnyScale } from '../utils/scales.js';
|
|
3
3
|
import type { HierarchyNode } from 'd3-hierarchy';
|
|
4
4
|
import { type Readable } from 'svelte/store';
|
|
5
5
|
export declare const chartContextKey: unique symbol;
|
|
@@ -98,7 +98,7 @@ declare class __sveltets_Render<TData> {
|
|
|
98
98
|
props(): {
|
|
99
99
|
x1?: import("../utils/common.js").Accessor<TData>;
|
|
100
100
|
x1Scale?: AnyScale<any, any, any, any> | undefined;
|
|
101
|
-
x1Domain?: import("../
|
|
101
|
+
x1Domain?: import("../utils/scales.js").DomainType | undefined;
|
|
102
102
|
x1Range?: string[] | number[] | ((args: {
|
|
103
103
|
xScale: AnyScale;
|
|
104
104
|
width: number;
|
|
@@ -106,7 +106,7 @@ declare class __sveltets_Render<TData> {
|
|
|
106
106
|
}) => number[] | string[]) | undefined;
|
|
107
107
|
y1?: import("../utils/common.js").Accessor<TData>;
|
|
108
108
|
y1Scale?: AnyScale<any, any, any, any> | undefined;
|
|
109
|
-
y1Domain?: import("../
|
|
109
|
+
y1Domain?: import("../utils/scales.js").DomainType | undefined;
|
|
110
110
|
y1Range?: string[] | number[] | ((args: {
|
|
111
111
|
yScale: AnyScale;
|
|
112
112
|
width: number;
|
|
@@ -114,7 +114,7 @@ declare class __sveltets_Render<TData> {
|
|
|
114
114
|
}) => number[] | string[]) | undefined;
|
|
115
115
|
c?: import("../utils/common.js").Accessor<TData>;
|
|
116
116
|
cScale?: AnyScale<any, any, any, any> | undefined;
|
|
117
|
-
cDomain?: import("../
|
|
117
|
+
cDomain?: import("../utils/scales.js").DomainType | undefined;
|
|
118
118
|
cRange?: string[] | undefined;
|
|
119
119
|
/** Use radial instead of cartesian coordinates, mapping `x` to `angle` and `y`` to radial. Radial lines are positioned relative to the origin, use transform (ex. `<Group center>`) to change the origin */ radial?: boolean;
|
|
120
120
|
data?: SankeyGraph<any, any> | TData[] | HierarchyNode<TData> | undefined;
|
|
@@ -55,7 +55,6 @@ export { default as Threshold } from './Threshold.svelte';
|
|
|
55
55
|
export { default as TileImage } from './TileImage.svelte';
|
|
56
56
|
export * as Tooltip from './tooltip/index.js';
|
|
57
57
|
export { default as TransformContext, transformContext } from './TransformContext.svelte';
|
|
58
|
-
export { default as TransformControls } from './TransformControls.svelte';
|
|
59
58
|
export { default as Tree } from './Tree.svelte';
|
|
60
59
|
export { default as Treemap } from './Treemap.svelte';
|
|
61
60
|
export { default as Voronoi } from './Voronoi.svelte';
|
package/dist/components/index.js
CHANGED
|
@@ -56,7 +56,7 @@ export { default as Threshold } from './Threshold.svelte';
|
|
|
56
56
|
export { default as TileImage } from './TileImage.svelte';
|
|
57
57
|
export * as Tooltip from './tooltip/index.js';
|
|
58
58
|
export { default as TransformContext, transformContext } from './TransformContext.svelte';
|
|
59
|
-
export { default as TransformControls } from './TransformControls.svelte';
|
|
59
|
+
// export { default as TransformControls } from './TransformControls.svelte'; // TODO: Restore once no longer using `svelet-ux` or `@mdi/js` (as they are dev dependencies)
|
|
60
60
|
export { default as Tree } from './Tree.svelte';
|
|
61
61
|
export { default as Treemap } from './Treemap.svelte';
|
|
62
62
|
export { default as Voronoi } from './Voronoi.svelte';
|
package/dist/utils/event.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isSVGElement, isSVGGraphicsElement, isSVGSVGElement, isTouchEvent } from '
|
|
1
|
+
import { isSVGElement, isSVGGraphicsElement, isSVGSVGElement, isTouchEvent, } from '@layerstack/utils';
|
|
2
2
|
// See: https://github.com/airbnb/visx/blob/master/packages/visx-event/src/localPointGeneric.ts
|
|
3
3
|
// TODO: Matches event.layerX/Y, but are deprecated (https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/layerX).
|
|
4
4
|
// Similar and could be replaced by event.offsetX/Y (but not identical)
|
package/dist/utils/scales.js
CHANGED
|
@@ -2,7 +2,7 @@ import { derived } from 'svelte/store';
|
|
|
2
2
|
import { tweened, spring } from 'svelte/motion';
|
|
3
3
|
import { motionStore } from '../stores/motionStore.js';
|
|
4
4
|
import { scaleBand } from 'd3-scale';
|
|
5
|
-
import { unique } from '
|
|
5
|
+
import { unique } from '@layerstack/utils/array';
|
|
6
6
|
/**
|
|
7
7
|
* Implemenation for missing `scaleBand().invert()`
|
|
8
8
|
*
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"author": "Sean Lynch <techniq35@gmail.com>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "techniq/layerchart",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.51.0",
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@changesets/cli": "^2.27.7",
|
|
10
10
|
"@mdi/js": "^7.4.47",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
},
|
|
69
69
|
"type": "module",
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@layerstack/svelte-actions": "^0.0.
|
|
72
|
-
"@layerstack/svelte-stores": "^0.0.
|
|
73
|
-
"@layerstack/tailwind": "^0.0.
|
|
74
|
-
"@layerstack/utils": "^0.0.
|
|
71
|
+
"@layerstack/svelte-actions": "^0.0.4",
|
|
72
|
+
"@layerstack/svelte-stores": "^0.0.4",
|
|
73
|
+
"@layerstack/tailwind": "^0.0.6",
|
|
74
|
+
"@layerstack/utils": "^0.0.4",
|
|
75
75
|
"d3-array": "^3.2.4",
|
|
76
76
|
"d3-color": "^3.1.0",
|
|
77
77
|
"d3-delaunay": "^6.0.4",
|