@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.
Files changed (105) hide show
  1. package/dist/evaluateCondition.d.ts.map +1 -1
  2. package/dist/evaluateCondition.js +103 -4
  3. package/dist/evaluateCondition.js.map +1 -1
  4. package/dist/index.d.ts +10 -2
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +39 -1
  7. package/dist/index.js.map +1 -1
  8. package/dist/onboarding-example.d.ts +375 -99
  9. package/dist/onboarding-example.d.ts.map +1 -1
  10. package/dist/onboarding-example.js +118 -1
  11. package/dist/onboarding-example.js.map +1 -1
  12. package/dist/paywalls/PaywallProvider.d.ts +71 -5
  13. package/dist/paywalls/PaywallProvider.d.ts.map +1 -1
  14. package/dist/paywalls/PaywallProvider.js +237 -57
  15. package/dist/paywalls/PaywallProvider.js.map +1 -1
  16. package/dist/paywalls/customScreens.d.ts +31 -0
  17. package/dist/paywalls/customScreens.d.ts.map +1 -1
  18. package/dist/paywalls/observer.d.ts +129 -0
  19. package/dist/paywalls/observer.d.ts.map +1 -0
  20. package/dist/paywalls/observer.js +211 -0
  21. package/dist/paywalls/observer.js.map +1 -0
  22. package/dist/paywalls/present.d.ts +19 -15
  23. package/dist/paywalls/present.d.ts.map +1 -1
  24. package/dist/paywalls/present.js +21 -17
  25. package/dist/paywalls/present.js.map +1 -1
  26. package/dist/paywalls/types.d.ts +3 -1
  27. package/dist/paywalls/types.d.ts.map +1 -1
  28. package/dist/products/adapters/expoIap.d.ts +38 -1
  29. package/dist/products/adapters/expoIap.d.ts.map +1 -1
  30. package/dist/products/adapters/expoIap.js +509 -75
  31. package/dist/products/adapters/expoIap.js.map +1 -1
  32. package/dist/products/index.d.ts +1 -0
  33. package/dist/products/index.d.ts.map +1 -1
  34. package/dist/products/index.js.map +1 -1
  35. package/dist/products/types.d.ts +13 -0
  36. package/dist/products/types.d.ts.map +1 -1
  37. package/dist/screens/completingActions.d.ts +95 -0
  38. package/dist/screens/completingActions.d.ts.map +1 -0
  39. package/dist/screens/completingActions.js +302 -0
  40. package/dist/screens/completingActions.js.map +1 -0
  41. package/dist/screens/elementTypeRegistry.d.ts +45 -0
  42. package/dist/screens/elementTypeRegistry.d.ts.map +1 -0
  43. package/dist/screens/elementTypeRegistry.js +119 -0
  44. package/dist/screens/elementTypeRegistry.js.map +1 -0
  45. package/dist/screens/elements/ButtonElement.d.ts +3 -2
  46. package/dist/screens/elements/ButtonElement.d.ts.map +1 -1
  47. package/dist/screens/elements/ButtonElement.js +5 -1
  48. package/dist/screens/elements/ButtonElement.js.map +1 -1
  49. package/dist/screens/resolveRenderableStep.d.ts +42 -0
  50. package/dist/screens/resolveRenderableStep.d.ts.map +1 -0
  51. package/dist/screens/resolveRenderableStep.js +28 -0
  52. package/dist/screens/resolveRenderableStep.js.map +1 -0
  53. package/dist/screens/types.d.ts +2 -2
  54. package/dist/screens/types.d.ts.map +1 -1
  55. package/dist/screens/types.js +5 -1
  56. package/dist/screens/types.js.map +1 -1
  57. package/dist/screens/unknownElementTypes.d.ts +94 -0
  58. package/dist/screens/unknownElementTypes.d.ts.map +1 -0
  59. package/dist/screens/unknownElementTypes.js +141 -0
  60. package/dist/screens/unknownElementTypes.js.map +1 -0
  61. package/dist/screens/unknownKeys.d.ts +30 -6
  62. package/dist/screens/unknownKeys.d.ts.map +1 -1
  63. package/dist/screens/unknownKeys.js +88 -54
  64. package/dist/screens/unknownKeys.js.map +1 -1
  65. package/dist/steps/common.types.d.ts +262 -9
  66. package/dist/steps/common.types.d.ts.map +1 -1
  67. package/dist/steps/common.types.js +64 -3
  68. package/dist/steps/common.types.js.map +1 -1
  69. package/package.json +1 -1
  70. package/src/__tests__/authoringDocEscapes.test.ts +59 -0
  71. package/src/__tests__/completingActions.test.ts +509 -0
  72. package/src/__tests__/customActionHooks.test.ts +224 -0
  73. package/src/__tests__/elementTypeRegistry.test.ts +48 -0
  74. package/src/__tests__/evaluateCondition.test.ts +228 -3
  75. package/src/__tests__/onboardingExampleElements.test.ts +74 -0
  76. package/src/__tests__/requestPermissionAction.test.ts +138 -0
  77. package/src/__tests__/resolveRenderableStep.test.ts +117 -0
  78. package/src/__tests__/retryIdempotencyDocs.test.ts +57 -0
  79. package/src/__tests__/unknownElementTypes.test.ts +240 -0
  80. package/src/__tests__/unknownKeys.test.ts +110 -0
  81. package/src/evaluateCondition.ts +107 -4
  82. package/src/index.ts +55 -0
  83. package/src/onboarding-example.ts +119 -1
  84. package/src/paywalls/PaywallProvider.tsx +370 -66
  85. package/src/paywalls/__tests__/PaywallProvider.observer.test.tsx +866 -0
  86. package/src/paywalls/__tests__/observer.test.ts +401 -0
  87. package/src/paywalls/__tests__/present.test.ts +0 -18
  88. package/src/paywalls/customScreens.ts +34 -1
  89. package/src/paywalls/observer.ts +308 -0
  90. package/src/paywalls/present.ts +24 -18
  91. package/src/paywalls/types.ts +3 -1
  92. package/src/products/adapters/__tests__/expoIap.contract.test.ts +648 -0
  93. package/src/products/adapters/__tests__/expoIap.test.ts +25 -11
  94. package/src/products/adapters/__tests__/expoIap5Fake.ts +288 -0
  95. package/src/products/adapters/expoIap.ts +609 -78
  96. package/src/products/index.ts +1 -0
  97. package/src/products/types.ts +13 -0
  98. package/src/screens/completingActions.ts +316 -0
  99. package/src/screens/elementTypeRegistry.ts +122 -0
  100. package/src/screens/elements/ButtonElement.ts +9 -1
  101. package/src/screens/resolveRenderableStep.ts +59 -0
  102. package/src/screens/types.ts +2 -2
  103. package/src/screens/unknownElementTypes.ts +204 -0
  104. package/src/screens/unknownKeys.ts +119 -56
  105. package/src/steps/common.types.ts +297 -9
