svelteplot 0.8.1-pr-283.11 → 0.8.1-pr-298.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/dist/Mark.svelte +1 -1
- package/dist/Mark.svelte.d.ts +0 -1
- package/dist/constants.d.ts +0 -2
- package/dist/constants.js +0 -2
- package/dist/helpers/projection.js +2 -7
- package/dist/marks/Area.svelte.d.ts +0 -1
- package/dist/marks/AreaX.svelte.d.ts +0 -1
- package/dist/marks/Arrow.svelte.d.ts +0 -1
- package/dist/marks/AxisX.svelte.d.ts +0 -1
- package/dist/marks/AxisY.svelte +1 -1
- package/dist/marks/AxisY.svelte.d.ts +0 -1
- package/dist/marks/BarX.svelte.d.ts +0 -1
- package/dist/marks/BarY.svelte.d.ts +0 -1
- package/dist/marks/BoxX.svelte +3 -138
- package/dist/marks/BoxY.svelte +8 -137
- package/dist/marks/BoxY.svelte.d.ts +5 -1
- package/dist/marks/Cell.svelte.d.ts +0 -1
- package/dist/marks/Dot.svelte.d.ts +0 -1
- package/dist/marks/DotX.svelte.d.ts +0 -1
- package/dist/marks/DotY.svelte.d.ts +0 -1
- package/dist/marks/Frame.svelte.d.ts +0 -1
- package/dist/marks/Geo.svelte +0 -2
- package/dist/marks/Geo.svelte.d.ts +0 -2
- package/dist/marks/GridX.svelte.d.ts +0 -1
- package/dist/marks/GridY.svelte.d.ts +0 -1
- package/dist/marks/Line.svelte +2 -5
- package/dist/marks/Line.svelte.d.ts +0 -1
- package/dist/marks/LineX.svelte.d.ts +0 -1
- package/dist/marks/LineY.svelte.d.ts +0 -1
- package/dist/marks/Link.svelte.d.ts +0 -1
- package/dist/marks/Rect.svelte.d.ts +0 -1
- package/dist/marks/RuleX.svelte.d.ts +0 -1
- package/dist/marks/RuleY.svelte.d.ts +0 -1
- package/dist/marks/Spike.svelte.d.ts +0 -1
- package/dist/marks/Text.svelte.d.ts +0 -1
- package/dist/marks/TickX.svelte.d.ts +0 -1
- package/dist/marks/TickY.svelte.d.ts +0 -1
- package/dist/marks/Vector.svelte.d.ts +0 -1
- package/dist/marks/helpers/Box.svelte +254 -0
- package/dist/marks/helpers/Box.svelte.d.ts +55 -0
- package/dist/marks/index.d.ts +0 -1
- package/dist/marks/index.js +0 -1
- package/dist/types/mark.d.ts +1 -2
- package/dist/types/plot.d.ts +1 -5
- package/package.json +15 -16
- package/dist/marks/Trail.svelte +0 -163
- package/dist/marks/Trail.svelte.d.ts +0 -44
- package/dist/marks/helpers/TrailCanvas.svelte +0 -140
- package/dist/marks/helpers/TrailCanvas.svelte.d.ts +0 -40
- package/dist/marks/helpers/trail.d.ts +0 -23
- package/dist/marks/helpers/trail.js +0 -372
|
@@ -27,7 +27,6 @@ declare function $$render<Datum = DataRecord | RawValue>(): {
|
|
|
27
27
|
strokeDashoffset: ConstantAccessor<number, Datum>;
|
|
28
28
|
mixBlendMode: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
29
29
|
clipPath: string;
|
|
30
|
-
mask: string;
|
|
31
30
|
imageFilter: ConstantAccessor<string, Datum>;
|
|
32
31
|
shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
33
32
|
paintOrder: ConstantAccessor<string, Datum>;
|
|
@@ -27,7 +27,6 @@ declare function $$render<Datum = DataRecord>(): {
|
|
|
27
27
|
strokeDashoffset: ConstantAccessor<number, Datum>;
|
|
28
28
|
mixBlendMode: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
29
29
|
clipPath: string;
|
|
30
|
-
mask: string;
|
|
31
30
|
imageFilter: ConstantAccessor<string, Datum>;
|
|
32
31
|
shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
33
32
|
paintOrder: ConstantAccessor<string, Datum>;
|
|
@@ -27,7 +27,6 @@ declare function $$render<Datum extends DataRecord>(): {
|
|
|
27
27
|
strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
28
28
|
mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/data").RawValue>>;
|
|
29
29
|
clipPath: string;
|
|
30
|
-
mask: string;
|
|
31
30
|
imageFilter: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
32
31
|
shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/data").RawValue>>;
|
|
33
32
|
paintOrder: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
@@ -29,7 +29,6 @@ declare function $$render<Datum extends DataRecord>(): {
|
|
|
29
29
|
strokeDashoffset: ConstantAccessor<number, Datum>;
|
|
30
30
|
mixBlendMode: ConstantAccessor<CSS.Property.MixBlendMode, Datum>;
|
|
31
31
|
clipPath: string;
|
|
32
|
-
mask: string;
|
|
33
32
|
imageFilter: ConstantAccessor<string, Datum>;
|
|
34
33
|
shapeRendering: ConstantAccessor<CSS.Property.ShapeRendering, Datum>;
|
|
35
34
|
paintOrder: ConstantAccessor<string, Datum>;
|
|
@@ -27,7 +27,6 @@ declare function $$render<Datum extends DataRow>(): {
|
|
|
27
27
|
strokeDashoffset: ConstantAccessor<number, Datum>;
|
|
28
28
|
mixBlendMode: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
29
29
|
clipPath: string;
|
|
30
|
-
mask: string;
|
|
31
30
|
imageFilter: ConstantAccessor<string, Datum>;
|
|
32
31
|
shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
33
32
|
paintOrder: ConstantAccessor<string, Datum>;
|
|
@@ -27,7 +27,6 @@ declare function $$render<Datum extends DataRow>(): {
|
|
|
27
27
|
strokeDashoffset: ConstantAccessor<number, Datum>;
|
|
28
28
|
mixBlendMode: ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
29
29
|
clipPath: string;
|
|
30
|
-
mask: string;
|
|
31
30
|
imageFilter: ConstantAccessor<string, Datum>;
|
|
32
31
|
shapeRendering: ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
33
32
|
paintOrder: ConstantAccessor<string, Datum>;
|
|
@@ -32,7 +32,6 @@ declare function $$render<Datum extends DataRecord>(): {
|
|
|
32
32
|
strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Datum>;
|
|
33
33
|
mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Datum>;
|
|
34
34
|
clipPath: string;
|
|
35
|
-
mask: string;
|
|
36
35
|
imageFilter: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
37
36
|
shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Datum>;
|
|
38
37
|
paintOrder: import("../types/index.js").ConstantAccessor<string, Datum>;
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<!-- @component
|
|
2
|
+
Internal shared box plot implementation for BoxX and BoxY
|
|
3
|
+
-->
|
|
4
|
+
<script lang="ts" generics="Datum extends DataRecord">
|
|
5
|
+
type Orientation = 'x' | 'y';
|
|
6
|
+
|
|
7
|
+
interface BoxMarkProps extends Pick<
|
|
8
|
+
BaseMarkProps<Datum>,
|
|
9
|
+
'class' | 'fill' | 'stroke' | 'fx' | 'fy'
|
|
10
|
+
> {
|
|
11
|
+
data: Datum[];
|
|
12
|
+
x: ChannelAccessor;
|
|
13
|
+
y: ChannelAccessor;
|
|
14
|
+
/**
|
|
15
|
+
* Custom sort order for grouped box plot data
|
|
16
|
+
*/
|
|
17
|
+
sort?: 'min' | 'max' | 'median' | 'p25' | 'p75' | ((d: Datum) => RawValue);
|
|
18
|
+
/**
|
|
19
|
+
* Options for the rule marks that represent the min/max range
|
|
20
|
+
*/
|
|
21
|
+
rule: Record<string, ChannelAccessor<Datum>>;
|
|
22
|
+
/**
|
|
23
|
+
* Options for the bar marks that represent the IQR range
|
|
24
|
+
*/
|
|
25
|
+
bar: Record<string, ChannelAccessor<Datum>>;
|
|
26
|
+
/**
|
|
27
|
+
* Options for the tick marks that represent the median
|
|
28
|
+
*/
|
|
29
|
+
tickMedian: Record<string, ChannelAccessor<Datum>> | boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Options for the tick marks that represent the min/max range
|
|
32
|
+
*/
|
|
33
|
+
tickMinMax: Record<string, ChannelAccessor<Datum>> | boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Options for the dot marks that represent the outliers
|
|
36
|
+
*/
|
|
37
|
+
dot: Record<string, ChannelAccessor<Datum>>;
|
|
38
|
+
orientation: Orientation;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
import GroupMultiple from './GroupMultiple.svelte';
|
|
42
|
+
import { groupX, groupY, BarY, TickY, RuleX, BarX, TickX, RuleY, Dot } from '../../index.js';
|
|
43
|
+
import { resolveChannel } from '../../helpers/resolve.js';
|
|
44
|
+
import type { BaseMarkProps, ChannelAccessor, DataRecord, RawValue } from '../../types';
|
|
45
|
+
import { IS_SORTED } from '../../transforms/sort';
|
|
46
|
+
|
|
47
|
+
let markProps: BoxMarkProps = $props();
|
|
48
|
+
|
|
49
|
+
const {
|
|
50
|
+
data = [{}],
|
|
51
|
+
bar,
|
|
52
|
+
rule,
|
|
53
|
+
tickMedian,
|
|
54
|
+
tickMinMax,
|
|
55
|
+
dot,
|
|
56
|
+
x,
|
|
57
|
+
y,
|
|
58
|
+
sort,
|
|
59
|
+
fx,
|
|
60
|
+
fy,
|
|
61
|
+
fill,
|
|
62
|
+
stroke,
|
|
63
|
+
orientation,
|
|
64
|
+
class: className = ''
|
|
65
|
+
}: BoxMarkProps = $derived(markProps);
|
|
66
|
+
|
|
67
|
+
const groupFn = $derived(orientation === 'y' ? groupX : groupY);
|
|
68
|
+
const BarMark = $derived(orientation === 'y' ? BarY : BarX);
|
|
69
|
+
const RuleMark = $derived(orientation === 'y' ? RuleX : RuleY);
|
|
70
|
+
const TickMark = $derived(orientation === 'y' ? TickY : TickX);
|
|
71
|
+
|
|
72
|
+
// the channels as if this would be a BoxX
|
|
73
|
+
const xChannel = $derived(orientation === 'y' ? y : x);
|
|
74
|
+
const yChannel = $derived(orientation === 'y' ? x : y);
|
|
75
|
+
const xProp = $derived(orientation === 'x' ? 'x' : 'y');
|
|
76
|
+
const x1Prop = $derived(`${xProp}1`);
|
|
77
|
+
const x2Prop = $derived(`${xProp}2`);
|
|
78
|
+
const yProp = $derived(orientation === 'x' ? 'y' : 'x');
|
|
79
|
+
|
|
80
|
+
const { data: grouped, ...groupChannels } = $derived(
|
|
81
|
+
groupFn(
|
|
82
|
+
{
|
|
83
|
+
data: data.filter((d) => resolveChannel(yProp, d, { x, y }) != null),
|
|
84
|
+
x,
|
|
85
|
+
y,
|
|
86
|
+
[x1Prop]: xChannel,
|
|
87
|
+
[x2Prop]: xChannel,
|
|
88
|
+
fx,
|
|
89
|
+
fy
|
|
90
|
+
},
|
|
91
|
+
{ [xProp]: 'median', [x1Prop]: 'p25', [x2Prop]: 'p75', fill: (rows) => rows }
|
|
92
|
+
)
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
const X = Symbol('x'),
|
|
96
|
+
Y = Symbol('y'),
|
|
97
|
+
FX = Symbol('fx'),
|
|
98
|
+
FY = Symbol('fy'),
|
|
99
|
+
P25 = Symbol('p25'),
|
|
100
|
+
P75 = Symbol('p75'),
|
|
101
|
+
MEDIAN = Symbol('median'),
|
|
102
|
+
MIN = Symbol('min'),
|
|
103
|
+
MAX = Symbol('max'),
|
|
104
|
+
OUTLIERS = Symbol('outliers'),
|
|
105
|
+
SORT_REF = Symbol('sortRef');
|
|
106
|
+
|
|
107
|
+
const facets = $derived({
|
|
108
|
+
...(fx != null && { fx: FX }),
|
|
109
|
+
...(fy != null && { fy: FY })
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const sortProps = { [IS_SORTED]: true };
|
|
113
|
+
|
|
114
|
+
const compareValues = (a: RawValue, b: RawValue) =>
|
|
115
|
+
(typeof a === 'string' && typeof b === 'string'
|
|
116
|
+
? a.localeCompare(b)
|
|
117
|
+
: a > b
|
|
118
|
+
? 1
|
|
119
|
+
: a < b
|
|
120
|
+
? -1
|
|
121
|
+
: 0) || 0;
|
|
122
|
+
|
|
123
|
+
const boxData = $derived.by(() => {
|
|
124
|
+
const boxes = grouped.map((row) => {
|
|
125
|
+
const medianKey = groupChannels[xProp];
|
|
126
|
+
const p25Key = groupChannels[x1Prop];
|
|
127
|
+
const p75Key = groupChannels[x2Prop];
|
|
128
|
+
const groupKey = groupChannels[yProp];
|
|
129
|
+
|
|
130
|
+
const iqr = row[p75Key] - row[p25Key];
|
|
131
|
+
const whisker = iqr * 1.5;
|
|
132
|
+
const lower = row[p25Key] - whisker;
|
|
133
|
+
const upper = row[p75Key] + whisker;
|
|
134
|
+
const data = row[groupChannels.fill].map((d) => ({
|
|
135
|
+
...d,
|
|
136
|
+
[orientation === 'y' ? Y : X]: resolveChannel(xProp, d, {
|
|
137
|
+
x,
|
|
138
|
+
y
|
|
139
|
+
})
|
|
140
|
+
}));
|
|
141
|
+
const valueSym = orientation === 'y' ? Y : X;
|
|
142
|
+
const groupSym = orientation === 'y' ? X : Y;
|
|
143
|
+
const outliers = data.filter((d) => d[valueSym] < lower || d[valueSym] > upper);
|
|
144
|
+
const inside = data
|
|
145
|
+
.filter((d) => d[valueSym] >= lower && d[valueSym] <= upper)
|
|
146
|
+
.sort((a, b) => a[valueSym] - b[valueSym]);
|
|
147
|
+
|
|
148
|
+
return {
|
|
149
|
+
...data[0],
|
|
150
|
+
[SORT_REF]: row[groupChannels.fill]?.[0],
|
|
151
|
+
[groupSym]: row[groupKey],
|
|
152
|
+
[P25]: row[p25Key],
|
|
153
|
+
[MEDIAN]: row[medianKey],
|
|
154
|
+
[P75]: row[p75Key],
|
|
155
|
+
[MIN]: inside[0][valueSym],
|
|
156
|
+
[MAX]: inside.at(-1)[valueSym],
|
|
157
|
+
[FX]: resolveChannel('fx', data[0], { fx }, null),
|
|
158
|
+
[FY]: resolveChannel('fy', data[0], { fy }, null),
|
|
159
|
+
[OUTLIERS]: outliers
|
|
160
|
+
};
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
const stripSortRef = ({ [SORT_REF]: _, ...rest }) => rest;
|
|
164
|
+
|
|
165
|
+
if (!sort) return boxes.map(stripSortRef);
|
|
166
|
+
|
|
167
|
+
const sortAccessor =
|
|
168
|
+
typeof sort === 'function'
|
|
169
|
+
? (d) => sort(d[SORT_REF])
|
|
170
|
+
: (d) => {
|
|
171
|
+
switch (sort) {
|
|
172
|
+
case 'min':
|
|
173
|
+
return d[MIN];
|
|
174
|
+
case 'max':
|
|
175
|
+
return d[MAX];
|
|
176
|
+
case 'p25':
|
|
177
|
+
return d[P25];
|
|
178
|
+
case 'p75':
|
|
179
|
+
return d[P75];
|
|
180
|
+
case 'median':
|
|
181
|
+
default:
|
|
182
|
+
return d[MEDIAN];
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
const direction = typeof sort === 'string' ? -1 : 1;
|
|
187
|
+
|
|
188
|
+
return boxes
|
|
189
|
+
.toSorted((a, b) => compareValues(sortAccessor(a), sortAccessor(b)) * direction)
|
|
190
|
+
.map(stripSortRef);
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
const valueSymbol = $derived(orientation === 'y' ? Y : X);
|
|
194
|
+
const groupSymbol = $derived(orientation === 'y' ? X : Y);
|
|
195
|
+
const length = $derived(className ? 2 : grouped.length);
|
|
196
|
+
const baseClass = $derived(`box-${orientation} ${className || ''}`);
|
|
197
|
+
</script>
|
|
198
|
+
|
|
199
|
+
<GroupMultiple class={baseClass} {length}>
|
|
200
|
+
<RuleMark
|
|
201
|
+
data={boxData}
|
|
202
|
+
{...{ [yProp]: groupSymbol, [x1Prop]: MIN, [x2Prop]: P25 }}
|
|
203
|
+
{stroke}
|
|
204
|
+
{...rule || {}}
|
|
205
|
+
{...facets}
|
|
206
|
+
{...sortProps} />
|
|
207
|
+
<RuleMark
|
|
208
|
+
data={boxData}
|
|
209
|
+
{...{ [yProp]: groupSymbol, [x1Prop]: P75, [x2Prop]: MAX }}
|
|
210
|
+
{stroke}
|
|
211
|
+
{...rule || {}}
|
|
212
|
+
{...facets} />
|
|
213
|
+
<BarMark
|
|
214
|
+
data={boxData}
|
|
215
|
+
{...{ [yProp]: groupSymbol, [x1Prop]: P25, [x2Prop]: P75 }}
|
|
216
|
+
{fill}
|
|
217
|
+
{stroke}
|
|
218
|
+
{...facets}
|
|
219
|
+
{...bar || {}} />
|
|
220
|
+
{#if tickMedian}
|
|
221
|
+
<TickMark
|
|
222
|
+
data={boxData}
|
|
223
|
+
{...{ [yProp]: groupSymbol, [xProp]: MEDIAN }}
|
|
224
|
+
{...facets}
|
|
225
|
+
{stroke}
|
|
226
|
+
strokeWidth={2}
|
|
227
|
+
{...typeof tickMedian === 'object' ? tickMedian : {}} />
|
|
228
|
+
{/if}
|
|
229
|
+
{#if tickMinMax}
|
|
230
|
+
<TickMark
|
|
231
|
+
data={boxData}
|
|
232
|
+
{...{ [yProp]: groupSymbol, [xProp]: MIN }}
|
|
233
|
+
{stroke}
|
|
234
|
+
{...facets}
|
|
235
|
+
inset="20%"
|
|
236
|
+
{...typeof tickMinMax === 'object' ? tickMinMax : {}} />
|
|
237
|
+
<TickMark
|
|
238
|
+
data={boxData}
|
|
239
|
+
{...{ [yProp]: groupSymbol, [xProp]: MAX }}
|
|
240
|
+
{stroke}
|
|
241
|
+
{...facets}
|
|
242
|
+
inset="20%"
|
|
243
|
+
{...typeof tickMinMax === 'object' ? tickMinMax : {}} />
|
|
244
|
+
{/if}
|
|
245
|
+
<Dot
|
|
246
|
+
data={boxData.map((d) => d[OUTLIERS]).flat()}
|
|
247
|
+
{x}
|
|
248
|
+
{y}
|
|
249
|
+
{fx}
|
|
250
|
+
{fy}
|
|
251
|
+
{fill}
|
|
252
|
+
{stroke}
|
|
253
|
+
{...dot || {}} />
|
|
254
|
+
</GroupMultiple>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ChannelAccessor, DataRecord, RawValue } from '../../types';
|
|
2
|
+
declare function $$render<Datum extends DataRecord>(): {
|
|
3
|
+
props: Pick<BaseMarkProps<Datum>, "fill" | "stroke" | "fx" | "fy" | "class"> & {
|
|
4
|
+
data: Datum[];
|
|
5
|
+
x: ChannelAccessor;
|
|
6
|
+
y: ChannelAccessor;
|
|
7
|
+
/**
|
|
8
|
+
* Custom sort order for grouped box plot data
|
|
9
|
+
*/
|
|
10
|
+
sort?: "min" | "max" | "median" | "p25" | "p75" | ((d: Datum) => RawValue);
|
|
11
|
+
/**
|
|
12
|
+
* Options for the rule marks that represent the min/max range
|
|
13
|
+
*/
|
|
14
|
+
rule: Record<string, ChannelAccessor<Datum>>;
|
|
15
|
+
/**
|
|
16
|
+
* Options for the bar marks that represent the IQR range
|
|
17
|
+
*/
|
|
18
|
+
bar: Record<string, ChannelAccessor<Datum>>;
|
|
19
|
+
/**
|
|
20
|
+
* Options for the tick marks that represent the median
|
|
21
|
+
*/
|
|
22
|
+
tickMedian: Record<string, ChannelAccessor<Datum>> | boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Options for the tick marks that represent the min/max range
|
|
25
|
+
*/
|
|
26
|
+
tickMinMax: Record<string, ChannelAccessor<Datum>> | boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Options for the dot marks that represent the outliers
|
|
29
|
+
*/
|
|
30
|
+
dot: Record<string, ChannelAccessor<Datum>>;
|
|
31
|
+
orientation: "x" | "y";
|
|
32
|
+
};
|
|
33
|
+
exports: {};
|
|
34
|
+
bindings: "";
|
|
35
|
+
slots: {};
|
|
36
|
+
events: {};
|
|
37
|
+
};
|
|
38
|
+
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
39
|
+
props(): ReturnType<typeof $$render<Datum>>['props'];
|
|
40
|
+
events(): ReturnType<typeof $$render<Datum>>['events'];
|
|
41
|
+
slots(): ReturnType<typeof $$render<Datum>>['slots'];
|
|
42
|
+
bindings(): "";
|
|
43
|
+
exports(): {};
|
|
44
|
+
}
|
|
45
|
+
interface $$IsomorphicComponent {
|
|
46
|
+
new <Datum extends DataRecord>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<Datum>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<Datum>['props']>, ReturnType<__sveltets_Render<Datum>['events']>, ReturnType<__sveltets_Render<Datum>['slots']>> & {
|
|
47
|
+
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
48
|
+
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
49
|
+
<Datum extends DataRecord>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
50
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
51
|
+
}
|
|
52
|
+
/** Internal shared box plot implementation for BoxX and BoxY */
|
|
53
|
+
declare const Box: $$IsomorphicComponent;
|
|
54
|
+
type Box<Datum extends DataRecord> = InstanceType<typeof Box<Datum>>;
|
|
55
|
+
export default Box;
|
package/dist/marks/index.d.ts
CHANGED
|
@@ -45,7 +45,6 @@ export { default as Spike } from './Spike.svelte';
|
|
|
45
45
|
export { default as Text } from './Text.svelte';
|
|
46
46
|
export { default as TickX } from './TickX.svelte';
|
|
47
47
|
export { default as TickY } from './TickY.svelte';
|
|
48
|
-
export { default as Trail } from './Trail.svelte';
|
|
49
48
|
export { default as Vector } from './Vector.svelte';
|
|
50
49
|
export { default as WaffleX } from './WaffleX.svelte';
|
|
51
50
|
export { default as WaffleY } from './WaffleY.svelte';
|
package/dist/marks/index.js
CHANGED
|
@@ -45,7 +45,6 @@ export { default as Spike } from './Spike.svelte';
|
|
|
45
45
|
export { default as Text } from './Text.svelte';
|
|
46
46
|
export { default as TickX } from './TickX.svelte';
|
|
47
47
|
export { default as TickY } from './TickY.svelte';
|
|
48
|
-
export { default as Trail } from './Trail.svelte';
|
|
49
48
|
export { default as Vector } from './Vector.svelte';
|
|
50
49
|
export { default as WaffleX } from './WaffleX.svelte';
|
|
51
50
|
export { default as WaffleY } from './WaffleY.svelte';
|
package/dist/types/mark.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type Mark<T> = {
|
|
|
6
6
|
data: DataRecord<T>[];
|
|
7
7
|
options: T;
|
|
8
8
|
};
|
|
9
|
-
export type MarkType = 'area' | 'arrow' | 'barX' | 'barY' | 'cell' | 'custom' | 'dot' | 'vector' | 'frame' | 'geo' | 'gridX' | 'gridY' | 'line' | 'rect' | 'regression' | 'ruleX' | 'ruleY' | 'swoopyArrow' | 'text' | 'tickX' | 'tickY' | '
|
|
9
|
+
export type MarkType = 'area' | 'arrow' | 'barX' | 'barY' | 'cell' | 'custom' | 'dot' | 'vector' | 'frame' | 'geo' | 'gridX' | 'gridY' | 'line' | 'rect' | 'regression' | 'ruleX' | 'ruleY' | 'swoopyArrow' | 'text' | 'tickX' | 'tickY' | 'waffleX' | 'waffleY';
|
|
10
10
|
export type MarkStyleProps = 'strokeDasharray' | 'strokeLinejoin' | 'strokeLinecap' | 'opacity' | 'cursor' | 'pointerEvents' | 'blend' | 'fill' | 'fillOpacity' | 'fontFamily' | 'fontWeight' | 'fontVariant' | 'fontSize' | 'fontStyle' | 'letterSpacing' | 'wordSpacing' | 'stroke' | 'strokeWidth' | 'strokeOpacity' | 'x' | 'y' | 'clipPath' | 'mask' | 'filter' | 'angle' | 'radius' | 'symbol' | 'textAnchor' | 'textTransform' | 'textDecoration' | 'width';
|
|
11
11
|
import type { MouseEventHandler } from 'svelte/elements';
|
|
12
12
|
import type { ChannelAccessor, ConstantAccessor, DataRecord, RawValue } from './index.js';
|
|
@@ -44,7 +44,6 @@ export type BaseMarkProps<T> = Partial<{
|
|
|
44
44
|
strokeDashoffset: ConstantAccessor<number, T>;
|
|
45
45
|
mixBlendMode: ConstantAccessor<CSS.Property.MixBlendMode, T>;
|
|
46
46
|
clipPath: string;
|
|
47
|
-
mask: string;
|
|
48
47
|
imageFilter: ConstantAccessor<string, T>;
|
|
49
48
|
shapeRendering: ConstantAccessor<CSS.Property.ShapeRendering, T>;
|
|
50
49
|
paintOrder: ConstantAccessor<string, T>;
|
package/dist/types/plot.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ColorScheme } from './colorScheme.js';
|
|
|
3
3
|
import type { GeoProjection } from 'd3-geo';
|
|
4
4
|
import type { ChannelAccessor, ChannelName, ColorScaleOptions, DataRecord, LegendScaleOptions, PlotScales, RawValue, ScaleOptions, XScaleOptions, YScaleOptions } from './index.js';
|
|
5
5
|
import type { Snippet } from 'svelte';
|
|
6
|
-
import type { Area, AreaX, AreaY, Arrow, AxisX, AxisY, BarX, BarY, BoxX, BoxY, Brush, BrushX, BrushY, Cell, DifferenceY, Dot, Frame, Geo, Graticule, GridX, GridY, Image, Line, Link, Pointer, Rect, RectX, RectY, RuleX, RuleY, Sphere, Spike, Text, TickX, TickY,
|
|
6
|
+
import type { Area, AreaX, AreaY, Arrow, AxisX, AxisY, BarX, BarY, BoxX, BoxY, Brush, BrushX, BrushY, Cell, DifferenceY, Dot, Frame, Geo, Graticule, GridX, GridY, Image, Line, Link, Pointer, Rect, RectX, RectY, RuleX, RuleY, Sphere, Spike, Text, TickX, TickY, Vector } from '../marks/index.js';
|
|
7
7
|
import type WaffleX from '../marks/WaffleX.svelte';
|
|
8
8
|
import type WaffleY from '../marks/WaffleY.svelte';
|
|
9
9
|
export type PlotState = {
|
|
@@ -296,10 +296,6 @@ export type PlotDefaults = {
|
|
|
296
296
|
* default props for tickY marks
|
|
297
297
|
*/
|
|
298
298
|
tickY: Partial<Omit<ComponentProps<typeof TickY>, IgnoreDefaults>>;
|
|
299
|
-
/**
|
|
300
|
-
* default props for tickY marks
|
|
301
|
-
*/
|
|
302
|
-
trail: Partial<Omit<ComponentProps<typeof Trail>, IgnoreDefaults>>;
|
|
303
299
|
/**
|
|
304
300
|
* default props for vector marks
|
|
305
301
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelteplot",
|
|
3
|
-
"version": "0.8.1-pr-
|
|
3
|
+
"version": "0.8.1-pr-298.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Gregor Aisch",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@aitodotai/json-stringify-pretty-compact": "^1.3.0",
|
|
56
56
|
"@emotion/css": "^11.13.5",
|
|
57
|
-
"@shikijs/twoslash": "^3.
|
|
57
|
+
"@shikijs/twoslash": "^3.18.0",
|
|
58
58
|
"@sveltejs/adapter-auto": "^7.0.0",
|
|
59
59
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
60
60
|
"@sveltejs/enhanced-img": "^0.9.2",
|
|
61
61
|
"@sveltejs/eslint-config": "^8.3.4",
|
|
62
|
-
"@sveltejs/kit": "^2.49.
|
|
62
|
+
"@sveltejs/kit": "^2.49.1",
|
|
63
63
|
"@sveltejs/package": "^2.5.7",
|
|
64
64
|
"@sveltejs/vite-plugin-svelte": "6.2.1",
|
|
65
65
|
"@sveltepress/twoslash": "^1.3.2",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"@types/geojson": "^7946.0.16",
|
|
81
81
|
"@types/topojson": "^3.2.6",
|
|
82
82
|
"@types/topojson-client": "^3.1.5",
|
|
83
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
84
|
-
"@typescript-eslint/parser": "^8.
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^8.48.1",
|
|
84
|
+
"@typescript-eslint/parser": "^8.48.1",
|
|
85
85
|
"@unocss/extractor-svelte": "^66.5.10",
|
|
86
86
|
"@vite-pwa/sveltekit": "^1.1.0",
|
|
87
87
|
"csstype": "^3.2.3",
|
|
@@ -91,27 +91,27 @@
|
|
|
91
91
|
"eslint": "^9.39.1",
|
|
92
92
|
"eslint-config-prettier": "^10.1.8",
|
|
93
93
|
"eslint-plugin-regexp": "^2.10.0",
|
|
94
|
-
"eslint-plugin-svelte": "3.13.
|
|
94
|
+
"eslint-plugin-svelte": "3.13.0",
|
|
95
95
|
"jqmath": "^0.4.9",
|
|
96
|
-
"jsdom": "^27.
|
|
96
|
+
"jsdom": "^27.2.0",
|
|
97
97
|
"log-update": "^7.0.2",
|
|
98
98
|
"lru-cache": "^11.2.4",
|
|
99
99
|
"mdast-util-from-markdown": "^2.0.2",
|
|
100
100
|
"mdast-util-gfm": "^3.1.0",
|
|
101
|
-
"
|
|
102
|
-
"pngjs": "^7.0.0",
|
|
103
|
-
"prettier": "^3.7.4",
|
|
101
|
+
"prettier": "^3.7.3",
|
|
104
102
|
"prettier-plugin-svelte": "^3.4.0",
|
|
105
|
-
"puppeteer": "^24.
|
|
103
|
+
"puppeteer": "^24.31.0",
|
|
106
104
|
"remark-code-extra": "^1.0.1",
|
|
107
105
|
"remark-code-frontmatter": "^1.0.0",
|
|
108
106
|
"remark-math": "^6.0.0",
|
|
109
107
|
"resize-observer-polyfill": "^1.5.1",
|
|
110
|
-
"sass": "^1.
|
|
111
|
-
"shiki": "^3.
|
|
108
|
+
"sass": "^1.94.2",
|
|
109
|
+
"shiki": "^3.18.0",
|
|
112
110
|
"svelte-check": "^4.3.4",
|
|
113
|
-
"svelte-eslint-parser": "1.4.
|
|
111
|
+
"svelte-eslint-parser": "1.4.0",
|
|
114
112
|
"svelte-highlight": "^7.9.0",
|
|
113
|
+
"pixelmatch": "^5.3.0",
|
|
114
|
+
"pngjs": "^7.0.0",
|
|
115
115
|
"svg-path-parser": "^1.1.0",
|
|
116
116
|
"temml": "^0.12.1",
|
|
117
117
|
"topojson-client": "^3.1.0",
|
|
@@ -123,10 +123,9 @@
|
|
|
123
123
|
"uid": "^2.0.2",
|
|
124
124
|
"unist-util-visit": "^5.0.0",
|
|
125
125
|
"unocss": "^66.5.10",
|
|
126
|
-
"vite": "^7.2.
|
|
126
|
+
"vite": "^7.2.6",
|
|
127
127
|
"vitest": "^4.0.15",
|
|
128
128
|
"vitest-matchmedia-mock": "^2.0.3",
|
|
129
|
-
"wx-svelte-grid": "^2.4.0",
|
|
130
129
|
"yoctocolors": "^2.1.2"
|
|
131
130
|
},
|
|
132
131
|
"types": "./dist/index.d.ts",
|