@radiofrance/svelte-leaflet 0.1.0-alpha.10 → 0.1.0-alpha.12

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/Map.svelte CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  popupEvents,
17
17
  tooltipEvents
18
18
  } from "./index.js";
19
- import GeolocationButton from "$components/GeolocationButton.svelte";
19
+ import GeolocationButton from "./private/GeolocationButton.svelte";
20
20
  let L;
21
21
  let locateButtonContainer;
22
22
  export let options = {};
@@ -52,16 +52,14 @@ onDestroy(() => {
52
52
  });
53
53
  </script>
54
54
 
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>
55
+ {#key marker}
56
+ {#if marker}
57
+ <div bind:this={markerElement} class="leaflet-marker">
58
+ <slot name="icon" />
59
+ </div>
60
+ <slot />
61
+ {/if}
62
+ {/key}
65
63
 
66
64
  <style>
67
65
  .leaflet-marker {
@@ -0,0 +1,32 @@
1
+ <script>
2
+ import GeolocationIcon from './GeolocationIcon.svelte';
3
+ </script>
4
+
5
+ <div>
6
+ <button>
7
+ <GeolocationIcon width="1rem" />
8
+ </button>
9
+ </div>
10
+
11
+ <style>
12
+ button {
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ width: 30px;
17
+ height: 30px;
18
+ background-color: white;
19
+ cursor: pointer;
20
+ border: none;
21
+ border-radius: 2px;
22
+ }
23
+
24
+ button:hover {
25
+ background-color: #f4f4f4;
26
+ }
27
+
28
+ div {
29
+ border-radius: 4px;
30
+ border: 2px solid rgba(0, 0, 0, 0.2);
31
+ }
32
+ </style>
@@ -0,0 +1,23 @@
1
+ /** @typedef {typeof __propDef.props} GeolocationButtonProps */
2
+ /** @typedef {typeof __propDef.events} GeolocationButtonEvents */
3
+ /** @typedef {typeof __propDef.slots} GeolocationButtonSlots */
4
+ export default class GeolocationButton extends SvelteComponent<{
5
+ [x: string]: never;
6
+ }, {
7
+ [evt: string]: CustomEvent<any>;
8
+ }, {}> {
9
+ }
10
+ export type GeolocationButtonProps = typeof __propDef.props;
11
+ export type GeolocationButtonEvents = typeof __propDef.events;
12
+ export type GeolocationButtonSlots = typeof __propDef.slots;
13
+ import { SvelteComponent } from "svelte";
14
+ declare const __propDef: {
15
+ props: {
16
+ [x: string]: never;
17
+ };
18
+ events: {
19
+ [evt: string]: CustomEvent<any>;
20
+ };
21
+ slots: {};
22
+ };
23
+ export {};
@@ -0,0 +1,20 @@
1
+ <script>export let width = "32";
2
+ </script>
3
+
4
+ <svg
5
+ {width}
6
+ viewBox="0 0 16 16"
7
+ version="1.1"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ xmlns:xlink="http://www.w3.org/1999/xlink"
10
+ fill="#000000"
11
+ >
12
+ <g id="SVGRepo_bgCarrier" stroke-width="0"></g>
13
+ <g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
14
+ <g id="SVGRepo_iconCarrier">
15
+ <rect width="16" height="16" id="icon-bound" fill="none"></rect>
16
+ <path
17
+ d="M13.916,7C13.494,4.488,11.512,2.506,9,2.084V0H7v2.084C4.488,2.506,2.506,4.488,2.084,7H0v2h2.084 C2.506,11.512,4.488,13.494,7,13.916V16h2v-2.084c2.512-0.422,4.494-2.403,4.916-4.916H16V7H13.916z M10.828,10.828 C10.072,11.584,9.069,12,8,12s-2.072-0.416-2.828-1.172S4,9.069,4,8s0.416-2.072,1.172-2.828S6.931,4,8,4s2.072,0.416,2.828,1.172 S12,6.931,12,8S11.584,10.072,10.828,10.828z M8,6C6.897,6,6,6.897,6,8s0.897,2,2,2s2-0.897,2-2S9.103,6,8,6z"
18
+ ></path>
19
+ </g>
20
+ </svg>
@@ -0,0 +1,16 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: {
4
+ width?: string | undefined;
5
+ };
6
+ events: {
7
+ [evt: string]: CustomEvent<any>;
8
+ };
9
+ slots: {};
10
+ };
11
+ export type GeolocationIconProps = typeof __propDef.props;
12
+ export type GeolocationIconEvents = typeof __propDef.events;
13
+ export type GeolocationIconSlots = typeof __propDef.slots;
14
+ export default class GeolocationIcon extends SvelteComponent<GeolocationIconProps, GeolocationIconEvents, GeolocationIconSlots> {
15
+ }
16
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radiofrance/svelte-leaflet",
3
- "version": "0.1.0-alpha.10",
3
+ "version": "0.1.0-alpha.12",
4
4
  "description": "A library that wraps leaflet classes in domless/renderless svelte components.",
5
5
  "keywords": [
6
6
  "svelte",