@@ -29,25 +29,190 @@ export declare const HapticStyleSchema: z.ZodEnum<{
29
29
  rigid: "rigid";
30
30
  }>;
31
31
  export type HapticStyle = z.infer<typeof HapticStyleSchema>;
32
+ /**
33
+ * Bounded retry for a `custom` action (#191). The cap is REQUIRED and small:
34
+ * an onboarding gate that keeps hammering a dead service just holds the user on
35
+ * a screen that never resolves, so there is deliberately no "retry until it
36
+ * works" spelling.
37
+ *
38
+ * **The handler must be safe to re-run.** A retry re-invokes the SAME host
39
+ * function with the SAME press-time variables, so a handler that writes is
40
+ * asked to write again: `maxAttempts: 3` over a `/create-plan` or a charge is
41
+ * three records or three charges for one press, and neither the schema, the
42
+ * runtime nor the console can tell a safe handler from an unsafe one — this
43
+ * field is the only place the hazard is stated. `timeoutMs` widens it rather
44
+ * than bounding it: a timed-out attempt is an ordinary failed attempt, so a
45
+ * request that reached the server and lost only the ANSWER to the clock is sent
46
+ * again. Retry a read, a validation, or a write carrying an idempotency key;
47
+ * for anything else leave `retry` absent and put the recovery in `onError`.
48
+ * (Same class as the `purchase` double-fire that `disabledWhen` on
49
+ * `products.purchasing` exists to prevent — one press, several writes, nothing
50
+ * reporting it.)
51
+ */
52
+ export type CustomActionRetry = {
53
+ /**
54
+ * TOTAL attempts, counting the first — `2` means "try once, retry once".
55
+ * 1..10. Absent `retry` is the default and means exactly one attempt.
56
+ */
57
+ maxAttempts: number;
58
+ /** Fixed pause between attempts, ms (0..10000). Defaults to 0. */
59
+ delayMs?: number;
60
+ /**
61
+ * How long ONE attempt may take before it counts as failed, ms
62
+ * (1000..300000). Absent means UNBOUNDED — the behaviour before this field
63
+ * existed, and the right default: a legitimate LLM call can take 60s+, and
64
+ * cutting one off by default would be a worse bug than the hang (#264).
65
+ *
66
+ * The hang it prevents is a dead screen, not a slow one. The handler is
67
+ * awaited while the runtime holds this element's single-flight claim, so a
68
+ * promise that never settles leaves `actions.pending.<elementId>` reading
69
+ * `"true"` for the life of the screen — and the payload these docs recommend
70
+ * disables the CTA on exactly that, with no back chevron on a
71
+ * `displayProgressHeader: false` step.
72
+ *
73
+ * A timed-out attempt is an ordinary failed attempt: it retries if the budget
74
+ * allows, and otherwise runs `onError` like any other failure. Declaring a
75
+ * timeout without retries is `{ maxAttempts: 1, timeoutMs: … }` — the object
76
+ * is the attempt policy, and one attempt is a policy.
77
+ */
78
+ timeoutMs?: number;
79
+ };
80
+ export declare const CustomActionRetrySchema: z.ZodObject<{
81
+ maxAttempts: z.ZodNumber;
82
+ delayMs: z.ZodOptional<z.ZodNumber>;
83
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
84
+ }, z.core.$strip>;
32
85
  export type CustomButtonAction = {
33
86
  type: "custom";
34
87
  function: string;
35
88
  variables?: string[];
89
+ /**
90
+ * Actions to run once the host handler's promise RESOLVES. Non-terminal: the
91
+ * enclosing action list carries on afterwards, exactly as it does for a
92
+ * handler with no hooks.
93
+ *
94
+ * This is where anything that must only happen ON SUCCESS belongs — writing
95
+ * the result into a variable a later screen reads, and the `"continue"` of a
96
+ * gate that must not advance on failure. A `"continue"` placed AFTER the
97
+ * `custom` action instead advances on every outcome, which is the right
98
+ * shape for "fire and move on" and the wrong one for a gate.
99
+ */
100
+ onResolve?: ButtonAction[];
101
+ /**
102
+ * Actions to run when the handler FAILS — it threw with every attempt spent,
103
+ * an attempt exceeded `retry.timeoutMs`, or the `function` name is not
104
+ * registered on the host at all. One rule for all three.
105
+ *
106
+ * NOT terminal, with or without this hook: the enclosing list carries on,
107
+ * exactly as `purchase`/`restore` do on their own `onError`. `custom` used to
108
+ * diverge here — a throw aborted the list — and that divergence is gone
109
+ * (semantics decisions 1 and 2, recorded on #191 on 2026-09-11; ticket #266).
110
+ * It cost more than it bought: two spellings of "on error" inside one action
111
+ * union behaving differently with nothing in the payload, the schema or the
112
+ * console to tell them apart, and the two `custom` failure modes disagreeing
113
+ * with each other. What the abort was protecting — a trailing `"continue"`
114
+ * walking the user onto a screen that reads variables the handler never wrote
115
+ * — is `onResolve`'s job, where the author says it rather than the runtime
116
+ * guessing it.
117
+ *
118
+ * The failure is still `console.error`ed whether or not this hook is declared
119
+ * — a declared hook is error UI, not a reason to lose the stack trace.
120
+ */
121
+ onError?: ButtonAction[];
122
+ /** Bounded retry of the handler. Absent means one attempt, no retry. */
123
+ retry?: CustomActionRetry;
36
124
  };
