svelteplot 0.3.8 → 0.3.9
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 +4 -4
- package/dist/helpers/getBaseStyles.js +6 -1
- 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/Text.svelte +15 -5
- package/dist/marks/Text.svelte.d.ts +18 -9
- package/dist/marks/TickX.svelte +1 -1
- package/dist/marks/TickY.svelte +1 -1
- package/dist/types/mark.d.ts +1 -1
- package/dist/ui/Checkbox.svelte +11 -3
- package/dist/ui/Checkbox.svelte.d.ts +2 -2
- package/package.json +125 -126
- package/dist/helpers/isValid.d.ts +0 -6
- package/dist/helpers/isValid.js +0 -6
package/dist/Mark.svelte
CHANGED
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
let prevResolvedData: ResolvedDataRecord[] = [];
|
|
159
159
|
|
|
160
160
|
$effect(() => {
|
|
161
|
-
if (isDifferent(resolvedData, prevResolvedData)) {
|
|
161
|
+
if (isDifferent(data, mark.data) || isDifferent(resolvedData, prevResolvedData)) {
|
|
162
162
|
prevResolvedData = resolvedData;
|
|
163
163
|
// data has changed
|
|
164
164
|
mark.data = data;
|
|
@@ -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
|
}
|
|
@@ -11,11 +11,16 @@ const styleProps = {
|
|
|
11
11
|
blend: 'mix-blend-mode',
|
|
12
12
|
clipPath: 'clip-path',
|
|
13
13
|
mask: 'mask',
|
|
14
|
+
fontFamily: 'font-family',
|
|
14
15
|
fontSize: 'font-size',
|
|
15
|
-
fontWeight: 'font-weight',
|
|
16
16
|
fontStyle: 'font-style',
|
|
17
|
+
fontWeight: 'font-weight',
|
|
17
18
|
textAnchor: 'text-anchor',
|
|
18
19
|
fontVariant: 'font-variant',
|
|
20
|
+
letterSpacing: 'letter-spacing',
|
|
21
|
+
textDecoration: 'text-decoration',
|
|
22
|
+
textTransform: 'text-transform',
|
|
23
|
+
wordSpacing: 'word-spacing',
|
|
19
24
|
cursor: 'cursor',
|
|
20
25
|
pointerEvents: 'pointer-events'
|
|
21
26
|
};
|
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/Text.svelte
CHANGED
|
@@ -4,17 +4,27 @@
|
|
|
4
4
|
-->
|
|
5
5
|
|
|
6
6
|
<script lang="ts" generics="Datum extends DataRecord">
|
|
7
|
+
import type * as CSS from 'csstype';
|
|
8
|
+
|
|
7
9
|
interface TextMarkProps extends BaseMarkProps<Datum>, LinkableMarkProps<Datum> {
|
|
8
|
-
data
|
|
9
|
-
x
|
|
10
|
-
y
|
|
10
|
+
data?: Datum[];
|
|
11
|
+
x?: ChannelAccessor<Datum>;
|
|
12
|
+
y?: ChannelAccessor<Datum>;
|
|
11
13
|
children?: Snippet;
|
|
12
14
|
text: ConstantAccessor<string | null | false | undefined, Datum>;
|
|
13
15
|
title?: ConstantAccessor<string, Datum>;
|
|
14
16
|
/**
|
|
15
17
|
* the font size of the text
|
|
16
18
|
*/
|
|
17
|
-
|
|
19
|
+
fontFamily?: ConstantAccessor<CSS.Property.FontFamily, Datum>;
|
|
20
|
+
fontSize?: ConstantAccessor<CSS.Property.FontSize, Datum>;
|
|
21
|
+
fontWeight?: ConstantAccessor<CSS.Property.FontWeight, Datum>;
|
|
22
|
+
fontStyle?: ConstantAccessor<CSS.Property.FontStyle, Datum>;
|
|
23
|
+
fontVariant?: ConstantAccessor<CSS.Property.FontVariant, Datum>;
|
|
24
|
+
letterSpacing?: ConstantAccessor<CSS.Property.LetterSpacing, Datum>;
|
|
25
|
+
wordSpacing?: ConstantAccessor<CSS.Property.WordSpacing, Datum>;
|
|
26
|
+
textTransform?: ConstantAccessor<CSS.Property.TextTransform, Datum>;
|
|
27
|
+
textDecoration?: ConstantAccessor<CSS.Property.TextDecoration, Datum>;
|
|
18
28
|
/**
|
|
19
29
|
* if you want to apply class names to individual text elements
|
|
20
30
|
*/
|
|
@@ -62,7 +72,7 @@
|
|
|
62
72
|
|
|
63
73
|
const DEFAULTS = {
|
|
64
74
|
fontSize: 12,
|
|
65
|
-
|
|
75
|
+
c: 500,
|
|
66
76
|
strokeWidth: 1.6,
|
|
67
77
|
frameAnchor: 'center',
|
|
68
78
|
lineHeight: 1.1,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type * as CSS from 'csstype';
|
|
1
2
|
import { type Snippet } from 'svelte';
|
|
2
3
|
import type { DataRecord, ConstantAccessor, ChannelAccessor, RawValue, LinkableMarkProps } from '../types/index.js';
|
|
3
4
|
declare class __sveltets_Render<Datum extends DataRecord> {
|
|
@@ -17,16 +18,16 @@ declare class __sveltets_Render<Datum extends DataRecord> {
|
|
|
17
18
|
stroke: ChannelAccessor<Datum>;
|
|
18
19
|
strokeWidth: ConstantAccessor<number, Datum>;
|
|
19
20
|
strokeOpacity: ConstantAccessor<number, Datum>;
|
|
20
|
-
strokeLinejoin: ConstantAccessor<
|
|
21
|
-
strokeLinecap: ConstantAccessor<
|
|
21
|
+
strokeLinejoin: ConstantAccessor<CSS.Property.StrokeLinejoin, Datum>;
|
|
22
|
+
strokeLinecap: ConstantAccessor<CSS.Property.StrokeLinecap, Datum>;
|
|
22
23
|
strokeMiterlimit: ConstantAccessor<number, Datum>;
|
|
23
24
|
opacity: ChannelAccessor<Datum>;
|
|
24
25
|
strokeDasharray: ConstantAccessor<string, Datum>;
|
|
25
26
|
strokeDashoffset: ConstantAccessor<number, Datum>;
|
|
26
|
-
mixBlendMode: ConstantAccessor<
|
|
27
|
+
mixBlendMode: ConstantAccessor<CSS.Property.MixBlendMode, Datum>;
|
|
27
28
|
clipPath: string;
|
|
28
29
|
imageFilter: ConstantAccessor<string, Datum>;
|
|
29
|
-
shapeRendering: ConstantAccessor<
|
|
30
|
+
shapeRendering: ConstantAccessor<CSS.Property.ShapeRendering, Datum>;
|
|
30
31
|
paintOrder: ConstantAccessor<string, Datum>;
|
|
31
32
|
onclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
32
33
|
ondblclick?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
@@ -59,18 +60,26 @@ declare class __sveltets_Render<Datum extends DataRecord> {
|
|
|
59
60
|
oncontextmenu?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
60
61
|
onwheel?: import("svelte/elements").MouseEventHandler<SVGPathElement>;
|
|
61
62
|
class: string | null;
|
|
62
|
-
cursor: ConstantAccessor<
|
|
63
|
+
cursor: ConstantAccessor<CSS.Property.Cursor, Datum>;
|
|
63
64
|
}> & LinkableMarkProps<Datum> & {
|
|
64
|
-
data
|
|
65
|
-
x
|
|
66
|
-
y
|
|
65
|
+
data?: Datum[] | undefined;
|
|
66
|
+
x?: ChannelAccessor<Datum>;
|
|
67
|
+
y?: ChannelAccessor<Datum>;
|
|
67
68
|
children?: Snippet;
|
|
68
69
|
text: ConstantAccessor<string | false | null | undefined, Datum>;
|
|
69
70
|
title?: ConstantAccessor<string, Datum>;
|
|
70
71
|
/**
|
|
71
72
|
* the font size of the text
|
|
72
73
|
*/
|
|
73
|
-
|
|
74
|
+
fontFamily?: ConstantAccessor<CSS.Property.FontFamily, Datum>;
|
|
75
|
+
fontSize?: ConstantAccessor<CSS.Property.FontSize<0 | (string & {})>, Datum>;
|
|
76
|
+
fontWeight?: ConstantAccessor<CSS.Property.FontWeight, Datum>;
|
|
77
|
+
fontStyle?: ConstantAccessor<CSS.Property.FontStyle, Datum>;
|
|
78
|
+
fontVariant?: ConstantAccessor<CSS.Property.FontVariant, Datum>;
|
|
79
|
+
letterSpacing?: ConstantAccessor<CSS.Property.LetterSpacing<0 | (string & {})>, Datum>;
|
|
80
|
+
wordSpacing?: ConstantAccessor<CSS.Property.WordSpacing<0 | (string & {})>, Datum>;
|
|
81
|
+
textTransform?: ConstantAccessor<CSS.Property.TextTransform, Datum>;
|
|
82
|
+
textDecoration?: ConstantAccessor<CSS.Property.TextDecoration<0 | (string & {})>, Datum>;
|
|
74
83
|
/**
|
|
75
84
|
* if you want to apply class names to individual text elements
|
|
76
85
|
*/
|
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/dist/types/mark.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export type Mark<T> = {
|
|
|
7
7
|
options: T;
|
|
8
8
|
};
|
|
9
9
|
export type MarkType = 'area' | 'arrow' | 'barX' | 'barY' | 'cell' | 'custom' | 'dot' | 'vector' | 'frame' | 'geo' | 'gridX' | 'gridY' | 'line' | 'rect' | 'regression' | 'ruleX' | 'ruleY' | 'swoopyArrow' | 'text' | 'tickX' | 'tickY';
|
|
10
|
-
export type MarkStyleProps = 'strokeDasharray' | 'strokeLinejoin' | 'strokeLinecap' | 'opacity' | 'cursor' | 'pointerEvents' | 'blend' | 'fill' | 'fillOpacity' | 'fontWeight' | 'fontVariant' | 'fontSize' | 'fontStyle' | 'stroke' | 'strokeWidth' | 'strokeOpacity' | 'x' | 'y' | 'clipPath' | 'mask' | 'filter' | 'angle' | 'radius' | 'symbol' | 'textAnchor' | 'width';
|
|
10
|
+
export type MarkStyleProps = 'strokeDasharray' | 'strokeLinejoin' | 'strokeLinecap' | 'opacity' | 'cursor' | 'pointerEvents' | 'blend' | 'fill' | 'fillOpacity' | 'fontFamily' | 'fontWeight' | 'fontVariant' | 'fontSize' | 'fontStyle' | 'letterSpacing' | 'wordSpacing' | 'stroke' | 'strokeWidth' | 'strokeOpacity' | 'x' | 'y' | 'clipPath' | 'mask' | 'filter' | 'angle' | 'radius' | 'symbol' | 'textAnchor' | 'textTransform' | 'textDecoration' | 'width';
|
|
11
11
|
import type { MouseEventHandler } from 'svelte/elements';
|
|
12
12
|
import type { ChannelAccessor, ConstantAccessor, DataRecord, RawValue } from './index.js';
|
|
13
13
|
import type * as CSS from 'csstype';
|
package/dist/ui/Checkbox.svelte
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
<script>
|
|
2
|
-
let { label, value = $bindable() } = $props();
|
|
2
|
+
let { label, value = $bindable(), ...restProps } = $props();
|
|
3
3
|
</script>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
<
|
|
5
|
+
<label class="checkbox">
|
|
6
|
+
<input type="checkbox" bind:checked={value} {...restProps} />
|
|
7
|
+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
|
8
|
+
{@html label}</label>
|
|
9
|
+
|
|
10
|
+
<style>
|
|
11
|
+
label.checkbox + :global(label.checkbox) {
|
|
12
|
+
margin-left: 0.7em;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,132 +1,131 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
"name": "svelteplot",
|
|
3
|
+
"version": "0.3.9",
|
|
4
|
+
"license": "ISC",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Gregor Aisch",
|
|
7
|
+
"email": "gka@users.noreply.github.com"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"svelte": "./dist/index.js"
|
|
8
13
|
},
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"build": "vite build",
|
|
12
|
-
"preview": "vite preview",
|
|
13
|
-
"test": "npm run test:unit",
|
|
14
|
-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
15
|
-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
16
|
-
"lint": "prettier --check src && eslint src",
|
|
17
|
-
"format": "prettier --write .",
|
|
18
|
-
"test:unit": "vitest",
|
|
19
|
-
"prepack": "npx svelte-package",
|
|
20
|
-
"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",
|
|
21
|
-
"docs": "npm run build && cd build && rsync --recursive . vis4.net:svelteplot/alpha0/",
|
|
22
|
-
"screenshots": "node screenshot-examples.js",
|
|
23
|
-
"check-js-extensions": "node scripts/check-js-extensions.js src"
|
|
14
|
+
"./*.js": {
|
|
15
|
+
"import": "./dist/*.js"
|
|
24
16
|
},
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"svelte": "./dist/index.js"
|
|
29
|
-
},
|
|
30
|
-
"./*.js": {
|
|
31
|
-
"import": "./dist/*.js"
|
|
32
|
-
},
|
|
33
|
-
"./*.svelte": {
|
|
34
|
-
"import": "./dist/*.svelte"
|
|
35
|
-
},
|
|
36
|
-
"./core/*.svelte": {
|
|
37
|
-
"import": "./dist/core/*.svelte"
|
|
38
|
-
},
|
|
39
|
-
"./marks/*.svelte": {
|
|
40
|
-
"import": "./dist/marks/*.svelte"
|
|
41
|
-
},
|
|
42
|
-
"./transforms": {
|
|
43
|
-
"import": "./dist/transforms/index.js"
|
|
44
|
-
}
|
|
17
|
+
"./*.svelte": {
|
|
18
|
+
"import": "./dist/*.svelte"
|
|
45
19
|
},
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
"dist",
|
|
49
|
-
"!dist/**/*.test.*",
|
|
50
|
-
"!dist/**/*.spec.*"
|
|
51
|
-
],
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@aitodotai/json-stringify-pretty-compact": "^1.3.0",
|
|
54
|
-
"@emotion/css": "^11.13.5",
|
|
55
|
-
"@sveltejs/adapter-auto": "^6.0.1",
|
|
56
|
-
"@sveltejs/adapter-static": "^3.0.8",
|
|
57
|
-
"@sveltejs/eslint-config": "^8.3.4",
|
|
58
|
-
"@sveltejs/kit": "^2.27.1",
|
|
59
|
-
"@sveltejs/package": "^2.4.0",
|
|
60
|
-
"@sveltejs/vite-plugin-svelte": "5.1.1",
|
|
61
|
-
"@sveltepress/theme-default": "^6.0.4",
|
|
62
|
-
"@sveltepress/twoslash": "^1.2.2",
|
|
63
|
-
"@sveltepress/vite": "^1.2.2",
|
|
64
|
-
"@testing-library/svelte": "^5.2.8",
|
|
65
|
-
"@testing-library/user-event": "^14.6.1",
|
|
66
|
-
"@types/d3-array": "^3.2.1",
|
|
67
|
-
"@types/d3-color": "^3.1.3",
|
|
68
|
-
"@types/d3-dsv": "^3.0.7",
|
|
69
|
-
"@types/d3-geo": "^3.1.0",
|
|
70
|
-
"@types/d3-interpolate": "^3.0.4",
|
|
71
|
-
"@types/d3-path": "^3.1.1",
|
|
72
|
-
"@types/d3-quadtree": "^3.0.6",
|
|
73
|
-
"@types/d3-random": "^3.0.3",
|
|
74
|
-
"@types/d3-scale": "^4.0.9",
|
|
75
|
-
"@types/d3-scale-chromatic": "^3.1.0",
|
|
76
|
-
"@types/d3-shape": "^3.1.7",
|
|
77
|
-
"@types/geojson": "^7946.0.16",
|
|
78
|
-
"@types/topojson": "^3.2.6",
|
|
79
|
-
"@types/topojson-client": "^3.1.5",
|
|
80
|
-
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
|
81
|
-
"@typescript-eslint/parser": "^8.39.0",
|
|
82
|
-
"csstype": "^3.1.3",
|
|
83
|
-
"d3-dsv": "^3.0.1",
|
|
84
|
-
"d3-fetch": "^3.0.1",
|
|
85
|
-
"d3-force": "^3.0.0",
|
|
86
|
-
"eslint": "^9.32.0",
|
|
87
|
-
"eslint-config-prettier": "^10.1.8",
|
|
88
|
-
"eslint-plugin-svelte": "3.11.0",
|
|
89
|
-
"jsdom": "^26.1.0",
|
|
90
|
-
"prettier": "^3.6.2",
|
|
91
|
-
"prettier-plugin-svelte": "^3.4.0",
|
|
92
|
-
"puppeteer": "^24.15.0",
|
|
93
|
-
"remark-code-extra": "^1.0.1",
|
|
94
|
-
"remark-code-frontmatter": "^1.0.0",
|
|
95
|
-
"resize-observer-polyfill": "^1.5.1",
|
|
96
|
-
"sass": "^1.90.0",
|
|
97
|
-
"svelte-check": "^4.3.1",
|
|
98
|
-
"svelte-eslint-parser": "1.3.1",
|
|
99
|
-
"svelte-highlight": "^7.8.3",
|
|
100
|
-
"svg-path-parser": "^1.1.0",
|
|
101
|
-
"topojson-client": "^3.1.0",
|
|
102
|
-
"ts-essentials": "^10.1.1",
|
|
103
|
-
"tslib": "^2.8.1",
|
|
104
|
-
"typedoc": "^0.28.9",
|
|
105
|
-
"typedoc-plugin-markdown": "^4.8.0",
|
|
106
|
-
"typescript": "^5.9.2",
|
|
107
|
-
"vite": "^6.3.5",
|
|
108
|
-
"vitest": "^3.2.4",
|
|
109
|
-
"vitest-matchmedia-mock": "^2.0.3"
|
|
20
|
+
"./core/*.svelte": {
|
|
21
|
+
"import": "./dist/core/*.svelte"
|
|
110
22
|
},
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"d3-format": "^3.1.0",
|
|
117
|
-
"d3-geo": "^3.1.1",
|
|
118
|
-
"d3-interpolate": "^3.0.1",
|
|
119
|
-
"d3-path": "^3.1.0",
|
|
120
|
-
"d3-quadtree": "^3.0.1",
|
|
121
|
-
"d3-random": "^3.0.1",
|
|
122
|
-
"d3-regression": "^1.3.10",
|
|
123
|
-
"d3-scale": "^4.0.2",
|
|
124
|
-
"d3-scale-chromatic": "^3.1.0",
|
|
125
|
-
"d3-shape": "^3.2.0",
|
|
126
|
-
"d3-time": "^3.1.0",
|
|
127
|
-
"es-toolkit": "^1.39.8",
|
|
128
|
-
"fast-equals": "^5.2.2",
|
|
129
|
-
"merge-deep": "^3.0.3",
|
|
130
|
-
"svelte": "5.37.3"
|
|
23
|
+
"./marks/*.svelte": {
|
|
24
|
+
"import": "./dist/marks/*.svelte"
|
|
25
|
+
},
|
|
26
|
+
"./transforms": {
|
|
27
|
+
"import": "./dist/transforms/index.js"
|
|
131
28
|
}
|
|
132
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"main": "./dist/index.js",
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"!dist/**/*.test.*",
|
|
34
|
+
"!dist/**/*.spec.*"
|
|
35
|
+
],
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@aitodotai/json-stringify-pretty-compact": "^1.3.0",
|
|
38
|
+
"@emotion/css": "^11.13.5",
|
|
39
|
+
"@sveltejs/adapter-auto": "^6.0.1",
|
|
40
|
+
"@sveltejs/adapter-static": "^3.0.8",
|
|
41
|
+
"@sveltejs/eslint-config": "^8.3.4",
|
|
42
|
+
"@sveltejs/kit": "^2.27.1",
|
|
43
|
+
"@sveltejs/package": "^2.4.0",
|
|
44
|
+
"@sveltejs/vite-plugin-svelte": "5.1.1",
|
|
45
|
+
"@sveltepress/theme-default": "^6.0.4",
|
|
46
|
+
"@sveltepress/twoslash": "^1.2.2",
|
|
47
|
+
"@sveltepress/vite": "^1.2.2",
|
|
48
|
+
"@testing-library/svelte": "^5.2.8",
|
|
49
|
+
"@testing-library/user-event": "^14.6.1",
|
|
50
|
+
"@types/d3-array": "^3.2.1",
|
|
51
|
+
"@types/d3-color": "^3.1.3",
|
|
52
|
+
"@types/d3-dsv": "^3.0.7",
|
|
53
|
+
"@types/d3-geo": "^3.1.0",
|
|
54
|
+
"@types/d3-interpolate": "^3.0.4",
|
|
55
|
+
"@types/d3-path": "^3.1.1",
|
|
56
|
+
"@types/d3-quadtree": "^3.0.6",
|
|
57
|
+
"@types/d3-random": "^3.0.3",
|
|
58
|
+
"@types/d3-scale": "^4.0.9",
|
|
59
|
+
"@types/d3-scale-chromatic": "^3.1.0",
|
|
60
|
+
"@types/d3-shape": "^3.1.7",
|
|
61
|
+
"@types/geojson": "^7946.0.16",
|
|
62
|
+
"@types/topojson": "^3.2.6",
|
|
63
|
+
"@types/topojson-client": "^3.1.5",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
|
65
|
+
"@typescript-eslint/parser": "^8.39.0",
|
|
66
|
+
"csstype": "^3.1.3",
|
|
67
|
+
"d3-dsv": "^3.0.1",
|
|
68
|
+
"d3-fetch": "^3.0.1",
|
|
69
|
+
"d3-force": "^3.0.0",
|
|
70
|
+
"eslint": "^9.32.0",
|
|
71
|
+
"eslint-config-prettier": "^10.1.8",
|
|
72
|
+
"eslint-plugin-svelte": "3.11.0",
|
|
73
|
+
"jsdom": "^26.1.0",
|
|
74
|
+
"prettier": "^3.6.2",
|
|
75
|
+
"prettier-plugin-svelte": "^3.4.0",
|
|
76
|
+
"puppeteer": "^24.15.0",
|
|
77
|
+
"remark-code-extra": "^1.0.1",
|
|
78
|
+
"remark-code-frontmatter": "^1.0.0",
|
|
79
|
+
"resize-observer-polyfill": "^1.5.1",
|
|
80
|
+
"sass": "^1.90.0",
|
|
81
|
+
"svelte-check": "^4.3.1",
|
|
82
|
+
"svelte-eslint-parser": "1.3.1",
|
|
83
|
+
"svelte-highlight": "^7.8.3",
|
|
84
|
+
"svg-path-parser": "^1.1.0",
|
|
85
|
+
"topojson-client": "^3.1.0",
|
|
86
|
+
"ts-essentials": "^10.1.1",
|
|
87
|
+
"tslib": "^2.8.1",
|
|
88
|
+
"typedoc": "^0.28.9",
|
|
89
|
+
"typedoc-plugin-markdown": "^4.8.0",
|
|
90
|
+
"typescript": "^5.9.2",
|
|
91
|
+
"vite": "^6.3.5",
|
|
92
|
+
"vitest": "^3.2.4",
|
|
93
|
+
"vitest-matchmedia-mock": "^2.0.3"
|
|
94
|
+
},
|
|
95
|
+
"types": "./dist/index.d.ts",
|
|
96
|
+
"type": "module",
|
|
97
|
+
"dependencies": {
|
|
98
|
+
"d3-array": "^3.2.4",
|
|
99
|
+
"d3-color": "^3.1.0",
|
|
100
|
+
"d3-format": "^3.1.0",
|
|
101
|
+
"d3-geo": "^3.1.1",
|
|
102
|
+
"d3-interpolate": "^3.0.1",
|
|
103
|
+
"d3-path": "^3.1.0",
|
|
104
|
+
"d3-quadtree": "^3.0.1",
|
|
105
|
+
"d3-random": "^3.0.1",
|
|
106
|
+
"d3-regression": "^1.3.10",
|
|
107
|
+
"d3-scale": "^4.0.2",
|
|
108
|
+
"d3-scale-chromatic": "^3.1.0",
|
|
109
|
+
"d3-shape": "^3.2.0",
|
|
110
|
+
"d3-time": "^3.1.0",
|
|
111
|
+
"es-toolkit": "^1.39.8",
|
|
112
|
+
"fast-equals": "^5.2.2",
|
|
113
|
+
"merge-deep": "^3.0.3",
|
|
114
|
+
"svelte": "5.37.3"
|
|
115
|
+
},
|
|
116
|
+
"scripts": {
|
|
117
|
+
"dev": "vite dev",
|
|
118
|
+
"build": "vite build",
|
|
119
|
+
"preview": "vite preview",
|
|
120
|
+
"test": "npm run test:unit",
|
|
121
|
+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
122
|
+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
123
|
+
"lint": "prettier --check src && eslint src",
|
|
124
|
+
"format": "prettier --write .",
|
|
125
|
+
"test:unit": "vitest",
|
|
126
|
+
"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",
|
|
127
|
+
"docs": "npm run build && cd build && rsync --recursive . vis4.net:svelteplot/alpha0/",
|
|
128
|
+
"screenshots": "node screenshot-examples.js",
|
|
129
|
+
"check-js-extensions": "node scripts/check-js-extensions.js src"
|
|
130
|
+
}
|
|
131
|
+
}
|