@radiofrance/svelte-leaflet 0.1.0-alpha.9 → 1.0.0-next.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.
Files changed (46) hide show
  1. package/README.md +12 -7
  2. package/dist/DivIcon.svelte +64 -0
  3. package/dist/DivIcon.svelte.d.ts +27 -0
  4. package/dist/Icon.svelte +56 -0
  5. package/dist/Icon.svelte.d.ts +31 -0
  6. package/dist/LocateControl.svelte +57 -0
  7. package/dist/LocateControl.svelte.d.ts +9 -0
  8. package/dist/Map.svelte +128 -77
  9. package/dist/Map.svelte.d.ts +15 -64
  10. package/dist/Marker.svelte +68 -70
  11. package/dist/Marker.svelte.d.ts +11 -34
  12. package/dist/MarkerClusterGroup.svelte +73 -42
  13. package/dist/MarkerClusterGroup.svelte.d.ts +69 -21
  14. package/dist/Polygon.svelte +43 -0
  15. package/dist/Polygon.svelte.d.ts +9 -0
  16. package/dist/Polyline.svelte +42 -25
  17. package/dist/Polyline.svelte.d.ts +9 -22
  18. package/dist/Popup.svelte +69 -44
  19. package/dist/Popup.svelte.d.ts +10 -19
  20. package/dist/contexts.d.ts +4 -0
  21. package/dist/contexts.js +4 -0
  22. package/dist/events.d.ts +11 -0
  23. package/dist/events.js +31 -0
  24. package/dist/index.d.ts +22 -53
  25. package/dist/index.js +14 -53
  26. package/dist/map.svelte.d.ts +10 -0
  27. package/dist/map.svelte.js +117 -0
  28. package/dist/marker.svelte.d.ts +5 -0
  29. package/dist/marker.svelte.js +61 -0
  30. package/dist/markerClusterGroup.svelte.d.ts +9 -0
  31. package/dist/markerClusterGroup.svelte.js +7 -0
  32. package/dist/polygon.svelte.d.ts +1 -0
  33. package/dist/polygon.svelte.js +1 -0
  34. package/dist/polyline.svelte.d.ts +6 -0
  35. package/dist/polyline.svelte.js +56 -0
  36. package/dist/popup.svelte.d.ts +10 -0
  37. package/dist/popup.svelte.js +50 -0
  38. package/dist/private/GeolocationButton.svelte +36 -0
  39. package/dist/private/GeolocationButton.svelte.d.ts +18 -0
  40. package/dist/private/GeolocationIcon.svelte +25 -0
  41. package/dist/private/GeolocationIcon.svelte.d.ts +4 -0
  42. package/dist/utils.d.ts +15 -0
  43. package/dist/utils.js +10 -0
  44. package/package.json +43 -59
  45. package/dist/Circle.svelte +0 -41
  46. package/dist/Circle.svelte.d.ts +0 -36
@@ -1,74 +1,72 @@
1
- <script context="module"></script>
1
+ <script lang="ts">
2
+ import { getContext, onDestroy, onMount, setContext, type Snippet } from 'svelte';
3
+ import type {
4
+ Map as LeafletMap,
5
+ Marker as LeafletMarker,
6
+ MarkerOptions,
7
+ LayerGroup,
8
+ MarkerClusterGroup,
9
+ } from 'leaflet';
10
+ import { bindEvents, type LatLngExpression } from './index.js';
11
+ import { markerEvents, updateMarkerProps, type MarkerEvents } from './marker.svelte.js';
12
+ import { LAYERGROUP, MAP, MARKER } from './contexts.js';
2
13
 
