layerchart 0.25.1 → 0.26.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/README.md +2 -2
- package/dist/components/Axis.svelte.d.ts +1 -1
- package/dist/components/Bars.svelte +1 -1
- package/dist/components/Bars.svelte.d.ts +1 -1
- package/dist/components/Chart.svelte +6 -0
- package/dist/components/Chart.svelte.d.ts +2 -0
- package/dist/components/Labels.svelte +0 -6
- package/dist/components/Labels.svelte.d.ts +1 -2
- package/dist/components/Legend.svelte.d.ts +1 -1
- package/dist/components/Tooltip.svelte +81 -32
- package/dist/components/Tooltip.svelte.d.ts +5 -4
- package/dist/components/TooltipContext.svelte +5 -7
- package/dist/components/TooltipContext.svelte.d.ts +4 -6
- package/dist/components/TooltipItem.svelte.d.ts +1 -1
- package/dist/docs/Code.svelte +2 -10
- package/dist/docs/Json.svelte +26 -0
- package/dist/docs/Json.svelte.d.ts +18 -0
- package/dist/docs/Preview.svelte +4 -30
- package/dist/docs/ViewSourceButton.svelte +1 -1
- package/package.json +29 -28
- package/dist/utils/string.d.ts +0 -4
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# LayerChart
|
|
2
2
|
|
|
3
|
-

