@rocapine/react-native-onboarding 1.72.0 → 1.74.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.
Files changed (117) hide show
  1. package/README.md +136 -3
  2. package/dist/OnboardingStudio.d.ts +82 -0
  3. package/dist/OnboardingStudio.d.ts.map +1 -0
  4. package/dist/OnboardingStudio.js +91 -0
  5. package/dist/OnboardingStudio.js.map +1 -0
  6. package/dist/OnboardingStudioClient.d.ts +14 -5
  7. package/dist/OnboardingStudioClient.d.ts.map +1 -1
  8. package/dist/OnboardingStudioClient.js +24 -9
  9. package/dist/OnboardingStudioClient.js.map +1 -1
  10. package/dist/index.d.ts +10 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +43 -4
  13. package/dist/index.js.map +1 -1
  14. package/dist/infra/provider/OnboardingProvider.d.ts +11 -2
  15. package/dist/infra/provider/OnboardingProvider.d.ts.map +1 -1
  16. package/dist/infra/provider/OnboardingProvider.js +26 -2
  17. package/dist/infra/provider/OnboardingProvider.js.map +1 -1
  18. package/dist/infra/queries/cacheKey.d.ts +41 -3
  19. package/dist/infra/queries/cacheKey.d.ts.map +1 -1
  20. package/dist/infra/queries/cacheKey.js +44 -8
  21. package/dist/infra/queries/cacheKey.js.map +1 -1
  22. package/dist/infra/queries/getOnboarding.query.d.ts.map +1 -1
  23. package/dist/infra/queries/getOnboarding.query.js +6 -1
  24. package/dist/infra/queries/getOnboarding.query.js.map +1 -1
  25. package/dist/paywalls/PaywallProvider.d.ts +95 -5
  26. package/dist/paywalls/PaywallProvider.d.ts.map +1 -1
  27. package/dist/paywalls/PaywallProvider.js +121 -9
  28. package/dist/paywalls/PaywallProvider.js.map +1 -1
  29. package/dist/paywalls/catalogSettleWaiter.d.ts +31 -0
  30. package/dist/paywalls/catalogSettleWaiter.d.ts.map +1 -0
  31. package/dist/paywalls/catalogSettleWaiter.js +58 -0
  32. package/dist/paywalls/catalogSettleWaiter.js.map +1 -0
  33. package/dist/paywalls/customScreens.d.ts +83 -0
  34. package/dist/paywalls/customScreens.d.ts.map +1 -0
  35. package/dist/paywalls/customScreens.js +3 -0
  36. package/dist/paywalls/customScreens.js.map +1 -0
  37. package/dist/paywalls/getPaywalls.query.d.ts.map +1 -1
  38. package/dist/paywalls/getPaywalls.query.js +6 -1
  39. package/dist/paywalls/getPaywalls.query.js.map +1 -1
  40. package/dist/paywalls/register.d.ts +105 -0
  41. package/dist/paywalls/register.d.ts.map +1 -0
  42. package/dist/paywalls/register.js +112 -0
  43. package/dist/paywalls/register.js.map +1 -0
  44. package/dist/paywalls/usePaywall.d.ts +43 -0
  45. package/dist/paywalls/usePaywall.d.ts.map +1 -1
  46. package/dist/paywalls/usePaywall.js +11 -2
  47. package/dist/paywalls/usePaywall.js.map +1 -1
  48. package/dist/steps/Paywall/types.d.ts +63 -0
  49. package/dist/steps/Paywall/types.d.ts.map +1 -0
  50. package/dist/steps/Paywall/types.js +29 -0
  51. package/dist/steps/Paywall/types.js.map +1 -0
  52. package/dist/steps/types.d.ts +2 -1
  53. package/dist/steps/types.d.ts.map +1 -1
  54. package/dist/userProperties/applyPatch.d.ts +18 -0
  55. package/dist/userProperties/applyPatch.d.ts.map +1 -0
  56. package/dist/userProperties/applyPatch.js +57 -0
  57. package/dist/userProperties/applyPatch.js.map +1 -0
  58. package/dist/userProperties/effectiveParams.d.ts +29 -0
  59. package/dist/userProperties/effectiveParams.d.ts.map +1 -0
  60. package/dist/userProperties/effectiveParams.js +56 -0
  61. package/dist/userProperties/effectiveParams.js.map +1 -0
  62. package/dist/userProperties/index.d.ts +9 -0
  63. package/dist/userProperties/index.d.ts.map +1 -0
  64. package/dist/userProperties/index.js +21 -0
  65. package/dist/userProperties/index.js.map +1 -0
  66. package/dist/userProperties/reserved.d.ts +33 -0
  67. package/dist/userProperties/reserved.d.ts.map +1 -0
  68. package/dist/userProperties/reserved.js +45 -0
  69. package/dist/userProperties/reserved.js.map +1 -0
  70. package/dist/userProperties/serialize.d.ts +38 -0
  71. package/dist/userProperties/serialize.d.ts.map +1 -0
  72. package/dist/userProperties/serialize.js +67 -0
  73. package/dist/userProperties/serialize.js.map +1 -0
  74. package/dist/userProperties/store.d.ts +63 -0
  75. package/dist/userProperties/store.d.ts.map +1 -0
  76. package/dist/userProperties/store.js +153 -0
  77. package/dist/userProperties/store.js.map +1 -0
  78. package/dist/userProperties/types.d.ts +21 -0
  79. package/dist/userProperties/types.d.ts.map +1 -0
  80. package/dist/userProperties/types.js +3 -0
  81. package/dist/userProperties/types.js.map +1 -0
  82. package/dist/userProperties/useUserProperties.d.ts +20 -0
  83. package/dist/userProperties/useUserProperties.d.ts.map +1 -0
  84. package/dist/userProperties/useUserProperties.js +30 -0
  85. package/dist/userProperties/useUserProperties.js.map +1 -0
  86. package/package.json +1 -1
  87. package/src/OnboardingStudio.ts +147 -0
  88. package/src/OnboardingStudioClient.ts +27 -11
  89. package/src/__tests__/OnboardingStudio.test.ts +208 -0
  90. package/src/__tests__/cacheKey.test.ts +71 -0
  91. package/src/__tests__/getOnboarding.query.test.ts +47 -8
  92. package/src/index.ts +51 -0
  93. package/src/infra/provider/OnboardingProvider.tsx +45 -4
  94. package/src/infra/queries/cacheKey.ts +54 -9
  95. package/src/infra/queries/getOnboarding.query.ts +9 -1
  96. package/src/paywalls/PaywallProvider.tsx +226 -9
  97. package/src/paywalls/__tests__/catalogSettleWaiter.test.ts +134 -0
  98. package/src/paywalls/__tests__/getPaywalls.test.ts +29 -11
  99. package/src/paywalls/__tests__/register.test.ts +266 -0
  100. package/src/paywalls/catalogSettleWaiter.ts +72 -0
  101. package/src/paywalls/customScreens.ts +82 -0
  102. package/src/paywalls/getPaywalls.query.ts +9 -1
  103. package/src/paywalls/register.ts +169 -0
  104. package/src/paywalls/usePaywall.ts +63 -3
  105. package/src/steps/Paywall/types.ts +29 -0
  106. package/src/steps/types.ts +2 -0
  107. package/src/userProperties/__tests__/effectiveParams.test.ts +51 -0
  108. package/src/userProperties/__tests__/primitives.test.ts +96 -0
  109. package/src/userProperties/__tests__/store.test.ts +181 -0
  110. package/src/userProperties/applyPatch.ts +68 -0
  111. package/src/userProperties/effectiveParams.ts +60 -0
  112. package/src/userProperties/index.ts +11 -0
  113. package/src/userProperties/reserved.ts +44 -0
  114. package/src/userProperties/serialize.ts +61 -0
  115. package/src/userProperties/store.ts +177 -0
  116. package/src/userProperties/types.ts +22 -0
  117. package/src/userProperties/useUserProperties.ts +26 -0
