svelteplot 0.12.0 → 0.13.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.
@@ -14,6 +14,7 @@ export { default as Brush } from './Brush.svelte';
14
14
  export { default as BrushX } from './BrushX.svelte';
15
15
  export { default as BrushY } from './BrushY.svelte';
16
16
  export { default as Cell } from './Cell.svelte';
17
+ export { default as Contour } from './Contour.svelte';
17
18
  export { default as CellX } from './CellX.svelte';
18
19
  export { default as CellY } from './CellY.svelte';
19
20
  export { default as CustomMark } from './CustomMark.svelte';
@@ -5,7 +5,7 @@ import type { ChannelAccessor, ChannelName, ColorScaleOptions, DataRecord, Legen
5
5
  import type { Snippet } from 'svelte';
6
6
  import type { GenericMarkOptions, Mark } from './index.js';
7
7
  import type { Clip } from '../helpers/projection.js';
8
- 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, Trail, Vector } from '../marks/index.js';
8
+ import type { Area, AreaX, AreaY, Arrow, AxisX, AxisY, BarX, BarY, BoxX, BoxY, Brush, BrushX, BrushY, Cell, Contour, DifferenceY, Dot, Frame, Geo, Graticule, GridX, GridY, Image, Line, Link, Pointer, Raster, Rect, RectX, RectY, RuleX, RuleY, Sphere, Spike, Text, TickX, TickY, Trail, Vector } from '../marks/index.js';
9
9
  import type WaffleX from '../marks/WaffleX.svelte';
10
10
  import type WaffleY from '../marks/WaffleY.svelte';
11
11
  import type BaseAxisX from '../marks/helpers/BaseAxisX.svelte';
