@swr-data-lab/components 1.13.1 → 1.13.3

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.
Files changed (72) hide show
  1. package/package.json +2 -4
  2. package/dist/Autocomplete/Autocomplete.stories.svelte +0 -61
  3. package/dist/Autocomplete/Autocomplete.stories.svelte.d.ts +0 -27
  4. package/dist/Button/Button.stories.svelte +0 -19
  5. package/dist/Button/Button.stories.svelte.d.ts +0 -19
  6. package/dist/Caption/Caption.stories.svelte +0 -24
  7. package/dist/Caption/Caption.stories.svelte.d.ts +0 -27
  8. package/dist/Card/Card.stories.svelte +0 -17
  9. package/dist/Card/Card.stories.svelte.d.ts +0 -19
  10. package/dist/ChartFooter/ChartFooter.mdx +0 -17
  11. package/dist/ChartFooter/ChartFooter.stories.svelte +0 -32
  12. package/dist/ChartFooter/ChartFooter.stories.svelte.d.ts +0 -27
  13. package/dist/ChartHeader/ChartHeader.mdx +0 -16
  14. package/dist/ChartHeader/ChartHeader.stories.svelte +0 -31
  15. package/dist/ChartHeader/ChartHeader.stories.svelte.d.ts +0 -27
  16. package/dist/ChartList/ChartList.mdx +0 -13
  17. package/dist/ChartList/ChartList.stories.svelte +0 -48
  18. package/dist/ChartList/ChartList.stories.svelte.d.ts +0 -27
  19. package/dist/Copy/Copy.stories.svelte +0 -32
  20. package/dist/Copy/Copy.stories.svelte.d.ts +0 -27
  21. package/dist/DesignTokens/DesignTokens.mdx +0 -110
  22. package/dist/FormLabel/FormLabel.mdx +0 -13
  23. package/dist/FormLabel/FormLabel.stories.svelte +0 -52
  24. package/dist/FormLabel/FormLabel.stories.svelte.d.ts +0 -27
  25. package/dist/Headline/Headline.stories.svelte +0 -17
  26. package/dist/Headline/Headline.stories.svelte.d.ts +0 -27
  27. package/dist/HighlightCard/HighlightCard.stories.svelte +0 -55
  28. package/dist/HighlightCard/HighlightCard.stories.svelte.d.ts +0 -19
  29. package/dist/Intro.mdx +0 -7
  30. package/dist/Logotype/Logotype.stories.svelte +0 -14
  31. package/dist/Logotype/Logotype.stories.svelte.d.ts +0 -19
  32. package/dist/Middot/Middot.stories.svelte +0 -14
  33. package/dist/Middot/Middot.stories.svelte.d.ts +0 -19
  34. package/dist/Note/Note.stories.svelte +0 -23
  35. package/dist/Note/Note.stories.svelte.d.ts +0 -27
  36. package/dist/Select/Select.mdx +0 -25
  37. package/dist/Select/Select.stories.svelte +0 -202
  38. package/dist/Select/Select.stories.svelte.d.ts +0 -19
  39. package/dist/Select/SelectStoriesTemplate.svelte +0 -31
  40. package/dist/Select/SelectStoriesTemplate.svelte.d.ts +0 -15
  41. package/dist/Switcher/Switcher.mdx +0 -13
  42. package/dist/Switcher/Switcher.stories.svelte +0 -44
  43. package/dist/Switcher/Switcher.stories.svelte.d.ts +0 -27
  44. package/dist/maplibre/AttributionControl/AttributionControl.stories.svelte +0 -27
  45. package/dist/maplibre/AttributionControl/AttributionControl.stories.svelte.d.ts +0 -19
  46. package/dist/maplibre/GeocoderControl/GeocoderControl.stories.svelte +0 -74
  47. package/dist/maplibre/GeocoderControl/GeocoderControl.stories.svelte.d.ts +0 -19
  48. package/dist/maplibre/Map/Map.stories.svelte +0 -113
  49. package/dist/maplibre/Map/Map.stories.svelte.d.ts +0 -19
  50. package/dist/maplibre/MapControl/MapControl.mdx +0 -12
  51. package/dist/maplibre/MapControl/MapControl.stories.svelte +0 -46
  52. package/dist/maplibre/MapControl/MapControl.stories.svelte.d.ts +0 -19
  53. package/dist/maplibre/MapStyle/SWRDataLabLight.mdx +0 -86
  54. package/dist/maplibre/MapStyle/SWRDataLabLight.stories.svelte +0 -39
  55. package/dist/maplibre/MapStyle/SWRDataLabLight.stories.svelte.d.ts +0 -18
  56. package/dist/maplibre/Maplibre.mdx +0 -91
  57. package/dist/maplibre/NavigationControl/NavigationControl.stories.svelte +0 -37
  58. package/dist/maplibre/NavigationControl/NavigationControl.stories.svelte.d.ts +0 -19
  59. package/dist/maplibre/ScaleControl/ScaleControl.stories.svelte +0 -68
  60. package/dist/maplibre/ScaleControl/ScaleControl.stories.svelte.d.ts +0 -19
  61. package/dist/maplibre/Source/MapSource.stories.svelte +0 -7
  62. package/dist/maplibre/Source/MapSource.stories.svelte.d.ts +0 -19
  63. package/dist/maplibre/Tooltip/Tooltip.stories.svelte +0 -186
  64. package/dist/maplibre/Tooltip/Tooltip.stories.svelte.d.ts +0 -19
  65. package/dist/maplibre/VectorLayer/VectorLayer.stories.svelte +0 -62
  66. package/dist/maplibre/VectorLayer/VectorLayer.stories.svelte.d.ts +0 -19
  67. package/dist/maplibre/VectorTileSource/VectorTileSource.mdx +0 -19
  68. package/dist/maplibre/VectorTileSource/VectorTileSource.stories.svelte +0 -44
  69. package/dist/maplibre/VectorTileSource/VectorTileSource.stories.svelte.d.ts +0 -19
  70. package/dist/maplibre/WithLinkLocation/WithLinkLocation.mdx +0 -11
  71. package/dist/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte +0 -27
  72. package/dist/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte.d.ts +0 -19
