@maptiler/geocoding-control 3.0.0-rc.9 → 3.1.0-rc.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.
@@ -2,6 +2,7 @@ import { LitElement } from 'lit';
2
2
  import { BBox, EnableReverse, Feature, ProximityRule, ShowPlaceType, TypeRule, Worldview } from '../types';
3
3
  import { MaptilerGeocoderEventName, MaptilerGeocoderEventNameMap } from './geocoder-events';
4
4
  import { MaptilerGeocoderOptions } from './geocoder-options';
5
+ type InputElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
5
6
  export declare class MaptilerGeocoderElement extends LitElement implements MaptilerGeocoderOptions {
6
7
  #private;
7
8
  /** @internal */
@@ -43,8 +44,16 @@ export declare class MaptilerGeocoderElement extends LitElement implements Mapti
43
44
  showResultsWhileTyping?: boolean | undefined;
44
45
  types?: TypeRule[];
45
46
  worldview?: Worldview;
46
- /** Reference to the input element the user can type a query into */
47
- private input;
47
+ private contentSlotElements;
48
+ private inputSlotElements;
49
+ private searchButtonElements;
50
+ private clearButtonElements;
51
+ private reverseButtonElements;
52
+ private clearErrorButtonElements;
53
+ private searchIconElements;
54
+ private clearIconElements;
55
+ private reverseIconElements;
56
+ private clearErrorIconElements;
48
57
  /** Value to search via geocoding */
49
58
  private searchValue;
50
59
  /** Features found via geocoding */
@@ -67,6 +76,8 @@ export declare class MaptilerGeocoderElement extends LitElement implements Mapti
67
76
  private isFeatureListVisible;
68
77
  /** Feature list is currently interacted with using pointer device so it should not be closed even though input lost focus */
69
78
  private isFeatureListInteractedWith;
79
+ get isLoading(): boolean;
80
+ get input(): InputElement | undefined;
70
81
  protected firstUpdated(): void;
71
82
  /**
72
83
  * Set the options of this instance.
@@ -114,3 +125,4 @@ declare global {
114
125
  "maptiler-geocoder": MaptilerGeocoderElement;
115
126
  }
116
127
  }
128
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/geocoding-control",
3
- "version": "3.0.0-rc.9",
3
+ "version": "3.1.0-rc.1",
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": {
@@ -94,10 +94,11 @@
94
94
  },
95
95
  "devDependencies": {
96
96
  "@canvas/image-data": "^1.1.0",
97
- "@maptiler/sdk": "^3.11.1",
97
+ "@maptiler/sdk": "^4.0.0",
98
98
  "@maptiler/sdk--v3.0": "npm:@maptiler/sdk@3.0",
99
99
  "@maptiler/sdk--v3.11": "npm:@maptiler/sdk@3.11",
100
100
  "@maptiler/sdk--v3.5": "npm:@maptiler/sdk@3.5",
101
+ "@maptiler/sdk--v4.0": "npm:@maptiler/sdk@4.0",
101
102
  "@types/leaflet": "^1.9.21",
102
103
  "@types/leaflet--v1.5": "npm:@types/leaflet@1.5",
103
104
  "@types/leaflet--v1.7": "npm:@types/leaflet@1.7",
@@ -105,7 +106,7 @@
105
106
  "@types/node": "ts5.8",
106
107
  "@types/react": "^19.2.6",
107
108
  "@types/react-dom": "^19.2.3",
108
- "@vitest/web-worker": "^4.0.9",
109
+ "@vitest/browser-playwright": "^4.1.5",
109
110
  "dotenv": "^16.4.7",
110
111
  "eslint": "^9.38.0",
111
112
  "eslint-config-prettier": "^10.1.8",
@@ -113,7 +114,7 @@
113
114
  "happy-dom": "^20.0.10",
114
115
  "husky": "^9.1.7",
115
116
  "leaflet": "^1.9.4",
116
- "maplibre-gl": "~5.16.0",
117
+ "maplibre-gl": "~5.21.1",
117
118
  "maplibre-gl--v5.0": "npm:maplibre-gl@5.0",
118
119
  "maplibre-gl--v5.10": "npm:maplibre-gl@5.10",
119
120
  "maplibre-gl--v5.15": "npm:maplibre-gl@5.15",
@@ -137,7 +138,7 @@
137
138
  "vite-plugin-dts": "^4.5.4",
138
139
  "vite-plugin-externalize-deps": "^0.10.0",
139
140
  "vite-plugin-static-copy": "^3.1.4",
140
- "vitest": "^4.0.8"
141
+ "vitest": "^4.1.5"
141
142
  },
142
143
  "peerDependencies": {
143
144
  "@maptiler/sdk": "3 - 4",
package/check-version.js DELETED
@@ -1,69 +0,0 @@
1
- import { execSync } from "node:child_process";
2
- import { rmSync, writeFileSync } from "node:fs";
3
-
4
- const TSCONFIG = "./tsconfig.check-version.json";
5
-
6
- const checks = [
7
- { entrypoint: "src/maptilersdk.ts" },
8
- {
9
- entrypoint: "src/maptilersdk.ts",
10
- paths: {
11
- "@maptiler/sdk": ["../node_modules/@maptiler/sdk--v3.0/dist/maptiler-sdk.d.ts"],
12
- "maplibre-gl": ["../node_modules/@maptiler/sdk--v3.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts", "../node_modules/maplibre-gl/dist/maplibre-gl.d.ts"],
13
- },
14
- },
15
- {
16
- entrypoint: "src/maptilersdk.ts",
17
- paths: {
18
- "@maptiler/sdk": ["../node_modules/@maptiler/sdk--v3.5/dist/maptiler-sdk.d.ts"],
19
- "maplibre-gl": ["../node_modules/@maptiler/sdk--v3.5/node_modules/maplibre-gl/dist/maplibre-gl.d.ts", "../node_modules/maplibre-gl/dist/maplibre-gl.d.ts"],
20
- },
21
- },
22
- {
23
- entrypoint: "src/maptilersdk.ts",
24
- paths: {
25
- "@maptiler/sdk": ["../node_modules/@maptiler/sdk--v3.11/dist/maptiler-sdk.d.ts"],
26
- "maplibre-gl": ["../node_modules/@maptiler/sdk--v3.11/node_modules/maplibre-gl/dist/maplibre-gl.d.ts", "../node_modules/maplibre-gl/dist/maplibre-gl.d.ts"],
27
- },
28
- },
29
- { entrypoint: "src/maplibregl.ts" },
30
- { entrypoint: "src/maplibregl.ts", paths: { "maplibre-gl": ["../node_modules/maplibre-gl--v5.0/dist/maplibre-gl.d.ts"] } },
31
- { entrypoint: "src/maplibregl.ts", paths: { "maplibre-gl": ["../node_modules/maplibre-gl--v5.5/dist/maplibre-gl.d.ts"] } },
32
- { entrypoint: "src/maplibregl.ts", paths: { "maplibre-gl": ["../node_modules/maplibre-gl--v5.10/dist/maplibre-gl.d.ts"] } },
33
- { entrypoint: "src/maplibregl.ts", paths: { "maplibre-gl": ["../node_modules/maplibre-gl--v5.15/dist/maplibre-gl.d.ts"] } },
34
- { entrypoint: "src/maplibregl.ts", paths: { "maplibre-gl": ["../node_modules/maplibre-gl--v5.20/dist/maplibre-gl.d.ts"] } },
35
- { entrypoint: "src/leaflet.public.ts" },
36
- { entrypoint: "src/leaflet.public.ts", paths: { leaflet: ["../node_modules/@types/leaflet--v1.5/index.d.ts"] } },
37
- { entrypoint: "src/leaflet.public.ts", paths: { leaflet: ["../node_modules/@types/leaflet--v1.7/index.d.ts"] } },
38
- { entrypoint: "src/leaflet.public.ts", paths: { leaflet: ["../node_modules/@types/leaflet--v1.9/index.d.ts"] } },
39
- { entrypoint: "src/leaflet.public.ts", paths: { leaflet: ["../tmp/@types/leaflet-v2/index.d.ts"] } },
40
- { entrypoint: "src/openlayers.public.ts" },
41
- { entrypoint: "src/openlayers.public.ts", paths: { ol: ["../node_modules/ol--v9.0/index.d.ts"], "ol/*": ["../node_modules/ol--v9.0/*.d.ts"] } },
42
- { entrypoint: "src/openlayers.public.ts", paths: { ol: ["../node_modules/ol--v9.2/index.d.ts"], "ol/*": ["../node_modules/ol--v9.2/*.d.ts"] } },
43
- { entrypoint: "src/openlayers.public.ts", paths: { ol: ["../node_modules/ol--v10.0/index.d.ts"], "ol/*": ["../node_modules/ol--v10.0/*.d.ts"] } },
44
- { entrypoint: "src/openlayers.public.ts", paths: { ol: ["../node_modules/ol--v10.3/index.d.ts"], "ol/*": ["../node_modules/ol--v10.3/*.d.ts"] } },
45
- { entrypoint: "src/openlayers.public.ts", paths: { ol: ["../node_modules/ol--v10.6/index.d.ts"], "ol/*": ["../node_modules/ol--v10.6/*.d.ts"] } },
46
- ];
47
-
48
- for (const { entrypoint, paths = {} } of checks) {
49
- writeFileSync(
50
- TSCONFIG,
51
- JSON.stringify(
52
- {
53
- extends: "./tsconfig.json",
54
- compilerOptions: {
55
- types: [],
56
- paths,
57
- },
58
- include: [entrypoint, "src/*.d.ts"],
59
- },
60
- null,
61
- 2,
62
- ),
63
- { encoding: "utf-8" },
64
- );
65
-
66
- execSync(`npx tsc -p ${TSCONFIG}`, { encoding: "utf-8" });
67
- }
68
-
69
- rmSync(TSCONFIG);