37
- export declare const CustomButtonActionSchema: z.ZodObject<{
38
- type: z.ZodLiteral<"custom">;
39
- function: z.ZodString;
40
- variables: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
- }, z.core.$strip>;
125
+ export declare const CustomButtonActionSchema: z.ZodType<CustomButtonAction>;
42
126
  export type SetVariableButtonAction = {
43
127
  type: "setVariable";
44
128
  name: string;
45
129
  value: string;
46
130
  label?: string;
47
131
  /**
48
- * When `"expression"`, `value` is parsed as an arithmetic expression with
49
- * `{{var}}` references, numeric literals, and `+ - * /` (parens supported).
50
- * On parse failure, falls back to plain interpolation (string).
132
+ * When `"expression"`, `value` is parsed as an expression over `{{var}}`
133
+ * references, numeric literals, quoted string literals, `+ - * /` (parens
134
+ * supported) and a small function stdlib:
135
+ *
136
+ * - numeric — `min(a, b, ...)`, `max(a, b, ...)`, `abs(a)`,
137
+ * `round(a[, digits])`, `clamp(a, lo, hi)`
138
+ * - dates — `addDays(date, n)`, `format(date, spec[, locale])`. `date` is an
139
+ * ISO string (what `DatePicker` stores) or the `"now"` sentinel `DatePicker`
140
+ * already accepts. `spec` is the `DatePicker` `format` prop's Intl
141
+ * vocabulary: a bare `dateStyle` name (`"medium"`) or `key:value` pairs
142
+ * (`"weekday:long, month:short, day:numeric"`). Not a token language —
143
+ * there is no `YYYY-MM-DD`.
144
+ * - listing — `list(x[, conjunction])` ("A, B and C"), `join(x[, separator])`,
145
+ * `count(x)`, `plural(n, one, other)`. `x` is an untagged multi-select
146
+ * variable (the JSON `string[]` `CheckboxGroup` writes); member LABELS are
147
+ * used when present, matching interpolation's label-first precedence. A
148
+ * scalar answer counts as one member, also by its label. Two things are not
149
+ * lists and fail the call rather than counting as one: a variable holding a
150
+ * number (`count({{age}})` — `plural({{age}}, ...)` is what you wanted),
151
+ * and a value that parses as JSON and is NOT a `string[]` (`"[1,2,3]"`,
152
+ * `{"a":1}`).
153
+ *
154
+ * **This runs at press time only.** Actions have no mount/appear hook and
155
+ * `Text mode: "expression"` interpolates rather than evaluating, so a
156
+ * headline needing a computed value must have it written to a variable by an
157
+ * earlier press (typically the previous screen's Continue) and then simply
158
+ * interpolated.
159
+ *
160
+ * A quoted literal's CONTENTS interpolate, so `{{var}}` means the same thing
161
+ * everywhere in the template: `list({{goals}}) + " for {{name}}"` reads
162
+ * "… for Ada" rather than emitting the braces to the user.
163
+ *
164
+ * A template with no function call falls back to plain interpolation on parse
165
+ * failure (so `"Hello {{name}}"` still works). A template that *attempts* a
166
+ * call and fails stores the empty string and warns, rather than writing the
167
+ * unevaluated source text into a variable a headline would display verbatim.
168
+ *
169
+ * An **absent** variable reads as numeric 0 wherever it is data — which is
170
+ * what makes increment-before-seed arithmetic and `count()` on a skipped
171
+ * screen work — but is refused wherever it is configuration: a `clamp` bound
172
+ * or a `round` digit count, where a typo'd variable name would otherwise
173
+ * produce a plausible constant (`clamp({{score}}, {{floor}}, {{ceiling}})`
174
+ * reported 0 for a score of 42). The taint follows the value, so it also
175
+ * refuses one that reached a bound through arithmetic or a function
176
+ * (`addDays({{d}}, {{weeks}} * 7)`), but is dropped where the result could
177
+ * have come from an untainted argument: `max({{trialDays}}, 7)` is an
178
+ * explicit default and is honoured, as is `max({{seeded_zero}}, {{absent}})`.
179
+ * A `{{ref}}` inside a quoted LITERAL is guarded the same way when it is
180
+ * configuration: `list`'s conjunction, `join`'s separator, `format`'s spec
181
+ * and its LOCALE, and BOTH `plural` forms. `join({{goals}}, "{{sep}}")` with
182
+ * `sep` unset used to run the members together, and `"en{{sfx}}"` as a locale
183
+ * resolved to the valid `"en"` and silently swapped a date's day and month.
184
+ * `plural` checks its count and both forms — both forms because an absent
185
+ * reference in a form is an authoring error whichever one the count selects,
186
+ * and the count because otherwise an unseeded one picks a form silently and
187
+ * `plural` launders it onward.
188
+ *
189
+ * Two known limits, both deliberate. **`count()` does not taint** — a real
190
+ * zero is what `count({{skipped}})` should give on a screen the user never
191
+ * filled in, and the shipped `plural(count({{goals}}), …)` pattern depends
192
+ * on it — so wrapping a name in `count()` defeats the guard, and
193
+ * `round({{pct}}, count({{digits}}))` answers rather than failing.
194
+ * And **`asDate` accepts any `Date.parse`-able string**,
195
+ * including a bare integer, which no taint can reach because the numbers
196
+ * involved are seeded.
197
+ * "Attempts a call" means a **stdlib name** sits in front of a `(` whose
198
+ * contents could actually be arguments. A bare word BETWEEN the parens makes
199
+ * them punctuation instead, and an unglued `(` after an UNKNOWN identifier
200
+ * is not a call, so the English optional-plural idiom survives:
201
+ * `"{{n}} day(s)"` reads "3 day(s)", `"{{n}} min(s) left"` reads
202
+ * "3 min(s) left", `"Goals ({{n}})"` reads "Goals (2)". A STDLIB name is
203
+ * called glued or not — `"max (2) options"` blanks — so prose starting with
204
+ * one needs `valueMode: "literal"`. A stdlib name DOES outrank bare words outside its own parens,
205
+ * so `list({{goals}}) and more` fails loudly — **there is no implicit
206
+ * concatenation**, and prose beside a call must be joined with `+ "…"`. That
207
+ * is the one rule an author has to know to avoid a blank headline.
208
+ *
209
+ * Two residues, both warned about at runtime: an unknown name glued to a `(`
210
+ * with no bare word anywhere is taken as a misspelled call, so `"Save(50)"`
211
+ * and `"Total({{n}})"` blank (write them with a space); and a template that
212
+ * is nothing but a stdlib call with a bare-word argument — `count(goals)`,
213
+ * the braces forgotten — keeps its text but warns, because it cannot be told
214
+ * apart from `min(s)`.
215
+ *
51
216
  * Defaults to `"literal"` — `value` stored verbatim.
52
217
  */
53
218
  valueMode?: "literal" | "expression";
@@ -125,9 +290,97 @@ export declare const PresentPaywallButtonActionSchema: z.ZodObject<{
125
290
  type: z.ZodLiteral<"presentPaywall">;
126
291
  placement: z.ZodString;
127
292
  }, z.core.$strip>;
128
- export type ButtonAction = "continue" | CustomButtonAction | SetVariableButtonAction | PurchaseButtonAction | RestoreButtonAction | DismissButtonAction | PresentPaywallButtonAction;
293
+ /**
294
+ * The permissions a `requestPermission` action can ask for.
295
+ *
296
+ * Deliberately narrow, and closed. Every member here is reachable through an
297
+ * **optionally installed** Expo module that the UI package dynamic-`require`s
298
+ * at press time (the `expo-haptics` precedent), so an app that does not need a
299
+ * permission does not carry its native code:
300
+ *
301
+ * | kind | module(s) tried, in order |
302
+ * |---|---|
303
+ * | `notifications` | `expo-notifications` |
304
+ * | `appTrackingTransparency` | `expo-tracking-transparency` (iOS 14+; other platforms report `granted`) |
305
+ * | `locationWhenInUse` | `expo-location` (foreground only — background location needs its own review justification) |
306
+ * | `camera` | `expo-camera` |
307
+ * | `microphone` | `expo-audio`, then `expo-camera` |
308
+ * | `photoLibrary` | `expo-image-picker`, then `expo-media-library` |
309
+ *
310
+ * NOT members, on purpose: **HealthKit** and **Screen Time / Family Controls**.
311
+ * Both need app-owned entitlements and a config plugin neither package ships,
312
+ * so neither can be honestly requested from inside the SDK. They arrive through
313
+ * the host `requestPermission` resolver on the `ScreenHost` (the same seam as
314
+ * `products` / `presentPaywall`) once a `kind` for them is added — a
315
+ * deliberately separate decision, not a silent no-op today.
316
+ *
317
+ * READING a permission's current status is not here either: this is a press
318
+ * action, and "skip the screen when already granted" is a variable-bag
319
+ * capability with nowhere to live in this shape. Tracked separately.
320
+ */
321
+ export declare const PERMISSION_KINDS: readonly ["notifications", "appTrackingTransparency", "locationWhenInUse", "camera", "microphone", "photoLibrary"];
322
+ export type PermissionKind = (typeof PERMISSION_KINDS)[number];
323
+ export declare const PermissionKindSchema: z.ZodEnum<{
324
+ notifications: "notifications";
325
+ appTrackingTransparency: "appTrackingTransparency";
326
+ locationWhenInUse: "locationWhenInUse";
327
+ camera: "camera";
328
+ microphone: "microphone";
329
+ photoLibrary: "photoLibrary";
330
+ }>;
331
+ /**
332
+ * Ask the OS for a permission, then branch on the answer **within the same
333
+ * press**.
334
+ *
335
+ * This is what `[{type:"custom", …}, "continue"]` could not do: a custom
336
+ * handler's return value is discarded, so a host asking for notifications could
337
+ * only influence a LATER screen, through a variable it wrote. Here `onGranted`
338
+ * and `onDenied` are ordinary nested `ButtonAction[]` lists — the exact shape
339
+ * `purchase.onSuccess` / `restore.onNothingToRestore` already use, recursed
340
+ * through the same `runActions` — so one CTA can advance on a grant and, say,
341
+ * set a variable and still advance on a refusal.
342
+ *
343
+ * Asking is **idempotent from the OS's point of view, not the SDK's**: iOS shows
344
+ * its system prompt only the first time, and every later request resolves
345
+ * immediately with the standing answer. So a second press does not re-prompt —
346
+ * but it does re-run the matching hook.
347
+ *
348
+ * `onUnavailable` covers "this build cannot ask": the Expo module is not
349
+ * installed, or the platform has no such permission. It does **not** fall back
350
+ * to `onDenied` — nobody refused anything, and running the refusal branch wrote
351
+ * `att = "denied"` and fired refusal analytics for a user who was never asked
352
+ * (review round 1 of #196). Omitted, the runtime instead REUSES THIS ASK'S OWN
353
+ * completing action: if `onGranted`/`onDenied` reach a `"continue"` or a
354
+ * `{dismiss}`, the screen is completed with that same action (`{dismiss}`
355
+ * winning when both are reachable, since the SDK must not claim the more
356
+ * permissive of two answers nobody gave), and no other authored side effect
357
+ * runs. If the ask was never a way off the screen — a "turn on notifications"
358
+ * button beside its own Skip CTA — nothing happens. Either way it is reported
359
+ * with `console.error`: declare `onUnavailable` if you care which.
360
+ */
361
+ export type RequestPermissionButtonAction = {
362
+ type: "requestPermission";
363
+ kind: PermissionKind;
364
+ /** Runs when the OS reports the permission granted. */
365
+ onGranted?: ButtonAction[];
366
+ /** Runs when the OS reports it denied, restricted, or dismissed. */
367
+ onDenied?: ButtonAction[];
368
+ /**
369
+ * Runs when this build cannot ask at all — module absent, or platform has no
370
+ * such permission.
371
+ *
372
+ * Omitted, the runtime does NOT run `onDenied` (the user refused nothing). It
373
+ * completes the screen with whichever completing action this ask already
374
+ * declares, preferring `{dismiss}` over `"continue"`, and runs no other side
375
+ * effect; an ask that was never a way off the screen does nothing. Both cases
376
+ * log a `console.error`. Declare this hook to decide it yourself.
377
+ */
378
+ onUnavailable?: ButtonAction[];
379
+ };
380
+ export type ButtonAction = "continue" | CustomButtonAction | SetVariableButtonAction | PurchaseButtonAction | RestoreButtonAction | DismissButtonAction | PresentPaywallButtonAction | RequestPermissionButtonAction;
129
381
  export declare const PurchaseButtonActionSchema: z.ZodType<PurchaseButtonAction>;
130
382
  export declare const RestoreButtonActionSchema: z.ZodType<RestoreButtonAction>;
383
+ export declare const RequestPermissionButtonActionSchema: z.ZodType<RequestPermissionButtonAction>;
131
384
  export declare const ButtonActionSchema: z.ZodType<ButtonAction>;
132
385
  export declare const ConditionOperatorSchema: z.ZodEnum<{
133
386
  in: "in";
@@ -1 +1 @@
1
- {"version":3,"file":"common.types.d.ts","sourceRoot":"","sources":["../../src/steps/common.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mBAAmB,kEAA0C,CAAC;AAE3E,eAAO,MAAM,iBAAiB;;;;;;mBAS5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AAEH,eAAO,MAAM,aAAa;;;iBAGxB,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;iBAG9B,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAY5D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IACrC,kDAAkD;IAClD,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClC;;;;;;;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AC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,yBAAyB,iEAKW,CAAC;AAIlD,eAAO,MAAM,wBAAwB,GAAI,UAAU,iBAAiB,KAAG,OACrC,CAAC;AAEnC,eAAO,MAAM,oBAAoB,0IAK/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;iBAc5B,CAAC;AACL,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,KAAK,CAAC,aAAa,GAAG,cAAc,CAAC,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAO1D,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;iBAGvB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;mBAMX,CAAC;AACjB,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAIhD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAa7B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BaseStepTypeSchema = exports.ONBOARDING_END_STEP_ID = exports.NextStepSchema = exports.BranchSchema = exports.ConditionGroupSchema = exports.LeafConditionSchema = exports.ConditionValueSchema = exports.isUnaryConditionOperator = exports.UNARY_CONDITION_OPERATORS = exports.ConditionOperatorSchema = exports.ButtonActionSchema = exports.RestoreButtonActionSchema = exports.PurchaseButtonActionSchema = exports.PresentPaywallButtonActionSchema = exports.DismissButtonActionSchema = exports.SetVariableButtonActionSchema = exports.CustomButtonActionSchema = exports.HapticStyleSchema = exports.ButtonSectionSchema = exports.InfoBoxSchema = exports.SocialProofSchema = exports.MediaSourceSchema = exports.CustomPayloadSchema = void 0;
3
+ exports.BaseStepTypeSchema = exports.ONBOARDING_END_STEP_ID = exports.NextStepSchema = exports.BranchSchema = exports.ConditionGroupSchema = exports.LeafConditionSchema = exports.ConditionValueSchema = exports.isUnaryConditionOperator = exports.UNARY_CONDITION_OPERATORS = exports.ConditionOperatorSchema = exports.ButtonActionSchema = exports.RequestPermissionButtonActionSchema = exports.RestoreButtonActionSchema = exports.PurchaseButtonActionSchema = exports.PermissionKindSchema = exports.PERMISSION_KINDS = exports.PresentPaywallButtonActionSchema = exports.DismissButtonActionSchema = exports.SetVariableButtonActionSchema = exports.CustomButtonActionSchema = exports.CustomActionRetrySchema = exports.HapticStyleSchema = exports.ButtonSectionSchema = exports.InfoBoxSchema = exports.SocialProofSchema = exports.MediaSourceSchema = exports.CustomPayloadSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.CustomPayloadSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.any()).nullish();
6
6
  exports.MediaSourceSchema = zod_1.z.union([
@@ -38,11 +38,27 @@ exports.HapticStyleSchema = zod_1.z.enum([
38
38
  "soft",
39
39
  "rigid",
40
40
  ]);
41
- exports.CustomButtonActionSchema = zod_1.z.object({
41
+ exports.CustomActionRetrySchema = zod_1.z.object({
42
+ maxAttempts: zod_1.z
43
+ .number()
44
+ .int("maxAttempts must be a whole number of attempts")
45
+ .min(1, "maxAttempts must be at least 1")
46
+ .max(10, "maxAttempts must be at most 10"),
47
+ delayMs: zod_1.z.number().min(0).max(10000).optional(),
48
+ timeoutMs: zod_1.z
49
+ .number()
50
+ .min(1000, "timeoutMs must be at least 1000 (no real handler answers faster)")
51
+ .max(300000, "timeoutMs must be at most 300000 (five minutes)")
52
+ .optional(),
53
+ });
54
+ exports.CustomButtonActionSchema = zod_1.z.lazy(() => zod_1.z.object({
42
55
  type: zod_1.z.literal("custom"),
43
56
  function: zod_1.z.string().min(1, "function must not be empty"),
44
57
  variables: zod_1.z.array(zod_1.z.string()).optional(),
45
- });
58
+ onResolve: zod_1.z.array(exports.ButtonActionSchema).optional(),
59
+ onError: zod_1.z.array(exports.ButtonActionSchema).optional(),
60
+ retry: exports.CustomActionRetrySchema.optional(),
61
+ }));
46
62
  exports.SetVariableButtonActionSchema = zod_1.z.object({
47
63
  type: zod_1.z.literal("setVariable"),
48
64
  name: zod_1.z.string().min(1, "name must not be empty"),
@@ -59,6 +75,43 @@ exports.PresentPaywallButtonActionSchema = zod_1.z.object({
59
75
  type: zod_1.z.literal("presentPaywall"),
60
76
  placement: zod_1.z.string().min(1, "placement must not be empty"),
61
77
  });
78
+ /**
79
+ * The permissions a `requestPermission` action can ask for.
80
+ *
81
+ * Deliberately narrow, and closed. Every member here is reachable through an
82
+ * **optionally installed** Expo module that the UI package dynamic-`require`s
83
+ * at press time (the `expo-haptics` precedent), so an app that does not need a
84
+ * permission does not carry its native code:
85
+ *
86
+ * | kind | module(s) tried, in order |
87
+ * |---|---|
88
+ * | `notifications` | `expo-notifications` |
89
+ * | `appTrackingTransparency` | `expo-tracking-transparency` (iOS 14+; other platforms report `granted`) |
90
+ * | `locationWhenInUse` | `expo-location` (foreground only — background location needs its own review justification) |
91
+ * | `camera` | `expo-camera` |
92
+ * | `microphone` | `expo-audio`, then `expo-camera` |
93
+ * | `photoLibrary` | `expo-image-picker`, then `expo-media-library` |
94
+ *
95
+ * NOT members, on purpose: **HealthKit** and **Screen Time / Family Controls**.
96
+ * Both need app-owned entitlements and a config plugin neither package ships,
97
+ * so neither can be honestly requested from inside the SDK. They arrive through
98
+ * the host `requestPermission` resolver on the `ScreenHost` (the same seam as
99
+ * `products` / `presentPaywall`) once a `kind` for them is added — a
100
+ * deliberately separate decision, not a silent no-op today.
101
+ *
102
+ * READING a permission's current status is not here either: this is a press
103
+ * action, and "skip the screen when already granted" is a variable-bag
104
+ * capability with nowhere to live in this shape. Tracked separately.
105
+ */
106
+ exports.PERMISSION_KINDS = [
107
+ "notifications",
108
+ "appTrackingTransparency",
109
+ "locationWhenInUse",
110
+ "camera",
111
+ "microphone",
112
+ "photoLibrary",
113
+ ];
114
+ exports.PermissionKindSchema = zod_1.z.enum(exports.PERMISSION_KINDS);
62
115
  exports.PurchaseButtonActionSchema = zod_1.z.lazy(() => zod_1.z.object({
63
116
  type: zod_1.z.literal("purchase"),
64
117
  product: zod_1.z.string().min(1, "product must not be empty"),
@@ -73,6 +126,13 @@ exports.RestoreButtonActionSchema = zod_1.z.lazy(() => zod_1.z.object({
73
126
  onNothingToRestore: zod_1.z.array(exports.ButtonActionSchema).optional(),
74
127
  onError: zod_1.z.array(exports.ButtonActionSchema).optional(),
75
128
  }));
129
+ exports.RequestPermissionButtonActionSchema = zod_1.z.lazy(() => zod_1.z.object({
130
+ type: zod_1.z.literal("requestPermission"),
131
+ kind: exports.PermissionKindSchema,
132
+ onGranted: zod_1.z.array(exports.ButtonActionSchema).optional(),
133
+ onDenied: zod_1.z.array(exports.ButtonActionSchema).optional(),
134
+ onUnavailable: zod_1.z.array(exports.ButtonActionSchema).optional(),
135
+ }));
76
136
  exports.ButtonActionSchema = zod_1.z.lazy(() => zod_1.z.union([
77
137
  zod_1.z.literal("continue"),
78
138
  exports.CustomButtonActionSchema,
@@ -81,6 +141,7 @@ exports.ButtonActionSchema = zod_1.z.lazy(() => zod_1.z.union([
81
141
  exports.RestoreButtonActionSchema,
82
142
  exports.DismissButtonActionSchema,
83
143
  exports.PresentPaywallButtonActionSchema,
144
+ exports.RequestPermissionButtonActionSchema,
84
145
  ]));
85
146
  // ── Branching / nextStep schemas ─────────────────────────────────────────────
86
147
  exports.ConditionOperatorSchema = zod_1.z.enum([
@@ -1 +1 @@
1
- {"version":3,"file":"common.types.js","sourceRoot":"","sources":["../../src/steps/common.types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;AAE9D,QAAA,iBAAiB,GAAG,OAAC,CAAC,KAAK,CAAC;IACvC,OAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7F,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;KACxB,CAAC;IACF,OAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7F,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;KAChB,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,OA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"version": "1.76.0",
4
4
  "description": "Headless React Native SDK for Rocapine Onboarding Studio - Data fetching, state management, and hooks",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,59 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { readFileSync } from "node:fs";
3
+ import { join } from "node:path";
4
+ import { actionsCanComplete, hasCompletingAction } from "../screens/completingActions";
5
+
6
+ // The authoring surfaces are prose, so nothing type-checks the payloads they
7
+ // teach against the runtime that reads them — and a `custom` CTA is exactly
8
+ // where that costs something. Reads the docs off disk, the same technique as
9
+ // `unknownElementTypes.test.ts` and `actionSchemaMirror.test.ts` (review round
10
+ // 2 of !263, finding 4).
11
+
12
+ const ROOT = join(__dirname, "../../../..");
13
+ const read = (rel: string): string => readFileSync(join(ROOT, rel), "utf8");
14
+
15
+ /** The fenced code block that contains `marker`, parsed as JSON. */
16
+ const jsonBlockAround = (src: string, rel: string, marker: string): unknown => {
17
+ const at = src.indexOf(marker);
18
+ expect(at, `${rel} no longer mentions ${marker}`).toBeGreaterThan(-1);
19
+ const fence = src.lastIndexOf("```", at);
20
+ const body = src.indexOf("\n", fence) + 1;
21
+ return JSON.parse(src.slice(body, src.indexOf("```", body)));
22
+ };
23
+
24
+ /** The inline `` `actions: [...]` `` span that contains `marker`, parsed as JSON. */
25
+ const inlineActionsAround = (src: string, rel: string, marker: string): unknown => {
26
+ const at = src.indexOf(marker);
27
+ expect(at, `${rel} no longer mentions ${marker}`).toBeGreaterThan(-1);
28
+ const span = src.slice(src.lastIndexOf("`", at) + 1, src.indexOf("`", at));
29
+ return JSON.parse(span.replace(/^actions:\s*/, ""));
30
+ };
31
+
32
+ /**
33
+ * A `custom` action is a way off the screen only when BOTH of its paths reach
34
+ * one — `onResolve ∪ rest` and `onError ∪ rest` (`completingActions.ts`). A doc
35
+ * that teaches a shape failing that test is teaching a screen nobody can leave,
36
+ * and — once anything else on it is stripped by the #209 boundary — one the
37
+ * renderer bolts a second Continue button onto.
38
+ */
39
+ describe("authoring docs — the `custom` CTAs they teach can be left", () => {
40
+ it("credits the Tier 2 canonical button, which trails its custom with a continue", () => {
41
+ const rel = "claude-plugin/skills/customize-onboarding-components/SKILL.md";
42
+ const element = jsonBlockAround(read(rel), rel, "trackOnboardingComplete");
43
+ // `[{custom}, "continue"]`: the trailing escape runs whether the handler
44
+ // resolved or failed, so it satisfies both terms of the conjunction. This
45
+ // half of the finding never reproduced — it was written against the earlier
46
+ // `(onResolve ∪ rest) ∧ onError` reading, before `rest` flowed through both
47
+ // terms — and is pinned here rather than "fixed".
48
+ expect(hasCompletingAction([element])).toBe(true);
49
+ });
50
+
51
+ it("credits the `delayedContinue` loader fallback", () => {
52
+ const rel = "claude-plugin/skills/create-step-json/references/composable-archetypes.md";
53
+ const actions = inlineActionsAround(read(rel), rel, "delayedContinue");
54
+ // This one was a bare `[{custom}]` — nothing after the action and neither
55
+ // hook declared, so the press escapes on NO path: the host's timer resolves,
56
+ // the handler's return value is discarded, and the screen never advances.
57
+ expect(actionsCanComplete(actions)).toBe(true);
58
+ });
59
+ });