rn-smart-tour 1.1.0 → 2.0.0-beta.4

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 (197) hide show
  1. package/README.md +244 -68
  2. package/lib/commonjs/compat.js +87 -0
  3. package/lib/commonjs/compat.js.map +1 -0
  4. package/lib/commonjs/core/TourEngine.js +608 -0
  5. package/lib/commonjs/core/TourEngine.js.map +1 -0
  6. package/lib/commonjs/core/controller.js +38 -0
  7. package/lib/commonjs/core/controller.js.map +1 -0
  8. package/lib/commonjs/core/measure.js +130 -0
  9. package/lib/commonjs/core/measure.js.map +1 -0
  10. package/lib/commonjs/core/store.js +39 -0
  11. package/lib/commonjs/core/store.js.map +1 -0
  12. package/lib/commonjs/index.js +95 -44
  13. package/lib/commonjs/index.js.map +1 -1
  14. package/lib/commonjs/react/TourOverlay.js +520 -0
  15. package/lib/commonjs/react/TourOverlay.js.map +1 -0
  16. package/lib/commonjs/react/TourProvider.js +74 -0
  17. package/lib/commonjs/react/TourProvider.js.map +1 -0
  18. package/lib/commonjs/react/TourScope.js +39 -0
  19. package/lib/commonjs/react/TourScope.js.map +1 -0
  20. package/lib/commonjs/react/TourScrollable.js +61 -0
  21. package/lib/commonjs/react/TourScrollable.js.map +1 -0
  22. package/lib/commonjs/react/TourTarget.js +76 -0
  23. package/lib/commonjs/react/TourTarget.js.map +1 -0
  24. package/lib/commonjs/react/context.js +15 -0
  25. package/lib/commonjs/react/context.js.map +1 -0
  26. package/lib/commonjs/react/hooks.js +115 -0
  27. package/lib/commonjs/react/hooks.js.map +1 -0
  28. package/lib/commonjs/react/placement.js +69 -0
  29. package/lib/commonjs/react/placement.js.map +1 -0
  30. package/lib/commonjs/react-navigation.js +80 -0
  31. package/lib/commonjs/react-navigation.js.map +1 -0
  32. package/lib/module/compat.js +81 -0
  33. package/lib/module/compat.js.map +1 -0
  34. package/lib/module/core/TourEngine.js +604 -0
  35. package/lib/module/core/TourEngine.js.map +1 -0
  36. package/lib/module/core/controller.js +33 -0
  37. package/lib/module/core/controller.js.map +1 -0
  38. package/lib/module/core/measure.js +118 -0
  39. package/lib/module/core/measure.js.map +1 -0
  40. package/lib/module/core/store.js +34 -0
  41. package/lib/module/core/store.js.map +1 -0
  42. package/lib/module/index.js +8 -5
  43. package/lib/module/index.js.map +1 -1
  44. package/lib/module/react/TourOverlay.js +511 -0
  45. package/lib/module/react/TourOverlay.js.map +1 -0
  46. package/lib/module/react/TourProvider.js +67 -0
  47. package/lib/module/react/TourProvider.js.map +1 -0
  48. package/lib/module/react/TourScope.js +32 -0
  49. package/lib/module/react/TourScope.js.map +1 -0
  50. package/lib/module/react/TourScrollable.js +54 -0
  51. package/lib/module/react/TourScrollable.js.map +1 -0
  52. package/lib/module/react/TourTarget.js +69 -0
  53. package/lib/module/react/TourTarget.js.map +1 -0
  54. package/lib/module/react/context.js +11 -0
  55. package/lib/module/react/context.js.map +1 -0
  56. package/lib/module/react/hooks.js +106 -0
  57. package/lib/module/react/hooks.js.map +1 -0
  58. package/lib/module/react/placement.js +65 -0
  59. package/lib/module/react/placement.js.map +1 -0
  60. package/lib/module/react-navigation.js +74 -0
  61. package/lib/module/react-navigation.js.map +1 -0
  62. package/lib/typescript/commonjs/src/compat.d.ts +13 -0
  63. package/lib/typescript/commonjs/src/compat.d.ts.map +1 -0
  64. package/lib/typescript/commonjs/src/core/TourEngine.d.ts +151 -0
  65. package/lib/typescript/commonjs/src/core/TourEngine.d.ts.map +1 -0
  66. package/lib/typescript/commonjs/src/core/controller.d.ts +39 -0
  67. package/lib/typescript/commonjs/src/core/controller.d.ts.map +1 -0
  68. package/lib/typescript/commonjs/src/core/measure.d.ts +26 -0
  69. package/lib/typescript/commonjs/src/core/measure.d.ts.map +1 -0
  70. package/lib/typescript/commonjs/src/core/store.d.ts +9 -0
  71. package/lib/typescript/commonjs/src/core/store.d.ts.map +1 -0
  72. package/lib/typescript/commonjs/src/index.d.ts +15 -5
  73. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/src/react/TourOverlay.d.ts +46 -0
  75. package/lib/typescript/commonjs/src/react/TourOverlay.d.ts.map +1 -0
  76. package/lib/typescript/commonjs/src/react/TourProvider.d.ts +37 -0
  77. package/lib/typescript/commonjs/src/react/TourProvider.d.ts.map +1 -0
  78. package/lib/typescript/commonjs/src/react/TourScope.d.ts +17 -0
  79. package/lib/typescript/commonjs/src/react/TourScope.d.ts.map +1 -0
  80. package/lib/typescript/commonjs/src/react/TourScrollable.d.ts +25 -0
  81. package/lib/typescript/commonjs/src/react/TourScrollable.d.ts.map +1 -0
  82. package/lib/typescript/commonjs/src/react/TourTarget.d.ts +13 -0
  83. package/lib/typescript/commonjs/src/react/TourTarget.d.ts.map +1 -0
  84. package/lib/typescript/commonjs/src/react/context.d.ts +7 -0
  85. package/lib/typescript/commonjs/src/react/context.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/src/react/hooks.d.ts +21 -0
  87. package/lib/typescript/commonjs/src/react/hooks.d.ts.map +1 -0
  88. package/lib/typescript/commonjs/src/react/placement.d.ts +20 -0
  89. package/lib/typescript/commonjs/src/react/placement.d.ts.map +1 -0
  90. package/lib/typescript/commonjs/src/react-navigation.d.ts +15 -0
  91. package/lib/typescript/commonjs/src/react-navigation.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/src/types.d.ts +109 -9
  93. package/lib/typescript/commonjs/src/types.d.ts.map +1 -1
  94. package/lib/typescript/module/src/compat.d.ts +13 -0
  95. package/lib/typescript/module/src/compat.d.ts.map +1 -0
  96. package/lib/typescript/module/src/core/TourEngine.d.ts +151 -0
  97. package/lib/typescript/module/src/core/TourEngine.d.ts.map +1 -0
  98. package/lib/typescript/module/src/core/controller.d.ts +39 -0
  99. package/lib/typescript/module/src/core/controller.d.ts.map +1 -0
  100. package/lib/typescript/module/src/core/measure.d.ts +26 -0
  101. package/lib/typescript/module/src/core/measure.d.ts.map +1 -0
  102. package/lib/typescript/module/src/core/store.d.ts +9 -0
  103. package/lib/typescript/module/src/core/store.d.ts.map +1 -0
  104. package/lib/typescript/module/src/index.d.ts +15 -5
  105. package/lib/typescript/module/src/index.d.ts.map +1 -1
  106. package/lib/typescript/module/src/react/TourOverlay.d.ts +46 -0
  107. package/lib/typescript/module/src/react/TourOverlay.d.ts.map +1 -0
  108. package/lib/typescript/module/src/react/TourProvider.d.ts +37 -0
  109. package/lib/typescript/module/src/react/TourProvider.d.ts.map +1 -0
  110. package/lib/typescript/module/src/react/TourScope.d.ts +17 -0
  111. package/lib/typescript/module/src/react/TourScope.d.ts.map +1 -0
  112. package/lib/typescript/module/src/react/TourScrollable.d.ts +25 -0
  113. package/lib/typescript/module/src/react/TourScrollable.d.ts.map +1 -0
  114. package/lib/typescript/module/src/react/TourTarget.d.ts +13 -0
  115. package/lib/typescript/module/src/react/TourTarget.d.ts.map +1 -0
  116. package/lib/typescript/module/src/react/context.d.ts +7 -0
  117. package/lib/typescript/module/src/react/context.d.ts.map +1 -0
  118. package/lib/typescript/module/src/react/hooks.d.ts +21 -0
  119. package/lib/typescript/module/src/react/hooks.d.ts.map +1 -0
  120. package/lib/typescript/module/src/react/placement.d.ts +20 -0
  121. package/lib/typescript/module/src/react/placement.d.ts.map +1 -0
  122. package/lib/typescript/module/src/react-navigation.d.ts +15 -0
  123. package/lib/typescript/module/src/react-navigation.d.ts.map +1 -0
  124. package/lib/typescript/module/src/types.d.ts +109 -9
  125. package/lib/typescript/module/src/types.d.ts.map +1 -1
  126. package/package.json +26 -7
  127. package/react-navigation/package.json +6 -0
  128. package/src/compat.ts +84 -0
  129. package/src/core/TourEngine.ts +633 -0
  130. package/src/core/controller.ts +51 -0
  131. package/src/core/measure.ts +129 -0
  132. package/src/core/store.ts +39 -0
  133. package/src/index.ts +15 -5
  134. package/src/react/TourOverlay.tsx +516 -0
  135. package/src/react/TourProvider.tsx +106 -0
  136. package/src/react/TourScope.tsx +33 -0
  137. package/src/react/TourScrollable.tsx +58 -0
  138. package/src/react/TourTarget.tsx +83 -0
  139. package/src/react/context.ts +10 -0
  140. package/src/react/hooks.ts +117 -0
  141. package/src/react/placement.ts +95 -0
  142. package/src/react-navigation.tsx +80 -0
  143. package/src/types.ts +114 -10
  144. package/lib/commonjs/DapContext.js +0 -9
  145. package/lib/commonjs/DapContext.js.map +0 -1
  146. package/lib/commonjs/DapOverlay.js +0 -223
  147. package/lib/commonjs/DapOverlay.js.map +0 -1
  148. package/lib/commonjs/DapProvider.js +0 -350
  149. package/lib/commonjs/DapProvider.js.map +0 -1
  150. package/lib/commonjs/DapScrollView.js +0 -44
  151. package/lib/commonjs/DapScrollView.js.map +0 -1
  152. package/lib/commonjs/DapTarget.js +0 -116
  153. package/lib/commonjs/DapTarget.js.map +0 -1
  154. package/lib/commonjs/useDap.js +0 -17
  155. package/lib/commonjs/useDap.js.map +0 -1
  156. package/lib/module/DapContext.js +0 -5
  157. package/lib/module/DapContext.js.map +0 -1
  158. package/lib/module/DapOverlay.js +0 -220
  159. package/lib/module/DapOverlay.js.map +0 -1
  160. package/lib/module/DapProvider.js +0 -343
  161. package/lib/module/DapProvider.js.map +0 -1
  162. package/lib/module/DapScrollView.js +0 -41
  163. package/lib/module/DapScrollView.js.map +0 -1
  164. package/lib/module/DapTarget.js +0 -109
  165. package/lib/module/DapTarget.js.map +0 -1
  166. package/lib/module/useDap.js +0 -12
  167. package/lib/module/useDap.js.map +0 -1
  168. package/lib/typescript/commonjs/src/DapContext.d.ts +0 -3
  169. package/lib/typescript/commonjs/src/DapContext.d.ts.map +0 -1
  170. package/lib/typescript/commonjs/src/DapOverlay.d.ts +0 -2
  171. package/lib/typescript/commonjs/src/DapOverlay.d.ts.map +0 -1
  172. package/lib/typescript/commonjs/src/DapProvider.d.ts +0 -15
  173. package/lib/typescript/commonjs/src/DapProvider.d.ts.map +0 -1
  174. package/lib/typescript/commonjs/src/DapScrollView.d.ts +0 -9
  175. package/lib/typescript/commonjs/src/DapScrollView.d.ts.map +0 -1
  176. package/lib/typescript/commonjs/src/DapTarget.d.ts +0 -10
  177. package/lib/typescript/commonjs/src/DapTarget.d.ts.map +0 -1
  178. package/lib/typescript/commonjs/src/useDap.d.ts +0 -2
  179. package/lib/typescript/commonjs/src/useDap.d.ts.map +0 -1
  180. package/lib/typescript/module/src/DapContext.d.ts +0 -3
  181. package/lib/typescript/module/src/DapContext.d.ts.map +0 -1
  182. package/lib/typescript/module/src/DapOverlay.d.ts +0 -2
  183. package/lib/typescript/module/src/DapOverlay.d.ts.map +0 -1
  184. package/lib/typescript/module/src/DapProvider.d.ts +0 -15
  185. package/lib/typescript/module/src/DapProvider.d.ts.map +0 -1
  186. package/lib/typescript/module/src/DapScrollView.d.ts +0 -9
  187. package/lib/typescript/module/src/DapScrollView.d.ts.map +0 -1
  188. package/lib/typescript/module/src/DapTarget.d.ts +0 -10
  189. package/lib/typescript/module/src/DapTarget.d.ts.map +0 -1
  190. package/lib/typescript/module/src/useDap.d.ts +0 -2
  191. package/lib/typescript/module/src/useDap.d.ts.map +0 -1
  192. package/src/DapContext.ts +0 -4
  193. package/src/DapOverlay.tsx +0 -190
  194. package/src/DapProvider.tsx +0 -417
  195. package/src/DapScrollView.tsx +0 -43
  196. package/src/DapTarget.tsx +0 -124
  197. package/src/useDap.ts +0 -10