package/README.md CHANGED
@@ -35,18 +35,19 @@ npx expo install expo-router
35
35
  ```typescript
36
36
  import {
37
37
  OnboardingProvider,
38
- OnboardingStudioClient,
38
+ OnboardingStudio,
39
39
  ProgressBar,
40
40
  } from "@rocapine/react-native-onboarding";
41
41
 
42
- const client = new OnboardingStudioClient("your-project-id", {
42
+ // Once, at module scope — before anything renders.
43
+ OnboardingStudio.init({
44
+ projectId: "your-project-id",
43
45
  appVersion: "1.0.0",
44
46
  });
45
47
 
46
48
  export default function RootLayout() {
47
49
  return (
48
50
  <OnboardingProvider
49
- client={client}
50
51
  locale="en"
51
52
  customAudienceParams={{ onboardingId: "your-onboarding-id" }}
52
53
  >
@@ -57,6 +58,10 @@ export default function RootLayout() {
57
58
  }
58
59
  ```
59
60
 
61
+ `init` returns the client it built, if you want it for `clearCache()`. You can
62
+ also still construct one yourself and pass it as a `client` prop — an explicit
63
+ prop always wins over `init`.
64
+
60
65
  ### Use in Your Screens
61
66
 
62
67
  ```typescript
@@ -84,6 +89,134 @@ That's it! 🎉
84
89
 
85
90
  ---
86
91
 
92
+ ## 👤 User Properties
93
+
94
+ Audience targeting reads a `key: value` map of user properties. `OnboardingStudio`
95
+ is a module-level object, so a login handler or an analytics service can write to
96
+ it — no hook, no provider:
97
+
98
+ ```typescript
99
+ import { OnboardingStudio } from "@rocapine/react-native-onboarding";
100
+
101
+ OnboardingStudio.setUserProperty("plan", "free");
102
+ OnboardingStudio.setUserProperties({ daysSinceInstall: 3, hasTeam: true });
103
+
104
+ OnboardingStudio.setUserProperty("plan", null); // null DELETES a key
105
+ OnboardingStudio.removeUserProperty("plan"); // same thing
106
+ OnboardingStudio.getUserProperties();
107
+ OnboardingStudio.reset(); // forget the user — e.g. on logout
108
+ ```
109
+
110
+ `setUserProperties` **merges**, so independent writers don't clobber each other.
111
+ Values may be `string`, `number` or `boolean`. To read them in a component:
112
+
113
+ ```typescript
114
+ const { properties, status } = useUserProperties();
115
+ ```
116
+
117
+ `reset()` clears user properties only — it deliberately leaves the payload cache
118
+ alone, because logging out shouldn't force a refetch of content that hasn't
119
+ changed. Use `OnboardingStudio.getClient()?.clearCache()` if you want both.
120
+
121
+ ### Getting the first launch right
122
+
123
+ Properties are only *hydrated* from disk, so a first-ever install has nothing to
124
+ hydrate. Seed them in `init` — which runs before anything renders — and even that
125
+ first launch is targeted correctly:
126
+
127
+ ```typescript
128
+ OnboardingStudio.init({
129
+ projectId: "your-project-id",
130
+ userProperties: { plan: "free" },
131
+ });
132
+ ```
133
+
134
+ **Properties persist** to AsyncStorage and are hydrated before the first catalog
135
+ fetch, so a returning user is targeted correctly on the very first launch-frame
136
+ with no host code. A first-ever install has nothing to hydrate: its first fetch
137
+ matches your catch-all audience, then refetches as soon as you set one — see
138
+ [Getting the first launch right](#getting-the-first-launch-right) to avoid even
139
+ that.
140
+
141
+ ### Values reach audience filters as strings
142
+
143
+ Everything crosses the wire on a querystring. The normal authoring shape works as
144
+ you'd expect, because the filter's literal is a number and JavaScript coerces:
145
+
146
+ ```jsonc
147
+ { ">=": [{ "var": "daysSinceInstall" }, 3] } // "3" >= 3 → true ✅
148
+ ```
149
+
150
+ Watch for a filter whose literal is itself a **string** — that comparison is
151
+ lexicographic, so `"10"` is *not* greater than `"9"`:
152
+
153
+ ```jsonc
154
+ { ">": [{ "var": "daysSinceInstall" }, "9"] } // "10" > "9" → false ⚠️
155
+ ```
156
+
157
+ ### Reserved names
158
+
159
+ These are refused with a warning, because the SDK puts them on the request
160
+ querystring itself and a duplicate silently breaks the request:
161
+
162
+ `projectId`, `platform`, `appVersion`, `draft`, `locale`, `omitNulls`, `moment`,
163
+ `now`
164
+
165
+ ### Relationship to `customAudienceParams`
166
+
167
+ The prop still works and is not deprecated. Treat it as the **static** baseline
168
+ (build-time facts like an `onboardingId`) and the store as the **runtime** half.
169
+ Where both define a key, **the store wins**.
170
+
171
+ ---
172
+
173
+ ## 🔓 Gating a Feature with `register`
174
+
175
+ `register` shows the paywall for a moment and runs your feature only if the user
176
+ buys:
177
+
178
+ ```typescript
179
+ const { register } = usePaywall();
180
+
181
+ await register("unlock_stats", () => router.push("/stats"));
182
+ ```
183
+
184
+ | Situation | What happens |
185
+ |---|---|
186
+ | The moment has a paywall | It's presented; the feature runs **only** on a purchase |
187
+ | The moment has no paywall | The feature runs immediately (`reason: "no-paywall"`) |
188
+ | No catalog reachable | The feature runs, with a warning (`reason: "catalog-unavailable"`) |
189
+ | Another paywall is already showing | The feature is withheld; the live paywall is untouched |
190
+
191
+ It returns `{ ran, presented, reason, outcome? }`, so you can log how often you're
192
+ giving a feature away:
193
+
194
+ ```typescript
195
+ const result = await register("unlock_stats", unlock);
196
+ if (result.reason === "catalog-unavailable") analytics.track("gate_failed_open");
197
+ ```
198
+
199
+ **`register` fails open.** When the catalog can't be reached — offline, or still
200
+ loading after `registerTimeoutMs` (default 3000) — it runs the feature rather than
201
+ blocking it. Failing closed would make your gated features silently dead on an
202
+ offline launch, with no paywall on screen to explain why. Tune the wait with
203
+ `<PaywallProvider registerTimeoutMs={...}>`.
204
+
205
+ **There is no entitlement check.** `register` gates on the moment alone. To stop
206
+ charging an existing subscriber, set a property and author an audience filter on
207
+ it:
208
+
209
+ ```typescript
210
+ OnboardingStudio.setUserProperty("plan", "pro"); // audience: plan != "pro"
211
+ ```
212
+
213
+ > ⚠️ **A Stripe-billed paywall never runs the feature**, even after a successful
214
+ > checkout: a Payment Link's entitlement arrives out-of-band through RevenueCat, so
215
+ > the presentation never reports `"purchased"`. Grant access from your RevenueCat
216
+ > entitlement webhook instead. `register` warns when it presents one.
217
+
218
+ ---
219
+
87
220
  ## 📚 Documentation
88
221
 
89
222
  ### For SDK Users
@@ -0,0 +1,82 @@
1
+ import { OnboardingStudioClient } from "./OnboardingStudioClient";
2
+ import type { OnboardingStudioClientOptions } from "./types";
3
+ import type { UserPropertyStore } from "./userProperties/store";
4
+ import type { UserProperties, UserPropertyPatch, UserPropertyValue } from "./userProperties/types";
5
+ /**
6
+ * What `OnboardingStudio.init` takes: everything `new OnboardingStudioClient()`
7
+ * takes, plus the project id it takes positionally, plus optional initial user
8
+ * properties.
9
+ *
10
+ * `userProperties` here is a genuine convenience rather than sugar. Audience
11
+ * targeting is evaluated against the property map, and persisted properties are
12
+ * only hydrated from disk — so on a first-EVER install there is nothing to
13
+ * hydrate and the first catalog fetch matches the catch-all audience. Seeding at
14
+ * `init`, which runs before any provider mounts, is the only way to be targeted
15
+ * correctly on that first launch.
16
+ */
17
+ export type OnboardingStudioConfig = {
18
+ projectId: string;
19
+ } & OnboardingStudioClientOptions & {
20
+ userProperties?: UserPropertyPatch;
21
+ };
22
+ export type OnboardingStudioFacade = {
23
+ /**
24
+ * Configure the SDK. Returns the client it built, so a host that needs
25
+ * `clearCache()` (or wants to pass it explicitly) can keep hold of it.
26
+ *
27
+ * Idempotent for an unchanged config — Fast Refresh re-runs module scope, and
28
+ * rebuilding the client there would orphan the one the providers already hold.
29
+ * A genuinely CHANGED config replaces the client and warns, because silently
30
+ * ignoring it would be worse than either alternative.
31
+ */
32
+ init: (config: OnboardingStudioConfig) => OnboardingStudioClient;
33
+ /** The configured client, or `null` before `init`. */
34
+ getClient: () => OnboardingStudioClient | null;
35
+ isInitialized: () => boolean;
36
+ /** Set one property. `null` deletes it. */
37
+ setUserProperty: (key: string, value: UserPropertyValue | null) => void;
38
+ /** Set several at once. Merges; a `null` value deletes that key. */
39
+ setUserProperties: (patch: UserPropertyPatch) => void;
40
+ removeUserProperty: (key: string) => void;
41
+ getUserProperties: () => UserProperties;
42
+ /**
43
+ * Forget the user: clears every user property, in memory and on disk. Call it
44
+ * on logout.
45
+ *
46
+ * Deliberately does NOT clear the payload cache or the configuration. Logging
47
+ * out should forget who someone is, not force a refetch of content that has
48
+ * not changed — `getClient()?.clearCache()` is right there if both are wanted.
49
+ */
50
+ reset: () => void;
51
+ };
52
+ /**
53
+ * The SDK's front door, in the shape the SDKs it sits alongside use
54
+ * (`Superwall.configure` / `Purchases.configure` / `amplitude.init`): one
55
+ * module-level object that owns configuration and user identity.
56
+ *
57
+ * A factory with the store injected, so its tests need a fake store rather than
58
+ * a module mock — the same reason `createUserPropertyStore` is a factory.
59
+ *
60
+ * `register`/`present` deliberately do NOT live here. Presenting needs the
61
+ * mounted provider's catalog and presentation state, so they stay on
62
+ * `usePaywall()`, where that state is reachable and where a call cannot be made
63
+ * before a provider exists.
64
+ */
65
+ export declare const createOnboardingStudio: (store: UserPropertyStore) => OnboardingStudioFacade;
66
+ /** The facade every host uses. */
67
+ export declare const OnboardingStudio: OnboardingStudioFacade;
68
+ /**
69
+ * Which client a provider should use: an explicit `client` prop wins, otherwise
70
+ * the one `OnboardingStudio.init()` built.
71
+ *
72
+ * The prop keeps winning so every host that already passes one is untouched by
73
+ * `init` existing.
74
+ */
75
+ export declare const resolveProviderClient: (prop: OnboardingStudioClient | undefined, fromStudio: OnboardingStudioClient | null) => OnboardingStudioClient | null;
76
+ /**
77
+ * Shared by both providers, because a host hitting this has exactly two fixes
78
+ * and should be told both rather than left to guess which one this provider
79
+ * wanted.
80
+ */
81
+ export declare const MISSING_CLIENT_MESSAGE: string;
82
+ //# sourceMappingURL=OnboardingStudio.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OnboardingStudio.d.ts","sourceRoot":"","sources":["../src/OnboardingStudio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE7D,OAAO,KAAK,EAAE,iB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
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.MISSING_CLIENT_MESSAGE = exports.resolveProviderClient = exports.OnboardingStudio = exports.createOnboardingStudio = void 0;
15
+ const OnboardingStudioClient_1 = require("./OnboardingStudioClient");
16
+ const store_1 = require("./userProperties/store");
17
+ /** Stable signature of a config, for the idempotency check in `init`. */
18
+ const configSignature = (projectId, options) => `${projectId}::${JSON.stringify(options)}`;
19
+ /**
20
+ * The SDK's front door, in the shape the SDKs it sits alongside use
21
+ * (`Superwall.configure` / `Purchases.configure` / `amplitude.init`): one
22
+ * module-level object that owns configuration and user identity.
23
+ *
24
+ * A factory with the store injected, so its tests need a fake store rather than
25
+ * a module mock — the same reason `createUserPropertyStore` is a factory.
26
+ *
27
+ * `register`/`present` deliberately do NOT live here. Presenting needs the
28
+ * mounted provider's catalog and presentation state, so they stay on
29
+ * `usePaywall()`, where that state is reachable and where a call cannot be made
30
+ * before a provider exists.
31
+ */
32
+ const createOnboardingStudio = (store) => {
33
+ let client = null;
34
+ let signature = null;
35
+ return {
36
+ init: (config) => {
37
+ const { projectId, userProperties: initialProperties } = config, options = __rest(config, ["projectId", "userProperties"]);
38
+ const next = configSignature(projectId, options);
39
+ if (client && signature === next) {
40
+ // Same config: hand back the same client. Seeding the same properties
41
+ // again would be a no-op anyway (`applyUserPropertyPatch` returns the
42
+ // same object when nothing changed), so there is nothing else to do.
43
+ return client;
44
+ }
45
+ if (client) {
46
+ console.warn(`[onboarding-studio] init() was called again with a DIFFERENT config ` +
47
+ `(projectId "${projectId}"). The previous client has been replaced. ` +
48
+ "Providers already holding the old client keep using it until they " +
49
+ "re-render — call init() once, at module scope.");
50
+ }
51
+ client = new OnboardingStudioClient_1.OnboardingStudioClient(projectId, options);
52
+ signature = next;
53
+ // Before hydration on purpose: the store merges disk UNDER memory, so a
54
+ // property the host states here beats a stale one from a previous launch.
55
+ if (initialProperties)
56
+ store.set(initialProperties);
57
+ // Start reading the persisted map now rather than at the first provider
58
+ // mount, so it is ready before anything queries.
59
+ void store.ensureHydrated();
60
+ return client;
61
+ },
62
+ getClient: () => client,
63
+ isInitialized: () => client !== null,
64
+ setUserProperty: (key, value) => store.set({ [key]: value }),
65
+ setUserProperties: (patch) => store.set(patch),
66
+ removeUserProperty: (key) => store.remove(key),
67
+ getUserProperties: () => store.get(),
68
+ reset: () => store.reset(),
69
+ };
70
+ };
71
+ exports.createOnboardingStudio = createOnboardingStudio;
72
+ /** The facade every host uses. */
73
+ exports.OnboardingStudio = (0, exports.createOnboardingStudio)(store_1.userPropertyStore);
74
+ /**
75
+ * Which client a provider should use: an explicit `client` prop wins, otherwise
76
+ * the one `OnboardingStudio.init()` built.
77
+ *
78
+ * The prop keeps winning so every host that already passes one is untouched by
79
+ * `init` existing.
80
+ */
81
+ const resolveProviderClient = (prop, fromStudio) => prop !== null && prop !== void 0 ? prop : fromStudio;
82
+ exports.resolveProviderClient = resolveProviderClient;
83
+ /**
84
+ * Shared by both providers, because a host hitting this has exactly two fixes
85
+ * and should be told both rather than left to guess which one this provider
86
+ * wanted.
87
+ */
88
+ exports.MISSING_CLIENT_MESSAGE = "[onboarding-studio] No client. Either call OnboardingStudio.init({ projectId }) " +
89
+ "once at module scope, or pass a `client` prop built with " +
90
+ "`new OnboardingStudioClient(projectId, options)`.";
91
+ //# sourceMappingURL=OnboardingStudio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OnboardingStudio.js","sourceRoot":"","sources":["../src/On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EAAE,CAAC,MAAM;QACvB,aAAa,EAAE,GAAG,EAAE,CAAC,MAAM,KAAK,IAAI;QAEpC,eAAe,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC;QAC5D,iBAAiB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;QAC9C,kBAAkB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC;QAC9C,iBAAiB,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE;QACpC,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE;KAC3B,CAAC;AACJ,CAAC,CAAC;AA/CW,QAAA,sBAAsB,0BA+CjC;AAEF,kCAAkC;AACrB,QAAA,gBAAgB,GAAG,IAAA,8BAAsB,EAAC,yBAAiB,CAAC,CAAC;AAE1E;;;;;;GAMG;AACI,MAAM,qBAAqB,GAAG,CACnC,IAAwC,EACxC,UAAyC,EACV,EAAE,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,UAAU,CAAC;AAH1C,QAAA,qBAAqB,yBAGqB;AAEvD;;;;GAIG;AACU,QAAA,sBAAsB,GACjC,kFAAkF;IAClF,2DAA2D;IAC3D,mDAAmD,CAAC"}
@@ -7,12 +7,21 @@ export declare class OnboardingStudioClient {
7
7
  options: OnboardingStudioClientOptions;
8
8
  constructor(projectId: string, options: OnboardingStudioClientOptions);
9
9
  /**
10
- * Removes this client's cached onboarding payload AND cached paywall catalog
11
- * from AsyncStorage (the keys derived from `options.cacheKey`, or the
12
- * default keys). The next query mount or app launch is then a cache miss
13
- * and refetches both. To force an in-session refetch as well, also
14
- * invalidate the React Query keys `["onboardingQuestions", ...]` and
10
+ * Removes EVERY cached onboarding payload and paywall catalog this SDK wrote,
11
+ * across all audience-param variants. The next query mount or app launch is
12
+ * then a cache miss and refetches. To force an in-session refetch as well,
13
+ * also invalidate the React Query keys `["onboardingQuestions", ...]` and
15
14
  * `["paywallCatalog", ...]`.
15
+ *
16
+ * Scans `getAllKeys()` by prefix rather than naming two keys, because the keys
17
+ * are now scoped by a hash of the resolved audience params (see
18
+ * `infra/queries/cacheKey.ts`) — so there is no longer one key per domain to
19
+ * name. This also picks up entries written before that scoping existed, which
20
+ * would otherwise be orphaned forever.
21
+ *
22
+ * It does NOT clear user properties: `USER_PROPERTIES_STORAGE_KEY` matches
23
+ * neither prefix, deliberately. Clearing a payload cache must not forget who
24
+ * the user is — that is what `OnboardingStudio.reset()` is for.
16
25
  */
17
26
  clearCache(): Promise<void>;
18
27
  getSteps<StepType extends BaseStepType = OnboardingStepType>(onboardingOptions?: OnboardingOptions, userDefinedParams?: UserDefinedParams): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingStudioClient.d.ts","sourceRoot":"","sources":["../src/OnboardingStudioClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,iBAAiB,EACjB,6BAA6B,EAC7B,iBAAiB,EACjB,YAAY,EACb,MAAM,SAAS,CAAC;AAKjB,OAAO,EACL,cAAc,EACd,cAAc,EACd,0BAA0B,EAC3B,MAAM,kBAAkB,CAAC;AAI1B,qBAAa,sBAAsB;IACjC,OAAO,CAAC,OAAO,CAAS;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,6BAA6B,CAAC;gBAElC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,6BAA6B;IASrE;;;;;;;OAOG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAO3B,QAAQ,CAAC,QAAQ,SAAS,YAAY,GAAG,kBAAkB,EAC/D,iBAAiB,CAAC,EAAE,iBAAiB,EACrC,iBAAiB,C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E,iBAAiB,GACpC,OAAO,CAAC;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,OAAO,EAAE,0BAA0B,CAAA;KAAE,CAAC;CA2E1E"}
@@ -17,18 +17,33 @@ class OnboardingStudioClient {
17
17
  "https://takbcvjljqialzqyksic.supabase.co/functions/v1";
18
18
  }
19
19
  /**
20
- * Removes this client's cached onboarding payload AND cached paywall catalog
21
- * from AsyncStorage (the keys derived from `options.cacheKey`, or the
22
- * default keys). The next query mount or app launch is then a cache miss
23
- * and refetches both. To force an in-session refetch as well, also
24
- * invalidate the React Query keys `["onboardingQuestions", ...]` and
20
+ * Removes EVERY cached onboarding payload and paywall catalog this SDK wrote,
21
+ * across all audience-param variants. The next query mount or app launch is
22
+ * then a cache miss and refetches. To force an in-session refetch as well,
23
+ * also invalidate the React Query keys `["onboardingQuestions", ...]` and
25
24
  * `["paywallCatalog", ...]`.
25
+ *
26
+ * Scans `getAllKeys()` by prefix rather than naming two keys, because the keys
27
+ * are now scoped by a hash of the resolved audience params (see
28
+ * `infra/queries/cacheKey.ts`) — so there is no longer one key per domain to
29
+ * name. This also picks up entries written before that scoping existed, which
30
+ * would otherwise be orphaned forever.
31
+ *
32
+ * It does NOT clear user properties: `USER_PROPERTIES_STORAGE_KEY` matches
33
+ * neither prefix, deliberately. Clearing a payload cache must not forget who
34
+ * the user is — that is what `OnboardingStudio.reset()` is for.
26
35
  */
27
36
  async clearCache() {
28
- await Promise.all([
29
- async_storage_1.default.removeItem((0, cacheKey_1.getOnboardingCacheKey)(this.options.cacheKey)),
30
- async_storage_1.default.removeItem((0, cacheKey_1.getPaywallsCacheKey)(this.options.cacheKey)),
31
- ]);
37
+ try {
38
+ const keys = await async_storage_1.default.getAllKeys();
39
+ const ours = keys.filter((key) => key.startsWith(cacheKey_1.ONBOARDING_CACHE_KEY_PREFIX) ||
40
+ key.startsWith(cacheKey_1.PAYWALLS_CACHE_KEY_PREFIX));
41
+ if (ours.length > 0)
42
+ await async_storage_1.default.multiRemove(ours);
43
+ }
44
+ catch (error) {
45
+ console.warn("Failed to clear SDK caches:", error);
46
+ }
32
47
  }
33
48
  async getSteps(onboardingOptions, userDefinedParams) {
34
49
  console.info("OnboardingStudioClient getSteps");
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingStudioClient.js","sourceRoot":"","sources":["../src/OnboardingStudioClient.ts"],"names":[],"mappings":";;;;;;AAAA,8FAAqE;AAUrE,uDAGkC;AAOlC,+CAAwC;AAExC,MAAa,sBAAsB;IAKjC,YAAY,SAAiB,EAAE,OAAsC;QACnE,OAAO,CAAC,IAAI,CAAC,yCAAyC,EAAE,SAAS,CAAC,CAAC;QACnE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO;YACV,OAAO,CAAC,OAAO;gBACf,uDAAuD,CAAC;IAC5D,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU;QACd,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,uBAAY,CAAC,UAAU,CAAC,IAAA,gCAAqB,EAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YACrE,uBAAY,CAAC,UAAU,CAAC,IAAA,8BAAmB,EAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,iBAAqC,EACrC,iBAAqC;QAErC,OAAO,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QAChD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QAEzC,MAAM,SAAS,GAAG,IAAI,eAAe,EAAE,CAAC;QACxC,+BAA+B;QAC/B,IAAI,iBAAiB,EAAE,CAAC;YACtB,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAA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,QAAQ,GAAG,MAAM,OAAO,CAAC,IAAI,CACjC,IAAI,CAAC,OAAO,CAAC,OAAO;gBAClB,CAAC,CAAC;oBACE,KAAK,CAAC,GAAG,CAAC;oBACV,IAAI,OAAO,CAAW,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAClC,UAAU,CACR,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,EAClC,IAAI,CAAC,OAAO,CAAC,OAAO,CACrB,CACF;iBACF;gBACH,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CACjB,CAAC;YACF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CACb,6BAA6B,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CACtE,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,OAAO;gBACL,IAAI;gBACJ,OAAO,EAAE;oBACP,mBAAmB,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;oBAC9D,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;iBAC7D;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,0CAA0C,EAAE,KAAK,CAAC,CAAC;YACjE,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAtND,wDAsNC"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,15 @@ export * from "./onboarding-example";
4
4
  export { getOnboardingCacheKey, DEFAULT_ONBOARDING_CACHE_KEY, } from "./infra/queries/cacheKey";
5
5
  export type { ButtonAction, CustomButtonAction, SetVariableButtonAction, ComposableVariableEntry, ComposableVariableKind, WheelPickerElementProps, WheelPickerItem, WheelPickerRange, RichTextElementProps, ProgressiveBlurImageElementProps, BlurMask, LinearBlurMask, RadialBlurMask, BlurMaskStop, BlurAppear, ProgressIndicatorElementProps, ProgressEasing, AnimationEasing, SpringConfig, EnteringPreset, ExitingPreset, LayoutPreset, EffectPreset, EnteringAnimation, ExitingAnimation, LayoutAnimation, ElementEffect, ElementAnimation, ElementTransform, } from "./steps/ComposableScreen/types";
6
6
  export { ButtonActionSchema, CustomButtonActionSchema, SetVariableButtonActionSchema, WheelPickerElementPropsSchema, generateWheelPickerRangeItems, resolveWheelPickerItems, } from "./steps/ComposableScreen/types";
7
+ export { OnboardingStudio } from "./OnboardingStudio";
8
+ export type { OnboardingStudioConfig, OnboardingStudioFacade } from "./OnboardingStudio";
9
+ export { useUserProperties, createUserPropertyStore, USER_PROPERTIES_STORAGE_KEY, RESERVED_USER_PROPERTY_KEYS, isReservedUserPropertyKey, } from "./userProperties";
10
+ export type { UserProperties, UserPropertyPatch, UserPropertyValue, UserPropertySnapshot, UserPropertyStorage, UserPropertyStore, } from "./userProperties";
11
+ export { resolveRegisterDecision, shouldRunFeature } from "./paywalls/register";
12
+ export type { RegisterDecision, RegisterFeature, RegisterResult } from "./paywalls/register";
13
+ export { DEFAULT_REGISTER_TIMEOUT_MS } from "./paywalls/PaywallProvider";
14
+ export type { PaywallStepType } from "./steps/Paywall/types";
15
+ export { PaywallStepTypeSchema, PaywallStepPayloadSchema } from "./steps/Paywall/types";
7
16
  export { collectUnknownElementKeys, collectUnknownKeysInSteps, formatUnknownElementKeys, } from "./screens/unknownKeys";
8
17
  export type { UnknownElementKey } from "./screens/unknownKeys";
9
18
  export * from "./infra";
@@ -18,6 +27,7 @@ export { BaseStepTypeSchema, LeafConditionSchema, ConditionGroupSchema, BranchSc
18
27
  export * from "./products";
19
28
  export type { Paywall, PaywallCustomPayload, PaywallCatalog, PaywallOptions, GetPaywallsResponseHeaders, PresentResult, PresentErrorReason, } from "./paywalls/types";
20
29
  export { PaywallProvider, usePaywallHost } from "./paywalls/PaywallProvider";
30
+ export type { CustomPaywallScreenProps, CustomPaywallScreens } from "./paywalls/customScreens";
21
31
  export type { PaywallContextValue } from "./paywalls/PaywallProvider";
22
32
  export { usePaywall } from "./paywalls/usePaywall";
23
33
  export type { CatalogStatus } from "./paywalls/present";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AAErC,OAAO,EACL,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,gCAAgC,EAChC,QAAQ,EACR,cAAc,EACd,cAAc,EACd,YAAY,EACZ,UAAU,EACV,6BAA6B,EAC7B,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,cAAc,SAAS,CAAC;AAExB,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,qBAA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var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.usePaywall = exports.usePaywallHost = exports.PaywallProvider = exports.ONBOARDING_END_STEP_ID = exports.isUnaryConditionOperator = exports.UNARY_CONDITION_OPERATORS = exports.ConditionValueSchema = exports.ConditionOperatorSchema = exports.NextStepSchema = exports.BranchSchema = exports.ConditionGroupSchema = exports.LeafConditionSchema = exports.BaseStepTypeSchema = exports.isConditionGroup = exports.evaluateLeaf = exports.evaluateCondition = exports.resolveStartStepNumber = exports.resolveNextStepNumber = exports.expoRouterAdapter = exports.formatUnknownElementKeys = exports.collectUnknownKeysInSteps = exports.collectUnknownElementKeys = exports.resolveWheelPickerItems = exports.generateWheelPickerRangeItems = exports.WheelPickerElementPropsSchema = exports.SetVariableButtonActionSchema = exports.CustomButtonActionSchema = exports.ButtonActionSchema = exports.DEFAULT_ONBOARDING_CACHE_KEY = exports.getOnboardingCacheKey = exports.OnboardingStudioClient = void 0;
17
+ exports.usePaywall = exports.usePaywallHost = exports.PaywallProvider = exports.ONBOARDING_END_STEP_ID = exports.isUnaryConditionOperator = exports.UNARY_CONDITION_OPERATORS = exports.ConditionValueSchema = exports.ConditionOperatorSchema = exports.NextStepSchema = exports.BranchSchema = exports.ConditionGroupSchema = exports.LeafConditionSchema = exports.BaseStepTypeSchema = exports.isConditionGroup = exports.evaluateLeaf = exports.evaluateCondition = exports.resolveStartStepNumber = exports.resolveNextStepNumber = exports.expoRouterAdapter = exports.formatUnknownElementKeys = exports.collectUnknownKeysInSteps = exports.collectUnknownElementKeys = exports.PaywallStepPayloadSchema = exports.PaywallStepTypeSchema = exports.DEFAULT_REGISTER_TIMEOUT_MS = exports.shouldRunFeature = exports.resolveRegisterDecision = exports.isReservedUserPropertyKey = exports.RESERVED_USER_PROPERTY_KEYS = exports.USER_PROPERTIES_STORAGE_KEY = exports.createUserPropertyStore = exports.useUserProperties = exports.OnboardingStudio = exports.resolveWheelPickerItems = exports.generateWheelPickerRangeItems = exports.WheelPickerElementPropsSchema = exports.SetVariableButtonActionSchema = exports.CustomButtonActionSchema = exports.ButtonActionSchema = exports.DEFAULT_ONBOARDING_CACHE_KEY = exports.getOnboardingCacheKey = exports.OnboardingStudioClient = void 0;
18
18
  // Core client and types
19
19
  var OnboardingStudioClient_1 = require("./OnboardingStudioClient");
20
20
  Object.defineProperty(exports, "OnboardingStudioClient", { enumerable: true, get: function () { return OnboardingStudioClient_1.OnboardingStudioClient; } });
@@ -31,6 +31,45 @@ Object.defineProperty(exports, "SetVariableButtonActionSchema", { enumerable: tr
31
31
  Object.defineProperty(exports, "WheelPickerElementPropsSchema", { enumerable: true, get: function () { return types_1.WheelPickerElementPropsSchema; } });
32
32
  Object.defineProperty(exports, "generateWheelPickerRangeItems", { enumerable: true, get: function () { return types_1.generateWheelPickerRangeItems; } });
33
33
  Object.defineProperty(exports, "resolveWheelPickerItems", { enumerable: true, get: function () { return types_1.resolveWheelPickerItems; } });
34
+ // The SDK's front door: configuration (`init`) and user identity
35
+ // (`setUserProperty`, `reset`), in the shape of the SDKs it sits alongside —
36
+ // `Superwall.configure`, `Purchases.configure`, `amplitude.init`.
37
+ //
38
+ // User properties feed audience resolution for BOTH onboardings and paywalls.
39
+ // This is a module-level object rather than a provider so non-React code — a
40
+ // login handler, an analytics service — can write to it; see
41
+ // `userProperties/store.ts` for why that one departure from the package's
42
+ // provider+context pattern is the point rather than an oversight.
43
+ //
44
+ // `register`/`present` are NOT here: presenting needs the mounted provider's
45
+ // state, so they stay on `usePaywall()`.
46
+ var OnboardingStudio_1 = require("./OnboardingStudio");
47
+ Object.defineProperty(exports, "OnboardingStudio", { enumerable: true, get: function () { return OnboardingStudio_1.OnboardingStudio; } });
48
+ // `useUserProperties()` is the React READ path; the write path is the facade.
49
+ //
50
+ // The internal helpers (`toQueryParams`, `paramsHash`, `applyUserPropertyPatch`,
51
+ // `resolveEffectiveParams`, `userPropertyStore`) are deliberately NOT exported:
52
+ // they are implementation detail, and `paramsHash` in particular is a cache-key
53
+ // concern a host reproducing it would only drift from.
54
+ var userProperties_1 = require("./userProperties");
55
+ Object.defineProperty(exports, "useUserProperties", { enumerable: true, get: function () { return userProperties_1.useUserProperties; } });
56
+ Object.defineProperty(exports, "createUserPropertyStore", { enumerable: true, get: function () { return userProperties_1.createUserPropertyStore; } });
57
+ Object.defineProperty(exports, "USER_PROPERTIES_STORAGE_KEY", { enumerable: true, get: function () { return userProperties_1.USER_PROPERTIES_STORAGE_KEY; } });
58
+ Object.defineProperty(exports, "RESERVED_USER_PROPERTY_KEYS", { enumerable: true, get: function () { return userProperties_1.RESERVED_USER_PROPERTY_KEYS; } });
59
+ Object.defineProperty(exports, "isReservedUserPropertyKey", { enumerable: true, get: function () { return userProperties_1.isReservedUserPropertyKey; } });
60
+ // `register(moment, feature)` — gate a feature on a moment. The decision helpers
61
+ // are exported because they are pure: a host building its own gating on top of
62
+ // `catalog` can reuse the SDK's exact rules rather than reimplement them slightly
63
+ // differently. `runRegister` and `RegisterDeps` stay internal — that seam exists
64
+ // for its own test.
65
+ var register_1 = require("./paywalls/register");
66
+ Object.defineProperty(exports, "resolveRegisterDecision", { enumerable: true, get: function () { return register_1.resolveRegisterDecision; } });
67
+ Object.defineProperty(exports, "shouldRunFeature", { enumerable: true, get: function () { return register_1.shouldRunFeature; } });
68
+ var PaywallProvider_1 = require("./paywalls/PaywallProvider");
69
+ Object.defineProperty(exports, "DEFAULT_REGISTER_TIMEOUT_MS", { enumerable: true, get: function () { return PaywallProvider_1.DEFAULT_REGISTER_TIMEOUT_MS; } });
70
+ var types_2 = require("./steps/Paywall/types");
71
+ Object.defineProperty(exports, "PaywallStepTypeSchema", { enumerable: true, get: function () { return types_2.PaywallStepTypeSchema; } });
72
+ Object.defineProperty(exports, "PaywallStepPayloadSchema", { enumerable: true, get: function () { return types_2.PaywallStepPayloadSchema; } });
34
73
  // Payload diagnostics — non-fatal detection of keys placed at an element's top
35
74
  // level that the schema silently drops (e.g. `animation` outside `props`).
36
75
  var unknownKeys_1 = require("./screens/unknownKeys");
@@ -63,9 +102,9 @@ Object.defineProperty(exports, "isUnaryConditionOperator", { enumerable: true, g
63
102
  Object.defineProperty(exports, "ONBOARDING_END_STEP_ID", { enumerable: true, get: function () { return common_types_1.ONBOARDING_END_STEP_ID; } });
64
103
  // Product runtime (paywall phase 3) — vendor-neutral store products
65
104
  __exportStar(require("./products"), exports);
66
- var PaywallProvider_1 = require("./paywalls/PaywallProvider");
67
- Object.defineProperty(exports, "PaywallProvider", { enumerable: true, get: function () { return PaywallProvider_1.PaywallProvider; } });
68
- Object.defineProperty(exports, "usePaywallHost", { enumerable: true, get: function () { return PaywallProvider_1.usePaywallHost; } });
105
+ var PaywallProvider_2 = require("./paywalls/PaywallProvider");
106
+ Object.defineProperty(exports, "PaywallProvider", { enumerable: true, get: function () { return PaywallProvider_2.PaywallProvider; } });
107
+ Object.defineProperty(exports, "usePaywallHost", { enumerable: true, get: function () { return PaywallProvider_2.usePaywallHost; } });
69
108
  var usePaywall_1 = require("./paywalls/usePaywall");
70
109
  Object.defineProperty(exports, "usePaywall", { enumerable: true, get: function () { return usePaywall_1.usePaywall; } });
71
110
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,wBAAwB;AACxB,mEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,0CAAwB;AACxB,uDAAqC;AACrC,8EAA8E;AAC9E,qDAGkC;AAFhC,iHAAA,qBAAqB,OAAA;AACrB,wHAAA,4BAA4B,OAAA;AAkC9B,wDAOwC;AANtC,2GAAA,kBAAkB,OAAA;AAClB,iHAAA,wBAAwB,OAAA;AACxB,sHAAA,6BAA6B,OAAA;AAC7B,sHAAA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AA;AAU1D,qDAW8B;AAV5B,kHAAA,kBAAkB,OAAA;AAClB,mHAAA,mBAAmB,OAAA;AACnB,oHAAA,oBAAoB,OAAA;AACpB,4GAAA,YAAY,OAAA;AACZ,8GAAA,cAAc,OAAA;AACd,uHAAA,uBAAuB,OAAA;AACvB,oHAAA,oBAAoB,OAAA;AACpB,yHAAA,yBAAyB,OAAA;AACzB,wHAAA,wBAAwB,OAAA;AACxB,sHAAA,sBAAsB,OAAA;AAExB,oEAAoE;AACpE,6CAA2B;AAe3B,8DAA6E;AAApE,kHAAA,eAAe,OAAA;AAAE,iHAAA,cAAc,OAAA;AAMxC,oDAAmD;AAA1C,wGAAA,UAAU,OAAA"}
@@ -53,7 +53,16 @@ export type OnboardingCompletionContext = {
53
53
  export type OnboardingCompleteHandler = (ctx: OnboardingCompletionContext) => void | Promise<void>;
54
54
  interface OnboardingProviderProps {
55
55
  children: React.ReactNode;
56
- client: OnboardingStudioClient;
56
+ /**
57
+ * The studio client. Optional: omit it and the provider uses the client
58
+ * `OnboardingStudio.init({ projectId })` built. Passing one explicitly still
59
+ * wins, so an existing host is unaffected.
60
+ *
61
+ * With neither, this provider THROWS — an onboarding with no client has
62
+ * nothing to render, and a host `ErrorBoundary` gets a message naming both
63
+ * fixes.
64
+ */
65
+ client?: OnboardingStudioClient;
57
66
  locale?: string;
58
67
  customAudienceParams?: Record<string, any>;
59
68
  /**
@@ -95,7 +104,7 @@ interface OnboardingProviderProps {
95
104
  */
96
105
  productRefs?: ProductRef[];
97
106
  }
98
- export declare const OnboardingProvider: ({ children, client, locale, customAudienceParams, customActions, fontsFallback, navigation, onComplete, productProvider, productRefs, }: OnboardingProviderProps) => import("react/jsx-runtime").JSX.Element;
107
+ export declare const OnboardingProvider: ({ children, client: clientProp, locale, customAudienceParams, customActions, fontsFallback, navigation, onComplete, productProvider, productRefs, }: OnboardingProviderProps) => import("react/jsx-runtime").JSX.Element;
99
108
  export declare const OnboardingProgressContext: import("react").Context<{
100
109
  activeStep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