rampkit-expo-dev 0.0.102 → 0.0.103

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.
@@ -152,8 +152,9 @@ declare class EventManager {
152
152
  trackScreenNavigated(fromScreenName: string | null, toScreenName: string, direction: "forward" | "back", trigger?: "button"): void;
153
153
  /**
154
154
  * Track variable set event
155
+ * @param screenName - The screen where the variable was set (captured at time of change, not firing)
155
156
  */
156
- trackVariableSet(variableName: string, previousValue: any, newValue: any): void;
157
+ trackVariableSet(variableName: string, previousValue: any, newValue: any, screenName?: string | null): void;
157
158
  /**
158
159
  * Reset the event manager (e.g., on logout)
159
160
  */
@@ -379,8 +379,9 @@ class EventManager {
379
379
  }
380
380
  /**
381
381
  * Track variable set event
382
+ * @param screenName - The screen where the variable was set (captured at time of change, not firing)
382
383
  */
383
- trackVariableSet(variableName, previousValue, newValue) {
384
+ trackVariableSet(variableName, previousValue, newValue, screenName) {
384
385
  const valueType = (() => {
385
386
  if (newValue === null || newValue === undefined)
386
387
  return "unknown";
@@ -397,7 +398,7 @@ class EventManager {
397
398
  newValue,
398
399
  previousValue,
399
400
  source: "user_input",
400
- });
401
+ }, screenName ? { screenName } : undefined);
401
402
  }
402
403
  /**
403
404
  * Reset the event manager (e.g., on logout)
@@ -1070,8 +1070,8 @@ function Overlay(props) {
1070
1070
  if (pending.timer) {
1071
1071
  clearTimeout(pending.timer);
1072
1072
  }
1073
- // Fire the event
1074
- EventManager_1.eventManager.trackVariableSet(variableName, pending.previousValue, pending.newValue);
1073
+ // Fire the event with the screen name captured when variable changed
1074
+ EventManager_1.eventManager.trackVariableSet(variableName, pending.previousValue, pending.newValue, pending.screenName);
1075
1075
  // Remove from pending
1076
1076
  pendingVariableEventsRef.current.delete(variableName);
1077
1077
  };
@@ -1082,14 +1082,18 @@ function Overlay(props) {
1082
1082
  if (existing === null || existing === void 0 ? void 0 : existing.timer) {
1083
1083
  clearTimeout(existing.timer);
1084
1084
  }
1085
+ // Capture current screen name at time of change (not when event fires)
1086
+ const currentScreen = props.screens[activeScreenIndexRef.current];
1087
+ const screenName = (currentScreen === null || currentScreen === void 0 ? void 0 : currentScreen.label) || null;
1085
1088
  // Schedule new timer
1086
1089
  const timer = setTimeout(() => {
1087
1090
  fireVariableSetEvent(variableName);
1088
1091
  }, VARIABLE_DEBOUNCE_MS);
1089
- // Store pending event
1092
+ // Store pending event with screen name
1090
1093
  pendingVariableEventsRef.current.set(variableName, {
1091
1094
  previousValue: existing ? existing.previousValue : previousValue, // Keep original previousValue
1092
1095
  newValue,
1096
+ screenName: existing ? existing.screenName : screenName, // Keep original screenName
1093
1097
  timer,
1094
1098
  });
1095
1099
  };
@@ -2,7 +2,7 @@
2
2
  * RampKit SDK Constants
3
3
  * Note: SDK_VERSION is updated by sync-versions.sh from package.json
4
4
  */
5
- export declare const SDK_VERSION = "0.0.101";
5
+ export declare const SDK_VERSION = "0.0.102";
6
6
  export declare const ENDPOINTS: {
7
7
  readonly BASE_URL: "https://uustlzuvjmochxkxatfx.supabase.co/functions/v1";
8
8
  readonly APP_USERS: "/app-users";
@@ -5,7 +5,7 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.SUPABASE_ANON_KEY = exports.CAPABILITIES = exports.STORAGE_KEYS = exports.MANIFEST_BASE_URL = exports.ENDPOINTS = exports.SDK_VERSION = void 0;
8
- exports.SDK_VERSION = "0.0.101";
8
+ exports.SDK_VERSION = "0.0.102";
9
9
  exports.ENDPOINTS = {
10
10
  BASE_URL: "https://uustlzuvjmochxkxatfx.supabase.co/functions/v1",
11
11
  APP_USERS: "/app-users",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rampkit-expo-dev",
3
- "version": "0.0.102",
3
+ "version": "0.0.103",
4
4
  "description": "The Expo SDK for RampKit. Build, test, and personalize app onboardings with instant updates.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",