@tolinku/react-native-sdk 0.6.0 → 0.7.0

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/README.md CHANGED
@@ -235,7 +235,7 @@ The component automatically filters dismissed and suppressed messages, and shows
235
235
  |------|------|-------------|
236
236
  | `trigger` | `string?` | Filter messages by trigger type |
237
237
  | `triggerValue` | `string?` | Match a specific trigger value |
238
- | `onButtonPress` | `(action, messageId) => void` | Called when a message button is pressed. Only for `http` and `https` actions; anything else is blocked before this runs |
238
+ | `onButtonPress` | `(action, messageId) => void` | Called when a message button is pressed, including a deep link into your own app such as `myapp://order/4821`. Schemes that can run code (`javascript:`, `data:`, `file:` and the like) are blocked before this runs |
239
239
  | `onDismiss` | `(messageId) => void` | Called when a message is dismissed |
240
240
 
241
241
  ## Configuration Options
@@ -312,7 +312,7 @@ await Tolinku.destroy();
312
312
  |------|-------------|
313
313
  | `trigger` | Filter messages by trigger type |
314
314
  | `triggerValue` | Match a specific trigger value |
315
- | `onButtonPress` | Callback for button presses, for `http` and `https` actions only |
315
+ | `onButtonPress` | Callback for button presses, including your own app's deep link scheme |
316
316
  | `onDismiss` | Callback for message dismissal |
317
317
 
318
318
  ## Documentation
@@ -20,7 +20,7 @@ buildscript {
20
20
  mavenCentral()
21
21
  }
22
22
  dependencies {
23
- classpath("com.android.tools.build:gradle:8.1.4")
23
+ classpath("com.android.tools.build:gradle:9.5.1")
24
24
  }
25
25
  }
26
26
 
