@rocapine/react-native-onboarding 1.75.0 → 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/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/onboarding-example.d.ts +140 -0
- package/dist/onboarding-example.d.ts.map +1 -1
- package/dist/onboarding-example.js +41 -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 +55 -3
- package/dist/screens/completingActions.d.ts.map +1 -1
- package/dist/screens/completingActions.js +209 -15
- package/dist/screens/completingActions.js.map +1 -1
- package/dist/screens/elementTypeRegistry.d.ts +14 -0
- package/dist/screens/elementTypeRegistry.d.ts.map +1 -1
- package/dist/screens/elementTypeRegistry.js +38 -1
- package/dist/screens/elementTypeRegistry.js.map +1 -1
- 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/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/unknownKeys.d.ts +25 -4
- package/dist/screens/unknownKeys.d.ts.map +1 -1
- package/dist/screens/unknownKeys.js +81 -2
- package/dist/screens/unknownKeys.js.map +1 -1
- package/dist/steps/common.types.d.ts +178 -6
- 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 +371 -1
- package/src/__tests__/customActionHooks.test.ts +224 -0
- package/src/__tests__/onboardingExampleElements.test.ts +47 -0
- package/src/__tests__/requestPermissionAction.test.ts +138 -0
- package/src/__tests__/retryIdempotencyDocs.test.ts +57 -0
- package/src/__tests__/unknownKeys.test.ts +110 -0
- package/src/index.ts +33 -1
- package/src/onboarding-example.ts +41 -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 +223 -15
- package/src/screens/elementTypeRegistry.ts +34 -0
- package/src/screens/elements/ButtonElement.ts +9 -1
- package/src/screens/types.ts +2 -2
- package/src/screens/unknownKeys.ts +113 -7
- package/src/steps/common.types.ts +213 -6
|
@@ -1211,6 +1211,19 @@ export const onboardingExample = {
|
|
|
1211
1211
|
},
|
|
1212
1212
|
],
|
|
1213
1213
|
},
|
|
1214
|
+
// #191 — the runtime publishes `actions.pending.<elementId>` while
|
|
1215
|
+
// that element's action list is awaiting, so a pending state needs
|
|
1216
|
+
// no host code and no new element type.
|
|
1217
|
+
{
|
|
1218
|
+
id: "hero-button-pending",
|
|
1219
|
+
type: "Text",
|
|
1220
|
+
renderWhen: {
|
|
1221
|
+
variable: "actions.pending.hero-button",
|
|
1222
|
+
operator: "eq",
|
|
1223
|
+
value: "true",
|
|
1224
|
+
},
|
|
1225
|
+
props: { content: "One moment…", fontSize: 14, color: "#6B7280" },
|
|
1226
|
+
},
|
|
1214
1227
|
{
|
|
1215
1228
|
id: "hero-button",
|
|
1216
1229
|
type: "Button",
|
|
@@ -1219,8 +1232,35 @@ export const onboardingExample = {
|
|
|
1219
1232
|
variant: "filled",
|
|
1220
1233
|
marginVertical: 8,
|
|
1221
1234
|
haptic: "medium",
|
|
1235
|
+
// Deliberately NOT the `onResolve: ["continue"]` async-gate
|
|
1236
|
+
// shape (review round 1, findings 1 and 7). This payload is
|
|
1237
|
+
// the exported `fallbackOnboarding`, rendered by apps that
|
|
1238
|
+
// pass no `customActions` at all — `trackCta` is registered
|
|
1239
|
+
// nowhere in the SDK — and a gate puts the screen's only way
|
|
1240
|
+
// forward behind a handler that host may not have. The
|
|
1241
|
+
// trailing `"continue"` runs on the resolve path, and
|
|
1242
|
+
// `onError` covers the other two. The async gate is where
|
|
1243
|
+
// its handler is guaranteed: `example/app/example/
|
|
1244
|
+
// composable-screen.tsx` (`async-gate`), which is not that
|
|
1245
|
+
// screen's only CTA either.
|
|
1222
1246
|
actions: [
|
|
1223
|
-
{
|
|
1247
|
+
{
|
|
1248
|
+
type: "custom",
|
|
1249
|
+
function: "trackCta",
|
|
1250
|
+
variables: ["name", "plan", "goals"],
|
|
1251
|
+
// One attempt, bounded (#264). `trackCta` is analytics —
|
|
1252
|
+
// if the host's handler never settles, the press never
|
|
1253
|
+
// finishes, the trailing `"continue"` never runs, and the
|
|
1254
|
+
// single-flight claim drops every further tap: a dead CTA
|
|
1255
|
+
// on the screen apps get when they pass no payload at
|
|
1256
|
+
// all. 8s is generous for a fire-and-forget beacon.
|
|
1257
|
+
retry: { maxAttempts: 1, timeoutMs: 8000 },
|
|
1258
|
+
// Kept although the trailing `"continue"` now runs on
|
|
1259
|
+
// every outcome (semantics decision 1 on #191): it makes
|
|
1260
|
+
// the intent explicit at the point a reader asks "what
|
|
1261
|
+
// happens offline?", and it is where failure UI would go.
|
|
1262
|
+
onError: ["continue"],
|
|
1263
|
+
},
|
|
1224
1264
|
"continue",
|
|
1225
1265
|
],
|
|
1226
1266
|
},
|