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.
@@ -8,21 +8,21 @@ export declare function sort<T>({ data, ...channels }: TransformArg<T>, options?
8
8
  sort: null;
9
9
  filter?: import("../types/index.js").ConstantAccessor<boolean, T>;
10
10
  facet?: "auto" | "include" | "exclude" | undefined;
11
- fx?: import("../types/index.js").ChannelAccessor<T>;
12
- fy?: import("../types/index.js").ChannelAccessor<T>;
11
+ fx?: import("../types/channel.js").ChannelAccessor<T>;
12
+ fy?: import("../types/channel.js").ChannelAccessor<T>;
13
13
  dx?: import("../types/index.js").ConstantAccessor<number, T>;
14
14
  dy?: import("../types/index.js").ConstantAccessor<number, T>;
15
- dodgeX?: import("./dodge").DodgeXOptions | undefined;
16
- dodgeY?: import("./dodge").DodgeYOptions | undefined;
17
- fill?: import("../types/index.js").ChannelAccessor<T>;
15
+ dodgeX?: import("./dodge.js").DodgeXOptions | undefined;
16
+ dodgeY?: import("./dodge.js").DodgeYOptions | undefined;
17
+ fill?: import("../types/channel.js").ChannelAccessor<T>;
18
18
  fillOpacity?: import("../types/index.js").ConstantAccessor<number, T>;
19
- stroke?: import("../types/index.js").ChannelAccessor<T>;
19
+ stroke?: import("../types/channel.js").ChannelAccessor<T>;
20
20
  strokeWidth?: import("../types/index.js").ConstantAccessor<number, T>;
21
21
  strokeOpacity?: import("../types/index.js").ConstantAccessor<number, T>;
22
22
  strokeLinejoin?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, T>;
23
23
  strokeLinecap?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, T>;
24
24
  strokeMiterlimit?: import("../types/index.js").ConstantAccessor<number, T>;
25
- opacity?: import("../types/index.js").ChannelAccessor<T>;
25
+ opacity?: import("../types/channel.js").ChannelAccessor<T>;
26
26
  strokeDasharray?: import("../types/index.js").ConstantAccessor<string, T>;
27
27
  strokeDashoffset?: import("../types/index.js").ConstantAccessor<number, T>;
28
28
  mixBlendMode?: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, T>;
@@ -70,25 +70,25 @@ export declare function sort<T>({ data, ...channels }: TransformArg<T>, options?
70
70
  } | {
71
71
  filter?: import("../types/index.js").ConstantAccessor<boolean, T>;
72
72
  facet?: "auto" | "include" | "exclude" | undefined;
73
- fx?: import("../types/index.js").ChannelAccessor<T>;
74
- fy?: import("../types/index.js").ChannelAccessor<T>;
73
+ fx?: import("../types/channel.js").ChannelAccessor<T>;
74
+ fy?: import("../types/channel.js").ChannelAccessor<T>;
75
75
  dx?: import("../types/index.js").ConstantAccessor<number, T>;
76
76
  dy?: import("../types/index.js").ConstantAccessor<number, T>;
77
- dodgeX?: import("./dodge").DodgeXOptions | undefined;
78
- dodgeY?: import("./dodge").DodgeYOptions | undefined;
79
- fill?: import("../types/index.js").ChannelAccessor<T>;
77
+ dodgeX?: import("./dodge.js").DodgeXOptions | undefined;
78
+ dodgeY?: import("./dodge.js").DodgeYOptions | undefined;
79
+ fill?: import("../types/channel.js").ChannelAccessor<T>;
80
80
  fillOpacity?: import("../types/index.js").ConstantAccessor<number, T>;
81
- sort?: ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | {
81
+ sort?: ((a: import("../types/data.js").RawValue, b: import("../types/data.js").RawValue) => number) | {
82
82
  channel: string;
83
83
  order?: "ascending" | "descending";
84
- } | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, T>;
85
- stroke?: import("../types/index.js").ChannelAccessor<T>;
84
+ } | import("../types/index.js").ConstantAccessor<import("../types/data.js").RawValue, T>;
85
+ stroke?: import("../types/channel.js").ChannelAccessor<T>;
86
86
  strokeWidth?: import("../types/index.js").ConstantAccessor<number, T>;
87
87
  strokeOpacity?: import("../types/index.js").ConstantAccessor<number, T>;
88
88
  strokeLinejoin?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, T>;
89
89
  strokeLinecap?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, T>;
90
90
  strokeMiterlimit?: import("../types/index.js").ConstantAccessor<number, T>;
91
- opacity?: import("../types/index.js").ChannelAccessor<T>;
91
+ opacity?: import("../types/channel.js").ChannelAccessor<T>;
92
92
  strokeDasharray?: import("../types/index.js").ConstantAccessor<string, T>;
93
93
  strokeDashoffset?: import("../types/index.js").ConstantAccessor<number, T>;
94
94
  mixBlendMode?: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, T>;
@@ -142,21 +142,21 @@ export declare function shuffle({ data, ...channels }: TransformArg<DataRow[]>,
142
142
  [IS_SORTED]: boolean;
143
143
  filter?: import("../types/index.js").ConstantAccessor<boolean, DataRow[]>;
144
144
  facet?: "auto" | "include" | "exclude" | undefined;
145
- fx?: import("../types/index.js").ChannelAccessor<DataRow[]>;
146
- fy?: import("../types/index.js").ChannelAccessor<DataRow[]>;
145
+ fx?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
146
+ fy?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
147
147
  dx?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
148
148
  dy?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
149
- dodgeX?: import("./dodge").DodgeXOptions | undefined;
150
- dodgeY?: import("./dodge").DodgeYOptions | undefined;
151
- fill?: import("../types/index.js").ChannelAccessor<DataRow[]>;
149
+ dodgeX?: import("./dodge.js").DodgeXOptions | undefined;
150
+ dodgeY?: import("./dodge.js").DodgeYOptions | undefined;
151
+ fill?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
152
152
  fillOpacity?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
153
- stroke?: import("../types/index.js").ChannelAccessor<DataRow[]>;
153
+ stroke?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
154
154
  strokeWidth?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
155
155
  strokeOpacity?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
156
156
  strokeLinejoin?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, DataRow[]>;
157
157
  strokeLinecap?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, DataRow[]>;
158
158
  strokeMiterlimit?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
159
- opacity?: import("../types/index.js").ChannelAccessor<DataRow[]>;
159
+ opacity?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
160
160
  strokeDasharray?: import("../types/index.js").ConstantAccessor<string, DataRow[]>;
161
161
  strokeDashoffset?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
162
162
  mixBlendMode?: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, DataRow[]>;
@@ -208,21 +208,21 @@ export declare function reverse({ data, ...channels }: TransformArg<DataRow[]>):
208
208
  [IS_SORTED]: boolean;
209
209
  filter?: import("../types/index.js").ConstantAccessor<boolean, DataRow[]>;
210
210
  facet?: "auto" | "include" | "exclude" | undefined;
211
- fx?: import("../types/index.js").ChannelAccessor<DataRow[]>;
212
- fy?: import("../types/index.js").ChannelAccessor<DataRow[]>;
211
+ fx?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
212
+ fy?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
213
213
  dx?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
214
214
  dy?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
215
- dodgeX?: import("./dodge").DodgeXOptions | undefined;
216
- dodgeY?: import("./dodge").DodgeYOptions | undefined;
217
- fill?: import("../types/index.js").ChannelAccessor<DataRow[]>;
215
+ dodgeX?: import("./dodge.js").DodgeXOptions | undefined;
216
+ dodgeY?: import("./dodge.js").DodgeYOptions | undefined;
217
+ fill?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
218
218
  fillOpacity?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
219
- stroke?: import("../types/index.js").ChannelAccessor<DataRow[]>;
219
+ stroke?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
220
220
  strokeWidth?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
221
221
  strokeOpacity?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
222
222
  strokeLinejoin?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, DataRow[]>;
223
223
  strokeLinecap?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, DataRow[]>;
224
224
  strokeMiterlimit?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
225
- opacity?: import("../types/index.js").ChannelAccessor<DataRow[]>;
225
+ opacity?: import("../types/channel.js").ChannelAccessor<DataRow[]>;
226
226
  strokeDasharray?: import("../types/index.js").ConstantAccessor<string, DataRow[]>;
227
227
  strokeDashoffset?: import("../types/index.js").ConstantAccessor<number, DataRow[]>;
228
228
  mixBlendMode?: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, DataRow[]>;
@@ -8,35 +8,35 @@ type WindowOptions = {
8
8
  strict: boolean;
9
9
  };
10
10
  export declare function windowX(args: TransformArg<DataRecord>, options: WindowOptions): {
11
- filter?: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/index.js").RawValue>>;
11
+ filter?: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/data.js").RawValue>>;
12
12
  facet?: "auto" | "include" | "exclude" | undefined;
13
- fx?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
14
- fy?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
15
- dx?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
16
- dy?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
17
- dodgeX?: import("./dodge").DodgeXOptions | undefined;
18
- dodgeY?: import("./dodge").DodgeYOptions | undefined;
19
- fill?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
20
- fillOpacity?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
21
- sort?: ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | {
13
+ fx?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
14
+ fy?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
15
+ dx?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
16
+ dy?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
17
+ dodgeX?: import("./dodge.js").DodgeXOptions | undefined;
18
+ dodgeY?: import("./dodge.js").DodgeYOptions | undefined;
19
+ fill?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
20
+ fillOpacity?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
21
+ sort?: ((a: import("../types/data.js").RawValue, b: import("../types/data.js").RawValue) => number) | {
22
22
  channel: string;
23
23
  order?: "ascending" | "descending";
24
- } | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Record<string | symbol, import("../types/index.js").RawValue>>;
25
- stroke?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
26
- strokeWidth?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
27
- strokeOpacity?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
28
- strokeLinejoin?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Record<string | symbol, import("../types/index.js").RawValue>>;
29
- strokeLinecap?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Record<string | symbol, import("../types/index.js").RawValue>>;
30
- strokeMiterlimit?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
31
- opacity?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
32
- strokeDasharray?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/index.js").RawValue>>;
33
- strokeDashoffset?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
34
- mixBlendMode?: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/index.js").RawValue>>;
24
+ } | import("../types/index.js").ConstantAccessor<import("../types/data.js").RawValue, Record<string | symbol, import("../types/data.js").RawValue>>;
25
+ stroke?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
26
+ strokeWidth?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
27
+ strokeOpacity?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
28
+ strokeLinejoin?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Record<string | symbol, import("../types/data.js").RawValue>>;
29
+ strokeLinecap?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Record<string | symbol, import("../types/data.js").RawValue>>;
30
+ strokeMiterlimit?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
31
+ opacity?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
32
+ strokeDasharray?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
33
+ strokeDashoffset?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
34
+ mixBlendMode?: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/data.js").RawValue>>;
35
35
  clipPath?: string | undefined;
36
36
  mask?: string | undefined;
37
- imageFilter?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/index.js").RawValue>>;
38
- shapeRendering?: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/index.js").RawValue>>;
39
- paintOrder?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/index.js").RawValue>>;
37
+ imageFilter?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
38
+ shapeRendering?: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/data.js").RawValue>>;
39
+ paintOrder?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
40
40
  onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
41
41
  ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
42
42
  onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
@@ -69,42 +69,42 @@ export declare function windowX(args: TransformArg<DataRecord>, options: WindowO
69
69
  onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
70
70
  class?: string | undefined;
71
71
  style?: string | undefined;
72
- cursor?: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/index.js").RawValue>>;
72
+ cursor?: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/data.js").RawValue>>;
73
73
  data: {
74
- [x: string]: import("../types/index.js").RawValue;
75
- [x: symbol]: import("../types/index.js").RawValue;
74
+ [x: string]: import("../types/data.js").RawValue;
75
+ [x: symbol]: import("../types/data.js").RawValue;
76
76
  }[];
77
77
  };
78
78
  export declare function windowY(args: TransformArg<DataRecord>, options: WindowOptions): {
79
- filter?: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/index.js").RawValue>>;
79
+ filter?: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/data.js").RawValue>>;
80
80
  facet?: "auto" | "include" | "exclude" | undefined;
81
- fx?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
82
- fy?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
83
- dx?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
84
- dy?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
85
- dodgeX?: import("./dodge").DodgeXOptions | undefined;
86
- dodgeY?: import("./dodge").DodgeYOptions | undefined;
87
- fill?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
88
- fillOpacity?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
89
- sort?: ((a: import("../types/index.js").RawValue, b: import("../types/index.js").RawValue) => number) | {
81
+ fx?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
82
+ fy?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
83
+ dx?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
84
+ dy?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
85
+ dodgeX?: import("./dodge.js").DodgeXOptions | undefined;
86
+ dodgeY?: import("./dodge.js").DodgeYOptions | undefined;
87
+ fill?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
88
+ fillOpacity?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
89
+ sort?: ((a: import("../types/data.js").RawValue, b: import("../types/data.js").RawValue) => number) | {
90
90
  channel: string;
91
91
  order?: "ascending" | "descending";
92
- } | import("../types/index.js").ConstantAccessor<import("../types/index.js").RawValue, Record<string | symbol, import("../types/index.js").RawValue>>;
93
- stroke?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
94
- strokeWidth?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
95
- strokeOpacity?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
96
- strokeLinejoin?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Record<string | symbol, import("../types/index.js").RawValue>>;
97
- strokeLinecap?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Record<string | symbol, import("../types/index.js").RawValue>>;
98
- strokeMiterlimit?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
99
- opacity?: import("../types/index.js").ChannelAccessor<Record<string | symbol, import("../types/index.js").RawValue>>;
100
- strokeDasharray?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/index.js").RawValue>>;
101
- strokeDashoffset?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/index.js").RawValue>>;
102
- mixBlendMode?: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/index.js").RawValue>>;
92
+ } | import("../types/index.js").ConstantAccessor<import("../types/data.js").RawValue, Record<string | symbol, import("../types/data.js").RawValue>>;
93
+ stroke?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
94
+ strokeWidth?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
95
+ strokeOpacity?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
96
+ strokeLinejoin?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Record<string | symbol, import("../types/data.js").RawValue>>;
97
+ strokeLinecap?: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Record<string | symbol, import("../types/data.js").RawValue>>;
98
+ strokeMiterlimit?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
99
+ opacity?: import("../types/channel.js").ChannelAccessor<Record<string | symbol, import("../types/data.js").RawValue>>;
100
+ strokeDasharray?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
101
+ strokeDashoffset?: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data.js").RawValue>>;
102
+ mixBlendMode?: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/data.js").RawValue>>;
103
103
  clipPath?: string | undefined;
104
104
  mask?: string | undefined;
105
- imageFilter?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/index.js").RawValue>>;
106
- shapeRendering?: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/index.js").RawValue>>;
107
- paintOrder?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/index.js").RawValue>>;
105
+ imageFilter?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
106
+ shapeRendering?: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/data.js").RawValue>>;
107
+ paintOrder?: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data.js").RawValue>>;
108
108
  onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
109
109
  ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
110
110
  onmouseup?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
@@ -137,10 +137,10 @@ export declare function windowY(args: TransformArg<DataRecord>, options: WindowO
137
137
  onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement> | undefined;
138
138
  class?: string | undefined;
139
139
  style?: string | undefined;
140
- cursor?: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/index.js").RawValue>>;
140
+ cursor?: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/data.js").RawValue>>;
141
141
  data: {
142
- [x: string]: import("../types/index.js").RawValue;
143
- [x: symbol]: import("../types/index.js").RawValue;
142
+ [x: string]: import("../types/data.js").RawValue;
143
+ [x: symbol]: import("../types/data.js").RawValue;
144
144
  }[];
145
145
  };
146
146
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelteplot",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "description": "A Svelte-native data visualization framework based on the layered grammar of graphics principles.",
5
5
  "keywords": [
6
6
  "svelte",
@@ -1,14 +0,0 @@
1
- <script>
2
- let { label, value = $bindable(), ...restProps } = $props();
3
- </script>
4
-
5
- <label class="checkbox">
6
- <input type="checkbox" bind:checked={value} {...restProps} />
7
- <!-- eslint-disable-next-line svelte/no-at-html-tags -->
8
- {@html label}</label>
9
-
10
- <style>
11
- label.checkbox + :global(label.checkbox) {
12
- margin-left: 0.7em;
13
- }
14
- </style>
@@ -1,13 +0,0 @@
1
- export default Checkbox;
2
- type Checkbox = {
3
- $on?(type: string, callback: (e: any) => void): () => void;
4
- $set?(props: Partial<$$ComponentProps>): void;
5
- };
6
- declare const Checkbox: import("svelte").Component<{
7
- label: any;
8
- value?: any;
9
- } & Record<string, any>, {}, "value">;
10
- type $$ComponentProps = {
11
- label: any;
12
- value?: any;
13
- } & Record<string, any>;
@@ -1,81 +0,0 @@
1
- <script>
2
- import { resolve } from '$app/paths';
3
- import { useDark } from './isDark.svelte';
4
- let { examples } = $props();
5
-
6
- const exampleImages = import.meta.glob('../../snapshots/*/*.png', {
7
- eager: true,
8
- query: {
9
- enhanced: true,
10
- w: 640
11
- }
12
- });
13
-
14
- const ds = useDark();
15
- </script>
16
-
17
- <div class="list">
18
- {#each examples as page, i (i)}
19
- <a href={resolve(page.url)}>
20
- <div>
21
- {#if exampleImages[`../../snapshots/${page.key}.png`]}
22
- <enhanced:img
23
- src={ds.isDark
24
- ? exampleImages[`../../snapshots/${page.key}.dark.png`].default.img.src
25
- : exampleImages[`../../snapshots/${page.key}.png`].default.img.src}
26
- alt={page.title} />
27
- {/if}
28
- </div>
29
- <h4>
30
- {page.title}
31
- </h4>
32
- </a>
33
- {/each}
34
- </div>
35
-
36
- <style>
37
- .list {
38
- display: grid;
39
- grid-template-columns: repeat(3, 1fr);
40
- gap: 1rem;
41
- width: 100%;
42
- margin: 2rem 0;
43
- }
44
-
45
- .list > a {
46
- display: flex;
47
- flex-direction: column;
48
- align-items: left;
49
- row-gap: 0.3rem;
50
- text-decoration: none;
51
-
52
- > div {
53
- border: 1px solid #88888822;
54
- border-radius: 2px;
55
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
56
- padding: 1.5ex 1.5ex 0.4ex 1.5ex;
57
- }
58
-
59
- &:hover {
60
- text-decoration: underline;
61
- color: var(--svp-text);
62
- > div {
63
- border: 1px solid var(--svp-text);
64
- }
65
- }
66
- }
67
-
68
- .list :global(img) {
69
- width: 100%;
70
- box-sizing: border-box;
71
- border-radius: 3px;
72
- transition: transform 0.2s ease-in-out;
73
- }
74
-
75
- .list h4 {
76
- margin: 0rem;
77
- font-weight: normal;
78
- font-size: 13px;
79
- line-height: 1;
80
- }
81
- </style>
@@ -1,11 +0,0 @@
1
- export default ExamplesGrid;
2
- type ExamplesGrid = {
3
- $on?(type: string, callback: (e: any) => void): () => void;
4
- $set?(props: Partial<$$ComponentProps>): void;
5
- };
6
- declare const ExamplesGrid: import("svelte").Component<{
7
- examples: any;
8
- }, {}, "">;
9
- type $$ComponentProps = {
10
- examples: any;
11
- };
@@ -1,63 +0,0 @@
1
- <script lang="ts">
2
- import { resolve } from '$app/paths';
3
- let {
4
- paths,
5
- pages
6
- }: {
7
- paths: Record<string, string[]>;
8
- pages: Record<
9
- string,
10
- {
11
- title: string;
12
- description?: string;
13
- sortKey?: number;
14
- transforms?: string[];
15
- }
16
- >;
17
- } = $props();
18
-
19
- function sortPages(a: string, b: string) {
20
- const sortA = pages[a].sortKey ?? 10;
21
- const sortB = pages[b].sortKey ?? 10;
22
- return sortA - sortB;
23
- }
24
- </script>
25
-
26
- <div class="column-container">
27
- {#each Object.entries(paths).sort( (a, b) => a[0].localeCompare(b[0]) ) as [group, groupPages] (group)}
28
- <div>
29
- <h3>
30
- <a href={resolve(`/examples/${group}`)}
31
- >{pages[groupPages.find((p) => p.endsWith('/_index.svelte'))]?.title ??
32
- group}</a>
33
- </h3>
34
- <ul>
35
- {#each groupPages
36
- .sort(sortPages)
37
- .filter((p) => !p.endsWith('/_index.svelte')) as page (page)}
38
- <li>
39
- <a href={resolve(page.replace('./', './examples/').replace('.svelte', ''))}
40
- >{pages[page].title}</a>
41
- </li>
42
- {/each}
43
- </ul>
44
- </div>
45
- {/each}
46
- </div>
47
-
48
- <style>
49
- .column-container {
50
- columns: 2;
51
- column-gap: 1rem;
52
- column-fill: balance;
53
- > div {
54
- padding-top: 1em;
55
- break-before: column;
56
- break-inside: avoid-column;
57
- }
58
- h3 {
59
- break-before: avoid-column;
60
- text-transform: capitalize;
61
- }
62
- }
63
- </style>
@@ -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 ExamplesPageList: import("svelte").Component<$$ComponentProps, {}, "">;
11
- type ExamplesPageList = ReturnType<typeof ExamplesPageList>;
12
- export default ExamplesPageList;
@@ -1,145 +0,0 @@
1
- <script lang="ts">
2
- import { resolve } from '$app/paths';
3
- import { useDark } from './isDark.svelte';
4
-
5
- const exampleImages = import.meta.glob('../../snapshots/*/*.png', {
6
- eager: true,
7
- query: {
8
- enhanced: true,
9
- w: 440
10
- }
11
- });
12
-
13
- let {
14
- paths,
15
- pages
16
- }: {
17
- paths: Record<string, string[]>;
18
- pages: Record<
19
- string,
20
- {
21
- title: string;
22
- description?: string;
23
- sortKey?: number;
24
- transforms?: string[];
25
- }
26
- >;
27
- } = $props();
28
-
29
- const ds = useDark();
30
-
31
- function sortPages(a: string, b: string) {
32
- const sortA = pages[a].sortKey ?? 10;
33
- const sortB = pages[b].sortKey ?? 10;
34
- return sortA - sortB;
35
- }
36
- </script>
37
-
38
- <div class="column-container">
39
- {#each Object.entries(paths).sort( (a, b) => a[0].localeCompare(b[0]) ) as [group, groupPages] (group)}
40
- <div>
41
- <h2 id={group}>
42
- <a href={resolve(`/examples/${group}`)}
43
- >{pages[groupPages.find((p) => p.endsWith('/_index.svelte'))]?.title ??
44
- group}</a>
45
- </h2>
46
- <div class="example-grid">
47
- {#each groupPages
48
- .sort(sortPages)
49
- .filter((p) => !p.endsWith('/_index.svelte')) as page (page)}
50
- {@const imageKey = `../../snapshots/${page
51
- .replace('./', '')
52
- .replace('.svelte', ds.isDark ? '.dark.png' : '.png')}`}
53
- <a
54
- animate:slide
55
- href={resolve(page.replace('./', './examples/').replace('.svelte', ''))}
56
- ><div>
57
- {#if exampleImages[imageKey]}
58
- <enhanced:img
59
- title={pages[page].title}
60
- src={exampleImages[imageKey].default}
61
- alt={pages[page].title} />
62
- {/if}
63
- <div class="title">{pages[page].title}</div>
64
- </div></a>
65
- {/each}
66
- </div>
67
- </div>
68
- {/each}
69
- </div>
70
-
71
- <style>
72
- :global(.content) h2 {
73
- margin-top: 1rem !important;
74
- margin-bottom: 1rem;
75
- text-transform: capitalize;
76
- border: 0;
77
- a {
78
- text-decoration: none;
79
- color: inherit;
80
- }
81
- }
82
-
83
- .column-container {
84
- container-type: inline-size;
85
- }
86
-
87
- .example-grid {
88
- --example-grid-columns: 5;
89
-
90
- /* width: 100%; */
91
- display: grid;
92
- /* overflow-x: clip; */
93
- grid-template-columns: repeat(var(--example-grid-columns), 1fr);
94
- grid-auto-rows: 1fr;
95
- gap: 1.25rem;
96
-
97
- a {
98
- text-decoration: none;
99
- color: inherit;
100
- }
101
-
102
- .title {
103
- font-size: 0.75rem;
104
- opacity: 0.8;
105
- line-height: 1.2;
106
- text-decoration: none;
107
- }
108
- }
109
-
110
- @container (max-width: 800px) {
111
- .example-grid {
112
- --example-grid-columns: 4;
113
- }
114
- }
115
- @container (max-width: 600px) {
116
- .example-grid {
117
- --example-grid-columns: 3;
118
- }
119
- }
120
- @container (max-width: 500px) {
121
- .example-grid {
122
- --example-grid-columns: 2;
123
- }
124
- }
125
-
126
- .example-grid :global(img) {
127
- height: auto !important;
128
- aspect-ratio: 4 / 3;
129
- object-fit: cover;
130
- width: 100%;
131
- height: auto;
132
-
133
- position: relative;
134
- transition: transform 0.05s ease-out;
135
- &:hover {
136
- transform: scale(1.5);
137
- object-fit: contain;
138
- z-index: 1;
139
-
140
- background: fixed var(--svelteplot-bg);
141
-
142
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
143
- }
144
- }
145
- </style>