3
- <script>import { createEventDispatcher, getContext, onDestroy, setContext, tick } from "svelte";
4
- const dispatch = createEventDispatcher();
5
- const L = globalThis.window.L;
6
- export let size = 25;
7
- export let latlng;
8
- export let id = "";
9
- export let options = {};
10
- let markerElement;
11
- let marker;
12
- const getMap = getContext("map");
13
- const getLayerGroup = getContext("layerGroup");
14
- setContext("layer", () => marker);
15
- $:
16
- recreateMarker(size, latlng, id, options);
17
- async function recreateMarker(size2, latlng2, id2, options2) {
18
- removeMarker();
19
- await tick();
20
- createMarker(size2, latlng2, id2, options2);
21
- }
22
- async function createMarker(size2, latlng2, id2, options2) {
23
- await tick();
24
- const layerGroup = getLayerGroup?.();
25
- const map = getMap();
26
- const mapOrLayerGroup = layerGroup || map;
27
- marker = L.marker(latlng2, options2);
28
- marker.id = id2;
29
- marker.on("click", (e) => dispatch("click", e)).on("dblclick", (e) => dispatch("dblclick", e)).on("contextmenu", (e) => dispatch("contextmenu", e)).on("dragstart", (e) => dispatch("dragstart", e)).on("drag", (e) => dispatch("drag", e)).on("dragend", (e) => dispatch("dragend", e));
30
- mapOrLayerGroup.addLayer(marker);
31
- await tick();
32
- if (markerElement.childElementCount > 0) {
33
- marker.setIcon(
34
- L.divIcon({
35
- html: markerElement,
36
- className: "map-marker",
37
- iconSize: L.point(size2, size2)
38
- })
39
- );
40
- }
41
- }
42
- function removeMarker() {
43
- if (!marker)
44
- return;
45
- const layerGroup = getLayerGroup?.();
46
- const map = getMap();
47
- const mapOrLayerGroup = layerGroup || map;
48
- mapOrLayerGroup.removeLayer(marker);
49
- }
50
- onDestroy(() => {
51
- removeMarker();
52
- });
53
- </script>
14
+ type Props = {
15
+ latlng: LatLngExpression;
16
+ options?: MarkerOptions;
17
+ instance?: LeafletMarker;
18
+ children?: Snippet;
19
+ } & MarkerEvents;
20
+
21
+ let {
22
+ latlng,
23
+ options = $bindable(),
24
+ instance = $bindable(),
25
+ children,
26
+ ...restProps
27
+ }: Props = $props();
28
+
29
+ const getMap = getContext<() => LeafletMap>(MAP);
30
+ const getLayerGroup = getContext<() => LayerGroup | MarkerClusterGroup>(LAYERGROUP);
31
+ setContext(MARKER, () => instance);
32
+
33
+ $effect(() => {
34
+ if (instance && options) {
35
+ updateMarkerProps(instance, options);
36
+ }
37
+ });
54
38
 
