svelteplot 0.10.1 → 0.10.2
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/marks/AreaY.svelte +1 -0
- package/dist/marks/AreaY.svelte.d.ts +110 -0
- package/dist/marks/BollingerX.svelte.d.ts +2 -2
- package/dist/marks/BollingerY.svelte.d.ts +2 -2
- package/dist/marks/BoxY.svelte.d.ts +2 -2
- package/dist/marks/Brush.svelte.d.ts +2 -2
- package/dist/marks/CustomMark.svelte.d.ts +2 -2
- package/dist/marks/DifferenceY.svelte.d.ts +2 -2
- package/dist/transforms/interval.d.ts +18 -18
- package/dist/transforms/normalize.d.ts +34 -0
- package/dist/transforms/select.d.ts +182 -182
- package/dist/transforms/sort.d.ts +30 -30
- package/dist/transforms/window.d.ts +54 -54
- package/package.json +1 -1
- package/dist/ui/Checkbox.svelte +0 -14
- package/dist/ui/Checkbox.svelte.d.ts +0 -13
- package/dist/ui/ExamplesGrid.svelte +0 -81
- package/dist/ui/ExamplesGrid.svelte.d.ts +0 -11
- package/dist/ui/ExamplesPageList.svelte +0 -63
- package/dist/ui/ExamplesPageList.svelte.d.ts +0 -12
- package/dist/ui/ExamplesPagePreview.svelte +0 -145
- package/dist/ui/ExamplesPagePreview.svelte.d.ts +0 -12
- package/dist/ui/RadioInput.svelte +0 -27
- package/dist/ui/RadioInput.svelte.d.ts +0 -9
- package/dist/ui/Select.svelte +0 -27
- package/dist/ui/Select.svelte.d.ts +0 -9
- package/dist/ui/Slider.svelte +0 -47
- package/dist/ui/Slider.svelte.d.ts +0 -11
- package/dist/ui/Spiral.svelte +0 -35
- package/dist/ui/Spiral.svelte.d.ts +0 -15
- package/dist/ui/index.d.ts +0 -4
- package/dist/ui/index.js +0 -4
- package/dist/ui/isDark.svelte.d.ts +0 -6
- package/dist/ui/isDark.svelte.js +0 -10
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type $$ComponentProps = {
|
|
2
|
-
paths: Record<string, string[]>;
|
|
3
|
-
pages: Record<string, {
|
|
4
|
-
title: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
sortKey?: number;
|
|
7
|
-
transforms?: string[];
|
|
8
|
-
}>;
|
|
9
|
-
};
|
|
10
|
-
declare const ExamplesPagePreview: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
-
type ExamplesPagePreview = ReturnType<typeof ExamplesPagePreview>;
|
|
12
|
-
export default ExamplesPagePreview;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let {
|
|
3
|
-
label = '',
|
|
4
|
-
value = $bindable(),
|
|
5
|
-
options,
|
|
6
|
-
format = (d) => d
|
|
7
|
-
}: {
|
|
8
|
-
label?: string;
|
|
9
|
-
value: string | number | undefined;
|
|
10
|
-
options: any[];
|
|
11
|
-
format?: (d: any) => string;
|
|
12
|
-
} = $props();
|
|
13
|
-
|
|
14
|
-
const randomId = (Math.random() * 1e7).toString(32);
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<div style="display:inline-block">
|
|
18
|
-
{#if label}
|
|
19
|
-
<label for={randomId}>{label}:</label>
|
|
20
|
-
{/if}
|
|
21
|
-
{#each options as p (p)}
|
|
22
|
-
<label>
|
|
23
|
-
<input type="radio" id={randomId} bind:group={value} value={p} />
|
|
24
|
-
{format(p)}
|
|
25
|
-
</label>
|
|
26
|
-
{/each}
|
|
27
|
-
</div>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type $$ComponentProps = {
|
|
2
|
-
label?: string;
|
|
3
|
-
value: string | number | undefined;
|
|
4
|
-
options: any[];
|
|
5
|
-
format?: (d: any) => string;
|
|
6
|
-
};
|
|
7
|
-
declare const RadioInput: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
8
|
-
type RadioInput = ReturnType<typeof RadioInput>;
|
|
9
|
-
export default RadioInput;
|
package/dist/ui/Select.svelte
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let {
|
|
3
|
-
label = '',
|
|
4
|
-
value = $bindable(),
|
|
5
|
-
options,
|
|
6
|
-
format = (d) => d
|
|
7
|
-
}: {
|
|
8
|
-
label?: string;
|
|
9
|
-
value: string | number | undefined;
|
|
10
|
-
options: any[];
|
|
11
|
-
format?: (d: any) => string;
|
|
12
|
-
} = $props();
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<label
|
|
16
|
-
>{label || ''}
|
|
17
|
-
<select bind:value>
|
|
18
|
-
{#each options as p (p)}
|
|
19
|
-
<option value={p}>{format(p)}</option>
|
|
20
|
-
{/each}
|
|
21
|
-
</select></label>
|
|
22
|
-
|
|
23
|
-
<style>
|
|
24
|
-
label {
|
|
25
|
-
margin-right: 1em;
|
|
26
|
-
}
|
|
27
|
-
</style>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type $$ComponentProps = {
|
|
2
|
-
label?: string;
|
|
3
|
-
value: string | number | undefined;
|
|
4
|
-
options: any[];
|
|
5
|
-
format?: (d: any) => string;
|
|
6
|
-
};
|
|
7
|
-
declare const Select: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
8
|
-
type Select = ReturnType<typeof Select>;
|
|
9
|
-
export default Select;
|
package/dist/ui/Slider.svelte
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
let {
|
|
3
|
-
label,
|
|
4
|
-
value = $bindable(),
|
|
5
|
-
min = 0,
|
|
6
|
-
max = 100,
|
|
7
|
-
step = 1,
|
|
8
|
-
type = 'range'
|
|
9
|
-
}: {
|
|
10
|
-
label: string;
|
|
11
|
-
type?: 'range' | 'number';
|
|
12
|
-
value: number;
|
|
13
|
-
min?: number;
|
|
14
|
-
max?: number;
|
|
15
|
-
step?: number;
|
|
16
|
-
} = $props();
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<label>
|
|
20
|
-
<span>{label}:</span>
|
|
21
|
-
{#if type === 'range'}
|
|
22
|
-
<input type="range" bind:value {min} {max} {step} />
|
|
23
|
-
<span class="value">({value})</span>{:else}
|
|
24
|
-
<input
|
|
25
|
-
type="number"
|
|
26
|
-
style:width={`${`${Math.max(Math.abs(min), Math.abs(max))}`.length}rem`}
|
|
27
|
-
bind:value
|
|
28
|
-
{min}
|
|
29
|
-
{max}
|
|
30
|
-
{step} />
|
|
31
|
-
{/if}
|
|
32
|
-
</label>
|
|
33
|
-
|
|
34
|
-
<style>
|
|
35
|
-
label {
|
|
36
|
-
display: inline-flex;
|
|
37
|
-
gap: 1ex;
|
|
38
|
-
margin-right: 1em;
|
|
39
|
-
}
|
|
40
|
-
.value {
|
|
41
|
-
opacity: 0.5;
|
|
42
|
-
}
|
|
43
|
-
input {
|
|
44
|
-
accent-color: var(--svp-accent);
|
|
45
|
-
width: 15ex;
|
|
46
|
-
}
|
|
47
|
-
</style>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type $$ComponentProps = {
|
|
2
|
-
label: string;
|
|
3
|
-
type?: 'range' | 'number';
|
|
4
|
-
value: number;
|
|
5
|
-
min?: number;
|
|
6
|
-
max?: number;
|
|
7
|
-
step?: number;
|
|
8
|
-
};
|
|
9
|
-
declare const Slider: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
10
|
-
type Slider = ReturnType<typeof Slider>;
|
|
11
|
-
export default Slider;
|
package/dist/ui/Spiral.svelte
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { usePlot } from '../hooks/usePlot.svelte';
|
|
3
|
-
|
|
4
|
-
let { numTurns = 4, finalRadius = 10, duration = 2, ...restProps } = $props();
|
|
5
|
-
|
|
6
|
-
const plot = usePlot();
|
|
7
|
-
|
|
8
|
-
const pathD = $derived.by(() => {
|
|
9
|
-
const numPoints = 100;
|
|
10
|
-
const k = finalRadius / (2 * Math.PI * numTurns);
|
|
11
|
-
const angleStep = (2 * Math.PI * numTurns) / numPoints;
|
|
12
|
-
|
|
13
|
-
const points = [];
|
|
14
|
-
for (let i = 0; i <= numPoints; i++) {
|
|
15
|
-
const t = i * angleStep;
|
|
16
|
-
const r = k * t;
|
|
17
|
-
const x = r * Math.cos(t);
|
|
18
|
-
const y = r * Math.sin(t);
|
|
19
|
-
points.push([x, y]);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
let d = `M ${points[0][0].toFixed(2)},${points[0][1].toFixed(2)} `;
|
|
23
|
-
for (let i = 1; i < points.length; i++) {
|
|
24
|
-
d += `L ${points[i][0].toFixed(2)},${points[i][1].toFixed(2)} `;
|
|
25
|
-
}
|
|
26
|
-
return d.trim();
|
|
27
|
-
});
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<path
|
|
31
|
-
d={pathD}
|
|
32
|
-
style:animation-duration="{duration}s"
|
|
33
|
-
stroke="currentColor"
|
|
34
|
-
fill="none"
|
|
35
|
-
{...restProps} />
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export default Spiral;
|
|
2
|
-
type Spiral = {
|
|
3
|
-
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
-
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
-
};
|
|
6
|
-
declare const Spiral: import("svelte").Component<{
|
|
7
|
-
numTurns?: number;
|
|
8
|
-
finalRadius?: number;
|
|
9
|
-
duration?: number;
|
|
10
|
-
} & Record<string, any>, {}, "">;
|
|
11
|
-
type $$ComponentProps = {
|
|
12
|
-
numTurns?: number;
|
|
13
|
-
finalRadius?: number;
|
|
14
|
-
duration?: number;
|
|
15
|
-
} & Record<string, any>;
|
package/dist/ui/index.d.ts
DELETED
package/dist/ui/index.js
DELETED