package/README.md CHANGED
@@ -9,40 +9,42 @@
9
9
 
10
10
  ## ✨ Features
11
11
 
12
- - 🎯 **Multi-Pass Measurement**: Native `measureInWindow` API with self-correcting strategy for animation resilience.
13
- - 📱 **Rotation & Resize Aware**: Targets re-measure automatically on orientation change or split-screen.
14
- - ⚡ **Auto-Start Engine**: Trigger tours instantly on mount with a smart debounce for layout stability.
12
+ - 🎯 **Measured When Shown**: Targets are measured when their step starts, after scrolling into view and once they stop moving, so the highlight matches what's on screen.
13
+ - 🧭 **Navigation Aware**: Screens kept mounted in the background are never highlighted, and steps wait for screen transitions to finish (React Navigation integration included).
14
+ - 🔀 **Tours Across Screens**: A step can navigate to another screen before it is shown.
15
+ - 📜 **Auto-Scroll**: Works with `ScrollView`, `FlatList` and `SectionList`; each target scrolls its own nearest list.
16
+ - ⚡ **No Re-Render Cost**: Mounting and measuring targets re-renders nothing; components subscribe only to the tour state they use.
15
17
  - 💾 **Seen State Caching**: Persistent "only-once" logic with pluggable storage (AsyncStorage, MMKV, etc.).