55
- <template>
56
- {#key marker}
57
- {#if marker}
58
- <div bind:this={markerElement} class="leaflet-marker">
59
- <slot name="icon" />
60
- </div>
61
- <slot />
62
- {/if}
63
- {/key}
64
- </template>
39
+ $effect(() => {
40
+ if (!instance?.getLatLng().equals(latlng)) {
41
+ instance?.setLatLng(latlng);
42
+ }
43
+ });
65
44
 
66
- <style>
67
- .leaflet-marker {
68
- display: none;
69
- }
45
+ onMount(() => {
46
+ const markerOptions = { ...options };
47
+ instance = window.L.marker(latlng, markerOptions);
48
+ bindEvents(instance, restProps, markerEvents);
49
+
50
+ const map = getMap();
51
+ const layerGroup = getLayerGroup?.();
52
+ const mapOrLayerGroup = layerGroup || map;
53
+ instance.addTo(mapOrLayerGroup);
54
+ mapOrLayerGroup.remove;
55
+ });
56
+
57
+ onDestroy(() => {
58
+ const layerGroup = getLayerGroup?.();
59
+ const map = getMap();
60
+ if (instance) {
61
+ if (layerGroup) {
62
+ layerGroup.removeLayer(instance);
63
+ } else {
64
+ map.removeLayer(instance);
65
+ }
66
+ }
67
+ });
68
+ </script>
70
69
 
71
- :global(.map-marker .leaflet-marker) {
72
- display: inherit;
73
- }
74
- </style>
70
+ {#if instance && children}
71
+ {@render children()}
72
+ {/if}
@@ -1,34 +1,11 @@
1
- import { SvelteComponent } from "svelte";
2
- type MarkerContext = {
3
- id?: string;
4
- };
5
- export type Marker = LeafletMarker & MarkerContext;
6
- import type { LatLngExpression, Marker as LeafletMarker, MarkerOptions } from 'leaflet';
7
- declare const __propDef: {
8
- props: {
9
- size?: number | undefined;
10
- latlng: LatLngExpression;
11
- id?: string | undefined;
12
- options?: MarkerOptions | undefined;
13
- };
14
- events: {
15
- click: CustomEvent<any>;
16
- dblclick: CustomEvent<any>;
17
- contextmenu: CustomEvent<any>;
18
- dragstart: CustomEvent<any>;
19
- drag: CustomEvent<any>;
20
- dragend: CustomEvent<any>;
21
- } & {
22
- [evt: string]: CustomEvent<any>;
23
- };
24
- slots: {
25
- icon: {};
26
- default: {};
27
- };
28
- };
29
- export type MarkerProps = typeof __propDef.props;
30
- export type MarkerEvents = typeof __propDef.events;
31
- export type MarkerSlots = typeof __propDef.slots;
32
- export default class Marker extends SvelteComponent<MarkerProps, MarkerEvents, MarkerSlots> {
33
- }
34
- export {};
1
+ import { type Snippet } from 'svelte';
2
+ import type { Marker as LeafletMarker, MarkerOptions } from 'leaflet';
3
+ import { type LatLngExpression } from './index.js';
4
+ import { type MarkerEvents } from './marker.svelte.js';
5
+ declare const Marker: import("svelte").Component<{
6
+ latlng: LatLngExpression;
7
+ options?: MarkerOptions;
8
+ instance?: LeafletMarker;
9
+ children?: Snippet;
10
+ } & MarkerEvents, {}, "instance" | "options">;
11
+ export default Marker;
@@ -1,44 +1,75 @@
1
- <script>import { getContext, onMount, setContext, tick } from "svelte";
2
- export let options = {};
3
- export let icon = null;
4
- let markerElement;
5
- const L = globalThis.window.L;
6
- const getMap = getContext("map");
7
- let clusterGroup;
8
- setContext("layerGroup", () => clusterGroup);
9
- onMount(async () => {
10
- const map = getMap();
11
- if (icon) {
12
- options.iconCreateFunction = function(cluster) {
13
- const html = document.createElement("div");
14
- new icon({ target: html, props: { count: cluster.getChildCount() } });
15
- return L.divIcon({ html, className: "foobar" });
16
- };
17
- }
18
- if (markerElement.childElementCount > 0) {
19
- options.iconCreateFunction = function(cluster) {
20
- const html = markerElement.innerHTML.replace("%count%", cluster.getChildCount().toString());
21
- return L.divIcon({ html, className: "" });
22
- };
23
- }
24
- clusterGroup = L.markerClusterGroup(options);
25
- map.addLayer(clusterGroup);
26
- });
1
+ <script lang="ts">
2
+ import {
3
+ getContext,
4
+ mount,
5
+ onDestroy,
6
+ onMount,
7
+ setContext,
8
+ type Component,
9
+ type Snippet,
10
+ } from 'svelte';
11
+ import type {
12
+ MarkerClusterGroup as LeafletMarkerClusterGroup,
13
+ LayerGroup as LeafletLayerGroup,
14
+ MarkerClusterGroupOptions,
15
+ LeafletEventHandlerFnMap,
16
+ MarkerCluster,
17
+ } from 'leaflet';
18
+ import { LAYERGROUP, MAP } from './contexts.js';
19
+ import {
20
+ markerClusterGroupEvents,
21
+ type MarkerClusterGroupEvents,
22
+ } from './markerClusterGroup.svelte.js';
23
+ import { bindEvents } from './index.js';
24
+
25
+ type Props = {
26
+ icon?: Component<{ count: number }>;
27
+ instance?: LeafletMarkerClusterGroup;
28
+ options?: MarkerClusterGroupOptions;
29
+ children?: Snippet;
30
+ } & MarkerClusterGroupEvents;
31
+
32
+ let { instance = $bindable(), options, children, icon, ...restProps }: Props = $props();
33
+
34
+ const getMap = getContext<() => L.Map>(MAP);
35
+ const getLayerGroup = getContext<() => LeafletLayerGroup>(LAYERGROUP);
36
+
37
+ setContext(LAYERGROUP, () => instance);
38
+
39
+ onMount(() => {
40
+ const map = getMap?.();
41
+ const layerGroup = getLayerGroup?.();
42
+ const context = layerGroup || map;
43
+
44
+ const mergedOptions = { ...options };
45
+ if (icon) {
46
+ mergedOptions.iconCreateFunction = (cluster: MarkerCluster) => {
47
+ const mountTarget = document.createElement('div');
48
+ mountTarget.classList.add('MOUNTTARGET');
49
+ mount(icon, {
50
+ target: mountTarget,
51
+ props: { count: cluster.getChildCount() },
52
+ });
53
+ const html = mountTarget.innerHTML;
54
+ return window.L.divIcon({ html });
55
+ };
56
+ }
57
+
58
+ instance = window.L.markerClusterGroup(mergedOptions);
59
+ context.addLayer(instance);
60
+ bindEvents(
61
+ instance,
62
+ restProps,
63
+ // TODO : find a better way to type this
64
+ markerClusterGroupEvents as unknown as readonly (keyof LeafletEventHandlerFnMap)[],
65
+ );
66
+ });
67
+
68
+ onDestroy(() => {
69
+ instance?.clearLayers();
70
+ });
27
71
  </script>
28
72
 
29
- <slot />
30
- <template>
31
- <div bind:this={markerElement} class="leaflet-markercluster">
32
- <slot name="icon" />
33
- </div>
34
- </template>
35
-
36
- <style>
37
- .leaflet-markercluster {
38
- display: none;
39
- }
40
-
41
- :global(.map-marker .leaflet-markercluster) {
42
- display: inherit;
43
- }
44
- </style>
73
+ {#if instance && children}
74
+ {@render children()}
75
+ {/if}
@@ -1,21 +1,69 @@
1
- import { SvelteComponent } from "svelte";
2
- import type { MarkerClusterGroupOptions } from 'leaflet';
3
- declare const __propDef: {
4
- props: {
5
- options?: MarkerClusterGroupOptions | undefined;
6
- icon?: any;
7
- };
8
- events: {
9
- [evt: string]: CustomEvent<any>;
10
- };
11
- slots: {
12
- default: {};
13
- icon: {};
14
- };
15
- };
16
- export type MarkerClusterGroupProps = typeof __propDef.props;
17
- export type MarkerClusterGroupEvents = typeof __propDef.events;
18
- export type MarkerClusterGroupSlots = typeof __propDef.slots;
19
- export default class MarkerClusterGroup extends SvelteComponent<MarkerClusterGroupProps, MarkerClusterGroupEvents, MarkerClusterGroupSlots> {
20
- }
21
- export {};
1
+ import { type Component, type Snippet } from 'svelte';
2
+ import type { MarkerClusterGroup as LeafletMarkerClusterGroup, MarkerClusterGroupOptions } from 'leaflet';
3
+ declare const MarkerClusterGroup: Component<{
4
+ icon?: Component<{
5
+ count: number;
6
+ }>;
7
+ instance?: LeafletMarkerClusterGroup;
8
+ options?: MarkerClusterGroupOptions;
9
+ children?: Snippet;
10
+ } & {
11
+ onclustermovestart?: ((e: Omit<import("leaflet").LeafletEvent, "sourceTarget"> & {
12
+ sourceTarget: import("leaflet").Marker<any>;
13
+ }) => void) | undefined;
14
+ onclustermove?: ((e: Omit<import("leaflet").LeafletEvent, "sourceTarget"> & {
15
+ sourceTarget: import("leaflet").Marker<any>;
16
+ }) => void) | undefined;
17
+ onclustermoveend?: ((e: Omit<import("leaflet").LeafletEvent, "sourceTarget"> & {
18
+ sourceTarget: import("leaflet").Marker<any>;
19
+ }) => void) | undefined;
20
+ onclusterdragstart?: ((e: Omit<import("leaflet").LeafletEvent, "sourceTarget"> & {
21
+ sourceTarget: import("leaflet").Marker<any>;
22
+ }) => void) | undefined;
23
+ onclusterdrag?: ((e: Omit<import("leaflet").LeafletEvent, "sourceTarget"> & {
24
+ sourceTarget: import("leaflet").Marker<any>;
25
+ }) => void) | undefined;
26
+ onclusteradd?: ((e: Omit<import("leaflet").LeafletEvent, "sourceTarget"> & {
27
+ sourceTarget: import("leaflet").Marker<any>;
28
+ }) => void) | undefined;
29
+ onclusterremove?: ((e: Omit<import("leaflet").LeafletEvent, "sourceTarget"> & {
30
+ sourceTarget: import("leaflet").Marker<any>;
31
+ }) => void) | undefined;
32
+ onclusterpopupopen?: ((e: Omit<import("leaflet").PopupEvent, "sourceTarget"> & {
33
+ sourceTarget: import("leaflet").Marker<any>;
34
+ }) => void) | undefined;
35
+ onclusterpopupclose?: ((e: Omit<import("leaflet").PopupEvent, "sourceTarget"> & {
36
+ sourceTarget: import("leaflet").Marker<any>;
37
+ }) => void) | undefined;
38
+ onclustertooltipopen?: ((e: Omit<import("leaflet").TooltipEvent, "sourceTarget"> & {
39
+ sourceTarget: import("leaflet").Marker<any>;
40
+ }) => void) | undefined;
41
+ onclustertooltipclose?: ((e: Omit<import("leaflet").TooltipEvent, "sourceTarget"> & {
42
+ sourceTarget: import("leaflet").Marker<any>;
43
+ }) => void) | undefined;
44
+ onclusterclick?: ((e: Omit<import("leaflet").LeafletMouseEvent, "sourceTarget"> & {
45
+ sourceTarget: import("leaflet").Marker<any>;
46
+ }) => void) | undefined;
47
+ onclusterdblclick?: ((e: Omit<import("leaflet").LeafletMouseEvent, "sourceTarget"> & {
48
+ sourceTarget: import("leaflet").Marker<any>;
49
+ }) => void) | undefined;
50
+ onclustermousedown?: ((e: Omit<import("leaflet").LeafletMouseEvent, "sourceTarget"> & {
51
+ sourceTarget: import("leaflet").Marker<any>;
52
+ }) => void) | undefined;
53
+ onclustermouseup?: ((e: Omit<import("leaflet").LeafletMouseEvent, "sourceTarget"> & {
54
+ sourceTarget: import("leaflet").Marker<any>;
55
+ }) => void) | undefined;
56
+ onclustermouseover?: ((e: Omit<import("leaflet").LeafletMouseEvent, "sourceTarget"> & {
57
+ sourceTarget: import("leaflet").Marker<any>;
58
+ }) => void) | undefined;
59
+ onclustermouseout?: ((e: Omit<import("leaflet").LeafletMouseEvent, "sourceTarget"> & {
60
+ sourceTarget: import("leaflet").Marker<any>;
61
+ }) => void) | undefined;
62
+ onclustercontextmenu?: ((e: Omit<import("leaflet").LeafletMouseEvent, "sourceTarget"> & {
63
+ sourceTarget: import("leaflet").Marker<any>;
64
+ }) => void) | undefined;
65
+ onclusterdragend?: ((e: Omit<import("leaflet").DragEndEvent, "sourceTarget"> & {
66
+ sourceTarget: import("leaflet").Marker<any>;
67
+ }) => void) | undefined;
68
+ } & import("./utils.js").CreateSvelteEventsMap<readonly ["animationend", "spiderfied", "unspiderfied"]>, {}, "instance">;
69
+ export default MarkerClusterGroup;
@@ -0,0 +1,43 @@
1
+ <script lang="ts">
2
+ import { getContext, onDestroy, onMount } from 'svelte';
3
+ import type { Polygon as LeafletPolygon, PolylineOptions, LayerGroup } from 'leaflet';
4
+ import { polygonEvents, updatePolylineProps, type PolygonEvents } from './polyline.svelte.js';
5
+ import { bindEvents, type Latlngs, type LeafletMap } from './index.js';
6
+ import { LAYERGROUP, MAP } from './contexts.js';
7
+
8
+ type Props = {
9
+ latlngs: Latlngs<3>;
10
+ instance?: LeafletPolygon;
11
+ options?: PolylineOptions;
12
+ } & PolygonEvents;
13
+
14
+ let { latlngs, instance = $bindable(), options = {}, ...restProps }: Props = $props();
15
+
16
+ const getMap = getContext<() => LeafletMap>(MAP);
17
+ const getLayerGroup = getContext<() => LayerGroup>(LAYERGROUP);
18
+
19
+ onMount(() => {
20
+ const map = getMap?.();
21
+ const layerGroup = getLayerGroup?.();
22
+ const context = layerGroup || map;
23
+ instance = window.L.polygon(latlngs, options);
24
+ instance.addTo(context);
25
+ bindEvents(instance, restProps, polygonEvents);
26
+ });
27
+
28
+ onDestroy(() => {
29
+ instance?.remove();
30
+ });
31
+
32
+ $effect(() => {
33
+ if (instance && latlngs) {
34
+ instance.setLatLngs(latlngs);
35
+ }
36
+ });
37
+
38
+ $effect(() => {
39
+ if (instance && options) {
40
+ updatePolylineProps(instance, options);
41
+ }
42
+ });
43
+ </script>
@@ -0,0 +1,9 @@
1
+ import type { Polygon as LeafletPolygon, PolylineOptions } from 'leaflet';
2
+ import { type PolygonEvents } from './polyline.svelte.js';
3
+ import { type Latlngs } from './index.js';
4
+ declare const Polygon: import("svelte").Component<{
5
+ latlngs: Latlngs<3>;
6
+ instance?: LeafletPolygon;
7
+ options?: PolylineOptions;
8
+ } & PolygonEvents, {}, "instance">;
9
+ export default Polygon;
@@ -1,26 +1,43 @@
1
- <script>import { createEventDispatcher, getContext, onDestroy, onMount } from "svelte";
2
- export let latlngs;
3
- export let options = {};
4
- let line;
5
- let map = getContext("map")();
6
- const dispatch = createEventDispatcher();
7
- $:
8
- updateLine(latlngs, options);
9
- function updateLine(latLngs, lineStyle) {
10
- if (line) {
11
- line.setLatLngs(latLngs);
12
- line.setStyle(lineStyle);
13
- }
14
- }
15
- onMount(async () => {
16
- const L = window.L;
17
- line = new L.Polyline(latlngs, options);
18
- line.on("click", (e) => dispatch("click", e));
19
- line.addTo(map);
20
- });
21
- onDestroy(() => {
22
- line?.remove();
23
- });
24
- </script>
1
+ <script lang="ts">
2
+ import { getContext, onDestroy, onMount } from 'svelte';
3
+ import type { Polyline as LeafletPolyline, PolylineOptions, LayerGroup } from 'leaflet';
4
+ import { polygonEvents, updatePolylineProps, type PolygonEvents } from './polyline.svelte.js';
5
+ import { bindEvents, type Latlngs, type LeafletMap } from './index.js';
6
+ import { LAYERGROUP, MAP } from './contexts.js';
7
+
8
+ type Props = {
9
+ latlngs: Latlngs;
10
+ instance?: LeafletPolyline;
11
+ options?: PolylineOptions;
12
+ } & PolygonEvents;
13
+
14
+ let { latlngs, instance = $bindable(), options = {}, ...restProps }: Props = $props();
15
+
16
+ const getMap = getContext<() => LeafletMap>(MAP);
17
+ const getLayerGroup = getContext<() => LayerGroup>(LAYERGROUP);
25
18
 
26
- <slot />
19
+ onMount(() => {
20
+ const map = getMap?.();
21
+ const layerGroup = getLayerGroup?.();
22
+ const context = layerGroup || map;
23
+ instance = window.L.polyline(latlngs, options);
24
+ instance.addTo(context);
25
+ bindEvents(instance, restProps, polygonEvents);
26
+ });
27
+
28
+ onDestroy(() => {
29
+ instance?.remove();
30
+ });
31
+
32
+ $effect(() => {
33
+ if (instance && latlngs) {
34
+ instance.setLatLngs(latlngs);
35
+ }
36
+ });
37
+
38
+ $effect(() => {
39
+ if (instance && options) {
40
+ updatePolylineProps(instance, options);
41
+ }
42
+ });
43
+ </script>
@@ -1,22 +1,9 @@
1
- import { SvelteComponent } from "svelte";
2
- import type { LatLngExpression, PathOptions } from 'leaflet';
3
- declare const __propDef: {
4
- props: {
5
- latlngs: LatLngExpression[];
6
- options?: PathOptions | undefined;
7
- };
8
- events: {
9
- click: CustomEvent<any>;
10
- } & {
11
- [evt: string]: CustomEvent<any>;
12
- };
13
- slots: {
14
- default: {};
15
- };
16
- };
17
- export type PolylineProps = typeof __propDef.props;
18
- export type PolylineEvents = typeof __propDef.events;
19
- export type PolylineSlots = typeof __propDef.slots;
20
- export default class Polyline extends SvelteComponent<PolylineProps, PolylineEvents, PolylineSlots> {
21
- }
22
- export {};
1
+ import type { Polyline as LeafletPolyline, PolylineOptions } from 'leaflet';
2
+ import { type PolygonEvents } from './polyline.svelte.js';
3
+ import { type Latlngs } from './index.js';
4
+ declare const Polyline: import("svelte").Component<{
5
+ latlngs: Latlngs;
6
+ instance?: LeafletPolyline;
7
+ options?: PolylineOptions;
8
+ } & PolygonEvents, {}, "instance">;
9
+ export default Polyline;