@yarrow-uz/rn-map-sdk 0.4.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,21 @@
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
+
3
19
  ## 0.4.0
4
20
 
5
21
  ### Minor Changes
package/README.md CHANGED
@@ -19,7 +19,12 @@ routing for iOS and Android.
19
19
  ## Installation
20
20
 
21
21
  ```bash
22
- npm install @yarrow-uz/rn-map-sdk @maplibre/maplibre-react-native @react-native-community/blur
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:
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,10 +36,24 @@ npm install @yarrow-uz/rn-map-sdk @maplibre/maplibre-react-native @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).
35
- - `@react-native-community/blur` **^4.4.1** installed in your app — the brand
36
- badge's frosted-glass blur (iOS) is a native effect, so it needs its native
37
- code linked too (autolinking covers both npm and Expo).
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.
38
57
 
39
58
  The platform-agnostic core is compiled **into** this package's dist, so
40
59
  `@yarrow-uz/rn-map-sdk` is the only Yarrow package you install.
@@ -64,7 +83,9 @@ export function MapScreen() {
64
83
 
65
84
  Props: `apiKey` and `center` are required; `zoom` (default 10), `minZoom` (0),
66
85
  `maxZoom` (19), `theme` (`light`), `styleType` (`default`), `attribution` and
67
- `logo` (`false` — the Yarrow brand badge replaces them), `compass` (`true`),
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`),
68
89
  `brandBadgePosition` (`bottom-left`), `brandBadgeScale` (`1` — exact web
69
90
  sizing; pass e.g. `1.4` for a bigger mark), `androidView` (MapLibre's
70
91
  default, `surface`), `dauTracking` (`true`), `onReady`, `onLoadError`,
@@ -420,17 +441,20 @@ like their web counterparts. Some web features have no native equivalent:
420
441
  - **Hover effects** — the web `hover` config and `setHoverEnabled()` are
421
442
  web-only; there is no hover on touch surfaces.
422
443
  - **Brand badge & Yarrow controls** — brand parity: `<YarrowMapView>` renders
423
- the same Yarrow brand badge as the web SDK (glass pill + logo, theme-aware,
444
+ the same Yarrow brand badge as the web SDK (tint pill + logo, theme-aware,
424
445
  `brandBadgePosition` prop, default `bottom-left`) as an overlay view, and
425
446
  MapLibre's native attribution/logo ornaments are hidden by default
426
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.
427
452
  Size it up with `brandBadgeScale` (e.g. `1.4`) if you want a bigger mark
428
- than the web's 106px logo. **Frosted glass is iOS-only**: iOS composites a
429
- live `BlurView` (`@react-native-community/blur`) over the map at the
430
- window level. Android has no backdrop-blur API over GPU content (blur
431
- libraries capture the root view into a software bitmap canvas, which the
432
- map's GL surface never appears in), so the Android pill runs a slightly
433
- more opaque tint instead of blur. The compass stays a native ornament
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
434
458
  (`compass`, default `true`); the web SDK's DOM zoom/compass controls have
435
459
  no native counterpart.
436
460
  - **Feature state & background color** — MapLibre React Native's `MapRef`