@swr-data-lab/components 1.12.0 → 1.12.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/.storybook/preview.ts +1 -1
- package/package.json +2 -2
- package/src/index.js +1 -1
- package/src/maplibre/AttributionControl/AttributionControl.svelte +2 -2
- package/src/maplibre/GeocoderControl/GeocoderControl.stories.svelte +1 -1
- package/src/maplibre/Map/Map.svelte +1 -1
- package/src/maplibre/MapControl/MapControl.svelte +1 -1
- package/src/maplibre/NavigationControl/NavigationControl.svelte +2 -2
- package/src/maplibre/Source/MapSource.svelte +1 -1
- package/src/maplibre/Tooltip/Tooltip.svelte +3 -3
- package/src/maplibre/VectorLayer/VectorLayer.svelte +3 -3
- package/tsconfig.json +0 -1
package/.storybook/preview.ts
CHANGED
package/package.json
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"storybook": "^9.0.0-beta.11",
|
|
50
50
|
"svelte": "^5.23.0",
|
|
51
51
|
"svelte-check": "^4.0.0",
|
|
52
|
-
"typescript": "^5.
|
|
52
|
+
"typescript": "^5.8.3",
|
|
53
53
|
"vite": "^6.0.0",
|
|
54
54
|
"vitest": "^3.1.1",
|
|
55
55
|
"wait-on": "^8.0.1"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"svelte": "./src/index.js"
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
|
-
"version": "1.12.
|
|
70
|
+
"version": "1.12.2",
|
|
71
71
|
"overrides": {
|
|
72
72
|
"storybook": "$storybook"
|
|
73
73
|
}
|
package/src/index.js
CHANGED
|
@@ -15,7 +15,7 @@ export { default as Map } from './maplibre/Map/Map.svelte';
|
|
|
15
15
|
export { SWRDataLabLight } from './maplibre/MapStyle';
|
|
16
16
|
export { default as MapControl } from './maplibre/MapControl/MapControl.svelte';
|
|
17
17
|
export { default as AttributionControl } from './maplibre/AttributionControl/AttributionControl.svelte';
|
|
18
|
-
export { default as
|
|
18
|
+
export { default as GeocoderControl } from './maplibre/GeocoderControl/GeocoderControl.svelte';
|
|
19
19
|
export { default as NavigationControl } from './maplibre/NavigationControl/NavigationControl.svelte';
|
|
20
20
|
export { default as ScaleControl } from './maplibre/ScaleControl/ScaleControl.svelte';
|
|
21
21
|
export { default as VectorLayer } from './maplibre/VectorLayer/VectorLayer.svelte';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { type ControlPosition
|
|
2
|
+
import maplibre, { type ControlPosition } from 'maplibre-gl';
|
|
3
3
|
import MapControl from '../MapControl/MapControl.svelte';
|
|
4
4
|
|
|
5
5
|
interface AttributionControlProps {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<MapControl
|
|
13
13
|
{position}
|
|
14
|
-
control={new AttributionControl({
|
|
14
|
+
control={new maplibre.AttributionControl({
|
|
15
15
|
customAttribution,
|
|
16
16
|
compact: false
|
|
17
17
|
})}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import maplibre, { type ProjectionSpecification, type StyleSpecification } from 'maplibre-gl';
|
|
3
3
|
import { onMount, onDestroy, type Snippet, getContext, hasContext } from 'svelte';
|
|
4
|
-
import { createMapContext } from '../context.svelte';
|
|
4
|
+
import { createMapContext } from '../context.svelte.js';
|
|
5
5
|
import { type Location } from '../types';
|
|
6
6
|
import FallbackStyle from './FallbackStyle';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { type Snippet } from 'svelte';
|
|
3
3
|
import { type ControlPosition, type IControl } from 'maplibre-gl';
|
|
4
|
-
import { getMapContext } from '../context.svelte.
|
|
4
|
+
import { getMapContext } from '../context.svelte.js';
|
|
5
5
|
|
|
6
6
|
interface MapControlProps {
|
|
7
7
|
position: ControlPosition;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { type ControlPosition
|
|
2
|
+
import maplibre, { type ControlPosition } from 'maplibre-gl';
|
|
3
3
|
import MapControl from '../MapControl/MapControl.svelte';
|
|
4
4
|
|
|
5
5
|
interface NavigationControlProps {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}: NavigationControlProps = $props();
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
|
-
<MapControl control={new NavigationControl({ showCompass, visualizePitch })} {position} />
|
|
20
|
+
<MapControl control={new maplibre.NavigationControl({ showCompass, visualizePitch })} {position} />
|
|
21
21
|
|
|
22
22
|
<style>
|
|
23
23
|
:global {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onDestroy, type Snippet } from 'svelte';
|
|
3
3
|
import { type Map, type SourceSpecification } from 'maplibre-gl';
|
|
4
|
-
import { getMapContext, createSourceContext } from '../context.svelte.
|
|
4
|
+
import { getMapContext, createSourceContext } from '../context.svelte.js';
|
|
5
5
|
|
|
6
6
|
type Source = maplibregl.VectorTileSource;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onDestroy, type Snippet } from 'svelte';
|
|
3
|
-
import { type Listener, type LngLatLike
|
|
4
|
-
import { getMapContext } from '../context.svelte.
|
|
3
|
+
import maplibre, { type Listener, type LngLatLike } from 'maplibre-gl';
|
|
4
|
+
import { getMapContext } from '../context.svelte.js';
|
|
5
5
|
import { resetPopupEventListener } from '../utils';
|
|
6
6
|
|
|
7
7
|
interface TooltipProps {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
const { map } = $derived(getMapContext());
|
|
41
41
|
|
|
42
|
-
let tooltip = new Popup({
|
|
42
|
+
let tooltip = new maplibre.Popup({
|
|
43
43
|
closeButton: showCloseButton,
|
|
44
44
|
closeOnClick: closeOnClick,
|
|
45
45
|
maxWidth: `${maxWidth}px`,
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
MapLayerMouseEvent
|
|
10
10
|
} from 'maplibre-gl';
|
|
11
11
|
|
|
12
|
-
import { getMapContext } from '../context.svelte.
|
|
12
|
+
import { getMapContext } from '../context.svelte.js';
|
|
13
13
|
import { onDestroy } from 'svelte';
|
|
14
|
-
import { resetLayerEventListener } from '../utils.
|
|
14
|
+
import { resetLayerEventListener } from '../utils.js';
|
|
15
15
|
|
|
16
16
|
interface VectorLayerProps {
|
|
17
17
|
id: string;
|
|
18
18
|
sourceId: string;
|
|
19
19
|
sourceLayer: string;
|
|
20
|
-
type: 'line' | 'fill';
|
|
20
|
+
type: 'line' | 'fill' | 'circle' | 'symbol';
|
|
21
21
|
placeBelow: string;
|
|
22
22
|
visible?: boolean;
|
|
23
23
|
minZoom?: number;
|