svelteplot 0.5.0-pr-236.0 → 0.5.0-pr-237.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.
Files changed (2) hide show
  1. package/dist/core/Plot.svelte +27 -26
  2. package/package.json +14 -14
@@ -207,6 +207,7 @@
207
207
  const yDomainCount = $derived(
208
208
  isOneDimensional && explicitScales.has('x') ? 1 : preScales.y.domain.length
209
209
  );
210
+
210
211
  // compute the (automatic) height based on various factors:
211
212
  // - if the plot used a projection and the projection requires an aspect ratio,
212
213
  // we use it, but adjust for the facet counts
@@ -215,34 +216,34 @@
215
216
  // - for one-dimensional scales using the x scale we set a fixed height
216
217
  // - for y band-scales we use the number of items in the y domain
217
218
  const height = $derived(
218
- maybeNumber(plotOptions.height) === null || plotOptions.height === 'auto'
219
- ? Math.round(
220
- preScales.projection && preScales.projection.aspectRatio
221
- ? ((plotWidth * preScales.projection.aspectRatio) / xFacetCount) *
222
- yFacetCount +
219
+ typeof plotOptions.height === 'function'
220
+ ? plotOptions.height(plotWidth)
221
+ : maybeNumber(plotOptions.height) === null || plotOptions.height === 'auto'
222
+ ? Math.round(
223
+ preScales.projection && preScales.projection.aspectRatio
224
+ ? ((plotWidth * preScales.projection.aspectRatio) / xFacetCount) *
225
+ yFacetCount +
226
+ plotOptions.marginTop +
227
+ plotOptions.marginBottom
228
+ : plotOptions.aspectRatio
229
+ ? heightFromAspect(
230
+ preScales.x,
231
+ preScales.y,
232
+ plotOptions.aspectRatio,
233
+ plotWidth,
234
+ plotOptions.marginTop,
235
+ plotOptions.marginBottom
236
+ )
237
+ : ((isOneDimensional && explicitScales.has('x')) || !explicitMarks.length
238
+ ? yFacetCount * DEFAULTS.bandScaleHeight
239
+ : preScales.y.type === 'band'
240
+ ? yFacetCount * yDomainCount * DEFAULTS.bandScaleHeight
241
+ : preScales.y.type === 'point'
242
+ ? yFacetCount * yDomainCount * DEFAULTS.pointScaleHeight
243
+ : DEFAULTS.height) +
223
244
  plotOptions.marginTop +
224
245
  plotOptions.marginBottom
225
- : plotOptions.aspectRatio
226
- ? heightFromAspect(
227
- preScales.x,
228
- preScales.y,
229
- plotOptions.aspectRatio,
230
- plotWidth,
231
- plotOptions.marginTop,
232
- plotOptions.marginBottom
233
- )
234
- : ((isOneDimensional && explicitScales.has('x')) || !explicitMarks.length
235
- ? yFacetCount * DEFAULTS.bandScaleHeight
236
- : preScales.y.type === 'band'
237
- ? yFacetCount * yDomainCount * DEFAULTS.bandScaleHeight
238
- : preScales.y.type === 'point'
239
- ? yFacetCount * yDomainCount * DEFAULTS.pointScaleHeight
240
- : DEFAULTS.height) +
241
- plotOptions.marginTop +
242
- plotOptions.marginBottom
243
- )
244
- : typeof plotOptions.height === 'function'
245
- ? plotOptions.height(plotWidth)
246
+ )
246
247
  : maybeNumber(plotOptions.height)
247
248
  );
248
249
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelteplot",
3
- "version": "0.5.0-pr-236.0",
3
+ "version": "0.5.0-pr-237.0",
4
4
  "license": "ISC",
5
5
  "author": {
6
6
  "name": "Gregor Aisch",
@@ -57,7 +57,7 @@
57
57
  "@sveltejs/adapter-auto": "^6.1.1",
58
58
  "@sveltejs/adapter-static": "^3.0.10",
59
59
  "@sveltejs/eslint-config": "^8.3.4",
60
- "@sveltejs/kit": "^2.44.0",
60
+ "@sveltejs/kit": "^2.47.3",
61
61
  "@sveltejs/package": "^2.5.4",
62
62
  "@sveltejs/vite-plugin-svelte": "5.1.1",
63
63
  "@sveltepress/theme-default": "^6.0.4",
@@ -79,34 +79,34 @@
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.45.0",
83
- "@typescript-eslint/parser": "^8.45.0",
82
+ "@typescript-eslint/eslint-plugin": "^8.46.2",
83
+ "@typescript-eslint/parser": "^8.46.2",
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.37.0",
88
+ "eslint": "^9.38.0",
89
89
  "eslint-config-prettier": "^10.1.8",
90
- "eslint-plugin-svelte": "3.12.4",
90
+ "eslint-plugin-svelte": "3.12.5",
91
91
  "jsdom": "^26.1.0",
92
92
  "prettier": "^3.6.2",
93
93
  "prettier-plugin-svelte": "^3.4.0",
94
- "puppeteer": "^24.23.0",
94
+ "puppeteer": "^24.26.1",
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
98
  "sass": "^1.93.2",
99
- "svelte-check": "^4.3.2",
100
- "svelte-eslint-parser": "1.3.3",
101
- "svelte-highlight": "^7.8.4",
99
+ "svelte-check": "^4.3.3",
100
+ "svelte-eslint-parser": "1.4.0",
101
+ "svelte-highlight": "^7.9.0",
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.13",
106
+ "typedoc": "^0.28.14",
107
107
  "typedoc-plugin-markdown": "^4.9.0",
108
108
  "typescript": "^5.9.3",
109
- "vite": "^6.3.6",
109
+ "vite": "^6.4.1",
110
110
  "vitest": "^3.2.4",
111
111
  "vitest-matchmedia-mock": "^2.0.3",
112
112
  "yoctocolors": "^2.1.2"
@@ -126,10 +126,10 @@
126
126
  "d3-scale-chromatic": "^3.1.0",
127
127
  "d3-shape": "^3.2.0",
128
128
  "d3-time": "^3.1.0",
129
- "es-toolkit": "^1.39.10",
129
+ "es-toolkit": "^1.41.0",
130
130
  "fast-equals": "^5.3.2",
131
131
  "interval-tree-1d": "^1.0.4",
132
132
  "merge-deep": "^3.0.3",
133
- "svelte": "5.39.8"
133
+ "svelte": "5.41.3"
134
134
  }
135
135
  }