@maptiler/geocoding-control 0.0.82 → 0.0.84
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/DispatcherType.d.ts +14 -0
- package/GeocodingControl.svelte +10 -3
- package/GeocodingControl.svelte.d.ts +9 -12
- package/README.md +38 -12
- package/leaflet-controller.js +450 -450
- package/leaflet-controller.js.map +1 -1
- package/leaflet-controller.umd.js +5 -5
- package/leaflet-controller.umd.js.map +1 -1
- package/leaflet.d.ts +2 -2
- package/leaflet.js +420 -420
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +5 -5
- package/leaflet.umd.js.map +1 -1
- package/maplibregl-controller.d.ts +5 -3
- package/maplibregl-controller.js +450 -450
- package/maplibregl-controller.js.map +1 -1
- package/maplibregl-controller.umd.js +5 -5
- package/maplibregl-controller.umd.js.map +1 -1
- package/maplibregl.d.ts +11 -7
- package/maplibregl.js +871 -861
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +5 -5
- package/maplibregl.umd.js.map +1 -1
- package/mask.d.ts +1 -1
- package/package.json +12 -7
- package/react.d.ts +11 -18
- package/react.js +333 -333
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/style.css +1 -1
package/mask.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MultiPolygon, Polygon, Feature as TurfFeature } from "@turf/helpers";
|
|
2
2
|
import type { GeoJSON } from "geojson";
|
|
3
3
|
export declare function setMask(picked: TurfFeature<Polygon | MultiPolygon>, setData: (data: GeoJSON) => void): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maptiler/geocoding-control",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.84",
|
|
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",
|
|
34
|
-
"build": "concurrently --names \"SVELTE ,MAPLIBRE,MAPLIB-C,LEAFLET ,LEAFLE-C,REACT ,TYPES \" \"npm run build-svelte\" \"npm run build-maplibre\" \"npm run build-maplibre-controller\" \"npm run build-leaflet\" \"npm run build-leaflet-controller\" \"npm run build-react\" \"npm run build-types\" && cp dist.svelte/*.svelte* LICENSE README.md package.json dist",
|
|
34
|
+
"build": "npm run check && concurrently --names \"SVELTE ,MAPLIBRE,MAPLIB-C,LEAFLET ,LEAFLE-C,REACT ,TYPES \" \"npm run build-svelte\" \"npm run build-maplibre\" \"npm run build-maplibre-controller\" \"npm run build-leaflet\" \"npm run build-leaflet-controller\" \"npm run build-react\" \"npm run build-types\" && cp dist.svelte/*.svelte* LICENSE README.md package.json dist",
|
|
35
35
|
"build-svelte": "svelte-package -o dist.svelte",
|
|
36
36
|
"build-maplibre": "FLAVOUR=maplibre vite build && mv dist/maplibregl.umd.cjs dist/maplibregl.umd.js && mv dist/maplibregl.umd.cjs.map dist/maplibregl.umd.js.map",
|
|
37
37
|
"build-maplibre-controller": "FLAVOUR=maplibregl-controller vite build && mv dist/maplibregl-controller.umd.cjs dist/maplibregl-controller.umd.js && mv dist/maplibregl-controller.umd.cjs.map dist/maplibregl-controller.umd.js.map",
|
|
@@ -77,37 +77,42 @@
|
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@sveltejs/package": "^2.0.2",
|
|
80
|
-
"@sveltejs/vite-plugin-svelte": "^2.0.
|
|
80
|
+
"@sveltejs/vite-plugin-svelte": "^2.0.4",
|
|
81
81
|
"@tsconfig/svelte": "^4.0.1",
|
|
82
82
|
"@turf/buffer": "^6.5.0",
|
|
83
83
|
"@turf/difference": "^6.5.0",
|
|
84
84
|
"@turf/union": "^6.5.0",
|
|
85
85
|
"@types/geojson": "^7946.0.10",
|
|
86
86
|
"@types/leaflet": "^1.9.3",
|
|
87
|
-
"@types/react": "^18.0.
|
|
87
|
+
"@types/react": "^18.0.31",
|
|
88
88
|
"@types/react-dom": "^18.0.11",
|
|
89
|
-
"concurrently": "^
|
|
89
|
+
"concurrently": "^8.0.1",
|
|
90
90
|
"esm-env": "^1.0.0",
|
|
91
91
|
"leaflet": "^1.9.3",
|
|
92
92
|
"maplibre-gl": "^2.4.0",
|
|
93
93
|
"prettier": "^2.8.7",
|
|
94
|
+
"prettier-plugin-organize-imports": "^3.2.2",
|
|
94
95
|
"prettier-plugin-svelte": "^2.10.0",
|
|
95
96
|
"react": "^18.2.0",
|
|
96
97
|
"react-dom": "^18.2.0",
|
|
97
|
-
"svelte": "^3.
|
|
98
|
+
"svelte": "^3.58.0",
|
|
98
99
|
"svelte-check": "^3.1.4",
|
|
99
100
|
"svelte-preprocess": "^5.0.3",
|
|
100
101
|
"tslib": "^2.5.0",
|
|
101
|
-
"typescript": "^5.0.
|
|
102
|
+
"typescript": "^5.0.3",
|
|
102
103
|
"vite": "^4.2.1"
|
|
103
104
|
},
|
|
104
105
|
"peerDependencies": {
|
|
106
|
+
"@maptiler/sdk": "^1.0.8",
|
|
105
107
|
"leaflet": "^1.9.3",
|
|
106
108
|
"maplibre-gl": "^2.4.0",
|
|
107
109
|
"react": "^18.2.0",
|
|
108
110
|
"svelte": "^3.57.0"
|
|
109
111
|
},
|
|
110
112
|
"peerDependenciesMeta": {
|
|
113
|
+
"@maptiler/sdk": {
|
|
114
|
+
"optional": true
|
|
115
|
+
},
|
|
111
116
|
"leaflet": {
|
|
112
117
|
"optional": true
|
|
113
118
|
},
|
package/react.d.ts
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
onResponse?: (onResponse: {
|
|
10
|
-
url: string;
|
|
11
|
-
response: Response;
|
|
12
|
-
}) => void;
|
|
13
|
-
onReversetoggle?: (reverse: boolean) => void;
|
|
14
|
-
onQuerychange?: (query: string) => void;
|
|
2
|
+
import type { DispatcherType } from "./DispatcherType";
|
|
3
|
+
import GeocodingControl from "./GeocodingControl.svelte";
|
|
4
|
+
import type { ControlOptions, MapController } from "./types";
|
|
5
|
+
type EventNames = keyof DispatcherType;
|
|
6
|
+
type EventHandlerFnName<T extends EventNames> = `on${Capitalize<T>}`;
|
|
7
|
+
type CallbackProperties<T> = {
|
|
8
|
+
[K in keyof T as EventHandlerFnName<Extract<K, EventNames>>]?: (event: T[K]) => void;
|
|
15
9
|
};
|
|
16
10
|
type MapControllerProp = {
|
|
17
11
|
mapController?: MapController;
|
|
18
12
|
};
|
|
19
|
-
export type Props = ControlOptions & CallbackProperties & MapControllerProp;
|
|
13
|
+
export type Props = ControlOptions & CallbackProperties<DispatcherType> & MapControllerProp;
|
|
14
|
+
type MethodNames = "blur" | "focus" | "setQuery";
|
|
20
15
|
export type Methods = {
|
|
21
|
-
|
|
22
|
-
focus: () => void;
|
|
23
|
-
setQuery: (value: string, submit?: boolean) => void;
|
|
16
|
+
[T in MethodNames]: GeocodingControl[T];
|
|
24
17
|
};
|
|
25
|
-
declare const ReactGeocodingControl: import("react").ForwardRefExoticComponent<ControlOptions & CallbackProperties & MapControllerProp & import("react").RefAttributes<Methods>>;
|
|
18
|
+
declare const ReactGeocodingControl: import("react").ForwardRefExoticComponent<ControlOptions & CallbackProperties<DispatcherType> & MapControllerProp & import("react").RefAttributes<Methods>>;
|
|
26
19
|
export { ReactGeocodingControl as GeocodingControl };
|