@akhilpulse/samadhaan-session-replay 0.6.4 → 0.6.6
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/package.json +1 -1
- package/src/SessionReplayProvider.tsx +48 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akhilpulse/samadhaan-session-replay",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "React Native SDK for Samadhaan Guided Support — session recording, live remote screen-share, take-control, guided-tour overlays, and Shake-to-Assist AI voice guide.",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"module": "src/index.ts",
|
|
@@ -56,7 +56,7 @@ let pixelCopyDisabled = false; // turned true after repeated runtime failures to
|
|
|
56
56
|
let pixelCopyFailStreak = 0; // consecutive non-busy failures; resets on success
|
|
57
57
|
|
|
58
58
|
const STORAGE_KEY = "@akhilpulse/samadhaan-session-replay/sessionId";
|
|
59
|
-
const SDK_VERSION = "0.6.
|
|
59
|
+
const SDK_VERSION = "0.6.6";
|
|
60
60
|
|
|
61
61
|
// ---- Module-level session singleton --------------------------------------
|
|
62
62
|
// Multiple SessionReplayProvider mounts (intentional or via React StrictMode's
|
|
@@ -877,20 +877,34 @@ export function SessionReplayProvider({ config, children }: { config: Config; ch
|
|
|
877
877
|
</Animated.View>
|
|
878
878
|
)}
|
|
879
879
|
|
|
880
|
-
{/* Shake-to-Assist: bottom
|
|
880
|
+
{/* Shake-to-Assist: Siri-style bottom overlay — a white translucent
|
|
881
|
+
gradient rising from the bottom edge (no dark pill bar) with the
|
|
882
|
+
multicolor voice wave + status text floating over it, and a small
|
|
883
|
+
frosted ✕ to end the session. Gradient is built from stacked
|
|
884
|
+
strips so we don't need a native linear-gradient dependency. */}
|
|
881
885
|
{assistantActive && (
|
|
882
886
|
<View style={styles.assistDock} pointerEvents="box-none">
|
|
883
|
-
<View style={
|
|
884
|
-
|
|
885
|
-
|
|
887
|
+
<View style={StyleSheet.absoluteFill} pointerEvents="none">
|
|
888
|
+
{ASSIST_GRADIENT_STOPS.map((o, i) => (
|
|
889
|
+
<View key={i} style={{ flex: 1, backgroundColor: "#ffffff", opacity: o }} />
|
|
890
|
+
))}
|
|
891
|
+
</View>
|
|
892
|
+
<View style={styles.assistStatusRow} pointerEvents="box-none">
|
|
893
|
+
{/* Wave + text are display-only: pass touches through to the app. */}
|
|
894
|
+
<View pointerEvents="none">
|
|
895
|
+
<VoiceWave phase={assistantPhase} />
|
|
896
|
+
</View>
|
|
897
|
+
<Text style={styles.assistStatusText} numberOfLines={1} pointerEvents="none">
|
|
886
898
|
{assistantStatusLabel(assistantPhase, assistMicStatus)}
|
|
887
899
|
</Text>
|
|
888
900
|
<Pressable
|
|
889
901
|
onPress={endAssist}
|
|
890
902
|
style={({ pressed }) => [styles.assistClose, pressed && styles.btnPressed]}
|
|
891
|
-
hitSlop={
|
|
903
|
+
hitSlop={12}
|
|
904
|
+
accessibilityRole="button"
|
|
905
|
+
accessibilityLabel="End voice help"
|
|
892
906
|
>
|
|
893
|
-
<Text style={styles.assistCloseText}
|
|
907
|
+
<Text style={styles.assistCloseText}>✕</Text>
|
|
894
908
|
</Pressable>
|
|
895
909
|
</View>
|
|
896
910
|
</View>
|
|
@@ -916,6 +930,15 @@ export function SessionReplayProvider({ config, children }: { config: Config; ch
|
|
|
916
930
|
|
|
917
931
|
// ---- Shake-to-Assist UI bits ----
|
|
918
932
|
|
|
933
|
+
// Opacity stops for the Siri-style white gradient (top → bottom). Many thin
|
|
934
|
+
// strips fake a smooth linear gradient without a native gradient dependency.
|
|
935
|
+
const ASSIST_GRADIENT_STOPS = [
|
|
936
|
+
0, 0.03, 0.07, 0.13, 0.2, 0.29, 0.39, 0.5, 0.61, 0.71, 0.8, 0.87, 0.92, 0.95,
|
|
937
|
+
];
|
|
938
|
+
|
|
939
|
+
// Apple-ish multicolor voice wave bars.
|
|
940
|
+
const SIRI_WAVE_COLORS = ["#0A84FF", "#64D2FF", "#BF5AF2", "#FF375F", "#5E5CE6"];
|
|
941
|
+
|
|
919
942
|
/**
|
|
920
943
|
* Pulsing arrow + label bubble pointing at the next element to tap.
|
|
921
944
|
* - Halo pulses continuously so the target is hard to miss.
|
|
@@ -1025,7 +1048,11 @@ function VoiceWave({ phase }: { phase: AssistantPhase }) {
|
|
|
1025
1048
|
key={i}
|
|
1026
1049
|
style={[
|
|
1027
1050
|
styles.waveBar,
|
|
1028
|
-
{
|
|
1051
|
+
{
|
|
1052
|
+
backgroundColor: SIRI_WAVE_COLORS[i % SIRI_WAVE_COLORS.length],
|
|
1053
|
+
transform: [{ scaleY: b }],
|
|
1054
|
+
opacity: active ? 1 : 0.5,
|
|
1055
|
+
},
|
|
1029
1056
|
]}
|
|
1030
1057
|
/>
|
|
1031
1058
|
))}
|
|
@@ -1166,23 +1193,25 @@ const styles = StyleSheet.create({
|
|
|
1166
1193
|
},
|
|
1167
1194
|
assistBubbleLabel: { color: "#93c5fd", fontSize: 12, fontWeight: "700", marginBottom: 2 },
|
|
1168
1195
|
assistBubbleText: { color: "#fff", fontSize: 14, lineHeight: 19 },
|
|
1169
|
-
// ---- Shake-to-Assist bottom
|
|
1196
|
+
// ---- Shake-to-Assist Siri-style bottom overlay ----
|
|
1170
1197
|
assistDock: {
|
|
1171
1198
|
position: "absolute", left: 0, right: 0, bottom: 0,
|
|
1172
|
-
|
|
1199
|
+
height: 140, justifyContent: "flex-end",
|
|
1200
|
+
},
|
|
1201
|
+
assistStatusRow: {
|
|
1202
|
+
flexDirection: "row", alignItems: "center", justifyContent: "center",
|
|
1203
|
+
paddingBottom: 30, paddingHorizontal: 20,
|
|
1173
1204
|
},
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
paddingVertical: 10, paddingHorizontal: 16, maxWidth: "100%",
|
|
1178
|
-
shadowColor: "#000", shadowOpacity: 0.3, shadowRadius: 12, shadowOffset: { width: 0, height: 6 },
|
|
1205
|
+
assistStatusText: {
|
|
1206
|
+
color: "#111827", fontSize: 15, fontWeight: "600",
|
|
1207
|
+
marginHorizontal: 12, flexShrink: 1,
|
|
1179
1208
|
},
|
|
1180
|
-
assistStatusText: { color: "#e5e7eb", fontSize: 14, fontWeight: "600", marginHorizontal: 12, flexShrink: 1 },
|
|
1181
1209
|
assistClose: {
|
|
1182
|
-
|
|
1183
|
-
|
|
1210
|
+
width: 30, height: 30, borderRadius: 15,
|
|
1211
|
+
backgroundColor: "rgba(17,24,39,0.10)",
|
|
1212
|
+
alignItems: "center", justifyContent: "center",
|
|
1184
1213
|
},
|
|
1185
|
-
assistCloseText: { color: "#
|
|
1214
|
+
assistCloseText: { color: "#374151", fontSize: 13, fontWeight: "700", lineHeight: 16 },
|
|
1186
1215
|
assistFab: {
|
|
1187
1216
|
position: "absolute", top: 96, right: 12,
|
|
1188
1217
|
width: 44, height: 44, borderRadius: 22,
|