@swr-data-lab/components 3.1.0 → 3.1.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.
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">import { onDestroy } from 'svelte';
2
- import { VectorTileSource } from 'maplibre-gl';
2
+ import {} from 'maplibre-gl';
3
3
  import { getMapContext, createSourceContext, SourceContext } from '../context.svelte.js';
4
4
  let { id, sourceSpec, source = $bindable(), children } = $props();
5
5
  let firstRun = $state(true);
@@ -24,12 +24,12 @@ $effect(() => {
24
24
  }
25
25
  });
26
26
  $effect(() => {
27
- if (!firstRun && source instanceof VectorTileSource) {
27
+ if (!firstRun && source.setTiles) {
28
28
  source.setTiles(sourceSpec.tiles);
29
29
  }
30
30
  });
31
31
  $effect(() => {
32
- if (!firstRun && source instanceof VectorTileSource) {
32
+ if (!firstRun && source.setUrl) {
33
33
  source.setUrl(sourceSpec.url);
34
34
  }
35
35
  });
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": "3.1.0",
4
+ "version": "3.1.1",
5
5
  "author": "SWR Data Lab",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",