16
- - 🎨 **Smart Overlays**: Dynamic cutouts with Back/Next/Skip navigation and step indicators.
17
- - 📜 **Auto-Scroll Support**: Bring tour targets into view with `DapScrollView`; the highlight is re-measured after scrolling.
18
- - 🛟 **Never Gets Stuck**: If a step's target isn't on screen, the tour ends cleanly instead of leaving an invisible, active tour.
19
- - 🔁 **Replay on Demand**: `startTour(id, { force: true })`, `resetTour(id)` and `resetAll()` for Help buttons and settings screens.
18
+ - 🛟 **Never Gets Stuck**: If a step's target isn't on screen in time, the tour ends (or skips the step) instead of leaving an invisible, active tour.
19
+ - 🔁 **Replay on Demand**: `startTour(id, { force: true })`, `resetTour(id)` and `resetAll()`, from components or from outside React.
20
20
 
21
21
  ---
22
22
 
23
23
  ## 📦 Installation
24
24
 
25
25
  ```sh
26
- npm install rn-smart-tour
26
+ npm install rn-smart-tour@next # 2.0 beta (this README)
27
+ npm install rn-smart-tour # 1.x (stable)
27
28
  ```
28
29
 
29
- Requires React 17+ and React Native 0.65+. No native code, so no `pod install` or rebuild is needed.
30
+ Requires React 18+ and React Native 0.73+. No native code, so no `pod install` or rebuild is needed. React Navigation (6+) is optional.
30
31
 
31
- Unit-tested against React Native 0.73 (React 18), and checked in the example app on React Native 0.88 (React 19, New Architecture) on iOS.
32
+ Checked on device on iOS and Android with React Native 0.88 (New Architecture), and on iOS with React Native 0.81 on the old architecture, with React Navigation 7. Unit tests run against React Native 0.73.
32
33
 
