@sagepilot-ai/react-native-sdk 0.4.3 → 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/README.md +3 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ The SDK opens the Sagepilot-hosted chat experience inside a React Native WebView
|
|
|
6
6
|
|
|
7
7
|
For full integration docs, see [React Native SDK docs](https://docs.sagepilot.ai/sdks/react-native/overview).
|
|
8
8
|
|
|
9
|
+
For automatic app observations, initialize the [React Native events add-on](../react-native-events-addon/README.md) separately with an SDK installation key.
|
|
10
|
+
|
|
9
11
|
## Requirements
|
|
10
12
|
|
|
11
13
|
- React 18+
|
|
@@ -16,7 +18,7 @@ For full integration docs, see [React Native SDK docs](https://docs.sagepilot.ai
|
|
|
16
18
|
|
|
17
19
|
## Install
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
The base SDK, camera add-on and push add-on share release **0.4.2**. Install matching versions of the add-ons your app uses; chat-only apps do not need either add-on.
|
|
20
22
|
|
|
21
23
|
```bash
|
|
22
24
|
npm install @sagepilot-ai/react-native-sdk@latest react-native-webview
|
|
@@ -91,8 +93,6 @@ export function SagepilotProvider({ children }: { children: ReactNode }) {
|
|
|
91
93
|
}
|
|
92
94
|
```
|
|
93
95
|
|
|
94
|
-
For native product navigation, pass `onOpenURL` to `SagepilotChatProvider`. It receives external top-level destinations; return `true` (or a promise resolving to `true`) when your native router handles the URL. Returning `false`, omitting the callback, or throwing preserves the existing `Linking.openURL` fallback. Same-origin widget pages, including `/cta` click tracking, load normally before their final destination is offered to the callback. A handled destination resets the hosted WebView so reopening chat does not leave it on a tracking page.
|
|
95
|
-
|
|
96
96
|
```tsx
|
|
97
97
|
export function App() {
|
|
98
98
|
return (
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED