@sagepilot-ai/react-native-sdk 0.1.0 → 0.2.1

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
@@ -38,7 +38,7 @@ You configure the SDK with:
38
38
  - `tokenStorage`: secure storage adapter for SDK-created customer session tokens
39
39
  - optional request, presentation, and behavior settings
40
40
 
41
- For normal Sagepilot cloud usage, omit `host`; API calls default to `https://api.sagepilot.ai` and the WebView uses the Sagepilot-hosted widget origin.
41
+ For normal Sagepilot cloud usage, omit `host`; API calls and the WebView default to `https://app.sagepilot.ai`.
42
42
 
43
43
  ```ts
44
44
  await SagepilotChat.configure({
@@ -64,7 +64,7 @@ These options are part of the supported React Native SDK configuration contract.
64
64
  | Option | Purpose |
65
65
  |---|---|
66
66
  | `key` | Public routing key in the format `workspace_id:channel_id`. |
67
- | `host` | Sagepilot customer-manager/API host override. Most apps should omit this. |
67
+ | `host` | Sagepilot app/API host override. Most apps should omit this. |
68
68
  | `widgetHost` | Optional hosted widget origin override for development or dedicated widget routing. Most apps should omit this. |
69
69
  | `headers` | Additional headers for SDK service requests. Do not pass server API keys or long-lived secrets from a mobile app. |
70
70
  | `fetch` | Custom fetch implementation for runtimes that need one. |
package/dist/index.cjs CHANGED
@@ -46,7 +46,7 @@ var SagepilotChatError = class extends Error {
46
46
 
47
47
  // src/core/config/constants.ts
48
48
  var SDK_NAME = "@sagepilot-ai/react-native-sdk";
49
- var SDK_VERSION = "0.1.0";
49
+ var SDK_VERSION = "0.2.0";
50
50
  var DEFAULT_HOST = "https://app.sagepilot.ai";
51
51
  var DEFAULT_WIDGET_HOST = "https://app.sagepilot.ai";
52
52
  var CUSTOMER_API_PREFIX = "/customer-api/v1";
@@ -1214,7 +1214,9 @@ function SagepilotChatProvider({
1214
1214
  }, []);
1215
1215
  const showCloseButton = state.presentation?.showCloseButton ?? false;
1216
1216
  const presentationStyle = state.presentation?.style ?? "sheet";
1217
+ const isFullScreenModal = presentationStyle === "fullScreen";
1217
1218
  const animationType = presentationStyle === "fullScreen" || presentationStyle === "push" ? "slide" : "fade";
1219
+ const ModalContainer = import_react_native.Platform.OS === "ios" && isFullScreenModal ? import_react_native.SafeAreaView : import_react_native.View;
1218
1220
  const handleWebViewMessage = (event) => {
1219
1221
  internalSagepilotChat.handleHostedBridgeMessage(parseHostedBridgeMessage(event.nativeEvent?.data));
1220
1222
  };
@@ -1280,11 +1282,11 @@ function SagepilotChatProvider({
1280
1282
  {
1281
1283
  visible: state.configured && state.isPresented,
1282
1284
  animationType,
1283
- presentationStyle: presentationStyle === "fullScreen" ? "fullScreen" : "pageSheet",
1285
+ presentationStyle: isFullScreenModal ? "fullScreen" : "pageSheet",
1284
1286
  onRequestClose: () => internalSagepilotChat.dismiss()
1285
1287
  },
1286
1288
  (0, import_react.createElement)(
1287
- import_react_native.View,
1289
+ ModalContainer,
1288
1290
  { style: styles.container },
1289
1291
  showCloseButton ? (0, import_react.createElement)(
1290
1292
  import_react_native.View,
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ var SagepilotChatError = class extends Error {
15
15
 
16
16
  // src/core/config/constants.ts
17
17
  var SDK_NAME = "@sagepilot-ai/react-native-sdk";
18
- var SDK_VERSION = "0.1.0";
18
+ var SDK_VERSION = "0.2.0";
19
19
  var DEFAULT_HOST = "https://app.sagepilot.ai";
20
20
  var DEFAULT_WIDGET_HOST = "https://app.sagepilot.ai";
21
21
  var CUSTOMER_API_PREFIX = "/customer-api/v1";
@@ -1052,6 +1052,7 @@ import {
1052
1052
  Modal,
1053
1053
  Platform,
1054
1054
  Pressable,
1055
+ SafeAreaView,
1055
1056
  StyleSheet,
1056
1057
  Text,
1057
1058
  View
@@ -1191,7 +1192,9 @@ function SagepilotChatProvider({
1191
1192
  }, []);
1192
1193
  const showCloseButton = state.presentation?.showCloseButton ?? false;
1193
1194
  const presentationStyle = state.presentation?.style ?? "sheet";
1195
+ const isFullScreenModal = presentationStyle === "fullScreen";
1194
1196
  const animationType = presentationStyle === "fullScreen" || presentationStyle === "push" ? "slide" : "fade";
1197
+ const ModalContainer = Platform.OS === "ios" && isFullScreenModal ? SafeAreaView : View;
1195
1198
  const handleWebViewMessage = (event) => {
1196
1199
  internalSagepilotChat.handleHostedBridgeMessage(parseHostedBridgeMessage(event.nativeEvent?.data));
1197
1200
  };
@@ -1257,11 +1260,11 @@ function SagepilotChatProvider({
1257
1260
  {
1258
1261
  visible: state.configured && state.isPresented,
1259
1262
  animationType,
1260
- presentationStyle: presentationStyle === "fullScreen" ? "fullScreen" : "pageSheet",
1263
+ presentationStyle: isFullScreenModal ? "fullScreen" : "pageSheet",
1261
1264
  onRequestClose: () => internalSagepilotChat.dismiss()
1262
1265
  },
1263
1266
  createElement(
1264
- View,
1267
+ ModalContainer,
1265
1268
  { style: styles.container },
1266
1269
  showCloseButton ? createElement(
1267
1270
  View,
package/package.json CHANGED
@@ -1,7 +1,15 @@
1
1
  {
2
2
  "name": "@sagepilot-ai/react-native-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Sagepilot AI React Native chat SDK",
5
+ "keywords": [
6
+ "sagepilot",
7
+ "react-native",
8
+ "chat",
9
+ "customer-support",
10
+ "webview",
11
+ "sdk"
12
+ ],
5
13
  "license": "MIT",
6
14
  "type": "module",
7
15
  "main": "./dist/index.cjs",
package/LICENSE.md DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Sagepilot AI
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.