svelteplot 0.3.8-pr-141.0 → 0.3.8-pr-144.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 +3 -3
- package/dist/helpers/index.js +4 -1
- package/dist/helpers/resolve.js +1 -1
- package/dist/marks/AxisX.svelte +3 -1
- package/dist/marks/Cell.svelte +1 -1
- package/dist/marks/Dot.svelte +0 -1
- package/dist/marks/TickX.svelte +1 -1
- package/dist/marks/TickY.svelte +1 -1
- package/package.json +1 -1
- package/dist/helpers/isValid.d.ts +0 -6
- package/dist/helpers/isValid.js +0 -6
package/dist/Mark.svelte
CHANGED
|
@@ -270,9 +270,9 @@
|
|
|
270
270
|
|
|
271
271
|
// apply dx/dy transform
|
|
272
272
|
out[channel] =
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
Number.isFinite(scaled) && (scale === 'x' || scale === 'y')
|
|
274
|
+
? scaled + (scale === 'x' ? dx : dy)
|
|
275
|
+
: scaled;
|
|
276
276
|
} else if (defaults[channel]) {
|
|
277
277
|
out[channel] = defaults[channel];
|
|
278
278
|
}
|
package/dist/helpers/index.js
CHANGED
|
@@ -23,7 +23,10 @@ export function isSnippet(value) {
|
|
|
23
23
|
return typeof value === 'function' && value.length === 1;
|
|
24
24
|
}
|
|
25
25
|
export function isValid(value) {
|
|
26
|
-
return value !== null &&
|
|
26
|
+
return (value !== null &&
|
|
27
|
+
value !== undefined &&
|
|
28
|
+
!Number.isNaN(value) &&
|
|
29
|
+
(typeof value !== 'number' || Number.isFinite(value)));
|
|
27
30
|
}
|
|
28
31
|
export function maybeData(data) {
|
|
29
32
|
// if (data.type === 'FeatureCollection') return data.features;
|
package/dist/helpers/resolve.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CHANNEL_SCALE } from '../constants.js';
|
|
2
2
|
import isDataRecord from './isDataRecord.js';
|
|
3
3
|
import isRawValue from './isRawValue.js';
|
|
4
|
-
import { isValid } from './
|
|
4
|
+
import { isValid } from './index.js';
|
|
5
5
|
import { getBaseStylesObject } from './getBaseStyles.js';
|
|
6
6
|
import { RAW_VALUE } from '../transforms/recordize.js';
|
|
7
7
|
export function resolveProp(accessor, datum, _defaultValue = null) {
|
package/dist/marks/AxisX.svelte
CHANGED
|
@@ -209,7 +209,9 @@
|
|
|
209
209
|
)}
|
|
210
210
|
x={plot.options.marginLeft +
|
|
211
211
|
plot.plotWidth * (titleAlign === 'right' ? 1 : titleAlign === 'center' ? 0.5 : 0)}
|
|
212
|
-
y={anchor === 'top'
|
|
212
|
+
y={anchor === 'top'
|
|
213
|
+
? (options.titleFontSize || 11) + 5
|
|
214
|
+
: plot.height - (options.titleFontSize || 11) - 5}
|
|
213
215
|
class="axis-x-title"
|
|
214
216
|
dominant-baseline={anchor === 'top' ? 'auto' : 'hanging'}>{useTitle}</text>
|
|
215
217
|
{/if}
|
package/dist/marks/Cell.svelte
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
import { recordizeY, sort } from '../index.js';
|
|
27
27
|
import { resolveChannel } from '../helpers/resolve.js';
|
|
28
28
|
|
|
29
|
-
import { isValid } from '../helpers/
|
|
29
|
+
import { isValid } from '../helpers/index.js';
|
|
30
30
|
import RectPath from './helpers/RectPath.svelte';
|
|
31
31
|
|
|
32
32
|
let markProps: CellMarkProps = $props();
|
package/dist/marks/Dot.svelte
CHANGED
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
import { recordizeXY } from '../transforms/recordize.js';
|
|
33
33
|
import { addEventHandlers } from './helpers/events.js';
|
|
34
34
|
import Anchor from './helpers/Anchor.svelte';
|
|
35
|
-
import type { D } from 'vitest/dist/chunks/reporters.d.DL9pg5DB.js';
|
|
36
35
|
|
|
37
36
|
const DEFAULTS = {
|
|
38
37
|
...getContext<PlotDefaults>('svelteplot/_defaults').dot
|
package/dist/marks/TickX.svelte
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
} from '../types/index.js';
|
|
36
36
|
import { recordizeX } from '../index.js';
|
|
37
37
|
import { projectX, projectY } from '../helpers/scales.js';
|
|
38
|
-
import { isValid } from '../helpers/
|
|
38
|
+
import { isValid } from '../helpers/index.js';
|
|
39
39
|
import { testFilter, parseInset } from '../helpers/index.js';
|
|
40
40
|
|
|
41
41
|
const { getPlotState } = getContext<PlotContext>('svelteplot');
|
package/dist/marks/TickY.svelte
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
} from '../types/index.js';
|
|
35
35
|
import { recordizeY } from '../index.js';
|
|
36
36
|
import { projectX, projectY } from '../helpers/scales.js';
|
|
37
|
-
import { isValid } from '../helpers/
|
|
37
|
+
import { isValid } from '../helpers/index.js';
|
|
38
38
|
import { testFilter, parseInset } from '../helpers/index.js';
|
|
39
39
|
|
|
40
40
|
const { getPlotState } = getContext<PlotContext>('svelteplot');
|
package/package.json
CHANGED