layerchart 0.18.2 → 0.19.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/dist/components/Area.svelte.d.ts +2 -1
- package/dist/components/AreaStack.svelte.d.ts +4 -1
- package/dist/components/ChartClipPath.svelte.d.ts +1 -1
- package/dist/components/CircleClipPath.svelte +2 -7
- package/dist/components/CircleClipPath.svelte.d.ts +0 -4
- package/dist/components/ClipPath.svelte +13 -1
- package/dist/components/ClipPath.svelte.d.ts +10 -0
- package/dist/components/Path.svelte.d.ts +2 -2
- package/dist/components/Point.svelte +10 -0
- package/dist/components/Point.svelte.d.ts +21 -0
- package/dist/components/RectClipPath.svelte +2 -8
- package/dist/components/RectClipPath.svelte.d.ts +0 -4
- package/dist/components/TooltipItem.svelte +2 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/package.json +1 -1
- package/dist/components/ClipPathUse.svelte +0 -17
- package/dist/components/ClipPathUse.svelte.d.ts +0 -27
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { tweened as tweenedStore } from 'svelte/motion';
|
|
3
|
+
import { type Area } from 'd3-shape';
|
|
3
4
|
import type { CurveFactory } from 'd3-shape';
|
|
4
5
|
declare const __propDef: {
|
|
5
6
|
props: {
|
|
@@ -12,7 +13,7 @@ declare const __propDef: {
|
|
|
12
13
|
clipPath?: string | undefined;
|
|
13
14
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
14
15
|
curve?: CurveFactory | undefined;
|
|
15
|
-
defined?:
|
|
16
|
+
defined?: Parameters<Area<any>['defined']>[0] | undefined;
|
|
16
17
|
color?: string | undefined;
|
|
17
18
|
opacity?: number | undefined;
|
|
18
19
|
line?: boolean | any;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type ComponentProps } from 'svelte';
|
|
3
|
+
import type { tweened as tweenedStore } from 'svelte/motion';
|
|
2
4
|
import type { CurveFactory } from 'd3-shape';
|
|
5
|
+
import Path from './Path.svelte';
|
|
3
6
|
declare const __propDef: {
|
|
4
7
|
props: {
|
|
5
8
|
curve?: CurveFactory | undefined;
|
|
6
|
-
defined?:
|
|
9
|
+
defined?: ComponentProps<Path>['defined'] | undefined;
|
|
7
10
|
opacity?: number | undefined;
|
|
8
11
|
line?: boolean | any;
|
|
9
12
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
@@ -11,11 +11,6 @@ export let tweened = undefined;
|
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<ClipPath {id}>
|
|
14
|
-
<Circle {cx} {cy} {r} {spring} {tweened} />
|
|
14
|
+
<Circle slot="clip" {cx} {cy} {r} {spring} {tweened} />
|
|
15
|
+
<slot {id} />
|
|
15
16
|
</ClipPath>
|
|
16
|
-
|
|
17
|
-
{#if $$slots.default}
|
|
18
|
-
<g style="clip-path: url(#{id})" on:click on:mousemove on:mouseleave>
|
|
19
|
-
<slot {id} />
|
|
20
|
-
</g>
|
|
21
|
-
{/if}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
<script>import { uniqueId } from 'svelte-ux';
|
|
2
2
|
/** Unique id for clipPath */
|
|
3
3
|
export let id = uniqueId('clipPath-');
|
|
4
|
+
/** Use existing path or shape (by id) for clipPath */
|
|
5
|
+
export let useId = undefined;
|
|
4
6
|
</script>
|
|
5
7
|
|
|
6
8
|
<defs>
|
|
7
9
|
<clipPath {id} {...$$restProps}>
|
|
8
|
-
<slot {id} />
|
|
10
|
+
<slot name="clip" {id} />
|
|
11
|
+
|
|
12
|
+
{#if useId}
|
|
13
|
+
<use href="#{useId}" />
|
|
14
|
+
{/if}
|
|
9
15
|
</clipPath>
|
|
10
16
|
</defs>
|
|
17
|
+
|
|
18
|
+
{#if $$slots.default}
|
|
19
|
+
<g style="clip-path: url(#{id})" on:click on:mousemove on:mouseleave on:keydown>
|
|
20
|
+
<slot {id} {useId} />
|
|
21
|
+
</g>
|
|
22
|
+
{/if}
|
|
@@ -3,13 +3,23 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
id?: string | undefined;
|
|
6
|
+
useId?: string | undefined;
|
|
6
7
|
};
|
|
7
8
|
events: {
|
|
9
|
+
click: MouseEvent;
|
|
10
|
+
mousemove: MouseEvent;
|
|
11
|
+
mouseleave: MouseEvent;
|
|
12
|
+
keydown: KeyboardEvent;
|
|
13
|
+
} & {
|
|
8
14
|
[evt: string]: CustomEvent<any>;
|
|
9
15
|
};
|
|
10
16
|
slots: {
|
|
17
|
+
clip: {
|
|
18
|
+
id: string;
|
|
19
|
+
};
|
|
11
20
|
default: {
|
|
12
21
|
id: string;
|
|
22
|
+
useId: string | undefined;
|
|
13
23
|
};
|
|
14
24
|
};
|
|
15
25
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { tweened as tweenedStore } from 'svelte/motion';
|
|
3
|
-
import type { CurveFactory, CurveFactoryLineOnly } from 'd3-shape';
|
|
3
|
+
import type { CurveFactory, CurveFactoryLineOnly, Line } from 'd3-shape';
|
|
4
4
|
declare const __propDef: {
|
|
5
5
|
props: {
|
|
6
6
|
[x: string]: any;
|
|
@@ -10,7 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
pathData?: string | undefined;
|
|
11
11
|
tweened?: boolean | Parameters<typeof tweenedStore>[1];
|
|
12
12
|
curve?: CurveFactory | CurveFactoryLineOnly | undefined;
|
|
13
|
-
defined?:
|
|
13
|
+
defined?: Parameters<Line<any>['defined']>[0] | undefined;
|
|
14
14
|
color?: string | undefined;
|
|
15
15
|
width?: undefined;
|
|
16
16
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
/** Single data point to translate to x/y */ d: any;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {
|
|
10
|
+
default: {
|
|
11
|
+
x: any;
|
|
12
|
+
y: any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export type PointProps = typeof __propDef.props;
|
|
17
|
+
export type PointEvents = typeof __propDef.events;
|
|
18
|
+
export type PointSlots = typeof __propDef.slots;
|
|
19
|
+
export default class Point extends SvelteComponentTyped<PointProps, PointEvents, PointSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -12,12 +12,6 @@ export let tweened = undefined;
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<ClipPath {id}>
|
|
15
|
-
<Rect {x} {y} {width} {height} {spring} {tweened} />
|
|
15
|
+
<Rect slot="clip" {x} {y} {width} {height} {spring} {tweened} />
|
|
16
|
+
<slot {id} />
|
|
16
17
|
</ClipPath>
|
|
17
|
-
|
|
18
|
-
{#if $$slots.default}
|
|
19
|
-
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
20
|
-
<g style="clip-path: url(#{id})" on:click on:mousemove on:mouseleave>
|
|
21
|
-
<slot {id} />
|
|
22
|
-
</g>
|
|
23
|
-
{/if}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>import { cls, format as formatUtil } from 'svelte-ux';
|
|
2
2
|
export let label;
|
|
3
|
-
|
|
3
|
+
/** Value to be formatted and displayed. Can also be passed as default slot */
|
|
4
|
+
export let value = undefined;
|
|
4
5
|
export let format = undefined;
|
|
5
6
|
export let valueAlign = 'left';
|
|
6
7
|
export let classes = {};
|
|
@@ -10,7 +10,6 @@ export { default as ChartClipPath } from './ChartClipPath.svelte';
|
|
|
10
10
|
export { default as Circle } from './Circle.svelte';
|
|
11
11
|
export { default as CircleClipPath } from './CircleClipPath.svelte';
|
|
12
12
|
export { default as ClipPath } from './ClipPath.svelte';
|
|
13
|
-
export { default as ClipPathUse } from './ClipPathUse.svelte';
|
|
14
13
|
export { default as ColorRamp } from './ColorRamp.svelte';
|
|
15
14
|
export { default as ConnectedPoints } from './ConnectedPoints.svelte';
|
|
16
15
|
export { default as Frame } from './Frame.svelte';
|
|
@@ -32,6 +31,7 @@ export { default as Partition } from './Partition.svelte';
|
|
|
32
31
|
export { default as Path } from './Path.svelte';
|
|
33
32
|
export { default as Pattern } from './Pattern.svelte';
|
|
34
33
|
export { default as Pie } from './Pie.svelte';
|
|
34
|
+
export { default as Point } from './Point.svelte';
|
|
35
35
|
export { default as Points } from './Points.svelte';
|
|
36
36
|
export { default as Rect } from './Rect.svelte';
|
|
37
37
|
export { default as RectClipPath } from './RectClipPath.svelte';
|
package/dist/components/index.js
CHANGED
|
@@ -10,7 +10,6 @@ export { default as ChartClipPath } from './ChartClipPath.svelte';
|
|
|
10
10
|
export { default as Circle } from './Circle.svelte';
|
|
11
11
|
export { default as CircleClipPath } from './CircleClipPath.svelte';
|
|
12
12
|
export { default as ClipPath } from './ClipPath.svelte';
|
|
13
|
-
export { default as ClipPathUse } from './ClipPathUse.svelte';
|
|
14
13
|
export { default as ColorRamp } from './ColorRamp.svelte';
|
|
15
14
|
export { default as ConnectedPoints } from './ConnectedPoints.svelte';
|
|
16
15
|
export { default as Frame } from './Frame.svelte';
|
|
@@ -32,6 +31,7 @@ export { default as Partition } from './Partition.svelte';
|
|
|
32
31
|
export { default as Path } from './Path.svelte';
|
|
33
32
|
export { default as Pattern } from './Pattern.svelte';
|
|
34
33
|
export { default as Pie } from './Pie.svelte';
|
|
34
|
+
export { default as Point } from './Point.svelte';
|
|
35
35
|
export { default as Points } from './Points.svelte';
|
|
36
36
|
export { default as Rect } from './Rect.svelte';
|
|
37
37
|
export { default as RectClipPath } from './RectClipPath.svelte';
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script>import { uniqueId } from 'svelte-ux';
|
|
2
|
-
import ClipPath from './ClipPath.svelte';
|
|
3
|
-
/** Id of path or shape */
|
|
4
|
-
export let refId;
|
|
5
|
-
/** Unique id for clipPath */
|
|
6
|
-
export let clipPathId = uniqueId('clipPath-');
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<ClipPath id={clipPathId}>
|
|
10
|
-
<use href="#{refId}" />
|
|
11
|
-
</ClipPath>
|
|
12
|
-
|
|
13
|
-
{#if $$slots.default}
|
|
14
|
-
<g style="clip-path: url(#{clipPathId})" on:click on:mousemove on:mouseleave on:keydown>
|
|
15
|
-
<slot {refId} {clipPathId} />
|
|
16
|
-
</g>
|
|
17
|
-
{/if}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
/** Id of path or shape */ refId: string;
|
|
5
|
-
/** Unique id for clipPath */ clipPathId?: string | undefined;
|
|
6
|
-
};
|
|
7
|
-
events: {
|
|
8
|
-
click: MouseEvent;
|
|
9
|
-
mousemove: MouseEvent;
|
|
10
|
-
mouseleave: MouseEvent;
|
|
11
|
-
keydown: KeyboardEvent;
|
|
12
|
-
} & {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {
|
|
16
|
-
default: {
|
|
17
|
-
refId: string;
|
|
18
|
-
clipPathId: string;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export type ClipPathUseProps = typeof __propDef.props;
|
|
23
|
-
export type ClipPathUseEvents = typeof __propDef.events;
|
|
24
|
-
export type ClipPathUseSlots = typeof __propDef.slots;
|
|
25
|
-
export default class ClipPathUse extends SvelteComponentTyped<ClipPathUseProps, ClipPathUseEvents, ClipPathUseSlots> {
|
|
26
|
-
}
|
|
27
|
-
export {};
|