@sagepilot-ai/react-native-sdk 0.2.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/dist/index.cjs +4 -2
- package/dist/index.js +5 -2
- package/package.json +1 -1
- package/LICENSE.md +0 -21
package/dist/index.cjs
CHANGED
|
@@ -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:
|
|
1285
|
+
presentationStyle: isFullScreenModal ? "fullScreen" : "pageSheet",
|
|
1284
1286
|
onRequestClose: () => internalSagepilotChat.dismiss()
|
|
1285
1287
|
},
|
|
1286
1288
|
(0, import_react.createElement)(
|
|
1287
|
-
|
|
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
|
@@ -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:
|
|
1263
|
+
presentationStyle: isFullScreenModal ? "fullScreen" : "pageSheet",
|
|
1261
1264
|
onRequestClose: () => internalSagepilotChat.dismiss()
|
|
1262
1265
|
},
|
|
1263
1266
|
createElement(
|
|
1264
|
-
|
|
1267
|
+
ModalContainer,
|
|
1265
1268
|
{ style: styles.container },
|
|
1266
1269
|
showCloseButton ? createElement(
|
|
1267
1270
|
View,
|
package/package.json
CHANGED
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.
|