@maptiler/geocoding-control 3.0.0-rc.6 → 3.0.0-rc.8
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/check-version.js +69 -0
- package/dist/check-version.d.ts +1 -0
- package/dist/index.js +188 -178
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +55 -50
- package/dist/index.umd.js.map +1 -1
- package/dist/leaflet.public.js +313 -303
- package/dist/leaflet.public.js.map +1 -1
- package/dist/leaflet.public.umd.js +51 -46
- package/dist/leaflet.public.umd.js.map +1 -1
- package/dist/maplibregl.js +188 -178
- package/dist/maplibregl.js.map +1 -1
- package/dist/maplibregl.umd.js +50 -45
- package/dist/maplibregl.umd.js.map +1 -1
- package/dist/maptilersdk.js +243 -233
- package/dist/maptilersdk.js.map +1 -1
- package/dist/maptilersdk.umd.js +62 -57
- package/dist/maptilersdk.umd.js.map +1 -1
- package/dist/openlayers.public.js +225 -214
- package/dist/openlayers.public.js.map +1 -1
- package/dist/openlayers.public.umd.js +51 -46
- package/dist/openlayers.public.umd.js.map +1 -1
- package/dist/src/components/clear-icon.d.ts +1 -0
- package/dist/src/components/fail-icon.d.ts +1 -0
- package/dist/src/components/loading-icon.d.ts +1 -0
- package/dist/src/components/marker.d.ts +1 -0
- package/dist/src/components/reverse-geocoding-icon.d.ts +1 -0
- package/dist/src/components/search-icon.d.ts +1 -0
- package/dist/src/controls/maplibregl-control.d.ts +2 -7
- package/dist/src/controls/maplibregl-events.d.ts +2 -3
- package/dist/src/controls/maplibregl-options.d.ts +1 -9
- package/dist/src/geocoder/geocoder-feature-item.d.ts +1 -0
- package/dist/src/geocoder/geocoder.d.ts +5 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/leaflet.public.d.ts +1 -0
- package/dist/src/maplibregl.d.ts +1 -0
- package/dist/src/maptilersdk.d.ts +1 -0
- package/dist/src/openlayers.public.d.ts +1 -0
- package/package.json +20 -10
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import { default as maplibregl } from 'maplibre-gl';
|
|
1
|
+
import { IControl, Map as MLMap, Subscription, default as maplibregl } from 'maplibre-gl';
|
|
2
2
|
import { GeocodingControlBase } from './base-control';
|
|
3
3
|
import { MaplibreglGeocodingControlEventName, MaplibreglGeocodingControlEventNameMap } from './maplibregl-events';
|
|
4
4
|
import { MaplibreglGeocodingControlOptions } from './maplibregl-options';
|
|
5
|
-
declare const Evented: typeof maplibregl.Evented;
|
|
6
|
-
type Evented = maplibregl.Evented;
|
|
7
|
-
type IControl = maplibregl.IControl;
|
|
8
|
-
type MLMap = maplibregl.Map;
|
|
9
|
-
type Subscription = maplibregl.Subscription;
|
|
10
5
|
type EventHandlingMethod<Return> = <Type extends MaplibreglGeocodingControlEventName>(type: Type, listener: (event: MaplibreglGeocodingControlEventNameMap[Type]) => void) => Return;
|
|
11
6
|
interface EventOnceHandlingMethod<Return> {
|
|
12
7
|
<Type extends MaplibreglGeocodingControlEventName>(type: Type, listener: (event: MaplibreglGeocodingControlEventNameMap[Type]) => void): Return;
|
|
13
8
|
<Type extends MaplibreglGeocodingControlEventName>(type: Type, listener?: undefined): Promise<MaplibreglGeocodingControlEventNameMap[Type]>;
|
|
14
9
|
}
|
|
15
|
-
export declare class MaplibreglGeocodingControl extends Evented implements IControl, GeocodingControlBase<MaplibreglGeocodingControlOptions> {
|
|
10
|
+
export declare class MaplibreglGeocodingControl extends maplibregl.Evented implements IControl, GeocodingControlBase<MaplibreglGeocodingControlOptions> {
|
|
16
11
|
#private;
|
|
17
12
|
constructor(options?: MaplibreglGeocodingControlOptions);
|
|
18
13
|
/** @internal Not to be called directly */
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Evented, Marker } from 'maplibre-gl';
|
|
2
2
|
import { MaptilerGeocoderEvent } from '../geocoder/geocoder-events';
|
|
3
3
|
import { Feature } from '../types';
|
|
4
4
|
import { MaplibreglGeocodingControl } from './maplibregl-control';
|
|
5
|
-
type
|
|
6
|
-
type MLEvent = Extract<Parameters<maplibregl.Evented["fire"]>[0], object>;
|
|
5
|
+
type MLEvent = Extract<Parameters<Evented["fire"]>[0], object>;
|
|
7
6
|
type BaseEvent = MLEvent & {
|
|
8
7
|
target: MaplibreglGeocodingControl;
|
|
9
8
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FillLayerSpecification, FitBoundsOptions, FlyToOptions, LineLayerSpecification, Marker, MarkerOptions, Map as MLMap } from 'maplibre-gl';
|
|
2
2
|
import { MaptilerGeocoderOptions } from '../geocoder/geocoder-options';
|
|
3
3
|
import { Feature, FlyToFeatures, PickedResultStyle } from '../types';
|
|
4
|
-
type FillLayerSpecification = maplibregl.FillLayerSpecification;
|
|
5
|
-
type FitBoundsOptions = maplibregl.FitBoundsOptions;
|
|
6
|
-
type FlyToOptions = maplibregl.FlyToOptions;
|
|
7
|
-
type LineLayerSpecification = maplibregl.LineLayerSpecification;
|
|
8
|
-
type Marker = maplibregl.Marker;
|
|
9
|
-
type MarkerOptions = maplibregl.MarkerOptions;
|
|
10
|
-
type MLMap = maplibregl.Map;
|
|
11
4
|
export type MaplibreglGeocodingControlOptions = Omit<MaptilerGeocoderOptions, "apiKey" | "fetchFullGeometryOnPick"> & {
|
|
12
5
|
/**
|
|
13
6
|
* Maptiler API key. Optional if used with MapTiler SDK - if not specified, the control will use the same API key as the map uses.
|
|
@@ -111,4 +104,3 @@ export declare const DEFAULT_GEOMETRY_STYLE: FullGeometryStyle;
|
|
|
111
104
|
export declare const RESULT_SOURCE = "mtlr-gc-full-geom";
|
|
112
105
|
export declare const RESULT_LAYER_FILL = "mtlr-gc-full-geom-fill";
|
|
113
106
|
export declare const RESULT_LAYER_LINE = "mtlr-gc-full-geom-line";
|
|
114
|
-
export {};
|
|
@@ -2,6 +2,7 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import { Feature, ShowPlaceType } from '../types';
|
|
3
3
|
export declare class MaptilerGeocoderFeatureItemElement extends LitElement {
|
|
4
4
|
#private;
|
|
5
|
+
/** @internal */
|
|
5
6
|
static styles: import('lit').CSSResult;
|
|
6
7
|
feature?: Feature;
|
|
7
8
|
itemStyle: "selected" | "picked" | "default";
|
|
@@ -4,6 +4,7 @@ import { MaptilerGeocoderEventName, MaptilerGeocoderEventNameMap } from './geoco
|
|
|
4
4
|
import { MaptilerGeocoderOptions } from './geocoder-options';
|
|
5
5
|
export declare class MaptilerGeocoderElement extends LitElement implements MaptilerGeocoderOptions {
|
|
6
6
|
#private;
|
|
7
|
+
/** @internal */
|
|
7
8
|
static styles: import('lit').CSSResult;
|
|
8
9
|
adjustUrl?: (url: URL) => void;
|
|
9
10
|
apiKey?: string;
|
|
@@ -62,8 +63,10 @@ export declare class MaptilerGeocoderElement extends LitElement implements Mapti
|
|
|
62
63
|
private abortController?;
|
|
63
64
|
/** Focus state of input element */
|
|
64
65
|
private focused;
|
|
65
|
-
/**
|
|
66
|
-
private
|
|
66
|
+
/** Visibility state of feature list */
|
|
67
|
+
private isFeatureListVisible;
|
|
68
|
+
/** Feature list is currently interacted with using pointer device so it should not be closed even though input lost focus */
|
|
69
|
+
private isFeatureListInteractedWith;
|
|
67
70
|
protected firstUpdated(): void;
|
|
68
71
|
/**
|
|
69
72
|
* Set the options of this instance.
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/maplibregl.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maptiler/geocoding-control",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.8",
|
|
4
4
|
"description": "The Javascript & TypeScript Map Control component for MapTiler Geocoding service. Easy to be integrated into any JavaScript mapping application.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -42,11 +42,7 @@
|
|
|
42
42
|
"build:leaflet:umd": "FLAVOUR=leaflet MODE=umd vite build",
|
|
43
43
|
"build:openlayers": "FLAVOUR=openlayers vite build",
|
|
44
44
|
"build:openlayers:umd": "FLAVOUR=openlayers MODE=umd vite build",
|
|
45
|
-
"check-version": "
|
|
46
|
-
"check-version:leaflet-v1.5": "tsc -p tsconfig.leaflet-v1.5.json",
|
|
47
|
-
"check-version:leaflet-v1.7": "tsc -p tsconfig.leaflet-v1.7.json",
|
|
48
|
-
"check-version:leaflet-v1.9": "tsc -p tsconfig.leaflet-v1.9.json",
|
|
49
|
-
"check-version:leaflet-v2": "tsc -p tsconfig.leaflet-v2.json",
|
|
45
|
+
"check-version": "node check-version.js",
|
|
50
46
|
"lint": "eslint -c eslint.config.js . && prettier --check . && tsc --noEmit",
|
|
51
47
|
"lint:fix": "eslint -c eslint.config.js --fix && prettier --write . && tsc --noEmit",
|
|
52
48
|
"test": "vitest run -c vite.config-test.ts --dom",
|
|
@@ -98,7 +94,10 @@
|
|
|
98
94
|
},
|
|
99
95
|
"devDependencies": {
|
|
100
96
|
"@canvas/image-data": "^1.1.0",
|
|
101
|
-
"@maptiler/sdk": "^3.
|
|
97
|
+
"@maptiler/sdk": "^3.11.1",
|
|
98
|
+
"@maptiler/sdk--v3.0": "npm:@maptiler/sdk@3.0",
|
|
99
|
+
"@maptiler/sdk--v3.11": "npm:@maptiler/sdk@3.11",
|
|
100
|
+
"@maptiler/sdk--v3.5": "npm:@maptiler/sdk@3.5",
|
|
102
101
|
"@types/leaflet": "^1.9.21",
|
|
103
102
|
"@types/leaflet--v1.5": "npm:@types/leaflet@1.5",
|
|
104
103
|
"@types/leaflet--v1.7": "npm:@types/leaflet@1.7",
|
|
@@ -114,7 +113,18 @@
|
|
|
114
113
|
"happy-dom": "^20.0.10",
|
|
115
114
|
"husky": "^9.1.7",
|
|
116
115
|
"leaflet": "^1.9.4",
|
|
116
|
+
"maplibre-gl": "~5.16.0",
|
|
117
|
+
"maplibre-gl--v5.0": "npm:maplibre-gl@5.0",
|
|
118
|
+
"maplibre-gl--v5.10": "npm:maplibre-gl@5.10",
|
|
119
|
+
"maplibre-gl--v5.15": "npm:maplibre-gl@5.15",
|
|
120
|
+
"maplibre-gl--v5.20": "npm:maplibre-gl@5.20",
|
|
121
|
+
"maplibre-gl--v5.5": "npm:maplibre-gl@5.5",
|
|
117
122
|
"ol": "^10.6.1",
|
|
123
|
+
"ol--v10.0": "npm:ol@10.0",
|
|
124
|
+
"ol--v10.3": "npm:ol@10.3",
|
|
125
|
+
"ol--v10.6": "npm:ol@10.6",
|
|
126
|
+
"ol--v9.1": "npm:ol@9.1",
|
|
127
|
+
"ol--v9.2": "npm:ol@9.2",
|
|
118
128
|
"prettier": "^3.6.2",
|
|
119
129
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
120
130
|
"react": "^19.2.0",
|
|
@@ -130,10 +140,10 @@
|
|
|
130
140
|
"vitest": "^4.0.8"
|
|
131
141
|
},
|
|
132
142
|
"peerDependencies": {
|
|
133
|
-
"@maptiler/sdk": "
|
|
143
|
+
"@maptiler/sdk": "3 - 4",
|
|
134
144
|
"leaflet": "1.5 - 2",
|
|
135
|
-
"maplibre-gl": "
|
|
136
|
-
"ol": "
|
|
145
|
+
"maplibre-gl": "5",
|
|
146
|
+
"ol": "9.1 - 10"
|
|
137
147
|
},
|
|
138
148
|
"peerDependenciesMeta": {
|
|
139
149
|
"@maptiler/sdk": {
|