@@ -1,37 +0,0 @@
1
- <script context="module" lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
2
- import NavigationControl from './NavigationControl.svelte';
3
- import DesignTokens from '../../DesignTokens/DesignTokens.svelte';
4
- import { SWRDataLabLight } from '../MapStyle';
5
- import Map from '../Map/Map.svelte';
6
- const { Story } = defineMeta({
7
- title: 'Maplibre/Control/NavigationControl',
8
- component: NavigationControl
9
- });
10
- </script>
11
-
12
- <Story asChild name="Default">
13
- <DesignTokens>
14
- <div class="container">
15
- <Map style={SWRDataLabLight} initialLocation={{ lat: 51, lng: 10, zoom: 20 }}>
16
- <NavigationControl />
17
- </Map>
18
- </div>
19
- </DesignTokens>
20
- </Story>
21
-
22
- <Story asChild name="With compass">
23
- <DesignTokens>
24
- <div class="container">
25
- <Map style={SWRDataLabLight} initialLocation={{ lat: 51, lng: 10, zoom: 20 }}>
26
- <NavigationControl showCompass visualizePitch />
27
- </Map>
28
- </div>
29
- </DesignTokens>
30
- </Story>
31
-
32
- <style>
33
- .container {
34
- width: 500px;
35
- height: 200px;
36
- }
37
- </style>
@@ -1,19 +0,0 @@
1
- import NavigationControl from './NavigationControl.svelte';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const NavigationControl: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
- [evt: string]: CustomEvent<any>;
17
- }, {}, {}, string>;
18
- type NavigationControl = InstanceType<typeof NavigationControl>;
19
- export default NavigationControl;
@@ -1,68 +0,0 @@
1
- <script context="module" lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
2
- import { within, expect } from 'storybook/test';
3
- import ScaleControl from './ScaleControl.svelte';
4
- import DesignTokens from '../../DesignTokens/DesignTokens.svelte';
5
- import Map from '../Map/Map.svelte';
6
- import { SWRDataLabLight } from '../MapStyle';
7
- const { Story } = defineMeta({
8
- title: 'Maplibre/Control/ScaleControl',
9
- component: ScaleControl
10
- });
11
- </script>
12
-
13
- <Story
14
- asChild
15
- name="Default"
16
- play={async ({ canvasElement, step }) => {
17
- const canvas = within(canvasElement);
18
- const containerEl = canvas.getByTestId('map-container');
19
- await step('Scale control renders', async () => {
20
- const el = containerEl.querySelector('.maplibregl-ctrl-scale');
21
- expect(el).toBeTruthy();
22
- });
23
- await step('Distance is rendered in metric units', async () => {
24
- const el = containerEl.querySelector('.maplibregl-ctrl-scale');
25
- expect(el).toHaveTextContent('100 m');
26
- });
27
- }}
28
- >
29
- <DesignTokens>
30
- <div class="container">
31
- <Map style={SWRDataLabLight} initialLocation={{ lat: 51, lng: 10, zoom: 20 }}>
32
- <ScaleControl />
33
- </Map>
34
- </div>
35
- </DesignTokens>
36
- </Story>
37
-
38
- <Story
39
- asChild
40
- name="Imperial units"
41
- play={async ({ canvasElement, step }) => {
42
- const canvas = within(canvasElement);
43
- const containerEl = canvas.getByTestId('map-container');
44
- await step('Scale control renders', async () => {
45
- const el = containerEl.querySelector('.maplibregl-ctrl-scale');
46
- expect(el).toBeTruthy();
47
- });
48
- await step('Distance is rendered in imperial units', async () => {
49
- const el = containerEl.querySelector('.maplibregl-ctrl-scale');
50
- expect(el).toHaveTextContent('300 ft');
51
- });
52
- }}
53
- >
54
- <DesignTokens>
55
- <div class="container">
56
- <Map style={SWRDataLabLight} initialLocation={{ lat: 51, lng: 10, zoom: 20 }}>
57
- <ScaleControl unit="imperial" />
58
- </Map>
59
- </div>
60
- </DesignTokens>
61
- </Story>
62
-
63
- <style>
64
- .container {
65
- width: 500px;
66
- height: 200px;
67
- }
68
- </style>
@@ -1,19 +0,0 @@
1
- import ScaleControl from './ScaleControl.svelte';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const ScaleControl: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
- [evt: string]: CustomEvent<any>;
17
- }, {}, {}, string>;
18
- type ScaleControl = InstanceType<typeof ScaleControl>;
19
- export default ScaleControl;
@@ -1,7 +0,0 @@
1
- <script context="module" lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
2
- import MapSource from './MapSource.svelte';
3
- const { Story } = defineMeta({
4
- title: 'Maplibre/MapSource',
5
- component: MapSource
6
- });
7
- </script>
@@ -1,19 +0,0 @@
1
- import MapSource from './MapSource.svelte';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const MapSource: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
- [evt: string]: CustomEvent<any>;
17
- }, {}, {}, string>;
18
- type MapSource = InstanceType<typeof MapSource>;
19
- export default MapSource;
@@ -1,186 +0,0 @@
1
- <script module lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
2
- import DesignTokens from '../../DesignTokens/DesignTokens.svelte';
3
- import Map from '../Map/Map.svelte';
4
- import VectorTileSource from '../VectorTileSource/VectorTileSource.svelte';
5
- import VectorLayer from '../VectorLayer/VectorLayer.svelte';
6
- import AttributionControl from '../AttributionControl/AttributionControl.svelte';
7
- import Tooltip from './Tooltip.svelte';
8
- import { SWRDataLabLight } from '../MapStyle';
9
- const { Story } = defineMeta({
10
- title: 'Maplibre/Extras/Tooltip',
11
- component: Tooltip
12
- });
13
- let hovered = $state();
14
- let hovered2 = $state();
15
- let hoverCoords = $state([0, 0]);
16
- let selected = $state();
17
- let selectCoords = $state([0, 0]);
18
- </script>
19
-
20
- <Story asChild name="Default">
21
- <DesignTokens>
22
- <div class="container">
23
- <Map
24
- style={SWRDataLabLight}
25
- initialLocation={{ lat: 51, lng: 10, zoom: 8 }}
26
- allowZoom={false}
27
- >
28
- <VectorTileSource
29
- id="ev-infra-source"
30
- url={`https://static.datenhub.net/data/p108_e_auto_check/ev_infra_merged.versatiles?tiles/{z}/{x}/{y}`}
31
- />
32
- <VectorLayer
33
- sourceId="ev-infra-source"
34
- type="fill"
35
- id="coverage-fill"
36
- sourceLayer="coverage"
37
- placeBelow="street-residential"
38
- onmousemove={(e) => {
39
- hovered = e.features?.[0];
40
- hoverCoords = e.lngLat;
41
- }}
42
- onmouseleave={() => (hovered = undefined)}
43
- paint={{
44
- 'fill-color': ['step', ['get', 'coverage_2025'], 'white', 1, '#ffcfcc', 1.3, '#FF4D20']
45
- }}
46
- />
47
- <VectorLayer
48
- {hovered}
49
- sourceId="ev-infra-source"
50
- sourceLayer="coverage"
51
- id="ev-infra-outline"
52
- placeBelow="label-place-city"
53
- type="line"
54
- layout={{
55
- 'line-join': 'round'
56
- }}
57
- paint={{
58
- 'line-width': [
59
- 'case',
60
- ['any', ['boolean', ['feature-state', 'hovered'], false]],
61
- 1.5,
62
- 0.5
63
- ],
64
- 'line-color': [
65
- 'case',
66
- ['any', ['boolean', ['feature-state', 'hovered'], false]],
67
- '#000',
68
- '#555'
69
- ],
70
- 'line-opacity': 1
71
- }}
72
- />
73
-
74
- {#if hovered}
75
- <Tooltip
76
- position={hoverCoords}
77
- mouseEvents={false}
78
- showCloseButton={false}
79
- closeOnClick={false}
80
- >
81
- <pre>{Object.entries(hovered.properties)
82
- .map(([key, val]) => `${key}: ${val}`)
83
- .join('\n')}</pre>
84
- </Tooltip>
85
- {/if}
86
- <AttributionControl position="bottom-left" />
87
- </Map>
88
- </div>
89
- </DesignTokens>
90
- </Story>
91
-
92
- <Story asChild name="Show on Click">
93
- <DesignTokens>
94
- <div class="container">
95
- <Map
96
- style={SWRDataLabLight}
97
- initialLocation={{ lat: 51, lng: 10, zoom: 8 }}
98
- allowZoom={false}
99
- >
100
- <VectorTileSource
101
- id="ev-infra-source"
102
- url={`https://static.datenhub.net/data/p108_e_auto_check/ev_infra_merged.versatiles?tiles/{z}/{x}/{y}`}
103
- />
104
- <VectorLayer
105
- sourceId="ev-infra-source"
106
- type="fill"
107
- id="coverage-fill"
108
- sourceLayer="coverage"
109
- placeBelow="street-residential"
110
- onmousemove={(e) => {
111
- hovered2 = e.features?.[0];
112
- }}
113
- onclick={(e) => {
114
- selected = e.features?.[0];
115
- selectCoords = e.lngLat;
116
- }}
117
- onmouseleave={() => (hovered2 = undefined)}
118
- paint={{
119
- 'fill-color': ['step', ['get', 'coverage_2025'], 'white', 1, '#CCDCFF', 1.3, '#6280E5']
120
- }}
121
- />
122
- <VectorLayer
123
- hovered={hovered2}
124
- {selected}
125
- sourceId="ev-infra-source"
126
- sourceLayer="coverage"
127
- id="ev-infra-outline"
128
- placeBelow="label-place-city"
129
- type="line"
130
- layout={{
131
- 'line-join': 'round'
132
- }}
133
- paint={{
134
- 'line-width': [
135
- 'case',
136
- [
137
- 'any',
138
- ['boolean', ['feature-state', 'hovered'], false],
139
- ['boolean', ['feature-state', 'selected'], false]
140
- ],
141
- 2,
142
- 0.5
143
- ],
144
- 'line-color': [
145
- 'case',
146
- [
147
- 'any',
148
- ['boolean', ['feature-state', 'hovered'], false],
149
- ['boolean', ['feature-state', 'selected'], false]
150
- ],
151
- '#000',
152
- '#555'
153
- ],
154
- 'line-opacity': 1
155
- }}
156
- />
157
- {#if selected}
158
- <Tooltip
159
- position={selectCoords}
160
- mouseEvents={true}
161
- showCloseButton={true}
162
- onClose={() => {
163
- selected = undefined;
164
- }}
165
- >
166
- <pre class="padRight">{Object.entries(selected.properties)
167
- .map(([key, val]) => `${key}: ${val}`)
168
- .join('\n')}</pre>
169
- </Tooltip>
170
- {/if}
171
- <AttributionControl position="bottom-left" />
172
- </Map>
173
- </div>
174
- </DesignTokens>
175
- </Story>
176
-
177
- <style>
178
- .container {
179
- width: 100%;
180
- height: 600px;
181
- }
182
-
183
- .padRight {
184
- padding-right: 2.5em;
185
- }
186
- </style>
@@ -1,19 +0,0 @@
1
- import Tooltip from './Tooltip.svelte';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const Tooltip: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
- [evt: string]: CustomEvent<any>;
17
- }, {}, {}, string>;
18
- type Tooltip = InstanceType<typeof Tooltip>;
19
- export default Tooltip;
@@ -1,62 +0,0 @@
1
- <script context="module" lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
2
- import Map from '../Map/Map.svelte';
3
- import VectorLayer from './VectorLayer.svelte';
4
- import DesignTokens from '../../DesignTokens/DesignTokens.svelte';
5
- import AttributionControl from '../AttributionControl/AttributionControl.svelte';
6
- import VectorTileSource from '../VectorTileSource/VectorTileSource.svelte';
7
- import { SWRDataLabLight } from '../MapStyle';
8
- const { Story } = defineMeta({
9
- title: 'Maplibre/Layer/VectorLayer',
10
- component: VectorLayer
11
- });
12
- </script>
13
-
14
- <Story asChild name="Default">
15
- <DesignTokens>
16
- <div class="container">
17
- <Map showDebug={true} style={SWRDataLabLight}>
18
- <VectorTileSource
19
- id="ev-infra-source"
20
- url={`https://static.datenhub.net/data/p108_e_auto_check/ev_infra_merged.versatiles?tiles/{z}/{x}/{y}`}
21
- />
22
- <VectorLayer
23
- sourceId="ev-infra-source"
24
- type="fill"
25
- id="coverage-fill"
26
- sourceLayer="coverage"
27
- placeBelow="street-residential"
28
- paint={{
29
- 'fill-color': [
30
- 'step',
31
- ['get', 'coverage_2025'],
32
- 'white',
33
- 1,
34
- 'lightgray',
35
- 1.3,
36
- 'lightgreen'
37
- ]
38
- }}
39
- />
40
- <VectorLayer
41
- sourceId="ev-infra-source"
42
- sourceLayer="coverage"
43
- id="ev-infra-outline"
44
- type="line"
45
- paint={{
46
- 'line-width': 0.5,
47
- 'line-color': 'purple',
48
- 'line-opacity': 1
49
- }}
50
- />
51
- <AttributionControl />
52
- </Map>
53
- </div>
54
- </DesignTokens>
55
- </Story>
56
-
57
- <style>
58
- .container {
59
- width: 100%;
60
- height: 600px;
61
- }
62
- </style>
@@ -1,19 +0,0 @@
1
- import VectorLayer from './VectorLayer.svelte';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const VectorLayer: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
- [evt: string]: CustomEvent<any>;
17
- }, {}, {}, string>;
18
- type VectorLayer = InstanceType<typeof VectorLayer>;
19
- export default VectorLayer;
@@ -1,19 +0,0 @@
1
- import { Story, Meta, Primary, Controls, Stories } from '@storybook/addon-docs/blocks';
2
-
3
- import * as VectorTileSourceStories from './VectorTileSource.stories.svelte';
4
-
5
- <Meta of={VectorTileSourceStories} />
6
-
7
- # VectorTileSource
8
-
9
- Loads tiled vector data from a tileserver. Any mablibre-supported tileserver will work, but we'll typically use tiles served by `versatiles-rs` or `versatiles-node-static-proxy`.
10
-
11
- ```jsx
12
- <Map>
13
- <VectorTileSource
14
- url="https://static.datenhub.net/rent_merged.versatiles?tiles/{z}/{x}/{y}"
15
- id="chargers"
16
- />
17
- <VectorLayer sourceId="chargers" />
18
- </Map>
19
- ```
@@ -1,44 +0,0 @@
1
- <script context="module" lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
2
- import DesignTokens from '../../DesignTokens/DesignTokens.svelte';
3
- import VectorTileSource from './VectorTileSource.svelte';
4
- import VectorLayer from '../VectorLayer/VectorLayer.svelte';
5
- import Map from '../Map/Map.svelte';
6
- import { SWRDataLabLight } from '../MapStyle/';
7
- import AttributionControl from '../AttributionControl';
8
- const { Story } = defineMeta({
9
- title: 'Maplibre/Source/VectorTileSource',
10
- component: VectorTileSource
11
- });
12
- </script>
13
-
14
- <Story asChild name="Default">
15
- <DesignTokens>
16
- <div class="container">
17
- <Map showDebug={true} style={SWRDataLabLight}>
18
- <VectorTileSource
19
- id="ev-infra-source"
20
- url={`https://static.datenhub.net/data/p108_e_auto_check/ev_infra_merged.versatiles?tiles/{z}/{x}/{y}`}
21
- />
22
- <VectorLayer
23
- sourceId="ev-infra-source"
24
- sourceLayer="coverage"
25
- id="ev-infra-outline"
26
- type="line"
27
- paint={{
28
- 'line-width': 0.5,
29
- 'line-color': 'purple',
30
- 'line-opacity': 1
31
- }}
32
- />
33
- <AttributionControl />
34
- </Map>
35
- </div>
36
- </DesignTokens>
37
- </Story>
38
-
39
- <style>
40
- .container {
41
- width: 100%;
42
- height: 600px;
43
- }
44
- </style>
@@ -1,19 +0,0 @@
1
- import VectorTileSource from './VectorTileSource.svelte';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const VectorTileSource: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
- [evt: string]: CustomEvent<any>;
17
- }, {}, {}, string>;
18
- type VectorTileSource = InstanceType<typeof VectorTileSource>;
19
- export default VectorTileSource;
@@ -1,11 +0,0 @@
1
- import { Story, Meta, Primary, Controls, Stories } from '@storybook/addon-docs/blocks';
2
-
3
- import * as WithLinkLocationStories from './WithLinkLocation.stories.svelte';
4
-
5
- <Meta of={WithLinkLocationStories} />
6
-
7
- # WithLinkLocation
8
-
9
- <Controls />
10
-
11
- <Stories />
@@ -1,27 +0,0 @@
1
- <script context="module" lang="ts">import { defineMeta } from '@storybook/addon-svelte-csf';
2
- import WithLinkLocation from './WithLinkLocation.svelte';
3
- import DesignTokens from '../../DesignTokens/DesignTokens.svelte';
4
- import Map from '../Map/Map.svelte';
5
- import { SWRDataLabLight } from '../MapStyle';
6
- const { Story } = defineMeta({
7
- title: 'Maplibre/Extras/WithLinkLocation',
8
- component: WithLinkLocation
9
- });
10
- </script>
11
-
12
- <Story asChild name="Default">
13
- <DesignTokens>
14
- <div class="container">
15
- <WithLinkLocation countries="de" languages="de" service="maptiler" key="V32kPHZjMa0Mkn6YvSzA">
16
- <Map style={SWRDataLabLight} initialLocation={{ lat: 51, lng: 10, zoom: 20 }}></Map>
17
- </WithLinkLocation>
18
- </div>
19
- </DesignTokens>
20
- </Story>
21
-
22
- <style>
23
- .container {
24
- width: 500px;
25
- height: 300px;
26
- }
27
- </style>
@@ -1,19 +0,0 @@
1
- import WithLinkLocation from './WithLinkLocation.svelte';
2
- interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
3
- new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
- $$bindings?: Bindings;
5
- } & Exports;
6
- (internal: unknown, props: {
7
- $$events?: Events;
8
- $$slots?: Slots;
9
- }): Exports & {
10
- $set?: any;
11
- $on?: any;
12
- };
13
- z_$$bindings?: Bindings;
14
- }
15
- declare const WithLinkLocation: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
- [evt: string]: CustomEvent<any>;
17
- }, {}, {}, string>;
18
- type WithLinkLocation = InstanceType<typeof WithLinkLocation>;
19
- export default WithLinkLocation;