@maptiler/geocoding-control 0.0.95 → 0.0.96-alpha.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/geocoding-control",
3
- "version": "0.0.95",
3
+ "version": "0.0.96-alpha.1",
4
4
  "type": "module",
5
5
  "author": {
6
6
  "name": "Martin Ždila",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "scripts": {
33
33
  "dev": "vite --host",
34
- "build": "npm run check && concurrently --names \"SVELTE ,MAPLIBRE,MAPTILER,MAPLIB-C,LEAFLET ,LEAFLE-C,REACT ,TYPES \" \"npm run build-svelte\" \"npm run build-maplibre\" \"npm run build-maptilersdk\" \"npm run build-maplibre-controller\" \"npm run build-leaflet\" \"npm run build-leaflet-controller\" \"npm run build-react\" \"npm run build-types\" && npm run cjs2js && cp dist.svelte/*.svelte* LICENSE README.md package.json dist",
34
+ "build": "npm run check && concurrently --names \"SVELTE ,MAPLIBRE,MAPTILER,MAPLIB-C,LEAFLET ,LEAFLE-C,REACT ,TYPES ,VANILLA \" \"npm run build-svelte\" \"npm run build-maplibre\" \"npm run build-maptilersdk\" \"npm run build-maplibre-controller\" \"npm run build-leaflet\" \"npm run build-leaflet-controller\" \"npm run build-react\" \"npm run build-vanilla\" \"npm run build-types\" && npm run cjs2js && cp dist.svelte/*.svelte* LICENSE README.md package.json dist",
35
35
  "build-svelte": "svelte-package -o dist.svelte && VITE_LIB_VERSION=$npm_package_version node replace-env-vars.js",
36
36
  "build-maptilersdk": "FLAVOUR=maptilersdk vite build",
37
37
  "build-maplibre": "FLAVOUR=maplibre vite build",
@@ -39,6 +39,7 @@
39
39
  "build-leaflet": "FLAVOUR=leaflet vite build",
40
40
  "build-leaflet-controller": "FLAVOUR=leaflet-controller vite build",
41
41
  "build-react": "FLAVOUR=react vite build",
42
+ "build-vanilla": "FLAVOUR=vanilla vite build",
42
43
  "build-types": "tsc --outDir dist --declaration --emitDeclarationOnly",
43
44
  "cjs2js": "renamer --find '/\\bcjs\\b/' --replace js dist/*cjs*",
44
45
  "clean": "rm -rf dist dist.svelte",
@@ -74,6 +75,10 @@
74
75
  "import": "./react.js",
75
76
  "require": "./react.umd.js"
76
77
  },
78
+ "./vanilla": {
79
+ "types": "./vanilla.js",
80
+ "svelte": "./vanilla.umd.js"
81
+ },
77
82
  "./style.css": {
78
83
  "import": "./style.css",
79
84
  "require": "./style.css"
package/react.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- /// <reference types="svelte" />
2
1
  /// <reference types="react" />
3
- import GeocodingControl from "./GeocodingControl.svelte";
4
2
  import type { ControlOptions, DispatcherType, MapController } from "./types";
5
3
  type EventNames = keyof DispatcherType;
6
4
  type EventHandlerFnName<T extends EventNames> = `on${Capitalize<T>}`;
@@ -11,9 +9,10 @@ type MapControllerProp = {
11
9
  mapController?: MapController;
12
10
  };
13
11
  export type Props = ControlOptions & CallbackProperties<DispatcherType> & MapControllerProp;
14
- type MethodNames = "blur" | "focus" | "setQuery";
15
12
  export type Methods = {
16
- [T in MethodNames]: GeocodingControl[T];
13
+ blur(): void;
14
+ focus(): void;
15
+ setQuery(value: string, submit?: boolean): void;
17
16
  };
18
17
  declare const ReactGeocodingControl: import("react").ForwardRefExoticComponent<ControlOptions & CallbackProperties<DispatcherType> & MapControllerProp & import("react").RefAttributes<Methods>>;
19
18
  export { ReactGeocodingControl as GeocodingControl };
package/react.js CHANGED
@@ -1412,7 +1412,7 @@ function at(n) {
1412
1412
  return e[2] < e[0] && (e[2] += 360), e;
1413
1413
  }
1414
1414
  function Wn(n, e, t) {
1415
- let r, { $$slots: l = {}, $$scope: u } = e, { class: s = void 0 } = e, { apiKey: f } = e, { bbox: d = void 0 } = e, { clearButtonTitle: o = "clear" } = e, { clearOnBlur: m = !1 } = e, { collapsed: v = !1 } = e, { country: g = void 0 } = e, { debounceSearch: B = 200 } = e, { enableReverse: I = !1 } = e, { errorMessage: T = "Something went wrong…" } = e, { filter: M = () => !0 } = e, { flyTo: A = !0 } = e, { fuzzyMatch: y = !0 } = e, { language: O = void 0 } = e, { limit: F = void 0 } = e, { mapController: h = void 0 } = e, { minLength: b = 2 } = e, { noResultsMessage: C = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: R = "Search" } = e, { proximity: _ = void 0 } = e, { reverseActive: w = I === "always" } = e, { reverseButtonTitle: Q = "toggle reverse geocoding" } = e, { searchValue: a = "" } = e, { showFullGeometry: z = !0 } = e, { showPlaceType: x = "ifNeeded" } = e, { showResultsWhileTyping: oe = !0 } = e, { trackProximity: Ce = !0 } = e, { types: fe = void 0 } = e, { zoom: Re = 16 } = e, { maxZoom: pe = 18 } = e, { apiUrl: Ue = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: Ae = {} } = e, { iconsBaseUrl: Qe = "https://cdn.maptiler.com/maptiler-geocoding-control/v0.0.95/icons/" } = e;
1415
+ let r, { $$slots: l = {}, $$scope: u } = e, { class: s = void 0 } = e, { apiKey: f } = e, { bbox: d = void 0 } = e, { clearButtonTitle: o = "clear" } = e, { clearOnBlur: m = !1 } = e, { collapsed: v = !1 } = e, { country: g = void 0 } = e, { debounceSearch: B = 200 } = e, { enableReverse: I = !1 } = e, { errorMessage: T = "Something went wrong…" } = e, { filter: M = () => !0 } = e, { flyTo: A = !0 } = e, { fuzzyMatch: y = !0 } = e, { language: O = void 0 } = e, { limit: F = void 0 } = e, { mapController: h = void 0 } = e, { minLength: b = 2 } = e, { noResultsMessage: C = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: R = "Search" } = e, { proximity: _ = void 0 } = e, { reverseActive: w = I === "always" } = e, { reverseButtonTitle: Q = "toggle reverse geocoding" } = e, { searchValue: a = "" } = e, { showFullGeometry: z = !0 } = e, { showPlaceType: x = "ifNeeded" } = e, { showResultsWhileTyping: oe = !0 } = e, { trackProximity: Ce = !0 } = e, { types: fe = void 0 } = e, { zoom: Re = 16 } = e, { maxZoom: pe = 18 } = e, { apiUrl: Ue = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: Ae = {} } = e, { iconsBaseUrl: Qe = "https://cdn.maptiler.com/maptiler-geocoding-control/v0.0.96-alpha.1/icons/" } = e;
1416
1416
  function kt() {
1417
1417
  J.focus();
1418
1418
  }
@@ -1722,6 +1722,7 @@ const dt = [
1722
1722
  "country",
1723
1723
  "debounceSearch",
1724
1724
  "enableReverse",
1725
+ "reverseActive",
1725
1726
  "errorMessage",
1726
1727
  "filter",
1727
1728
  "fuzzyMatch",