svelteplot 0.10.0 → 0.10.1-pr-357.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 +9 -2
- package/dist/Mark.svelte.d.ts +4 -4
- package/dist/constants.d.ts +1 -1
- package/dist/helpers/colors.d.ts +8 -11
- package/dist/helpers/curves.d.ts +2 -2
- package/dist/helpers/facets.d.ts +1 -1
- package/dist/helpers/getBaseStyles.d.ts +2 -4
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/reduce.d.ts +1 -1
- package/dist/helpers/scales.d.ts +7 -7
- package/dist/helpers/symbols.d.ts +1 -1
- package/dist/helpers/time.d.ts +3 -3
- package/dist/helpers/typeChecks.d.ts +4 -4
- package/dist/marks/Area.svelte.d.ts +5 -4
- package/dist/marks/AreaX.svelte.d.ts +4 -4
- package/dist/marks/AreaY.svelte +1 -0
- package/dist/marks/AreaY.svelte.d.ts +110 -0
- package/dist/marks/Arrow.svelte.d.ts +5 -4
- package/dist/marks/AxisX.svelte.d.ts +6 -5
- package/dist/marks/AxisY.svelte.d.ts +6 -5
- package/dist/marks/BarX.svelte.d.ts +4 -4
- package/dist/marks/BarY.svelte.d.ts +5 -4
- package/dist/marks/BollingerX.svelte.d.ts +2 -77
- package/dist/marks/BollingerY.svelte.d.ts +2 -77
- package/dist/marks/BoxY.svelte.d.ts +1 -64
- package/dist/marks/Brush.svelte.d.ts +1 -64
- package/dist/marks/Cell.svelte.d.ts +5 -4
- package/dist/marks/CellX.svelte.d.ts +30 -30
- package/dist/marks/CellY.svelte.d.ts +30 -30
- package/dist/marks/CustomMark.svelte.d.ts +2 -85
- package/dist/marks/DifferenceY.svelte.d.ts +1 -64
- package/dist/marks/Dot.svelte.d.ts +5 -4
- package/dist/marks/DotX.svelte.d.ts +5 -5
- package/dist/marks/DotY.svelte.d.ts +5 -5
- package/dist/marks/Frame.svelte.d.ts +6 -5
- package/dist/marks/Geo.svelte.d.ts +5 -4
- package/dist/marks/GridX.svelte.d.ts +5 -4
- package/dist/marks/GridY.svelte.d.ts +5 -4
- package/dist/marks/Image.svelte.d.ts +5 -4
- package/dist/marks/Line.svelte.d.ts +4 -4
- package/dist/marks/LineX.svelte.d.ts +6 -6
- package/dist/marks/LineY.svelte.d.ts +6 -6
- package/dist/marks/Link.svelte.d.ts +5 -4
- package/dist/marks/Rect.svelte.d.ts +5 -4
- package/dist/marks/RuleX.svelte.d.ts +5 -4
- package/dist/marks/RuleY.svelte.d.ts +5 -4
- package/dist/marks/Spike.svelte.d.ts +5 -5
- package/dist/marks/Text.svelte.d.ts +9 -8
- package/dist/marks/TickX.svelte.d.ts +5 -4
- package/dist/marks/TickY.svelte.d.ts +5 -4
- package/dist/marks/Trail.svelte.d.ts +1 -64
- package/dist/marks/Vector.svelte.d.ts +5 -4
- package/dist/marks/WaffleX.svelte.d.ts +2 -86
- package/dist/marks/WaffleY.svelte.d.ts +5 -4
- package/dist/marks/helpers/Box.svelte.d.ts +1 -64
- package/dist/marks/helpers/MarkerPath.svelte.d.ts +2 -107
- package/dist/transforms/centroid.d.ts +1 -4
- package/dist/transforms/interval.d.ts +18 -18
- package/dist/transforms/normalize.d.ts +34 -0
- package/dist/transforms/recordize.d.ts +4 -7
- package/dist/transforms/rename.d.ts +1 -1
- package/dist/transforms/select.d.ts +182 -182
- package/dist/transforms/sort.d.ts +34 -39
- package/dist/transforms/stack.d.ts +12 -12
- package/dist/transforms/window.d.ts +2 -136
- package/package.json +167 -150
- 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,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