layerchart 2.0.0-next.6 → 2.0.0-next.7
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/RadialGradient.svelte +1 -3
- package/dist/components/charts/ArcChart.svelte +2 -2
- package/dist/components/charts/PieChart.svelte +2 -2
- package/dist/components/charts/utils.svelte.js +1 -1
- package/dist/components/layout/Canvas.svelte +28 -18
- package/dist/components/layout/Canvas.svelte.d.ts +6 -0
- package/dist/docs/Blockquote.svelte +3 -1
- package/dist/docs/Blockquote.svelte.d.ts +4 -19
- package/dist/docs/Code.svelte +20 -12
- package/dist/docs/Code.svelte.d.ts +10 -24
- package/dist/docs/Header1.svelte +4 -2
- package/dist/docs/Header1.svelte.d.ts +4 -28
- package/dist/docs/Json.svelte +2 -3
- package/dist/docs/Json.svelte.d.ts +5 -20
- package/dist/docs/Layout.svelte +10 -7
- package/dist/docs/Layout.svelte.d.ts +4 -19
- package/dist/docs/Link.svelte +7 -3
- package/dist/docs/Link.svelte.d.ts +4 -38
- package/dist/docs/ViewSourceButton.svelte +7 -4
- package/dist/docs/ViewSourceButton.svelte.d.ts +7 -21
- package/package.json +9 -10
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
fx = cx,
|
|
103
103
|
fy = cy,
|
|
104
104
|
r = '50%',
|
|
105
|
+
// fr = '0%'; // TODO: Svelte / Typescript does not know `<radialRadiant fr="...">`
|
|
105
106
|
spreadMethod = 'pad',
|
|
106
107
|
transform = undefined,
|
|
107
108
|
units = 'objectBoundingBox',
|
|
@@ -111,9 +112,6 @@
|
|
|
111
112
|
...restProps
|
|
112
113
|
}: RadialGradientProps = $props();
|
|
113
114
|
|
|
114
|
-
// TODO: Svelte / Typescript does not know `<radialRadiant fr="...">`
|
|
115
|
-
// export let fr = '0%';
|
|
116
|
-
|
|
117
115
|
const ctx = getChartContext();
|
|
118
116
|
|
|
119
117
|
const renderCtx = getRenderContext();
|
|
@@ -264,8 +264,8 @@
|
|
|
264
264
|
placement: 'bottom',
|
|
265
265
|
variant: 'swatches',
|
|
266
266
|
onclick: (e, item) => {
|
|
267
|
-
selectedKeys.
|
|
268
|
-
selectedSeries.
|
|
267
|
+
selectedKeys.toggle(item.value);
|
|
268
|
+
selectedSeries.toggle(item.value);
|
|
269
269
|
},
|
|
270
270
|
onpointerenter: (e, item) => (highlightKey.current = item.value),
|
|
271
271
|
onpointerleave: (e) => (highlightKey.current = null),
|
|
@@ -281,9 +281,9 @@
|
|
|
281
281
|
placement: 'bottom',
|
|
282
282
|
variant: 'swatches',
|
|
283
283
|
onclick: (e, item) => {
|
|
284
|
-
selectedKeys.
|
|
284
|
+
selectedKeys.toggle(item.value);
|
|
285
285
|
// TODO: investigate
|
|
286
|
-
// selectedSeries.
|
|
286
|
+
// selectedSeries.toggle(item.value);
|
|
287
287
|
},
|
|
288
288
|
onpointerenter: (e, item) => (highlightKey.current = item.value),
|
|
289
289
|
onpointerleave: (e) => (highlightKey.current = null),
|
|
@@ -44,7 +44,7 @@ export function createLegendProps(opts) {
|
|
|
44
44
|
tickFormat: (key) => opts.seriesState.series.find((s) => s.key === key)?.label ?? key,
|
|
45
45
|
placement: 'bottom',
|
|
46
46
|
variant: 'swatches',
|
|
47
|
-
onclick: (_, item) => opts.seriesState.selectedSeries.
|
|
47
|
+
onclick: (_, item) => opts.seriesState.selectedSeries.toggle(item.value),
|
|
48
48
|
onpointerenter: (_, item) => (opts.seriesState.highlightKey.current = item.value),
|
|
49
49
|
onpointerleave: () => (opts.seriesState.highlightKey.current = null),
|
|
50
50
|
...opts.props,
|
|
@@ -64,6 +64,13 @@
|
|
|
64
64
|
*/
|
|
65
65
|
ignoreTransform?: boolean;
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Disable the hit canvas (useful when animations are playing)
|
|
69
|
+
*
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
disableHitCanvas?: boolean;
|
|
73
|
+
|
|
67
74
|
/**
|
|
68
75
|
* Show the hit canvas for debugging purposes.
|
|
69
76
|
*
|
|
@@ -144,13 +151,13 @@
|
|
|
144
151
|
import { onMount, untrack, type Snippet } from 'svelte';
|
|
145
152
|
import { cls } from '@layerstack/tailwind';
|
|
146
153
|
import { Logger, localPoint } from '@layerstack/utils';
|
|
147
|
-
import {
|
|
154
|
+
import { MediaQueryPresets } from '@layerstack/svelte-state';
|
|
148
155
|
|
|
149
156
|
import { setRenderContext } from '../Chart.svelte';
|
|
150
157
|
import { getTransformContext } from '../TransformContext.svelte';
|
|
151
158
|
import { getPixelColor, scaleCanvas, type ComputedStylesOptions } from '../../utils/canvas.js';
|
|
152
159
|
import { getColorStr, rgbColorGenerator } from '../../utils/color.js';
|
|
153
|
-
import { Context } from 'runed';
|
|
160
|
+
import { Context, useMutationObserver, watch } from 'runed';
|
|
154
161
|
import type {
|
|
155
162
|
HTMLCanvasAttributes,
|
|
156
163
|
MouseEventHandler,
|
|
@@ -171,6 +178,7 @@
|
|
|
171
178
|
fallback,
|
|
172
179
|
center = false,
|
|
173
180
|
ignoreTransform = false,
|
|
181
|
+
disableHitCanvas = false,
|
|
174
182
|
class: className,
|
|
175
183
|
children,
|
|
176
184
|
onclick,
|
|
@@ -256,6 +264,23 @@
|
|
|
256
264
|
* end HitCanvas
|
|
257
265
|
*/
|
|
258
266
|
|
|
267
|
+
// Invalidate/redraw if color scheme changes, either via browser `prefers-color-scheme` (including emulation) or by changing `<html class="dark">` or `<html data-theme="...">`
|
|
268
|
+
const { dark } = new MediaQueryPresets();
|
|
269
|
+
watch(
|
|
270
|
+
() => dark.current,
|
|
271
|
+
() => {
|
|
272
|
+
canvasContext.invalidate();
|
|
273
|
+
}
|
|
274
|
+
);
|
|
275
|
+
useMutationObserver(
|
|
276
|
+
() => document.documentElement,
|
|
277
|
+
() => canvasContext.invalidate(),
|
|
278
|
+
{
|
|
279
|
+
attributes: true,
|
|
280
|
+
attributeFilter: ['class', 'data-theme'],
|
|
281
|
+
}
|
|
282
|
+
);
|
|
283
|
+
|
|
259
284
|
onMount(() => {
|
|
260
285
|
context = ref?.getContext('2d', { willReadFrequently }) as CanvasRenderingContext2D;
|
|
261
286
|
|
|
@@ -263,22 +288,7 @@
|
|
|
263
288
|
willReadFrequently: false, // Explicitly set to `false` to resolve pixel artifacts between fill and stroke with the same color (issue #372)
|
|
264
289
|
}) as CanvasRenderingContext2D;
|
|
265
290
|
|
|
266
|
-
// Invalidate/redraw if color scheme changes, either via browser `prefers-color-scheme` (including emulation) or by changing `<html class="dark">` or `<html data-theme="...">`
|
|
267
|
-
darkColorScheme.subscribe(() => {
|
|
268
|
-
canvasContext.invalidate();
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
const observer = new MutationObserver(() => {
|
|
272
|
-
canvasContext.invalidate();
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
observer.observe(document.documentElement, {
|
|
276
|
-
attributes: true,
|
|
277
|
-
attributeFilter: ['class', 'data-theme'],
|
|
278
|
-
});
|
|
279
|
-
|
|
280
291
|
return () => {
|
|
281
|
-
observer.disconnect();
|
|
282
292
|
if (frameId) {
|
|
283
293
|
cancelAnimationFrame(frameId);
|
|
284
294
|
}
|
|
@@ -366,7 +376,7 @@
|
|
|
366
376
|
for (const c of nonRetainStateComponents) {
|
|
367
377
|
const componentHasEvents = c.events && Object.values(c.events).filter((d) => d).length > 0;
|
|
368
378
|
|
|
369
|
-
if (componentHasEvents && !inactiveMoving && !transformCtx.dragging) {
|
|
379
|
+
if (componentHasEvents && !inactiveMoving && !transformCtx.dragging && !disableHitCanvas) {
|
|
370
380
|
const color = getColorStr(colorGenerator.next().value);
|
|
371
381
|
const styleOverrides = { styles: { fill: color, stroke: color, _fillOpacity: 0.1 } };
|
|
372
382
|
|
|
@@ -55,6 +55,12 @@ export type CanvasPropsWithoutHTML = {
|
|
|
55
55
|
* @default false
|
|
56
56
|
*/
|
|
57
57
|
ignoreTransform?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Disable the hit canvas (useful when animations are playing)
|
|
60
|
+
*
|
|
61
|
+
* @default false
|
|
62
|
+
*/
|
|
63
|
+
disableHitCanvas?: boolean;
|
|
58
64
|
/**
|
|
59
65
|
* Show the hit canvas for debugging purposes.
|
|
60
66
|
*
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import { mdiInformation } from '@mdi/js';
|
|
3
3
|
import { Icon } from 'svelte-ux';
|
|
4
4
|
import { cls } from '@layerstack/tailwind';
|
|
5
|
+
|
|
6
|
+
const { children } = $props();
|
|
5
7
|
</script>
|
|
6
8
|
|
|
7
9
|
<div
|
|
@@ -11,5 +13,5 @@
|
|
|
11
13
|
)}
|
|
12
14
|
>
|
|
13
15
|
<Icon data={mdiInformation} class="text-primary" />
|
|
14
|
-
|
|
16
|
+
{@render children()}
|
|
15
17
|
</div>
|
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Blockquote: $$__sveltets_2_IsomorphicComponent<any, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {
|
|
17
|
-
default: {};
|
|
18
|
-
}, {}, string>;
|
|
19
|
-
type Blockquote = InstanceType<typeof Blockquote>;
|
|
1
|
+
declare const Blockquote: import("svelte").Component<{
|
|
2
|
+
children: any;
|
|
3
|
+
}, {}, "">;
|
|
4
|
+
type Blockquote = ReturnType<typeof Blockquote>;
|
|
20
5
|
export default Blockquote;
|
package/dist/docs/Code.svelte
CHANGED
|
@@ -4,20 +4,28 @@
|
|
|
4
4
|
import { CopyButton } from 'svelte-ux';
|
|
5
5
|
import { cls } from '@layerstack/tailwind';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
const {
|
|
8
|
+
source = null,
|
|
9
|
+
language = 'svelte',
|
|
10
|
+
highlightedSource = source
|
|
11
|
+
? Prism.highlight(source, Prism.languages[language] ?? Prism.languages.text, language)
|
|
12
|
+
: '',
|
|
13
|
+
classes = {},
|
|
14
|
+
class: className,
|
|
15
|
+
}: {
|
|
16
|
+
source: string | null;
|
|
17
|
+
language: string;
|
|
18
|
+
highlightedSource: string;
|
|
19
|
+
classes: {
|
|
20
|
+
root?: string;
|
|
21
|
+
pre?: string;
|
|
22
|
+
code?: string;
|
|
23
|
+
};
|
|
24
|
+
class: string;
|
|
25
|
+
} = $props();
|
|
18
26
|
</script>
|
|
19
27
|
|
|
20
|
-
<div class={cls('Code', 'rounded-sm', classes.root,
|
|
28
|
+
<div class={cls('Code', 'rounded-sm', classes.root, className)}>
|
|
21
29
|
{#if source}
|
|
22
30
|
<div class="relative">
|
|
23
31
|
<pre
|
|
@@ -1,29 +1,15 @@
|
|
|
1
1
|
import 'prism-svelte';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
$$events?: Events;
|
|
8
|
-
$$slots?: Slots;
|
|
9
|
-
}): Exports & {
|
|
10
|
-
$set?: any;
|
|
11
|
-
$on?: any;
|
|
12
|
-
};
|
|
13
|
-
z_$$bindings?: Bindings;
|
|
14
|
-
}
|
|
15
|
-
declare const Code: $$__sveltets_2_IsomorphicComponent<{
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
source?: string | null | undefined;
|
|
18
|
-
language?: string | undefined;
|
|
19
|
-
highlightedSource?: string | undefined;
|
|
20
|
-
classes?: {
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
source: string | null;
|
|
4
|
+
language: string;
|
|
5
|
+
highlightedSource: string;
|
|
6
|
+
classes: {
|
|
21
7
|
root?: string;
|
|
22
8
|
pre?: string;
|
|
23
9
|
code?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
type Code =
|
|
10
|
+
};
|
|
11
|
+
class: string;
|
|
12
|
+
};
|
|
13
|
+
declare const Code: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
14
|
+
type Code = ReturnType<typeof Code>;
|
|
29
15
|
export default Code;
|
package/dist/docs/Header1.svelte
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { SectionDivider } from 'svelte-ux';
|
|
3
|
+
|
|
4
|
+
let { children, ...restProps } = $props();
|
|
3
5
|
</script>
|
|
4
6
|
|
|
5
7
|
<!--
|
|
@@ -9,6 +11,6 @@
|
|
|
9
11
|
- Maybe possible to set/get props from markdown/mdsvex
|
|
10
12
|
- Example: `#API { id: 'api' }
|
|
11
13
|
-->
|
|
12
|
-
<SectionDivider {
|
|
13
|
-
|
|
14
|
+
<SectionDivider {...restProps}>
|
|
15
|
+
{@render children()}
|
|
14
16
|
</SectionDivider>
|
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
-
default: any;
|
|
16
|
-
} ? Props extends Record<string, never> ? any : {
|
|
17
|
-
children?: any;
|
|
18
|
-
} : {});
|
|
19
|
-
declare const Header1: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
[x: string]: any;
|
|
21
|
-
}, {
|
|
22
|
-
default: {};
|
|
23
|
-
}>, {
|
|
24
|
-
[evt: string]: CustomEvent<any>;
|
|
25
|
-
}, {
|
|
26
|
-
default: {};
|
|
27
|
-
}, {}, string>;
|
|
28
|
-
type Header1 = InstanceType<typeof Header1>;
|
|
1
|
+
declare const Header1: import("svelte").Component<{
|
|
2
|
+
children: any;
|
|
3
|
+
} & Record<string, any>, {}, "">;
|
|
4
|
+
type Header1 = ReturnType<typeof Header1>;
|
|
29
5
|
export default Header1;
|
package/dist/docs/Json.svelte
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
import JsonTree from 'svelte-json-tree';
|
|
3
3
|
import { cls } from '@layerstack/tailwind';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
export let defaultExpandedPaths = ['$'];
|
|
5
|
+
const { value, defaultExpandedPaths = ['$'], class: className } = $props();
|
|
7
6
|
</script>
|
|
8
7
|
|
|
9
|
-
<div class={cls('overflow-auto px-4 py-2 bg-[#1e1e1e]',
|
|
8
|
+
<div class={cls('overflow-auto px-4 py-2 bg-[#1e1e1e]', className)}>
|
|
10
9
|
<JsonTree
|
|
11
10
|
{value}
|
|
12
11
|
{defaultExpandedPaths}
|
|
@@ -1,22 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Json: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
[x: string]: any;
|
|
1
|
+
declare const Json: import("svelte").Component<{
|
|
16
2
|
value: any;
|
|
17
|
-
defaultExpandedPaths?:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type Json = InstanceType<typeof Json>;
|
|
3
|
+
defaultExpandedPaths?: any[];
|
|
4
|
+
class: any;
|
|
5
|
+
}, {}, "">;
|
|
6
|
+
type Json = ReturnType<typeof Json>;
|
|
22
7
|
export default Json;
|
package/dist/docs/Layout.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script
|
|
1
|
+
<script module>
|
|
2
2
|
// Custom components: https://mdsvex.com/docs#custom-components
|
|
3
3
|
import blockquote from './Blockquote.svelte';
|
|
4
4
|
import a from './Link.svelte';
|
|
@@ -8,11 +8,14 @@
|
|
|
8
8
|
</script>
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
let {
|
|
12
|
+
// frontmatter: https://mdsvex.com/docs#frontmatter-1
|
|
13
|
+
// name,
|
|
14
|
+
// sourceUrl,
|
|
15
|
+
// docUrl,
|
|
16
|
+
// description,
|
|
17
|
+
children,
|
|
18
|
+
} = $props();
|
|
16
19
|
</script>
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
{@render children()}
|
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
import blockquote from './Blockquote.svelte';
|
|
2
2
|
import a from './Link.svelte';
|
|
3
3
|
export { a, blockquote };
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
(internal: unknown, props: {
|
|
9
|
-
$$events?: Events;
|
|
10
|
-
$$slots?: Slots;
|
|
11
|
-
}): Exports & {
|
|
12
|
-
$set?: any;
|
|
13
|
-
$on?: any;
|
|
14
|
-
};
|
|
15
|
-
z_$$bindings?: Bindings;
|
|
16
|
-
}
|
|
17
|
-
declare const Layout: $$__sveltets_2_IsomorphicComponent<any, {
|
|
18
|
-
[evt: string]: CustomEvent<any>;
|
|
19
|
-
}, {
|
|
20
|
-
default: {};
|
|
21
|
-
}, {}, string>;
|
|
22
|
-
type Layout = InstanceType<typeof Layout>;
|
|
4
|
+
declare const Layout: import("svelte").Component<{
|
|
5
|
+
children: any;
|
|
6
|
+
}, {}, "">;
|
|
7
|
+
type Layout = ReturnType<typeof Layout>;
|
|
23
8
|
export default Layout;
|
package/dist/docs/Link.svelte
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let { children, ...restProps } = $props();
|
|
3
|
+
</script>
|
|
4
|
+
|
|
1
5
|
<!-- href provided by markdown/mdsvex -->
|
|
2
|
-
<!-- svelte-ignore
|
|
3
|
-
<a class="text-primary font-medium" {
|
|
4
|
-
|
|
6
|
+
<!-- svelte-ignore a11y_missing_attribute -->
|
|
7
|
+
<a class="text-primary font-medium" {...restProps}>
|
|
8
|
+
{@render children()}
|
|
5
9
|
</a>
|
|
@@ -1,39 +1,5 @@
|
|
|
1
|
+
declare const Link: import("svelte").Component<{
|
|
2
|
+
children: any;
|
|
3
|
+
} & Record<string, any>, {}, "">;
|
|
4
|
+
type Link = ReturnType<typeof Link>;
|
|
1
5
|
export default Link;
|
|
2
|
-
type Link = SvelteComponent<$$__sveltets_2_PropsWithChildren<{
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
}, {
|
|
5
|
-
default: {};
|
|
6
|
-
}>, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> & {
|
|
11
|
-
$$bindings?: string | undefined;
|
|
12
|
-
};
|
|
13
|
-
declare const Link: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
14
|
-
[x: string]: any;
|
|
15
|
-
}, {
|
|
16
|
-
default: {};
|
|
17
|
-
}>, {
|
|
18
|
-
[evt: string]: CustomEvent<any>;
|
|
19
|
-
}, {
|
|
20
|
-
default: {};
|
|
21
|
-
}, {}, string>;
|
|
22
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
23
|
-
default: any;
|
|
24
|
-
} ? Props extends Record<string, never> ? any : {
|
|
25
|
-
children?: any;
|
|
26
|
-
} : {});
|
|
27
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
28
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
29
|
-
$$bindings?: Bindings;
|
|
30
|
-
} & Exports;
|
|
31
|
-
(internal: unknown, props: Props & {
|
|
32
|
-
$$events?: Events;
|
|
33
|
-
$$slots?: Slots;
|
|
34
|
-
}): Exports & {
|
|
35
|
-
$set?: any;
|
|
36
|
-
$on?: any;
|
|
37
|
-
};
|
|
38
|
-
z_$$bindings?: Bindings;
|
|
39
|
-
}
|
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
import Code from './Code.svelte';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const {
|
|
9
|
+
label,
|
|
10
|
+
source,
|
|
11
|
+
href,
|
|
12
|
+
icon,
|
|
13
|
+
}: { label: string; source?: string; href?: string; icon: ComponentProps<Button>['icon'] } =
|
|
14
|
+
$props();
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
17
|
{#if source}
|
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
import type { ComponentProps } from 'svelte';
|
|
2
2
|
import { Button } from 'svelte-ux';
|
|
3
|
-
|
|
4
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
5
|
-
$$bindings?: Bindings;
|
|
6
|
-
} & Exports;
|
|
7
|
-
(internal: unknown, props: Props & {
|
|
8
|
-
$$events?: Events;
|
|
9
|
-
$$slots?: Slots;
|
|
10
|
-
}): Exports & {
|
|
11
|
-
$set?: any;
|
|
12
|
-
$on?: any;
|
|
13
|
-
};
|
|
14
|
-
z_$$bindings?: Bindings;
|
|
15
|
-
}
|
|
16
|
-
declare const ViewSourceButton: $$__sveltets_2_IsomorphicComponent<{
|
|
3
|
+
type $$ComponentProps = {
|
|
17
4
|
label: string;
|
|
18
|
-
source?: string
|
|
19
|
-
href?: string
|
|
20
|
-
icon: ComponentProps<Button>[
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type ViewSourceButton = InstanceType<typeof ViewSourceButton>;
|
|
5
|
+
source?: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
icon: ComponentProps<Button>['icon'];
|
|
8
|
+
};
|
|
9
|
+
declare const ViewSourceButton: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
10
|
+
type ViewSourceButton = ReturnType<typeof ViewSourceButton>;
|
|
25
11
|
export default ViewSourceButton;
|
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": "2.0.0-next.
|
|
7
|
+
"version": "2.0.0-next.7",
|
|
8
8
|
"devDependencies": {
|
|
9
9
|
"@changesets/cli": "^2.29.4",
|
|
10
10
|
"@iconify-json/lucide": "^1.2.42",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
17
17
|
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
|
|
18
18
|
"@tailwindcss/typography": "^0.5.16",
|
|
19
|
-
"@tailwindcss/vite": "^4.1.
|
|
19
|
+
"@tailwindcss/vite": "^4.1.7",
|
|
20
20
|
"@types/d3": "^7.4.3",
|
|
21
21
|
"@types/d3-array": "^3.2.1",
|
|
22
22
|
"@types/d3-color": "^3.1.3",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@types/topojson-specification": "^1.0.5",
|
|
44
44
|
"marked": "^15.0.11",
|
|
45
45
|
"mdsvex": "^0.12.3",
|
|
46
|
-
"posthog-js": "^1.242.
|
|
46
|
+
"posthog-js": "^1.242.2",
|
|
47
47
|
"prettier": "^3.5.3",
|
|
48
48
|
"prettier-plugin-svelte": "^3.4.0",
|
|
49
49
|
"prism-svelte": "^0.5.0",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"rehype-slug": "^6.0.0",
|
|
53
53
|
"shapefile": "^0.6.6",
|
|
54
54
|
"solar-calculator": "^0.3.0",
|
|
55
|
-
"svelte": "5.
|
|
56
|
-
"svelte-check": "^4.2.
|
|
55
|
+
"svelte": "5.30.1",
|
|
56
|
+
"svelte-check": "^4.2.1",
|
|
57
57
|
"svelte-json-tree": "^2.2.0",
|
|
58
58
|
"svelte-ux": "2.0.0-next.2",
|
|
59
|
-
"svelte2tsx": "^0.7.
|
|
60
|
-
"tailwindcss": "^4.1.
|
|
59
|
+
"svelte2tsx": "^0.7.39",
|
|
60
|
+
"tailwindcss": "^4.1.7",
|
|
61
61
|
"topojson-client": "^3.1.0",
|
|
62
62
|
"topojson-simplify": "^3.0.3",
|
|
63
63
|
"tslib": "^2.8.1",
|
|
@@ -72,8 +72,7 @@
|
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@dagrejs/dagre": "^1.1.4",
|
|
74
74
|
"@layerstack/svelte-actions": "1.0.1-next.2",
|
|
75
|
-
"@layerstack/svelte-state": "0.1.0-next.
|
|
76
|
-
"@layerstack/svelte-stores": "1.0.2-next.2",
|
|
75
|
+
"@layerstack/svelte-state": "0.1.0-next.4",
|
|
77
76
|
"@layerstack/tailwind": "2.0.0-next.4",
|
|
78
77
|
"@layerstack/utils": "1.1.0-next.2",
|
|
79
78
|
"d3-array": "^3.2.4",
|
|
@@ -97,7 +96,7 @@
|
|
|
97
96
|
"d3-time": "^3.1.0",
|
|
98
97
|
"date-fns": "^4.1.0",
|
|
99
98
|
"lodash-es": "^4.17.21",
|
|
100
|
-
"runed": "^0.
|
|
99
|
+
"runed": "^0.28.0"
|
|
101
100
|
},
|
|
102
101
|
"peerDependencies": {
|
|
103
102
|
"svelte": "^5.0.0"
|