layerchart 0.15.5 → 0.16.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 +22 -1
- package/dist/components/AxisX.svelte +1 -1
- package/dist/components/AxisX.svelte.d.ts +2 -1
- package/dist/components/AxisY.svelte +2 -2
- package/dist/components/AxisY.svelte.d.ts +2 -1
- package/dist/components/Baseline.svelte +1 -1
- package/dist/components/Blur.svelte +1 -1
- package/dist/components/Chart.svelte +6 -0
- package/dist/components/Chart.svelte.d.ts +2 -0
- package/dist/components/CircleClipPath.svelte +1 -1
- package/dist/components/ClipPath.svelte +1 -1
- package/dist/components/ClipPathUse.svelte +1 -1
- package/dist/components/Labels.svelte +2 -2
- package/dist/components/Labels.svelte.d.ts +2 -1
- package/dist/components/Legend.svelte +2 -2
- package/dist/components/Legend.svelte.d.ts +2 -1
- package/dist/components/Link.svelte +1 -1
- package/dist/components/RectClipPath.svelte +1 -1
- package/dist/components/Text.svelte +11 -11
- package/dist/components/TooltipItem.svelte +1 -2
- package/dist/components/TooltipItem.svelte.d.ts +2 -1
- package/dist/components/Zoom.svelte.d.ts +1 -1
- package/dist/docs/Blockquote.svelte +3 -3
- package/dist/docs/Blockquote.svelte.d.ts +6 -17
- package/dist/docs/Code.svelte +9 -11
- package/dist/docs/Code.svelte.d.ts +6 -15
- package/dist/docs/GeoDebug.svelte +5 -6
- package/dist/docs/Header1.svelte +1 -2
- package/dist/docs/Header1.svelte.d.ts +5 -14
- package/dist/docs/Layout.svelte +6 -6
- package/dist/docs/Layout.svelte.d.ts +9 -20
- package/dist/docs/Link.svelte +3 -3
- package/dist/docs/Link.svelte.d.ts +5 -14
- package/dist/docs/Preview.svelte +1 -1
- package/dist/docs/Preview.svelte.d.ts +1 -1
- package/dist/docs/ZoomControls.svelte +1 -2
- package/dist/utils/quadtree.d.ts +10 -2
- package/dist/utils/quadtree.js +1 -1
- package/package.json +16 -14
package/README.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
1
|
# layerchart
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A large collection of composable Svelte chart components to build a wide range of visualizations
|
|
4
|
+
|
|
5
|
+
- Cartesian (Bar, Area, Stack, Scatter)
|
|
6
|
+
- Radial (Pie, Arc, Sunburst)
|
|
7
|
+
- Hierarchy (Pack, Tree, Treemap, Sunburst)
|
|
8
|
+
- Graph (Sankey)
|
|
9
|
+
- Geo (Choropleth, Spike, Bubble, Point, Globe)
|
|
10
|
+
|
|
11
|
+
Interactions
|
|
12
|
+
|
|
13
|
+
- Tooltip, Highlights, Pan/Zoom
|
|
14
|
+
|
|
15
|
+
SVG
|
|
16
|
+
|
|
17
|
+
- Basic (Arc, Circle, Group, Line, Path, Text)
|
|
18
|
+
- Gradients and Patterns
|
|
19
|
+
- ClipPath
|
|
20
|
+
- Multi-line text
|
|
21
|
+
|
|
22
|
+
Others
|
|
23
|
+
|
|
24
|
+
- Legends including ColorRamps
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type FormatType } from 'svelte-ux';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
gridlines?: boolean | svelte.JSX.SVGProps<SVGLineElement>;
|
|
5
|
-
formatTick?:
|
|
6
|
+
formatTick?: FormatType;
|
|
6
7
|
ticks?: undefined;
|
|
7
8
|
xTick?: undefined;
|
|
8
9
|
yTick?: number | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<script>import { getContext
|
|
2
|
-
import { format } from 'svelte-ux
|
|
1
|
+
<script>import { getContext } from 'svelte';
|
|
2
|
+
import { format } from 'svelte-ux';
|
|
3
3
|
import { min, max } from 'd3-array';
|
|
4
4
|
import Text from './Text.svelte';
|
|
5
5
|
import { isScaleBand } from '../utils/scales';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type FormatType } from 'svelte-ux';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
gridlines?: boolean | svelte.JSX.SVGProps<SVGLineElement>;
|
|
5
6
|
ticks?: number | Function | undefined;
|
|
6
|
-
formatTick?:
|
|
7
|
+
formatTick?: FormatType;
|
|
7
8
|
xTick?: number | undefined;
|
|
8
9
|
yTick?: number | undefined;
|
|
9
10
|
dxTick?: number | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { min, max } from 'd3-array';
|
|
2
2
|
import { getContext } from 'svelte';
|
|
3
|
-
import { cls } from 'svelte-ux
|
|
3
|
+
import { cls } from 'svelte-ux';
|
|
4
4
|
import { isScaleBand } from '../utils/scales';
|
|
5
5
|
const { xRange, yScale, yRange } = getContext('LayerCake');
|
|
6
6
|
export let x = false;
|
|
@@ -78,6 +78,8 @@ export let geo = undefined;
|
|
|
78
78
|
let:height
|
|
79
79
|
let:width
|
|
80
80
|
let:element
|
|
81
|
+
let:xScale
|
|
82
|
+
let:yScale
|
|
81
83
|
>
|
|
82
84
|
<GeoContext {...geo} let:projection>
|
|
83
85
|
{#if tooltip}
|
|
@@ -91,6 +93,8 @@ export let geo = undefined;
|
|
|
91
93
|
{element}
|
|
92
94
|
{projection}
|
|
93
95
|
{tooltip}
|
|
96
|
+
{xScale}
|
|
97
|
+
{yScale}
|
|
94
98
|
/>
|
|
95
99
|
</TooltipContext>
|
|
96
100
|
{:else}
|
|
@@ -102,6 +106,8 @@ export let geo = undefined;
|
|
|
102
106
|
{width}
|
|
103
107
|
{element}
|
|
104
108
|
{projection}
|
|
109
|
+
{xScale}
|
|
110
|
+
{yScale}
|
|
105
111
|
/>
|
|
106
112
|
{/if}
|
|
107
113
|
</GeoContext>
|
|
@@ -7,10 +7,10 @@ import { getContext } from 'svelte';
|
|
|
7
7
|
import { scaleBand } from 'd3-scale';
|
|
8
8
|
import { max, min } from 'd3-array';
|
|
9
9
|
import Text from './Text.svelte';
|
|
10
|
+
import { format as formatValue } from 'svelte-ux';
|
|
10
11
|
import { formatNumberAsStyle } from 'svelte-ux/utils/number';
|
|
11
|
-
import { isScaleBand } from '../utils/scales';
|
|
12
12
|
import { greatestAbs, unique } from 'svelte-ux/utils/array';
|
|
13
|
-
import {
|
|
13
|
+
import { isScaleBand } from '../utils/scales';
|
|
14
14
|
const { flatData, xGet, yRange, xScale, yScale, x, y, custom } = getContext('LayerCake');
|
|
15
15
|
export let orientation = 'auto';
|
|
16
16
|
export let significantDigits = 3;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type FormatType } from 'svelte-ux';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
[x: string]: any;
|
|
5
6
|
orientation?: "auto" | "outside" | "inside" | undefined;
|
|
6
7
|
significantDigits?: number | undefined;
|
|
7
|
-
format?:
|
|
8
|
+
format?: FormatType;
|
|
8
9
|
formatStyle?: any;
|
|
9
10
|
overlap?: boolean | undefined;
|
|
10
11
|
groupBy?: string | undefined;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { scaleBand, scaleLinear } from 'd3-scale';
|
|
3
3
|
import { quantize, interpolate, interpolateRound } from 'd3-interpolate';
|
|
4
4
|
import { quantile, range } from 'd3-array';
|
|
5
|
-
import { format } from 'svelte-ux
|
|
5
|
+
import { format } from 'svelte-ux';
|
|
6
6
|
import ColorRamp from './ColorRamp.svelte';
|
|
7
|
-
import { cls } from 'svelte-ux
|
|
7
|
+
import { cls } from 'svelte-ux';
|
|
8
8
|
const { rScale } = getContext('LayerCake') ?? {};
|
|
9
9
|
export let scale = undefined;
|
|
10
10
|
export let title = '';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type FormatType } from 'svelte-ux';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
[x: string]: any;
|
|
@@ -7,7 +8,7 @@ declare const __propDef: {
|
|
|
7
8
|
width?: number | undefined;
|
|
8
9
|
height?: number | undefined;
|
|
9
10
|
ticks?: number | undefined;
|
|
10
|
-
tickFormat?:
|
|
11
|
+
tickFormat?: FormatType;
|
|
11
12
|
tickValues?: any[] | undefined;
|
|
12
13
|
tickFontSize?: number | undefined;
|
|
13
14
|
tickSize?: number | undefined;
|
|
@@ -5,7 +5,7 @@ import { motionStore } from '../stores/motionStore';
|
|
|
5
5
|
export let data = undefined; // TODO: Update Type
|
|
6
6
|
export let orientation = 'horizontal';
|
|
7
7
|
/**
|
|
8
|
-
* Update source and target accessors to be
|
|
8
|
+
* Update source and target accessors to be compatible with d3-sankey. see: https://github.com/d3/d3-sankey#sankeyLinkHorizontal
|
|
9
9
|
*/
|
|
10
10
|
export let sankey = false;
|
|
11
11
|
export let source = sankey ? (d) => [d.source.x1, d.y0] : (d) => d.source;
|
|
@@ -14,27 +14,27 @@ Reference:
|
|
|
14
14
|
*/
|
|
15
15
|
/** text value */
|
|
16
16
|
export let value = 0;
|
|
17
|
-
/** Maximum width to occupy (approximate as words are not split)
|
|
17
|
+
/** Maximum width to occupy (approximate as words are not split) */
|
|
18
18
|
export let width = undefined;
|
|
19
|
-
/** x position of the text
|
|
19
|
+
/** x position of the text */
|
|
20
20
|
export let x = 0;
|
|
21
|
-
/** y position of the text
|
|
21
|
+
/** y position of the text */
|
|
22
22
|
export let y = 0;
|
|
23
|
-
/** dx offset of the text
|
|
23
|
+
/** dx offset of the text */
|
|
24
24
|
export let dx = 0;
|
|
25
|
-
/** dy offset of the text
|
|
25
|
+
/** dy offset of the text */
|
|
26
26
|
export let dy = 0;
|
|
27
|
-
/** Desired "line height" of the text, implemented as y offsets
|
|
27
|
+
/** Desired "line height" of the text, implemented as y offsets */
|
|
28
28
|
export let lineHeight = '1em';
|
|
29
|
-
/** Cap height of the text
|
|
29
|
+
/** Cap height of the text */
|
|
30
30
|
export let capHeight = '0.71em'; // Magic number from d3
|
|
31
|
-
/** Whether to scale the fontSize to accommodate the specified width
|
|
31
|
+
/** Whether to scale the fontSize to accommodate the specified width */
|
|
32
32
|
export let scaleToFit = false;
|
|
33
|
-
/** Horizontal text anchor
|
|
33
|
+
/** Horizontal text anchor */
|
|
34
34
|
export let textAnchor = 'start';
|
|
35
|
-
/** Vertical text anchor
|
|
35
|
+
/** Vertical text anchor */
|
|
36
36
|
export let verticalAnchor = 'end'; // default SVG behavior
|
|
37
|
-
/** Rotational angle of the text
|
|
37
|
+
/** Rotational angle of the text */
|
|
38
38
|
export let rotate = undefined;
|
|
39
39
|
let wordsByLines = [];
|
|
40
40
|
let wordsWithWidth = [];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>import { cls } from 'svelte-ux
|
|
2
|
-
import { format as formatUtil } from 'svelte-ux/utils/format';
|
|
1
|
+
<script>import { cls, format as formatUtil } from 'svelte-ux';
|
|
3
2
|
export let label;
|
|
4
3
|
export let value = undefined; // Can be pass as slot
|
|
5
4
|
export let format = undefined;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import { type FormatType } from 'svelte-ux';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
[x: string]: any;
|
|
5
6
|
label: any;
|
|
6
7
|
value?: any;
|
|
7
|
-
format?:
|
|
8
|
+
format?: FormatType;
|
|
8
9
|
valueAlign?: "left" | "right" | "center" | undefined;
|
|
9
10
|
};
|
|
10
11
|
events: {
|
|
@@ -7,7 +7,7 @@ declare const __propDef: {
|
|
|
7
7
|
spring?: boolean | Parameters<typeof motionStore>[1]['spring'];
|
|
8
8
|
tweened?: boolean | Parameters<typeof motionStore>[1]['tweened'];
|
|
9
9
|
disablePointer?: boolean | undefined;
|
|
10
|
-
scroll?: "
|
|
10
|
+
scroll?: "none" | "scale" | "translate" | undefined;
|
|
11
11
|
clickDistance?: number | undefined;
|
|
12
12
|
initialTranslate?: {
|
|
13
13
|
x: number;
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} BlockquoteProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} BlockquoteEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} BlockquoteSlots */
|
|
4
|
-
export default class Blockquote extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
}
|
|
12
|
-
export type BlockquoteProps = typeof __propDef.props;
|
|
13
|
-
export type BlockquoteEvents = typeof __propDef.events;
|
|
14
|
-
export type BlockquoteSlots = typeof __propDef.slots;
|
|
15
1
|
import { SvelteComponentTyped } from "svelte";
|
|
16
2
|
declare const __propDef: {
|
|
17
|
-
props:
|
|
18
|
-
[x: string]: never;
|
|
19
|
-
};
|
|
3
|
+
props: Record<string, never>;
|
|
20
4
|
events: {
|
|
21
5
|
[evt: string]: CustomEvent<any>;
|
|
22
6
|
};
|
|
@@ -24,4 +8,9 @@ declare const __propDef: {
|
|
|
24
8
|
default: {};
|
|
25
9
|
};
|
|
26
10
|
};
|
|
11
|
+
export type BlockquoteProps = typeof __propDef.props;
|
|
12
|
+
export type BlockquoteEvents = typeof __propDef.events;
|
|
13
|
+
export type BlockquoteSlots = typeof __propDef.slots;
|
|
14
|
+
export default class Blockquote extends SvelteComponentTyped<BlockquoteProps, BlockquoteEvents, BlockquoteSlots> {
|
|
15
|
+
}
|
|
27
16
|
export {};
|
package/dist/docs/Code.svelte
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
? Prism.highlight(code, Prism.languages[language], language)
|
|
11
|
-
: '';
|
|
1
|
+
<script>import Prism from 'prismjs';
|
|
2
|
+
import 'prism-svelte';
|
|
3
|
+
import { mdiContentCopy } from '@mdi/js';
|
|
4
|
+
import { Button, cls } from 'svelte-ux';
|
|
5
|
+
export let code = null;
|
|
6
|
+
export let language = 'svelte';
|
|
7
|
+
export let highlightedCode = code
|
|
8
|
+
? Prism.highlight(code, Prism.languages[language], language)
|
|
9
|
+
: '';
|
|
12
10
|
</script>
|
|
13
11
|
|
|
14
12
|
<div class={cls('rounded', $$restProps.class)}>
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} CodeProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} CodeEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} CodeSlots */
|
|
4
|
-
export default class Code extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
code?: null | undefined;
|
|
7
|
-
language?: string | undefined;
|
|
8
|
-
highlightedCode?: any;
|
|
9
|
-
}, {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
}, {}> {
|
|
12
|
-
}
|
|
13
|
-
export type CodeProps = typeof __propDef.props;
|
|
14
|
-
export type CodeEvents = typeof __propDef.events;
|
|
15
|
-
export type CodeSlots = typeof __propDef.slots;
|
|
16
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import 'prism-svelte';
|
|
17
3
|
declare const __propDef: {
|
|
18
4
|
props: {
|
|
19
5
|
[x: string]: any;
|
|
@@ -26,4 +12,9 @@ declare const __propDef: {
|
|
|
26
12
|
};
|
|
27
13
|
slots: {};
|
|
28
14
|
};
|
|
15
|
+
export type CodeProps = typeof __propDef.props;
|
|
16
|
+
export type CodeEvents = typeof __propDef.events;
|
|
17
|
+
export type CodeSlots = typeof __propDef.slots;
|
|
18
|
+
export default class Code extends SvelteComponentTyped<CodeProps, CodeEvents, CodeSlots> {
|
|
19
|
+
}
|
|
29
20
|
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>import { getContext } from 'svelte';
|
|
2
|
-
import { format, Checkbox } from 'svelte-ux';
|
|
3
|
-
import { cls } from 'svelte-ux/utils/styles';
|
|
2
|
+
import { format, Checkbox, cls } from 'svelte-ux';
|
|
4
3
|
import { geoContext } from '../components/GeoContext.svelte';
|
|
5
4
|
const { width, height } = getContext('LayerCake');
|
|
6
5
|
const geo = geoContext();
|
|
@@ -9,19 +8,19 @@ let showCenter = false;
|
|
|
9
8
|
|
|
10
9
|
<div class={cls('bg-black/5 rounded m-1 backdrop-blur p-2', $$props.class)}>
|
|
11
10
|
<div class="grid gap-2 ml-2 text-xs">
|
|
12
|
-
<div><span class="text-black/50">scale:</span> {format
|
|
11
|
+
<div><span class="text-black/50">scale:</span> {format($geo.scale(), 'decimal')}</div>
|
|
13
12
|
|
|
14
13
|
<div>
|
|
15
14
|
<span class="text-black/50">translate:</span>
|
|
16
15
|
{#each $geo.translate() as coord}
|
|
17
|
-
<div class="ml-2">{format
|
|
16
|
+
<div class="ml-2">{format(coord, 'decimal')}</div>
|
|
18
17
|
{/each}
|
|
19
18
|
</div>
|
|
20
19
|
|
|
21
20
|
<div>
|
|
22
21
|
<span class="text-black/50">rotate:</span>
|
|
23
22
|
{#each $geo.rotate() as angle}
|
|
24
|
-
<div class="ml-2">{format
|
|
23
|
+
<div class="ml-2">{format(angle, 'decimal')}</div>
|
|
25
24
|
{/each}
|
|
26
25
|
</div>
|
|
27
26
|
|
|
@@ -30,7 +29,7 @@ let showCenter = false;
|
|
|
30
29
|
<div>
|
|
31
30
|
<span class="text-black/50">long/lat: <Checkbox bind:checked={showCenter} size="xs" /></span>
|
|
32
31
|
{#each $geo.invert?.([$width / 2, $height / 2]) as coord}
|
|
33
|
-
<div class="ml-2">{format
|
|
32
|
+
<div class="ml-2">{format(coord, 'decimal')}</div>
|
|
34
33
|
{/each}
|
|
35
34
|
</div>
|
|
36
35
|
</div>
|
package/dist/docs/Header1.svelte
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} Header1Props */
|
|
2
|
-
/** @typedef {typeof __propDef.events} Header1Events */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} Header1Slots */
|
|
4
|
-
export default class Header1 extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
}
|
|
12
|
-
export type Header1Props = typeof __propDef.props;
|
|
13
|
-
export type Header1Events = typeof __propDef.events;
|
|
14
|
-
export type Header1Slots = typeof __propDef.slots;
|
|
15
1
|
import { SvelteComponentTyped } from "svelte";
|
|
16
2
|
declare const __propDef: {
|
|
17
3
|
props: {
|
|
@@ -24,4 +10,9 @@ declare const __propDef: {
|
|
|
24
10
|
default: {};
|
|
25
11
|
};
|
|
26
12
|
};
|
|
13
|
+
export type Header1Props = typeof __propDef.props;
|
|
14
|
+
export type Header1Events = typeof __propDef.events;
|
|
15
|
+
export type Header1Slots = typeof __propDef.slots;
|
|
16
|
+
export default class Header1 extends SvelteComponentTyped<Header1Props, Header1Events, Header1Slots> {
|
|
17
|
+
}
|
|
27
18
|
export {};
|
package/dist/docs/Layout.svelte
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
export { a, blockquote };
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
|
-
<script>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
<script>"use strict";
|
|
11
|
+
// frontmatter: https://mdsvex.com/docs#frontmatter-1
|
|
12
|
+
// export let name = undefined;
|
|
13
|
+
// export let sourceUrl = undefined;
|
|
14
|
+
// export let docUrl = undefined;
|
|
15
|
+
// export let description = undefined;
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<slot />
|
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} LayoutProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} LayoutEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} LayoutSlots */
|
|
4
|
-
export default class Layout extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
}
|
|
12
|
-
export type LayoutProps = typeof __propDef.props;
|
|
13
|
-
export type LayoutEvents = typeof __propDef.events;
|
|
14
|
-
export type LayoutSlots = typeof __propDef.slots;
|
|
15
|
-
import a from './Link.svelte';
|
|
16
|
-
import blockquote from './Blockquote.svelte';
|
|
17
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import blockquote from './Blockquote.svelte';
|
|
3
|
+
import a from './Link.svelte';
|
|
4
|
+
export { a, blockquote };
|
|
18
5
|
declare const __propDef: {
|
|
19
|
-
props:
|
|
20
|
-
[x: string]: never;
|
|
21
|
-
};
|
|
6
|
+
props: Record<string, never>;
|
|
22
7
|
events: {
|
|
23
8
|
[evt: string]: CustomEvent<any>;
|
|
24
9
|
};
|
|
@@ -26,4 +11,8 @@ declare const __propDef: {
|
|
|
26
11
|
default: {};
|
|
27
12
|
};
|
|
28
13
|
};
|
|
29
|
-
export
|
|
14
|
+
export type LayoutProps = typeof __propDef.props;
|
|
15
|
+
export type LayoutEvents = typeof __propDef.events;
|
|
16
|
+
export type LayoutSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Layout extends SvelteComponentTyped<LayoutProps, LayoutEvents, LayoutSlots> {
|
|
18
|
+
}
|
package/dist/docs/Link.svelte
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} LinkProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} LinkEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} LinkSlots */
|
|
4
|
-
export default class Link extends SvelteComponentTyped<{
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
}
|
|
12
|
-
export type LinkProps = typeof __propDef.props;
|
|
13
|
-
export type LinkEvents = typeof __propDef.events;
|
|
14
|
-
export type LinkSlots = typeof __propDef.slots;
|
|
15
1
|
import { SvelteComponentTyped } from "svelte";
|
|
16
2
|
declare const __propDef: {
|
|
17
3
|
props: {
|
|
@@ -24,4 +10,9 @@ declare const __propDef: {
|
|
|
24
10
|
default: {};
|
|
25
11
|
};
|
|
26
12
|
};
|
|
13
|
+
export type LinkProps = typeof __propDef.props;
|
|
14
|
+
export type LinkEvents = typeof __propDef.events;
|
|
15
|
+
export type LinkSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Link extends SvelteComponentTyped<LinkProps, LinkEvents, LinkSlots> {
|
|
17
|
+
}
|
|
27
18
|
export {};
|
package/dist/docs/Preview.svelte
CHANGED
|
@@ -4,7 +4,7 @@ import 'prism-svelte';
|
|
|
4
4
|
import { mdiCodeTags, mdiContentCopy } from '@mdi/js';
|
|
5
5
|
import { slide } from 'svelte/transition';
|
|
6
6
|
import { Button } from 'svelte-ux';
|
|
7
|
-
export let code =
|
|
7
|
+
export let code = undefined;
|
|
8
8
|
export let language = 'svelte';
|
|
9
9
|
export let highlightedCode = Prism.highlight(code, Prism.languages.svelte, language);
|
|
10
10
|
export let showCode = false;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>import { Button, Tooltip } from 'svelte-ux';
|
|
2
|
-
import { cls } from 'svelte-ux/utils/styles';
|
|
1
|
+
<script>import { Button, Tooltip, cls } from 'svelte-ux';
|
|
3
2
|
import { mdiArrowULeftTop, mdiMagnifyPlusOutline, mdiMagnifyMinusOutline, mdiImageFilterCenterFocus } from '@mdi/js';
|
|
4
3
|
export let zoom;
|
|
5
4
|
export let placement = 'top-right';
|
package/dist/utils/quadtree.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
import type { Quadtree } from 'd3-quadtree';
|
|
2
|
+
type Rect = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
1
8
|
/**
|
|
2
|
-
* Transverse
|
|
9
|
+
* Transverse quadtree and generate rect dimensions
|
|
3
10
|
*/
|
|
4
|
-
export declare function quadtreeRects(quadtree:
|
|
11
|
+
export declare function quadtreeRects<T>(quadtree: Quadtree<T>, showLeaves?: boolean): Rect[];
|
|
12
|
+
export {};
|
package/dist/utils/quadtree.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"author": "Sean Lynch <techniq35@gmail.com>",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "techniq/layerchart",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.16.0",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"dev": "vite dev",
|
|
9
9
|
"build": "vite build",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@rollup/plugin-dsv": "^3.0.2",
|
|
20
|
-
"@sveltejs/adapter-vercel": "^
|
|
21
|
-
"@sveltejs/kit": "^1.
|
|
20
|
+
"@sveltejs/adapter-vercel": "^3.0.1",
|
|
21
|
+
"@sveltejs/kit": "^1.20.2",
|
|
22
22
|
"@sveltejs/package": "^2.0.2",
|
|
23
23
|
"@tailwindcss/typography": "^0.5.9",
|
|
24
|
-
"@types/d3-array": "^3.0.
|
|
24
|
+
"@types/d3-array": "^3.0.5",
|
|
25
25
|
"@types/d3-delaunay": "^6.0.1",
|
|
26
26
|
"@types/d3-dsv": "^3.0.1",
|
|
27
27
|
"@types/d3-geo": "^3.0.3",
|
|
@@ -33,29 +33,30 @@
|
|
|
33
33
|
"@types/d3-scale": "^4.0.3",
|
|
34
34
|
"@types/d3-shape": "^3.1.1",
|
|
35
35
|
"@types/lodash-es": "^4.17.7",
|
|
36
|
+
"@types/shapefile": "^0.6.1",
|
|
36
37
|
"@types/topojson-client": "^3.1.1",
|
|
37
38
|
"autoprefixer": "^10.4.14",
|
|
38
39
|
"mdsvex": "^0.10.6",
|
|
39
40
|
"prettier": "^2.8.8",
|
|
40
|
-
"prettier-plugin-svelte": "^2.10.
|
|
41
|
+
"prettier-plugin-svelte": "^2.10.1",
|
|
41
42
|
"prism-themes": "^1.9.0",
|
|
42
43
|
"rehype-slug": "^5.1.0",
|
|
43
|
-
"svelte-check": "^3.3
|
|
44
|
-
"svelte-preprocess": "^5.0.
|
|
45
|
-
"svelte2tsx": "^0.6.
|
|
44
|
+
"svelte-check": "^3.4.3",
|
|
45
|
+
"svelte-preprocess": "^5.0.4",
|
|
46
|
+
"svelte2tsx": "^0.6.15",
|
|
46
47
|
"tailwindcss": "^3.3.2",
|
|
47
|
-
"tslib": "^2.5.
|
|
48
|
-
"typescript": "^5.
|
|
48
|
+
"tslib": "^2.5.3",
|
|
49
|
+
"typescript": "^5.1.3",
|
|
49
50
|
"unist-util-visit": "^4.1.2",
|
|
50
51
|
"us-atlas": "^3.0.1",
|
|
51
|
-
"vite": "^4.3.
|
|
52
|
+
"vite": "^4.3.9",
|
|
52
53
|
"vite-plugin-sveld": "^1.1.0"
|
|
53
54
|
},
|
|
54
55
|
"type": "module",
|
|
55
56
|
"dependencies": {
|
|
56
57
|
"@mdi/js": "^7.2.96",
|
|
57
58
|
"@vercel/analytics": "^1.0.1",
|
|
58
|
-
"d3-array": "^3.2.
|
|
59
|
+
"d3-array": "^3.2.4",
|
|
59
60
|
"d3-delaunay": "^6.0.4",
|
|
60
61
|
"d3-dsv": "^3.0.1",
|
|
61
62
|
"d3-geo": "^3.1.0",
|
|
@@ -72,8 +73,9 @@
|
|
|
72
73
|
"date-fns": "^2.30.0",
|
|
73
74
|
"layercake": "^7.4.0",
|
|
74
75
|
"lodash-es": "^4.17.21",
|
|
75
|
-
"
|
|
76
|
-
"svelte
|
|
76
|
+
"shapefile": "^0.6.6",
|
|
77
|
+
"svelte": "^3.59.1",
|
|
78
|
+
"svelte-ux": "^0.40.2",
|
|
77
79
|
"topojson-client": "^3.1.0"
|
|
78
80
|
},
|
|
79
81
|
"main": "./dist/index.js",
|