@swr-data-lab/components 2.18.0 → 2.19.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.
|
@@ -41,6 +41,7 @@ let { project, charts, baseUrl } = $props();
|
|
|
41
41
|
flex-flow: column;
|
|
42
42
|
font-family: var(--swr-sans);
|
|
43
43
|
font-size: var(--fs-small-1);
|
|
44
|
+
color: var(--color-textPrimary);
|
|
44
45
|
max-width: 40rem;
|
|
45
46
|
margin: 0 auto;
|
|
46
47
|
height: 90vh;
|
|
@@ -52,17 +53,18 @@ main * {
|
|
|
52
53
|
|
|
53
54
|
.inner {
|
|
54
55
|
width: 100%;
|
|
55
|
-
|
|
56
|
+
background: var(--color-surfaceFill);
|
|
57
|
+
border: 1px solid var(--color-surfaceBorder);
|
|
56
58
|
}
|
|
57
59
|
|
|
58
60
|
h1 {
|
|
59
61
|
font-size: var(--fs-base);
|
|
60
|
-
border-bottom: 1px solid
|
|
62
|
+
border-bottom: 1px solid var(--color-textSecondary);
|
|
61
63
|
padding-bottom: 0.2em;
|
|
62
|
-
background-color:
|
|
64
|
+
background-color: rgba(0, 0, 0, 0.2);
|
|
63
65
|
}
|
|
64
66
|
h1 em {
|
|
65
|
-
background:
|
|
67
|
+
background: rgba(134, 139, 84, 0.4);
|
|
66
68
|
font-style: normal;
|
|
67
69
|
padding: 0 0.3em;
|
|
68
70
|
border-radius: 2px;
|
|
@@ -88,11 +90,11 @@ h1 {
|
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
th {
|
|
91
|
-
border-bottom: 1px solid
|
|
93
|
+
border-bottom: 1px solid var(--color-textSecondary);
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
tr {
|
|
95
|
-
border-bottom: 1px solid
|
|
97
|
+
border-bottom: 1px solid var(--color-surfaceBorder);
|
|
96
98
|
}
|
|
97
99
|
tr:last-child {
|
|
98
100
|
border-bottom: 0;
|
|
@@ -102,8 +104,11 @@ input {
|
|
|
102
104
|
display: block;
|
|
103
105
|
font-family: monospace;
|
|
104
106
|
width: calc(100% - 0.6em);
|
|
105
|
-
padding: 0.
|
|
106
|
-
font-size:
|
|
107
|
+
padding: 0.2em 0.4em;
|
|
108
|
+
font-size: 0.9rem;
|
|
109
|
+
background: var(--color-pageFill);
|
|
110
|
+
border: 1px solid var(--color-surfaceBorder);
|
|
111
|
+
color: var(--color-textSecondary);
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
a:hover,
|
|
@@ -117,5 +122,6 @@ a:last-child {
|
|
|
117
122
|
|
|
118
123
|
.notes {
|
|
119
124
|
margin-top: 0.5em;
|
|
125
|
+
color: var(--color-textSecondary);
|
|
120
126
|
font-size: var(--fs-small-2);
|
|
121
127
|
}</style>
|
|
@@ -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;
|
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.0",
|
|
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
|
},
|