@wireai/activation 0.12.2 → 0.13.2

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 (55) hide show
  1. package/AGENTS.md +3 -1
  2. package/CHANGELOG.md +259 -1
  3. package/README.md +87 -3
  4. package/dist/analytics/index.d.mts +2 -2
  5. package/dist/analytics/index.d.ts +2 -2
  6. package/dist/analytics/index.js +174 -36
  7. package/dist/analytics/index.js.map +1 -1
  8. package/dist/analytics/index.mjs +174 -37
  9. package/dist/analytics/index.mjs.map +1 -1
  10. package/dist/{currentSession-BlCeDP0f.d.mts → currentSession-ClkLjcJ0.d.mts} +456 -19
  11. package/dist/{currentSession-BxEB37xt.d.ts → currentSession-DOVZEWJl.d.ts} +456 -19
  12. package/dist/index.d.mts +197 -16
  13. package/dist/index.d.ts +197 -16
  14. package/dist/index.js +1056 -390
  15. package/dist/index.js.map +1 -1
  16. package/dist/index.mjs +836 -193
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/questionnaire/index.js.map +1 -1
  19. package/dist/questionnaire/index.mjs.map +1 -1
  20. package/dist/reviews/index.js +20 -7
  21. package/dist/reviews/index.js.map +1 -1
  22. package/dist/reviews/index.mjs +20 -7
  23. package/dist/reviews/index.mjs.map +1 -1
  24. package/package.json +1 -1
  25. package/src/OnboardingFlow.tsx +141 -3
  26. package/src/WireOnboarding.tsx +178 -34
  27. package/src/activation/wireActivation.ts +13 -7
  28. package/src/analytics/analyticsEvent.ts +16 -1
  29. package/src/analytics/analyticsFacade.ts +11 -10
  30. package/src/analytics/currentSession.ts +6 -20
  31. package/src/analytics/eventQueue.ts +71 -1
  32. package/src/analytics/index.ts +1 -1
  33. package/src/analytics/reportClientEvent.ts +157 -38
  34. package/src/cards/PermissionCard.tsx +438 -0
  35. package/src/cards/index.ts +7 -0
  36. package/src/config/wireConfigFromEnv.ts +1 -10
  37. package/src/context/deviceId.ts +77 -16
  38. package/src/context/userContext.ts +4 -15
  39. package/src/identity/identityRecord.ts +123 -0
  40. package/src/identity/userIdentity.ts +45 -9
  41. package/src/illustrations/defaultIllustrations.tsx +44 -3
  42. package/src/index.ts +44 -4
  43. package/src/permissions/index.ts +64 -0
  44. package/src/permissions/permissionCopy.ts +87 -0
  45. package/src/permissions/permissionEvents.ts +76 -0
  46. package/src/permissions/permissionMemory.ts +88 -0
  47. package/src/permissions/placement.ts +88 -0
  48. package/src/permissions/types.ts +131 -0
  49. package/src/session/persistedSession.ts +10 -3
  50. package/src/session-analytics/useLifecycleEvents.ts +10 -1
  51. package/src/types.ts +77 -1
  52. package/src/utils/deriveAnswers.ts +6 -2
  53. package/src/utils/readProgress.ts +4 -0
  54. package/src/utils/warnInDev.ts +33 -0
  55. package/src/components/DoneBlock.tsx +0 -37
package/dist/index.d.mts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
- import { H as WireOnboardingProps, I as WireOnboardingConfig, O as OnboardingResult, S as StepValidator, J as OnboardingEvent, K as OnboardingCopy, c as ClientEventTarget, L as DeviceContext, W as WireUserContext, b as ClientEvent, g as EnvelopeSource } from './currentSession-BlCeDP0f.mjs';
4
- export { A as AUTO_DEVICE_ID_PREFIX, a as AnalyticsEvent, C as ClearUserContextOptions, d as ClientEventType, M as DeviceFormFactor, D as DeviceKeyStorage, N as EXTRA_KEY_PREFIX, P as IdentifyOnboardingOptions, Q as OnboardingProgress, T as RESERVED_USER_CONTEXT_KEYS, R as ResolveAutoDeviceKeyOptions, U as ResolveUserContextOptions, V as ResolvedUserContext, X as USER_ID_MAX_LENGTH, i as WIRE_ONBOARDING_EVENTS, j as WireOnboardingEventName, Y as activationJoinContext, k as analyticsUserIdStorageKey, m as clearPiiFromContext, n as clearUserContext, Z as collectDeviceContext, p as deviceIdStorageKey, q as ensureCurrentSessionId, r as getCurrentSessionId, _ as hashEmailFnv1a, $ as hydrateAutoDeviceKey, a0 as identifyOnboarding, a1 as isWireScalar, s as looksLikeEmail, t as makeSessionId, a2 as mintDeviceId, a3 as namespaceExtra, u as reportClientEvent, v as reportClientEventAwait, w as reportClientEvents, x as reportClientEventsAwait, y as resetAutoDeviceKeys, z as resetCurrentSessionId, B as resolveAutoDeviceKey, a4 as resolveUserContext, a5 as sanitizeUserId, F as setCurrentSessionId, G as toAnalyticsEvent } from './currentSession-BlCeDP0f.mjs';
3
+ import { I as WireOnboardingProps, J as WireOnboardingConfig, O as OnboardingResult, K as WirePermissionStatus, P as PermissionStage, L as WirePermissionOutcome, S as StepValidator, M as OnboardingEvent, N as OnboardingCopy, c as ClientEventTarget, Q as DeviceContext, T as PermissionScreenConfig, W as WireUserContext, U as PermissionPlacement, b as ClientEvent, g as EnvelopeSource } from './currentSession-ClkLjcJ0.mjs';
4
+ export { A as AUTO_DEVICE_ID_PREFIX, a as AnalyticsEvent, C as ClearUserContextOptions, d as ClientEventType, V as DEFAULT_PERMISSION_COPY, X as DeviceFormFactor, D as DeviceKeyStorage, Y as EXTRA_KEY_PREFIX, Z as GENERIC_PERMISSION_COPY, _ as IdentifyOnboardingBinding, $ as IdentifyOnboardingOptions, a0 as IdentityRecord, a1 as IdentitySource, a2 as IdentitySpace, a3 as NOTIFICATIONS_PERMISSION_COPY, a4 as OnboardingProgress, a5 as PermissionScreenCopy, R as ResolveAutoDeviceKeyOptions, a6 as ResolveUserContextOptions, a7 as ResolvedUserContext, a8 as USER_ID_MAX_LENGTH, i as WIRE_ONBOARDING_EVENTS, a9 as WIRE_PERMISSION_EVENTS, j as WireOnboardingEventName, aa as WirePermissionEventName, ab as WirePermissionKind, ac as activationJoinContext, k as analyticsUserIdStorageKey, m as clearPiiFromContext, n as clearUserContext, ad as collectDeviceContext, p as deviceIdStorageKey, q as ensureCurrentSessionId, r as getCurrentSessionId, ae as hashEmailFnv1a, af as hostIdentity, ag as hydrateAutoDeviceKey, ah as hydrateDeviceIdentity, ai as identifyOnboarding, aj as isWireScalar, s as looksLikeEmail, t as makeSessionId, ak as mintDeviceId, al as namespaceExtra, am as normalizePermissionStatus, an as permissionEventName, ao as permissionEventProps, u as reportClientEvent, v as reportClientEventAwait, w as reportClientEvents, x as reportClientEventsAwait, y as resetAutoDeviceKeys, z as resetCurrentSessionId, ap as resetIdentityProvenance, F as resolveAutoDeviceKey, aq as resolveIdentity, ar as resolvePermissionCopy, as as resolveUserContext, at as sanitizeUserId, G as setCurrentSessionId, H as toAnalyticsEvent } from './currentSession-ClkLjcJ0.mjs';
5
5
  import { O as OnboardingTheme } from './types-BKfpdZzX.mjs';
