@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.
Files changed (39) hide show
  1. package/check-version.js +69 -0
  2. package/dist/check-version.d.ts +1 -0
  3. package/dist/index.js +188 -178
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.umd.js +55 -50
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/leaflet.public.js +313 -303
  8. package/dist/leaflet.public.js.map +1 -1
  9. package/dist/leaflet.public.umd.js +51 -46
  10. package/dist/leaflet.public.umd.js.map +1 -1
  11. package/dist/maplibregl.js +188 -178
  12. package/dist/maplibregl.js.map +1 -1
  13. package/dist/maplibregl.umd.js +50 -45
  14. package/dist/maplibregl.umd.js.map +1 -1
  15. package/dist/maptilersdk.js +243 -233
  16. package/dist/maptilersdk.js.map +1 -1
  17. package/dist/maptilersdk.umd.js +62 -57
  18. package/dist/maptilersdk.umd.js.map +1 -1
  19. package/dist/openlayers.public.js +225 -214
  20. package/dist/openlayers.public.js.map +1 -1
  21. package/dist/openlayers.public.umd.js +51 -46
  22. package/dist/openlayers.public.umd.js.map +1 -1
  23. package/dist/src/components/clear-icon.d.ts +1 -0
  24. package/dist/src/components/fail-icon.d.ts +1 -0
  25. package/dist/src/components/loading-icon.d.ts +1 -0
  26. package/dist/src/components/marker.d.ts +1 -0
  27. package/dist/src/components/reverse-geocoding-icon.d.ts +1 -0
  28. package/dist/src/components/search-icon.d.ts +1 -0
  29. package/dist/src/controls/maplibregl-control.d.ts +2 -7
  30. package/dist/src/controls/maplibregl-events.d.ts +2 -3
  31. package/dist/src/controls/maplibregl-options.d.ts +1 -9
  32. package/dist/src/geocoder/geocoder-feature-item.d.ts +1 -0
  33. package/dist/src/geocoder/geocoder.d.ts +5 -2
  34. package/dist/src/index.d.ts +1 -0
  35. package/dist/src/leaflet.public.d.ts +1 -0
  36. package/dist/src/maplibregl.d.ts +1 -0
  37. package/dist/src/maptilersdk.d.ts +1 -0
  38. package/dist/src/openlayers.public.d.ts +1 -0
  39. package/package.json +20 -10
@@ -1,5 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  export declare class MaptilerGeocodeClearIconElement extends LitElement {
3
+ /** @internal */
3
4
  static styles: import('lit').CSSResult;
4
5
  render(): import('lit-html').TemplateResult<2>;
5
6
  }
@@ -1,5 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  export declare class MaptilerGeocodeFailIconElement extends LitElement {
3
+ /** @internal */
3
4
  static styles: import('lit').CSSResult;
4
5
  render(): import('lit-html').TemplateResult<2>;
5
6
  }
@@ -1,5 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  export declare class MaptilerGeocodeLoadingIconElement extends LitElement {
3
+ /** @internal */
3
4
  static styles: import('lit').CSSResult;
4
5
  render(): import('lit-html').TemplateResult<1>;
5
6
  }
@@ -1,5 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  export declare class MaptilerGeocodeMarkerElement extends LitElement {
3
+ /** @internal */
3
4
  static styles: import('lit').CSSResult;
4
5
  render(): import('lit-html').TemplateResult<2>;
5
6
  }
@@ -1,5 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  export declare class MaptilerGeocodeReverseGeocodingIconElement extends LitElement {
3
+ /** @internal */
3
4
  static styles: import('lit').CSSResult;
4
5
  render(): import('lit-html').TemplateResult<2>;
5
6
  }
@@ -1,5 +1,6 @@
1
1
  import { LitElement } from 'lit';
2
2
  export declare class MaptilerGeocodeSearchIconElement extends LitElement {
3
+ /** @internal */
3
4
  static styles: import('lit').CSSResult;
4
5
  render(): import('lit-html').TemplateResult<2>;
5
6
  }
@@ -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 { default as maplibregl } from 'maplibre-gl';
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 Marker = maplibregl.Marker;
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 { default as maplibregl } from 'maplibre-gl';
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
- /** Focus state of input element, delayed for a moment to not close feature list immediately after losing focus */
66
- private focusedDelayed;
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.
@@ -1,3 +1,4 @@
1
+ /** @module @maptiler/geocoding-control */
1
2
  export * from './components/clear-icon';
2
3
  export * from './components/fail-icon';
3
4
  export * from './components/loading-icon';
@@ -1,3 +1,4 @@
1
+ /** @module @maptiler/geocoding-control/leaflet */
1
2
  export * from '.';
2
3
  export * from './components/marker';
3
4
  export * from './controls/leaflet-control';
@@ -1,3 +1,4 @@
1
+ /** @module @maptiler/geocoding-control/maplibregl */
1
2
  export * from '.';
2
3
  export * from './components/marker';
3
4
  export * from './controls/maplibregl-control';
@@ -1,3 +1,4 @@
1
+ /** @module @maptiler/geocoding-control/maptilersdk */
1
2
  export * from '.';
2
3
  export * from './components/marker';
3
4
  export * from './controls/maptilersdk-control';
@@ -1,3 +1,4 @@
1
+ /** @module @maptiler/geocoding-control/openlayers */
1
2
  export * from '.';
2
3
  export * from './components/marker';
3
4
  export * from './controls/openlayers-control';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/geocoding-control",
3
- "version": "3.0.0-rc.6",
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": "npm run check-version:leaflet-v1.5 && npm run check-version:leaflet-v1.7 && npm run check-version:leaflet-v1.9 && npm run check-version:leaflet-v2",
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.8.0",
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": "1.0.7 - 4",
143
+ "@maptiler/sdk": "3 - 4",
134
144
  "leaflet": "1.5 - 2",
135
- "maplibre-gl": "2 - 5",
136
- "ol": "6 - 10"
145
+ "maplibre-gl": "5",
146
+ "ol": "9.1 - 10"
137
147
  },
138
148
  "peerDependenciesMeta": {
139
149
  "@maptiler/sdk": {