@wireai/activation 0.1.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 (142) hide show
  1. package/AGENTS.md +73 -0
  2. package/CHANGELOG.md +572 -0
  3. package/INTEGRATION_PROMPT.md +55 -0
  4. package/LICENSE +21 -0
  5. package/README.md +923 -0
  6. package/dist/CenteredModal-C3qQBHsA.d.mts +38 -0
  7. package/dist/CenteredModal-Cdgns6--.d.ts +38 -0
  8. package/dist/coachmarks/index.d.mts +352 -0
  9. package/dist/coachmarks/index.d.ts +352 -0
  10. package/dist/coachmarks/index.js +944 -0
  11. package/dist/coachmarks/index.js.map +1 -0
  12. package/dist/coachmarks/index.mjs +918 -0
  13. package/dist/coachmarks/index.mjs.map +1 -0
  14. package/dist/decision-CFvGY6nP.d.ts +228 -0
  15. package/dist/decision-Cl8OFYzu.d.mts +228 -0
  16. package/dist/index.d.mts +1390 -0
  17. package/dist/index.d.ts +1390 -0
  18. package/dist/index.js +3260 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/index.mjs +3186 -0
  21. package/dist/index.mjs.map +1 -0
  22. package/dist/questionnaire/index.d.mts +249 -0
  23. package/dist/questionnaire/index.d.ts +249 -0
  24. package/dist/questionnaire/index.js +922 -0
  25. package/dist/questionnaire/index.js.map +1 -0
  26. package/dist/questionnaire/index.mjs +906 -0
  27. package/dist/questionnaire/index.mjs.map +1 -0
  28. package/dist/reviews/index.d.mts +213 -0
  29. package/dist/reviews/index.d.ts +213 -0
  30. package/dist/reviews/index.js +1001 -0
  31. package/dist/reviews/index.js.map +1 -0
  32. package/dist/reviews/index.mjs +971 -0
  33. package/dist/reviews/index.mjs.map +1 -0
  34. package/dist/showcase/index.d.mts +119 -0
  35. package/dist/showcase/index.d.ts +119 -0
  36. package/dist/showcase/index.js +660 -0
  37. package/dist/showcase/index.js.map +1 -0
  38. package/dist/showcase/index.mjs +651 -0
  39. package/dist/showcase/index.mjs.map +1 -0
  40. package/dist/types-BKfpdZzX.d.mts +84 -0
  41. package/dist/types-BKfpdZzX.d.ts +84 -0
  42. package/dist/types-CMuOexw0.d.mts +116 -0
  43. package/dist/types-CMuOexw0.d.ts +116 -0
  44. package/dist/types-GL_hQ0TN.d.mts +46 -0
  45. package/dist/types-GL_hQ0TN.d.ts +46 -0
  46. package/llms.txt +36 -0
  47. package/metro/index.d.ts +32 -0
  48. package/metro/index.js +83 -0
  49. package/package.json +171 -0
  50. package/src/DemoOnboarding.tsx +133 -0
  51. package/src/OnboardingFlow.tsx +504 -0
  52. package/src/WireOnboarding.tsx +248 -0
  53. package/src/analytics/analyticsEvent.ts +69 -0
  54. package/src/analytics/reportClientEvent.ts +119 -0
  55. package/src/analytics/sendPreview.ts +73 -0
  56. package/src/attribution/attribution.ts +46 -0
  57. package/src/cards/ChipSelectCard.tsx +265 -0
  58. package/src/cards/InterstitialCard.tsx +299 -0
  59. package/src/cards/NumberStepperCard.tsx +121 -0
  60. package/src/cards/SelectionCard.tsx +270 -0
  61. package/src/cards/StatusCard.tsx +170 -0
  62. package/src/cards/TextInputCard.tsx +147 -0
  63. package/src/cards/index.ts +23 -0
  64. package/src/coachmarks/CoachmarkOverlayHost.tsx +44 -0
  65. package/src/coachmarks/CoachmarkProvider.tsx +108 -0
  66. package/src/coachmarks/GestureHint.tsx +331 -0
  67. package/src/coachmarks/SpotlightOverlay.tsx +254 -0
  68. package/src/coachmarks/coachmarkAnchorRegistry.ts +70 -0
  69. package/src/coachmarks/coachmarkOverlayStore.ts +63 -0
  70. package/src/coachmarks/index.ts +62 -0
  71. package/src/coachmarks/runtime.ts +103 -0
  72. package/src/coachmarks/selectTourSteps.ts +45 -0
  73. package/src/coachmarks/types.ts +58 -0
  74. package/src/coachmarks/useCoachmarkAnchor.ts +49 -0
  75. package/src/coachmarks/useCoachmarkTour.ts +200 -0
  76. package/src/components/AnimatedSparkle.tsx +101 -0
  77. package/src/components/Button.tsx +129 -0
  78. package/src/components/CardHandoff.tsx +212 -0
  79. package/src/components/CardLayout.tsx +103 -0
  80. package/src/components/CenteredModal.tsx +184 -0
  81. package/src/components/CompletionView.tsx +186 -0
  82. package/src/components/DoneBlock.tsx +37 -0
  83. package/src/components/ErrorBlock.tsx +42 -0
  84. package/src/components/Illustration.tsx +36 -0
  85. package/src/components/LoadingBlock.tsx +182 -0
  86. package/src/components/LoadingScreen.tsx +35 -0
  87. package/src/components/OnboardingScaffold.tsx +105 -0
  88. package/src/components/StepProgress.tsx +85 -0
  89. package/src/components/loaderChrome.ts +28 -0
  90. package/src/config/onboardingFlag.ts +39 -0
  91. package/src/config/wireConfigFromEnv.ts +52 -0
  92. package/src/device/deviceContext.ts +158 -0
  93. package/src/features/WireFeaturesProvider.tsx +81 -0
  94. package/src/features/cache.ts +92 -0
  95. package/src/features/defaults.ts +67 -0
  96. package/src/features/fetchWireFeatures.ts +86 -0
  97. package/src/features/index.ts +39 -0
  98. package/src/features/types.ts +61 -0
  99. package/src/features/useWireFeatures.ts +57 -0
  100. package/src/identity/userIdentity.ts +100 -0
  101. package/src/illustrations/defaultIllustrations.tsx +99 -0
  102. package/src/index.ts +159 -0
  103. package/src/motion/centeredModalMotion.ts +45 -0
  104. package/src/motion/motionSpec.ts +133 -0
  105. package/src/motion/useReducedMotion.ts +43 -0
  106. package/src/questionnaire/QuestionnaireGate.tsx +235 -0
  107. package/src/questionnaire/decision.ts +63 -0
  108. package/src/questionnaire/index.ts +54 -0
  109. package/src/questionnaire/runtime.ts +20 -0
  110. package/src/questionnaire/transport.ts +83 -0
  111. package/src/questionnaire/types.ts +182 -0
  112. package/src/questionnaire/useQuestionnaireGate.ts +159 -0
  113. package/src/reviews/ReviewGate.tsx +316 -0
  114. package/src/reviews/ReviewModal.tsx +13 -0
  115. package/src/reviews/decision.ts +120 -0
  116. package/src/reviews/equality.ts +54 -0
  117. package/src/reviews/expo-store-review.d.ts +16 -0
  118. package/src/reviews/feedbackForm.ts +41 -0
  119. package/src/reviews/index.ts +78 -0
  120. package/src/reviews/presentation.ts +29 -0
  121. package/src/reviews/runtime.ts +45 -0
  122. package/src/reviews/storeReview.ts +62 -0
  123. package/src/reviews/transport.ts +89 -0
  124. package/src/reviews/types.ts +172 -0
  125. package/src/reviews/useReviewGate.ts +137 -0
  126. package/src/session/persistedSession.ts +143 -0
  127. package/src/session-analytics/index.ts +18 -0
  128. package/src/session-analytics/reportSessionStart.ts +144 -0
  129. package/src/session-analytics/useSessionStart.ts +114 -0
  130. package/src/showcase/FeatureShowcase.tsx +233 -0
  131. package/src/showcase/index.ts +19 -0
  132. package/src/showcase/selectShowcaseSlides.ts +45 -0
  133. package/src/showcase/showcaseColors.ts +91 -0
  134. package/src/showcase/types.ts +74 -0
  135. package/src/theme/ThemeContext.tsx +38 -0
  136. package/src/theme/defaultTheme.ts +70 -0
  137. package/src/theme/themeFromBrand.ts +93 -0
  138. package/src/theme/types.ts +88 -0
  139. package/src/theme/typography.ts +46 -0
  140. package/src/types.ts +215 -0
  141. package/src/utils/deriveAnswers.ts +43 -0
  142. package/src/utils/readProgress.ts +33 -0
