@rocapine/react-native-onboarding 1.74.1 → 1.76.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/dist/evaluateCondition.d.ts.map +1 -1
- package/dist/evaluateCondition.js +103 -4
- package/dist/evaluateCondition.js.map +1 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -1
- package/dist/index.js.map +1 -1
- package/dist/onboarding-example.d.ts +375 -99
- package/dist/onboarding-example.d.ts.map +1 -1
- package/dist/onboarding-example.js +118 -1
- package/dist/onboarding-example.js.map +1 -1
- package/dist/paywalls/PaywallProvider.d.ts +71 -5
- package/dist/paywalls/PaywallProvider.d.ts.map +1 -1
- package/dist/paywalls/PaywallProvider.js +237 -57
- package/dist/paywalls/PaywallProvider.js.map +1 -1
- package/dist/paywalls/customScreens.d.ts +31 -0
- package/dist/paywalls/customScreens.d.ts.map +1 -1
- package/dist/paywalls/observer.d.ts +129 -0
- package/dist/paywalls/observer.d.ts.map +1 -0
- package/dist/paywalls/observer.js +211 -0
- package/dist/paywalls/observer.js.map +1 -0
- package/dist/paywalls/present.d.ts +19 -15
- package/dist/paywalls/present.d.ts.map +1 -1
- package/dist/paywalls/present.js +21 -17
- package/dist/paywalls/present.js.map +1 -1
- package/dist/paywalls/types.d.ts +3 -1
- package/dist/paywalls/types.d.ts.map +1 -1
- package/dist/products/adapters/expoIap.d.ts +38 -1
- package/dist/products/adapters/expoIap.d.ts.map +1 -1
- package/dist/products/adapters/expoIap.js +509 -75
- package/dist/products/adapters/expoIap.js.map +1 -1
- package/dist/products/index.d.ts +1 -0
- package/dist/products/index.d.ts.map +1 -1
- package/dist/products/index.js.map +1 -1
- package/dist/products/types.d.ts +13 -0
- package/dist/products/types.d.ts.map +1 -1
- package/dist/screens/completingActions.d.ts +95 -0
- package/dist/screens/completingActions.d.ts.map +1 -0
- package/dist/screens/completingActions.js +302 -0
- package/dist/screens/completingActions.js.map +1 -0
- package/dist/screens/elementTypeRegistry.d.ts +45 -0
- package/dist/screens/elementTypeRegistry.d.ts.map +1 -0
- package/dist/screens/elementTypeRegistry.js +119 -0
- package/dist/screens/elementTypeRegistry.js.map +1 -0
- package/dist/screens/elements/ButtonElement.d.ts +3 -2
- package/dist/screens/elements/ButtonElement.d.ts.map +1 -1
- package/dist/screens/elements/ButtonElement.js +5 -1
- package/dist/screens/elements/ButtonElement.js.map +1 -1
- package/dist/screens/resolveRenderableStep.d.ts +42 -0
- package/dist/screens/resolveRenderableStep.d.ts.map +1 -0
- package/dist/screens/resolveRenderableStep.js +28 -0
- package/dist/screens/resolveRenderableStep.js.map +1 -0
- package/dist/screens/types.d.ts +2 -2
- package/dist/screens/types.d.ts.map +1 -1
- package/dist/screens/types.js +5 -1
- package/dist/screens/types.js.map +1 -1
- package/dist/screens/unknownElementTypes.d.ts +94 -0
- package/dist/screens/unknownElementTypes.d.ts.map +1 -0
- package/dist/screens/unknownElementTypes.js +141 -0
- package/dist/screens/unknownElementTypes.js.map +1 -0
- package/dist/screens/unknownKeys.d.ts +30 -6
- package/dist/screens/unknownKeys.d.ts.map +1 -1
- package/dist/screens/unknownKeys.js +88 -54
- package/dist/screens/unknownKeys.js.map +1 -1
- package/dist/steps/common.types.d.ts +262 -9
- package/dist/steps/common.types.d.ts.map +1 -1
- package/dist/steps/common.types.js +64 -3
- package/dist/steps/common.types.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/authoringDocEscapes.test.ts +59 -0
- package/src/__tests__/completingActions.test.ts +509 -0
- package/src/__tests__/customActionHooks.test.ts +224 -0
- package/src/__tests__/elementTypeRegistry.test.ts +48 -0
- package/src/__tests__/evaluateCondition.test.ts +228 -3
- package/src/__tests__/onboardingExampleElements.test.ts +74 -0
- package/src/__tests__/requestPermissionAction.test.ts +138 -0
- package/src/__tests__/resolveRenderableStep.test.ts +117 -0
- package/src/__tests__/retryIdempotencyDocs.test.ts +57 -0
- package/src/__tests__/unknownElementTypes.test.ts +240 -0
- package/src/__tests__/unknownKeys.test.ts +110 -0
- package/src/evaluateCondition.ts +107 -4
- package/src/index.ts +55 -0
- package/src/onboarding-example.ts +119 -1
- package/src/paywalls/PaywallProvider.tsx +370 -66
- package/src/paywalls/__tests__/PaywallProvider.observer.test.tsx +866 -0
- package/src/paywalls/__tests__/observer.test.ts +401 -0
- package/src/paywalls/__tests__/present.test.ts +0 -18
- package/src/paywalls/customScreens.ts +34 -1
- package/src/paywalls/observer.ts +308 -0
- package/src/paywalls/present.ts +24 -18
- package/src/paywalls/types.ts +3 -1
- package/src/products/adapters/__tests__/expoIap.contract.test.ts +648 -0
- package/src/products/adapters/__tests__/expoIap.test.ts +25 -11
- package/src/products/adapters/__tests__/expoIap5Fake.ts +288 -0
- package/src/products/adapters/expoIap.ts +609 -78
- package/src/products/index.ts +1 -0
- package/src/products/types.ts +13 -0
- package/src/screens/completingActions.ts +316 -0
- package/src/screens/elementTypeRegistry.ts +122 -0
- package/src/screens/elements/ButtonElement.ts +9 -1
- package/src/screens/resolveRenderableStep.ts +59 -0
- package/src/screens/types.ts +2 -2
- package/src/screens/unknownElementTypes.ts +204 -0
- package/src/screens/unknownKeys.ts +119 -56
- package/src/steps/common.types.ts +297 -9
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PaywallProvider = exports.usePaywallHost = exports.PaywallContext = exports.DEFAULT_REGISTER_TIMEOUT_MS = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const react_native_1 = require("react-native");
|
|
6
7
|
const react_query_1 = require("@tanstack/react-query");
|
|
7
8
|
const getPaywalls_query_1 = require("./getPaywalls.query");
|
|
8
9
|
const present_1 = require("./present");
|
|
@@ -13,6 +14,7 @@ const effectiveParams_1 = require("../userProperties/effectiveParams");
|
|
|
13
14
|
const register_1 = require("./register");
|
|
14
15
|
const OnboardingStudio_1 = require("../OnboardingStudio");
|
|
15
16
|
const catalogSettleWaiter_1 = require("./catalogSettleWaiter");
|
|
17
|
+
const observer_1 = require("./observer");
|
|
16
18
|
// Module-scope, private to this file — mirrors `OnboardingProvider.tsx:17-23`.
|
|
17
19
|
// `OnboardingProvider`'s QueryClient is not exported, so it cannot be reused
|
|
18
20
|
// here; a second, independent cache is intentional, not an oversight — the
|
|
@@ -63,6 +65,7 @@ const EMPTY_PAYWALL_CONTEXT = {
|
|
|
63
65
|
acknowledgePresentation: () => { },
|
|
64
66
|
customActions: EMPTY_CUSTOM_ACTIONS,
|
|
65
67
|
customScreens: EMPTY_CUSTOM_SCREENS,
|
|
68
|
+
observePresentation: () => observer_1.NOOP_PAYWALL_PRESENTATION,
|
|
66
69
|
};
|
|
67
70
|
/**
|
|
68
71
|
* How long a presentation may go unacknowledged by the host before it is
|
|
@@ -86,11 +89,55 @@ exports.PaywallContext = (0, react_1.createContext)(EMPTY_PAYWALL_CONTEXT);
|
|
|
86
89
|
* resolve it).
|
|
87
90
|
*/
|
|
88
91
|
const usePaywallHost = () => {
|
|
89
|
-
const { activePaywall, complete, acknowledgePresentation, customActions, customScreens } = (0, react_1.useContext)(exports.PaywallContext);
|
|
90
|
-
return {
|
|
92
|
+
const { activePaywall, complete, acknowledgePresentation, customActions, customScreens, observePresentation, } = (0, react_1.useContext)(exports.PaywallContext);
|
|
93
|
+
return {
|
|
94
|
+
activePaywall,
|
|
95
|
+
complete,
|
|
96
|
+
acknowledgePresentation,
|
|
97
|
+
customActions,
|
|
98
|
+
customScreens,
|
|
99
|
+
observePresentation,
|
|
100
|
+
};
|
|
91
101
|
};
|
|
92
102
|
exports.usePaywallHost = usePaywallHost;
|
|
93
|
-
|
|
103
|
+
/**
|
|
104
|
+
* Whether an off-surface record should wait for its purchases rather than end
|
|
105
|
+
* now: only while one is in flight AND its end is still open. Once a purchase
|
|
106
|
+
* settled `purchased` the end is fixed (`resolveEndedOutcome`), so nothing a
|
|
107
|
+
* pending one settles to could change it.
|
|
108
|
+
*/
|
|
109
|
+
const shouldWaitForPurchases = (record) => record.pending > 0 && record.purchaseOutcome !== "purchased";
|
|
110
|
+
/**
|
|
111
|
+
* Keeps an off-surface record open for the purchases still in flight on it:
|
|
112
|
+
* the purchase wrapper ends it when the last one settles, or this bound does,
|
|
113
|
+
* `dismissed`. Never cleared by an unmount, so a purchase that never settles
|
|
114
|
+
* cannot leak it.
|
|
115
|
+
*/
|
|
116
|
+
const waitForPurchases = (record) => {
|
|
117
|
+
var _a;
|
|
118
|
+
(_a = record.timer) !== null && _a !== void 0 ? _a : (record.timer = setTimeout(() => endPresentation(record, { status: "dismissed" }), present_1.LATE_PURCHASE_TIMEOUT_MS));
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* The single end of a `present()` presentation: reports to the observer and
|
|
122
|
+
* resolves `present()` with the same reconciled outcome (`resolveEndedOutcome`:
|
|
123
|
+
* a settled purchase sticks, otherwise `resolvePresentedOutcome` upgrades a bare
|
|
124
|
+
* `dismissed` to what the store did — see its doc for why `dismiss`'s own
|
|
125
|
+
* `{status:"dismissed"}` isn't treated as an unoverridable explicit answer).
|
|
126
|
+
* Reported before resolving. Idempotent.
|
|
127
|
+
*/
|
|
128
|
+
const endPresentation = (record, result, reportedTransaction) => {
|
|
129
|
+
if (!record || record.ended)
|
|
130
|
+
return;
|
|
131
|
+
record.ended = true;
|
|
132
|
+
if (record.timer)
|
|
133
|
+
clearTimeout(record.timer);
|
|
134
|
+
record.timer = null;
|
|
135
|
+
const outcome = (0, present_1.resolveEndedOutcome)(result, record.purchaseOutcome);
|
|
136
|
+
// `outcome`, never the transaction, is what `present()` resolves with.
|
|
137
|
+
record.presentation.end(outcome, record.purchasedKey, record.purchasedFrom, reportedTransaction);
|
|
138
|
+
record.resolve(outcome);
|
|
139
|
+
};
|
|
140
|
+
const PaywallProviderInner = ({ children, client, locale, customAudienceParams, productProvider, stripeProductProvider, customActions, customScreens, presentAckTimeoutMs, registerTimeoutMs, observer, }) => {
|
|
94
141
|
var _a;
|
|
95
142
|
// `data` straight off `useQuery` is the single source of truth (Finding 1,
|
|
96
143
|
// 2026-08-17 final review) — react-query's own cache already gets both a
|
|
@@ -186,39 +233,84 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
186
233
|
"adapter. Pass `stripeLinkProductProvider({ clientReferenceId })` to honour it.");
|
|
187
234
|
}
|
|
188
235
|
}, [activePaywall, stripeProductProvider]);
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
//
|
|
192
|
-
|
|
193
|
-
// can
|
|
194
|
-
|
|
195
|
-
//
|
|
196
|
-
//
|
|
197
|
-
//
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
//
|
|
202
|
-
//
|
|
203
|
-
//
|
|
204
|
-
//
|
|
205
|
-
const presentationGenerationRef = (0, react_1.useRef)(0);
|
|
206
|
-
// Wraps `productRuntime.purchase` to record the outcome above (race-guarded
|
|
207
|
-
// — see `presentationGenerationRef`); every other field (and — critically —
|
|
208
|
-
// the object's change cadence, since `products.purchasing` flips must
|
|
209
|
-
// still propagate) is untouched. `productRuntime.purchase` is itself
|
|
236
|
+
// The presentation `present()` has on screen: its observer handle, its
|
|
237
|
+
// resolver and what the store did during it. One record per accepted
|
|
238
|
+
// `present()`, never reused, so its identity is the purchase race guard below.
|
|
239
|
+
const presentationRecordRef = (0, react_1.useRef)(null);
|
|
240
|
+
// The same record as STATE, so the context's `complete` can be bound to the
|
|
241
|
+
// presentation a render showed (see `completeOnSurface`). State, not the
|
|
242
|
+
// ref: a same-moment re-present in one batch leaves `activeMoment` equal, and
|
|
243
|
+
// only a new object identity guarantees the context re-renders with B's
|
|
244
|
+
// `complete` rather than keeping A's.
|
|
245
|
+
const [surfaceRecord, setSurfaceRecord] = (0, react_1.useState)(null);
|
|
246
|
+
const activePaywallRef = (0, react_1.useRef)(activePaywall);
|
|
247
|
+
activePaywallRef.current = activePaywall;
|
|
248
|
+
// Wraps `productRuntime.purchase` to record the outcome on the presentation
|
|
249
|
+
// the purchase STARTED on; every other field (and — critically — the
|
|
250
|
+
// object's change cadence, since `products.purchasing` flips must still
|
|
251
|
+
// propagate) is untouched. `productRuntime.purchase` is itself
|
|
210
252
|
// `useCallback(…, [])`-stable (`useProducts.ts`), so this wrapper never
|
|
211
253
|
// changes identity either.
|
|
212
|
-
|
|
213
|
-
|
|
254
|
+
//
|
|
255
|
+
// The race guard: binding to the record captured BEFORE the await is what
|
|
256
|
+
// stops a stale write. Paywall A's purchase can still be in flight when the
|
|
257
|
+
// user dismisses A and B is presented; when A's promise settles it reaches
|
|
258
|
+
// A's record, which has ended, and is dropped — it never lands in B's. DO NOT
|
|
259
|
+
// read `presentationRecordRef` after the await because it "looks" the same;
|
|
260
|
+
// that is exactly the race. A record still waiting after its paywall
|
|
261
|
+
// disappeared has not ended, so its purchase is recorded there and ends it.
|
|
262
|
+
//
|
|
263
|
+
// The paywall a purchase was made ON is read at the start too: a background
|
|
264
|
+
// revalidation can swap the moment's variant mid-presentation, which stays
|
|
265
|
+
// credited to the variant shown first, but the bought slot's store id is the
|
|
266
|
+
// swapped-in variant's, and that id is what joins to revenue.
|
|
267
|
+
//
|
|
268
|
+
// A purchase with no presentation on screen (the inline step's, which tracks
|
|
269
|
+
// its own) is recorded nowhere.
|
|
270
|
+
const purchaseOn = (0, react_1.useCallback)(async (record, key) => {
|
|
271
|
+
// Bound like `complete` (see `completeOnSurface`): a purchase requested
|
|
272
|
+
// through a presentation that is no longer on the surface — a stale
|
|
273
|
+
// action chain resuming after its paywall closed, e.g. a `custom` or
|
|
274
|
+
// `requestPermission` step followed by `purchase` — never opens the
|
|
275
|
+
// store over whatever is showing now, and records nothing anywhere.
|
|
276
|
+
// The action engine never gets here for a stale chain (it checks
|
|
277
|
+
// `presentationEnded` first and ends the chain); this `cancelled` is for
|
|
278
|
+
// a direct caller, such as a custom screen.
|
|
279
|
+
if (record && presentationRecordRef.current !== record) {
|
|
280
|
+
console.warn("[paywalls] A purchase was requested by a paywall that is no longer on screen; " +
|
|
281
|
+
"it was not started and resolves as cancelled.");
|
|
282
|
+
return { status: "cancelled" };
|
|
283
|
+
}
|
|
284
|
+
const madeOn = activePaywallRef.current;
|
|
285
|
+
if (record)
|
|
286
|
+
record.pending += 1;
|
|
214
287
|
const result = await productRuntime.purchase(key);
|
|
288
|
+
if (!record || record.ended)
|
|
289
|
+
return result;
|
|
290
|
+
record.pending -= 1;
|
|
215
291
|
const outcome = (0, present_1.purchaseOutcomeFromResult)(result);
|
|
216
|
-
|
|
217
|
-
|
|
292
|
+
// A settled purchase sticks — see `resolveEndedOutcome`.
|
|
293
|
+
if (outcome && record.purchaseOutcome !== "purchased") {
|
|
294
|
+
record.purchaseOutcome = outcome;
|
|
295
|
+
record.purchasedKey = result.status === "purchased" ? result.productKey : null;
|
|
296
|
+
record.purchasedFrom = result.status === "purchased" ? madeOn : null;
|
|
297
|
+
}
|
|
298
|
+
// Off screen (closed, or its paywall disappeared) and nothing else in
|
|
299
|
+
// flight: this was the purchase it was waiting for.
|
|
300
|
+
if (record.pending === 0 && presentationRecordRef.current !== record) {
|
|
301
|
+
endPresentation(record, { status: "dismissed" });
|
|
218
302
|
}
|
|
219
303
|
return result;
|
|
220
304
|
}, [productRuntime.purchase]);
|
|
221
|
-
|
|
305
|
+
// The runtime every renderer reads, its `purchase` bound to the record on
|
|
306
|
+
// the surface when it was rendered (null with no `present()` showing, which
|
|
307
|
+
// records nothing: the inline step tracks its own).
|
|
308
|
+
//
|
|
309
|
+
// `presentationEnded` is the same test `purchaseOn` refuses on, built from
|
|
310
|
+
// the same captured record, so the action engine's check and the refusal
|
|
311
|
+
// cannot disagree: a stale chain stops at its `purchase` instead of reading
|
|
312
|
+
// the refusal's `cancelled` as the user's and running `onCancel`.
|
|
313
|
+
const productRuntimeWithPurchaseTracking = (0, react_1.useMemo)(() => (Object.assign(Object.assign({}, productRuntime), { purchase: (key) => purchaseOn(surfaceRecord, key), presentationEnded: () => surfaceRecord !== null && presentationRecordRef.current !== surfaceRecord })), [productRuntime, purchaseOn, surfaceRecord]);
|
|
222
314
|
// `activeMoment`'s `useState` was hoisted above `productRefs` — see the
|
|
223
315
|
// comment there. Only `hostAcknowledged` is declared here.
|
|
224
316
|
// Whether the host has confirmed THIS presentation is on screen. State, not
|
|
@@ -249,7 +341,7 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
249
341
|
// issued in the same tick (`Promise.all([present("a"), present("b")])`, or
|
|
250
342
|
// two `presentPaywall` actions in one action list) both read the stale ref,
|
|
251
343
|
// both take the "start" branch, and the second overwrites
|
|
252
|
-
//
|
|
344
|
+
// the first one's record — that promise then never settles, exactly the
|
|
253
345
|
// orphaning this whole ref/resolver scheme exists to prevent. Assigning
|
|
254
346
|
// synchronously inside `present`/`complete` closes that window; this
|
|
255
347
|
// render-body line stays only as a resync for the (rare) case something
|
|
@@ -257,7 +349,10 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
257
349
|
// callback.
|
|
258
350
|
const activeMomentRef = (0, react_1.useRef)(activeMoment);
|
|
259
351
|
activeMomentRef.current = activeMoment;
|
|
260
|
-
|
|
352
|
+
// Ref so `present`/`complete`/`acknowledgePresentation` keep empty deps while
|
|
353
|
+
// reading the CURRENT prop — hosts will pass an inline object.
|
|
354
|
+
const observerRef = (0, react_1.useRef)(observer);
|
|
355
|
+
observerRef.current = observer;
|
|
261
356
|
// present() must not fetch anything — the catalog and products are already
|
|
262
357
|
// resolved (or resolving) from mount. It only decides, synchronously,
|
|
263
358
|
// whether to show the Modal.
|
|
@@ -266,22 +361,40 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
266
361
|
if (decision.type === "immediate") {
|
|
267
362
|
return Promise.resolve(decision.result);
|
|
268
363
|
}
|
|
269
|
-
//
|
|
270
|
-
// still
|
|
271
|
-
//
|
|
272
|
-
|
|
273
|
-
|
|
364
|
+
// A fresh record: no purchase has happened under it yet, and a purchase
|
|
365
|
+
// still in flight from a PREVIOUS presentation is bound to that one's
|
|
366
|
+
// record, never this — see the `purchase` wrapper. Only the "start"
|
|
367
|
+
// decision reaches here: refusals return above, before anything is
|
|
368
|
+
// reported (contract rule P1). The handle holds its OWN copy of the
|
|
369
|
+
// paywall, because by the end `activePaywall` can already be null — that
|
|
370
|
+
// is exactly the `paywall-disappeared` case.
|
|
371
|
+
const record = {
|
|
372
|
+
presentation: (0, observer_1.openPaywallPresentation)(observerRef.current, decision.paywall, "present", react_native_1.Platform.OS),
|
|
373
|
+
resolve: () => { },
|
|
374
|
+
purchaseOutcome: null,
|
|
375
|
+
purchasedKey: null,
|
|
376
|
+
purchasedFrom: null,
|
|
377
|
+
pending: 0,
|
|
378
|
+
ended: false,
|
|
379
|
+
timer: null,
|
|
380
|
+
};
|
|
381
|
+
presentationRecordRef.current = record;
|
|
274
382
|
// Authoritative NOW, synchronously — see the ref's doc above. A second
|
|
275
383
|
// `present()` call before React commits reads this value, not the stale
|
|
276
384
|
// pre-commit state, and correctly takes the "already showing" branch.
|
|
277
385
|
activeMomentRef.current = moment;
|
|
278
386
|
return new Promise((resolve) => {
|
|
279
|
-
|
|
387
|
+
record.resolve = resolve;
|
|
280
388
|
// A new presentation is unacknowledged until the host says otherwise —
|
|
281
389
|
// reset before it starts, or the previous presentation's confirmation
|
|
282
|
-
// would vouch for this one and disable the recovery.
|
|
390
|
+
// would vouch for this one and disable the recovery. No exception, not
|
|
391
|
+
// even a successor taking a Modal that stays visible in the same commit:
|
|
392
|
+
// only the host knows whether it will render it (an unregistered custom
|
|
393
|
+
// screen or an element list that fails to parse never does), so the
|
|
394
|
+
// host acknowledges that case too — see `acknowledgePresentation`.
|
|
283
395
|
setHostAcknowledged(false);
|
|
284
396
|
setActiveMoment(moment);
|
|
397
|
+
setSurfaceRecord(record);
|
|
285
398
|
});
|
|
286
399
|
}, []);
|
|
287
400
|
// Wakes anything parked in `register` as soon as the catalog stops loading.
|
|
@@ -312,18 +425,11 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
312
425
|
present,
|
|
313
426
|
timeoutMs: registerTimeoutMs,
|
|
314
427
|
}, moment, feature), [present, registerTimeoutMs]);
|
|
315
|
-
//
|
|
316
|
-
//
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
// `resolvePresentedOutcome` upgrades a bare "dismissed" to "purchased" (or
|
|
321
|
-
// "cancelled") when the store actually did something during this
|
|
322
|
-
// presentation — see its doc for why `dismiss`'s own `{status:"dismissed"}`
|
|
323
|
-
// isn't treated as an unoverridable explicit answer.
|
|
324
|
-
const complete = (0, react_1.useCallback)((result) => {
|
|
325
|
-
const resolve = pendingResolveRef.current;
|
|
326
|
-
pendingResolveRef.current = null;
|
|
428
|
+
// Frees the surface — clears the active moment, hiding the Modal and
|
|
429
|
+
// allowing a new `present()` — and hands back the record that was on it.
|
|
430
|
+
const releaseSurface = (0, react_1.useCallback)(() => {
|
|
431
|
+
const record = presentationRecordRef.current;
|
|
432
|
+
presentationRecordRef.current = null;
|
|
327
433
|
// Authoritative NOW, synchronously — same reasoning as `present()`'s
|
|
328
434
|
// assignment above: a `present()` issued from the resolution continuation
|
|
329
435
|
// (`const r = await present("a"); … present("downsell")` — a downsell
|
|
@@ -332,14 +438,67 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
332
438
|
// next commit.
|
|
333
439
|
activeMomentRef.current = null;
|
|
334
440
|
setActiveMoment(null);
|
|
441
|
+
setSurfaceRecord(null);
|
|
335
442
|
setHostAcknowledged(false);
|
|
336
|
-
|
|
443
|
+
return record;
|
|
337
444
|
}, []);
|
|
445
|
+
// Called by PaywallHost (Task 7) from the presented paywall's
|
|
446
|
+
// `ScreenHost.complete`. Resolves whatever `present()` call is pending and
|
|
447
|
+
// clears the active moment, hiding the Modal and allowing a new
|
|
448
|
+
// `present()` to start. Safe to call with nothing pending (no-ops).
|
|
449
|
+
//
|
|
450
|
+
// The end is reconciled with what the store did during this presentation
|
|
451
|
+
// (`resolveEndedOutcome`, in `endPresentation`).
|
|
452
|
+
const complete = (0, react_1.useCallback)((result, transaction) => {
|
|
453
|
+
// The RECONCILED outcome (`endPresentation`), so a dismiss the store
|
|
454
|
+
// upgraded to a purchase is reported as one. Every post-acceptance error
|
|
455
|
+
// funnels through here too (`host-never-presented`, the host's
|
|
456
|
+
// parse/render errors) — every one but `paywall-disappeared`, whose effect
|
|
457
|
+
// below may wait for a purchase first. Ended with the record already off
|
|
458
|
+
// the surface, so a downsell `present()` issued from the resolution starts
|
|
459
|
+
// a clean presentation.
|
|
460
|
+
//
|
|
461
|
+
// A CLOSE (`dismissed`) with a purchase in flight waits for it, as an
|
|
462
|
+
// inline step's blur does (owner ruling on #286): the surface is freed
|
|
463
|
+
// now, and the record ends with the store outcome when it settles. Any
|
|
464
|
+
// other reported end is the host's explicit answer and ends at once.
|
|
465
|
+
const record = releaseSurface();
|
|
466
|
+
// A transaction counts only when the screen itself reported `purchased`
|
|
467
|
+
// (#287): one passed with `cancelled` stays dropped even if a recorded
|
|
468
|
+
// purchase makes the end `purchased` — the screen tied it to a cancel.
|
|
469
|
+
const reported = result.status === "purchased" ? transaction : undefined;
|
|
470
|
+
if (record && !record.ended && transaction !== undefined && reported === undefined) {
|
|
471
|
+
console.warn(`[paywalls] complete() was given a transaction with status "${result.status}"; it was dropped.`);
|
|
472
|
+
}
|
|
473
|
+
if (record && !record.ended && result.status === "dismissed" && shouldWaitForPurchases(record)) {
|
|
474
|
+
waitForPurchases(record);
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
endPresentation(record, result, reported);
|
|
478
|
+
}, [releaseSurface]);
|
|
479
|
+
// What the context hands the host as `complete`: bound to the record this
|
|
480
|
+
// render showed. A paywall's action chain can outlive its presentation — a
|
|
481
|
+
// `{purchase, onSuccess:[dismiss]}` whose purchase settles after the Modal
|
|
482
|
+
// closed or the paywall disappeared, while a downsell (or the host's
|
|
483
|
+
// `await present()` continuation) has opened the next one — and its trailing
|
|
484
|
+
// `dismiss` must not end THAT one. `ScreenRenderer` reads `complete` at call
|
|
485
|
+
// time, so `PaywallHost` also keys its content per presentation.
|
|
486
|
+
const completeOnSurface = (0, react_1.useCallback)((result, transaction) => {
|
|
487
|
+
// A stale call returns here, before its transaction reaches anything.
|
|
488
|
+
if (!surfaceRecord || presentationRecordRef.current !== surfaceRecord)
|
|
489
|
+
return;
|
|
490
|
+
complete(result, transaction);
|
|
491
|
+
}, [surfaceRecord, complete]);
|
|
338
492
|
// Stable (empty deps) like `present`/`complete`: the host wires this straight
|
|
339
493
|
// into a Modal prop, and an identity change per render would churn it.
|
|
340
494
|
const acknowledgePresentation = (0, react_1.useCallback)(() => {
|
|
495
|
+
var _a;
|
|
341
496
|
setHostAcknowledged(true);
|
|
497
|
+
// The handle's `shown()` reaches the observer at most once and never
|
|
498
|
+
// throws, so a second acknowledgement of one presentation is harmless.
|
|
499
|
+
(_a = presentationRecordRef.current) === null || _a === void 0 ? void 0 : _a.presentation.shown();
|
|
342
500
|
}, []);
|
|
501
|
+
const observePresentation = (0, react_1.useCallback)((paywall) => (0, observer_1.openPaywallPresentation)(observerRef.current, paywall, "paywall_step", react_native_1.Platform.OS), []);
|
|
343
502
|
// `activePaywall` was hoisted above `productRefs` — see the comment there
|
|
344
503
|
// (Finding 6, 2026-08-17 final review) for why it is derived from
|
|
345
504
|
// `activeMoment` rather than guarded on `catalog` alone.
|
|
@@ -350,11 +509,30 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
350
509
|
// `present()` call with `"error"` for the rest of the app's life.
|
|
351
510
|
// `complete()` always clears `activeMoment` together with resolving the
|
|
352
511
|
// pending promise, so it cannot race with or double-resolve this branch.
|
|
512
|
+
//
|
|
513
|
+
// A purchase wins over the disappearance (owner decision on #286) — a host
|
|
514
|
+
// that sets a user property on purchase changes the query key, which is
|
|
515
|
+
// exactly this case. The surface is freed either way (the Modal has nothing
|
|
516
|
+
// to render, and holding `activeMoment` would answer every other
|
|
517
|
+
// `present()` with `already-presenting`), but the record is not ended yet if
|
|
518
|
+
// a purchase is in flight: it waits for it, as an inline step waits after a
|
|
519
|
+
// blur, bounded by `LATE_PURCHASE_TIMEOUT_MS`, then ends with the store's
|
|
520
|
+
// outcome. One that already settled `purchased` ends it `purchased`. Only
|
|
521
|
+
// with neither does it end `paywall-disappeared`, at once.
|
|
353
522
|
(0, react_1.useEffect)(() => {
|
|
354
523
|
if (!activeMoment || activePaywall)
|
|
355
524
|
return;
|
|
356
|
-
|
|
357
|
-
|
|
525
|
+
const record = releaseSurface();
|
|
526
|
+
if (!record || record.ended)
|
|
527
|
+
return;
|
|
528
|
+
if (shouldWaitForPurchases(record)) {
|
|
529
|
+
waitForPurchases(record);
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
// A purchase that already settled turns this into `purchased`
|
|
533
|
+
// (`resolveEndedOutcome`).
|
|
534
|
+
endPresentation(record, { status: "error", reason: "paywall-disappeared" });
|
|
535
|
+
}, [activeMoment, activePaywall, releaseSurface]);
|
|
358
536
|
// The OTHER way a presentation never completes, and the one the guard above
|
|
359
537
|
// structurally cannot catch: `activePaywall` is perfectly non-null — the
|
|
360
538
|
// catalog still holds the paywall — but it never reaches the screen because
|
|
@@ -395,10 +573,11 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
395
573
|
isProviderMounted: true,
|
|
396
574
|
productsStatus: productRuntime.status,
|
|
397
575
|
activePaywall,
|
|
398
|
-
complete,
|
|
576
|
+
complete: completeOnSurface,
|
|
399
577
|
acknowledgePresentation,
|
|
400
578
|
customActions,
|
|
401
579
|
customScreens,
|
|
580
|
+
observePresentation,
|
|
402
581
|
}), [
|
|
403
582
|
present,
|
|
404
583
|
register,
|
|
@@ -407,10 +586,11 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
407
586
|
catalogStatus,
|
|
408
587
|
productRuntime.status,
|
|
409
588
|
activePaywall,
|
|
410
|
-
|
|
589
|
+
completeOnSurface,
|
|
411
590
|
acknowledgePresentation,
|
|
412
591
|
customActions,
|
|
413
592
|
customScreens,
|
|
593
|
+
observePresentation,
|
|
414
594
|
]);
|
|
415
595
|
return ((0, jsx_runtime_1.jsx)(ProductRuntimeContext_1.ProductRuntimeContext.Provider, { value: productRuntimeWithPurchaseTracking, children: (0, jsx_runtime_1.jsx)(exports.PaywallContext.Provider, { value: contextValue, children: children }) }));
|
|
416
596
|
};
|
|
@@ -436,7 +616,7 @@ const PaywallProviderInner = ({ children, client, locale, customAudienceParams,
|
|
|
436
616
|
* then read the default context, where `isProviderMounted` is `false` and both
|
|
437
617
|
* `present` and `register` resolve their fail-open answers.
|
|
438
618
|
*/
|
|
439
|
-
const PaywallProvider = ({ children, client: clientProp, locale = "en", customAudienceParams = {}, productProvider, stripeProductProvider, customActions = EMPTY_CUSTOM_ACTIONS, customScreens = EMPTY_CUSTOM_SCREENS, presentAckTimeoutMs = DEFAULT_PRESENT_ACK_TIMEOUT_MS, registerTimeoutMs = exports.DEFAULT_REGISTER_TIMEOUT_MS, }) => {
|
|
619
|
+
const PaywallProvider = ({ children, client: clientProp, locale = "en", customAudienceParams = {}, productProvider, stripeProductProvider, customActions = EMPTY_CUSTOM_ACTIONS, customScreens = EMPTY_CUSTOM_SCREENS, presentAckTimeoutMs = DEFAULT_PRESENT_ACK_TIMEOUT_MS, registerTimeoutMs = exports.DEFAULT_REGISTER_TIMEOUT_MS, observer, }) => {
|
|
440
620
|
// Prop wins, else whatever `OnboardingStudio.init()` built. Read during render,
|
|
441
621
|
// so `init()` must run before the first render — at module scope.
|
|
442
622
|
const client = (0, OnboardingStudio_1.resolveProviderClient)(clientProp, OnboardingStudio_1.OnboardingStudio.getClient());
|
|
@@ -450,7 +630,7 @@ const PaywallProvider = ({ children, client: clientProp, locale = "en", customAu
|
|
|
450
630
|
// Degrade rather than throw — see the doc above.
|
|
451
631
|
if (!client)
|
|
452
632
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
453
|
-
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: paywallQueryClient, children: (0, jsx_runtime_1.jsx)(PaywallProviderInner, { client: client, locale: locale, customAudienceParams: customAudienceParams, productProvider: productProvider, stripeProductProvider: stripeProductProvider, customActions: customActions, customScreens: customScreens, presentAckTimeoutMs: presentAckTimeoutMs, registerTimeoutMs: registerTimeoutMs, children: children }) }));
|
|
633
|
+
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: paywallQueryClient, children: (0, jsx_runtime_1.jsx)(PaywallProviderInner, { client: client, locale: locale, customAudienceParams: customAudienceParams, productProvider: productProvider, stripeProductProvider: stripeProductProvider, customActions: customActions, customScreens: customScreens, presentAckTimeoutMs: presentAckTimeoutMs, registerTimeoutMs: registerTimeoutMs, observer: observer, children: children }) }));
|
|
454
634
|
};
|
|
455
635
|
exports.PaywallProvider = PaywallProvider;
|
|
456
636
|
//# sourceMappingURL=PaywallProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallProvider.js","sourceRoot":"","sources":["../../src/paywalls/PaywallProvider.tsx"],"names":[],"mappings":";;;;AAAA,iCAAqG;AACrG,uDAAmF;AAEnF,2DAAuD;AAEvD,uCAYmB;AACnB,yDAAsD;AAEtD,6EAA0E;AAG1E,2EAAwE;AACxE,uEAA2E;AAC3E,yCAAoF;AACpF,0DAI6B;AAC7B,+DAG+B;AAE/B,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,0EAA0E;AAC1E,iEAAiE;AACjE,yDAAyD;AACzD,gCAAgC;AAChC,MAAM,kBAAkB,GAAG,IAAI,yBAAW,CAAC;IACzC,cAAc,EAAE;QACd,OAAO,EAAE;YACP,SAAS,EAAE,QAAQ;SACpB;KACF;CACF,CAAC,CAAC;AAEH,wEAAwE;AACxE,0EAA0E;AAC1E,6EAA6E;AAC7E,2EAA2E;AAC3E,oEAAoE;AACpE,MAAM,oBAA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E,CAAC,CAAC;IAE/E,6EAA6E;IAC7E,oDAAoD;IACpD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,MAAM;YAAE,OAAO;QACnB,OAAO,CAAC,IAAI,CAAC,GAAG,yCAAsB,iCAAiC,CAAC,CAAC;IAC3E,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,iDAAiD;IACjD,IAAI,CAAC,MAAM;QAAE,OAAO,2DAAG,QAAQ,GAAI,CAAC;IAEpC,OAAO,CACL,uBAAC,iCAAmB,IAAC,MAAM,EAAE,kBAAkB,YAC7C,uBAAC,oBAAoB,IACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,oBAAoB,EAC1C,eAAe,EAAE,eAAe,EAChC,qBAAqB,EAAE,qBAAqB,EAC5C,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,iBAAiB,EAAE,iBAAiB,EACpC,QAAQ,EAAE,QAAQ,YAEjB,QAAQ,GACY,GACH,CACvB,CAAC;AACJ,CAAC,CAAC;AA7CW,QAAA,eAAe,mBA6C1B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentType } from "react";
|
|
2
|
+
import type { PaywallTransactionInfo } from "./observer";
|
|
2
3
|
import type { PaywallCustomPayload } from "./types";
|
|
3
4
|
/**
|
|
4
5
|
* What a host-registered custom paywall screen receives.
|
|
@@ -49,9 +50,39 @@ export type CustomPaywallScreenProps = {
|
|
|
49
50
|
* resolves pending, which means UNCONFIRMED. `PresentResult` describes how a
|
|
50
51
|
* paywall CLOSED, never what the user is entitled to — read entitlement from
|
|
51
52
|
* the billing SDK.
|
|
53
|
+
*
|
|
54
|
+
* `transaction` (optional, #287) is the purchase your billing SDK made, so a
|
|
55
|
+
* `PaywallProvider` `observer` can attribute it to this presentation; the
|
|
56
|
+
* SDK never sees a purchase a custom screen makes on its own. Pass it with
|
|
57
|
+
* `{ status: "purchased" }`:
|
|
58
|
+
* - `originalTransactionIdentifier`: the purchase's store transaction id —
|
|
59
|
+
* the iOS StoreKit original transaction id, the Android Play order id
|
|
60
|
+
* (`GPA.…`); the value you pass to your analytics' purchase call.
|
|
61
|
+
* - `purchaseToken`: Android only, the Play purchase token.
|
|
62
|
+
* - `productId`: the store product id that was bought.
|
|
63
|
+
* - `restored`: `true` when the purchase only restored existing access, so
|
|
64
|
+
* it is not counted as a conversion.
|
|
65
|
+
*
|
|
66
|
+
* It is sanitized before the observer sees it: an id that is not a
|
|
67
|
+
* non-empty string, a `restored` that is not exactly `true`, and any other
|
|
68
|
+
* field are dropped, and so is a transaction that throws when read. It is
|
|
69
|
+
* dropped entirely, with a warning, with any status other than
|
|
70
|
+
* `"purchased"`. When this presentation already recorded a purchase made
|
|
71
|
+
* through the SDK's own product runtime, that purchase wins: your ids are
|
|
72
|
+
* added to it only when your `productId` is present and names the same
|
|
73
|
+
* store product, `restored` is never added, and otherwise your ids are
|
|
74
|
+
* dropped with a warning. On a `Paywall` step, a `complete` captured during
|
|
75
|
+
* an earlier visit (the user left and came back) never ends the visit on
|
|
76
|
+
* screen and never carries its transaction; only its `{ status:
|
|
77
|
+
* "purchased" }` still advances the step, and only while the step is on
|
|
78
|
+
* screen, so a payer is never stranded; the step advances at most once per
|
|
79
|
+
* visit. Any other such call does nothing. It never
|
|
80
|
+
* changes what `present()` resolves or whether a step advances. Omitted,
|
|
81
|
+
* everything behaves as before.
|
|
52
82
|
*/
|
|
53
83
|
complete: (outcome?: {
|
|
54
84
|
status: "purchased" | "dismissed" | "cancelled";
|
|
85
|
+
transaction?: PaywallTransactionInfo;
|
|
55
86
|
}) => void;
|
|
56
87
|
/**
|
|
57
88
|
* Which paywall is being shown. `moment` is what resolved it; `id` and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customScreens.d.ts","sourceRoot":"","sources":["../../src/paywalls/customScreens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;;;;OAOG;IACH,OAAO,EAAE,oBAAoB,CAAC;IAC9B
|
|
1
|
+
{"version":3,"file":"customScreens.d.ts","sourceRoot":"","sources":["../../src/paywalls/customScreens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;;;;OAOG;IACH,OAAO,EAAE,oBAAoB,CAAC;IAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE;QACnB,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;QAChD,WAAW,CAAC,EAAE,sBAAsB,CAAC;KACtC,KAAK,IAAI,CAAC;IACX;;;;;OAKG;IACH,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,wBAAwB,CAAC,CAAC,CAAC"}
|