@nextgis/geocoder 3.0.0-alpha.9 → 3.0.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/lib/index.d.ts CHANGED
@@ -1,22 +1,8 @@
1
1
  import { LngLatBoundsArray, LngLatArray } from '@nextgis/utils';
2
2
  import { GeoJsonObject } from 'geojson';
3
- import NgwConnector, { FeatureItem, ResourceItem, NgwConnectorOptions } from '@nextgis/ngw-connector';
3
+ import NgwConnector, { FeatureItem, NgwConnectorOptions } from '@nextgis/ngw-connector';
4
4
  import { FetchNgwItemsOptions } from '@nextgis/ngw-kit';
5
-
6
- interface ResultItem {
7
- /**
8
- * Display text of the result item.
9
- */
10
- text: string;
11
- /**
12
- * Bounding box of the result item in [west, south, east, north] format.
13
- */
14
- extent: LngLatBoundsArray;
15
- /**
16
- * Optional GeoJSON geometry associated with this result item.
17
- */
18
- geom?: GeoJsonObject;
19
- }
5
+ import { CompositeRead } from '@nextgisweb/resource/type/api';
20
6
 
21
7
  /**
22
8
  * Options for initializing a basic search provider.
@@ -52,6 +38,21 @@ declare abstract class BaseProvider<O extends BaseProviderOptions = BaseProvider
52
38
  label?: string;
53
39
  }
54
40
 
41
+ interface ResultItem {
42
+ /**
43
+ * Display text of the result item.
44
+ */
45
+ text: string;
46
+ /**
47
+ * Bounding box of the result item in [west, south, east, north] format.
48
+ */
49
+ extent: LngLatBoundsArray;
50
+ /**
51
+ * Optional GeoJSON geometry associated with this result item.
52
+ */
53
+ geom?: GeoJsonObject;
54
+ }
55
+
55
56
  interface SearchItem {
56
57
  /**
57
58
  * A dynamic property bucket for the `SearchItem`.
@@ -165,7 +166,7 @@ interface NgwSearchItem extends SearchItem {
165
166
  /** The specific feature item from NGW */
166
167
  item: FeatureItem;
167
168
  /** The NGW resource item */
168
- resourceItem: ResourceItem;
169
+ resourceItem: CompositeRead;
169
170
  }
170
171
  /**
171
172
  * Defines the structure for a rendered search item.
@@ -174,7 +175,7 @@ interface RenderSearchItem {
174
175
  /** The specific feature item */
175
176
  item: FeatureItem;
176
177
  /** The NGW resource item */
177
- resourceItem: ResourceItem;
178
+ resourceItem: CompositeRead;
178
179
  }
179
180
  /**
180
181
  * Options for searching within a NGW resource.
@@ -240,4 +241,5 @@ declare class NominatimProvider extends BaseProvider<NominatimProviderOptions> i
240
241
 
241
242
  declare function create(options: GeocoderOptions): Geocoder;
242
243
 
243
- export { BaseProvider, type BaseProviderOptions, Geocoder, type GeocoderOptions, NgwProvider, NominatimProvider, type ResultItem, type SearchItem, create };
244
+ export { BaseProvider, Geocoder, NgwProvider, NominatimProvider, create };
245
+ export type { BaseProviderOptions, GeocoderOptions, ResultItem, SearchItem };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextgis/geocoder",
3
- "version": "3.0.0-alpha.9",
3
+ "version": "3.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "lib/geocoder.esm-bundler.js",
@@ -8,16 +8,16 @@
8
8
  "jsdelivr": "lib/geocoder.global.prod.js",
9
9
  "types": "lib/index.d.ts",
10
10
  "dependencies": {
11
- "@nextgis/cancelable-promise": "^3.0.0-alpha.5",
12
- "@nextgis/ngw-connector": "^3.0.0-alpha.8",
13
- "@nextgis/ngw-kit": "^3.0.0-alpha.8",
14
- "@nextgis/utils": "^3.0.0-alpha.5",
11
+ "@nextgis/cancelable-promise": "3.0.0",
12
+ "@nextgis/ngw-connector": "3.0.1",
13
+ "@nextgis/ngw-kit": "3.0.1",
14
+ "@nextgis/utils": "3.0.0",
15
15
  "@types/events": "^3.0.0",
16
16
  "@types/geojson": "^7946.0.14",
17
17
  "events": "*"
18
18
  },
19
19
  "devDependencies": {
20
- "@nextgis/build-tools": "^3.0.0-alpha.5"
20
+ "@nextgis/build-tools": "3.0.0"
21
21
  },
22
22
  "buildOptions": {
23
23
  "name": "Geocoder",
@@ -53,5 +53,5 @@
53
53
  "bugs": {
54
54
  "url": "https://github.com/nextgis/nextgis_frontend/issues"
55
55
  },
56
- "gitHead": "6b04e3730673793b17e27bbb50c26a0e27781a9f"
56
+ "gitHead": "e84003edfc140d6eeb56ebcf9940adc4698fe22c"
57
57
  }