@yarrow-uz/rn-map-sdk 0.3.0 → 0.5.0

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 CHANGED
@@ -1,5 +1,27 @@
1
1
  # @yarrow-uz/rn-map-sdk
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Drop the `@react-native-community/blur` peer dependency and ship the brand badge as a translucent tint pill on **both** platforms, superseding 0.4.0's iOS-only frosted glass. RN has no reliable backdrop-blur over the map's GPU surface (Android cannot sample GL content at all), and a native blur peer for one visual wasn't worth the install weight — the badge draws the tint directly (light `rgba(255,255,255,0.55)` / dark `rgba(15,23,42,0.55)`), same pill geometry, logo and corner as before. Apps no longer need blur installed or linked; nothing to migrate (installed copies are simply unused).
8
+
9
+ ### Patch Changes
10
+
11
+ - b673ced: Docs: both SDK READMEs now state the Yarrow branding policy — the Yarrow brand badge is the only visible badge on the map, and MapLibre's attribution/logo ornaments stay hidden by design (the web SDK hardcodes `attributionControl: false`; the RN SDK defaults `attribution`/`logo` to `false` with opt-in escape-hatch props).
12
+ - ca4ad66: `onLoadError` now reports the failing style URL (with the API key redacted to `api_key=***`), since MapLibre React Native's `onDidFailLoadingMap` carries no failure detail on either platform. Opening the URL in a browser shows the underlying response — 401/403 for a bad key, 404 for an unknown style, a network error otherwise.
13
+ - db91e9b: Dev builds now detect an unlinked MapLibre native module at SDK import and print the fix (`[YarrowMap] MapLibre native module is not linked...`) before MapLibre React Native's own import-time failure — its `TurboModuleRegistry` error names the missing module but not the remedy. Release builds are unaffected (`__DEV__`-gated, no-op on web).
14
+
15
+ The README installation section now includes Expo-first install commands (`npx expo install ...`), the MapLibre config-plugin snippet for `app.json`, an Expo Go caveat, and a bare-workflow pod-install line.
16
+
17
+ - ac0d1c6: `trackDau` exported from the RN SDK now defaults `sdk_type` to `"react-native"`. It previously re-exported the platform-agnostic core implementation whose default (`"javascript"`) misattributed direct calls from React Native apps. `<YarrowMapView>`'s built-in DAU ping already reported correctly.
18
+
19
+ ## 0.4.0
20
+
21
+ ### Minor Changes
22
+
23
+ - 00098c7: Brand parity with the web SDK: `<YarrowMapView>` now renders the Yarrow brand badge (same glass pill + logo, theme-aware, `brandBadgePosition` prop defaulting to `bottom-left`) as an overlay view outside the native map, and MapLibre's native attribution and logo ornaments are hidden by default — the `attribution` and `logo` props now default to `false` (pass `true` to restore them); `compass` stays `true`. The pill is frosted glass on iOS only: iOS composites a live `BlurView` (new `@react-native-community/blur` peer dependency, standing in for the web's `backdrop-filter: blur(4px)`); Android draws the tint-only pill at slightly higher opacity — Android has no backdrop-blur API over GPU content, so no blur library can sample the map there. Adds a `brandBadgeScale` multiplier (default `1`, exact web sizing) for sizing the badge up or down. Also adds an `androidView` pass-through prop for MapLibre's render mode. The badge logo ships as a data-URI PNG rendered from the web SDK's `logo.svg`, so no Metro asset config. `style` now applies to the view wrapping the map, as its docs always claimed, with the map filling the wrapper.
24
+
3
25
  ## 0.3.0
4
26
 
5
27
  ### Minor Changes
package/README.md CHANGED
@@ -19,7 +19,12 @@ routing for iOS and Android.
19
19
  ## Installation
20
20
 
21
21
  ```bash
22
+ # Expo — resolves peer versions compatible with your Expo SDK:
23
+ npx expo install @yarrow-uz/rn-map-sdk @maplibre/maplibre-react-native
24
+
25
+ # Bare React Native:
22
26
  npm install @yarrow-uz/rn-map-sdk @maplibre/maplibre-react-native
27
+ cd ios && pod install && cd .. # iOS only
23
28
  ```
24
29
 
