@radiofrance/svelte-leaflet 1.0.0-next.0 → 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.
package/dist/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
- import type { ControlPosition, Evented, LatLngExpression, LeafletEventHandlerFnMap, LocateOptions } from 'leaflet';
1
+ import type { ControlPosition, Evented, LatLngExpression, LeafletEvent as OriginalLeafletEvent, LeafletEventHandlerFnMap, LocateOptions } from 'leaflet';
2
2
  import DivIcon from './DivIcon.svelte';
3
+ import LocateControl from './LocateControl.svelte';
3
4
  import Map from './Map.svelte';
4
5
  import Marker from './Marker.svelte';
5
6
  import MarkerClusterGroup from './MarkerClusterGroup.svelte';
6
- import Popup from './Popup.svelte';
7
7
  import Polygon from './Polygon.svelte';
8
- import LocateControl from './LocateControl.svelte';
9
- export { DivIcon, Map, Marker, MarkerClusterGroup, Popup, Polygon, LocateControl };
10
- export type { Circle as LeafletCircle, CircleOptions, DragEndEvent, ErrorEvent, LatLngBoundsLiteral, LatLngExpression, LatLngLiteral, LatLngTuple, LayerEvent, LayersControlEvent, LeafletEvent, LeafletKeyboardEvent, LeafletMouseEvent, LocationEvent, Map as LeafletMap, MapOptions, MarkerOptions, PathOptions, PopupEvent, PopupOptions, ResizeEvent, TooltipEvent, } from 'leaflet';
8
+ import Polyline from './Polyline.svelte';
9
+ import Popup from './Popup.svelte';
10
+ export { DivIcon, Map, Marker, MarkerClusterGroup, Popup, Polyline, Polygon, LocateControl };
11
+ export type { Circle as LeafletCircle, CircleOptions, DragEndEvent, ErrorEvent, LatLngBoundsLiteral, LatLngExpression, LatLngLiteral, LatLngTuple, LayerEvent, LayersControlEvent, LeafletKeyboardEvent, LeafletMouseEvent, LocationEvent, Map as LeafletMap, Marker as LeafletMarker, MapOptions, MarkerOptions, PathOptions, PopupEvent, PopupOptions, ResizeEvent, TooltipEvent, } from 'leaflet';
11
12
  export type Latlngs<D = 2> = 2 extends D ? LatLngExpression[] | LatLngExpression[][] : 3 extends D ? LatLngExpression[] | LatLngExpression[][] | LatLngExpression[][][] : never;
12
13
  export type PrefixedLeafletEventHandlerFnMap = {
13
14
  [K in keyof LeafletEventHandlerFnMap as `on${K}`]: LeafletEventHandlerFnMap[K];
@@ -17,3 +18,6 @@ export type LocateControlOptions = {
17
18
  position?: ControlPosition;
18
19
  options?: LocateOptions;
19
20
  };
21
+ export type LeafletEvent<SourceTarget = any> = Omit<OriginalLeafletEvent, 'sourceTarget'> & {
22
+ sourceTarget: SourceTarget;
23
+ };
package/dist/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  // Reexport your entry components here
2
2
  import DivIcon from './DivIcon.svelte';
3
+ import LocateControl from './LocateControl.svelte';
3
4
  import Map from './Map.svelte';
4
5
  import Marker from './Marker.svelte';
5
6
  import MarkerClusterGroup from './MarkerClusterGroup.svelte';
6
- import Popup from './Popup.svelte';
7
7
  import Polygon from './Polygon.svelte';
8
- import LocateControl from './LocateControl.svelte';
9
- export { DivIcon, Map, Marker, MarkerClusterGroup, Popup, Polygon, LocateControl };
8
+ import Polyline from './Polyline.svelte';
9
+ import Popup from './Popup.svelte';
10
+ export { DivIcon, Map, Marker, MarkerClusterGroup, Popup, Polyline, Polygon, LocateControl };
10
11
  export function bindEvents(instance, eventsProps, events) {
11
12
  events.forEach((event) => {
12
13
  const eventCallback = eventsProps[`on${event}`];
package/dist/utils.d.ts CHANGED
@@ -10,3 +10,6 @@ export type CreateSvelteEventsMap<EventNames extends readonly (keyof LeafletEven
10
10
  sourceTarget: SourceTarget;
11
11
  }) => void;
12
12
  };
13
+ export type Simplify<T> = T extends object ? T extends infer O ? {
14
+ [K in keyof O]: Simplify<O[K]>;
15
+ } : never : T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radiofrance/svelte-leaflet",
3
- "version": "1.0.0-next.0",
3
+ "version": "1.0.0-next.1",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",