@akhilpulse/samadhaan-session-replay 0.6.3 → 0.6.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akhilpulse/samadhaan-session-replay",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
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.3";
59
+ const SDK_VERSION = "0.6.4";
60
60
 
61
61
  // ---- Module-level session singleton --------------------------------------
62
62
  // Multiple SessionReplayProvider mounts (intentional or via React StrictMode's
@@ -939,10 +939,19 @@ function AssistArrowOverlay({
939
939
 
940
940
  const px = nx * (w || 0);
941
941
  const py = ny * (h || 0);
942
- // Keep the label bubble on-screen: flip below the target near the top edge.
943
- const below = py < 96;
944
- // Never let the bubble sink behind the bottom voice dock (~110px tall).
945
- const bubbleBottom = Math.max((h || 0) - py + 36, 122);
942
+ // Bubble placement:
943
+ // - target near the TOP edge -> bubble just below the target
944
+ // - target near the BOTTOM -> bubble pinned to the top of the screen, so it
945
+ // never covers the target or the app's bottom UI
946
+ // (bottom sheets / nav bars live there)
947
+ // - otherwise -> bubble just above the target
948
+ const nearTop = py < 96;
949
+ const nearBottom = py > (h || 0) - 260;
950
+ const bubblePos: any = nearTop
951
+ ? { top: py + 36 }
952
+ : nearBottom
953
+ ? { top: 70 }
954
+ : { bottom: (h || 0) - py + 36 };
946
955
  const scale = pulse.interpolate({ inputRange: [0, 1], outputRange: [1, 1.45] });
947
956
  const opacity = pulse.interpolate({ inputRange: [0, 1], outputRange: [1, 0.35] });
948
957
 
@@ -956,13 +965,13 @@ function AssistArrowOverlay({
956
965
  <View
957
966
  style={[
958
967
  styles.assistArrow,
959
- below
968
+ nearTop
960
969
  ? { left: px - 9, top: py + 12 }
961
970
  : { left: px - 9, top: py - 30, transform: [{ rotate: "180deg" }] },
962
971
  ]}
963
972
  />
964
973
  {!!(label || instruction) && (
965
- <View style={[styles.assistBubble, { left: 16, right: 16, [below ? "top" : "bottom"]: below ? py + 36 : bubbleBottom } as any]}>
974
+ <View style={[styles.assistBubble, { left: 16, right: 16, ...bubblePos }]}>
966
975
  {!!label && <Text style={styles.assistBubbleLabel}>{label}</Text>}
967
976
  {!!instruction && <Text style={styles.assistBubbleText}>{instruction}</Text>}
968
977
  </View>