25
30
  > Get your API key from the [Yarrow Dashboard](https://dashboard.yarrow.uz).
@@ -31,7 +36,24 @@ npm install @yarrow-uz/rn-map-sdk @maplibre/maplibre-react-native
31
36
  - `@maplibre/maplibre-react-native` **^11.5.1** installed in your app — it
32
37
  carries the native iOS/Android code. Follow its
33
38
  [installation guide](https://maplibre.org/maplibre-react-native/docs/install)
34
- (Expo config plugin or bare-workflow autolinking).
39
+ (Expo config plugin or bare-workflow autolinking). Expo apps must register
40
+ the plugin in `app.json` and **rebuild a native binary** afterwards (the
41
+ map cannot load in Expo Go):
42
+
43
+ ```json
44
+ {
45
+ "expo": {
46
+ "plugins": ["@maplibre/maplibre-react-native"]
47
+ }
48
+ }
49
+ ```
50
+
51
+ In dev builds the SDK detects a missing native module at startup and prints
52
+ the fix — if you see `[YarrowMap] MapLibre native module is not linked`,
53
+ the peers are installed but the app wasn't rebuilt natively.
54
+
55
+ That's the whole dependency list — `@yarrow-uz/rn-map-sdk` has no other
56
+ required peers.
35
57
 
36
58
  The platform-agnostic core is compiled **into** this package's dist, so
37
59
  `@yarrow-uz/rn-map-sdk` is the only Yarrow package you install.
@@ -60,9 +82,14 @@ export function MapScreen() {
60
82
  ```
61
83
 
62
84
  Props: `apiKey` and `center` are required; `zoom` (default 10), `minZoom` (0),
63
- `maxZoom` (19), `theme` (`light`), `styleType` (`default`), `attribution`,
64
- `logo`, `compass` (all `true`), `dauTracking` (`true`), `onReady`,
65
- `onLoadError`, `onPress`, `cameraRef`, `style` and `children` are optional.
85
+ `maxZoom` (19), `theme` (`light`), `styleType` (`default`), `attribution` and
86
+ `logo` (`false` — Yarrow brand policy: the Yarrow badge is the only visible
87
+ badge, and MapLibre's attribution/logo ornaments stay hidden unless explicitly
88
+ restored), `compass` (`true`),
89
+ `brandBadgePosition` (`bottom-left`), `brandBadgeScale` (`1` — exact web
90
+ sizing; pass e.g. `1.4` for a bigger mark), `androidView` (MapLibre's
91
+ default, `surface`), `dauTracking` (`true`), `onReady`, `onLoadError`,
92
+ `onPress`, `cameraRef`, `style` and `children` are optional.
66
93
 
67
94
  The component ref is the MapLibre `MapRef` (`getCenter`, `getBounds`,
68
95
  `queryRenderedFeatures`, …). Pass `cameraRef` for camera control:
@@ -413,10 +440,23 @@ like their web counterparts. Some web features have no native equivalent:
413
440
  after the style loads.
414
441
  - **Hover effects** — the web `hover` config and `setHoverEnabled()` are
415
442
  web-only; there is no hover on touch surfaces.
416
- - **Brand badge & Yarrow controls** — the web SDK's Yarrow brand badge and
417
- zoom/compass controls are DOM overlays. RN maps use MapLibre's native
418
- ornaments instead (`attribution`, `logo`, `compass` props of
419
- `<YarrowMapView>`).
443
+ - **Brand badge & Yarrow controls** — brand parity: `<YarrowMapView>` renders
444
+ the same Yarrow brand badge as the web SDK (tint pill + logo, theme-aware,
445
+ `brandBadgePosition` prop, default `bottom-left`) as an overlay view, and
446
+ MapLibre's native attribution/logo ornaments are hidden by default
447
+ (`attribution`/`logo` props default `false` — pass `true` to restore them).
448
+ This is deliberate Yarrow brand policy, identical on the web: the Yarrow
449
+ badge is the only visible badge on the map (the web SDK hardcodes
450
+ `attributionControl: false`), and the `attribution`/`logo` props exist only
451
+ as escape hatches for apps that need them.
452
+ Size it up with `brandBadgeScale` (e.g. `1.4`) if you want a bigger mark
453
+ than the web's 106px logo. The pill is a **translucent tint on both
454
+ platforms**: RN has no reliable backdrop-blur over the map's GPU surface
455
+ (Android cannot sample GL content at all), so instead of shipping a native
456
+ blur peer for one visual, the badge draws the tint directly — the web SDK
457
+ keeps its `backdrop-filter: blur(4px)`. The compass stays a native ornament
458
+ (`compass`, default `true`); the web SDK's DOM zoom/compass controls have
459
+ no native counterpart.
420
460
  - **Feature state & background color** — MapLibre React Native's `MapRef`
421
461
  exposes no `setFeatureState`, and there is no `changeBackgroundColor()`
422
462
  equivalent (add your own background `<Layer>` if needed).