33
34
  ---
34
35
 
35
36
  ## 🚀 Quick Start
36
37
 
37
38
  ### 1. Wrap your App
38
- Wrap your root component in the `DapProvider` and define your tours.
39
+ Wrap your root component in `TourProvider` and define your tours.
39
40
 
40
41
  ```tsx
41
- import { DapProvider } from 'rn-smart-tour';
42
+ import { TourProvider } from 'rn-smart-tour';
42
43
 
43
44
  const TOURS = {
44
45
  'welcome-tour': {
45
46
  id: 'welcome-tour',
47
+ autoStart: true,
46
48
  steps: [{
47
49
  targetId: 'save-btn',
48
50
  title: 'Welcome!',
@@ -53,96 +55,228 @@ const TOURS = {
53
55
 
54
56
  export default function App() {
55
57
  return (
56
- <DapProvider tours={TOURS}>
58
+ <TourProvider tours={TOURS}>
57
59
  <MainApp />
58
- </DapProvider>
60
+ </TourProvider>
59
61
  );
60
62
  }
61
63
  ```
62
64
 
63
- ### 2. Mark your Target
64
- Wrap any view or button you want to highlight with `DapTarget`.
65
+ ### 2. Mark your Targets
66
+ Wrap any view or button you want to highlight with `TourTarget`.
65
67
 
66
68
  ```tsx
67
- import { DapTarget } from 'rn-smart-tour';
69
+ import { TourTarget } from 'rn-smart-tour';
68
70
 
69
71
  const MyButton = () => (
70
- <DapTarget name="save-btn">
72
+ <TourTarget name="save-btn">
71
73
  <Button title="Save" onPress={...} />
72
- </DapTarget>
74
+ </TourTarget>
73
75
  );
74
76
  ```
75
77
 
76
78
  ### 3. Start the Tour
77
- Set `autoStart: true` on a tour to show it the first time its first target appears, or start it yourself with the `useDap` hook.
79
+ A tour with `autoStart: true` shows the first time its first target appears. Start any tour yourself with `useTour`:
78
80
 
79
81
  ```tsx
80
- import { useDap } from 'rn-smart-tour';
82
+ import { useTour } from 'rn-smart-tour';
81
83
 
82
- const { startTour } = useDap();
84
+ const { startTour } = useTour();
83
85
  // ...
84
86
  // A tour is shown only once. `force: true` replays it, e.g. from a Help button.
85
87
  <Button title="Help" onPress={() => startTour('welcome-tour', { force: true })} />
86
88
  ```
87
89
 
88
- ### 4. Enable Auto-Scroll (Optional)
89
- If your targets are hidden inside a long list, swap your standard `ScrollView` for `DapScrollView`. The tour will automatically scroll to bring each target into the user's view.
90
+ ### 4. Screens (React Navigation)
91
+ Wrap each screen that has targets in `NavigationTourScope`. Its targets then only count while the screen is focused and has finished animating in, so a screen kept mounted in the background is never highlighted.
90
92
 
91
93
  ```tsx
92
- import { DapScrollView } from 'rn-smart-tour';
93
-
94
- // ... inside your screen
95
- <DapScrollView>
96
- <DapTarget name="bottom-btn">
97
- <Button title="Secret Button" ... />
98
- </DapTarget>
99
- </DapScrollView>
94
+ import { NavigationTourScope } from 'rn-smart-tour/react-navigation';
95
+
96
+ const OrdersScreen = () => (
97
+ <NavigationTourScope>
98
+ {/* screen content with TourTargets */}
99
+ </NavigationTourScope>
100
+ );
101
+ ```
102
+
103
+ Not using React Navigation? `TourScope` does the same with an `active` prop you control: `<TourScope active={isVisible}>`.
104
+
105
+ ### 5. Lists (Optional)
106
+ To let tours scroll a target into view, use `TourScrollView` instead of `ScrollView`, or wrap a `FlatList` / `SectionList` in `TourScrollable`:
107
+
108
+ ```tsx
109
+ import { TourScrollable, TourTarget } from 'rn-smart-tour';
110
+
111
+ const listRef = useRef<FlatList>(null);
112
+
113
+ <TourScrollable scrollRef={listRef}>
114
+ <FlatList
115
+ ref={listRef}
116
+ data={items}
117
+ renderItem={({ item }) => (
118
+ <TourTarget name={`item-${item.id}`}>
119
+ <Row item={item} />
120
+ </TourTarget>
121
+ )}
122
+ />
123
+ </TourScrollable>
124
+ ```
125
+
126
+ A target in a virtualized list can only be scrolled to once its row has rendered.
127
+
128
+ ### 6. Tours Across Screens (Optional)
129
+ `beforeEnter` runs before a step looks for its target, e.g. to open the screen it's on. The step then waits for the target to appear on the focused screen.
130
+
131
+ ```tsx
132
+ import { createNavigationContainerRef } from '@react-navigation/native';
133
+
134
+ export const navigationRef = createNavigationContainerRef();
135
+
136
+ const TOURS = {
137
+ orders: {
138
+ id: 'orders',
139
+ steps: [
140
+ { targetId: 'orders-tab', title: 'Orders', description: 'All your orders live here.' },
141
+ {
142
+ targetId: 'new-order',
143
+ title: 'New order',
144
+ description: 'Start one from here.',
145
+ beforeEnter: () => navigationRef.navigate('Orders'),
146
+ },
147
+ ],
148
+ },
149
+ };
100
150
  ```
101
151
 
102
- ### 5. Remember Seen Tours (Optional)
152
+ ### 7. Remember Seen Tours (Optional)
103
153
  Without a `storageAdapter`, "seen" state lasts until the app restarts. Pass any storage with `getItem` / `setItem`:
