react-native-navigation-mode 0.4.0 → 1.0.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  🧭 Detect Android navigation mode (3-button, 2-button, or gesture navigation) with native precision using Turbo modules.
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/react-native-navigation-mode)](https://badge.fury.io/js/react-native-navigation-mode) [![License](https://img.shields.io/github/license/JairajJangle/react-native-navigation-mode)](https://github.com/JairajJangle/react-native-navigation-mode/blob/main/LICENSE) [![Workflow Status](https://github.com/JairajJangle/react-native-navigation-mode/actions/workflows/ci.yml/badge.svg)](https://github.com/JairajJangle/react-native-navigation-mode/actions/workflows/ci.yml) ![Android](https://img.shields.io/badge/-Android-555555?logo=android&logoColor=3DDC84) ![iOS](https://img.shields.io/badge/-iOS-555555?logo=apple&logoColor=white) [![GitHub issues](https://img.shields.io/github/issues/JairajJangle/react-native-navigation-mode)](https://github.com/JairajJangle/react-native-navigation-mode/issues?q=is%3Aopen+is%3Aissue) ![TS](https://img.shields.io/badge/TypeScript-strict_💪-blue) ![Turbo Module](https://img.shields.io/badge/Turbo%20Module-⚡-orange) ![Expo Compatible](https://img.shields.io/badge/Expo-555555?style=flat&logo=expo&logoColor=white) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-native-navigation-mode)
5
+ [![npm version](https://img.shields.io/npm/v/react-native-navigation-mode)](https://badge.fury.io/js/react-native-navigation-mode) [![License](https://img.shields.io/github/license/JairajJangle/react-native-navigation-mode)](https://github.com/JairajJangle/react-native-navigation-mode/blob/main/LICENSE) [![Workflow Status](https://github.com/JairajJangle/react-native-navigation-mode/actions/workflows/ci.yml/badge.svg)](https://github.com/JairajJangle/react-native-navigation-mode/actions/workflows/ci.yml) ![Android](https://img.shields.io/badge/-Android-555555?logo=android&logoColor=3DDC84) ![iOS](https://img.shields.io/badge/-iOS-555555?logo=apple&logoColor=white) [![GitHub issues](https://img.shields.io/github/issues/JairajJangle/react-native-navigation-mode)](https://github.com/JairajJangle/react-native-navigation-mode/issues?q=is%3Aopen+is%3Aissue) ![TS](https://img.shields.io/badge/TypeScript-strict_💪-blue) ![Turbo Module](https://img.shields.io/badge/Turbo%20Module-⚡-orange) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-native-navigation-mode)
6
6
 
7
7
  <table align="center">
8
8
  <tr>
@@ -41,7 +41,6 @@
41
41
  - 🔄 **Real-time Detection** - Accurate navigation mode identification
42
42
  - 📱 **Cross Platform** - Android detection + iOS compatibility
43
43
  - 🎣 **React Hooks** - Easy integration with `useNavigationMode()`
44
- - 🚀 **Expo Compatible** - Works with Expo managed workflow (dev builds)
45
44
  - 📦 **Zero Dependencies** - Lightweight and performant
46
45
  - 🛡️ **TypeScript** - Full type safety out of the box
47
46
 
@@ -59,30 +58,6 @@ Using npm:
59
58
  npm install react-native-navigation-mode
60
59
  ```
61
60
 
62
- ### For Expo Managed Workflow
63
-
64
- ```sh
65
- npx expo install react-native-navigation-mode
66
- ```
67
-
68
- Add the plugin to your `app.config.js`:
69
-
70
- ```javascript
71
- export default {
72
- expo: {
73
- plugins: ["react-native-navigation-mode"],
74
- },
75
- };
76
- ```
77
-
78
- Create a development build:
79
-
80
- ```sh
81
- npx expo run:android
82
- ```
83
-
84
- > ⚠️ **Note:** This library requires a development build and will NOT work in Expo Go due to native code requirements.
85
-
86
61
  ### For React Native CLI
87
62
 
88
63
  Auto-linking handles setup automatically for React Native 0.60+.
@@ -215,9 +190,8 @@ The library uses multiple detection methods for maximum accuracy:
215
190
  ## Notes
216
191
 
217
192
  1. 🍎 **iOS Behavior** - iOS always returns `isGestureNavigation: true` since iOS doesn't have 3-button navigation
218
- 2. 📱 **Expo Go** - Not supported due to native module requirements. Use development builds instead
219
- 3. **Performance** - Turbo module ensures minimal performance impact
220
- 4. 🔄 **Real-time** - Navigation mode is detected at call time, reflecting current device settings
193
+ 2. **Performance** - Turbo module ensures minimal performance impact
194
+ 3. 🔄 **Real-time** - Navigation mode is detected at call time, reflecting current device settings
221
195
 
222
196
  ## Troubleshooting
223
197
 
@@ -227,9 +201,6 @@ The library uses multiple detection methods for maximum accuracy:
227
201
  - Ensure you're using React Native 0.68+ with new architecture enabled
228
202
  - For older RN versions, the module will fallback gracefully
229
203
 
230
- **Expo Go not working**
231
- - This is expected. Create a development build with `npx expo run:android`
232
-
233
204
  **Always returns 'unknown' on Android**
234
205
  - Check if your device/emulator supports the navigation mode APIs
235
206
  - Some custom ROMs may not expose standard Android navigation settings
@@ -261,9 +232,6 @@ MIT
261
232
  ## ❤️ Thanks to
262
233
 
263
234
  - Module built using [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
264
- - Inspiration from various Android navigation detection attempts in the community
265
- - React Native team for Turbo Modules architecture
266
- - Expo team for config plugin support
267
235
  - Readme is edited using [Typora](https://typora.io/)
268
236
 
269
237
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-navigation-mode",
3
- "version": "0.4.0",
3
+ "version": "1.0.0",
4
4
  "description": "Detect Android navigation mode (3-button, 2-button, or gesture)",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -12,13 +12,6 @@
12
12
  },
13
13
  "./package.json": "./package.json"
14
14
  },
15
- "expo": {
16
- "platforms": [
17
- "android",
18
- "ios"
19
- ],
20
- "plugin": "./plugin/build/index.js"
21
- },
22
15
  "files": [
23
16
  "src",
24
17
  "lib",
@@ -74,7 +67,6 @@
74
67
  "@eslint/eslintrc": "^3.3.0",
75
68
  "@eslint/js": "^9.22.0",
76
69
  "@evilmartians/lefthook": "^1.5.0",
77
- "@expo/config-plugins": "^10.0.0",
78
70
  "@react-native-community/cli": "15.0.0-alpha.2",
79
71
  "@react-native/babel-preset": "0.79.2",
80
72
  "@react-native/eslint-config": "^0.78.0",
@@ -1,4 +0,0 @@
1
- import { type ConfigPlugin } from '@expo/config-plugins';
2
- declare const _default: ConfigPlugin<void>;
3
- export default _default;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../plugin/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAuB,MAAM,sBAAsB,CAAC;;AAQ9E,wBAA8E"}