@maptiler/geocoding-control 0.0.42 → 0.0.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/geocoding-control",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "Martin Ždila",
@@ -43,20 +43,20 @@
43
43
  },
44
44
  "types": "./dist/lib/index.d.ts",
45
45
  "devDependencies": {
46
- "@sveltejs/vite-plugin-svelte": "^1.1.0",
46
+ "@sveltejs/vite-plugin-svelte": "^1.2.0",
47
47
  "@tsconfig/svelte": "^3.0.0",
48
48
  "@turf/buffer": "^6.5.0",
49
49
  "@turf/difference": "^6.5.0",
50
50
  "@turf/union": "^6.5.0",
51
51
  "@types/leaflet": "^1.9.0",
52
52
  "prettier": "^2.7.1",
53
- "prettier-plugin-svelte": "^2.8.0",
54
- "svelte": "^3.52.0",
53
+ "prettier-plugin-svelte": "^2.8.1",
54
+ "svelte": "^3.53.1",
55
55
  "svelte-check": "^2.9.2",
56
56
  "svelte-preprocess": "^4.10.7",
57
57
  "tslib": "^2.4.1",
58
- "typescript": "^4.8.4",
59
- "vite": "^3.2.3"
58
+ "typescript": "^4.9.3",
59
+ "vite": "^3.2.4"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "leaflet": "^1.9.2",
@@ -1,12 +1,11 @@
1
- import {
2
- type Map,
3
- type IControl,
4
- type MarkerOptions,
5
- type FlyToOptions,
6
- type FitBoundsOptions,
7
- Evented,
8
- type FillLayerSpecification,
9
- type LineLayerSpecification,
1
+ import type {
2
+ Map,
3
+ IControl,
4
+ MarkerOptions,
5
+ FlyToOptions,
6
+ FitBoundsOptions,
7
+ FillLayerSpecification,
8
+ LineLayerSpecification,
10
9
  } from "maplibre-gl";
11
10
  import type maplibregl from "maplibre-gl";
12
11
  import GeocodingControlComponent from "./GeocodingControl.svelte";
@@ -61,7 +60,7 @@ type MapLibreControlOptions = ControlOptions & {
61
60
  };
62
61
  };
63
62
 
64
- export class GeocodingControl extends Evented implements IControl {
63
+ export class GeocodingControl extends EventTarget implements IControl {
65
64
  #gc?: GeocodingControlComponent;
66
65
 
67
66
  #options: MapLibreControlOptions;
@@ -118,9 +117,7 @@ export class GeocodingControl extends Evented implements IControl {
118
117
  "reverseToggle",
119
118
  "queryChange",
120
119
  ]) {
121
- this.#gc.$on(eventName, (event) =>
122
- this.fire(eventName.toLowerCase(), event.detail)
123
- );
120
+ this.#gc.$on(eventName, (event) => this.dispatchEvent(event));
124
121
  }
125
122
 
126
123
  return div;
@@ -6,12 +6,8 @@ import type {
6
6
  MultiPolygon,
7
7
  LineString,
8
8
  MultiLineString,
9
- Feature as TurfFeature,
10
- Position,
11
9
  } from "@turf/helpers";
12
- import difference from "@turf/difference";
13
10
  import union from "@turf/union";
14
- import buffer from "@turf/buffer";
15
11
  import { setMask } from "./mask";
16
12
 
17
13
  export function createLeafletMapController(
@@ -13,15 +13,11 @@ import type {
13
13
  import MarkerIcon from "./MarkerIcon.svelte";
14
14
  import type { Feature, MapController, Proximity } from "./types";
15
15
  import union from "@turf/union";
16
- import buffer from "@turf/buffer";
17
- import difference from "@turf/difference";
18
16
  import type {
19
17
  Polygon,
20
18
  MultiPolygon,
21
19
  LineString,
22
20
  MultiLineString,
23
- Feature as TurfFeature,
24
- Position,
25
21
  } from "@turf/helpers";
26
22
  import { setMask } from "./mask";
27
23