@swr-data-lab/components 2.18.1 → 2.19.1
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.
|
@@ -4,7 +4,7 @@ import { createMapContext, MapContext } from '../context.svelte.js';
|
|
|
4
4
|
import {} from '../types';
|
|
5
5
|
import FallbackStyle from './FallbackStyle';
|
|
6
6
|
import { de } from './locale';
|
|
7
|
-
let { children, options, style = FallbackStyle, minZoom = 0, maxZoom = 14.99, zoom = $bindable(), center = $bindable(), pitch = $bindable(0), bearing = $bindable(0), loading = $bindable(true), projection = { type: 'mercator' }, allowRotation = false, allowZoom = true, showDebug = false, cursor, initialLocation: receivedInitialLocation,
|
|
7
|
+
let { children, options, style = FallbackStyle, minZoom = 0, maxZoom = 14.99, zoom = $bindable(), center = $bindable(), pitch = $bindable(0), bearing = $bindable(0), loading = $bindable(true), projection = { type: 'mercator' }, allowRotation = false, allowZoom = true, showDebug = false, cursor, initialBounds, maxBounds, initialLocation: receivedInitialLocation,
|
|
8
8
|
// Future: This should become bindable.readonly when that becomes
|
|
9
9
|
// available, see: https://github.com/sveltejs/svelte/issues/7712
|
|
10
10
|
mapContext = $bindable(), cooperativeGestures = false, onmoveend, onmovestart } = $props();
|
|
@@ -29,8 +29,10 @@ onMount(() => {
|
|
|
29
29
|
minZoom,
|
|
30
30
|
maxZoom,
|
|
31
31
|
bearing,
|
|
32
|
-
attributionControl: false,
|
|
32
|
+
attributionControl: false,
|
|
33
33
|
center: [initialLocation.lng, initialLocation.lat],
|
|
34
|
+
bounds: initialBounds || null,
|
|
35
|
+
maxBounds: maxBounds || null,
|
|
34
36
|
zoom: initialLocation.zoom,
|
|
35
37
|
pitch: initialLocation.pitch,
|
|
36
38
|
cooperativeGestures,
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import maplibre, { type MapLibreEvent, type ProjectionSpecification, type StyleSpecification } from 'maplibre-gl';
|
|
1
|
+
import maplibre, { type LngLatBoundsLike, type MapLibreEvent, type ProjectionSpecification, type StyleSpecification } from 'maplibre-gl';
|
|
2
2
|
import { type Snippet } from 'svelte';
|
|
3
3
|
import { MapContext } from '../context.svelte.js';
|
|
4
4
|
import { type Location } from '../types';
|
|
5
5
|
interface MapProps {
|
|
6
6
|
style?: StyleSpecification | string;
|
|
7
|
+
/**
|
|
8
|
+
* The initial bounds of the map. If specified, it overrides initialLocation.
|
|
9
|
+
*/
|
|
10
|
+
initialBounds?: LngLatBoundsLike;
|
|
11
|
+
maxBounds?: LngLatBoundsLike;
|
|
7
12
|
initialLocation?: Location;
|
|
8
13
|
allowRotation?: boolean;
|
|
9
14
|
allowZoom?: boolean;
|
|
@@ -15,9 +15,9 @@ const tokens = {
|
|
|
15
15
|
[10, '#1e1f22']
|
|
16
16
|
]
|
|
17
17
|
},
|
|
18
|
-
water: 'hsl(210, 12%,
|
|
18
|
+
water: 'hsl(210, 12%, 7%)',
|
|
19
19
|
water_light: 'hsl(210, 12%, 8%)',
|
|
20
|
-
water_ocean: 'hsl(214,
|
|
20
|
+
water_ocean: 'hsl(214, 25%, 7%)',
|
|
21
21
|
marsh: 'hsl(180, 3%, 35%)',
|
|
22
22
|
grass: 'hsl(170, 20%, 14%)',
|
|
23
23
|
grass_dark: 'hsl(170, 16%, 12%)',
|
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.
|
|
4
|
+
"version": "2.19.1",
|
|
5
5
|
"author": "SWR Data Lab",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"svelte": ">=5.0.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@maplibre/maplibre-gl-geocoder": "^1.
|
|
34
|
+
"@maplibre/maplibre-gl-geocoder": "^1.9.1",
|
|
35
35
|
"maplibre-gl": "^5.7.0",
|
|
36
36
|
"svelte-select": "^5.8.3"
|
|
37
37
|
},
|