104
154
 
105
155
  ```tsx
106
156
  import AsyncStorage from '@react-native-async-storage/async-storage';
107
157
 
108
- <DapProvider tours={TOURS} storageAdapter={AsyncStorage}>
158
+ <TourProvider tours={TOURS} storageAdapter={AsyncStorage}>
109
159
  ```
110
160
 
111
161
  ```tsx
112
- import { MMKV } from 'react-native-mmkv';
162
+ import { createMMKV } from 'react-native-mmkv'; // v4; on v3: `const mmkv = new MMKV()`
113
163
 
114
- const mmkv = new MMKV();
164
+ const mmkv = createMMKV();
115
165
  const mmkvAdapter = {
116
166
  getItem: (key: string) => mmkv.getString(key) ?? null,
117
167
  setItem: (key: string, value: string) => mmkv.set(key, value),
118
168
  };
119
169
 
120
- <DapProvider tours={TOURS} storageAdapter={mmkvAdapter}>
170
+ <TourProvider tours={TOURS} storageAdapter={mmkvAdapter}>
121
171
  ```
122
172
 
123
173
  Storage is read once on mount. Calls to `startTour`, `resetTour` and `resetAll` made before it has loaded are queued and run once it has, so an already-seen tour is never shown by mistake.
124
174
 