@@ -204,6 +204,10 @@ export type PlotDefaults = {
204
204
  * default props for cell marks
205
205
  */
206
206
  cell: Partial<Omit<ComponentProps<typeof Cell>, IgnoreDefaults>>;
207
+ /**
208
+ * default props for contour marks
209
+ */
210
+ contour: Partial<Omit<ComponentProps<typeof Contour>, IgnoreDefaults>>;
207
211
  /**
208
212
  * default props for dot marks
209
213
  */
@@ -260,6 +264,10 @@ export type PlotDefaults = {
260
264
  * default props for pointer marks
261
265
  */
262
266
  pointer: Partial<Omit<ComponentProps<typeof Pointer>, IgnoreDefaults>>;
267
+ /**
268
+ * default props for raster marks
269
+ */
270
+ raster: Partial<Omit<ComponentProps<typeof Raster>, IgnoreDefaults>>;
263
271
  /**
264
272
  * default props for rect marks, applied to rect and rectX marks
265
273
  */
package/package.json CHANGED
@@ -1,187 +1,191 @@
1
1
  {
2
- "name": "svelteplot",
3
- "version": "0.12.0",
4
- "description": "A Svelte-native data visualization framework based on the layered grammar of graphics principles.",
5
- "keywords": [
6
- "svelte",
7
- "data visualization",
8
- "plotting",
9
- "data analysis",
10
- "datavis",
11
- "dataviz",
12
- "grammar of graphics",
13
- "interactive visualization"
14
- ],
15
- "homepage": "https://svelteplot.dev",
16
- "bugs": {
17
- "url": "https://github.com/svelteplot/svelteplot/issues"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/svelteplot/svelteplot.git"
22
- },
23
- "license": "ISC",
24
- "author": {
25
- "name": "Gregor Aisch",
26
- "email": "gka@users.noreply.github.com"
27
- },
28
- "type": "module",
29
- "exports": {
30
- ".": {
31
- "types": "./dist/index.d.ts",
32
- "svelte": "./dist/index.js"
2
+ "name": "svelteplot",
3
+ "version": "0.13.0",
4
+ "description": "A Svelte-native data visualization framework based on the layered grammar of graphics principles.",
5
+ "keywords": [
6
+ "svelte",
7
+ "data visualization",
8
+ "plotting",
9
+ "data analysis",
10
+ "datavis",
11
+ "dataviz",
12
+ "grammar of graphics",
13
+ "interactive visualization"
14
+ ],
15
+ "homepage": "https://svelteplot.dev",
16
+ "bugs": {
17
+ "url": "https://github.com/svelteplot/svelteplot/issues"
33
18
  },
34
- "./*.js": {
35
- "import": "./dist/*.js"
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/svelteplot/svelteplot.git"
36
22
  },
37
- "./*.svelte": {
38
- "import": "./dist/*.svelte"
23
+ "license": "ISC",
24
+ "author": {
25
+ "name": "Gregor Aisch",
26
+ "email": "gka@users.noreply.github.com"
39
27
  },
40
- "./core/*.svelte": {
41
- "import": "./dist/core/*.svelte"
28
+ "type": "module",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "svelte": "./dist/index.js"
33
+ },
34
+ "./*.js": {
35
+ "import": "./dist/*.js"
36
+ },
37
+ "./*.svelte": {
38
+ "import": "./dist/*.svelte"
39
+ },
40
+ "./core/*.svelte": {
41
+ "import": "./dist/core/*.svelte"
42
+ },
43
+ "./marks/*.svelte": {
44
+ "import": "./dist/marks/*.svelte"
45
+ },
46
+ "./transforms": {
47
+ "import": "./dist/transforms/index.js"
48
+ }
42
49
  },
43
- "./marks/*.svelte": {
44
- "import": "./dist/marks/*.svelte"
50
+ "main": "./dist/index.js",
51
+ "types": "./dist/index.d.ts",
52
+ "files": [
53
+ "dist",
54
+ "!dist/**/*.test.*",
55
+ "!dist/**/*.spec.*"
56
+ ],
57
+ "scripts": {
58
+ "build": "vite build",
59
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
60
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
61
+ "check-js-extensions": "node scripts/check-js-extensions.js src",
62
+ "dev": "vite dev",
63
+ "docs": "npm run build && cd build && rsync --recursive . vis4.net:svelteplot/alpha0/",
64
+ "docs:api": "node scripts/generate-api.js --marks --plot --transforms && prettier --write .",
65
+ "docs:api:marks": "node scripts/generate-api.js --marks && prettier --write .",
66
+ "docs:api:plot": "node scripts/generate-api.js --plot && prettier --write .",
67
+ "docs:api:transforms": "node scripts/generate-api.js --transforms && prettier --write .",
68
+ "format": "eslint --fix package.json && prettier --write .",
69
+ "lint": "pnpm run lint:oxlint && pnpm run lint:eslint && pnpm run lint:types",
70
+ "lint:eslint": "prettier --check src && eslint src package.json",
71
+ "lint:oxlint": "oxlint --type-aware",
72
+ "lint:types": "svelte-kit sync && tsc --noEmit -p tsconfig.lint-types.json",
73
+ "prepack": "npx svelte-package && node scripts/fix-js-imports.js dist",
74
+ "preview": "vite preview",
75
+ "release-next": "npm version prerelease --preid next && npm publish && git push && git push --tags && sleep 1 && npm dist-tag add svelteplot@$(npm view . version) next",
76
+ "screenshots": "node screenshot-examples.js",
77
+ "test": "npm run test:unit",
78
+ "test:unit": "vitest",
79
+ "test:visual": "node scripts/visual-regression.js",
80
+ "vr:report": "node scripts/vr-report.js"
45
81
  },
46
- "./transforms": {
47
- "import": "./dist/transforms/index.js"
48
- }
49
- },
50
- "main": "./dist/index.js",
51
- "types": "./dist/index.d.ts",
52
- "files": [
53
- "dist",
54
- "!dist/**/*.test.*",
55
- "!dist/**/*.spec.*"
56
- ],
57
- "dependencies": {
58
- "d3-array": "^3.2.4",
59
- "d3-color": "^3.1.0",
60
- "d3-delaunay": "^6.0.4",
61
- "d3-format": "^3.1.2",
62
- "d3-geo": "^3.1.1",
63
- "d3-interpolate": "^3.0.1",
64
- "d3-path": "^3.1.0",
65
- "d3-quadtree": "^3.0.1",
66
- "d3-random": "^3.0.1",
67
- "d3-scale": "^4.0.2",
68
- "d3-scale-chromatic": "^3.1.0",
69
- "d3-shape": "^3.2.0",
70
- "d3-time": "^3.1.0",
71
- "es-toolkit": "^1.44.0",
72
- "fast-equals": "^6.0.0",
73
- "interval-tree-1d": "^1.0.4",
74
- "merge-deep": "^3.0.3"
75
- },
76
- "devDependencies": {
77
- "@aitodotai/json-stringify-pretty-compact": "^1.3.0",
78
- "@emotion/css": "^11.13.5",
79
- "@shikijs/twoslash": "^3.22.0",
80
- "@sveltejs/adapter-auto": "^7.0.1",
81
- "@sveltejs/adapter-static": "^3.0.10",
82
- "@sveltejs/enhanced-img": "^0.10.2",
83
- "@sveltejs/eslint-config": "^8.3.5",
84
- "@sveltejs/kit": "^2.52.2",
85
- "@sveltejs/package": "^2.5.7",
86
- "@sveltejs/vite-plugin-svelte": "6.2.4",
87
- "@sveltepress/twoslash": "^1.3.6",
88
- "@sveltepress/vite": "^1.3.6",
89
- "@testing-library/svelte": "^5.3.1",
90
- "@testing-library/user-event": "^14.6.1",
91
- "@types/d3-array": "^3.2.2",
92
- "@types/d3-color": "^3.1.3",
93
- "@types/d3-delaunay": "^6.0.4",
94
- "@types/d3-dsv": "^3.0.7",
95
- "@types/d3-geo": "^3.1.0",
96
- "@types/d3-interpolate": "^3.0.4",
97
- "@types/d3-path": "^3.1.1",
98
- "@types/d3-quadtree": "^3.0.6",
99
- "@types/d3-random": "^3.0.3",
100
- "@types/d3-scale": "^4.0.9",
101
- "@types/d3-scale-chromatic": "^3.1.0",
102
- "@types/d3-shape": "^3.1.8",
103
- "@types/geojson": "^7946.0.16",
104
- "@types/topojson": "^3.2.6",
105
- "@types/topojson-client": "^3.1.5",
106
- "@typescript-eslint/eslint-plugin": "^8.56.0",
107
- "@typescript-eslint/parser": "^8.56.0",
108
- "@unocss/extractor-svelte": "^66.6.0",
109
- "@vite-pwa/sveltekit": "^1.1.0",
110
- "csstype": "^3.2.3",
111
- "d3-dsv": "^3.0.1",
112
- "d3-fetch": "^3.0.1",
113
- "d3-force": "^3.0.0",
114
- "eslint": "^9.39.2",
115
- "eslint-config-prettier": "^10.1.8",
116
- "eslint-plugin-package-json": "^0.88.3",
117
- "eslint-plugin-regexp": "^2.10.0",
118
- "eslint-plugin-svelte": "3.15.0",
119
- "jqmath": "^0.4.9",
120
- "jsdom": "^27.4.0",
121
- "log-update": "^7.1.0",
122
- "lru-cache": "^11.2.6",
123
- "magic-string": "^0.30.21",
124
- "mdast-util-from-markdown": "^2.0.2",
125
- "mdast-util-gfm": "^3.1.0",
126
- "oxlint": "^1.48.0",
127
- "oxlint-tsgolint": "^0.14.0",
128
- "pixelmatch": "^7.1.0",
129
- "pngjs": "^7.0.0",
130
- "prettier": "^3.8.1",
131
- "prettier-plugin-svelte": "^3.5.0",
132
- "puppeteer": "^24.37.4",
133
- "remark-code-extra": "^1.0.1",
134
- "remark-code-frontmatter": "^1.0.0",
135
- "remark-math": "^6.0.0",
136
- "resize-observer-polyfill": "^1.5.1",
137
- "sass": "^1.97.3",
138
- "shiki": "^3.22.0",
139
- "svelte": "5",
140
- "svelte-check": "^4.4.1",
141
- "svelte-eslint-parser": "1.4.1",
142
- "svelte-highlight": "^7.9.0",
143
- "svg-path-parser": "^1.1.0",
144
- "temml": "^0.13.1",
145
- "topojson-client": "^3.1.0",
146
- "ts-essentials": "^10.1.1",
147
- "tslib": "^2.8.1",
148
- "typedoc": "^0.28.17",
149
- "typedoc-plugin-markdown": "^4.10.0",
150
- "typescript": "^5.9.3",
151
- "uid": "^2.0.2",
152
- "unist-util-visit": "^5.1.0",
153
- "unocss": "^66.6.0",
154
- "vite": "^7.3.1",
155
- "vitest": "^4.0.18",
156
- "vitest-matchmedia-mock": "^2.0.3",
157
- "wx-svelte-grid": "^2.5.0",
158
- "yoctocolors": "^2.1.2"
159
- },
160
- "peerDependencies": {
161
- "svelte": "^5.43.0"
162
- },
163
- "scripts": {
164
- "build": "vite build",
165
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
166
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
167
- "check-js-extensions": "node scripts/check-js-extensions.js src",
168
- "dev": "vite dev",
169
- "docs": "npm run build && cd build && rsync --recursive . vis4.net:svelteplot/alpha0/",
170
- "docs:api": "node scripts/generate-api.js --marks --plot --transforms && prettier --write .",
171
- "docs:api:marks": "node scripts/generate-api.js --marks && prettier --write .",
172
- "docs:api:plot": "node scripts/generate-api.js --plot && prettier --write .",
173
- "docs:api:transforms": "node scripts/generate-api.js --transforms && prettier --write .",
174
- "format": "eslint --fix package.json && prettier --write .",
175
- "lint": "pnpm run lint:oxlint && pnpm run lint:eslint && pnpm run lint:types",
176
- "lint:eslint": "prettier --check src && eslint src package.json",
177
- "lint:oxlint": "oxlint --type-aware",
178
- "lint:types": "svelte-kit sync && tsc --noEmit -p tsconfig.lint-types.json",
179
- "preview": "vite preview",
180
- "release-next": "npm version prerelease --preid next && npm publish && git push && git push --tags && sleep 1 && npm dist-tag add svelteplot@$(npm view . version) next",
181
- "screenshots": "node screenshot-examples.js",
182
- "test": "npm run test:unit",
183
- "test:unit": "vitest",
184
- "test:visual": "node scripts/visual-regression.js",
185
- "vr:report": "node scripts/vr-report.js"
186
- }
187
- }
82
+ "dependencies": {
83
+ "d3-array": "^3.2.4",
84
+ "d3-color": "^3.1.0",
85
+ "d3-contour": "^4.0.2",
86
+ "d3-delaunay": "^6.0.4",
87
+ "d3-format": "^3.1.2",
88
+ "d3-geo": "^3.1.1",
89
+ "d3-interpolate": "^3.0.1",
90
+ "d3-path": "^3.1.0",
91
+ "d3-quadtree": "^3.0.1",
92
+ "d3-random": "^3.0.1",
93
+ "d3-scale": "^4.0.2",
94
+ "d3-scale-chromatic": "^3.1.0",
95
+ "d3-shape": "^3.2.0",
96
+ "d3-time": "^3.1.0",
97
+ "es-toolkit": "^1.44.0",
98
+ "fast-equals": "^6.0.0",
99
+ "interval-tree-1d": "^1.0.4",
100
+ "merge-deep": "^3.0.3"
101
+ },
102
+ "devDependencies": {
103
+ "@aitodotai/json-stringify-pretty-compact": "^1.3.0",
104
+ "@emotion/css": "^11.13.5",
105
+ "@shikijs/twoslash": "^3.22.0",
106
+ "@sveltejs/adapter-auto": "^7.0.1",
107
+ "@sveltejs/adapter-static": "^3.0.10",
108
+ "@sveltejs/enhanced-img": "^0.10.2",
109
+ "@sveltejs/eslint-config": "^8.3.5",
110
+ "@sveltejs/kit": "^2.52.2",
111
+ "@sveltejs/package": "^2.5.7",
112
+ "@sveltejs/vite-plugin-svelte": "6.2.4",
113
+ "@sveltepress/twoslash": "^1.3.6",
114
+ "@sveltepress/vite": "^1.3.6",
115
+ "@testing-library/svelte": "^5.3.1",
116
+ "@testing-library/user-event": "^14.6.1",
117
+ "@types/d3-array": "^3.2.2",
118
+ "@types/d3-color": "^3.1.3",
119
+ "@types/d3-contour": "^3.0.6",
120
+ "@types/d3-delaunay": "^6.0.4",
121
+ "@types/d3-dsv": "^3.0.7",
122
+ "@types/d3-geo": "^3.1.0",
123
+ "@types/d3-interpolate": "^3.0.4",
124
+ "@types/d3-path": "^3.1.1",
125
+ "@types/d3-quadtree": "^3.0.6",
126
+ "@types/d3-random": "^3.0.3",
127
+ "@types/d3-scale": "^4.0.9",
128
+ "@types/d3-scale-chromatic": "^3.1.0",
129
+ "@types/d3-shape": "^3.1.8",
130
+ "@types/geojson": "^7946.0.16",
131
+ "@types/topojson": "^3.2.6",
132
+ "@types/topojson-client": "^3.1.5",
133
+ "@typescript-eslint/eslint-plugin": "^8.56.0",
134
+ "@typescript-eslint/parser": "^8.56.0",
135
+ "@unocss/extractor-svelte": "^66.6.0",
136
+ "@vite-pwa/sveltekit": "^1.1.0",
137
+ "csstype": "^3.2.3",
138
+ "d3-dsv": "^3.0.1",
139
+ "d3-fetch": "^3.0.1",
140
+ "d3-force": "^3.0.0",
141
+ "eslint": "^9.39.2",
142
+ "eslint-config-prettier": "^10.1.8",
143
+ "eslint-plugin-package-json": "^0.88.3",
144
+ "eslint-plugin-regexp": "^2.10.0",
145
+ "eslint-plugin-svelte": "3.15.0",
146
+ "jqmath": "^0.4.9",
147
+ "jsdom": "^27.4.0",
148
+ "log-update": "^7.1.0",
149
+ "lru-cache": "^11.2.6",
150
+ "magic-string": "^0.30.21",
151
+ "mdast-util-from-markdown": "^2.0.2",
152
+ "mdast-util-gfm": "^3.1.0",
153
+ "oxlint": "^1.48.0",
154
+ "oxlint-tsgolint": "^0.14.0",
155
+ "pixelmatch": "^7.1.0",
156
+ "pngjs": "^7.0.0",
157
+ "prettier": "^3.8.1",
158
+ "prettier-plugin-svelte": "^3.5.0",
159
+ "puppeteer": "^24.37.4",
160
+ "remark-code-extra": "^1.0.1",
161
+ "remark-code-frontmatter": "^1.0.0",
162
+ "remark-math": "^6.0.0",
163
+ "resize-observer-polyfill": "^1.5.1",
164
+ "sass": "^1.97.3",
165
+ "shiki": "^3.22.0",
166
+ "svelte": "5",
167
+ "svelte-check": "^4.4.1",
168
+ "svelte-eslint-parser": "1.4.1",
169
+ "svelte-highlight": "^7.9.0",
170
+ "svg-path-parser": "^1.1.0",
171
+ "temml": "^0.13.1",
172
+ "topojson-client": "^3.1.0",
173
+ "ts-essentials": "^10.1.1",
174
+ "tslib": "^2.8.1",
175
+ "typedoc": "^0.28.17",
176
+ "typedoc-plugin-markdown": "^4.10.0",
177
+ "typescript": "^5.9.3",
178
+ "uid": "^2.0.2",
179
+ "unist-util-visit": "^5.1.0",
180
+ "unocss": "^66.6.0",
181
+ "vite": "^7.3.1",
182
+ "vitest": "^4.0.18",
183
+ "vitest-matchmedia-mock": "^2.0.3",
184
+ "wx-svelte-grid": "^2.5.0",
185
+ "yoctocolors": "^2.1.2"
186
+ },
187
+ "peerDependencies": {
188
+ "svelte": "^5.43.0"
189
+ },
190
+ "packageManager": "pnpm@10.30.0"
191
+ }