6
6
  export { a as OnboardingButtonStyle, b as OnboardingColors, c as OnboardingFonts, d as OnboardingRadius, e as OnboardingSpacing } from './types-BKfpdZzX.mjs';
7
7
  export { C as CenteredModal, a as CenteredModalHandle, b as CenteredModalProps } from './CenteredModal-C3qQBHsA.mjs';
8
- import { WireAIComponent, Message, WireAIResponse } from 'wireai-rn';
8
+ import { WireAIComponent, InjectedProps, Message, WireAIResponse } from 'wireai-rn';
9
9
  import { a as WireFeaturesConfig, W as WireFeatures, b as WireOnboardingStorage } from './types-CKFhyrMu.mjs';
10
10
  export { D as DEFAULT_SESSION_TTL_MS, L as LoadedSession, O as OnboardingMode, c as clearPersistedSession, l as loadPersistedSession, p as peekPersistedSession, s as savePersistedSession, d as sessionStorageKey } from './types-CKFhyrMu.mjs';
11
11
  import { z } from 'zod';
@@ -231,18 +231,6 @@ type ErrorBlockProps = {
231
231
  };
232
232
  declare const ErrorBlock: React__default.NamedExoticComponent<ErrorBlockProps>;
233
233
 
234
- /**
235
- * DoneBlock — a brief themed "all set" state shown when the flow completes, while
236
- * the host persists results and navigates away. Purely cosmetic; the real
237
- * terminal signal is the SDK's StatusCard (handled in OnboardingFlow).
238
- */
239
-
240
- type DoneBlockProps = {
241
- title?: string;
242
- message?: string;
243
- };
244
- declare const DoneBlock: React__default.NamedExoticComponent<DoneBlockProps>;
245
-
246
234
  /**
247
235
  * CompletionView — the terminal "you're all set" screen, shown when the flow
248
236
  * reaches its final StatusCard. It surfaces the backend's recap (what the app
@@ -562,6 +550,96 @@ declare const NumberStepperCard: WireAIComponent;
562
550
 
563
551
  declare const InterstitialCard: WireAIComponent;
564
552
 
553
+ /**
554
+ * PermissionCard - the priming screen that stands in front of an OS permission dialog.
555
+ *
556
+ * THE PRIMING PATTERN, which is the entire point: the OS dialog opens from the primary press
557
+ * handler and from nowhere else. There is no mount effect, no auto-fire, no timer, and no code path
558
+ * from render to `request()`. iOS grants an app exactly ONE native notification prompt for its
559
+ * whole lifetime, so this cheap in-app screen spends first and only forwards the users who said
560
+ * yes. The secondary ("Maybe later") advances the flow with the prompt still unspent.
561
+ *
562
+ * THREE PRIMARY ACTIONS, picked from the non-prompting `getStatus` probe (never from `request`):
563
+ * • ask (the default, and the only branch that can reach `request`)
564
+ * • settings (status `blocked`: the OS would show nothing, so the only route left is Settings)
565
+ * • continue (already granted, or a host that supplied no `request` at all - the kit declines to
566
+ * fabricate a prompt it has no way to open)
567
+ *
568
+ * IT IS NOT A QUESTION. It sends nothing to the backend, appends nothing to the thread, and mints
569
+ * no `key` / `slot_id`, so `deriveAnswers` and every completion semantic are untouched. Every
570
+ * outcome, including a denial, continues the flow.
571
+ *
572
+ * Motion: the same register as the other value beats. The illustration springs in
573
+ * (STATUS_POP_SPRING, the StatusCard glyph pop) and the copy rises behind it on the interstitial
574
+ * head stagger. Reduce motion: final frame at once, like every other card.
575
+ *
576
+ * Registered as a `WireAIComponent` so a later server-emitted placement (AI-chosen timing) renders
577
+ * through the same component with no rewrite. It is deliberately NOT in `onboardingComponents`:
578
+ * that array is what the device ADVERTISES as renderable, and a backend told it may emit this card
579
+ * could emit one for a host that wired no `request`.
580
+ */
581
+
582
+ /** The name the card is registered under, and the `component` stamped on its events. */
583
+ declare const PERMISSION_CARD_NAME = "PermissionCard";
584
+ /**
585
+ * The COPY half of the card, i.e. everything a server could legitimately author. The capability
586
+ * half (`request` / `getStatus` / `openSettings`) is host-injected and deliberately absent here:
587
+ * a schema field can only ever carry data, never a function, and the kit imports no native module.
588
+ */
589
+ declare const schema: z.ZodObject<{
590
+ permission: z.ZodString;
591
+ title: z.ZodString;
592
+ message: z.ZodString;
593
+ primaryLabel: z.ZodString;
594
+ secondaryLabel: z.ZodString;
595
+ blockedTitle: z.ZodOptional<z.ZodString>;
596
+ blockedMessage: z.ZodOptional<z.ZodString>;
597
+ settingsLabel: z.ZodOptional<z.ZodString>;
598
+ continueLabel: z.ZodOptional<z.ZodString>;
599
+ illustration: z.ZodOptional<z.ZodString>;
600
+ }, "strip", z.ZodTypeAny, {
601
+ title: string;
602
+ message: string;
603
+ primaryLabel: string;
604
+ secondaryLabel: string;
605
+ permission: string;
606
+ blockedTitle?: string | undefined;
607
+ blockedMessage?: string | undefined;
608
+ settingsLabel?: string | undefined;
609
+ continueLabel?: string | undefined;
610
+ illustration?: string | undefined;
611
+ }, {
612
+ title: string;
613
+ message: string;
614
+ primaryLabel: string;
615
+ secondaryLabel: string;
616
+ permission: string;
617
+ blockedTitle?: string | undefined;
618
+ blockedMessage?: string | undefined;
619
+ settingsLabel?: string | undefined;
620
+ continueLabel?: string | undefined;
621
+ illustration?: string | undefined;
622
+ }>;
623
+ type PermissionCardProps = z.infer<typeof schema> & Partial<InjectedProps> & {
624
+ /** THE ONLY function that can open an OS dialog. Called from the primary handler alone. */
625
+ request?: () => Promise<WirePermissionStatus>;
626
+ /** NON-PROMPTING status read. Decides which primary action is offered, nothing else. */
627
+ getStatus?: () => Promise<WirePermissionStatus>;
628
+ /** Open the OS settings page. Only reachable on the `blocked` route. */
629
+ openSettings?: () => void | Promise<void>;
630
+ /** Reports each moment for analytics. Never control flow. */
631
+ onStage?: (stage: PermissionStage, status?: WirePermissionStatus) => void;
632
+ /** Fires exactly once, with the outcome this screen produced. The flow advances on it. */
633
+ onSettled?: (outcome: WirePermissionOutcome) => void;
634
+ };
635
+ /** The typed component the flow renders directly (host-injected placement). */
636
+ declare const PermissionCardView: React__default.NamedExoticComponent<PermissionCardProps>;
637
+ /**
638
+ * The SDK registration object, so a server-emitted placement can adopt this exact screen later.
639
+ * Not part of `onboardingComponents` on purpose - see the file header.
640
+ */
641
+ declare const PermissionCard: WireAIComponent;
642
+
565
643
  /**
566
644
  * The shared option shape for the choice cards (SelectionCard, CardGridSelectCard).
567
645
  *
@@ -1132,6 +1210,25 @@ type OnboardingFlowProps = {
1132
1210
  * `started` so host funnels don't double-count the session.
1133
1211
  */