@@ -35,20 +35,28 @@ android {
35
35
  // namespace, so the old manifest package attribute is not needed.
36
36
  namespace "com.tolinku.rnsdk"
37
37
 
38
- compileSdkVersion safeExtGet("compileSdkVersion", 34)
38
+ // Property form, not compileSdkVersion(): the method was removed in AGP 9,
39
+ // and the property has existed since AGP 7.0, which is below the AGP 7.4
40
+ // that this package's React Native 0.72 floor ships with. So this reads
41
+ // correctly on every host in the supported range rather than only new ones.
42
+ compileSdk safeExtGet("compileSdkVersion", 36)
39
43
 
40
44
  defaultConfig {
41
45
  // The Install Referrer library needs 21; the host app decides above that.
42
- minSdkVersion safeExtGet("minSdkVersion", 21)
43
- targetSdkVersion safeExtGet("targetSdkVersion", 34)
46
+ minSdk safeExtGet("minSdkVersion", 21)
47
+ // Google Play has required targetSdk 36 since 31 August 2026, so a
48
+ // host that leaves this to the fallback should land on a value it can
49
+ // still publish with.
50
+ targetSdk safeExtGet("targetSdkVersion", 36)
44
51
  }
45
52
 
46
53
  compileOptions {
47
- sourceCompatibility JavaVersion.VERSION_1_8
48
- targetCompatibility JavaVersion.VERSION_1_8
54
+ sourceCompatibility JavaVersion.VERSION_11
55
+ targetCompatibility JavaVersion.VERSION_11
49
56
  }
50
57
 
51
- lintOptions {
58
+ // lint, not lintOptions: renamed in AGP 7.0 and removed in AGP 9.
59
+ lint {
52
60
  abortOnError false
53
61
  }
54
62
  }
@@ -11,7 +11,22 @@ import java.util.ArrayList;
11
11
  import java.util.Collections;
12
12
  import java.util.List;
13
13
 
14
- /** Registers the install referrer module with React Native's autolinking. */
14
+ /**
15
+ * Registers the install referrer module with React Native's autolinking.
16
+ *
17
+ * <p>Implements {@link ReactPackage} rather than extending {@code
18
+ * BaseReactPackage}, which is what React Native now recommends and why the
19
+ * compiler reports {@code createNativeModules} as deprecated from 0.88.
20
+ * {@code BaseReactPackage} arrived in React Native 0.74, and this package
21
+ * declares a peer range starting at 0.72, so adopting it would drop two
22
+ * versions of support to silence a warning. Deprecated is not removed: under
23
+ * the New Architecture this is carried by the interop layer and works, which
24
+ * the standalone Android build in CI compiles on 0.88 to confirm.
25
+ *
26
+ * <p>When the peer floor next rises above 0.74, extend {@code BaseReactPackage}
27
+ * and implement {@code getModule} plus {@code getReactModuleInfoProvider}
28
+ * instead. Until then this warning is expected and should be left alone.
29
+ */
15
30
  public class TolinkuInstallReferrerPackage implements ReactPackage {
16
31
 
17
32
  @Override
package/dist/index.d.mts CHANGED
@@ -157,6 +157,15 @@ interface MessageContent {
157
157
  props: Record<string, unknown>;
158
158
  };
159
159
  content: MessageComponent[];
160
+ /**
161
+ * A Section's children, keyed "<component id>:content".
162
+ *
163
+ * Puck keeps nested content here rather than on the parent's props, so a
164
+ * renderer that reads props.children finds nothing and draws every Section
165
+ * as an empty box. This was missing from the type entirely, which is part of
166
+ * how that went unnoticed.
167
+ */
168
+ zones?: Record<string, MessageComponent[]>;
160
169
  }
161
170
  /** A single Puck component */
162
171
  interface MessageComponent {
@@ -441,7 +450,7 @@ declare class Links {
441
450
  * await Tolinku.track('signup', { source: 'onboarding' });
442
451
  */
443
452
  declare class Tolinku {
444
- static readonly VERSION = "0.6.0";
453
+ static readonly VERSION = "0.7.0";
445
454
  private static client;
446
455
  private static analyticsInstance;
447
456
  private static ecommerceInstance;
@@ -569,4 +578,5 @@ declare function TolinkuMessages({ trigger, triggerValue, onDismiss, onButtonPre
569
578
  */
570
579
  declare function isSafeUrl(url: string): boolean;
571
580
 
572
- export { type AddPaymentInfoParams, type AddToCartParams, type AddToWishlistParams, type BeginCheckoutParams, type ClaimBySignalsOptions, type CompleteReferralOptions, type CompleteReferralResult, type CreateReferralOptions, type CreateReferralResult, type DeferredLink, type EcommerceItem, type LeaderboardEntry, type Message, type MessageComponent, type MessageContent, type MilestoneOptions, type MilestoneResult, type PurchaseParams, type RateParams, type ReferralInfo, type ReferrerProvider, type RefundParams, type RemoveFromCartParams, type ResolvedLink, type ResolvedTolinkuConfig, type SearchParams, type ShareParams, type ShowMessageOptions, type SpendCreditsParams, Tolinku, type TolinkuConfig, TolinkuError, TolinkuMessages, type TrackProperties, type ViewItemParams, getInstallReferrerToken, isSafeUrl, parseInstallReferrer };
581
+ export { Tolinku, TolinkuError, TolinkuMessages, getInstallReferrerToken, isSafeUrl, parseInstallReferrer };
582
+ export type { AddPaymentInfoParams, AddToCartParams, AddToWishlistParams, BeginCheckoutParams, ClaimBySignalsOptions, CompleteReferralOptions, CompleteReferralResult, CreateReferralOptions, CreateReferralResult, DeferredLink, EcommerceItem, LeaderboardEntry, Message, MessageComponent, MessageContent, MilestoneOptions, MilestoneResult, PurchaseParams, RateParams, ReferralInfo, ReferrerProvider, RefundParams, RemoveFromCartParams, ResolvedLink, ResolvedTolinkuConfig, SearchParams, ShareParams, ShowMessageOptions, SpendCreditsParams, TolinkuConfig, TrackProperties, ViewItemParams };
package/dist/index.d.ts CHANGED
@@ -157,6 +157,15 @@ interface MessageContent {
157
157
  props: Record<string, unknown>;
158
158
  };
159
159
  content: MessageComponent[];
160
+ /**
161
+ * A Section's children, keyed "<component id>:content".
162
+ *
163
+ * Puck keeps nested content here rather than on the parent's props, so a
164
+ * renderer that reads props.children finds nothing and draws every Section
165
+ * as an empty box. This was missing from the type entirely, which is part of
166
+ * how that went unnoticed.
167
+ */
168
+ zones?: Record<string, MessageComponent[]>;
160
169
  }
161
170
  /** A single Puck component */
162
171
  interface MessageComponent {
@@ -441,7 +450,7 @@ declare class Links {
441
450
  * await Tolinku.track('signup', { source: 'onboarding' });
442
451
  */
443
452
  declare class Tolinku {
444
- static readonly VERSION = "0.6.0";
453
+ static readonly VERSION = "0.7.0";
445
454
  private static client;
446
455
  private static analyticsInstance;
447
456
  private static ecommerceInstance;
@@ -569,4 +578,5 @@ declare function TolinkuMessages({ trigger, triggerValue, onDismiss, onButtonPre
569
578
  */
570
579
  declare function isSafeUrl(url: string): boolean;
571
580
 
572
- export { type AddPaymentInfoParams, type AddToCartParams, type AddToWishlistParams, type BeginCheckoutParams, type ClaimBySignalsOptions, type CompleteReferralOptions, type CompleteReferralResult, type CreateReferralOptions, type CreateReferralResult, type DeferredLink, type EcommerceItem, type LeaderboardEntry, type Message, type MessageComponent, type MessageContent, type MilestoneOptions, type MilestoneResult, type PurchaseParams, type RateParams, type ReferralInfo, type ReferrerProvider, type RefundParams, type RemoveFromCartParams, type ResolvedLink, type ResolvedTolinkuConfig, type SearchParams, type ShareParams, type ShowMessageOptions, type SpendCreditsParams, Tolinku, type TolinkuConfig, TolinkuError, TolinkuMessages, type TrackProperties, type ViewItemParams, getInstallReferrerToken, isSafeUrl, parseInstallReferrer };
581
+ export { Tolinku, TolinkuError, TolinkuMessages, getInstallReferrerToken, isSafeUrl, parseInstallReferrer };
582
+ export type { AddPaymentInfoParams, AddToCartParams, AddToWishlistParams, BeginCheckoutParams, ClaimBySignalsOptions, CompleteReferralOptions, CompleteReferralResult, CreateReferralOptions, CreateReferralResult, DeferredLink, EcommerceItem, LeaderboardEntry, Message, MessageComponent, MessageContent, MilestoneOptions, MilestoneResult, PurchaseParams, RateParams, ReferralInfo, ReferrerProvider, RefundParams, RemoveFromCartParams, ResolvedLink, ResolvedTolinkuConfig, SearchParams, ShareParams, ShowMessageOptions, SpendCreditsParams, TolinkuConfig, TrackProperties, ViewItemParams };