@swr-data-lab/components 2.5.0 → 2.5.2
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/maplibre/GeoJSONSource/GeoJSONSource.svelte +2 -2
- package/dist/maplibre/Source/MapSource.svelte +4 -1
- package/dist/maplibre/Source/MapSource.svelte.d.ts +1 -1
- package/dist/maplibre/VectorLayer/VectorLayer.svelte +1 -1
- package/dist/maplibre/VectorLayer/VectorLayer.svelte.d.ts +4 -4
- package/package.json +13 -13
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { default as NavigationControl } from "./maplibre/NavigationControl/Navig
|
|
|
18
18
|
export { default as ScaleControl } from "./maplibre/ScaleControl/ScaleControl.svelte";
|
|
19
19
|
export { default as VectorLayer } from "./maplibre/VectorLayer/VectorLayer.svelte";
|
|
20
20
|
export { default as VectorTileSource } from "./maplibre/VectorTileSource/VectorTileSource.svelte";
|
|
21
|
+
export { default as GeoJSONSource } from "./maplibre/GeoJSONSource/GeoJSONSource.svelte";
|
|
21
22
|
export { default as Tooltip } from "./maplibre/Tooltip/Tooltip.svelte";
|
|
22
23
|
export { default as WithLinkLocation } from "./maplibre/WithLinkLocation/WithLinkLocation.svelte";
|
|
23
24
|
export { default as FormLabel } from "./FormLabel/FormLabel.svelte";
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ export { default as NavigationControl } from './maplibre/NavigationControl/Navig
|
|
|
27
27
|
export { default as ScaleControl } from './maplibre/ScaleControl/ScaleControl.svelte';
|
|
28
28
|
export { default as VectorLayer } from './maplibre/VectorLayer/VectorLayer.svelte';
|
|
29
29
|
export { default as VectorTileSource } from './maplibre/VectorTileSource/VectorTileSource.svelte';
|
|
30
|
+
export { default as GeoJSONSource } from './maplibre/GeoJSONSource/GeoJSONSource.svelte';
|
|
30
31
|
export { default as Tooltip } from './maplibre/Tooltip/Tooltip.svelte';
|
|
31
32
|
export { default as WithLinkLocation } from './maplibre/WithLinkLocation/WithLinkLocation.svelte';
|
|
32
33
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
2
|
import { type Map, type SourceSpecification } from 'maplibre-gl';
|
|
3
|
-
type Source = maplibregl.VectorTileSource;
|
|
3
|
+
type Source = maplibregl.VectorTileSource | maplibregl.GeoJSONSource;
|
|
4
4
|
interface MapSourceProps {
|
|
5
5
|
id: string;
|
|
6
6
|
sourceSpec: SourceSpecification;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">import { getMapContext } from '../context.svelte.js';
|
|
2
2
|
import { onDestroy } from 'svelte';
|
|
3
3
|
import { resetLayerEventListener } from '../utils.js';
|
|
4
|
-
const { id, sourceId, sourceLayer, visible = true, placeBelow = 'label-place-
|
|
4
|
+
const { id, sourceId, sourceLayer, visible = true, placeBelow = 'label-place-major-city', type, paint, layout, hovered = $bindable(), selected = $bindable(), minZoom = 0, maxZoom = 24, onclick, onmousemove, onmouseleave } = $props();
|
|
5
5
|
const { map, styleLoaded } = $derived(getMapContext());
|
|
6
6
|
let beforeId = $state();
|
|
7
7
|
let prevSelected = $state();
|
|
@@ -4,7 +4,7 @@ interface VectorLayerProps {
|
|
|
4
4
|
sourceId: string;
|
|
5
5
|
sourceLayer?: string;
|
|
6
6
|
type: 'line' | 'fill' | 'circle' | 'symbol';
|
|
7
|
-
placeBelow
|
|
7
|
+
placeBelow?: string;
|
|
8
8
|
visible?: boolean;
|
|
9
9
|
minZoom?: number;
|
|
10
10
|
maxZoom?: number;
|
|
@@ -12,9 +12,9 @@ interface VectorLayerProps {
|
|
|
12
12
|
layout?: LineLayoutProps | FillLayoutProps | CircleLayoutProps | SymbolLayoutProps;
|
|
13
13
|
hovered?: MapGeoJSONFeature | undefined;
|
|
14
14
|
selected?: MapGeoJSONFeature | undefined;
|
|
15
|
-
onclick
|
|
16
|
-
onmousemove
|
|
17
|
-
onmouseleave
|
|
15
|
+
onclick?: (e: MapLayerMouseEvent) => any;
|
|
16
|
+
onmousemove?: (e: MapLayerMouseEvent) => any;
|
|
17
|
+
onmouseleave?: (e: MapLayerMouseEvent) => any;
|
|
18
18
|
}
|
|
19
19
|
declare const VectorLayer: import("svelte").Component<VectorLayerProps, {}, "hovered" | "selected">;
|
|
20
20
|
type VectorLayer = ReturnType<typeof VectorLayer>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swr-data-lab/components",
|
|
3
3
|
"description": "SWR Data Lab component library",
|
|
4
|
-
"version": "2.5.
|
|
4
|
+
"version": "2.5.2",
|
|
5
5
|
"author": "SWR Data Lab",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -32,40 +32,40 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@maplibre/maplibre-gl-geocoder": "^1.8.0",
|
|
35
|
-
"maplibre-gl": "^5.
|
|
35
|
+
"maplibre-gl": "^5.7.0",
|
|
36
36
|
"svelte-select": "^5.8.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@semantic-release/changelog": "^6.0.3",
|
|
40
40
|
"@semantic-release/git": "^10.0.1",
|
|
41
41
|
"@semantic-release/npm": "^12.0.2",
|
|
42
|
-
"@storybook/addon-docs": "^9.1.
|
|
43
|
-
"@storybook/addon-links": "^9.1.
|
|
44
|
-
"@storybook/addon-svelte-csf": "^5.0.
|
|
45
|
-
"@storybook/addon-vitest": "^9.1.
|
|
46
|
-
"@storybook/sveltekit": "^9.1.
|
|
42
|
+
"@storybook/addon-docs": "^9.1.4",
|
|
43
|
+
"@storybook/addon-links": "^9.1.4",
|
|
44
|
+
"@storybook/addon-svelte-csf": "^5.0.8",
|
|
45
|
+
"@storybook/addon-vitest": "^9.1.4",
|
|
46
|
+
"@storybook/sveltekit": "^9.1.4",
|
|
47
47
|
"@storybook/test-runner": "^0.23.0",
|
|
48
48
|
"@sveltejs/adapter-auto": "^6.0.1",
|
|
49
49
|
"@sveltejs/kit": "^2.27.0",
|
|
50
50
|
"@sveltejs/package": "^2.4.0",
|
|
51
51
|
"@sveltejs/vite-plugin-svelte": "^6.1.0",
|
|
52
52
|
"@types/geojson": "^7946.0.16",
|
|
53
|
-
"@versatiles/style": "^5.
|
|
53
|
+
"@versatiles/style": "^5.7.0",
|
|
54
54
|
"@vitest/browser": "^3.2.4",
|
|
55
55
|
"@vitest/coverage-v8": "^3.2.4",
|
|
56
|
-
"concurrently": "^9.2.
|
|
56
|
+
"concurrently": "^9.2.1",
|
|
57
57
|
"http-server": "^14.1.1",
|
|
58
58
|
"mdx-mermaid": "^2.0.3",
|
|
59
|
-
"playwright": "^1.
|
|
59
|
+
"playwright": "^1.55.0",
|
|
60
60
|
"publint": "^0.3.12",
|
|
61
|
-
"sass": "^1.
|
|
61
|
+
"sass": "^1.91.0",
|
|
62
62
|
"sass-embedded": "^1.89.2",
|
|
63
63
|
"semantic-release": "^24.2.7",
|
|
64
|
-
"storybook": "^9.1.
|
|
64
|
+
"storybook": "^9.1.4",
|
|
65
65
|
"svelte": "^5.23.0",
|
|
66
66
|
"svelte-check": "^4.0.0",
|
|
67
67
|
"svelte-preprocess": "^6.0.3",
|
|
68
|
-
"typescript": "^5.
|
|
68
|
+
"typescript": "^5.9.2",
|
|
69
69
|
"vite": "^6.0.0",
|
|
70
70
|
"vitest": "^3.1.1",
|
|
71
71
|
"wait-on": "^8.0.1"
|