1134
1212
  resumed?: boolean;
1213
+ /**
1214
+ * Host-declared permission screens injected into this server-driven stream. See
1215
+ * `permissions/types.ts`: the OS dialog is only ever reached from the primary tap.
1216
+ */
1217
+ permissionScreens?: PermissionScreenConfig[];
1218
+ /**
1219
+ * Screen ids already settled in THIS session, restored from `storage` by WireOnboarding so an
1220
+ * app kill mid-flow does not re-ask. Empty (the default) means "nothing settled yet".
1221
+ */
1222
+ settledPermissions?: readonly string[];
1223
+ /**
1224
+ * True while that restore is still in flight. Permission screens are suppressed until it lands,
1225
+ * because showing one before the record is read is exactly the re-ask the record prevents. The
1226
+ * read is short (one storage get, timeout-capped) and cannot outlive the first card's round trip
1227
+ * in practice, so this normally never shows up as a delay.
1228
+ */
1229
+ permissionsPending?: boolean;
1230
+ /** Persist one settled screen id (fire-and-forget; WireOnboarding owns the storage). */
1231
+ onPermissionSettled?: (id: string, outcome: WirePermissionOutcome) => void;
1135
1232
  };
1136
1233
  declare const OnboardingFlow: React__default.FC<OnboardingFlowProps>;
1137
1234
 
@@ -1163,6 +1260,8 @@ type PartialProgress = {
1163
1260
  step?: number;
1164
1261
  total?: number;
1165
1262
  key?: string;
1263
+ /** The stable per-slot identity, when the backend sends one. See `OnboardingProgress.slot_id`. */
1264
+ slot_id?: string;
1166
1265
  skippable?: boolean;
1167
1266
  };
1168
1267
  declare const readProgress: (response?: WireAIResponse) => PartialProgress;
