rampkit-expo-dev 0.0.10 → 0.0.11

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.
@@ -12,11 +12,13 @@ export declare class RampKitCore {
12
12
  environment?: string;
13
13
  autoShowOnboarding?: boolean;
14
14
  onOnboardingFinished?: (payload?: any) => void;
15
+ onShowPaywall?: (payload?: any) => void;
15
16
  showPaywall?: (payload?: any) => void;
16
17
  }): Promise<void>;
17
18
  getOnboardingData(): any;
18
19
  getUserId(): string | null;
19
20
  showOnboarding(opts?: {
21
+ onShowPaywall?: (payload?: any) => void;
20
22
  showPaywall?: (payload?: any) => void;
21
23
  }): void;
22
24
  }
package/build/RampKit.js CHANGED
@@ -17,7 +17,7 @@ class RampKitCore {
17
17
  async init(config) {
18
18
  this.config = config;
19
19
  this.onOnboardingFinished = config.onOnboardingFinished;
20
- this.onShowPaywall = config.showPaywall;
20
+ this.onShowPaywall = config.onShowPaywall || config.showPaywall;
21
21
  try {
22
22
  // Ensure a stable, encrypted user id exists on first init
23
23
  this.userId = await (0, userId_1.getRampKitUserId)();
@@ -110,7 +110,7 @@ class RampKitCore {
110
110
  }
111
111
  catch (_) { }
112
112
  },
113
- onShowPaywall: (opts === null || opts === void 0 ? void 0 : opts.showPaywall) || this.onShowPaywall,
113
+ onShowPaywall: (opts === null || opts === void 0 ? void 0 : opts.onShowPaywall) || (opts === null || opts === void 0 ? void 0 : opts.showPaywall) || this.onShowPaywall,
114
114
  });
115
115
  }
116
116
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rampkit-expo-dev",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
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",