@swr-data-lab/components 1.13.8 → 1.13.11
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/maplibre/AttributionControl/AttributionControl.svelte +22 -1
- package/dist/maplibre/AttributionControl/AttributionControl.svelte.d.ts +0 -1
- package/dist/maplibre/GeocoderControl/GeocoderControl.svelte +130 -1
- package/dist/maplibre/GeocoderControl/GeocoderControl.svelte.d.ts +0 -1
- package/dist/maplibre/Map/Map.svelte +0 -1
- package/dist/maplibre/Map/Map.svelte.d.ts +0 -1
- package/dist/maplibre/NavigationControl/NavigationControl.svelte +10 -1
- package/dist/maplibre/NavigationControl/NavigationControl.svelte.d.ts +0 -1
- package/dist/maplibre/ScaleControl/ScaleControl.svelte +8 -1
- package/dist/maplibre/ScaleControl/ScaleControl.svelte.d.ts +0 -1
- package/dist/maplibre/Tooltip/Tooltip.svelte +84 -1
- package/dist/maplibre/Tooltip/Tooltip.svelte.d.ts +0 -1
- package/package.json +14 -15
- package/dist/maplibre/AttributionControl/AttributionControl.css +0 -22
- package/dist/maplibre/GeocoderControl/GeocoderControl.css +0 -144
- package/dist/maplibre/Map/Map.css +0 -153
- package/dist/maplibre/NavigationControl/NavigationControl.css +0 -11
- package/dist/maplibre/ScaleControl/ScaleControl.css +0 -7
- package/dist/maplibre/Tooltip/Tooltip.css +0 -96
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script lang="ts">import maplibre, {} from 'maplibre-gl';
|
|
2
2
|
import MapControl from '../MapControl/MapControl.svelte';
|
|
3
|
-
import './AttributionControl.css';
|
|
4
3
|
const { position = 'bottom-right', customAttribution } = $props();
|
|
5
4
|
</script>
|
|
6
5
|
|
|
@@ -11,3 +10,25 @@ const { position = 'bottom-right', customAttribution } = $props();
|
|
|
11
10
|
compact: false
|
|
12
11
|
})}
|
|
13
12
|
/>
|
|
13
|
+
|
|
14
|
+
<style>:global(.maplibregl-ctrl.maplibregl-ctrl-attrib) {
|
|
15
|
+
font-size: var(--fs-small-3);
|
|
16
|
+
letter-spacing: 0.005em;
|
|
17
|
+
word-spacing: 0.005em;
|
|
18
|
+
font-family: var(--swr-sans);
|
|
19
|
+
}
|
|
20
|
+
:global(.maplibregl-ctrl-attrib.maplibregl-compact-show) :global(.maplibregl-ctrl-attrib-inner) {
|
|
21
|
+
display: block;
|
|
22
|
+
}
|
|
23
|
+
:global(.maplibregl-ctrl-attrib-button) {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
:global(.maplibregl-ctrl-attrib) :global(a) {
|
|
27
|
+
color: inherit;
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
text-underline-offset: 0.2em;
|
|
30
|
+
}
|
|
31
|
+
:global(.maplibregl-ctrl-attrib) :global(a:hover) {
|
|
32
|
+
color: inherit;
|
|
33
|
+
text-decoration: underline;
|
|
34
|
+
}</style>
|
|
@@ -3,7 +3,6 @@ import MaplibreGeocoder, {} from '@maplibre/maplibre-gl-geocoder';
|
|
|
3
3
|
import { MaptilerGeocoderAPI } from './GeocoderAPIs';
|
|
4
4
|
import MapControl from '../MapControl/MapControl.svelte';
|
|
5
5
|
import {} from '../types';
|
|
6
|
-
import './GeocoderControl.css';
|
|
7
6
|
const { key, service = 'maptiler', countries = 'de', languages = 'en', placeholder, limit = 3 } = $props();
|
|
8
7
|
const countriesArr = Array.isArray(countries) ? countries : [countries];
|
|
9
8
|
const languagesArr = Array.isArray(languages) ? languages : [languages];
|
|
@@ -22,3 +21,133 @@ const geocoder = new MaplibreGeocoder(geocoderAPI, {
|
|
|
22
21
|
</script>
|
|
23
22
|
|
|
24
23
|
<MapControl control={geocoder} position="top-left" />
|
|
24
|
+
|
|
25
|
+
<style>:global(.maplibregl-ctrl-geocoder) {
|
|
26
|
+
background-color: #fff;
|
|
27
|
+
position: relative;
|
|
28
|
+
width: 100%;
|
|
29
|
+
z-index: 1;
|
|
30
|
+
font-family: var(--swr-sans);
|
|
31
|
+
font-size: var(--fs-small-1);
|
|
32
|
+
border-radius: var(--br-small);
|
|
33
|
+
border: 1px solid rgba(0, 0, 0, 0.75);
|
|
34
|
+
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.075);
|
|
35
|
+
}
|
|
36
|
+
:global(.maplibre-gl-geocoder--error) {
|
|
37
|
+
font-size: var(--fs-small-2);
|
|
38
|
+
color: var(--gray-dark-2);
|
|
39
|
+
padding: 0.4em 0.65em;
|
|
40
|
+
}
|
|
41
|
+
:global(.maplibregl-ctrl-geocoder--input) {
|
|
42
|
+
width: calc(100% - 3.7em);
|
|
43
|
+
height: 100%;
|
|
44
|
+
font-family: inherit;
|
|
45
|
+
font-size: inherit;
|
|
46
|
+
background-color: transparent;
|
|
47
|
+
color: var(--gray-dark-5);
|
|
48
|
+
border: 0;
|
|
49
|
+
height: 1.85em;
|
|
50
|
+
padding: 0 1.85em;
|
|
51
|
+
padding-top: 0.1em;
|
|
52
|
+
text-overflow: ellipsis;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
}
|
|
56
|
+
:global(.maplibregl-ctrl-geocoder--input::placeholder) {
|
|
57
|
+
opacity: 1;
|
|
58
|
+
color: var(--gray-dark-2);
|
|
59
|
+
}
|
|
60
|
+
:global(.maplibregl-ctrl-geocoder--input:focus) {
|
|
61
|
+
color: var(--gray-dark-5);
|
|
62
|
+
outline: 0;
|
|
63
|
+
}
|
|
64
|
+
:global(.maplibregl-ctrl-geocoder) :global(.maplibregl-ctrl-geocoder--pin-right) > :global(*) {
|
|
65
|
+
display: none;
|
|
66
|
+
position: absolute;
|
|
67
|
+
z-index: 2;
|
|
68
|
+
right: 0.5em;
|
|
69
|
+
top: 50%;
|
|
70
|
+
transform: translateY(-50%);
|
|
71
|
+
border: 0;
|
|
72
|
+
}
|
|
73
|
+
:global(.maplibregl-ctrl-geocoder) :global(.suggestions) {
|
|
74
|
+
background: white;
|
|
75
|
+
border: 1px solid rgba(0, 0, 0, 0.75);
|
|
76
|
+
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
|
|
77
|
+
border-radius: var(--br-small);
|
|
78
|
+
left: 0;
|
|
79
|
+
list-style: none;
|
|
80
|
+
position: absolute;
|
|
81
|
+
width: 100%;
|
|
82
|
+
top: calc(100% + 0.5em);
|
|
83
|
+
z-index: 1000;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
}
|
|
86
|
+
:global(.maplibregl-ctrl-bottom-left) :global(.suggestions),
|
|
87
|
+
:global(.maplibregl-ctrl-bottom-right) :global(.suggestions) {
|
|
88
|
+
top: auto;
|
|
89
|
+
bottom: 100%;
|
|
90
|
+
}
|
|
91
|
+
:global(.maplibregl-ctrl-geocoder) :global(.suggestions) > :global(li) > :global(a) {
|
|
92
|
+
cursor: default;
|
|
93
|
+
display: block;
|
|
94
|
+
padding: 0.5em 0.75em;
|
|
95
|
+
color: var(--gray-dark-5);
|
|
96
|
+
padding-bottom: 0.5em;
|
|
97
|
+
border-bottom: 1px solid var(--gray-light-3);
|
|
98
|
+
}
|
|
99
|
+
:global(.maplibregl-ctrl-geocoder) :global(.suggestions) > :global(li:last-child) > :global(a) {
|
|
100
|
+
border-bottom: 0;
|
|
101
|
+
}
|
|
102
|
+
:global(.maplibregl-ctrl-geocoder) :global(.suggestions) > :global(.active) > :global(a),
|
|
103
|
+
:global(.maplibregl-ctrl-geocoder) :global(.suggestions) > :global(li) > :global(a:hover) {
|
|
104
|
+
background: var(--gray-light-5);
|
|
105
|
+
text-decoration: none;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
108
|
+
:global(.maplibregl-ctrl-geocoder) :global(.suggestions) > :global(.active) :global(.maplibregl-ctrl-geocoder--result-title),
|
|
109
|
+
:global(.maplibregl-ctrl-geocoder) :global(.suggestions) > :global(li) > :global(a:hover) :global(.maplibregl-ctrl-geocoder--result-title) {
|
|
110
|
+
text-decoration: underline;
|
|
111
|
+
}
|
|
112
|
+
:global(.maplibregl-ctrl-geocoder--suggestion) {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-direction: row;
|
|
115
|
+
align-items: center;
|
|
116
|
+
}
|
|
117
|
+
:global(.maplibregl-ctrl-geocoder--suggestion-info) {
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-direction: column;
|
|
120
|
+
}
|
|
121
|
+
:global(.maplibregl-ctrl-geocoder--suggestion-title),
|
|
122
|
+
:global(.maplibregl-ctrl-geocoder--suggestion-address),
|
|
123
|
+
:global(.maplibregl-ctrl-geocoder--result-address) {
|
|
124
|
+
text-overflow: ellipsis;
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
}
|
|
128
|
+
:global(.maplibregl-ctrl-geocoder--result-icon) {
|
|
129
|
+
display: none;
|
|
130
|
+
}
|
|
131
|
+
:global(.maplibregl-ctrl-geocoder--result-title) {
|
|
132
|
+
font-weight: 600;
|
|
133
|
+
letter-spacing: 0;
|
|
134
|
+
}
|
|
135
|
+
:global(.maplibregl-ctrl-geocoder--result-address) {
|
|
136
|
+
font-size: var(--fs-small-2);
|
|
137
|
+
color: var(--gray-dark-2);
|
|
138
|
+
line-height: 1.3;
|
|
139
|
+
}
|
|
140
|
+
:global(.maplibregl-ctrl-geocoder--icon) {
|
|
141
|
+
display: inline-block;
|
|
142
|
+
position: absolute;
|
|
143
|
+
top: 50%;
|
|
144
|
+
transform: translateY(-50%);
|
|
145
|
+
height: 1em;
|
|
146
|
+
}
|
|
147
|
+
:global(.maplibregl-ctrl-geocoder--icon-close) {
|
|
148
|
+
right: 0;
|
|
149
|
+
}
|
|
150
|
+
:global(.maplibregl-ctrl-geocoder--icon-search) {
|
|
151
|
+
left: 0.5em;
|
|
152
|
+
height: 1.5em;
|
|
153
|
+
}</style>
|
|
@@ -3,7 +3,6 @@ import { onMount, onDestroy, getContext, hasContext } from 'svelte';
|
|
|
3
3
|
import { createMapContext } from '../context.svelte.js';
|
|
4
4
|
import {} from '../types';
|
|
5
5
|
import FallbackStyle from './FallbackStyle';
|
|
6
|
-
import './Map.css';
|
|
7
6
|
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, initialLocation = { lat: 51.3, lng: 10.2, zoom: 5 } } = $props();
|
|
8
7
|
let container;
|
|
9
8
|
const mapContext = createMapContext();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import maplibre, { type ProjectionSpecification, type StyleSpecification } from 'maplibre-gl';
|
|
2
2
|
import { type Snippet } from 'svelte';
|
|
3
3
|
import { type Location } from '../types';
|
|
4
|
-
import './Map.css';
|
|
5
4
|
interface MapProps {
|
|
6
5
|
style?: StyleSpecification | string;
|
|
7
6
|
initialLocation?: Location;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
<script lang="ts">import maplibre, {} from 'maplibre-gl';
|
|
2
2
|
import MapControl from '../MapControl/MapControl.svelte';
|
|
3
|
-
import './NavigationControl.css';
|
|
4
3
|
const { showCompass = false, visualizePitch = false, position = 'bottom-left' } = $props();
|
|
5
4
|
</script>
|
|
6
5
|
|
|
7
6
|
<MapControl control={new maplibre.NavigationControl({ showCompass, visualizePitch })} {position} />
|
|
7
|
+
|
|
8
|
+
<style>:global(button.maplibregl-ctrl-zoom-out) :global(.maplibregl-ctrl-icon) {
|
|
9
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E");
|
|
10
|
+
}
|
|
11
|
+
:global(button.maplibregl-ctrl-zoom-in) :global(.maplibregl-ctrl-icon) {
|
|
12
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E");
|
|
13
|
+
}
|
|
14
|
+
:global(button.maplibregl-ctrl-compass) :global(.maplibregl-ctrl-icon) {
|
|
15
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath d='m10.5 16 4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E");
|
|
16
|
+
}</style>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
<script lang="ts">import maplibre, {} from 'maplibre-gl';
|
|
2
2
|
import MapControl from '../MapControl/MapControl.svelte';
|
|
3
|
-
import './ScaleControl.css';
|
|
4
3
|
let { maxWidth = 100, unit = 'metric', position = 'bottom-left' } = $props();
|
|
5
4
|
</script>
|
|
6
5
|
|
|
7
6
|
<MapControl control={new maplibre.ScaleControl({ maxWidth, unit })} {position} />
|
|
7
|
+
|
|
8
|
+
<style>.maplibregl-ctrl-scale {
|
|
9
|
+
color: inherit;
|
|
10
|
+
border-bottom: 1px solid currentColor;
|
|
11
|
+
font-weight: 400;
|
|
12
|
+
font-size: var(--fs-small-3);
|
|
13
|
+
font-family: var(--swr-text);
|
|
14
|
+
}</style>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import maplibre, {} from 'maplibre-gl';
|
|
3
3
|
import { getMapContext } from '../context.svelte.js';
|
|
4
4
|
import { resetPopupEventListener } from '../utils';
|
|
5
|
-
import './Tooltip.css';
|
|
6
5
|
let { position, children, offset = 20, maxWidth = 360, showCloseButton = false, closeOnClick = true, mouseEvents = false, onClose, onOpen } = $props();
|
|
7
6
|
const { map } = $derived(getMapContext());
|
|
8
7
|
let tooltip = new maplibre.Popup({
|
|
@@ -42,4 +41,88 @@ onDestroy(() => tooltip.remove());
|
|
|
42
41
|
|
|
43
42
|
.mouseEvents {
|
|
44
43
|
pointer-events: all;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:global(.maplibregl-popup) {
|
|
47
|
+
top: 0;
|
|
48
|
+
left: 0;
|
|
49
|
+
display: flex;
|
|
50
|
+
position: absolute;
|
|
51
|
+
will-change: transform;
|
|
52
|
+
}
|
|
53
|
+
:global(.maplibregl-popup-anchor-top),
|
|
54
|
+
:global(.maplibregl-popup-anchor-top-left),
|
|
55
|
+
:global(.maplibregl-popup-anchor-top-right) {
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
}
|
|
58
|
+
:global(.maplibregl-popup-anchor-bottom),
|
|
59
|
+
:global(.maplibregl-popup-anchor-bottom-left),
|
|
60
|
+
:global(.maplibregl-popup-anchor-bottom-right) {
|
|
61
|
+
flex-direction: column-reverse;
|
|
62
|
+
}
|
|
63
|
+
:global(.maplibregl-popup-anchor-left) {
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
}
|
|
66
|
+
:global(.maplibregl-popup-anchor-right) {
|
|
67
|
+
flex-direction: row-reverse;
|
|
68
|
+
}
|
|
69
|
+
:global(.maplibregl-popup-anchor-bottom) :global(.maplibregl-popup-tip) {
|
|
70
|
+
transform: translateY(50%) rotate(45deg);
|
|
71
|
+
align-self: center;
|
|
72
|
+
}
|
|
73
|
+
:global(.maplibregl-popup-anchor-top) :global(.maplibregl-popup-tip) {
|
|
74
|
+
transform: translateY(-50%) rotate(-135deg);
|
|
75
|
+
align-self: center;
|
|
76
|
+
}
|
|
77
|
+
:global(.maplibregl-popup-anchor-left) :global(.maplibregl-popup-tip) {
|
|
78
|
+
transform: translateX(-50%) rotate(135deg);
|
|
79
|
+
align-self: center;
|
|
80
|
+
}
|
|
81
|
+
:global(.maplibregl-popup-anchor-top-left) :global(.maplibregl-popup-tip) {
|
|
82
|
+
transform: translateY(1em) translateX(-50%) rotate(135deg);
|
|
83
|
+
}
|
|
84
|
+
:global(.maplibregl-popup-anchor-bottom-left) :global(.maplibregl-popup-tip) {
|
|
85
|
+
transform: translateY(-1em) translateX(-50%) rotate(135deg);
|
|
86
|
+
}
|
|
87
|
+
:global(.maplibregl-popup-anchor-right) :global(.maplibregl-popup-tip) {
|
|
88
|
+
transform: translateX(50%) rotate(-45deg);
|
|
89
|
+
align-self: center;
|
|
90
|
+
}
|
|
91
|
+
:global(.maplibregl-popup-anchor-top-right) :global(.maplibregl-popup-tip) {
|
|
92
|
+
transform: translateX(-1em) translateY(-50%) rotate(-135deg);
|
|
93
|
+
align-self: flex-end;
|
|
94
|
+
}
|
|
95
|
+
:global(.maplibregl-popup-anchor-bottom-right) :global(.maplibregl-popup-tip) {
|
|
96
|
+
transform: translateX(-1em) translateY(50%) rotate(45deg);
|
|
97
|
+
align-self: flex-end;
|
|
98
|
+
}
|
|
99
|
+
:global(.maplibregl-popup-close-button) {
|
|
100
|
+
position: absolute;
|
|
101
|
+
top: 0.5em;
|
|
102
|
+
right: 0.5em;
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
border-radius: 2px;
|
|
105
|
+
display: flex;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
align-items: center;
|
|
108
|
+
padding-bottom: 0.15em;
|
|
109
|
+
font-size: 1.25rem;
|
|
110
|
+
width: 1.1em;
|
|
111
|
+
height: 1.1em;
|
|
112
|
+
z-index: 100;
|
|
113
|
+
background: white;
|
|
114
|
+
border: 1px solid var(--gray-dark-5);
|
|
115
|
+
}
|
|
116
|
+
:global(.maplibregl-popup-close-button:hover),
|
|
117
|
+
:global(.maplibregl-popup-close-button:focus) {
|
|
118
|
+
background: var(--gray-light-5);
|
|
119
|
+
}
|
|
120
|
+
:global(.maplibregl-popup-tip) {
|
|
121
|
+
width: 0.65rem;
|
|
122
|
+
height: 0.65rem;
|
|
123
|
+
background: white;
|
|
124
|
+
position: absolute;
|
|
125
|
+
border-right: 1px solid rgba(0, 0, 0, 0.75);
|
|
126
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.75);
|
|
127
|
+
z-index: 10;
|
|
45
128
|
}</style>
|
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": "1.13.
|
|
4
|
+
"version": "1.13.11",
|
|
5
5
|
"author": "SWR Data Lab",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|
|
@@ -36,35 +36,34 @@
|
|
|
36
36
|
"svelte-select": "^5.8.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@chromatic-com/storybook": "^4.0.0-next.6",
|
|
40
39
|
"@semantic-release/changelog": "^6.0.3",
|
|
41
40
|
"@semantic-release/git": "^10.0.1",
|
|
42
41
|
"@semantic-release/npm": "^12.0.1",
|
|
43
|
-
"@storybook/addon-docs": "^9.0.
|
|
44
|
-
"@storybook/addon-links": "^9.0.
|
|
45
|
-
"@storybook/addon-svelte-csf": "^5.0.
|
|
46
|
-
"@storybook/addon-vitest": "^9.0.
|
|
47
|
-
"@storybook/sveltekit": "^9.0.
|
|
48
|
-
"@storybook/test-runner": "^0.
|
|
49
|
-
"@sveltejs/adapter-auto": "^
|
|
42
|
+
"@storybook/addon-docs": "^9.0.3",
|
|
43
|
+
"@storybook/addon-links": "^9.0.3",
|
|
44
|
+
"@storybook/addon-svelte-csf": "^5.0.3",
|
|
45
|
+
"@storybook/addon-vitest": "^9.0.3",
|
|
46
|
+
"@storybook/sveltekit": "^9.0.3",
|
|
47
|
+
"@storybook/test-runner": "^0.22.0",
|
|
48
|
+
"@sveltejs/adapter-auto": "^6.0.1",
|
|
50
49
|
"@sveltejs/kit": "^2.0.0",
|
|
51
50
|
"@sveltejs/package": "^2.3.11",
|
|
52
51
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
53
52
|
"@versatiles/style": "^5.6.0",
|
|
54
|
-
"@vitest/browser": "^3.1.
|
|
55
|
-
"@vitest/coverage-v8": "^3.1.
|
|
53
|
+
"@vitest/browser": "^3.1.4",
|
|
54
|
+
"@vitest/coverage-v8": "^3.1.4",
|
|
56
55
|
"concurrently": "^9.0.1",
|
|
57
56
|
"http-server": "^14.1.1",
|
|
58
57
|
"mdx-mermaid": "^2.0.3",
|
|
59
58
|
"playwright": "^1.51.1",
|
|
60
59
|
"publint": "^0.3.12",
|
|
61
|
-
"sass": "^1.89.
|
|
60
|
+
"sass": "^1.89.1",
|
|
62
61
|
"sass-embedded": "^1.89.0",
|
|
63
|
-
"semantic-release": "^24.
|
|
64
|
-
"storybook": "^9.0.0
|
|
62
|
+
"semantic-release": "^24.2.5",
|
|
63
|
+
"storybook": "^9.0.0",
|
|
64
|
+
"svelte-preprocess": "^6.0.3",
|
|
65
65
|
"svelte": "^5.23.0",
|
|
66
66
|
"svelte-check": "^4.0.0",
|
|
67
|
-
"svelte-preprocess": "^6.0.3",
|
|
68
67
|
"typescript": "^5.8.3",
|
|
69
68
|
"vite": "^6.0.0",
|
|
70
69
|
"vitest": "^3.1.1",
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.maplibregl-ctrl.maplibregl-ctrl-attrib {
|
|
2
|
-
font-size: var(--fs-small-3);
|
|
3
|
-
letter-spacing: 0.005em;
|
|
4
|
-
word-spacing: 0.005em;
|
|
5
|
-
font-family: var(--swr-sans);
|
|
6
|
-
}
|
|
7
|
-
.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner {
|
|
8
|
-
display: block;
|
|
9
|
-
}
|
|
10
|
-
.maplibregl-ctrl-attrib-button {
|
|
11
|
-
display: none;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.maplibregl-ctrl-attrib a {
|
|
15
|
-
color: inherit;
|
|
16
|
-
text-decoration: none;
|
|
17
|
-
text-underline-offset: 0.2em;
|
|
18
|
-
}
|
|
19
|
-
.maplibregl-ctrl-attrib a:hover {
|
|
20
|
-
color: inherit;
|
|
21
|
-
text-decoration: underline;
|
|
22
|
-
}
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
.maplibregl-ctrl-geocoder {
|
|
2
|
-
background-color: #fff;
|
|
3
|
-
position: relative;
|
|
4
|
-
width: 100%;
|
|
5
|
-
z-index: 1;
|
|
6
|
-
font-family: var(--swr-sans);
|
|
7
|
-
font-size: var(--fs-small-1);
|
|
8
|
-
border-radius: var(--br-small);
|
|
9
|
-
border: 1px solid rgba(0, 0, 0, 0.75);
|
|
10
|
-
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.075);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.maplibre-gl-geocoder--error {
|
|
14
|
-
font-size: var(--fs-small-2);
|
|
15
|
-
color: var(--gray-dark-2);
|
|
16
|
-
padding: 0.4em 0.65em;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.maplibregl-ctrl-geocoder--input {
|
|
20
|
-
width: calc(100% - 3.7em);
|
|
21
|
-
height: 100%;
|
|
22
|
-
font-family: inherit;
|
|
23
|
-
font-size: inherit;
|
|
24
|
-
background-color: transparent;
|
|
25
|
-
color: var(--gray-dark-5);
|
|
26
|
-
border: 0;
|
|
27
|
-
height: 1.85em;
|
|
28
|
-
padding: 0 1.85em;
|
|
29
|
-
padding-top: 0.1em;
|
|
30
|
-
text-overflow: ellipsis;
|
|
31
|
-
white-space: nowrap;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.maplibregl-ctrl-geocoder--input::placeholder {
|
|
36
|
-
opacity: 1;
|
|
37
|
-
color: var(--gray-dark-2);
|
|
38
|
-
}
|
|
39
|
-
.maplibregl-ctrl-geocoder--input:focus {
|
|
40
|
-
color: var(--gray-dark-5);
|
|
41
|
-
outline: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.maplibregl-ctrl-geocoder .maplibregl-ctrl-geocoder--pin-right > * {
|
|
45
|
-
display: none;
|
|
46
|
-
position: absolute;
|
|
47
|
-
z-index: 2;
|
|
48
|
-
right: 0.5em;
|
|
49
|
-
top: 50%;
|
|
50
|
-
transform: translateY(-50%);
|
|
51
|
-
border: 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* Suggestions */
|
|
55
|
-
.maplibregl-ctrl-geocoder .suggestions {
|
|
56
|
-
background: white;
|
|
57
|
-
border: 1px solid rgba(0, 0, 0, 0.75);
|
|
58
|
-
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
|
|
59
|
-
border-radius: var(--br-small);
|
|
60
|
-
left: 0;
|
|
61
|
-
list-style: none;
|
|
62
|
-
position: absolute;
|
|
63
|
-
width: 100%;
|
|
64
|
-
top: calc(100% + 0.5em);
|
|
65
|
-
z-index: 1000;
|
|
66
|
-
overflow: hidden;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.maplibregl-ctrl-bottom-left .suggestions,
|
|
70
|
-
.maplibregl-ctrl-bottom-right .suggestions {
|
|
71
|
-
top: auto;
|
|
72
|
-
bottom: 100%;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.maplibregl-ctrl-geocoder .suggestions > li > a {
|
|
76
|
-
cursor: default;
|
|
77
|
-
display: block;
|
|
78
|
-
padding: 0.5em 0.75em;
|
|
79
|
-
color: var(--gray-dark-5);
|
|
80
|
-
padding-bottom: 0.5em;
|
|
81
|
-
border-bottom: 1px solid var(--gray-light-3);
|
|
82
|
-
}
|
|
83
|
-
.maplibregl-ctrl-geocoder .suggestions > li:last-child > a {
|
|
84
|
-
border-bottom: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.maplibregl-ctrl-geocoder .suggestions > .active > a,
|
|
88
|
-
.maplibregl-ctrl-geocoder .suggestions > li > a:hover {
|
|
89
|
-
background: var(--gray-light-5);
|
|
90
|
-
text-decoration: none;
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
}
|
|
93
|
-
.maplibregl-ctrl-geocoder .suggestions > .active .maplibregl-ctrl-geocoder--result-title,
|
|
94
|
-
.maplibregl-ctrl-geocoder .suggestions > li > a:hover .maplibregl-ctrl-geocoder--result-title {
|
|
95
|
-
text-decoration: underline;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.maplibregl-ctrl-geocoder--suggestion {
|
|
99
|
-
display: flex;
|
|
100
|
-
flex-direction: row;
|
|
101
|
-
align-items: center;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.maplibregl-ctrl-geocoder--suggestion-info {
|
|
105
|
-
display: flex;
|
|
106
|
-
flex-direction: column;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.maplibregl-ctrl-geocoder--suggestion-title,
|
|
110
|
-
.maplibregl-ctrl-geocoder--suggestion-address,
|
|
111
|
-
.maplibregl-ctrl-geocoder--result-address {
|
|
112
|
-
text-overflow: ellipsis;
|
|
113
|
-
overflow: hidden;
|
|
114
|
-
white-space: nowrap;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.maplibregl-ctrl-geocoder--result-icon {
|
|
118
|
-
display: none;
|
|
119
|
-
}
|
|
120
|
-
.maplibregl-ctrl-geocoder--result-title {
|
|
121
|
-
font-weight: 600;
|
|
122
|
-
letter-spacing: 0;
|
|
123
|
-
}
|
|
124
|
-
.maplibregl-ctrl-geocoder--result-address {
|
|
125
|
-
font-size: var(--fs-small-2);
|
|
126
|
-
color: var(--gray-dark-2);
|
|
127
|
-
line-height: 1.3;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.maplibregl-ctrl-geocoder--icon {
|
|
131
|
-
display: inline-block;
|
|
132
|
-
position: absolute;
|
|
133
|
-
top: 50%;
|
|
134
|
-
transform: translateY(-50%);
|
|
135
|
-
height: 1em;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.maplibregl-ctrl-geocoder--icon-close {
|
|
139
|
-
right: 0;
|
|
140
|
-
}
|
|
141
|
-
.maplibregl-ctrl-geocoder--icon-search {
|
|
142
|
-
left: 0.5em;
|
|
143
|
-
height: 1.5em;
|
|
144
|
-
}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
.maplibregl-map {
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
position: relative;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.maplibregl-canvas {
|
|
7
|
-
left: 0;
|
|
8
|
-
position: absolute;
|
|
9
|
-
top: 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.maplibregl-map:fullscreen {
|
|
13
|
-
height: 100%;
|
|
14
|
-
width: 100%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.maplibregl-canvas-container.maplibregl-interactive {
|
|
18
|
-
cursor: grab;
|
|
19
|
-
user-select: none;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer {
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.maplibregl-canvas-container.maplibregl-interactive:active {
|
|
27
|
-
cursor: grabbing;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,
|
|
31
|
-
.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas {
|
|
32
|
-
touch-action: pan-x pan-y;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.maplibregl-canvas-container.maplibregl-touch-drag-pan,
|
|
36
|
-
.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas {
|
|
37
|
-
touch-action: pinch-zoom;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,
|
|
41
|
-
.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan
|
|
42
|
-
.maplibregl-canvas {
|
|
43
|
-
touch-action: none;
|
|
44
|
-
}
|
|
45
|
-
.maplibregl-ctrl-bottom-left,
|
|
46
|
-
.maplibregl-ctrl-bottom-right,
|
|
47
|
-
.maplibregl-ctrl-top-left,
|
|
48
|
-
.maplibregl-ctrl-top-right {
|
|
49
|
-
position: absolute;
|
|
50
|
-
z-index: 2;
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-flow: column;
|
|
53
|
-
gap: 0.75em;
|
|
54
|
-
align-items: flex-start;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.maplibregl-ctrl-top-left {
|
|
58
|
-
left: 0.5em;
|
|
59
|
-
top: 0.5em;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.maplibregl-ctrl-top-right {
|
|
63
|
-
right: 0;
|
|
64
|
-
top: 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.maplibregl-ctrl-bottom-left {
|
|
68
|
-
bottom: 0.5em;
|
|
69
|
-
left: 0.5em;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.maplibregl-ctrl-bottom-right {
|
|
73
|
-
bottom: 0.5em;
|
|
74
|
-
right: 0.5em;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.maplibregl-ctrl {
|
|
78
|
-
pointer-events: auto;
|
|
79
|
-
transform: translate(0);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.maplibregl-ctrl-group {
|
|
83
|
-
background: white;
|
|
84
|
-
border: 1px solid rgba(0, 0, 0, 0.75);
|
|
85
|
-
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.075);
|
|
86
|
-
border-radius: var(--br-small);
|
|
87
|
-
overflow: hidden;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.maplibregl-ctrl-group button {
|
|
91
|
-
background-color: transparent;
|
|
92
|
-
border: 0;
|
|
93
|
-
box-sizing: border-box;
|
|
94
|
-
cursor: pointer;
|
|
95
|
-
display: block;
|
|
96
|
-
height: 29px;
|
|
97
|
-
outline: none;
|
|
98
|
-
padding: 0;
|
|
99
|
-
width: 29px;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.maplibregl-ctrl-group button + button {
|
|
103
|
-
border-top: 1px solid rgba(0, 0, 0, 0.35);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.maplibregl-ctrl button .maplibregl-ctrl-icon {
|
|
107
|
-
background-position: 50%;
|
|
108
|
-
background-repeat: no-repeat;
|
|
109
|
-
display: block;
|
|
110
|
-
height: 100%;
|
|
111
|
-
width: 100%;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.maplibregl-ctrl button:disabled {
|
|
115
|
-
cursor: not-allowed;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon {
|
|
119
|
-
opacity: 0.5;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.maplibregl-ctrl button:not(:disabled):hover {
|
|
123
|
-
background-color: var(--gray-light-5);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.maplibregl-ctrl-group button:focus:focus-visible {
|
|
127
|
-
box-shadow: 0 0 2px 2px #0096ff;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.maplibregl-ctrl-group button:focus:not(:focus-visible) {
|
|
131
|
-
box-shadow: none;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.maplibregl-ctrl-group button:focus:first-child {
|
|
135
|
-
border-radius: 4px 4px 0 0;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.maplibregl-ctrl-group button:focus:last-child {
|
|
139
|
-
border-radius: 0 0 4px 4px;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.maplibregl-ctrl-group button:focus:only-child {
|
|
143
|
-
border-radius: inherit;
|
|
144
|
-
}
|
|
145
|
-
.maplibregl-marker {
|
|
146
|
-
left: 0;
|
|
147
|
-
top: 0;
|
|
148
|
-
position: absolute;
|
|
149
|
-
will-change: transform;
|
|
150
|
-
}
|
|
151
|
-
.maplibregl-marker path {
|
|
152
|
-
fill: var(--violet-dark-5);
|
|
153
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
|
|
2
|
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E");
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
|
|
6
|
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E");
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
button.maplibregl-ctrl-compass .maplibregl-ctrl-icon {
|
|
10
|
-
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath d='m10.5 16 4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E");
|
|
11
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
.maplibregl-popup {
|
|
2
|
-
top: 0;
|
|
3
|
-
left: 0;
|
|
4
|
-
display: flex;
|
|
5
|
-
position: absolute;
|
|
6
|
-
will-change: transform;
|
|
7
|
-
}
|
|
8
|
-
.maplibregl-popup-anchor-top,
|
|
9
|
-
.maplibregl-popup-anchor-top-left,
|
|
10
|
-
.maplibregl-popup-anchor-top-right {
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
}
|
|
13
|
-
.maplibregl-popup-anchor-bottom,
|
|
14
|
-
.maplibregl-popup-anchor-bottom-left,
|
|
15
|
-
.maplibregl-popup-anchor-bottom-right {
|
|
16
|
-
flex-direction: column-reverse;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.maplibregl-popup-anchor-left {
|
|
20
|
-
flex-direction: row;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.maplibregl-popup-anchor-right {
|
|
24
|
-
flex-direction: row-reverse;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
|
|
28
|
-
transform: translateY(50%) rotate(45deg);
|
|
29
|
-
align-self: center;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.maplibregl-popup-anchor-top .maplibregl-popup-tip {
|
|
33
|
-
transform: translateY(-50%) rotate(-135deg);
|
|
34
|
-
align-self: center;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.maplibregl-popup-anchor-left .maplibregl-popup-tip {
|
|
38
|
-
transform: translateX(-50%) rotate(135deg);
|
|
39
|
-
align-self: center;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.maplibregl-popup-anchor-top-left .maplibregl-popup-tip {
|
|
43
|
-
transform: translateY(1em) translateX(-50%) rotate(135deg);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip {
|
|
47
|
-
transform: translateY(-1em) translateX(-50%) rotate(135deg);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.maplibregl-popup-anchor-right .maplibregl-popup-tip {
|
|
51
|
-
transform: translateX(50%) rotate(-45deg);
|
|
52
|
-
align-self: center;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.maplibregl-popup-anchor-top-right .maplibregl-popup-tip {
|
|
56
|
-
transform: translateX(-1em) translateY(-50%) rotate(-135deg);
|
|
57
|
-
align-self: flex-end;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip {
|
|
61
|
-
transform: translateX(-1em) translateY(50%) rotate(45deg);
|
|
62
|
-
align-self: flex-end;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.maplibregl-popup-close-button {
|
|
66
|
-
position: absolute;
|
|
67
|
-
top: 0.5em;
|
|
68
|
-
right: 0.5em;
|
|
69
|
-
cursor: pointer;
|
|
70
|
-
border-radius: 2px;
|
|
71
|
-
display: flex;
|
|
72
|
-
justify-content: center;
|
|
73
|
-
align-items: center;
|
|
74
|
-
padding-bottom: 0.15em;
|
|
75
|
-
font-size: 1.25rem;
|
|
76
|
-
width: 1.1em;
|
|
77
|
-
height: 1.1em;
|
|
78
|
-
z-index: 100;
|
|
79
|
-
background: white;
|
|
80
|
-
border: 1px solid var(--gray-dark-5);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.maplibregl-popup-close-button:hover,
|
|
84
|
-
.maplibregl-popup-close-button:focus {
|
|
85
|
-
background: var(--gray-light-5);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.maplibregl-popup-tip {
|
|
89
|
-
width: 0.65rem;
|
|
90
|
-
height: 0.65rem;
|
|
91
|
-
background: white;
|
|
92
|
-
position: absolute;
|
|
93
|
-
border-right: 1px solid rgba(0, 0, 0, 0.75);
|
|
94
|
-
border-bottom: 1px solid rgba(0, 0, 0, 0.75);
|
|
95
|
-
z-index: 10;
|
|
96
|
-
}
|