@@ -0,0 +1,352 @@
1
+ import * as React from 'react';
2
+ import React__default, { ReactNode } from 'react';
3
+ import { W as WireFeatures, a as WireFeaturesConfig } from '../types-CMuOexw0.js';
4
+ import { C as CoachmarkStorage, a as CoachmarkStep, G as GestureKind, T as TargetRect, P as Placement } from '../types-GL_hQ0TN.js';
5
+ import { View } from 'react-native';
6
+
7
+ interface CoachmarkProviderProps {
8
+ /**
9
+ * SYNCHRONOUS gate storage (MMKV-friendly). Reads must not be async or a ring
10
+ * would flash before the "already seen" gate resolves. See CoachmarkStorage.
11
+ */
12
+ storage: CoachmarkStorage;
13
+ /**
14
+ * QA replay switch. When true, every seen-gate reads as unseen AND seen-writes
15
+ * are suppressed, so every tour + showcase replays on each mount. Flip ONE
16
+ * boolean to re-see the whole coachmark surface.
17
+ */
18
+ isTestingCoachmark?: boolean;
19
+ /** Ring + tooltip color for every tour. Defaults to the onboarding theme's `primary`. */
20
+ accentColor?: string;
21
+ /**
22
+ * Text/icon color on the accent surface (e.g. the tooltip's CTA label).
23
+ * Defaults to the onboarding theme's `onPrimary`.
24
+ */
25
+ accentTextColor?: string;
26
+ /**
27
+ * OPTIONAL feature-flag wiring. When `flags.coachmarks.enabled` is false, every tour + overlay
28
+ * request becomes a silent no-op (once-gates are NOT consumed, so re-enabling replays). Provide
29
+ * pre-resolved `features`, OR a `featuresConfig` (serverUrl + apiKey) to lazily fetch once, OR
30
+ * mount a `WireFeaturesProvider` above (context is read automatically). Omit all three and
31
+ * coachmarks stay on (fail-open) — zero behavior change for hosts that never adopt flags.
32
+ */
33
+ features?: WireFeatures;
34
+ /** Lazy-fetch config for the flags, used when `features` is absent and no provider is above. */
35
+ featuresConfig?: WireFeaturesConfig;
36
+ children: React__default.ReactNode;
37
+ }
38
+ /**
39
+ * Mount ONCE at the app root — wrap it around (or just inside) your
40
+ * NavigationContainer so the overlay host is a root-level sibling of the whole
41
+ * app tree. That placement is what lets a ring + blur paint ABOVE the bottom tab
42
+ * bar, which react-navigation renders over screen components.
43
+ *
44
+ * It feeds the sync storage + testing flag into the engine's module-level
45
+ * singletons so `useCoachmarkTour` / `useCoachmarkAnchor` work from anywhere in
46
+ * the tree without prop-drilling, then renders the overlay host as a sibling
47
+ * after `children` (the SpotlightOverlay self-positions absolute-fill at
48
+ * zIndex/elevation 9999).
49
+ *
50
+ * The singletons are set during render (not in an effect) so a child's mount
51
+ * effect — which runs BEFORE this parent's effects — already sees the storage
52
+ * when it reads its gate.
53
+ */
54
+ declare const CoachmarkProvider: React__default.FC<CoachmarkProviderProps>;
55
+
56
+ /**
57
+ * Makes any element ringable by a coachmark tour. Attach the returned ref to a
58
+ * plain RN View wrapping the target (use `collapsable={false}` so the native
59
+ * node survives for measurement):
60
+ *
61
+ * const filterAnchor = useCoachmarkAnchor("filter_icon");
62
+ * <View ref={filterAnchor} collapsable={false}>{button}</View>
63
+ *
64
+ * The app decides which ids exist and where they live; the kit measures them at
65
+ * step time via `measureInWindow` (never continuously). Pass `null` to keep the
66
+ * hook's position stable while registering nothing (e.g. a list item that is
67
+ * only an anchor at one index).
68
+ */
69
+ declare const useCoachmarkAnchor: (id: string | null | undefined) => React.RefObject<View | null>;
70
+
71
+ interface UseCoachmarkTourOptions {
72
+ /**
73
+ * Gate key for the whole tour. The kit reads/writes
74
+ * `wire_coachmark_<tourId>_seen` through the injected CoachmarkStorage so the
75
+ * app never owns the "seen" bookkeeping (the global testing flag bypasses it).
76
+ */
77
+ tourId: string;
78
+ /** Run at most once ever (persisted via the gate). Default true. */
79
+ showOnce?: boolean;
80
+ /**
81
+ * Domain gate — the tour only arms while this is true (e.g. hasPosts), and it
82
+ * also drives PAUSE/RESUME: if this flips false mid-tour (e.g. the user tab-
83
+ * switches and the screen loses focus without unmounting) the overlay is
84
+ * hidden but the tour's position is kept, and it resumes on the CURRENT step
85
+ * (re-resolving its anchor) when this returns true. See the hook JSDoc.
86
+ */
87
+ enabled: boolean;
88
+ /** Let passive value land before the first hint. */
89
+ startDelayMs?: number;
90
+ /** Fires once the tour finishes or is skipped (after the gate is written). */
91
+ onComplete?: () => void;
92
+ /**
93
+ * Fires once when a step first becomes visible. It is NOT re-fired when the
94
+ * SAME step resumes after a focus-loss pause (the last-shown step id is
95
+ * tracked in a ref and suppressed), so a tab-switch never inflates
96
+ * impressions. It fires again only when the tour advances to a new step.
97
+ */
98
+ onStepShown?: (id: string) => void;
99
+ onStepEngaged?: (id: string) => void;
100
+ onStepDismissed?: (id: string) => void;
101
+ }
102
+ /**
103
+ * Plays an ordered queue of coachmark steps on the current screen through the
104
+ * root SpotlightOverlay (mounted by CoachmarkProvider). Engaging a step (tap the
105
+ * ring/tooltip) advances and fires onStepEngaged. Tapping the backdrop advances
106
+ * to the NEXT step and fires onStepDismissed — a stray tap or a "not now" never
107
+ * kills the tour; only a backdrop tap on the LAST step ends it. Both terminal
108
+ * paths (engaging past the end, or dismissing the last step) write the seen gate
109
+ * once and call onComplete, so a finished tour never nags again.
110
+ *
111
+ * Gating lives IN the kit: the tour arms only when `enabled` AND (not `showOnce`
112
+ * OR the `tourId` gate is unseen).
113
+ *
114
+ * PAUSE/RESUME on focus loss: `enabled` is a live gate, not just an arm-once
115
+ * trigger. Once armed, if `enabled` goes false while the tour is in flight
116
+ * (started, not finished) — the classic case being a tab-switch that keeps the
117
+ * screen mounted — the drive effect hides the overlay so a stale rect can't
118
+ * float over the wrong screen, but KEEPS `activeIndex` and does NOT write the
119
+ * seen gate. When `enabled` returns true the effect re-runs (it's in the deps)
120
+ * and re-drives the SAME step, re-resolving its anchor so a moved/relaid-out
121
+ * target is picked up. `onStepShown` is suppressed on that resume (last-shown
122
+ * step id is tracked in a ref) so a pause/resume never double-counts a step.
123
+ *
124
+ * IMPORTANT: `steps` MUST be a stable (memoized) array. If a new array identity
125
+ * is passed on every render the drive effect re-runs and re-shows the current
126
+ * step (wasteful anchor re-resolves / overlay churn), and analytics can
127
+ * double-fire. Memoize it, or pass an inline module-level constant.
128
+ *
129
+ * Preserved engine invariants: step callbacks live in a ref (not effect deps),
130
+ * anchor resolution is cancellable, and finish is idempotent (only one overlay
131
+ * is ever active, the gate is written once).
132
+ */
133
+ declare const useCoachmarkTour: (
134
+ /** Ordered coachmark steps. MUST be stable/memoized — see the note above. */
135
+ steps: CoachmarkStep[], { tourId, showOnce, enabled, startDelayMs, onComplete, onStepShown, onStepEngaged, onStepDismissed, }: UseCoachmarkTourOptions) => void;
136
+
137
+ /**
138
+ * Module-level runtime for the coachmark engine: the injected sync storage, the
139
+ * global `isTestingCoachmark` flag, and the seen-gate helpers built on top.
140
+ *
141
+ * WHY module singletons (not just context): the tour hooks and the anchor
142
+ * registry are driven imperatively from anywhere in the tree (a screen deep
143
+ * under the navigator), while the storage + testing flag are configured once at
144
+ * the root by `CoachmarkProvider`. Singletons let a hook read the gate without
145
+ * every call site threading the storage through props. The provider is still the
146
+ * single writer — it calls `setCoachmarkStorage` / `setCoachmarkTesting` on mount.
147
+ */
148
+
149
+ /**
150
+ * Set the coachmarks master switch (from the resolved feature flags). Default true (fail-open).
151
+ * Written by CoachmarkProvider; read imperatively by the tour arm + the overlay store.
152
+ */
153
+ declare const setCoachmarksEnabled: (value: boolean) => void;
154
+ /** Whether the coachmarks module is enabled. False → tours/overlays are silently skipped. */
155
+ declare const areCoachmarksEnabled: () => boolean;
156
+ /** Set (or clear) the injected sync gate storage. Called by CoachmarkProvider. */
157
+ declare const setCoachmarkStorage: (storage: CoachmarkStorage | null) => void;
158
+ /** The currently-injected gate storage, or null if no provider is mounted. */
159
+ declare const getCoachmarkStorage: () => CoachmarkStorage | null;
160
+ /**
161
+ * Toggle the global QA replay flag. When true, EVERY seen-gate reads as unseen
162
+ * and every seen-write is suppressed, so every tour + showcase replays on each
163
+ * mount. The app flips ONE boolean to QA the whole coachmark surface.
164
+ */
165
+ declare const setCoachmarkTesting: (value: boolean) => void;
166
+ /** Whether replay-everything QA mode is on. */
167
+ declare const isCoachmarkTesting: () => boolean;
168
+ /** Gate key for a tour: `wire_coachmark_<tourId>_seen`. */
169
+ declare const coachmarkGateKey: (tourId: string) => string;
170
+ /** Gate key for a feature showcase: `wire_showcase_<id>_seen`. */
171
+ declare const showcaseGateKey: (showcaseId: string) => string;
172
+ /**
173
+ * Read a seen gate. Testing mode ALWAYS reports unseen (so everything replays).
174
+ * A missing storage (no provider) also reports unseen — the safe default is to
175
+ * show the hint rather than silently swallow it. `storageOverride` /
176
+ * `testingOverride` let a self-contained component (e.g. FeatureShowcase) pass
177
+ * its own storage without relying on the provider singleton.
178
+ */
179
+ declare const hasSeenGate: (key: string, storageOverride?: CoachmarkStorage | null, testingOverride?: boolean) => boolean;
180
+ /**
181
+ * Mark a gate seen. Suppressed in testing mode (so replay never persists) and a
182
+ * no-op without storage. Best-effort — a throwing adapter never breaks the tour.
183
+ */
184
+ declare const markSeenGate: (key: string, storageOverride?: CoachmarkStorage | null, testingOverride?: boolean) => void;
185
+
186
+ /**
187
+ * selectTourSteps — the Phase-3 (AI intent-mapping) seam, stubbed today.
188
+ *
189
+ * The app declares a full catalog of coachmarks (its "feature map"). Near-term,
190
+ * the whole catalog plays in its declared order. LATER, the Wire server will
191
+ * emit an ordered `coachmarks: string[]` id list chosen by the user's captured
192
+ * intent (see the package spec §1e / §5), and the app passes it straight here as
193
+ * `selection`. This function is the ONE place that turns a selection into the
194
+ * live ordered step list — so turning AI on is a drop-in with zero app changes:
195
+ *
196
+ * // Phase 1-2 (no AI): full catalog, declared order
197
+ * const steps = selectTourSteps(catalog);
198
+ *
199
+ * // Phase 3 (AI on): server-chosen subset, server order
200
+ * const steps = selectTourSteps(catalog, plan.coachmarks);
201
+ *
202
+ * Contract:
203
+ * - `selection` absent → returns the catalog unchanged (identity/declared order).
204
+ * - `selection` present → returns only catalog entries whose `id` appears in
205
+ * `selection`, ordered by `selection` (unknown ids are skipped; duplicates in
206
+ * `selection` are ignored after the first match).
207
+ *
208
+ * NOTE: routing steps through a catalog + this selector is NOT required today.
209
+ * Declaring an inline, static (module-level or memoized) steps array and passing
210
+ * it straight to `useCoachmarkTour` is a perfectly fine consumer pattern. The
211
+ * catalog + selection route exists to make the app AI-selection-ready — flip to
212
+ * server-chosen ordering later with zero app changes — not as the baseline.
213
+ */
214
+ declare const selectTourSteps: <T extends {
215
+ id: string;
216
+ }>(catalog: T[], selection?: string[]) => T[];
217
+
218
+ /**
219
+ * Abstract gesture pictogram shown beside a coachmark tooltip. Pure reanimated —
220
+ * every animation runs on the UI thread (shared values + worklets), never
221
+ * setState, so it costs nothing on the JS thread. Honors Reduce Motion by
222
+ * dropping the motion loop and rendering the glyph static.
223
+ *
224
+ * NO drawn-hand anatomy. Swipes render the standard two-finger swipe glyph: two
225
+ * rounded vertical capsules (an abstract index + middle finger, slightly
226
+ * different heights) with a short, fading motion track trailing behind them along
227
+ * the swipe axis. The whole glyph is rotated per direction (up/down/left/right)
228
+ * and the capsules slide along the axis, fading, in a UI-thread loop. Pinch/zoom
229
+ * reuse the two-capsule abstraction spreading apart. Tap / double-tap render a
230
+ * minimal pulsing tap-target (ring + dot).
231
+ *
232
+ * Every glyph is a self-drawn primitive built from Views/borders (no vector-icon
233
+ * dependency, like AnimatedSparkle). Pass `renderHand` — the glyph slot — to
234
+ * substitute your own node while keeping the tuned motion. (The name is kept for
235
+ * backward compatibility; despite it, the default is a glyph, not a drawn hand.)
236
+ *
237
+ * NOTE: the coachmark path (SpotlightOverlay) and the showcase path
238
+ * (FeatureShowcase) both SKIP this component for `tap` / `double_tap` — those
239
+ * steps show only the highlight ring + tooltip, no glyph. The tap visual here
240
+ * exists for direct / standalone use.
241
+ */
242
+ interface GestureHintProps {
243
+ type: GestureKind;
244
+ /** Overall glyph size in px. */
245
+ size?: number;
246
+ /** Glyph color. Defaults to white (reads on the dark blur backdrop). */
247
+ color?: string;
248
+ /**
249
+ * Provide a custom glyph node in place of the default self-drawn primitive; it
250
+ * inherits the tuned motion (slide+fade for swipes, pulse for tap). Kept as
251
+ * `renderHand` for backward compatibility — despite the name it is just the
252
+ * glyph slot, no longer a drawn hand.
253
+ */
254
+ renderHand?: (props: {
255
+ size: number;
256
+ color: string;
257
+ }) => ReactNode;
258
+ }
259
+ declare const GestureHint: React__default.NamedExoticComponent<GestureHintProps>;
260
+
261
+ interface SpotlightOverlayProps {
262
+ message: string;
263
+ /** Window-space rect of the element to highlight. Null → centered hint (e.g. a scroll gesture). */
264
+ targetRect?: TargetRect | null;
265
+ gesture?: GestureKind;
266
+ placement?: Placement;
267
+ /** Tapping the highlighted target or the pill — advance / act. */
268
+ onEngage: () => void;
269
+ /** Tapping the dimmed backdrop — advance to the next step (ends the tour only on the last step). */
270
+ onDismiss: () => void;
271
+ /** Ring + tooltip color. Defaults to the onboarding theme's `primary`. */
272
+ accentColor?: string;
273
+ /** Tooltip label color. Defaults to the theme's `onPrimary`. */
274
+ accentTextColor?: string;
275
+ }
276
+ declare const SpotlightOverlay: React__default.NamedExoticComponent<SpotlightOverlayProps>;
277
+
278
+ interface CoachmarkOverlayHostProps {
279
+ /** Ring/tooltip accent; defaults to the onboarding theme's `primary`. */
280
+ accentColor?: string;
281
+ /** Text/icon color on the accent surface; defaults to the theme's `onPrimary`. */
282
+ accentTextColor?: string;
283
+ }
284
+ declare const CoachmarkOverlayHost: React__default.NamedExoticComponent<CoachmarkOverlayHostProps>;
285
+
286
+ /**
287
+ * A tiny module-level store for the single active coachmark overlay. The host
288
+ * (CoachmarkOverlayHost, mounted once by CoachmarkProvider at the app root)
289
+ * subscribes and renders whatever is active; the tour controller drives it
290
+ * imperatively via show()/hide(). No React context is needed for the overlay
291
+ * itself — the host reaches the root so the ring can paint above the tab bar.
292
+ *
293
+ * Only ONE overlay is ever active (steps never stack), per the engine's
294
+ * one-overlay-at-a-time rule.
295
+ */
296
+ interface CoachmarkOverlayState {
297
+ message: string;
298
+ targetRect: TargetRect | null;
299
+ gesture: GestureKind;
300
+ placement: Placement;
301
+ onEngage: () => void;
302
+ onDismiss: () => void;
303
+ }
304
+ declare const coachmarkOverlay: {
305
+ show(state: CoachmarkOverlayState): void;
306
+ hide(): void;
307
+ subscribe(listener: () => void): () => void;
308
+ getSnapshot(): CoachmarkOverlayState | null;
309
+ };
310
+ /** Subscribe a component to the active overlay (or null). */
311
+ declare const useCoachmarkOverlay: () => CoachmarkOverlayState | null;
312
+
313
+ /**
314
+ * Maps a coachmark anchor id → a function that measures that element's current
315
+ * window rect. Elements register themselves on mount (via useCoachmarkAnchor)
316
+ * and the tour controller resolves an id to a rect at the moment a step fires.
317
+ *
318
+ * This is the "app declares WHERE" half of the engine: the kit owns the
319
+ * measuring/registry mechanics, each app decides which ids exist and pins them
320
+ * to its own components.
321
+ */
322
+ type AnchorMeasurer = () => Promise<TargetRect | null>;
323
+ /**
324
+ * NOTE: this registry is last-writer-wins — one measurer per id. An `anchorId`
325
+ * MUST be unique across screens that can be mounted simultaneously; if two live
326
+ * screens share an id, the second registration hides the first and unmount order
327
+ * decides who survives. Scope ids per screen (e.g. `feed.filter_icon`) when a
328
+ * component can appear in more than one mounted screen at once.
329
+ */
330
+ declare const coachmarkAnchors: {
331
+ register(id: string, measurer: AnchorMeasurer): void;
332
+ /**
333
+ * Only clears the id when `measurer` is still the current registration, so a
334
+ * screen unmounting after a newer screen registered the same id does not wipe
335
+ * the live measurer. Omit `measurer` to force-delete regardless.
336
+ */
337
+ unregister(id: string, measurer?: AnchorMeasurer): void;
338
+ get(id: string): AnchorMeasurer | undefined;
339
+ /**
340
+ * Resolve an anchor to a rect, retrying briefly while the target lays out
341
+ * (e.g. the first feed post, or a screen just navigated to). Cancellable via
342
+ * `shouldCancel` so a superseded step abandons its retry loop immediately.
343
+ */
344
+ resolve(id: string, { retries, intervalMs, shouldCancel, }?: {
345
+ retries?: number;
346
+ intervalMs?: number;
347
+ /** Abort the retry loop early (e.g. the step was superseded). */
348
+ shouldCancel?: () => boolean;
349
+ }): Promise<TargetRect | null>;
350
+ };
351
+
352
+ export { type AnchorMeasurer, CoachmarkOverlayHost, type CoachmarkOverlayHostProps, type CoachmarkOverlayState, CoachmarkProvider, type CoachmarkProviderProps, CoachmarkStep, CoachmarkStorage, GestureHint, type GestureHintProps, GestureKind, Placement, SpotlightOverlay, type SpotlightOverlayProps, TargetRect, type UseCoachmarkTourOptions, areCoachmarksEnabled, coachmarkAnchors, coachmarkGateKey, coachmarkOverlay, getCoachmarkStorage, hasSeenGate, isCoachmarkTesting, markSeenGate, selectTourSteps, setCoachmarkStorage, setCoachmarkTesting, setCoachmarksEnabled, showcaseGateKey, useCoachmarkAnchor, useCoachmarkOverlay, useCoachmarkTour };