@yarrow-uz/yarrow-map-web-sdk 1.0.43 → 1.0.45

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/CHANGELOG.md ADDED
@@ -0,0 +1,64 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ ## [1.0.45] - 2026-03-12
6
+
7
+ ### Changed
8
+ - Upgraded `maplibre-gl` dependency from `^5.5.0` to `^5.19.0`.
9
+ - Migrated search API to new endpoint (`api.yarrow.uz/api/search/`) with updated query parameters (`lng`, `country`, `sort_by`, `page`, `page_size`).
10
+ - Search results response mapping updated to new API format.
11
+ - Search result markers now fall back to circle markers with text labels when icon images are unavailable.
12
+ - Adjusted dark theme opacity for brand badge and map controls for a softer appearance.
13
+
14
+ ## [1.0.44] - 2026-02-28
15
+
16
+ ### Added
17
+ - Added `apiKey` as a required configuration option.
18
+ - Added `setYarrowApiKey()` and `getYarrowApiKey()` helper functions for API key management.
19
+ - Added axios interceptor to automatically append `api_key` to every request.
20
+ - Added `CHANGELOG.md` to package files for npm distribution.
21
+
22
+ ### Changed
23
+ - Made `apiKey` required in `YarrowMapConfig`, `YarrowMapReactConfig`, and type definitions.
24
+ - Enhanced brand badge and controls appearance with updated CSS properties for improved visual quality.
25
+ - Updated `README.md` with API reference, local development instructions, and apiKey requirement.
26
+ - Removed deprecated legacy constructor signature from YarrowMapConfig (positional arguments).
27
+
28
+ ### Fixed
29
+ - Corrected layer type handling in YarrowMap class for improved functionality.
30
+
31
+ ## [1.0.43] - 2026-02-25
32
+
33
+ ### Added
34
+ - `changeBrandBadgePosition(position)` API to update the brand badge corner at runtime.
35
+ - Type declaration for `changeBrandBadgePosition(position: BrandBadgePosition)`.
36
+
37
+ ### Changed
38
+ - Reduced brand badge `z-index` from `2147483647` to `1000` for better overlay stacking behavior.
39
+ - Updated `README.md` with runtime brand badge positioning docs and API reference.
40
+
41
+ ## [1.0.42] - 2026-02-20
42
+
43
+ ### Added
44
+ - Support for 6-way controls placement: `left`, `left-top`, `left-bottom`, `right`, `right-top`, `right-bottom`.
45
+ - Automatic controls inset when controls and badge share the same corner, preventing overlap.
46
+ - Dynamic collision recalculation using `ResizeObserver` as badge size changes.
47
+
48
+ ### Changed
49
+ - Migrated brand badge asset from PNG to SVG.
50
+ - Improved dark theme compass needle visibility for controls.
51
+ - Updated controls positioning docs and TypeScript declarations to include new placement options.
52
+
53
+ ## [1.0.41] - 2026-02-19
54
+
55
+ ### Added
56
+ - `addSource(sourceId, data)` for explicit GeoJSON source management.
57
+ - `updateSourceData(sourceId, data)` to update existing source data (or create source if missing).
58
+ - `setFeatureState(featureIdentifier, state)` to support per-feature interactive state.
59
+ - `queryRenderedFeatures(geometryOrOptions?, options?)` passthrough support, including `{ layers: [...] }`.
60
+
61
+ ### Changed
62
+ - `addLayer(...)` now supports `options.sourceId` and `options.filter`.
63
+ - `addLayer(...)` paint typing now accepts full expression-based paint values from MapLibre style spec.
64
+ - API docs updated in `README.md` for new source/layer/state/query capabilities.
package/README.md CHANGED
@@ -40,6 +40,7 @@ This document provides a comprehensive guide to using the Yarrow Map Web SDK for
40
40
  - [Advanced Features](#advanced-features)
41
41
  - [Custom Icons and Styling](#custom-icons-and-styling)
42
42
  - [Performance Optimization](#performance-optimization)
43
+ - [API Reference](#api-reference)
43
44
 
44
45
  ---
45
46
 
@@ -53,6 +54,10 @@ First, add the Yarrow Map Web SDK to your project using your preferred package m
53
54
  npm install @yarrow-uz/yarrow-map-web-sdk
54
55
  ```
55
56
 
57
+ ### Local Development
58
+
59
+ When running your application locally, serve it on **port 8080** to avoid CORS issues with the map API. Running on any other port will cause CORS errors.
60
+
56
61
  ### Initialization
57
62
 
58
63
  To get started, you need to create an instance of `YarrowMap`. This requires a configuration object that specifies the container element, center coordinates, and zoom level.
@@ -88,6 +93,7 @@ The `YarrowMapConfig` class accepts a single configuration object:
88
93
  const mapConfig = new YarrowMapConfig({
89
94
  container, // string | HTMLElement
90
95
  center, // [number, number] - [lng, lat]
96
+ apiKey, // string - Required, get from https://dashboard.yarrow.uz/
91
97
  zoom, // number (default: 10)
92
98
  minZoom, // number (default: 0)
93
99
  maxZoom, // number (default: 19)
@@ -109,6 +115,7 @@ const mapConfig = new YarrowMapConfig({
109
115
  zoom: 12,
110
116
  minZoom: 5,
111
117
  maxZoom: 18,
118
+ apiKey: 'YOUR_API_KEY', // Required - get from https://dashboard.yarrow.uz/
112
119
  theme: 'dark',
113
120
  cache: {
114
121
  enabled: true, // Enable local persistent cache (default: false)
@@ -144,6 +151,7 @@ export const MapScreen = () => {
144
151
  config={{
145
152
  center: [69.2401, 41.2995],
146
153
  zoom: 12,
154
+ apiKey: 'YOUR_API_KEY', // Required - get from https://dashboard.yarrow.uz/
147
155
  brandBadgePosition: 'bottom-left',
148
156
  }}
149
157
  style={{ width: '100%', height: '600px' }}
@@ -211,6 +219,7 @@ const mapConfig = new YarrowMapConfig({
211
219
  zoom: 12,
212
220
  minZoom: 5,
213
221
  maxZoom: 18,
222
+ apiKey: 'YOUR_API_KEY', // Required - get from https://dashboard.yarrow.uz/
214
223
  theme: 'dark', // Set initial theme to dark
215
224
  });
216
225
  ```
@@ -1027,11 +1036,10 @@ interface SearchOptions {
1027
1036
 
1028
1037
  ## Version Information
1029
1038
 
1030
- - **Current Version**: 1.0.43
1031
- - **Dependencies**: maplibre-gl ^5.5.0, axios ^1.7.9
1032
- - **Repository**: https://git.yarrow.uz/yarrow-sdk/frontend/yarrow-map-web-sdk
1039
+ - **Current Version**: 1.0.45
1040
+ - **Dependencies**: maplibre-gl ^5.19.0, axios ^1.7.9
1033
1041
  - **Changelog**: `CHANGELOG.md`
1034
1042
 
1035
1043
  ## Support
1036
1044
 
1037
- For issues, questions, or contributions, please visit the project repository or contact the Yarrow development team.
1045
+ For issues, questions, or contributions, contact the Yarrow development team.
@@ -1,3 +1,6 @@
1
1
  declare const YARROW_MAP_URL: string;
2
- export { YARROW_MAP_URL };
2
+ declare const YARROW_SEARCH_API_URL: string;
3
+ export { YARROW_MAP_URL, YARROW_SEARCH_API_URL };
4
+ export declare function setYarrowApiKey(apiKey: string): void;
5
+ export declare function getYarrowApiKey(): string;
3
6
  //# sourceMappingURL=main.d.ts.map