@@ -1765,6 +1864,88 @@ interface RevenueCatBridge {
1765
1864
  */
1766
1865
  declare const createRevenueCatBridge: (config: RevenueCatBridgeConfig) => RevenueCatBridge;
1767
1866
 
1867
+ /**
1868
+ * placement - WHERE an injected permission screen lands in a stream nobody knows the length of.
1869
+ *
1870
+ * The card stream is server-driven: the backend decides how many questions this user gets, and the
1871
+ * count differs per user and per run. So a placement is never an index into a known list; it is a
1872
+ * predicate evaluated against the card the flow is ABOUT to render, on every turn.
1873
+ *
1874
+ * THE CLAMP is the whole reason this is a function and not a comparison. `{ afterCard: 4 }` against
1875
+ * a stream that ended after 3 would simply never fire, and "the screen silently never showed" is
1876
+ * the exact failure a host cannot see. So an unreached target degrades to `"beforeEnd"`: the
1877
+ * terminal card is the last position where the screen can still exist, so that is where it goes.
1878
+ *
1879
+ * PURE, no React, no React Native - the placement math is the part worth unit-testing.
1880
+ */
1881
+
1882
+ /** Where a screen sits when the host does not say. High intent, and it can never be clamped away. */
1883
+ declare const DEFAULT_PERMISSION_PLACEMENT: PermissionPlacement;
1884
+ /** The flow position a placement is resolved against. */
1885
+ type FlowPosition = {
1886
+ /** 0-based index of the card about to render. `-1` when no card has arrived yet. */
1887
+ cardIndex: number;
1888
+ /** Whether that card is the terminal recap, i.e. the flow's last screen. */
1889
+ isTerminal: boolean;
1890
+ };
1891
+ /** `afterCard` from a host is arbitrary input: floor it, floor it at 0, and never let NaN through. */
1892
+ declare const normalizeAfterCard: (value: number) => number;
1893
+ /**
1894
+ * Is a screen with this placement due at this position?
1895
+ *
1896
+ * `>=` rather than `===` on purpose: due-ness is re-evaluated every render and a screen is settled
1897
+ * the moment it is answered, so a target the flow has already passed (because a screen ahead of it
1898
+ * in the array was on screen for those turns) still fires instead of being skipped forever.
1899
+ */
1900
+ declare const isPermissionDue: (placement: PermissionPlacement, position: FlowPosition) => boolean;
1901
+ /**
1902
+ * The stable id a screen is remembered by across a resume. Defaults to `<permission>:<index>`,
1903
+ * which is right until the array is reordered - hence the documented `id` escape hatch.
1904
+ */
1905
+ declare const permissionScreenId: (screen: PermissionScreenConfig, index: number) => string;
1906
+ /** A due screen and the id it is remembered by. */
1907
+ type DuePermissionScreen = {
1908
+ screen: PermissionScreenConfig;
1909
+ id: string;
1910
+ };
1911
+ /**
1912
+ * The FIRST configured screen that is due here and has not already been settled in this session.
1913
+ * One at a time, in array order, so two screens due at the same position queue rather than collide.
1914
+ */
1915
+ declare const selectDuePermissionScreen: (screens: readonly PermissionScreenConfig[] | undefined, settled: readonly string[], position: FlowPosition) => DuePermissionScreen | undefined;
1916
+
1917
+ /**
1918
+ * permissionMemory - "shown exactly once per session", kept true across an app kill.
1919
+ *
1920
+ * The in-memory guard alone is not enough. The kit already resumes a killed onboarding into the
1921
+ * SAME backend session (see `persistedSession.ts`), so without a persisted record the resumed mount
1922
+ * would re-show a permission screen the user had already answered - and on the ask path that means
1923
+ * a second dialog attempt against an OS that grants exactly one.
1924
+ *
1925
+ * The record is SCOPED TO THE SESSION ID, one entry, never a growing map: a record whose
1926
+ * `sessionId` is not the session being resumed is stale by definition and reads as empty. That is
1927
+ * also what makes a genuinely new onboarding start clean without anything having to expire it.
1928
+ *
1929
+ * Same host-injected `WireOnboardingStorage` and the same best-effort discipline as the session
1930
+ * seed: reads race the shared ceiling and degrade to "nothing remembered", writes swallow every
1931
+ * error. A broken storage adapter must never gate or break onboarding.
1932
+ */
1933
+
1934
+ /** Storage key for an app's settled permission screens, e.g. `wireai:permissions:acme`. */
1935
+ declare const permissionStorageKey: (appId: string) => string;
1936
+ /**
1937
+ * PURE seam: which screen ids a stored blob contributes to THIS session. A corrupt entry, a
1938
+ * malformed shape, or a record belonging to a different session all read as "nothing remembered",
1939
+ * because re-showing a screen is a far cheaper failure than trusting another session's answers.
1940
+ */
1941
+ declare const readSettledPermissions: (raw: string | null | undefined, sessionId: string) => string[];
1942
+ /** Read the settled ids for `sessionId`. Never throws, never hangs past the shared read ceiling. */
1943
+ declare const loadSettledPermissions: (storage: WireOnboardingStorage, key: string, sessionId: string) => Promise<string[]>;
1944
+ /** Persist the settled ids for `sessionId` - fire-and-forget, all errors swallowed. */
1945
+ declare const saveSettledPermissions: (storage: WireOnboardingStorage, key: string, sessionId: string, ids: readonly string[]) => void;
1946
+ /** Drop the record (fired alongside the session seed on completion) - fire-and-forget. */
1947
+ declare const clearSettledPermissions: (storage: WireOnboardingStorage, key: string) => void;
1948
+
1768
1949
  /** The canonical event name for an app-open. A trigger keys off this exact string. */
1769
1950
  declare const SESSION_STARTED_EVENT: "app.session_started";
1770
1951
  /** Options for {@link reportSessionStart}. Everything except `target` is optional so a pre-auth
@@ -1996,4 +2177,4 @@ interface UseLifecycleEventsOptions {
1996
2177
  */
1997
2178
  declare const useLifecycleEvents: (config: LifecycleConfig | undefined, options?: UseLifecycleEventsOptions) => void;
1998
2179
 
1999
- export { AnimatedSparkle, BACKGROUND_SESSION_MS, type CachedFeatures, CardGridSelectCard, CardHandoff, type CardHandoffProps, type CardHandoffVariant, type CardOption, ChipSelectCard, ClientEvent, ClientEventTarget, CompletionView, DEFAULT_FEATURES_TTL_MS, DemoOnboarding, type DemoOnboardingProps, DeviceContext, DoneBlock, ErrorBlock, FIRST_OPEN_EVENT, IconRegistryProvider, IllustrationProvider, type IllustrationRegistry, InterstitialCard, type LifecycleConfig, type LifecycleEventInput, LoadingBlock, LoadingScreen, NumberStepperCard, type OnboardingAttribution, Button as OnboardingButton, OnboardingCopy, OnboardingEvent, type OnboardingFlagOptions, OnboardingFlow, OnboardingResult, OnboardingScaffold, OnboardingTheme, OnboardingThemeProvider, PLAN_TIER_CONTEXT_KEY, type PlanTier, type PurchaseProps, type ReportFirstOpenOptions, type ReportSessionStartOptions, type ResolveFeaturesOptions, type RevenueCatBridge, type RevenueCatBridgeConfig, type RevenueCatCustomerInfoLike, type RevenueCatEntitlementLike, type RevenueCatErrorLike, type RevenueCatOfferingLike, type RevenueCatPackageLike, type RevenueCatProductLike, type RevenueCatSink, SESSION_STARTED_EVENT, SelectionCard, type SessionStartConfig, StatusCard, StepProgress, StepValidator, TextInputCard, type ThemeFromBrandInput, type UseLifecycleEventsOptions, type UseSessionStartOptions, type UseWireActivation, WIRE_ENV_VARS, WIRE_ICON_GLYPHS, WIRE_ICON_NAMES, WIRE_PURCHASE_EVENTS, type WireActivation, type WireActivationConfig, type WireConfigOverrides, WireFeatures, WireFeaturesConfig, WireFeaturesProvider, type WireFeaturesProviderProps, WireIcon, type WireIconFamily, type WireIconGlyph, type WireIconName, type WireIconProps, type WireIconRegistry, type WireLifecycleOptions, WireOnboarding, WireOnboardingConfig, WireOnboardingProps, WireOnboardingStorage, type WirePurchaseEventName, WireUserContext, activeEntitlement, attributionMetadata, bumpActivationRevalidation, createRevenueCatBridge, createWireActivation, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, describeEntitlement, describeFailure, describePackage, detectAppVersion, detectNativeModel, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, getActivationRevalidationVersion, isFeaturesFresh, isOnboardingEnabled, isUserCancelled, lookupIconGlyph, mergeTheme, motionSpec, onboardingComponents, parseWireFeatures, readCachedFeatures, readProgress, reportFirstOpen, reportSessionStart, resetActivationRevalidation, resetFirstOpenLatch, resetSessionStartGuard, resolvePlanTier, subscribeActivationRevalidation, themeFromBrand, useActivationRevalidation, useHostIcon, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireActivation, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };
2180
+ export { AnimatedSparkle, BACKGROUND_SESSION_MS, type CachedFeatures, CardGridSelectCard, CardHandoff, type CardHandoffProps, type CardHandoffVariant, type CardOption, ChipSelectCard, ClientEvent, ClientEventTarget, CompletionView, DEFAULT_FEATURES_TTL_MS, DEFAULT_PERMISSION_PLACEMENT, DemoOnboarding, type DemoOnboardingProps, DeviceContext, type DuePermissionScreen, ErrorBlock, FIRST_OPEN_EVENT, type FlowPosition, IconRegistryProvider, IllustrationProvider, type IllustrationRegistry, InterstitialCard, type LifecycleConfig, type LifecycleEventInput, LoadingBlock, LoadingScreen, NumberStepperCard, type OnboardingAttribution, Button as OnboardingButton, OnboardingCopy, OnboardingEvent, type OnboardingFlagOptions, OnboardingFlow, OnboardingResult, OnboardingScaffold, OnboardingTheme, OnboardingThemeProvider, PERMISSION_CARD_NAME, PLAN_TIER_CONTEXT_KEY, PermissionCard, type PermissionCardProps, PermissionCardView, PermissionPlacement, PermissionScreenConfig, PermissionStage, type PlanTier, type PurchaseProps, type ReportFirstOpenOptions, type ReportSessionStartOptions, type ResolveFeaturesOptions, type RevenueCatBridge, type RevenueCatBridgeConfig, type RevenueCatCustomerInfoLike, type RevenueCatEntitlementLike, type RevenueCatErrorLike, type RevenueCatOfferingLike, type RevenueCatPackageLike, type RevenueCatProductLike, type RevenueCatSink, SESSION_STARTED_EVENT, SelectionCard, type SessionStartConfig, StatusCard, StepProgress, StepValidator, TextInputCard, type ThemeFromBrandInput, type UseLifecycleEventsOptions, type UseSessionStartOptions, type UseWireActivation, WIRE_ENV_VARS, WIRE_ICON_GLYPHS, WIRE_ICON_NAMES, WIRE_PURCHASE_EVENTS, type WireActivation, type WireActivationConfig, type WireConfigOverrides, WireFeatures, WireFeaturesConfig, WireFeaturesProvider, type WireFeaturesProviderProps, WireIcon, type WireIconFamily, type WireIconGlyph, type WireIconName, type WireIconProps, type WireIconRegistry, type WireLifecycleOptions, WireOnboarding, WireOnboardingConfig, WireOnboardingProps, WireOnboardingStorage, WirePermissionOutcome, WirePermissionStatus, type WirePurchaseEventName, WireUserContext, activeEntitlement, attributionMetadata, bumpActivationRevalidation, clearSettledPermissions, createRevenueCatBridge, createWireActivation, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, describeEntitlement, describeFailure, describePackage, detectAppVersion, detectNativeModel, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, getActivationRevalidationVersion, isFeaturesFresh, isOnboardingEnabled, isPermissionDue, isUserCancelled, loadSettledPermissions, lookupIconGlyph, mergeTheme, motionSpec, normalizeAfterCard, onboardingComponents, parseWireFeatures, permissionScreenId, permissionStorageKey, readCachedFeatures, readProgress, readSettledPermissions, reportFirstOpen, reportSessionStart, resetActivationRevalidation, resetFirstOpenLatch, resetSessionStartGuard, resolvePlanTier, saveSettledPermissions, selectDuePermissionScreen, subscribeActivationRevalidation, themeFromBrand, useActivationRevalidation, useHostIcon, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireActivation, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
- import { H as WireOnboardingProps, I as WireOnboardingConfig, O as OnboardingResult, S as StepValidator, J as OnboardingEvent, K as OnboardingCopy, c as ClientEventTarget, L as DeviceContext, W as WireUserContext, b as ClientEvent, g as EnvelopeSource } from './currentSession-BxEB37xt.js';
4
- export { A as AUTO_DEVICE_ID_PREFIX, a as AnalyticsEvent, C as ClearUserContextOptions, d as ClientEventType, M as DeviceFormFactor, D as DeviceKeyStorage, N as EXTRA_KEY_PREFIX, P as IdentifyOnboardingOptions, Q as OnboardingProgress, T as RESERVED_USER_CONTEXT_KEYS, R as ResolveAutoDeviceKeyOptions, U as ResolveUserContextOptions, V as ResolvedUserContext, X as USER_ID_MAX_LENGTH, i as WIRE_ONBOARDING_EVENTS, j as WireOnboardingEventName, Y as activationJoinContext, k as analyticsUserIdStorageKey, m as clearPiiFromContext, n as clearUserContext, Z as collectDeviceContext, p as deviceIdStorageKey, q as ensureCurrentSessionId, r as getCurrentSessionId, _ as hashEmailFnv1a, $ as hydrateAutoDeviceKey, a0 as identifyOnboarding, a1 as isWireScalar, s as looksLikeEmail, t as makeSessionId, a2 as mintDeviceId, a3 as namespaceExtra, u as reportClientEvent, v as reportClientEventAwait, w as reportClientEvents, x as reportClientEventsAwait, y as resetAutoDeviceKeys, z as resetCurrentSessionId, B as resolveAutoDeviceKey, a4 as resolveUserContext, a5 as sanitizeUserId, F as setCurrentSessionId, G as toAnalyticsEvent } from './currentSession-BxEB37xt.js';
3
+ import { I as WireOnboardingProps, J as WireOnboardingConfig, O as OnboardingResult, K as WirePermissionStatus, P as PermissionStage, L as WirePermissionOutcome, S as StepValidator, M as OnboardingEvent, N as OnboardingCopy, c as ClientEventTarget, Q as DeviceContext, T as PermissionScreenConfig, W as WireUserContext, U as PermissionPlacement, b as ClientEvent, g as EnvelopeSource } from './currentSession-DOVZEWJl.js';
4
+ export { A as AUTO_DEVICE_ID_PREFIX, a as AnalyticsEvent, C as ClearUserContextOptions, d as ClientEventType, V as DEFAULT_PERMISSION_COPY, X as DeviceFormFactor, D as DeviceKeyStorage, Y as EXTRA_KEY_PREFIX, Z as GENERIC_PERMISSION_COPY, _ as IdentifyOnboardingBinding, $ as IdentifyOnboardingOptions, a0 as IdentityRecord, a1 as IdentitySource, a2 as IdentitySpace, a3 as NOTIFICATIONS_PERMISSION_COPY, a4 as OnboardingProgress, a5 as PermissionScreenCopy, R as ResolveAutoDeviceKeyOptions, a6 as ResolveUserContextOptions, a7 as ResolvedUserContext, a8 as USER_ID_MAX_LENGTH, i as WIRE_ONBOARDING_EVENTS, a9 as WIRE_PERMISSION_EVENTS, j as WireOnboardingEventName, aa as WirePermissionEventName, ab as WirePermissionKind, ac as activationJoinContext, k as analyticsUserIdStorageKey, m as clearPiiFromContext, n as clearUserContext, ad as collectDeviceContext, p as deviceIdStorageKey, q as ensureCurrentSessionId, r as getCurrentSessionId, ae as hashEmailFnv1a, af as hostIdentity, ag as hydrateAutoDeviceKey, ah as hydrateDeviceIdentity, ai as identifyOnboarding, aj as isWireScalar, s as looksLikeEmail, t as makeSessionId, ak as mintDeviceId, al as namespaceExtra, am as normalizePermissionStatus, an as permissionEventName, ao as permissionEventProps, u as reportClientEvent, v as reportClientEventAwait, w as reportClientEvents, x as reportClientEventsAwait, y as resetAutoDeviceKeys, z as resetCurrentSessionId, ap as resetIdentityProvenance, F as resolveAutoDeviceKey, aq as resolveIdentity, ar as resolvePermissionCopy, as as resolveUserContext, at as sanitizeUserId, G as setCurrentSessionId, H as toAnalyticsEvent } from './currentSession-DOVZEWJl.js';
5
5
  import { O as OnboardingTheme } from './types-BKfpdZzX.js';
6
6
  export { a as OnboardingButtonStyle, b as OnboardingColors, c as OnboardingFonts, d as OnboardingRadius, e as OnboardingSpacing } from './types-BKfpdZzX.js';
7
7
  export { C as CenteredModal, a as CenteredModalHandle, b as CenteredModalProps } from './CenteredModal-Cdgns6--.js';
8
- import { WireAIComponent, Message, WireAIResponse } from 'wireai-rn';
8
+ import { WireAIComponent, InjectedProps, Message, WireAIResponse } from 'wireai-rn';
9
9
  import { a as WireFeaturesConfig, W as WireFeatures, b as WireOnboardingStorage } from './types-CKFhyrMu.js';
10
10
  export { D as DEFAULT_SESSION_TTL_MS, L as LoadedSession, O as OnboardingMode, c as clearPersistedSession, l as loadPersistedSession, p as peekPersistedSession, s as savePersistedSession, d as sessionStorageKey } from './types-CKFhyrMu.js';
11
11
  import { z } from 'zod';
@@ -231,18 +231,6 @@ type ErrorBlockProps = {
231
231
  };
232
232
  declare const ErrorBlock: React__default.NamedExoticComponent<ErrorBlockProps>;
233
233
 
234
- /**
235
- * DoneBlock — a brief themed "all set" state shown when the flow completes, while
236
- * the host persists results and navigates away. Purely cosmetic; the real
237
- * terminal signal is the SDK's StatusCard (handled in OnboardingFlow).
238
- */
239
-
240
- type DoneBlockProps = {
241
- title?: string;
242
- message?: string;
243
- };
244
- declare const DoneBlock: React__default.NamedExoticComponent<DoneBlockProps>;
245
-
246
234
  /**
247
235
  * CompletionView — the terminal "you're all set" screen, shown when the flow
248
236
  * reaches its final StatusCard. It surfaces the backend's recap (what the app
@@ -562,6 +550,96 @@ declare const NumberStepperCard: WireAIComponent;
562
550
 
563
551
  declare const InterstitialCard: WireAIComponent;
564
552
 
553
+ /**
554
+ * PermissionCard - the priming screen that stands in front of an OS permission dialog.
555
+ *
556
+ * THE PRIMING PATTERN, which is the entire point: the OS dialog opens from the primary press
557
+ * handler and from nowhere else. There is no mount effect, no auto-fire, no timer, and no code path
558
+ * from render to `request()`. iOS grants an app exactly ONE native notification prompt for its
559
+ * whole lifetime, so this cheap in-app screen spends first and only forwards the users who said
560
+ * yes. The secondary ("Maybe later") advances the flow with the prompt still unspent.
561
+ *
562
+ * THREE PRIMARY ACTIONS, picked from the non-prompting `getStatus` probe (never from `request`):
563
+ * • ask (the default, and the only branch that can reach `request`)
564
+ * • settings (status `blocked`: the OS would show nothing, so the only route left is Settings)
565
+ * • continue (already granted, or a host that supplied no `request` at all - the kit declines to
566
+ * fabricate a prompt it has no way to open)
567
+ *
568
+ * IT IS NOT A QUESTION. It sends nothing to the backend, appends nothing to the thread, and mints
569
+ * no `key` / `slot_id`, so `deriveAnswers` and every completion semantic are untouched. Every
570
+ * outcome, including a denial, continues the flow.
571
+ *
572
+ * Motion: the same register as the other value beats. The illustration springs in
573
+ * (STATUS_POP_SPRING, the StatusCard glyph pop) and the copy rises behind it on the interstitial
574
+ * head stagger. Reduce motion: final frame at once, like every other card.
575
+ *
576
+ * Registered as a `WireAIComponent` so a later server-emitted placement (AI-chosen timing) renders
577
+ * through the same component with no rewrite. It is deliberately NOT in `onboardingComponents`:
578
+ * that array is what the device ADVERTISES as renderable, and a backend told it may emit this card
579
+ * could emit one for a host that wired no `request`.
580
+ */
581
+
582
+ /** The name the card is registered under, and the `component` stamped on its events. */
583
+ declare const PERMISSION_CARD_NAME = "PermissionCard";
584
+ /**
585
+ * The COPY half of the card, i.e. everything a server could legitimately author. The capability
586
+ * half (`request` / `getStatus` / `openSettings`) is host-injected and deliberately absent here:
587
+ * a schema field can only ever carry data, never a function, and the kit imports no native module.
588
+ */
589
+ declare const schema: z.ZodObject<{
590
+ permission: z.ZodString;
591
+ title: z.ZodString;
592
+ message: z.ZodString;
593
+ primaryLabel: z.ZodString;
594
+ secondaryLabel: z.ZodString;
595
+ blockedTitle: z.ZodOptional<z.ZodString>;
596
+ blockedMessage: z.ZodOptional<z.ZodString>;
597
+ settingsLabel: z.ZodOptional<z.ZodString>;
598
+ continueLabel: z.ZodOptional<z.ZodString>;
599
+ illustration: z.ZodOptional<z.ZodString>;
600
+ }, "strip", z.ZodTypeAny, {
601
+ title: string;
602
+ message: string;
603
+ primaryLabel: string;
604
+ secondaryLabel: string;
605
+ permission: string;
606
+ blockedTitle?: string | undefined;
607
+ blockedMessage?: string | undefined;
608
+ settingsLabel?: string | undefined;
609
+ continueLabel?: string | undefined;
610
+ illustration?: string | undefined;
611
+ }, {
612
+ title: string;
613
+ message: string;
614
+ primaryLabel: string;
615
+ secondaryLabel: string;
616
+ permission: string;
617
+ blockedTitle?: string | undefined;
618
+ blockedMessage?: string | undefined;
619
+ settingsLabel?: string | undefined;
620
+ continueLabel?: string | undefined;
621
+ illustration?: string | undefined;
622
+ }>;
623
+ type PermissionCardProps = z.infer<typeof schema> & Partial<InjectedProps> & {
624
+ /** THE ONLY function that can open an OS dialog. Called from the primary handler alone. */
625
+ request?: () => Promise<WirePermissionStatus>;
626
+ /** NON-PROMPTING status read. Decides which primary action is offered, nothing else. */
627
+ getStatus?: () => Promise<WirePermissionStatus>;
628
+ /** Open the OS settings page. Only reachable on the `blocked` route. */
629
+ openSettings?: () => void | Promise<void>;
630
+ /** Reports each moment for analytics. Never control flow. */
631
+ onStage?: (stage: PermissionStage, status?: WirePermissionStatus) => void;
632
+ /** Fires exactly once, with the outcome this screen produced. The flow advances on it. */
633
+ onSettled?: (outcome: WirePermissionOutcome) => void;
634
+ };
635
+ /** The typed component the flow renders directly (host-injected placement). */
636
+ declare const PermissionCardView: React__default.NamedExoticComponent<PermissionCardProps>;
637
+ /**
638
+ * The SDK registration object, so a server-emitted placement can adopt this exact screen later.
639
+ * Not part of `onboardingComponents` on purpose - see the file header.
640
+ */
641
+ declare const PermissionCard: WireAIComponent;
642
+
565
643
  /**
566
644
  * The shared option shape for the choice cards (SelectionCard, CardGridSelectCard).
567
645
  *
@@ -1132,6 +1210,25 @@ type OnboardingFlowProps = {
1132
1210
  * `started` so host funnels don't double-count the session.
1133
1211
  */
1134
1212
  resumed?: boolean;
1213
+ /**
1214
+ * Host-declared permission screens injected into this server-driven stream. See
1215
+ * `permissions/types.ts`: the OS dialog is only ever reached from the primary tap.
1216
+ */
1217
+ permissionScreens?: PermissionScreenConfig[];
1218
+ /**
1219
+ * Screen ids already settled in THIS session, restored from `storage` by WireOnboarding so an
1220
+ * app kill mid-flow does not re-ask. Empty (the default) means "nothing settled yet".
1221
+ */
1222
+ settledPermissions?: readonly string[];
1223
+ /**
1224
+ * True while that restore is still in flight. Permission screens are suppressed until it lands,
1225
+ * because showing one before the record is read is exactly the re-ask the record prevents. The
1226
+ * read is short (one storage get, timeout-capped) and cannot outlive the first card's round trip
1227
+ * in practice, so this normally never shows up as a delay.
1228
+ */
1229
+ permissionsPending?: boolean;
1230
+ /** Persist one settled screen id (fire-and-forget; WireOnboarding owns the storage). */
1231
+ onPermissionSettled?: (id: string, outcome: WirePermissionOutcome) => void;
1135
1232
  };
1136
1233
  declare const OnboardingFlow: React__default.FC<OnboardingFlowProps>;
1137
1234
 
@@ -1163,6 +1260,8 @@ type PartialProgress = {
1163
1260
  step?: number;
1164
1261
  total?: number;
1165
1262
  key?: string;
1263
+ /** The stable per-slot identity, when the backend sends one. See `OnboardingProgress.slot_id`. */
1264
+ slot_id?: string;
1166
1265
  skippable?: boolean;
1167
1266
  };
1168
1267
  declare const readProgress: (response?: WireAIResponse) => PartialProgress;
@@ -1765,6 +1864,88 @@ interface RevenueCatBridge {
1765
1864
  */
1766
1865
  declare const createRevenueCatBridge: (config: RevenueCatBridgeConfig) => RevenueCatBridge;
1767
1866
 
1867
+ /**
1868
+ * placement - WHERE an injected permission screen lands in a stream nobody knows the length of.
1869
+ *
1870
+ * The card stream is server-driven: the backend decides how many questions this user gets, and the
1871
+ * count differs per user and per run. So a placement is never an index into a known list; it is a
1872
+ * predicate evaluated against the card the flow is ABOUT to render, on every turn.
1873
+ *
1874
+ * THE CLAMP is the whole reason this is a function and not a comparison. `{ afterCard: 4 }` against
1875
+ * a stream that ended after 3 would simply never fire, and "the screen silently never showed" is
1876
+ * the exact failure a host cannot see. So an unreached target degrades to `"beforeEnd"`: the
1877
+ * terminal card is the last position where the screen can still exist, so that is where it goes.
1878
+ *
1879
+ * PURE, no React, no React Native - the placement math is the part worth unit-testing.
1880
+ */
1881
+
1882
+ /** Where a screen sits when the host does not say. High intent, and it can never be clamped away. */
1883
+ declare const DEFAULT_PERMISSION_PLACEMENT: PermissionPlacement;
1884
+ /** The flow position a placement is resolved against. */
1885
+ type FlowPosition = {
1886
+ /** 0-based index of the card about to render. `-1` when no card has arrived yet. */
1887
+ cardIndex: number;
1888
+ /** Whether that card is the terminal recap, i.e. the flow's last screen. */
1889
+ isTerminal: boolean;
1890
+ };
1891
+ /** `afterCard` from a host is arbitrary input: floor it, floor it at 0, and never let NaN through. */
1892
+ declare const normalizeAfterCard: (value: number) => number;
1893
+ /**
1894
+ * Is a screen with this placement due at this position?
1895
+ *
1896
+ * `>=` rather than `===` on purpose: due-ness is re-evaluated every render and a screen is settled
1897
+ * the moment it is answered, so a target the flow has already passed (because a screen ahead of it
1898
+ * in the array was on screen for those turns) still fires instead of being skipped forever.
1899
+ */
1900
+ declare const isPermissionDue: (placement: PermissionPlacement, position: FlowPosition) => boolean;
1901
+ /**
1902
+ * The stable id a screen is remembered by across a resume. Defaults to `<permission>:<index>`,
1903
+ * which is right until the array is reordered - hence the documented `id` escape hatch.
1904
+ */
1905
+ declare const permissionScreenId: (screen: PermissionScreenConfig, index: number) => string;
1906
+ /** A due screen and the id it is remembered by. */
1907
+ type DuePermissionScreen = {
1908
+ screen: PermissionScreenConfig;
1909
+ id: string;
1910
+ };
1911
+ /**
1912
+ * The FIRST configured screen that is due here and has not already been settled in this session.
1913
+ * One at a time, in array order, so two screens due at the same position queue rather than collide.
1914
+ */
1915
+ declare const selectDuePermissionScreen: (screens: readonly PermissionScreenConfig[] | undefined, settled: readonly string[], position: FlowPosition) => DuePermissionScreen | undefined;
1916
+
1917
+ /**
1918
+ * permissionMemory - "shown exactly once per session", kept true across an app kill.
1919
+ *
1920
+ * The in-memory guard alone is not enough. The kit already resumes a killed onboarding into the
1921
+ * SAME backend session (see `persistedSession.ts`), so without a persisted record the resumed mount
1922
+ * would re-show a permission screen the user had already answered - and on the ask path that means
1923
+ * a second dialog attempt against an OS that grants exactly one.
1924
+ *
1925
+ * The record is SCOPED TO THE SESSION ID, one entry, never a growing map: a record whose
1926
+ * `sessionId` is not the session being resumed is stale by definition and reads as empty. That is
1927
+ * also what makes a genuinely new onboarding start clean without anything having to expire it.
1928
+ *
1929
+ * Same host-injected `WireOnboardingStorage` and the same best-effort discipline as the session
1930
+ * seed: reads race the shared ceiling and degrade to "nothing remembered", writes swallow every
1931
+ * error. A broken storage adapter must never gate or break onboarding.
1932
+ */
1933
+
1934
+ /** Storage key for an app's settled permission screens, e.g. `wireai:permissions:acme`. */
1935
+ declare const permissionStorageKey: (appId: string) => string;
1936
+ /**
1937
+ * PURE seam: which screen ids a stored blob contributes to THIS session. A corrupt entry, a
1938
+ * malformed shape, or a record belonging to a different session all read as "nothing remembered",
1939
+ * because re-showing a screen is a far cheaper failure than trusting another session's answers.
1940
+ */
1941
+ declare const readSettledPermissions: (raw: string | null | undefined, sessionId: string) => string[];
1942
+ /** Read the settled ids for `sessionId`. Never throws, never hangs past the shared read ceiling. */
1943
+ declare const loadSettledPermissions: (storage: WireOnboardingStorage, key: string, sessionId: string) => Promise<string[]>;
1944
+ /** Persist the settled ids for `sessionId` - fire-and-forget, all errors swallowed. */
1945
+ declare const saveSettledPermissions: (storage: WireOnboardingStorage, key: string, sessionId: string, ids: readonly string[]) => void;
1946
+ /** Drop the record (fired alongside the session seed on completion) - fire-and-forget. */
1947
+ declare const clearSettledPermissions: (storage: WireOnboardingStorage, key: string) => void;
1948
+
1768
1949
  /** The canonical event name for an app-open. A trigger keys off this exact string. */
1769
1950
  declare const SESSION_STARTED_EVENT: "app.session_started";
1770
1951
  /** Options for {@link reportSessionStart}. Everything except `target` is optional so a pre-auth
@@ -1996,4 +2177,4 @@ interface UseLifecycleEventsOptions {
1996
2177
  */
1997
2178
  declare const useLifecycleEvents: (config: LifecycleConfig | undefined, options?: UseLifecycleEventsOptions) => void;
1998
2179
 
1999
- export { AnimatedSparkle, BACKGROUND_SESSION_MS, type CachedFeatures, CardGridSelectCard, CardHandoff, type CardHandoffProps, type CardHandoffVariant, type CardOption, ChipSelectCard, ClientEvent, ClientEventTarget, CompletionView, DEFAULT_FEATURES_TTL_MS, DemoOnboarding, type DemoOnboardingProps, DeviceContext, DoneBlock, ErrorBlock, FIRST_OPEN_EVENT, IconRegistryProvider, IllustrationProvider, type IllustrationRegistry, InterstitialCard, type LifecycleConfig, type LifecycleEventInput, LoadingBlock, LoadingScreen, NumberStepperCard, type OnboardingAttribution, Button as OnboardingButton, OnboardingCopy, OnboardingEvent, type OnboardingFlagOptions, OnboardingFlow, OnboardingResult, OnboardingScaffold, OnboardingTheme, OnboardingThemeProvider, PLAN_TIER_CONTEXT_KEY, type PlanTier, type PurchaseProps, type ReportFirstOpenOptions, type ReportSessionStartOptions, type ResolveFeaturesOptions, type RevenueCatBridge, type RevenueCatBridgeConfig, type RevenueCatCustomerInfoLike, type RevenueCatEntitlementLike, type RevenueCatErrorLike, type RevenueCatOfferingLike, type RevenueCatPackageLike, type RevenueCatProductLike, type RevenueCatSink, SESSION_STARTED_EVENT, SelectionCard, type SessionStartConfig, StatusCard, StepProgress, StepValidator, TextInputCard, type ThemeFromBrandInput, type UseLifecycleEventsOptions, type UseSessionStartOptions, type UseWireActivation, WIRE_ENV_VARS, WIRE_ICON_GLYPHS, WIRE_ICON_NAMES, WIRE_PURCHASE_EVENTS, type WireActivation, type WireActivationConfig, type WireConfigOverrides, WireFeatures, WireFeaturesConfig, WireFeaturesProvider, type WireFeaturesProviderProps, WireIcon, type WireIconFamily, type WireIconGlyph, type WireIconName, type WireIconProps, type WireIconRegistry, type WireLifecycleOptions, WireOnboarding, WireOnboardingConfig, WireOnboardingProps, WireOnboardingStorage, type WirePurchaseEventName, WireUserContext, activeEntitlement, attributionMetadata, bumpActivationRevalidation, createRevenueCatBridge, createWireActivation, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, describeEntitlement, describeFailure, describePackage, detectAppVersion, detectNativeModel, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, getActivationRevalidationVersion, isFeaturesFresh, isOnboardingEnabled, isUserCancelled, lookupIconGlyph, mergeTheme, motionSpec, onboardingComponents, parseWireFeatures, readCachedFeatures, readProgress, reportFirstOpen, reportSessionStart, resetActivationRevalidation, resetFirstOpenLatch, resetSessionStartGuard, resolvePlanTier, subscribeActivationRevalidation, themeFromBrand, useActivationRevalidation, useHostIcon, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireActivation, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };
2180
+ export { AnimatedSparkle, BACKGROUND_SESSION_MS, type CachedFeatures, CardGridSelectCard, CardHandoff, type CardHandoffProps, type CardHandoffVariant, type CardOption, ChipSelectCard, ClientEvent, ClientEventTarget, CompletionView, DEFAULT_FEATURES_TTL_MS, DEFAULT_PERMISSION_PLACEMENT, DemoOnboarding, type DemoOnboardingProps, DeviceContext, type DuePermissionScreen, ErrorBlock, FIRST_OPEN_EVENT, type FlowPosition, IconRegistryProvider, IllustrationProvider, type IllustrationRegistry, InterstitialCard, type LifecycleConfig, type LifecycleEventInput, LoadingBlock, LoadingScreen, NumberStepperCard, type OnboardingAttribution, Button as OnboardingButton, OnboardingCopy, OnboardingEvent, type OnboardingFlagOptions, OnboardingFlow, OnboardingResult, OnboardingScaffold, OnboardingTheme, OnboardingThemeProvider, PERMISSION_CARD_NAME, PLAN_TIER_CONTEXT_KEY, PermissionCard, type PermissionCardProps, PermissionCardView, PermissionPlacement, PermissionScreenConfig, PermissionStage, type PlanTier, type PurchaseProps, type ReportFirstOpenOptions, type ReportSessionStartOptions, type ResolveFeaturesOptions, type RevenueCatBridge, type RevenueCatBridgeConfig, type RevenueCatCustomerInfoLike, type RevenueCatEntitlementLike, type RevenueCatErrorLike, type RevenueCatOfferingLike, type RevenueCatPackageLike, type RevenueCatProductLike, type RevenueCatSink, SESSION_STARTED_EVENT, SelectionCard, type SessionStartConfig, StatusCard, StepProgress, StepValidator, TextInputCard, type ThemeFromBrandInput, type UseLifecycleEventsOptions, type UseSessionStartOptions, type UseWireActivation, WIRE_ENV_VARS, WIRE_ICON_GLYPHS, WIRE_ICON_NAMES, WIRE_PURCHASE_EVENTS, type WireActivation, type WireActivationConfig, type WireConfigOverrides, WireFeatures, WireFeaturesConfig, WireFeaturesProvider, type WireFeaturesProviderProps, WireIcon, type WireIconFamily, type WireIconGlyph, type WireIconName, type WireIconProps, type WireIconRegistry, type WireLifecycleOptions, WireOnboarding, WireOnboardingConfig, WireOnboardingProps, WireOnboardingStorage, WirePermissionOutcome, WirePermissionStatus, type WirePurchaseEventName, WireUserContext, activeEntitlement, attributionMetadata, bumpActivationRevalidation, clearSettledPermissions, createRevenueCatBridge, createWireActivation, defaultIllustrations, defaultOnboardingTheme, defaultWireFeatures, deriveAnswers, describeEntitlement, describeFailure, describePackage, detectAppVersion, detectNativeModel, featuresCacheKey, featuresEqual, fetchWireFeatures, firstOpenStorageKey, getActivationRevalidationVersion, isFeaturesFresh, isOnboardingEnabled, isPermissionDue, isUserCancelled, loadSettledPermissions, lookupIconGlyph, mergeTheme, motionSpec, normalizeAfterCard, onboardingComponents, parseWireFeatures, permissionScreenId, permissionStorageKey, readCachedFeatures, readProgress, readSettledPermissions, reportFirstOpen, reportSessionStart, resetActivationRevalidation, resetFirstOpenLatch, resetSessionStartGuard, resolvePlanTier, saveSettledPermissions, selectDuePermissionScreen, subscribeActivationRevalidation, themeFromBrand, useActivationRevalidation, useHostIcon, useIllustration, useLifecycleEvents, useOnboardingTheme, useReducedMotion, useResolvedFeatures, useSessionStart, useWireActivation, useWireFeatures, useWireFeaturesContext, wireConfigFromEnv, wireLifecycleEvents, writeCachedFeatures };