|
|
4
4
|
[](https://www.npmjs.com/package/layerchart)
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|

|
|
8
|
-
[](https://discord.gg/697JhMPD3t)
|
|
9
9
|
|
|
10
10
|
A large collection of composable Svelte chart components to build a wide range of visualizations
|
|
11
11
|
|
|
@@ -10,7 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
/** Draw a grid lines */ grid?: boolean | SVGAttributes<SVGLineElement> | undefined;
|
|
11
11
|
/** Control the number of ticks*/ ticks?: number | any[] | Function | undefined;
|
|
12
12
|
/** Length of the tick line */ tickSize?: number | undefined;
|
|
13
|
-
format?: FormatType;
|
|
13
|
+
format?: FormatType | undefined;
|
|
14
14
|
labelProps?: ComponentProps<Text> | undefined;
|
|
15
15
|
};
|
|
16
16
|
events: {
|
|
@@ -83,6 +83,8 @@ export let geo = undefined;
|
|
|
83
83
|
let:zScale
|
|
84
84
|
let:rScale
|
|
85
85
|
let:padding
|
|
86
|
+
let:data
|
|
87
|
+
let:flatData
|
|
86
88
|
>
|
|
87
89
|
<GeoContext {...geo} let:projection>
|
|
88
90
|
{#if tooltip}
|
|
@@ -101,6 +103,8 @@ export let geo = undefined;
|
|
|
101
103
|
{zScale}
|
|
102
104
|
{rScale}
|
|
103
105
|
{padding}
|
|
106
|
+
{data}
|
|
107
|
+
{flatData}
|
|
104
108
|
/>
|
|
105
109
|
</TooltipContext>
|
|
106
110
|
{:else}
|
|
@@ -117,6 +121,8 @@ export let geo = undefined;
|
|
|
117
121
|
{zScale}
|
|
118
122
|
{rScale}
|
|
119
123
|
{padding}
|
|
124
|
+
{data}
|
|
125
|
+
{flatData}
|
|
120
126
|
/>
|
|
121
127
|
{/if}
|
|
122
128
|
</GeoContext>
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { getContext } from 'svelte';
|
|
7
7
|
import { format as formatValue } from 'svelte-ux';
|
|
8
|
-
import { formatNumberAsStyle } from 'svelte-ux/utils/number';
|
|
9
8
|
import { greatestAbs } from 'svelte-ux/utils/array';
|
|
10
9
|
import Text from './Text.svelte';
|
|
11
10
|
import { isScaleBand } from '../utils/scales';
|
|
@@ -14,7 +13,6 @@ const { flatData, yScale, x, y, custom } = getContext('LayerCake');
|
|
|
14
13
|
// export let orientation: 'outside' | 'inside' | 'auto' = 'auto';
|
|
15
14
|
export let significantDigits = 3;
|
|
16
15
|
export let format = undefined;
|
|
17
|
-
export let formatStyle = null;
|
|
18
16
|
// export let overlap = false;
|
|
19
17
|
$: yBaseline = $custom?.yBaseline ?? 0;
|
|
20
18
|
export let groupBy = undefined;
|
|
@@ -43,10 +41,6 @@ $: getFormattedValue = (item) => {
|
|
|
43
41
|
// Apply more versatile formatting first
|
|
44
42
|
formattedValue = formatValue(labelValue, format ?? $yScale.tickFormat?.());
|
|
45
43
|
}
|
|
46
|
-
else {
|
|
47
|
-
// Deprecated format
|
|
48
|
-
formattedValue = formatNumberAsStyle(labelValue, formatStyle, 0, significantDigits);
|
|
49
|
-
}
|
|
50
44
|
}
|
|
51
45
|
return formattedValue ?? '';
|
|
52
46
|
};
|
|
@@ -4,8 +4,7 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
significantDigits?: number | undefined;
|
|
7
|
-
format?: FormatType;
|
|
8
|
-
formatStyle?: any;
|
|
7
|
+
format?: FormatType | undefined;
|
|
9
8
|
groupBy?: string | undefined;
|
|
10
9
|
groupPaddingInner?: number | undefined;
|
|
11
10
|
groupPaddingOuter?: number | undefined;
|
|
@@ -8,7 +8,7 @@ declare const __propDef: {
|
|
|
8
8
|
width?: number | undefined;
|
|
9
9
|
height?: number | undefined;
|
|
10
10
|
ticks?: number | undefined;
|
|
11
|
-
tickFormat?: FormatType;
|
|
11
|
+
tickFormat?: FormatType | undefined;
|
|
12
12
|
tickValues?: any[] | undefined;
|
|
13
13
|
tickFontSize?: number | undefined;
|
|
14
14
|
tickSize?: number | undefined;
|
|
@@ -4,56 +4,105 @@ import { fade } from 'svelte/transition';
|
|
|
4
4
|
import { writable } from 'svelte/store';
|
|
5
5
|
import { cls } from 'svelte-ux';
|
|
6
6
|
import { tooltipContext } from './TooltipContext.svelte';
|
|
7
|
-
/**
|
|
8
|
-
export let
|
|
9
|
-
/**
|
|
10
|
-
export let
|
|
11
|
-
|
|
12
|
-
export let
|
|
7
|
+
/** `x` position of tooltip. By default uses the pointer/mouse, can also snap to data or an explicit fixed position. */
|
|
8
|
+
export let x = 'pointer';
|
|
9
|
+
/** `y` position of tooltip. By default uses the pointer/mouse, can also snap to data or an explicit fixed position. */
|
|
10
|
+
export let y = 'pointer';
|
|
11
|
+
/** Offset added to `x` position */
|
|
12
|
+
export let xOffset = typeof x === 'number' || typeof y === 'number' ? 0 : 10;
|
|
13
|
+
/** Offset added to `y` position */
|
|
14
|
+
export let yOffset = typeof x === 'number' || typeof y === 'number' ? 0 : 10;
|
|
15
|
+
export let anchor = 'top-left';
|
|
13
16
|
export let contained = 'container'; // TODO: Support 'window' using getBoundingClientRect()
|
|
14
17
|
export let animate = true;
|
|
15
18
|
export let variant = 'dark';
|
|
16
19
|
export let header = undefined;
|
|
17
20
|
export let classes = {};
|
|
18
|
-
const { containerWidth, containerHeight } = getContext('LayerCake');
|
|
21
|
+
const { padding, xGet, yGet, containerWidth, containerHeight } = getContext('LayerCake');
|
|
19
22
|
const tooltip = tooltipContext();
|
|
20
23
|
let tooltipWidth = 0;
|
|
21
24
|
let tooltipHeight = 0;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
else if (contained === 'container' &&
|
|
28
|
-
$tooltip.top + topOffset + tooltipHeight > $containerHeight) {
|
|
29
|
-
// Change side. Do not allow tooltip to go above the top
|
|
30
|
-
$topPos = Math.max($tooltip.top - (topOffset + tooltipHeight), 0);
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
$topPos = $tooltip.top + topOffset;
|
|
34
|
-
}
|
|
25
|
+
const xPos = animate ? spring($tooltip.x) : writable($tooltip.x);
|
|
26
|
+
const yPos = animate ? spring($tooltip.y) : writable($tooltip.y);
|
|
27
|
+
function alignValue(value, align, tooltipSize) {
|
|
28
|
+
const alignOffset = align === 'center' ? tooltipSize / 2 : align === 'end' ? tooltipSize : 0;
|
|
29
|
+
return value + (align === 'end' ? -yOffset : yOffset) - alignOffset;
|
|
35
30
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
$: if ($tooltip?.data) {
|
|
32
|
+
const xValue = typeof x === 'number' ? x : x === 'data' ? $xGet($tooltip.data) + $padding.left : $tooltip.x;
|
|
33
|
+
let xAlign = 'start';
|
|
34
|
+
switch (anchor) {
|
|
35
|
+
case 'top-left':
|
|
36
|
+
case 'left':
|
|
37
|
+
case 'bottom-left':
|
|
38
|
+
xAlign = 'start';
|
|
39
|
+
break;
|
|
40
|
+
case 'top':
|
|
41
|
+
case 'center':
|
|
42
|
+
case 'bottom':
|
|
43
|
+
xAlign = 'center';
|
|
44
|
+
break;
|
|
45
|
+
case 'top-right':
|
|
46
|
+
case 'right':
|
|
47
|
+
case 'bottom-right':
|
|
48
|
+
xAlign = 'end';
|
|
49
|
+
break;
|
|
40
50
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
51
|
+
const yValue = typeof y === 'number' ? y : y === 'data' ? $yGet($tooltip.data) + $padding.top : $tooltip.y;
|
|
52
|
+
let yAlign = 'start';
|
|
53
|
+
switch (anchor) {
|
|
54
|
+
case 'top-left':
|
|
55
|
+
case 'top':
|
|
56
|
+
case 'top-right':
|
|
57
|
+
yAlign = 'start';
|
|
58
|
+
break;
|
|
59
|
+
case 'left':
|
|
60
|
+
case 'center':
|
|
61
|
+
case 'right':
|
|
62
|
+
yAlign = 'center';
|
|
63
|
+
break;
|
|
64
|
+
case 'bottom-left':
|
|
65
|
+
case 'bottom':
|
|
66
|
+
case 'bottom-right':
|
|
67
|
+
yAlign = 'end';
|
|
68
|
+
break;
|
|
45
69
|
}
|
|
46
|
-
|
|
47
|
-
|
|
70
|
+
const rect = {
|
|
71
|
+
top: alignValue(yValue, yAlign, tooltipHeight),
|
|
72
|
+
left: alignValue(xValue, xAlign, tooltipWidth),
|
|
73
|
+
// set below
|
|
74
|
+
bottom: 0,
|
|
75
|
+
right: 0,
|
|
76
|
+
};
|
|
77
|
+
rect.bottom = rect.top + tooltipHeight;
|
|
78
|
+
rect.right = rect.left + tooltipWidth;
|
|
79
|
+
// Check if outside of container and swap align side accordingly
|
|
80
|
+
if (contained === 'container') {
|
|
81
|
+
if ((xAlign === 'start' || xAlign === 'center') && rect.right > $containerWidth) {
|
|
82
|
+
rect.left = alignValue(xValue, 'end', tooltipWidth);
|
|
83
|
+
}
|
|
84
|
+
if ((xAlign === 'end' || xAlign === 'center') && rect.left < $padding.left) {
|
|
85
|
+
rect.left = alignValue(xValue, 'start', tooltipWidth);
|
|
86
|
+
}
|
|
87
|
+
rect.right = rect.left + tooltipWidth;
|
|
88
|
+
if ((yAlign === 'start' || yAlign === 'center') && rect.bottom > $containerHeight) {
|
|
89
|
+
rect.top = alignValue(yValue, 'end', tooltipHeight);
|
|
90
|
+
}
|
|
91
|
+
if ((yAlign === 'end' || yAlign === 'center') && rect.top < $padding.top) {
|
|
92
|
+
rect.top = alignValue(yValue, 'start', tooltipHeight);
|
|
93
|
+
}
|
|
94
|
+
rect.bottom = rect.top + tooltipHeight;
|
|
48
95
|
}
|
|
96
|
+
$yPos = rect.top;
|
|
97
|
+
$xPos = rect.left;
|
|
49
98
|
}
|
|
50
99
|
</script>
|
|
51
100
|
|
|
52
101
|
{#if $tooltip.data}
|
|
53
102
|
<div
|
|
54
103
|
class={cls('absolute pointer-events-none z-50', classes.root)}
|
|
55
|
-
style:top="{$
|
|
56
|
-
style:left="{$
|
|
104
|
+
style:top="{$yPos}px"
|
|
105
|
+
style:left="{$xPos}px"
|
|
57
106
|
transition:fade={{ duration: 100 }}
|
|
58
107
|
bind:clientWidth={tooltipWidth}
|
|
59
108
|
bind:clientHeight={tooltipHeight}
|
|
@@ -2,10 +2,11 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
[x: string]: any;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
x?: 'pointer' | 'data' | number | undefined;
|
|
6
|
+
y?: 'pointer' | 'data' | number | undefined;
|
|
7
|
+
xOffset?: number | undefined;
|
|
8
|
+
yOffset?: number | undefined;
|
|
9
|
+
anchor?: ("center" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right") | undefined;
|
|
9
10
|
contained?: false | "container" | undefined;
|
|
10
11
|
animate?: boolean | undefined;
|
|
11
12
|
variant?: "none" | "dark" | "light" | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script context="module">import { getContext, setContext } from 'svelte';
|
|
2
2
|
export const tooltipContextKey = {};
|
|
3
3
|
const defaultContext = writable({
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
x: 0,
|
|
5
|
+
y: 0,
|
|
6
6
|
data: null,
|
|
7
7
|
show: () => { },
|
|
8
8
|
hide: () => { },
|
|
@@ -43,8 +43,6 @@ const { flatData, x, xScale, xGet, xRange, y, yScale, yGet, yRange, width, heigh
|
|
|
43
43
|
* @type {'bisect-x' | 'bisect-y' | 'band' | 'bisect-band' | 'bounds' | 'voronoi' | 'quadtree' | 'manual'}
|
|
44
44
|
*/
|
|
45
45
|
export let mode = 'bisect-x';
|
|
46
|
-
export let snapToDataX = false;
|
|
47
|
-
export let snapToDataY = false;
|
|
48
46
|
/**
|
|
49
47
|
* @type {'closest' | 'left' | 'right'}
|
|
50
48
|
*/
|
|
@@ -57,7 +55,7 @@ export let raiseTarget = false;
|
|
|
57
55
|
export let radius = Infinity;
|
|
58
56
|
/** Enable debug view (show hit targets, etc) */
|
|
59
57
|
export let debug = false;
|
|
60
|
-
const tooltip = writable({
|
|
58
|
+
const tooltip = writable({ y: 0, x: 0, data: null, show: showTooltip, hide: hideTooltip });
|
|
61
59
|
setTooltipContext(tooltip);
|
|
62
60
|
let hideTimeoutId;
|
|
63
61
|
$: bisectX = bisector((d) => {
|
|
@@ -174,8 +172,8 @@ function showTooltip(event, tooltipData) {
|
|
|
174
172
|
}
|
|
175
173
|
$tooltip = {
|
|
176
174
|
...$tooltip,
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
x: localX,
|
|
176
|
+
y: localY,
|
|
179
177
|
data: tooltipData,
|
|
180
178
|
};
|
|
181
179
|
}
|
|
@@ -2,8 +2,8 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { Readable } from 'svelte/store';
|
|
3
3
|
export declare const tooltipContextKey: {};
|
|
4
4
|
export type TooltipContextValue = {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
7
|
data: any;
|
|
8
8
|
show(event: MouseEvent | TouchEvent, tooltipData?: any): any;
|
|
9
9
|
hide(event?: MouseEvent | TouchEvent): any;
|
|
@@ -15,8 +15,6 @@ declare const __propDef: {
|
|
|
15
15
|
/**
|
|
16
16
|
* @type {'bisect-x' | 'bisect-y' | 'band' | 'bisect-band' | 'bounds' | 'voronoi' | 'quadtree' | 'manual'}
|
|
17
17
|
*/ mode?: "bisect-x" | "bisect-y" | "band" | "bisect-band" | "bounds" | "voronoi" | "quadtree" | "manual" | undefined;
|
|
18
|
-
snapToDataX?: boolean | undefined;
|
|
19
|
-
snapToDataY?: boolean | undefined;
|
|
20
18
|
/**
|
|
21
19
|
* @type {'closest' | 'left' | 'right'}
|
|
22
20
|
*/ findTooltipData?: "left" | "right" | "closest" | undefined;
|
|
@@ -36,8 +34,8 @@ declare const __propDef: {
|
|
|
36
34
|
slots: {
|
|
37
35
|
default: {
|
|
38
36
|
tooltip: {
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
y: number;
|
|
38
|
+
x: number;
|
|
41
39
|
data: null;
|
|
42
40
|
show: (event: MouseEvent | TouchEvent, tooltipData?: any) => void;
|
|
43
41
|
hide: () => void;
|
package/dist/docs/Code.svelte
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script>import Prism from 'prismjs';
|
|
2
2
|
import 'prism-svelte';
|
|
3
|
-
import {
|
|
4
|
-
import { Button, cls } from 'svelte-ux';
|
|
3
|
+
import { CopyButton, cls } from 'svelte-ux';
|
|
5
4
|
export let source = null;
|
|
6
5
|
export let language = 'svelte';
|
|
7
6
|
export let highlightedSource = source
|
|
@@ -17,14 +16,7 @@ export let highlightedSource = source
|
|
|
17
16
|
</pre>
|
|
18
17
|
|
|
19
18
|
<div class="absolute top-0 right-0 p-2">
|
|
20
|
-
<
|
|
21
|
-
icon={mdiContentCopy}
|
|
22
|
-
class="text-white/70 hover:bg-white/20 py-1"
|
|
23
|
-
size="sm"
|
|
24
|
-
on:click={() => navigator.clipboard.writeText(source ?? '')}
|
|
25
|
-
>
|
|
26
|
-
Copy
|
|
27
|
-
</Button>
|
|
19
|
+
<CopyButton value={source} class="text-white/70 hover:bg-white/20 py-1" size="sm" />
|
|
28
20
|
</div>
|
|
29
21
|
</div>
|
|
30
22
|
{/if}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script>import JsonTree from 'svelte-json-tree';
|
|
2
|
+
import { cls } from 'svelte-ux';
|
|
3
|
+
export let value;
|
|
4
|
+
export let defaultExpandedPaths = ['$'];
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<div class={cls('overflow-auto px-4 py-2 bg-[#1e1e1e]', $$props.class)}>
|
|
8
|
+
<JsonTree
|
|
9
|
+
{value}
|
|
10
|
+
{defaultExpandedPaths}
|
|
11
|
+
shouldTreatIterableAsObject
|
|
12
|
+
--json-tree-property-color="#72a2d3"
|
|
13
|
+
--json-tree-string-color="#6cd1c7"
|
|
14
|
+
--json-tree-symbol-color="#6cd1c7"
|
|
15
|
+
--json-tree-boolean-color="#9681f7"
|
|
16
|
+
--json-tree-function-color="#e59b6f"
|
|
17
|
+
--json-tree-number-color="#9681f7"
|
|
18
|
+
--json-tree-label-color="#9ca0a5"
|
|
19
|
+
--json-tree-arrow-color="#e8eaed"
|
|
20
|
+
--json-tree-null-color="#81868a"
|
|
21
|
+
--json-tree-undefined-color="#81868a"
|
|
22
|
+
--json-tree-date-color="#9ca0a5"
|
|
23
|
+
--json-tree-operator-color="#e8eaed"
|
|
24
|
+
--json-tree-regex-color="#6cd1c7"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
value: any;
|
|
6
|
+
defaultExpandedPaths?: string[] | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export type JsonProps = typeof __propDef.props;
|
|
14
|
+
export type JsonEvents = typeof __propDef.events;
|
|
15
|
+
export type JsonSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Json extends SvelteComponentTyped<JsonProps, JsonEvents, JsonSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/docs/Preview.svelte
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// TODO: No longer copy from svelte-ux after prismjs is migrated to ESM (commonjs causes issue with Vite from another library)
|
|
3
3
|
import Prism from 'prismjs';
|
|
4
4
|
import 'prism-svelte';
|
|
5
|
-
import { mdiCodeTags,
|
|
6
|
-
import JsonTree from 'svelte-json-tree';
|
|
5
|
+
import { mdiCodeTags, mdiTable } from '@mdi/js';
|
|
7
6
|
import { Button, CopyButton, Dialog, Toggle, Tooltip } from 'svelte-ux';
|
|
7
|
+
import Json from './Json.svelte';
|
|
8
8
|
export let code = undefined;
|
|
9
9
|
export let data = undefined;
|
|
10
10
|
export let language = 'svelte';
|
|
@@ -35,14 +35,7 @@ catch (e) {
|
|
|
35
35
|
</pre>
|
|
36
36
|
|
|
37
37
|
<div class="absolute top-0 right-0 p-2">
|
|
38
|
-
<
|
|
39
|
-
icon={mdiContentCopy}
|
|
40
|
-
class=" text-white/70 hover:bg-white/20 py-1"
|
|
41
|
-
size="sm"
|
|
42
|
-
on:click={() => navigator.clipboard.writeText(code)}
|
|
43
|
-
>
|
|
44
|
-
Copy
|
|
45
|
-
</Button>
|
|
38
|
+
<CopyButton value={code} class="text-white/70 hover:bg-white/20 py-1" size="sm" />
|
|
46
39
|
</div>
|
|
47
40
|
</div>
|
|
48
41
|
{/if}
|
|
@@ -74,26 +67,7 @@ catch (e) {
|
|
|
74
67
|
{/if}
|
|
75
68
|
</div>
|
|
76
69
|
|
|
77
|
-
<
|
|
78
|
-
<JsonTree
|
|
79
|
-
value={data}
|
|
80
|
-
defaultExpandedPaths={['$']}
|
|
81
|
-
shouldTreatIterableAsObject
|
|
82
|
-
--json-tree-property-color="#72a2d3"
|
|
83
|
-
--json-tree-string-color="#6cd1c7"
|
|
84
|
-
--json-tree-symbol-color="#6cd1c7"
|
|
85
|
-
--json-tree-boolean-color="#9681f7"
|
|
86
|
-
--json-tree-function-color="#e59b6f"
|
|
87
|
-
--json-tree-number-color="#9681f7"
|
|
88
|
-
--json-tree-label-color="#9ca0a5"
|
|
89
|
-
--json-tree-arrow-color="#e8eaed"
|
|
90
|
-
--json-tree-null-color="#81868a"
|
|
91
|
-
--json-tree-undefined-color="#81868a"
|
|
92
|
-
--json-tree-date-color="#9ca0a5"
|
|
93
|
-
--json-tree-operator-color="#e8eaed"
|
|
94
|
-
--json-tree-regex-color="#6cd1c7"
|
|
95
|
-
/>
|
|
96
|
-
</div>
|
|
70
|
+
<Json value={data} />
|
|
97
71
|
|
|
98
72
|
<div slot="actions">
|
|
99
73
|
<Button variant="fill" color="accent">Close</Button>
|
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.26.0",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "vite dev",
|
|
10
10
|
"build": "vite build",
|
|
@@ -18,45 +18,46 @@
|
|
|
18
18
|
"changeset": "changeset",
|
|
19
19
|
"version": "changeset version",
|
|
20
20
|
"version-status": "changeset status -v",
|
|
21
|
-
"publish": "changeset publish"
|
|
21
|
+
"publish": "changeset publish",
|
|
22
|
+
"prepare": "svelte-kit sync"
|
|
22
23
|
},
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@rollup/plugin-dsv": "^3.0.4",
|
|
25
|
-
"@sveltejs/adapter-vercel": "^3.0
|
|
26
|
-
"@sveltejs/kit": "^1.27.
|
|
26
|
+
"@sveltejs/adapter-vercel": "^3.1.0",
|
|
27
|
+
"@sveltejs/kit": "^1.27.6",
|
|
27
28
|
"@sveltejs/package": "^2.2.2",
|
|
28
29
|
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
|
|
29
30
|
"@tailwindcss/typography": "^0.5.10",
|
|
30
|
-
"@types/d3-array": "^3.
|
|
31
|
-
"@types/d3-delaunay": "^6.0.
|
|
32
|
-
"@types/d3-dsv": "^3.0.
|
|
33
|
-
"@types/d3-geo": "^3.0
|
|
34
|
-
"@types/d3-hierarchy": "^3.1.
|
|
35
|
-
"@types/d3-interpolate": "^3.0.
|
|
36
|
-
"@types/d3-interpolate-path": "^2.0.
|
|
37
|
-
"@types/d3-quadtree": "^3.0.
|
|
38
|
-
"@types/d3-random": "^3.0.
|
|
39
|
-
"@types/d3-sankey": "^0.12.
|
|
40
|
-
"@types/d3-scale": "^4.0.
|
|
41
|
-
"@types/d3-scale-chromatic": "^3.0.
|
|
42
|
-
"@types/d3-shape": "^3.1.
|
|
43
|
-
"@types/lodash-es": "^4.17.
|
|
31
|
+
"@types/d3-array": "^3.2.1",
|
|
32
|
+
"@types/d3-delaunay": "^6.0.4",
|
|
33
|
+
"@types/d3-dsv": "^3.0.7",
|
|
34
|
+
"@types/d3-geo": "^3.1.0",
|
|
35
|
+
"@types/d3-hierarchy": "^3.1.6",
|
|
36
|
+
"@types/d3-interpolate": "^3.0.4",
|
|
37
|
+
"@types/d3-interpolate-path": "^2.0.3",
|
|
38
|
+
"@types/d3-quadtree": "^3.0.5",
|
|
39
|
+
"@types/d3-random": "^3.0.3",
|
|
40
|
+
"@types/d3-sankey": "^0.12.4",
|
|
41
|
+
"@types/d3-scale": "^4.0.8",
|
|
42
|
+
"@types/d3-scale-chromatic": "^3.0.2",
|
|
43
|
+
"@types/d3-shape": "^3.1.5",
|
|
44
|
+
"@types/lodash-es": "^4.17.11",
|
|
44
45
|
"@types/marked": "^6.0.0",
|
|
45
|
-
"@types/shapefile": "^0.6.
|
|
46
|
-
"@types/topojson-client": "^3.1.
|
|
46
|
+
"@types/shapefile": "^0.6.4",
|
|
47
|
+
"@types/topojson-client": "^3.1.4",
|
|
47
48
|
"autoprefixer": "^10.4.16",
|
|
48
49
|
"execa": "^8.0.1",
|
|
49
|
-
"marked": "^
|
|
50
|
+
"marked": "^10.0.0",
|
|
50
51
|
"mdsvex": "^0.11.0",
|
|
51
|
-
"prettier": "^3.0
|
|
52
|
-
"prettier-plugin-svelte": "^3.0
|
|
52
|
+
"prettier": "^3.1.0",
|
|
53
|
+
"prettier-plugin-svelte": "^3.1.0",
|
|
53
54
|
"prism-themes": "^1.9.0",
|
|
54
55
|
"rehype-slug": "^6.0.0",
|
|
55
|
-
"svelte": "^4.2.
|
|
56
|
-
"svelte-check": "^3.
|
|
56
|
+
"svelte": "^4.2.7",
|
|
57
|
+
"svelte-check": "^3.6.0",
|
|
57
58
|
"svelte-json-tree": "^2.2.0",
|
|
58
|
-
"svelte-preprocess": "^5.0
|
|
59
|
-
"svelte2tsx": "^0.6.
|
|
59
|
+
"svelte-preprocess": "^5.1.0",
|
|
60
|
+
"svelte2tsx": "^0.6.25",
|
|
60
61
|
"tailwindcss": "^3.3.5",
|
|
61
62
|
"tslib": "^2.6.2",
|
|
62
63
|
"typescript": "^5.2.2",
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
"layercake": "^8.0.2",
|
|
90
91
|
"lodash-es": "^4.17.21",
|
|
91
92
|
"shapefile": "^0.6.6",
|
|
92
|
-
"svelte-ux": "^0.
|
|
93
|
+
"svelte-ux": "^0.56.0",
|
|
93
94
|
"topojson-client": "^3.1.0"
|
|
94
95
|
},
|
|
95
96
|
"peerDependencies": {
|
package/dist/utils/string.d.ts
DELETED