175
+ ### 8. Your Own Tooltip Card (Optional)
176
+ Render the card with your design system and theme. It is placed beside the target for you (below by default, flipping above when there's no room), using its measured height.
177
+
178
+ ```tsx
179
+ import type { TourTooltipProps } from 'rn-smart-tour';
180
+
181
+ const TourCard = ({ step, stepIndex, stepCount, isFirstStep, isLastStep, next, prev, skip }: TourTooltipProps) => (
182
+ <Card>
183
+ <Title>{step.title}</Title>
184
+ <Body>{step.description}</Body>
185
+ <Row>
186
+ {!isLastStep && <Button title="Skip" onPress={skip} />}
187
+ {!isFirstStep && <Button title="Back" onPress={prev} />}
188
+ <Button title={isLastStep ? 'Done' : `Next (${stepIndex + 1}/${stepCount})`} onPress={next} />
189
+ </Row>
190
+ </Card>
191
+ );
192
+
193
+ <TourProvider
194
+ tours={TOURS}
195
+ renderTooltip={props => <TourCard {...props} />}
196
+ tooltipWidth={320}
197
+ backdropColor="rgba(0, 0, 0, 0.6)">
198
+ ```
199
+
200
+ ### 9. "How do I…?" Walkthroughs (Optional)
201
+ A walkthrough guides the user through a task in the real app — they tap the real buttons and the walkthrough follows along. Start it from a help list instead of automatically.
202
+
203
+ ```tsx
204
+ const TOURS = {
205
+ applyLeave: {
206
+ id: 'applyLeave',
207
+ kind: 'walkthrough',
208
+ title: 'Apply for leave',
209
+ keywords: ['holiday', 'sick'],
210
+ canStart: ctx => (ctx.isOnline ? true : 'Connect to the internet to apply for leave'),
211
+ steps: [
212
+ { title: "Let's apply for leave", description: 'It takes about a minute.' }, // no targetId: centred card
213
+ { targetId: 'menu', title: 'Open the menu', description: '', advanceOn: 'press' },
214
+ { targetId: 'leave', title: 'Tap Leave Management', description: '', advanceOn: 'press' },
215
+ { targetId: 'apply', title: 'Tap Apply Leave', description: '', advanceOn: 'press' },
216
+ { targetId: 'leaveType', title: 'Pick the leave type', description: '' }, // Next button
217
+ { targetId: 'submit', title: 'Tap Submit Request', description: 'This sends a real request.', advanceOn: 'press' },
218
+ { title: 'All done!', description: 'Track it under My Leave requests.' },
219
+ ],
220
+ },
221
+ };
222
+
223
+ <TourProvider
224
+ tours={TOURS}
225
+ context={{ isOnline }} // what canStart / when check
226
+ onStartBlocked={(tour, reason) => Toast.show(reason)} // canStart said no
227
+ >
228
+ ```
229
+
230
+ - `advanceOn: 'press'` — the highlighted element stays tappable; the step moves on when the user taps it. The rest of the screen stays blocked.
231
+ - `advanceOn: { event: 'leaveTypeChosen' }` — moves on when the app calls `emit('leaveTypeChosen')` (from `useTour()` or a controller).
232
+ - `when: ctx => …` — shows a step only when it applies (e.g. managers only); step counts skip hidden steps.
233
+ - If the user leaves the path, a walkthrough **pauses** (instead of ending) and shows a "Resume" chip (`renderResumeChip` to draw your own). Resuming continues from the latest step whose element is on screen, so the user is guided back.
234
+
235
+ List walkthroughs for a help screen with `useTourCatalog`:
236
+
237
+ ```tsx
238
+ const tasks = useTourCatalog({ kind: 'walkthrough', query: searchText });
239
+ // [{ id: 'applyLeave', title: 'Apply for leave', kind: 'walkthrough' }, …]
240
+ const { startTour } = useTour();
241
+ <Button title={task.title} onPress={() => startTour(task.id, { force: true })} />
242
+ ```
243
+
244
+ ### 10. Start Tours from Outside React (Optional)
245
+ For deep links or notification handlers, create a controller and pass it to the provider:
246
+
247
+ ```tsx
248
+ import { createTourController, TourProvider } from 'rn-smart-tour';
249
+
250
+ export const tours = createTourController({ tours: TOURS, storageAdapter: mmkvAdapter });
251
+
252
+ <TourProvider controller={tours}>…</TourProvider>
253
+
254
+ // anywhere:
255
+ tours.startTour('new-feature', { force: true });
256
+ ```
257
+
125
258
  ---
126
259
 
127
260
  ## 🧠 Technical Architecture
128
261
 
129
262
  <details>
130
- <summary><b>View How Measurements Work (Click to expand)</b></summary>
263
+ <summary><b>How Measurement Works (Click to expand)</b></summary>
131
264
 
132
- To guarantee accuracy during navigation animations, `rn-smart-tour` uses a **multi-pass strategy**:
265
+ Targets only register a ref. When a step starts:
133
266
 
134
- - **Pass 1 (100ms)**: Fast first estimate.
135
- - **Pass 2 (500ms)**: Corrects after most screen transitions finish.
136
- - **Pass 3 (1000ms)**: Final safety net for slow async layout shifts.
267
+ 1. `beforeEnter` runs, if the step has one, and is awaited.
268
+ 2. The engine waits for the target to be mounted inside an active scope.
269
+ 3. If the target is in a `TourScrollable` and not fully visible, the list scrolls it to the middle.
270
+ 4. The target is measured every frame until its position holds steady for 3 frames, then the step is shown.
137
271
 
138
- Measurements only trigger a re-render if the position changes by more than **1pt (threshold)**.
272
+ While a step is shown, its target is measured again when its layout changes, the window resizes, the keyboard opens or closes, or the app returns to the foreground. Positions that change by **1pt** or less are ignored.
139
273
 
140
274
  </details>
141
275
 
142
276
  <details>
143
277
  <summary><b>Auto-Start & Debounce Settings</b></summary>
144
278
 
145
- When `autoStart: true` is enabled, the overlay waits **300ms** after registration. This allows the multi-pass system to settle on the final coordinates before the hole is cut into the backdrop.
279
+ When `autoStart: true` is enabled, the tour starts **300ms** after its first target is registered in an active scope, so the rest of the screen can mount first.
146
280
 
147
281
  A tour that is stopped (finished, skipped, or ended because a target was missing) is not auto-started again in the same app session. `startTour` still works, and `resetTour` makes it eligible again.
148
282
 
@@ -152,8 +286,9 @@ A tour that is stopped (finished, skipped, or ended because a target was missing
152
286
  <summary><b>Tour Lifecycle Rules</b></summary>
153
287
 
154
288
  - **Skip**, **Finish** and the **Android back button** end the tour and mark it as seen.
155
- - If a step's target is not on screen within `missingTargetTimeoutMs` (default **3000ms**), the tour ends **without** being marked as seen, and a warning is logged in development.
156
- - When a step becomes active, its target is scrolled into view (inside a `DapScrollView`) and measured again, so the highlight matches where it is now.
289
+ - If a step's target is not on screen within `missingTargetTimeoutMs` (default **3000ms**, or the step's `targetTimeoutMs`), the tour ends **without** being marked as seen, or moves to the next step with `onMissingTarget: 'skip'`. A warning is logged in development.
290
+ - If the target of the step being shown disappears (unmounts, or its screen loses focus), the step is hidden until it comes back, within the same timeout.
291
+ - While moving to the next step, the current one stays on screen until the next target is measured, and extra taps on **Next** are ignored.
157
292
 
158
293
  </details>
159
294
 
@@ -161,53 +296,93 @@ A tour that is stopped (finished, skipped, or ended because a target was missing
161
296
 
162
297
  ## 🛠 API Reference
163
298
 
164
- ### DapProvider
299
+ ### TourProvider
165
300
  | Property | Type | Default | Description |
166
301
  |:---|:---|:---|:---|
167
302
  | `tours` | `Record<string, Tour>` | — | All tours, keyed by id. |
168
303
  | `storageAdapter` | `StorageAdapter` | — | Persists seen tours (AsyncStorage, MMKV, …). Read once on mount. |
169
- | `missingTargetTimeoutMs` | `number` | `3000` | How long a step waits for its target before the tour ends. |
304
+ | `missingTargetTimeoutMs` | `number` | `3000` | How long a step waits for its target. |
305
+ | `controller` | `TourController` | — | From `createTourController`, instead of `tours` / `storageAdapter`. |
306
+ | `renderTooltip` | `(props: TourTooltipProps) => ReactNode` | built-in card | Draws the tooltip card. Receives the step, its index and count, and `next` / `prev` / `skip`. |
307
+ | `tooltipWidth` | `number` | `280` | Card width (capped to the screen). |
308
+ | `backdropColor` | `string` | `'rgba(0, 0, 0, 0.6)'` | Color of the dimmed area around the target. |
309
+ | `presentation` | `'root' \| 'modal'` | `'root'` | `'root'` draws the overlay as a layer over the app; the app's own modals open above it. `'modal'` uses a React Native `Modal` (only for tours inside another Modal). |
310
+ | `supportedOrientations` | `ModalProps['supportedOrientations']` | all | With `presentation="modal"`: iOS orientations the overlay allows (still limited by Info.plist). |
311
+ | `context` | `Record<string, unknown>` | `{}` | App state that `canStart` and step `when` receive. |
312
+ | `onStartBlocked` | `(tour, reason) => void` | — | A tour's `canStart` refused a `startTour` call; show `reason` to the user. |
313
+ | `renderResumeChip` | `(props: ResumeChipProps) => ReactNode` | built-in chip | Draws the "Resume" chip shown while a tour is paused (`tour`, `resume`, `dismiss`). |
314
+ | `highlightColor` | `string` | `'#FFFFFF'` | Ring around an element the user should tap. |
170
315
 
171
316
  ### Tour Configuration
172
317
  | Property | Type | Description |
173
318
  |:---|:---|:---|
174
319
  | `id` | `string` | Unique identifier for caching. |
175
- | `autoStart` | `boolean` | Trigger as soon as the first target mounts. |
320
+ | `autoStart` | `boolean` | Start the first time the first step with a target appears. |
176
321
  | `steps` | `TourStep[]` | Sequence of highlight steps. |
177
-
178
- ### DapScrollView
179
- A direct drop-in replacement for the React Native `ScrollView`. Supports all standard props, and a `ref` is forwarded to the inner `ScrollView`.
180
- | Property | Type | Description |
181
- |:---|:---|:---|
182
- | `children` | `React.Node` | Components to scroll. |
183
- | `...props` | `ScrollViewProps` | Standard props are forwarded to the native ScrollView. |
184
-
185
- ### DapTarget
186
- | Property | Type | Description |
187
- |:---|:---|:---|
188
- | `name` | `string` | Unique identifier that matches a `targetId` in a tour step. |
189
- | `children` | `ReactElement` | The UI element to wrap and highlight. |
190
- | `...props` | `ViewProps` | All standard React Native `View` props are forwarded. |
322
+ | `kind` | `'tour' \| 'walkthrough'` | Walkthroughs pause on a missing target and say "Exit". Default `'tour'`. |
323
+ | `title` / `description` / `keywords` | `string` / `string` / `string[]` | Shown and searched by `useTourCatalog`. |
324
+ | `canStart` | `(context) => boolean \| string` | Return `true`, or a reason the tour can't start. |
191
325
 
192
326
  ### TourStep
193
327
  | Property | Type | Default | Description |
194
328
  |:---|:---|:---|:---|
195
- | `targetId` | `string` | — | Matches the `name` prop in `<DapTarget>`. |
329
+ | `targetId` | `string` | — | Matches the `name` prop of a `<TourTarget>`. Leave out for a centred card. |
196
330
  | `title` | `string` | — | Tooltip header. |
197
331
  | `description` | `string` | — | Tooltip body. |
198
332
  | `position` | `string` | `'bottom'` | `top`, `bottom`, `left`, `right`. |
333
+ | `beforeEnter` | `() => void \| Promise<void>` | — | Runs (and is awaited) before the step looks for its target. |
334
+ | `advanceOn` | `'next' \| 'press' \| { event }` | `'next'` | How the step moves on: Next button, a tap on the element, or an app event. |
335
+ | `when` | `(context) => boolean` | — | Show the step only when this returns true. |
336
+ | `onMissingTarget` | `'end' \| 'skip' \| 'pause'` | `'end'` (`'pause'` for walkthroughs) | What happens if the target isn't found in time. |
337
+ | `targetTimeoutMs` | `number` | provider's | Per-step override of `missingTargetTimeoutMs`. |
199
338
 
200
- ### `useDap()` Hook
201
- | Method | Description |
339
+ ### TourTarget
340
+ | Property | Type | Description |
341
+ |:---|:---|:---|
342
+ | `name` | `string` | Matches a `targetId` in a tour step. |
343
+ | `children` | `ReactNode` | The UI element to wrap and highlight. |
344
+ | `...props` | `ViewProps` | All standard React Native `View` props are forwarded. |
345
+
346
+ ### TourScope / NavigationTourScope
347
+ | Component | Props | Description |
348
+ |:---|:---|:---|
349
+ | `TourScope` | `active?: boolean` (default `true`) | Targets inside only count while `active` (and every parent scope is active). |
350
+ | `NavigationTourScope` | — | From `rn-smart-tour/react-navigation`. Active while the screen is focused and not animating. |
351
+
352
+ ### TourScrollable / TourScrollView
353
+ | Component | Props | Description |
354
+ |:---|:---|:---|
355
+ | `TourScrollable` | `scrollRef`, `horizontal?` | Lets tours scroll targets inside the referenced `ScrollView` / `FlatList` / `SectionList`. |
356
+ | `TourScrollView` | `ScrollViewProps` | A `ScrollView` already wrapped in `TourScrollable`. A `ref` is forwarded. |
357
+
358
+ ### `useTour()` Hook
359
+ | Member | Description |
202
360
  |:---|:---|
203
361
  | `startTour(id, options?)` | Start a tour by ID. Does nothing if it was already seen, unless `{ force: true }`. |
204
362
  | `stopTour(markAsSeen?)`| End tour. Pass `false` to keep it unread. |
205
363
  | `nextStep()` / `prevStep()` | Manual step navigation. |
206
364
  | `resetTour(id)` | Mark a tour as unseen so it can show (and auto-start) again. |
207
365
  | `resetAll()` | Mark every tour as unseen. |
366
+ | `status` | `'idle'`, `'waiting'` (looking for the step's target), `'active'` or `'paused'`. |
208
367
  | `activeTour` | Current active tour object. |
209
368
  | `currentStepIndex` | Current step number (0-indexed). |
210
369
  | `seenTours` | `Record<string, boolean>` of tours already seen. |
370
+ | `emit(event)` | Report an app event, for steps with `advanceOn: { event }`. |
371
+ | `pauseTour()` / `resumeTour()` | Put the running tour on hold / continue it. |
372
+
373
+ `useTourState(selector)` subscribes to any slice of the tour state and re-renders only when it changes.
374
+
375
+ ---
376
+
377
+ ## ⬆️ Upgrading from 1.x
378
+
379
+ The 1.x names still work and are deprecated: `DapProvider` → `TourProvider`, `DapTarget` → `TourTarget`, `DapScrollView` → `TourScrollView`, `useDap` → `useTour`. Seen tours stored by 1.x are kept.
380
+
381
+ Behaviour changes:
382
+ - React ≥ 18 and React Native ≥ 0.73 are required.
383
+ - A step appears a few frames after it starts (once its target has stopped moving), not immediately.
384
+ - `useDap().targets` only contains the measurement of the step being shown, and `requestScroll` does nothing; scrolling is automatic.
385
+ - Wrap screens in `NavigationTourScope` (or `TourScope`) to stop targets on background screens from being used.
211
386
 
212
387
  ---
213
388
 
@@ -219,9 +394,10 @@ Contributions are welcome! Please feel free to submit a Pull Request.
219
394
  npm install
220
395
  npm run typecheck && npm run lint && npm test # what CI runs
221
396
  npm run build # outputs lib/ (CommonJS, ES modules, types)
397
+ npm publish --tag next # prereleases (betas); `npm publish` for stable versions
222
398
  ```
223
399
 
224
- The `example/` app loads the library straight from `src/`, so changes show up without a build:
400
+ The `example/` app (React Native 0.88, React Navigation) loads the library straight from `src/`, so changes show up without a build:
225
401
 
226
402
  ```sh
227
403
  cd example && npm install
@@ -233,4 +409,4 @@ npm run ios # or: npm run android
233
409
 
234
410
  <p align="center">
235
411
  <b>rn-smart-tour</b> • Built with ❤️ for the React Native community.
236
- </p>
412
+ </p>
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DapTarget = exports.DapScrollView = exports.DapProvider = void 0;
7
+ exports.useDap = useDap;
8
+ var _react = require("react");
9
+ var _context = require("./react/context.js");
10
+ var _hooks = require("./react/hooks.js");
11
+ var _TourProvider = require("./react/TourProvider.js");
12
+ var _TourScrollable = require("./react/TourScrollable.js");
13
+ var _TourTarget = require("./react/TourTarget.js");
14
+ /**
15
+ * The 1.x API (`Dap*` names and `useDap`), kept so existing apps keep working.
16
+ * New code should use `TourProvider`, `TourTarget`, `TourScrollView` and `useTour`.
17
+ */
18
+
19
+ /** @deprecated Use `TourProvider`. */
20
+ const DapProvider = exports.DapProvider = _TourProvider.TourProvider;
21
+ /** @deprecated Use `TourProviderProps`. */
22
+
23
+ /** @deprecated Use `TourTarget`. */
24
+ const DapTarget = exports.DapTarget = _TourTarget.TourTarget;
25
+ /** @deprecated Use `TourScrollView`. */
26
+ const DapScrollView = exports.DapScrollView = _TourScrollable.TourScrollView;
27
+ /**
28
+ * 1.x `registerTarget` / `unregisterTarget`, created once per engine: callers
29
+ * register from effects, so the functions must keep the same identity across renders.
30
+ */
31
+ const legacyRegistries = new WeakMap();
32
+ function getLegacyRegistry(engine) {
33
+ let registry = legacyRegistries.get(engine);
34
+ if (!registry) {
35
+ const registrations = new Map();
36
+ const unregisterTarget = id => {
37
+ registrations.get(id)?.();
38
+ registrations.delete(id);
39
+ };
40
+ const registerTarget = (id, measurement, ref) => {
41
+ unregisterTarget(id);
42
+ // Without a ref, report the given measurement whenever the engine measures.
43
+ const measurable = ref ?? {
44
+ measureInWindow: cb => cb(measurement.x, measurement.y, measurement.width, measurement.height)
45
+ };
46
+ registrations.set(id, engine.registerTarget(id, {
47
+ ref: {
48
+ current: measurable
49
+ },
50
+ scope: null,
51
+ scrollable: null
52
+ }));
53
+ };
54
+ registry = {
55
+ registerTarget,
56
+ unregisterTarget
57
+ };
58
+ legacyRegistries.set(engine, registry);
59
+ }
60
+ return registry;
61
+ }
62
+ const noop = () => {};
63
+
64
+ /** @deprecated Use `useTour`. */
65
+ function useDap() {
66
+ const engine = (0, _react.useContext)(_context.TourEngineContext);
67
+ if (!engine) {
68
+ throw new Error('useDap must be used within a DapProvider');
69
+ }
70
+ const api = (0, _hooks.useTour)();
71
+ // 1.x consumers re-rendered on every measurement and could read `targets`.
72
+ const presented = (0, _hooks.useTourState)(state => state.presented);
73
+ return (0, _react.useMemo)(() => {
74
+ const presentedStep = presented && engine.getTour(presented.tourId)?.steps[presented.stepIndex];
75
+ return {
76
+ ...api,
77
+ ...getLegacyRegistry(engine),
78
+ targets: presented?.rect && presentedStep?.targetId ? {
79
+ [presentedStep.targetId]: presented.rect
80
+ } : {},
81
+ requestScroll: noop,
82
+ _registerScrollRef: noop,
83
+ _unregisterScrollRef: noop
84
+ };
85
+ }, [engine, api, presented]);
86
+ }
87
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_context","_hooks","_TourProvider","_TourScrollable","_TourTarget","DapProvider","exports","TourProvider","DapTarget","TourTarget","DapScrollView","TourScrollView","legacyRegistries","WeakMap","getLegacyRegistry","engine","registry","get","registrations","Map","unregisterTarget","id","delete","registerTarget","measurement","ref","measurable","measureInWindow","cb","x","y","width","height","set","current","scope","scrollable","noop","useDap","useContext","TourEngineContext","Error","api","useTour","presented","useTourState","state","useMemo","presentedStep","getTour","tourId","steps","stepIndex","targets","rect","targetId","requestScroll","_registerScrollRef","_unregisterScrollRef"],"sourceRoot":"../../src","sources":["compat.ts"],"mappings":"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","ignoreList":[]}