svelteplot 0.6.0 → 0.7.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 +7 -0
- package/dist/Plot.svelte +10 -2
- package/dist/core/FacetAxes.svelte +2 -2
- package/dist/core/Plot.svelte +7 -11
- package/dist/helpers/getBaseStyles.d.ts +2 -0
- package/dist/helpers/getBaseStyles.js +8 -0
- package/dist/helpers/removeIdenticalLines.js +3 -2
- package/dist/helpers/scales.js +2 -2
- package/dist/helpers/wordwrap.d.ts +14 -0
- package/dist/helpers/wordwrap.js +129 -0
- package/dist/marks/AxisX.svelte +2 -1
- package/dist/marks/AxisX.svelte.d.ts +1 -0
- package/dist/marks/Brush.svelte +44 -4
- package/dist/marks/Text.svelte.d.ts +1 -1
- package/dist/marks/WaffleX.svelte +115 -0
- package/dist/marks/WaffleX.svelte.d.ts +102 -0
- package/dist/marks/WaffleY.svelte +119 -0
- package/dist/marks/WaffleY.svelte.d.ts +100 -0
- package/dist/marks/helpers/BaseAxisX.svelte +31 -3
- package/dist/marks/helpers/BaseAxisX.svelte.d.ts +2 -0
- package/dist/marks/helpers/waffle.d.ts +58 -0
- package/dist/marks/helpers/waffle.js +194 -0
- package/dist/marks/index.d.ts +3 -1
- package/dist/marks/index.js +3 -1
- package/dist/transforms/group.js +11 -5
- package/dist/types/data.d.ts +1 -0
- package/dist/types/mark.d.ts +1 -1
- package/dist/types/plot.d.ts +19 -5
- package/dist/types/scale.d.ts +8 -0
- package/package.json +14 -14
package/dist/types/plot.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { ComponentProps } from 'svelte';
|
|
2
2
|
import type { ColorScheme } from './colorScheme.js';
|
|
3
3
|
import type { GeoProjection } from 'd3-geo';
|
|
4
|
-
import type { ChannelAccessor, ChannelName, ColorScaleOptions, DataRecord, LegendScaleOptions, PlotScales, ScaleOptions, XScaleOptions, YScaleOptions } from './index.js';
|
|
4
|
+
import type { ChannelAccessor, ChannelName, ColorScaleOptions, DataRecord, LegendScaleOptions, PlotScales, RawValue, ScaleOptions, XScaleOptions, YScaleOptions } from './index.js';
|
|
5
5
|
import type { Snippet } from 'svelte';
|
|
6
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
|
+
import type WaffleX from '../marks/WaffleX.svelte';
|
|
8
|
+
import type WaffleY from '../marks/WaffleY.svelte';
|
|
7
9
|
export type PlotState = {
|
|
8
10
|
width: number;
|
|
9
11
|
height: number;
|
|
@@ -298,6 +300,18 @@ export type PlotDefaults = {
|
|
|
298
300
|
* default props for vector marks
|
|
299
301
|
*/
|
|
300
302
|
vector: Partial<Omit<ComponentProps<typeof Vector>, IgnoreDefaults>>;
|
|
303
|
+
/**
|
|
304
|
+
* default props for waffle marks, applied to both waffleX and waffleY marks
|
|
305
|
+
*/
|
|
306
|
+
waffle: Partial<Omit<ComponentProps<typeof WaffleX>, IgnoreDefaults>>;
|
|
307
|
+
/**
|
|
308
|
+
* default props for waffleX marks
|
|
309
|
+
*/
|
|
310
|
+
waffleX: Partial<Omit<ComponentProps<typeof WaffleX>, IgnoreDefaults>>;
|
|
311
|
+
/**
|
|
312
|
+
* default props for waffleY marks
|
|
313
|
+
*/
|
|
314
|
+
waffleY: Partial<Omit<ComponentProps<typeof WaffleY>, IgnoreDefaults>>;
|
|
301
315
|
};
|
|
302
316
|
export type PlotOptions = {
|
|
303
317
|
/**
|
|
@@ -409,11 +423,11 @@ export type PlotOptions = {
|
|
|
409
423
|
/**
|
|
410
424
|
* Options for the shared x scale.
|
|
411
425
|
*/
|
|
412
|
-
x: Partial<XScaleOptions
|
|
426
|
+
x: Partial<XScaleOptions> | false | RawValue[];
|
|
413
427
|
/**
|
|
414
428
|
* Options for the shared y scale
|
|
415
429
|
*/
|
|
416
|
-
y: Partial<YScaleOptions
|
|
430
|
+
y: Partial<YScaleOptions> | false | RawValue[];
|
|
417
431
|
/**
|
|
418
432
|
* Options for the shared radius scale
|
|
419
433
|
*/
|
|
@@ -422,8 +436,8 @@ export type PlotOptions = {
|
|
|
422
436
|
opacity: Partial<ScaleOptions>;
|
|
423
437
|
symbol: Partial<LegendScaleOptions>;
|
|
424
438
|
length: Partial<ScaleOptions>;
|
|
425
|
-
fx: Partial<
|
|
426
|
-
fy: Partial<
|
|
439
|
+
fx: Partial<XScaleOptions> | false | RawValue[];
|
|
440
|
+
fy: Partial<YScaleOptions> | false | RawValue[];
|
|
427
441
|
children: Snippet<[
|
|
428
442
|
{
|
|
429
443
|
width: number;
|
package/dist/types/scale.d.ts
CHANGED
|
@@ -106,6 +106,14 @@ export type XScaleOptions = ScaleOptions & {
|
|
|
106
106
|
tickRotate: number;
|
|
107
107
|
labelAnchor: 'auto' | 'left' | 'center' | 'right';
|
|
108
108
|
tickFormat: false | Intl.NumberFormatOptions | ((d: RawValue) => string);
|
|
109
|
+
/**
|
|
110
|
+
* Enable word wrapping for axis tick labels, default true
|
|
111
|
+
*/
|
|
112
|
+
wordWrap: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Remove duplicate ticks from axis, default true
|
|
115
|
+
*/
|
|
116
|
+
removeDuplicateTicks: boolean;
|
|
109
117
|
};
|
|
110
118
|
export type YScaleOptions = ScaleOptions & {
|
|
111
119
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelteplot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Gregor Aisch",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"@sveltejs/adapter-auto": "^6.1.1",
|
|
40
40
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
41
41
|
"@sveltejs/eslint-config": "^8.3.4",
|
|
42
|
-
"@sveltejs/kit": "^2.
|
|
42
|
+
"@sveltejs/kit": "^2.48.5",
|
|
43
43
|
"@sveltejs/package": "^2.5.4",
|
|
44
44
|
"@sveltejs/vite-plugin-svelte": "5.1.1",
|
|
45
45
|
"@sveltepress/theme-default": "^6.0.4",
|
|
46
46
|
"@sveltepress/twoslash": "^1.2.2",
|
|
47
47
|
"@sveltepress/vite": "^1.2.2",
|
|
48
|
-
"@testing-library/svelte": "^5.2.
|
|
48
|
+
"@testing-library/svelte": "^5.2.9",
|
|
49
49
|
"@testing-library/user-event": "^14.6.1",
|
|
50
50
|
"@types/d3-array": "^3.2.2",
|
|
51
51
|
"@types/d3-color": "^3.1.3",
|
|
@@ -61,24 +61,24 @@
|
|
|
61
61
|
"@types/geojson": "^7946.0.16",
|
|
62
62
|
"@types/topojson": "^3.2.6",
|
|
63
63
|
"@types/topojson-client": "^3.1.5",
|
|
64
|
-
"@typescript-eslint/eslint-plugin": "^8.46.
|
|
65
|
-
"@typescript-eslint/parser": "^8.46.
|
|
66
|
-
"csstype": "^3.
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
65
|
+
"@typescript-eslint/parser": "^8.46.4",
|
|
66
|
+
"csstype": "^3.2.0",
|
|
67
67
|
"d3-dsv": "^3.0.1",
|
|
68
68
|
"d3-fetch": "^3.0.1",
|
|
69
69
|
"d3-force": "^3.0.0",
|
|
70
|
-
"eslint": "^9.
|
|
70
|
+
"eslint": "^9.39.1",
|
|
71
71
|
"eslint-config-prettier": "^10.1.8",
|
|
72
|
-
"eslint-plugin-svelte": "3.
|
|
72
|
+
"eslint-plugin-svelte": "3.13.0",
|
|
73
73
|
"jsdom": "^26.1.0",
|
|
74
74
|
"prettier": "^3.6.2",
|
|
75
75
|
"prettier-plugin-svelte": "^3.4.0",
|
|
76
|
-
"puppeteer": "^24.
|
|
76
|
+
"puppeteer": "^24.30.0",
|
|
77
77
|
"remark-code-extra": "^1.0.1",
|
|
78
78
|
"remark-code-frontmatter": "^1.0.0",
|
|
79
79
|
"resize-observer-polyfill": "^1.5.1",
|
|
80
|
-
"sass": "^1.
|
|
81
|
-
"svelte-check": "^4.3.
|
|
80
|
+
"sass": "^1.94.0",
|
|
81
|
+
"svelte-check": "^4.3.4",
|
|
82
82
|
"svelte-eslint-parser": "1.4.0",
|
|
83
83
|
"svelte-highlight": "^7.9.0",
|
|
84
84
|
"svg-path-parser": "^1.1.0",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"typedoc-plugin-markdown": "^4.9.0",
|
|
90
90
|
"typescript": "^5.9.3",
|
|
91
91
|
"vite": "^6.4.1",
|
|
92
|
-
"vitest": "^
|
|
92
|
+
"vitest": "^4.0.9",
|
|
93
93
|
"vitest-matchmedia-mock": "^2.0.3",
|
|
94
94
|
"yoctocolors": "^2.1.2"
|
|
95
95
|
},
|
|
@@ -109,10 +109,10 @@
|
|
|
109
109
|
"d3-shape": "^3.2.0",
|
|
110
110
|
"d3-time": "^3.1.0",
|
|
111
111
|
"es-toolkit": "^1.41.0",
|
|
112
|
-
"fast-equals": "^5.3.
|
|
112
|
+
"fast-equals": "^5.3.3",
|
|
113
113
|
"interval-tree-1d": "^1.0.4",
|
|
114
114
|
"merge-deep": "^3.0.3",
|
|
115
|
-
"svelte": "5
|
|
115
|
+
"svelte": "5"
|
|
116
116
|
},
|
|
117
117
|
"scripts": {
|
|
118
118
|
"dev": "vite dev",
|