svelteplot 0.4.5-pr-208.3 → 0.4.5-pr-208.5
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/core/Plot.svelte +54 -31
- package/dist/hooks/plotDefaults.d.ts +3 -0
- package/dist/hooks/plotDefaults.js +16 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/marks/Area.svelte +2 -1
- package/dist/marks/AreaX.svelte +4 -3
- package/dist/marks/AreaY.svelte +4 -5
- package/dist/marks/Arrow.svelte +3 -2
- package/dist/marks/AxisX.svelte +3 -4
- package/dist/marks/AxisY.svelte +3 -4
- package/dist/marks/AxisY.svelte.d.ts +5 -6
- package/dist/marks/BarX.svelte +4 -4
- package/dist/marks/BarY.svelte +3 -3
- package/dist/marks/BoxX.svelte +4 -4
- package/dist/marks/BoxY.svelte +4 -4
- package/dist/marks/BoxY.svelte.d.ts +1 -0
- package/dist/marks/Brush.svelte +13 -7
- package/dist/marks/Brush.svelte.d.ts +10 -1
- package/dist/marks/BrushX.svelte +4 -4
- package/dist/marks/BrushY.svelte +4 -4
- package/dist/marks/Cell.svelte +3 -4
- package/dist/marks/ColorLegend.svelte +5 -4
- package/dist/marks/DifferenceY.svelte +3 -3
- package/dist/marks/Dot.svelte +2 -2
- package/dist/marks/Frame.svelte +2 -2
- package/dist/marks/Geo.svelte +2 -2
- package/dist/marks/Graticule.svelte +3 -3
- package/dist/marks/GridX.svelte +3 -3
- package/dist/marks/GridY.svelte +4 -9
- package/dist/marks/HTMLTooltip.svelte +7 -19
- package/dist/marks/Line.svelte +3 -2
- package/dist/marks/Link.svelte +3 -3
- package/dist/marks/Pointer.svelte +3 -3
- package/dist/marks/Rect.svelte +2 -3
- package/dist/marks/RectX.svelte +4 -3
- package/dist/marks/RectY.svelte +4 -3
- package/dist/marks/RuleX.svelte +3 -3
- package/dist/marks/RuleY.svelte +4 -4
- package/dist/marks/Sphere.svelte +2 -2
- package/dist/marks/Spike.svelte +4 -3
- package/dist/marks/Spike.svelte.d.ts +3 -2
- package/dist/marks/Text.svelte +4 -4
- package/dist/marks/TickX.svelte +3 -3
- package/dist/marks/TickY.svelte +4 -4
- package/dist/marks/Vector.svelte +3 -3
- package/dist/marks/helpers/CanvasLayer.svelte +1 -1
- package/dist/marks/helpers/Marker.svelte +2 -1
- package/dist/marks/helpers/MarkerPath.svelte +4 -4
- package/dist/marks/helpers/MarkerPath.svelte.d.ts +17 -2
- package/dist/types/plot.d.ts +15 -8
- package/package.json +19 -20
- package/dist/marks/AreaY.svelte.d.ts +0 -102
package/dist/types/plot.d.ts
CHANGED
|
@@ -50,9 +50,15 @@ export type PlotContext = {
|
|
|
50
50
|
updateDimensions: (width: number, height: number) => void;
|
|
51
51
|
};
|
|
52
52
|
type IgnoreDefaults = 'data' | 'facet' | ChannelName | 'title' | 'automatic' | 'children';
|
|
53
|
+
export type PlotMargin = {
|
|
54
|
+
top?: number | 'auto';
|
|
55
|
+
right?: number | 'auto';
|
|
56
|
+
bottom?: number | 'auto';
|
|
57
|
+
left?: number | 'auto';
|
|
58
|
+
};
|
|
53
59
|
/**
|
|
54
60
|
* these are the default options for the plot marks that can be set using
|
|
55
|
-
* the
|
|
61
|
+
* the setPlotDefaults hook
|
|
56
62
|
*/
|
|
57
63
|
export type PlotDefaults = {
|
|
58
64
|
/**
|
|
@@ -63,6 +69,10 @@ export type PlotDefaults = {
|
|
|
63
69
|
* default plot inset
|
|
64
70
|
*/
|
|
65
71
|
inset: number;
|
|
72
|
+
/**
|
|
73
|
+
* default plot margin
|
|
74
|
+
*/
|
|
75
|
+
margin: 'auto' | number | PlotMargin;
|
|
66
76
|
/**
|
|
67
77
|
* default color scheme
|
|
68
78
|
*/
|
|
@@ -314,14 +324,11 @@ export type PlotOptions = {
|
|
|
314
324
|
*/
|
|
315
325
|
height: 'auto' | number | ((d: number) => number);
|
|
316
326
|
/**
|
|
317
|
-
*
|
|
327
|
+
* If margin is set to "auto" (the default), the plot will automatically
|
|
328
|
+
* compute appropriate margins based on the presence of axes, labels, and
|
|
329
|
+
* the overall plot size. You can also set a fixed margin value in px.
|
|
318
330
|
*/
|
|
319
|
-
margin: number |
|
|
320
|
-
top?: number;
|
|
321
|
-
right?: number;
|
|
322
|
-
bottom?: number;
|
|
323
|
-
left?: number;
|
|
324
|
-
};
|
|
331
|
+
margin: PlotMargin | number | 'auto';
|
|
325
332
|
/**
|
|
326
333
|
* Left margin of the plot, in px.
|
|
327
334
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelteplot",
|
|
3
|
-
"version": "0.4.5-pr-208.
|
|
3
|
+
"version": "0.4.5-pr-208.5",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Gregor Aisch",
|
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@aitodotai/json-stringify-pretty-compact": "^1.3.0",
|
|
56
56
|
"@emotion/css": "^11.13.5",
|
|
57
|
-
"@sveltejs/adapter-auto": "^6.1.
|
|
58
|
-
"@sveltejs/adapter-static": "^3.0.
|
|
57
|
+
"@sveltejs/adapter-auto": "^6.1.1",
|
|
58
|
+
"@sveltejs/adapter-static": "^3.0.10",
|
|
59
59
|
"@sveltejs/eslint-config": "^8.3.4",
|
|
60
|
-
"@sveltejs/kit": "^2.
|
|
61
|
-
"@sveltejs/package": "^2.5.
|
|
60
|
+
"@sveltejs/kit": "^2.44.0",
|
|
61
|
+
"@sveltejs/package": "^2.5.4",
|
|
62
62
|
"@sveltejs/vite-plugin-svelte": "5.1.1",
|
|
63
63
|
"@sveltepress/theme-default": "^6.0.4",
|
|
64
64
|
"@sveltepress/twoslash": "^1.2.2",
|
|
65
65
|
"@sveltepress/vite": "^1.2.2",
|
|
66
66
|
"@testing-library/svelte": "^5.2.8",
|
|
67
67
|
"@testing-library/user-event": "^14.6.1",
|
|
68
|
-
"@types/d3-array": "^3.2.
|
|
68
|
+
"@types/d3-array": "^3.2.2",
|
|
69
69
|
"@types/d3-color": "^3.1.3",
|
|
70
70
|
"@types/d3-dsv": "^3.0.7",
|
|
71
71
|
"@types/d3-geo": "^3.1.0",
|
|
@@ -79,33 +79,33 @@
|
|
|
79
79
|
"@types/geojson": "^7946.0.16",
|
|
80
80
|
"@types/topojson": "^3.2.6",
|
|
81
81
|
"@types/topojson-client": "^3.1.5",
|
|
82
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
83
|
-
"@typescript-eslint/parser": "^8.
|
|
82
|
+
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
|
83
|
+
"@typescript-eslint/parser": "^8.45.0",
|
|
84
84
|
"csstype": "^3.1.3",
|
|
85
85
|
"d3-dsv": "^3.0.1",
|
|
86
86
|
"d3-fetch": "^3.0.1",
|
|
87
87
|
"d3-force": "^3.0.0",
|
|
88
|
-
"eslint": "^9.
|
|
88
|
+
"eslint": "^9.37.0",
|
|
89
89
|
"eslint-config-prettier": "^10.1.8",
|
|
90
|
-
"eslint-plugin-svelte": "3.12.
|
|
90
|
+
"eslint-plugin-svelte": "3.12.4",
|
|
91
91
|
"jsdom": "^26.1.0",
|
|
92
92
|
"prettier": "^3.6.2",
|
|
93
93
|
"prettier-plugin-svelte": "^3.4.0",
|
|
94
|
-
"puppeteer": "^24.
|
|
94
|
+
"puppeteer": "^24.23.0",
|
|
95
95
|
"remark-code-extra": "^1.0.1",
|
|
96
96
|
"remark-code-frontmatter": "^1.0.0",
|
|
97
97
|
"resize-observer-polyfill": "^1.5.1",
|
|
98
|
-
"sass": "^1.
|
|
99
|
-
"svelte-check": "^4.3.
|
|
100
|
-
"svelte-eslint-parser": "1.3.
|
|
98
|
+
"sass": "^1.93.2",
|
|
99
|
+
"svelte-check": "^4.3.2",
|
|
100
|
+
"svelte-eslint-parser": "1.3.3",
|
|
101
101
|
"svelte-highlight": "^7.8.4",
|
|
102
102
|
"svg-path-parser": "^1.1.0",
|
|
103
103
|
"topojson-client": "^3.1.0",
|
|
104
104
|
"ts-essentials": "^10.1.1",
|
|
105
105
|
"tslib": "^2.8.1",
|
|
106
|
-
"typedoc": "^0.28.
|
|
107
|
-
"typedoc-plugin-markdown": "^4.
|
|
108
|
-
"typescript": "^5.9.
|
|
106
|
+
"typedoc": "^0.28.13",
|
|
107
|
+
"typedoc-plugin-markdown": "^4.9.0",
|
|
108
|
+
"typescript": "^5.9.3",
|
|
109
109
|
"vite": "^6.3.5",
|
|
110
110
|
"vitest": "^3.2.4",
|
|
111
111
|
"vitest-matchmedia-mock": "^2.0.3",
|
|
@@ -114,7 +114,6 @@
|
|
|
114
114
|
"types": "./dist/index.d.ts",
|
|
115
115
|
"type": "module",
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@gka/d3-regression": "^1.3.10-pr48",
|
|
118
117
|
"d3-array": "^3.2.4",
|
|
119
118
|
"d3-color": "^3.1.0",
|
|
120
119
|
"d3-format": "^3.1.0",
|
|
@@ -128,9 +127,9 @@
|
|
|
128
127
|
"d3-shape": "^3.2.0",
|
|
129
128
|
"d3-time": "^3.1.0",
|
|
130
129
|
"es-toolkit": "^1.39.10",
|
|
131
|
-
"fast-equals": "^5.
|
|
130
|
+
"fast-equals": "^5.3.2",
|
|
132
131
|
"interval-tree-1d": "^1.0.4",
|
|
133
132
|
"merge-deep": "^3.0.3",
|
|
134
|
-
"svelte": "5.
|
|
133
|
+
"svelte": "5.39.8"
|
|
135
134
|
}
|
|
136
135
|
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { renameChannels } from '../transforms/rename.js';
|
|
2
|
-
import type { ChannelAccessor, DataRow } from '../types/index.js';
|
|
3
|
-
declare class __sveltets_Render<Datum extends DataRow> {
|
|
4
|
-
props(): Omit<Partial<{
|
|
5
|
-
filter: import("../types/index.js").ConstantAccessor<boolean, Record<string | symbol, import("../types/data").RawValue>>;
|
|
6
|
-
facet: "auto" | "include" | "exclude";
|
|
7
|
-
fx: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
8
|
-
fy: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
9
|
-
dx: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
10
|
-
dy: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
11
|
-
dodgeX: renameChannels;
|
|
12
|
-
dodgeY: renameChannels;
|
|
13
|
-
fill: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
14
|
-
fillOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
15
|
-
sort: {
|
|
16
|
-
channel: string;
|
|
17
|
-
order?: "ascending" | "descending";
|
|
18
|
-
} | ((a: import("../types/data").RawValue, b: import("../types/data").RawValue) => number) | import("../types/index.js").ConstantAccessor<import("../types/data").RawValue, Record<string | symbol, import("../types/data").RawValue>>;
|
|
19
|
-
stroke: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
20
|
-
strokeWidth: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
21
|
-
strokeOpacity: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
22
|
-
strokeLinejoin: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinejoin, Record<string | symbol, import("../types/data").RawValue>>;
|
|
23
|
-
strokeLinecap: import("../types/index.js").ConstantAccessor<import("csstype").Property.StrokeLinecap, Record<string | symbol, import("../types/data").RawValue>>;
|
|
24
|
-
strokeMiterlimit: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
25
|
-
opacity: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
26
|
-
strokeDasharray: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
27
|
-
strokeDashoffset: import("../types/index.js").ConstantAccessor<number, Record<string | symbol, import("../types/data").RawValue>>;
|
|
28
|
-
mixBlendMode: import("../types/index.js").ConstantAccessor<import("csstype").Property.MixBlendMode, Record<string | symbol, import("../types/data").RawValue>>;
|
|
29
|
-
clipPath: string;
|
|
30
|
-
imageFilter: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
31
|
-
shapeRendering: import("../types/index.js").ConstantAccessor<import("csstype").Property.ShapeRendering, Record<string | symbol, import("../types/data").RawValue>>;
|
|
32
|
-
paintOrder: import("../types/index.js").ConstantAccessor<string, Record<string | symbol, import("../types/data").RawValue>>;
|
|
33
|
-
onclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
34
|
-
ondblclick: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
35
|
-
onmouseup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
36
|
-
onmousedown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
37
|
-
onmouseenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
38
|
-
onmousemove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
39
|
-
onmouseleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
40
|
-
onmouseout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
41
|
-
onmouseover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
42
|
-
onpointercancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
43
|
-
onpointerdown: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
44
|
-
onpointerup: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
45
|
-
onpointerenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
46
|
-
onpointerleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
47
|
-
onpointermove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
48
|
-
onpointerover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
49
|
-
onpointerout: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
50
|
-
ondrag: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
51
|
-
ondrop: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
52
|
-
ondragstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
53
|
-
ondragenter: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
54
|
-
ondragleave: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
55
|
-
ondragover: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
56
|
-
ondragend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
57
|
-
ontouchstart: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
58
|
-
ontouchmove: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
59
|
-
ontouchend: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
60
|
-
ontouchcancel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
61
|
-
oncontextmenu: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
62
|
-
onwheel: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
63
|
-
class: string;
|
|
64
|
-
style: string;
|
|
65
|
-
cursor: import("../types/index.js").ConstantAccessor<import("csstype").Property.Cursor, Record<string | symbol, import("../types/data").RawValue>>;
|
|
66
|
-
}> & import("../types/mark").LinkableMarkProps<Record<string | symbol, import("../types/data").RawValue>> & {
|
|
67
|
-
data: Record<string | symbol, import("../types/data").RawValue>[];
|
|
68
|
-
x1?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
69
|
-
x2?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
70
|
-
y1?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
71
|
-
y2?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
72
|
-
z?: ChannelAccessor<Record<string | symbol, import("../types/data").RawValue>>;
|
|
73
|
-
curve?: import("../types/index.js").CurveName | import("d3-shape").CurveFactory;
|
|
74
|
-
tension?: number;
|
|
75
|
-
sort?: import("../types/index.js").ConstantAccessor<import("../types/data").RawValue> | {
|
|
76
|
-
channel: "stroke" | "fill";
|
|
77
|
-
};
|
|
78
|
-
stack?: Partial<renameChannels>;
|
|
79
|
-
canvas?: boolean;
|
|
80
|
-
}, "x1" | "x2"> & {
|
|
81
|
-
x?: ChannelAccessor<Datum>;
|
|
82
|
-
y?: ChannelAccessor<Datum>;
|
|
83
|
-
};
|
|
84
|
-
events(): {};
|
|
85
|
-
slots(): {};
|
|
86
|
-
bindings(): "";
|
|
87
|
-
exports(): {};
|
|
88
|
-
}
|
|
89
|
-
interface $$IsomorphicComponent {
|
|
90
|
-
new <Datum extends DataRow>(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']>> & {
|
|
91
|
-
$$bindings?: ReturnType<__sveltets_Render<Datum>['bindings']>;
|
|
92
|
-
} & ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
93
|
-
<Datum extends DataRow>(internal: unknown, props: ReturnType<__sveltets_Render<Datum>['props']> & {}): ReturnType<__sveltets_Render<Datum>['exports']>;
|
|
94
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Creates a vertical area chart with y value and baseline. Areas are implicitly
|
|
98
|
-
* stacked vertically if just the y channel is defined.
|
|
99
|
-
*/
|
|
100
|
-
declare const AreaY: $$IsomorphicComponent;
|
|
101
|
-
type AreaY<Datum extends DataRow> = InstanceType<typeof AreaY<Datum>>;
|
|
102
|
-
export default AreaY;
|