@userflow-tech/react-native 0.2.0 → 0.3.1

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 (966) hide show
  1. package/README.md +435 -134
  2. package/app.plugin.js +11 -3
  3. package/babel-plugin/index.d.ts.map +1 -1
  4. package/babel-plugin/index.js +53 -6
  5. package/babel-plugin/index.js.map +1 -1
  6. package/babel-plugin.js +11 -3
  7. package/docs/anchoring.md +58 -42
  8. package/docs/deep-linking.md +70 -33
  9. package/docs/isolation.md +75 -0
  10. package/docs/troubleshooting.md +103 -44
  11. package/docs/webview-custom-banner-poc.md +64 -0
  12. package/expo-plugin/hostDependencyWarnings.d.ts +18 -0
  13. package/expo-plugin/hostDependencyWarnings.d.ts.map +1 -0
  14. package/expo-plugin/hostDependencyWarnings.js +91 -0
  15. package/expo-plugin/hostDependencyWarnings.js.map +1 -0
  16. package/expo-plugin/withUserflow.d.ts +3 -2
  17. package/expo-plugin/withUserflow.d.ts.map +1 -1
  18. package/expo-plugin/withUserflow.js +30 -8
  19. package/expo-plugin/withUserflow.js.map +1 -1
  20. package/lib/commonjs/anchors/AnchorRegistry.js +7 -0
  21. package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -1
  22. package/lib/commonjs/anchors/AutoAnchorRegistry.js +37 -11
  23. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
  24. package/lib/commonjs/anchors/elementConditionEvaluator.js +189 -55
  25. package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
  26. package/lib/commonjs/anchors/elementTapMonitor.js +92 -0
  27. package/lib/commonjs/anchors/elementTapMonitor.js.map +1 -0
  28. package/lib/commonjs/anchors/elementTargetMatch.js +85 -0
  29. package/lib/commonjs/anchors/elementTargetMatch.js.map +1 -0
  30. package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
  31. package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
  32. package/lib/commonjs/anchors/fiber/findAnchorFiber.js +122 -87
  33. package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
  34. package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
  35. package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
  36. package/lib/commonjs/anchors/fiber/touchTargetFiber.js +105 -0
  37. package/lib/commonjs/anchors/fiber/touchTargetFiber.js.map +1 -0
  38. package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
  39. package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
  40. package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
  41. package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
  42. package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
  43. package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
  44. package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
  45. package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
  46. package/lib/commonjs/anchors/resolveAnchorHost.js +2 -1
  47. package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
  48. package/lib/commonjs/anchors/resolveAutoAnchorHost.js +26 -17
  49. package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
  50. package/lib/commonjs/anchors/resolveElementTargets.js +158 -0
  51. package/lib/commonjs/anchors/resolveElementTargets.js.map +1 -0
  52. package/lib/commonjs/anchors/semanticMatcher.js +26 -8
  53. package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
  54. package/lib/commonjs/anchors/targetPressMonitor.js +9 -3
  55. package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -1
  56. package/lib/commonjs/anchors/useUserflowAnchor.js +1 -0
  57. package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -1
  58. package/lib/commonjs/anonymousId.js +19 -7
  59. package/lib/commonjs/anonymousId.js.map +1 -1
  60. package/lib/commonjs/authoring/ElementPickerOverlay.js +126 -50
  61. package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
  62. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +32 -10
  63. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -1
  64. package/lib/commonjs/authoring/chrome/ChromeButton.js +8 -3
  65. package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -1
  66. package/lib/commonjs/authoring/chrome/ChromeIcon.js +4 -0
  67. package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -1
  68. package/lib/commonjs/authoring/chrome/ChromeTopBar.js +23 -10
  69. package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -1
  70. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +19 -12
  71. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -1
  72. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +10 -0
  73. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -1
  74. package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
  75. package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  76. package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  77. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
  78. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  79. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  80. package/lib/commonjs/authoring/chrome/tokens.js +7 -6
  81. package/lib/commonjs/authoring/chrome/tokens.js.map +1 -1
  82. package/lib/commonjs/authoring/elementPickerController.js.map +1 -1
  83. package/lib/commonjs/authoring/fingerprintFromInstance.js +204 -4
  84. package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
  85. package/lib/commonjs/authoring/hitTest.js +264 -16
  86. package/lib/commonjs/authoring/hitTest.js.map +1 -1
  87. package/lib/commonjs/authoring/hostAtPoint.js +204 -0
  88. package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
  89. package/lib/commonjs/content/BannerStepButton.js +68 -0
  90. package/lib/commonjs/content/BannerStepButton.js.map +1 -0
  91. package/lib/commonjs/content/buttonAppearance.js +16 -0
  92. package/lib/commonjs/content/buttonAppearance.js.map +1 -1
  93. package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
  94. package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
  95. package/lib/commonjs/content/themeColor.js +15 -0
  96. package/lib/commonjs/content/themeColor.js.map +1 -1
  97. package/lib/commonjs/deepLinking.js +4 -4
  98. package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
  99. package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
  100. package/lib/commonjs/evalJs/bootstrap.js +84 -0
  101. package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
  102. package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
  103. package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
  104. package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
  105. package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
  106. package/lib/commonjs/evalJs/evalJsController.js +124 -0
  107. package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
  108. package/lib/commonjs/evalJs/getWebView.js +81 -0
  109. package/lib/commonjs/evalJs/getWebView.js.map +1 -0
  110. package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
  111. package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
  112. package/lib/commonjs/evalJs/types.js +2 -0
  113. package/lib/commonjs/evalJs/types.js.map +1 -0
  114. package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
  115. package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
  116. package/lib/commonjs/expo-router/index.js +19 -0
  117. package/lib/commonjs/expo-router/index.js.map +1 -1
  118. package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
  119. package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
  120. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +2 -2
  121. package/lib/commonjs/index.js +123 -43
  122. package/lib/commonjs/index.js.map +1 -1
  123. package/lib/commonjs/installCheck.js +151 -0
  124. package/lib/commonjs/installCheck.js.map +1 -0
  125. package/lib/commonjs/lifecycle.js.map +1 -1
  126. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +14 -11
  127. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
  128. package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
  129. package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
  130. package/lib/commonjs/pairing/PairingController.js +245 -27
  131. package/lib/commonjs/pairing/PairingController.js.map +1 -1
  132. package/lib/commonjs/pairing/PreviewModeBanner.js +55 -16
  133. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
  134. package/lib/commonjs/pairing/deepLink.js +22 -5
  135. package/lib/commonjs/pairing/deepLink.js.map +1 -1
  136. package/lib/commonjs/pairing/deviceId.js +50 -0
  137. package/lib/commonjs/pairing/deviceId.js.map +1 -0
  138. package/lib/commonjs/pairing/diagnostics.js +5 -4
  139. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  140. package/lib/commonjs/pairing/tokenStorage.js +47 -7
  141. package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
  142. package/lib/commonjs/pairing/usePairingState.js +3 -1
  143. package/lib/commonjs/pairing/usePairingState.js.map +1 -1
  144. package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
  145. package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
  146. package/lib/commonjs/runtime/BannerHost.js +96 -0
  147. package/lib/commonjs/runtime/BannerHost.js.map +1 -0
  148. package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
  149. package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
  150. package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
  151. package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
  152. package/lib/commonjs/runtime/TargetPressBridge.js +31 -13
  153. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
  154. package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
  155. package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
  156. package/lib/commonjs/runtime/UserflowProvider.js +138 -65
  157. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
  158. package/lib/commonjs/runtime/bannerEngine.js +63 -0
  159. package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
  160. package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
  161. package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
  162. package/lib/commonjs/runtime/bannerPlacement.js +37 -0
  163. package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
  164. package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
  165. package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
  166. package/lib/commonjs/runtime/flowEngine.js +75 -3
  167. package/lib/commonjs/runtime/flowEngine.js.map +1 -1
  168. package/lib/commonjs/runtime/isolateCall.js +48 -0
  169. package/lib/commonjs/runtime/isolateCall.js.map +1 -0
  170. package/lib/commonjs/runtime/reportSdkError.js +19 -0
  171. package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
  172. package/lib/commonjs/runtime/useBannerSession.js +37 -0
  173. package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
  174. package/lib/commonjs/screenTracker.js +34 -9
  175. package/lib/commonjs/screenTracker.js.map +1 -1
  176. package/lib/commonjs/storage/asyncStorage.js +67 -0
  177. package/lib/commonjs/storage/asyncStorage.js.map +1 -0
  178. package/lib/commonjs/surfaces/BannerBar.js +160 -0
  179. package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
  180. package/lib/commonjs/surfaces/BannerSurface.js +78 -0
  181. package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
  182. package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
  183. package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
  184. package/lib/commonjs/surfaces/ModalSurface.js +1 -1
  185. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
  186. package/lib/commonjs/surfaces/TooltipSurface.js +17 -1
  187. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
  188. package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
  189. package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
  190. package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
  191. package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
  192. package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
  193. package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
  194. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
  195. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
  196. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
  197. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
  198. package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
  199. package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
  200. package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
  201. package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
  202. package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
  203. package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
  204. package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
  205. package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
  206. package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
  207. package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
  208. package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
  209. package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
  210. package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
  211. package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
  212. package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
  213. package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
  214. package/lib/commonjs/surfaces/safeArea.js +76 -13
  215. package/lib/commonjs/surfaces/safeArea.js.map +1 -1
  216. package/lib/commonjs/version.js +1 -1
  217. package/lib/module/anchors/AnchorRegistry.js +7 -0
  218. package/lib/module/anchors/AnchorRegistry.js.map +1 -1
  219. package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
  220. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
  221. package/lib/module/anchors/elementConditionEvaluator.js +189 -55
  222. package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
  223. package/lib/module/anchors/elementTapMonitor.js +87 -0
  224. package/lib/module/anchors/elementTapMonitor.js.map +1 -0
  225. package/lib/module/anchors/elementTargetMatch.js +78 -0
  226. package/lib/module/anchors/elementTargetMatch.js.map +1 -0
  227. package/lib/module/anchors/fiber/fiberPath.js +118 -0
  228. package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
  229. package/lib/module/anchors/fiber/findAnchorFiber.js +120 -87
  230. package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
  231. package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
  232. package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
  233. package/lib/module/anchors/fiber/touchTargetFiber.js +100 -0
  234. package/lib/module/anchors/fiber/touchTargetFiber.js.map +1 -0
  235. package/lib/module/anchors/fiber/visibleRect.js +139 -0
  236. package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
  237. package/lib/module/anchors/fiber/visibleScreens.js +73 -37
  238. package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
  239. package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
  240. package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
  241. package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
  242. package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
  243. package/lib/module/anchors/resolveAnchorHost.js +2 -1
  244. package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
  245. package/lib/module/anchors/resolveAutoAnchorHost.js +25 -18
  246. package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
  247. package/lib/module/anchors/resolveElementTargets.js +152 -0
  248. package/lib/module/anchors/resolveElementTargets.js.map +1 -0
  249. package/lib/module/anchors/semanticMatcher.js +26 -9
  250. package/lib/module/anchors/semanticMatcher.js.map +1 -1
  251. package/lib/module/anchors/targetPressMonitor.js +8 -3
  252. package/lib/module/anchors/targetPressMonitor.js.map +1 -1
  253. package/lib/module/anchors/useUserflowAnchor.js +1 -0
  254. package/lib/module/anchors/useUserflowAnchor.js.map +1 -1
  255. package/lib/module/anonymousId.js +18 -6
  256. package/lib/module/anonymousId.js.map +1 -1
  257. package/lib/module/authoring/ElementPickerOverlay.js +128 -52
  258. package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
  259. package/lib/module/authoring/chrome/ChromeBottomSheet.js +32 -10
  260. package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -1
  261. package/lib/module/authoring/chrome/ChromeButton.js +8 -3
  262. package/lib/module/authoring/chrome/ChromeButton.js.map +1 -1
  263. package/lib/module/authoring/chrome/ChromeIcon.js +4 -0
  264. package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -1
  265. package/lib/module/authoring/chrome/ChromeTopBar.js +23 -10
  266. package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -1
  267. package/lib/module/authoring/chrome/DoubleTapBridge.js +19 -12
  268. package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -1
  269. package/lib/module/authoring/chrome/doubleTapMonitor.js +10 -0
  270. package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -1
  271. package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
  272. package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  273. package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  274. package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
  275. package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  276. package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  277. package/lib/module/authoring/chrome/tokens.js +7 -6
  278. package/lib/module/authoring/chrome/tokens.js.map +1 -1
  279. package/lib/module/authoring/elementPickerController.js.map +1 -1
  280. package/lib/module/authoring/fingerprintFromInstance.js +198 -4
  281. package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
  282. package/lib/module/authoring/hitTest.js +264 -18
  283. package/lib/module/authoring/hitTest.js.map +1 -1
  284. package/lib/module/authoring/hostAtPoint.js +199 -0
  285. package/lib/module/authoring/hostAtPoint.js.map +1 -0
  286. package/lib/module/content/BannerStepButton.js +63 -0
  287. package/lib/module/content/BannerStepButton.js.map +1 -0
  288. package/lib/module/content/buttonAppearance.js +14 -0
  289. package/lib/module/content/buttonAppearance.js.map +1 -1
  290. package/lib/module/content/resolveBannerButtonChrome.js +41 -0
  291. package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
  292. package/lib/module/content/themeColor.js +14 -0
  293. package/lib/module/content/themeColor.js.map +1 -1
  294. package/lib/module/deepLinking.js +4 -4
  295. package/lib/module/evalJs/EvalJsHost.js +239 -0
  296. package/lib/module/evalJs/EvalJsHost.js.map +1 -0
  297. package/lib/module/evalJs/bootstrap.js +76 -0
  298. package/lib/module/evalJs/bootstrap.js.map +1 -0
  299. package/lib/module/evalJs/bridgeMessages.js +139 -0
  300. package/lib/module/evalJs/bridgeMessages.js.map +1 -0
  301. package/lib/module/evalJs/evalJsBridge.js +25 -0
  302. package/lib/module/evalJs/evalJsBridge.js.map +1 -0
  303. package/lib/module/evalJs/evalJsController.js +119 -0
  304. package/lib/module/evalJs/evalJsController.js.map +1 -0
  305. package/lib/module/evalJs/getWebView.js +76 -0
  306. package/lib/module/evalJs/getWebView.js.map +1 -0
  307. package/lib/module/evalJs/injectEvalPending.js +15 -0
  308. package/lib/module/evalJs/injectEvalPending.js.map +1 -0
  309. package/lib/module/evalJs/types.js +2 -0
  310. package/lib/module/evalJs/types.js.map +1 -0
  311. package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
  312. package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
  313. package/lib/module/expo-router/index.js +1 -0
  314. package/lib/module/expo-router/index.js.map +1 -1
  315. package/lib/module/expo-router/redirectSystemPath.js +70 -0
  316. package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
  317. package/lib/module/expo-router/useUserflowExpoRouter.js +2 -2
  318. package/lib/module/index.js +119 -45
  319. package/lib/module/index.js.map +1 -1
  320. package/lib/module/installCheck.js +139 -0
  321. package/lib/module/installCheck.js.map +1 -0
  322. package/lib/module/lifecycle.js.map +1 -1
  323. package/lib/module/navigation/WithUserflowReactNavigation.js +14 -11
  324. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
  325. package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
  326. package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
  327. package/lib/module/pairing/PairingController.js +245 -27
  328. package/lib/module/pairing/PairingController.js.map +1 -1
  329. package/lib/module/pairing/PreviewModeBanner.js +54 -16
  330. package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
  331. package/lib/module/pairing/deepLink.js +21 -5
  332. package/lib/module/pairing/deepLink.js.map +1 -1
  333. package/lib/module/pairing/deviceId.js +45 -0
  334. package/lib/module/pairing/deviceId.js.map +1 -0
  335. package/lib/module/pairing/diagnostics.js +5 -4
  336. package/lib/module/pairing/diagnostics.js.map +1 -1
  337. package/lib/module/pairing/tokenStorage.js +47 -7
  338. package/lib/module/pairing/tokenStorage.js.map +1 -1
  339. package/lib/module/pairing/usePairingState.js +3 -1
  340. package/lib/module/pairing/usePairingState.js.map +1 -1
  341. package/lib/module/pairing/usePreviewBarHold.js +134 -0
  342. package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
  343. package/lib/module/runtime/BannerHost.js +92 -0
  344. package/lib/module/runtime/BannerHost.js.map +1 -0
  345. package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
  346. package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
  347. package/lib/module/runtime/SdkErrorBoundary.js +55 -0
  348. package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
  349. package/lib/module/runtime/TargetPressBridge.js +31 -13
  350. package/lib/module/runtime/TargetPressBridge.js.map +1 -1
  351. package/lib/module/runtime/UserflowOverlay.js +92 -0
  352. package/lib/module/runtime/UserflowOverlay.js.map +1 -0
  353. package/lib/module/runtime/UserflowProvider.js +139 -66
  354. package/lib/module/runtime/UserflowProvider.js.map +1 -1
  355. package/lib/module/runtime/bannerEngine.js +55 -0
  356. package/lib/module/runtime/bannerEngine.js.map +1 -0
  357. package/lib/module/runtime/bannerEngineContext.js +7 -0
  358. package/lib/module/runtime/bannerEngineContext.js.map +1 -0
  359. package/lib/module/runtime/bannerPlacement.js +30 -0
  360. package/lib/module/runtime/bannerPlacement.js.map +1 -0
  361. package/lib/module/runtime/embedBannerRegistry.js +24 -0
  362. package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
  363. package/lib/module/runtime/flowEngine.js +72 -3
  364. package/lib/module/runtime/flowEngine.js.map +1 -1
  365. package/lib/module/runtime/isolateCall.js +43 -0
  366. package/lib/module/runtime/isolateCall.js.map +1 -0
  367. package/lib/module/runtime/reportSdkError.js +15 -0
  368. package/lib/module/runtime/reportSdkError.js.map +1 -0
  369. package/lib/module/runtime/useBannerSession.js +33 -0
  370. package/lib/module/runtime/useBannerSession.js.map +1 -0
  371. package/lib/module/screenTracker.js +33 -9
  372. package/lib/module/screenTracker.js.map +1 -1
  373. package/lib/module/storage/asyncStorage.js +61 -0
  374. package/lib/module/storage/asyncStorage.js.map +1 -0
  375. package/lib/module/surfaces/BannerBar.js +155 -0
  376. package/lib/module/surfaces/BannerBar.js.map +1 -0
  377. package/lib/module/surfaces/BannerSurface.js +72 -0
  378. package/lib/module/surfaces/BannerSurface.js.map +1 -0
  379. package/lib/module/surfaces/MadeWithUserflow.js +11 -7
  380. package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
  381. package/lib/module/surfaces/ModalSurface.js +1 -1
  382. package/lib/module/surfaces/ModalSurface.js.map +1 -1
  383. package/lib/module/surfaces/TooltipSurface.js +17 -1
  384. package/lib/module/surfaces/TooltipSurface.js.map +1 -1
  385. package/lib/module/surfaces/bannerBarLayout.js +69 -0
  386. package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
  387. package/lib/module/surfaces/bannerBarTokens.js +37 -0
  388. package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
  389. package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
  390. package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
  391. package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
  392. package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
  393. package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
  394. package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
  395. package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
  396. package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
  397. package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
  398. package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
  399. package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
  400. package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
  401. package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
  402. package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
  403. package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
  404. package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
  405. package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
  406. package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
  407. package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
  408. package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
  409. package/lib/module/surfaces/resolveBannerTheme.js +16 -0
  410. package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
  411. package/lib/module/surfaces/safeArea.js +72 -13
  412. package/lib/module/surfaces/safeArea.js.map +1 -1
  413. package/lib/module/version.js +1 -1
  414. package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +7 -0
  415. package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +14 -0
  417. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  418. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +12 -16
  419. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  420. package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts +36 -0
  421. package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts.map +1 -0
  422. package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts +20 -0
  423. package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts.map +1 -0
  424. package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
  425. package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +21 -8
  427. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
  428. package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
  429. package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
  430. package/lib/typescript/commonjs/src/anchors/fiber/touchTargetFiber.d.ts +24 -0
  431. package/lib/typescript/commonjs/src/anchors/fiber/touchTargetFiber.d.ts.map +1 -0
  432. package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
  433. package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
  434. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
  435. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
  437. package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
  438. package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
  439. package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
  440. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +2 -1
  441. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  442. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
  443. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts +39 -0
  445. package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts.map +1 -0
  446. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +6 -4
  447. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
  448. package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +2 -0
  449. package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -1
  450. package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -1
  451. package/lib/typescript/commonjs/src/anonymousId.d.ts +3 -0
  452. package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
  453. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +1 -0
  454. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
  456. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
  458. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +1 -1
  459. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
  460. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
  461. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
  462. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
  464. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +7 -6
  466. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +2 -3
  468. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -1
  469. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +57 -2
  470. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
  471. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +47 -3
  472. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
  473. package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
  474. package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
  475. package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
  476. package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
  477. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
  478. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
  479. package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
  480. package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
  481. package/lib/typescript/commonjs/src/content/themeColor.d.ts +2 -0
  482. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
  483. package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
  484. package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
  485. package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
  486. package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
  487. package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
  488. package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
  489. package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
  490. package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
  491. package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
  492. package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
  493. package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
  494. package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
  495. package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
  496. package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
  497. package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
  498. package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
  499. package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
  500. package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
  501. package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
  502. package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
  503. package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
  504. package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
  505. package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
  506. package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
  507. package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
  508. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
  509. package/lib/typescript/commonjs/src/index.d.ts +16 -1
  510. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  511. package/lib/typescript/commonjs/src/installCheck.d.ts +33 -0
  512. package/lib/typescript/commonjs/src/installCheck.d.ts.map +1 -0
  513. package/lib/typescript/commonjs/src/lifecycle.d.ts +4 -1
  514. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
  515. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  516. package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
  517. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +71 -4
  518. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
  519. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +9 -1
  520. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  521. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
  522. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
  523. package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
  524. package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
  525. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +3 -2
  526. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
  527. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +14 -2
  528. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
  529. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
  530. package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
  531. package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
  532. package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
  533. package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
  534. package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
  535. package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
  536. package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
  537. package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
  538. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +2 -1
  539. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
  540. package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
  541. package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
  542. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +9 -3
  543. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
  544. package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
  545. package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
  546. package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
  547. package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
  548. package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
  549. package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
  550. package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
  551. package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
  552. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
  553. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
  554. package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
  555. package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
  556. package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
  557. package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
  558. package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
  559. package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
  560. package/lib/typescript/commonjs/src/screenTracker.d.ts +7 -3
  561. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
  562. package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts +15 -0
  563. package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts.map +1 -0
  564. package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
  565. package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
  566. package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
  567. package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
  568. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
  569. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
  570. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
  571. package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
  572. package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
  573. package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
  574. package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
  575. package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
  576. package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
  577. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
  578. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
  579. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
  580. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
  581. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
  582. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
  583. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
  584. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
  585. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
  586. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
  587. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
  588. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
  589. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
  590. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
  591. package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
  592. package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
  593. package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
  594. package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
  595. package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
  596. package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
  597. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +9 -1
  598. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
  599. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  600. package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +7 -0
  601. package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -1
  602. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +14 -0
  603. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  604. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +12 -16
  605. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  606. package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts +36 -0
  607. package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts.map +1 -0
  608. package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts +20 -0
  609. package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts.map +1 -0
  610. package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
  611. package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
  612. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +21 -8
  613. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
  614. package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
  615. package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
  616. package/lib/typescript/module/src/anchors/fiber/touchTargetFiber.d.ts +24 -0
  617. package/lib/typescript/module/src/anchors/fiber/touchTargetFiber.d.ts.map +1 -0
  618. package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
  619. package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
  620. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
  621. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
  622. package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
  623. package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
  624. package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
  625. package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
  626. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +2 -1
  627. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  628. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
  629. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
  630. package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts +39 -0
  631. package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts.map +1 -0
  632. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +6 -4
  633. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
  634. package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +2 -0
  635. package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -1
  636. package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -1
  637. package/lib/typescript/module/src/anonymousId.d.ts +3 -0
  638. package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
  639. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +1 -0
  640. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
  641. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
  642. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
  643. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
  644. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +1 -1
  645. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
  646. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
  647. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
  648. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
  649. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
  650. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
  651. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +7 -6
  652. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -1
  653. package/lib/typescript/module/src/authoring/elementPickerController.d.ts +2 -3
  654. package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -1
  655. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +57 -2
  656. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
  657. package/lib/typescript/module/src/authoring/hitTest.d.ts +47 -3
  658. package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
  659. package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
  660. package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
  661. package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
  662. package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
  663. package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
  664. package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
  665. package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
  666. package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
  667. package/lib/typescript/module/src/content/themeColor.d.ts +2 -0
  668. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
  669. package/lib/typescript/module/src/content/types.d.ts +1 -0
  670. package/lib/typescript/module/src/content/types.d.ts.map +1 -1
  671. package/lib/typescript/module/src/deepLinking.d.ts +4 -4
  672. package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
  673. package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
  674. package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
  675. package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
  676. package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
  677. package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
  678. package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
  679. package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
  680. package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
  681. package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
  682. package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
  683. package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
  684. package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
  685. package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
  686. package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
  687. package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
  688. package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
  689. package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
  690. package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
  691. package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
  692. package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
  693. package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
  694. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
  695. package/lib/typescript/module/src/index.d.ts +16 -1
  696. package/lib/typescript/module/src/index.d.ts.map +1 -1
  697. package/lib/typescript/module/src/installCheck.d.ts +33 -0
  698. package/lib/typescript/module/src/installCheck.d.ts.map +1 -0
  699. package/lib/typescript/module/src/lifecycle.d.ts +4 -1
  700. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
  701. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  702. package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
  703. package/lib/typescript/module/src/pairing/PairingController.d.ts +71 -4
  704. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
  705. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +9 -1
  706. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  707. package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
  708. package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
  709. package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
  710. package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
  711. package/lib/typescript/module/src/pairing/diagnostics.d.ts +3 -2
  712. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
  713. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +14 -2
  714. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
  715. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
  716. package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
  717. package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
  718. package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
  719. package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
  720. package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
  721. package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
  722. package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
  723. package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
  724. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +2 -1
  725. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
  726. package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
  727. package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
  728. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +9 -3
  729. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
  730. package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
  731. package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
  732. package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
  733. package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
  734. package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
  735. package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
  736. package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
  737. package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
  738. package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
  739. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
  740. package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
  741. package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
  742. package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
  743. package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
  744. package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
  745. package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
  746. package/lib/typescript/module/src/screenTracker.d.ts +7 -3
  747. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
  748. package/lib/typescript/module/src/storage/asyncStorage.d.ts +15 -0
  749. package/lib/typescript/module/src/storage/asyncStorage.d.ts.map +1 -0
  750. package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
  751. package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
  752. package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
  753. package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
  754. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
  755. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
  756. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
  757. package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
  758. package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
  759. package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
  760. package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
  761. package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
  762. package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
  763. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
  764. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
  765. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
  766. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
  767. package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
  768. package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
  769. package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
  770. package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
  771. package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
  772. package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
  773. package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
  774. package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
  775. package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
  776. package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
  777. package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
  778. package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
  779. package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
  780. package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
  781. package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
  782. package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
  783. package/lib/typescript/module/src/surfaces/safeArea.d.ts +9 -1
  784. package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
  785. package/lib/typescript/module/src/version.d.ts +1 -1
  786. package/package.json +16 -3
  787. package/src/anchors/AnchorRegistry.ts +12 -0
  788. package/src/anchors/AutoAnchorRegistry.ts +41 -11
  789. package/src/anchors/elementConditionEvaluator.ts +235 -70
  790. package/src/anchors/elementTapMonitor.ts +95 -0
  791. package/src/anchors/elementTargetMatch.ts +90 -0
  792. package/src/anchors/fiber/fiberPath.ts +117 -0
  793. package/src/anchors/fiber/findAnchorFiber.ts +121 -80
  794. package/src/anchors/fiber/resolveFiberPath.ts +215 -0
  795. package/src/anchors/fiber/touchTargetFiber.ts +125 -0
  796. package/src/anchors/fiber/visibleRect.ts +153 -0
  797. package/src/anchors/fiber/visibleScreens.ts +74 -36
  798. package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
  799. package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
  800. package/src/anchors/resolveAnchorHost.ts +2 -1
  801. package/src/anchors/resolveAutoAnchorHost.ts +20 -18
  802. package/src/anchors/resolveElementTargets.ts +165 -0
  803. package/src/anchors/semanticMatcher.ts +38 -14
  804. package/src/anchors/targetPressMonitor.ts +12 -3
  805. package/src/anchors/useUserflowAnchor.ts +1 -0
  806. package/src/anonymousId.ts +20 -8
  807. package/src/authoring/ElementPickerOverlay.tsx +168 -59
  808. package/src/authoring/chrome/ChromeBottomSheet.tsx +49 -8
  809. package/src/authoring/chrome/ChromeButton.tsx +9 -4
  810. package/src/authoring/chrome/ChromeIcon.tsx +10 -1
  811. package/src/authoring/chrome/ChromeTopBar.tsx +39 -15
  812. package/src/authoring/chrome/DoubleTapBridge.tsx +19 -12
  813. package/src/authoring/chrome/doubleTapMonitor.ts +10 -0
  814. package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
  815. package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  816. package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  817. package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
  818. package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  819. package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  820. package/src/authoring/chrome/tokens.ts +7 -2
  821. package/src/authoring/elementPickerController.ts +2 -4
  822. package/src/authoring/fingerprintFromInstance.ts +170 -4
  823. package/src/authoring/hitTest.ts +324 -16
  824. package/src/authoring/hostAtPoint.ts +247 -0
  825. package/src/content/BannerStepButton.tsx +91 -0
  826. package/src/content/buttonAppearance.ts +16 -0
  827. package/src/content/resolveBannerButtonChrome.ts +49 -0
  828. package/src/content/themeColor.ts +15 -0
  829. package/src/content/types.ts +1 -0
  830. package/src/deepLinking.ts +4 -4
  831. package/src/evalJs/EvalJsHost.tsx +255 -0
  832. package/src/evalJs/bootstrap.ts +83 -0
  833. package/src/evalJs/bridgeMessages.ts +134 -0
  834. package/src/evalJs/evalJsBridge.ts +42 -0
  835. package/src/evalJs/evalJsController.ts +127 -0
  836. package/src/evalJs/getWebView.ts +124 -0
  837. package/src/evalJs/injectEvalPending.ts +14 -0
  838. package/src/evalJs/types.ts +56 -0
  839. package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
  840. package/src/expo-router/index.ts +8 -0
  841. package/src/expo-router/redirectSystemPath.ts +86 -0
  842. package/src/expo-router/useUserflowExpoRouter.ts +2 -2
  843. package/src/index.ts +139 -45
  844. package/src/installCheck.ts +191 -0
  845. package/src/lifecycle.ts +4 -1
  846. package/src/navigation/WithUserflowReactNavigation.tsx +13 -10
  847. package/src/navigation/openFlowNavigateUrl.ts +12 -5
  848. package/src/pairing/PairingController.ts +283 -29
  849. package/src/pairing/PreviewModeBanner.tsx +71 -14
  850. package/src/pairing/deepLink.ts +23 -5
  851. package/src/pairing/deviceId.ts +46 -0
  852. package/src/pairing/diagnostics.ts +6 -4
  853. package/src/pairing/tokenStorage.ts +60 -7
  854. package/src/pairing/usePairingState.ts +2 -0
  855. package/src/pairing/usePreviewBarHold.ts +160 -0
  856. package/src/runtime/BannerHost.tsx +102 -0
  857. package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
  858. package/src/runtime/SdkErrorBoundary.tsx +77 -0
  859. package/src/runtime/TargetPressBridge.tsx +36 -13
  860. package/src/runtime/UserflowOverlay.tsx +118 -0
  861. package/src/runtime/UserflowProvider.tsx +146 -64
  862. package/src/runtime/bannerEngine.ts +55 -0
  863. package/src/runtime/bannerEngineContext.ts +5 -0
  864. package/src/runtime/bannerPlacement.ts +36 -0
  865. package/src/runtime/embedBannerRegistry.ts +28 -0
  866. package/src/runtime/flowEngine.ts +76 -3
  867. package/src/runtime/isolateCall.ts +53 -0
  868. package/src/runtime/reportSdkError.ts +12 -0
  869. package/src/runtime/useBannerSession.ts +35 -0
  870. package/src/screenTracker.ts +34 -8
  871. package/src/storage/asyncStorage.ts +88 -0
  872. package/src/surfaces/BannerBar.tsx +176 -0
  873. package/src/surfaces/BannerSurface.tsx +82 -0
  874. package/src/surfaces/MadeWithUserflow.tsx +15 -10
  875. package/src/surfaces/ModalSurface.tsx +1 -1
  876. package/src/surfaces/TooltipSurface.tsx +17 -1
  877. package/src/surfaces/bannerBarLayout.ts +74 -0
  878. package/src/surfaces/bannerBarTokens.ts +34 -0
  879. package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
  880. package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
  881. package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
  882. package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
  883. package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
  884. package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
  885. package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
  886. package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
  887. package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
  888. package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
  889. package/src/surfaces/resolveBannerTheme.ts +18 -0
  890. package/src/surfaces/safeArea.ts +88 -19
  891. package/src/version.ts +1 -1
  892. package/vendor/core/dist/attributes.d.ts.map +1 -1
  893. package/vendor/core/dist/attributes.js +4 -4
  894. package/vendor/core/dist/attributes.js.map +1 -1
  895. package/vendor/core/dist/constants.d.ts +2 -0
  896. package/vendor/core/dist/constants.d.ts.map +1 -1
  897. package/vendor/core/dist/constants.js +2 -0
  898. package/vendor/core/dist/constants.js.map +1 -1
  899. package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
  900. package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
  901. package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
  902. package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
  903. package/vendor/core/dist/engine/ClientConditionEngine.d.ts +20 -1
  904. package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -1
  905. package/vendor/core/dist/engine/ClientConditionEngine.js +13 -10
  906. package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -1
  907. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +41 -1
  908. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
  909. package/vendor/core/dist/engine/FlowSessionEngine.js +167 -28
  910. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
  911. package/vendor/core/dist/engine/PairingEngine.d.ts +38 -2
  912. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
  913. package/vendor/core/dist/engine/PairingEngine.js +19 -2
  914. package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
  915. package/vendor/core/dist/engine/UserflowCore.d.ts +10 -1
  916. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
  917. package/vendor/core/dist/engine/UserflowCore.js +68 -29
  918. package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
  919. package/vendor/core/dist/engine/handleActions.d.ts +17 -3
  920. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
  921. package/vendor/core/dist/engine/handleActions.js +17 -14
  922. package/vendor/core/dist/engine/handleActions.js.map +1 -1
  923. package/vendor/core/dist/engine/trackCondition.d.ts +2 -0
  924. package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -1
  925. package/vendor/core/dist/engine/trackCondition.js +4 -2
  926. package/vendor/core/dist/engine/trackCondition.js.map +1 -1
  927. package/vendor/core/dist/engine/trackStepTriggers.d.ts +11 -1
  928. package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -1
  929. package/vendor/core/dist/engine/trackStepTriggers.js +42 -16
  930. package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -1
  931. package/vendor/core/dist/errors.d.ts +11 -1
  932. package/vendor/core/dist/errors.d.ts.map +1 -1
  933. package/vendor/core/dist/errors.js +2 -1
  934. package/vendor/core/dist/errors.js.map +1 -1
  935. package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
  936. package/vendor/core/dist/eventAttributes.js +4 -2
  937. package/vendor/core/dist/eventAttributes.js.map +1 -1
  938. package/vendor/core/dist/index.d.ts +5 -2
  939. package/vendor/core/dist/index.d.ts.map +1 -1
  940. package/vendor/core/dist/index.js +1 -0
  941. package/vendor/core/dist/index.js.map +1 -1
  942. package/vendor/core/dist/normalizeAttributes.js +9 -7
  943. package/vendor/core/dist/normalizeAttributes.js.map +1 -1
  944. package/vendor/core/dist/transport/pairing.d.ts +5 -0
  945. package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
  946. package/vendor/core/dist/transport/pairing.js +69 -2
  947. package/vendor/core/dist/transport/pairing.js.map +1 -1
  948. package/vendor/core/dist/transport/phoenix.d.ts +8 -0
  949. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
  950. package/vendor/core/dist/transport/phoenix.js +16 -2
  951. package/vendor/core/dist/transport/phoenix.js.map +1 -1
  952. package/vendor/core/dist/version.d.ts +1 -1
  953. package/vendor/core/dist/version.js +1 -1
  954. package/vendor/core/package.json +1 -1
  955. package/vendor/protocol/dist/autoData.d.ts +8 -15
  956. package/vendor/protocol/dist/autoData.d.ts.map +1 -1
  957. package/vendor/protocol/dist/autoData.js.map +1 -1
  958. package/vendor/protocol/dist/flows.d.ts +58 -2
  959. package/vendor/protocol/dist/flows.d.ts.map +1 -1
  960. package/vendor/protocol/dist/flows.js +20 -2
  961. package/vendor/protocol/dist/flows.js.map +1 -1
  962. package/vendor/protocol/dist/messages.d.ts +22 -12
  963. package/vendor/protocol/dist/messages.d.ts.map +1 -1
  964. package/vendor/protocol/dist/messages.js +5 -2
  965. package/vendor/protocol/dist/messages.js.map +1 -1
  966. package/vendor/protocol/package.json +1 -1
@@ -20,14 +20,15 @@ pick the environment.
20
20
  Example:
21
21
 
22
22
  ```text
23
- userflow-257587://?token=SFMyNTY...
23
+ userflow-v7twv2fw2ja2jaco7kesvowmem://?token=SFMyNTY...
24
24
  ```
25
25
 
26
- - `{schemeId}` is your environment's `scheme_id` from the dashboard — a full
27
- scheme of the form `userflow-` followed by **digits** (not the env UUID). This
28
- is the **only** scheme you register; the same one also carries pairing links.
29
- The SDK never parses an environment out of the URL — `clientToken` passed to
30
- `init` is what identifies the environment.
26
+ - `{schemeId}` is your environment's `scheme_id` from the dashboard:
27
+ `userflow-` followed by an opaque id (e.g. `userflow-v7twv2fw2ja2jaco7kesvowmem`).
28
+ Copy it exactly and do not rely on its shape. It is **not** the env UUID.
29
+ This is the **only** scheme you register; the same one also
30
+ carries pairing links. The SDK never parses an environment out of the URL —
31
+ `clientToken` passed to `init` is what identifies the environment.
31
32
  - `{startFlowToken}` is a short-lived token minted by the builder
32
33
  (`prepareDraftFlow`).
33
34
 
@@ -44,22 +45,41 @@ preview.
44
45
  ```
45
46
 
46
47
  The builder QR usually points at `https://<api-host>/pair/<jwt>`; the backend
47
- redirects that to the scheme form the SDK parses. Pairing requires the
48
- `scheme_id` shape specifically (`userflow-` + digits) — an arbitrary
49
- `userflow-*` scheme can match preview links but **not** pairing ones.
48
+ redirects that to the scheme form the SDK parses. Pairing requires a
49
+ well-formed `scheme_id`: `userflow-` plus one or more letters and digits,
50
+ optionally split by single hyphens. A malformed `userflow-*` scheme (empty id,
51
+ stray hyphens) can match preview links but **not** pairing ones.
50
52
 
51
53
  ## Expo Router hosts
52
54
 
53
- No extra host files are required for Builder pairing or preview.
55
+ Add `app/+native-intent.ts` so pairing and preview links do not navigate:
56
+
57
+ ```ts
58
+ export { redirectSystemPath } from '@userflow-tech/react-native/expo-router';
59
+ ```
54
60
 
55
61
  The builder QR redirects to `{schemeId}://?pairing_token=…`. Expo Router treats
56
- that as `/`, which every app already has, so there is no **Unmatched Route**
57
- screen. The SDK still consumes the URL through React Native `Linking` after
58
- `Userflow.init()`. Preview tokens travel over the pairing websocket after
59
- connect — there is no separate preview path URL from the builder.
62
+ that as `/`. For a signed-out user the app's home route then redirects, which
63
+ mounts a second copy of the screen already showing (Sign In, for example).
64
+ Element selection then rejects controls that look duplicated. A signed-in user
65
+ may also be moved off the screen they were on, back to `/`. Returning `null`
66
+ from `redirectSystemPath` keeps the current screen. The SDK still consumes the
67
+ URL through React Native `Linking` after `Userflow.init()`. Preview tokens
68
+ travel over the pairing websocket after connect — there is no separate preview
69
+ path URL from the builder.
70
+
71
+ If the app already has a `+native-intent.ts`, wrap the existing handler:
72
+
73
+ ```ts
74
+ import { createRedirectSystemPath } from '@userflow-tech/react-native/expo-router';
75
+
76
+ export const redirectSystemPath = createRedirectSystemPath({
77
+ next: (event) => event.path,
78
+ });
79
+ ```
60
80
 
61
81
  Bare React Native / React Navigation apps need nothing beyond scheme
62
- registration either.
82
+ registration.
63
83
 
64
84
  ## 1. Register the scheme at build time
65
85
 
@@ -71,7 +91,7 @@ If you are using `app.config.js`:
71
91
  // app.config.js
72
92
  module.exports = {
73
93
  expo: {
74
- plugins: [['@userflow-tech/react-native', { schemeId: 'userflow-257587' }]],
94
+ plugins: [['@userflow-tech/react-native', { schemeId: 'userflow-v7twv2fw2ja2jaco7kesvowmem' }]],
75
95
  },
76
96
  };
77
97
  ```
@@ -82,7 +102,9 @@ If you are using `app.json`:
82
102
  // app.json
83
103
  {
84
104
  "expo": {
85
- "plugins": [["@userflow-tech/react-native", { "schemeId": "userflow-257587" }]]
105
+ "plugins": [
106
+ ["@userflow-tech/react-native", { "schemeId": "userflow-v7twv2fw2ja2jaco7kesvowmem" }]
107
+ ]
86
108
  }
87
109
  }
88
110
  ```
@@ -101,7 +123,7 @@ register the URL scheme. Expo Go is not supported.
101
123
  <dict>
102
124
  <key>CFBundleURLSchemes</key>
103
125
  <array>
104
- <string>userflow-257587</string>
126
+ <string>userflow-v7twv2fw2ja2jaco7kesvowmem</string>
105
127
  </array>
106
128
  </dict>
107
129
  </array>
@@ -114,7 +136,7 @@ register the URL scheme. Expo Go is not supported.
114
136
  <action android:name="android.intent.action.VIEW" />
115
137
  <category android:name="android.intent.category.DEFAULT" />
116
138
  <category android:name="android.intent.category.BROWSABLE" />
117
- <data android:scheme="userflow-257587" />
139
+ <data android:scheme="userflow-v7twv2fw2ja2jaco7kesvowmem" />
118
140
  </intent-filter>
119
141
  ```
120
142
 
@@ -172,17 +194,17 @@ Userflow.init({ clientToken: 'ct_...' }).catch((error) => {
172
194
  ```
173
195
 
174
196
  Other pairing links the SDK reports rather than dropping: one whose scheme is
175
- not a valid `scheme_id` (`userflow-` followed by digits), one **opened with your
176
- app's own scheme** instead of the `scheme_id`, one with no `pairing_token`, and a
177
- session that fails to connect because the token expired or the device is already
178
- paired.
197
+ not a valid `scheme_id` (`userflow-` followed by letters and digits, optionally
198
+ split by single hyphens), one **opened with your app's own scheme** instead of
199
+ the `scheme_id`, one with no `pairing_token`, and a session that fails to
200
+ connect because the token expired or the device is already paired.
179
201
 
180
202
  That third case is worth spelling out, because it does not look like a Userflow
181
203
  problem. Substituting your app's scheme — `myapp://?pairing_token=…` instead of
182
- `userflow-257587://?pairing_token=…` — still launches the app, since your own
183
- scheme is registered, but the SDK rejects it as a foreign scheme (logged +
184
- **Preview unavailable** top bar when recognisable). Use the `scheme_id` exactly
185
- as the QR code provides it.
204
+ `userflow-v7twv2fw2ja2jaco7kesvowmem://?pairing_token=…` — still launches the app,
205
+ since your own scheme is registered, but the SDK rejects it as a foreign scheme
206
+ (logged + **Preview unavailable** top bar when recognisable). Use the
207
+ `scheme_id` exactly as the QR code provides it.
186
208
 
187
209
  Reporting is limited to URLs the SDK can recognise as pairing attempts, so your
188
210
  own deep links stay quiet — as do preview links, which accept any `userflow-*`
@@ -194,10 +216,25 @@ A pairing failure never fails `Userflow.init()`. If the QR token has expired,
194
216
  `init()` still resolves and the app runs normally, with the reason logged under
195
217
  `[Userflow]` and the top bar switching to the error tone.
196
218
 
197
- Optional: install `expo-secure-store` (and configure Expo modules in bare
198
- React Native) so the pairing JWT can persist in Keychain/Keystore for the
199
- duration of the session (`npx expo install expo-secure-store`). Without Expo
200
- modules, the SDK falls back to in-memory storage automatically.
219
+ Relaunching a paired app resumes the Builder session until the pairing token
220
+ expires or you call `Userflow.exitPreview()`. Opening the app from its icon is
221
+ enough — that is what the Builder means by "Open the app if you've paired this
222
+ device". A new pairing link always wins over the stored session.
223
+
224
+ `Userflow.exitPreview()` (or **Exit preview** in the top bar) also ends the
225
+ previewed flow on the server. Otherwise identify would restore it at its last
226
+ step on the next launch.
227
+
228
+ Resume requires `expo-secure-store` (Keychain / Keystore). Install it with
229
+ `npx expo install expo-secure-store` and configure Expo modules in bare React
230
+ Native. Without that module the SDK keeps the token in memory only, so killing
231
+ the app does not resume.
232
+
233
+ The SDK also stores a stable pairing device id in AsyncStorage
234
+ (`userflow:pairingDeviceId`). The server uses it to recognize this install when
235
+ the app rejoins, including a cold start from the pairing link. `reset()` and
236
+ `exitPreview()` do not clear it. A cold start shows **Connecting to Builder…**
237
+ while `Userflow.init()` is still resolving, then **Preview mode**.
201
238
 
202
239
  ### Host apps that already own Linking
203
240
 
@@ -236,10 +273,10 @@ from JS does not.
236
273
 
237
274
  ```sh
238
275
  # iOS
239
- npx uri-scheme open "userflow-257587://?token=TEST" --ios
276
+ npx uri-scheme open "userflow-v7twv2fw2ja2jaco7kesvowmem://?token=TEST" --ios
240
277
 
241
278
  # Android
242
- npx uri-scheme open "userflow-257587://?token=TEST" --android
279
+ npx uri-scheme open "userflow-v7twv2fw2ja2jaco7kesvowmem://?token=TEST" --android
243
280
  ```
244
281
 
245
282
  Use a real token from the builder when testing end-to-end. For the full
@@ -0,0 +1,75 @@
1
+ # Host isolation
2
+
3
+ What “isolated as possible” means for `@userflow-tech/react-native`.
4
+
5
+ The SDK is in-process JavaScript in the host React tree. It cannot get a
6
+ separate VM, OS process, or native exception handler. Isolation is the set of
7
+ guards below — not a sandbox.
8
+
9
+ ## Default host-visible behavior
10
+
11
+ **No overlay, no event, no crash.** Failures inside SDK code are caught, logged
12
+ with `console.warn` and a `[Userflow] isolated error` prefix (always, not
13
+ `__DEV__`-only), and swallowed from the host app’s perspective. `console.warn`
14
+ is intentional: React Native release builds forward `console.error` to the
15
+ native exception manager (Crashlytics / Sentry).
16
+
17
+ ## What we contain
18
+
19
+ | Path | Mechanism |
20
+ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
21
+ | React **render / lifecycle** errors in overlay UI (flow surfaces, preview banner, element picker) | Class `SdkErrorBoundary` around the overlay sibling — **not** around host children |
22
+ | Unexpected exceptions and promise rejections on fire-and-forget APIs (`Userflow.track`, `updateScreen`, `reportActivity`, internal `screen_viewed`) | `isolateAsync` / `isolateSync` |
23
+ | Event-handler throws on SDK bridges that wrap the host tree (`TargetPressBridge`, `DoubleTapBridge`) | Local try/catch (`isolateSync`). React error boundaries do not catch event handlers. |
24
+ | Screen-report callbacks in `WithUserflowReactNavigation` | `isolateSync` around the report path only — **not** a React error boundary around `NavigationContainer` |
25
+
26
+ A later flow step can still render after an overlay crash: the boundary retries
27
+ when the session/step identity changes to one that has not already failed.
28
+ Reconnecting the same crashed step stays blank. It does not call `endFlow`
29
+ (that can loop or throw again).
30
+
31
+ ## What still throws (host contract)
32
+
33
+ These are integration mistakes or identity-critical results the host must see:
34
+
35
+ - `UserflowAuthError` for misuse (`isHostContract`): missing `init` / `identify`,
36
+ invalid event or attribute names, identity-verification failures. Transport
37
+ `UserflowAuthError`s leave that flag unset.
38
+ - Failures on **identity-critical** APIs: `init`, `identify`,
39
+ `identifyAnonymous`, `reset`. A swallowed `identify` would look like success.
40
+ - `group` / `updateUser` / `updateGroup` still reject on auth and transport
41
+ errors (they are part of the identity path, not fire-and-forget).
42
+ - `useUserflow()` still throws outside `UserflowProvider`.
43
+ - `WithUserflowReactNavigation` still throws if its child is not a single React
44
+ element (host API misuse).
45
+
46
+ `Userflow.track()`:
47
+
48
+ - **Rejects** `UserflowAuthError` (`Call Userflow.init() before track()`,
49
+ `Call Userflow.identify() before track()`, invalid event name).
50
+ - **Resolves** on network failure, rate limit (`UserflowRateLimitError`), and
51
+ unexpected SDK bugs. Check device logs for `[Userflow] isolated error`.
52
+
53
+ ## What we cannot contain
54
+
55
+ - Native module / JSI / Hermes **fatal** crashes.
56
+ - Errors in **host children** of `UserflowProvider`. The app tree is never
57
+ inside `SdkErrorBoundary` — wrapping it would hide the customer’s own bugs.
58
+ - Host callbacks the SDK invokes (`onNavigate`, `setCustomScrollIntoView`).
59
+ Those stay the host’s responsibility. The SDK wraps those _call sites_
60
+ (`openFlowNavigateUrl` / `scrollAnchorIntoView`) so a host throw does not take
61
+ down overlay internals, but it does not swallow the host’s own render errors.
62
+
63
+ ## Reading the logs
64
+
65
+ Isolated failures look like:
66
+
67
+ ```text
68
+ [Userflow] isolated error overlay Error: …
69
+ [Userflow] isolated error track Error: socket dropped
70
+ ```
71
+
72
+ The second token is the **scope** (`overlay`, `track`, `updateScreen`,
73
+ `reportActivity`, `double-tap`, `target-press`, `react-navigation-screen`).
74
+ Search logs for `[Userflow] isolated error` when a flow vanishes or an event
75
+ seems missing but the app is still running.
@@ -3,25 +3,51 @@
3
3
  Symptom → cause for common `@userflow-tech/react-native` integration failures.
4
4
  Messages are quoted exactly so you can search logs for them.
5
5
 
6
+ ## Install
7
+
8
+ | Symptom / log message | Likely cause | Fix |
9
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
10
+ | `404` from `npm install` or `npm view @userflow-tech/react-native` | The npm token is missing, or the npm user or org is not on the read-only `@userflow-tech` team. npm returns 404 for a private package the caller cannot see. | Ask Userflow to add the npm user or org to the read-only team, then create a granular read-only token limited to `@userflow-tech`. |
11
+ | Yarn 2+ still 404s with a valid `.npmrc` | Yarn 2 and later ignore `.npmrc`. | Set `npmScopes.userflow-tech.npmRegistryServer` and `npmAuthToken` in `.yarnrc.yml`. |
12
+ | EAS or CI install 404s while local install works | `NPM_TOKEN` is not available to that environment. | Add `NPM_TOKEN` as an EAS secret or CI secret. The `.npmrc` line `//registry.npmjs.org/:_authToken=${NPM_TOKEN}` reads it at install time. |
13
+ | `expo doctor` reports `react-native-view-shot` | The app pins `^5.0.0` and Expo SDK 54's expected version is 4.0.3. | Keep the pin. Add `"react-native-view-shot"` to `expo.install.exclude`. |
14
+ | `Unable to resolve module` for an optional peer (`netinfo`, `expo-secure-store`, `expo-router`, safe-area, navigation) | A custom Metro config does not extend `getDefaultConfig`, so `allowOptionalDependencies` is off. | Extend `getDefaultConfig` from `expo/metro-config` or `@react-native/metro-config`. |
15
+ | `[@userflow-tech/react-native] schemeId "…" looks like an environment id. Pass the scheme_id value that starts with userflow- (an opaque id from the dashboard), not the environment UUID.` | The config plugin received the environment UUID. | Pass the `scheme_id` (`userflow-…`) from the dashboard. |
16
+ | `No schemeId was passed, so the plugin left the native config unchanged. Builder preview and pairing links will not open this app. Pass the environment scheme_id (userflow-...) from the Userflow dashboard as the plugin schemeId.` | `expo prebuild` ran the plugin without `schemeId`. | Add `{ "schemeId": "userflow-…" }` and rebuild native. |
17
+ | react-native-view-shot is not a direct dependency. Builder element selection needs >=5.0.0. On Expo SDK 54, an unpinned `npx expo install react-native-view-shot` resolves 4.0.3. Pin ^5.0.0. If expo doctor reports a version mismatch, add "react-native-view-shot" to expo.install.exclude. | Prebuild did not find view-shot in the app `package.json`. | `npx expo install react-native-view-shot@^5.0.0` and rebuild. |
18
+ | `react-native-view-shot@4.0.3 is older than 5.0.0. Expo SDK 54's default is 4.0.3, which does not work with this SDK. Pin ^5.0.0 and add "react-native-view-shot" to expo.install.exclude if expo doctor complains.` | The app has view-shot 4.x. | Pin `^5.0.0` and rebuild. |
19
+ | `@react-native-async-storage/async-storage is not listed in the app package.json. Expo SDK 53 does not autolink native modules that the app only receives indirectly. Install it in the app (npx expo install @react-native-async-storage/async-storage) and rebuild.` | Expo SDK older than 54, and AsyncStorage is only a transitive dependency. The WebView line is the same shape with `react-native-webview`. | Install that package in the app and rebuild. |
20
+ | `[Userflow] Native setup is incomplete. Flows may not run until you fix the following, then rebuild the app (a Metro reload is not enough):` | Dev-only check on the first `Userflow.init`. Following lines name each missing native module. | Install the named packages and rebuild. The footer is `See docs/troubleshooting.md.` |
21
+ | `- @react-native-async-storage/async-storage is not linked. Anonymous users and Builder pairing will not persist. Add it to the app package.json (npx expo install @react-native-async-storage/async-storage), run pod install on iOS, and rebuild.` | AsyncStorage's native module is not in this binary. | Add it to the app `package.json`, run `pod install` on iOS, and rebuild. |
22
+ | `- react-native-view-shot is not linked, so Builder element selection gets no screenshot. Install react-native-view-shot@^5.0.0 and rebuild. On Expo SDK 54, pin ^5.0.0; an unpinned npx expo install resolves 4.0.3.` | `RNViewShot` is not registered. | Install `react-native-view-shot@^5.0.0` and rebuild. |
23
+ | `- react-native-webview is not linked. Evaluate JavaScript and WebView banners will not run. Install it (npx expo install react-native-webview) and rebuild.` | The WebView native module is not registered. | Install `react-native-webview` and rebuild. |
24
+ | `- react-native-device-info is not linked, so app_version and app_build are not sent. npm install react-native-device-info, then rebuild.` | Bare React Native, and `RNDeviceInfo` is not registered. Expo apps that have `expo-constants` do not log this line. | `npm install react-native-device-info` and rebuild. |
25
+ | `[Userflow] This app is running in Expo Go, which cannot load the SDK native modules. Builder preview links will not open the app. Use a development build (npx expo run:ios / npx expo run:android).` | The app is the Expo Go store client. | Use a development build. |
26
+ | `[Userflow] UserflowProvider is not inside a <SafeAreaProvider>, so flow cards use the device's initial safe-area insets. Wrap your app in <SafeAreaProvider> from react-native-safe-area-context.` | `UserflowProvider` has no `SafeAreaProvider` ancestor. The app does not crash. Cards use `initialWindowMetrics`, or zero insets when those are unavailable. | Wrap the tree in `SafeAreaProvider`. |
27
+ | `Userflow.identifyAnonymous() needs @react-native-async-storage/async-storage, which is not linked in this native build. Add it to your app's package.json, run pod install, and rebuild.` | `identifyAnonymous()` ran without a linked AsyncStorage native module. | Install and rebuild, then call it again. |
28
+ | `clientToken is an environment secret key (esk_...). That key must never ship in the app. Pass the client token (ct_...) from Settings → Environments instead.` | `init` was given an `esk_` secret key. | Pass the `ct_…` client token. |
29
+ | `For EU-hosted environments pass serverEndpoint: 'https://e.eu.userflow.com'.` | The default US host rejected the token with `invalid_client_token`. This sentence is appended to that error. It is omitted when `serverEndpoint` was set explicitly. | For an EU environment, pass `serverEndpoint: 'https://e.eu.userflow.com'`. Pairing stays on `https://e.userflow.com`. |
30
+ | `[Userflow] Userflow.init() already ran with different options. The new clientToken, serverEndpoint, and pairingEndpoint are ignored because init runs once per process. Userflow.reset() does not apply new credentials. Restart the app to change them.` | A later `init` passed a different token or endpoint while a previous `init` is in flight or has succeeded. | Restart the app after a successful init. `reset()` clears the user and does not apply new credentials. If the previous `init` rejected, call `init` again with the corrected token or endpoint. |
31
+
6
32
  ## Init / identify / group
7
33
 
8
- | Symptom / log message | Likely cause | Fix |
9
- | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
10
- | `Call Userflow.init() before identify()` | `identify` / `identifyAnonymous` before `init()` resolved | `await Userflow.init(...)` first |
11
- | `Call Userflow.init() before group()` | `group` before init | Same |
12
- | `Call Userflow.identify() before group()` | `group` before any identify | Call `identify` or `identifyAnonymous` first |
13
- | `Call Userflow.init() before updateUser()` / `updateGroup()` | `updateUser` / `updateGroup` before init | `await Userflow.init(...)` first |
14
- | `Call Userflow.identify() before updateUser()` | `updateUser` before any identify | Call `identify` or `identifyAnonymous` first |
15
- | `Call Userflow.group() before updateGroup()` | `updateGroup` or a group-scoped button attribute before `group()` | Call `Userflow.group(...)` first |
16
- | `Missing clientToken` | Empty / whitespace token | Pass the `ct_...` value from the dashboard |
17
- | `… invalid_client_token: Invalid Userflow.js Token: …` | Wrong token, wrong region, or deactivated env | Copy the token from the matching environment; EU tokens may need an EU `serverEndpoint` |
18
- | `… user_signature_required: …` | Env requires identity verification; no `signature` | Compute HMAC on your backend — [identity-verification.md](identity-verification.md) |
19
- | `… incorrect_user_signature: …` | Signature does not match HMAC-SHA256(secret, userId) | Sign the **same** id string; use `esk_...`, not `ct_...` |
20
- | `… group_signature_required` / `incorrect_group_signature` | Same rules for `group()` | Sign the group id with the env secret key |
21
- | `Client message rate limit exceeded (100/min)` | Too many client messages in a 60s window | Each accepted screen uses two slots (`UpdateClientContext` + `screen_viewed`); slow down navigation or wait for the window to refill |
22
- | `Userflow.identifyAnonymous() is not supported when persistent storage is unavailable.` | AsyncStorage threw at runtime | Ensure `@react-native-async-storage/async-storage` is installed and linked |
23
- | Module resolution failure for AsyncStorage | Autolinking missed the SDK dependency | `npx expo install @react-native-async-storage/async-storage` |
24
- | Second `init()` seems to ignore new options | `init()` is idempotent | Expected; use a fresh process or `reset()` carefully |
34
+ | Symptom / log message | Likely cause | Fix |
35
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36
+ | `Call Userflow.init() before identify()` | `identify` / `identifyAnonymous` before `init()` resolved | `await Userflow.init(...)` first |
37
+ | `Call Userflow.init() before group()` | `group` before init | Same |
38
+ | `Call Userflow.identify() before group()` | `group` before any identify | Call `identify` or `identifyAnonymous` first |
39
+ | `Call Userflow.init() before updateUser()` / `updateGroup()` | `updateUser` / `updateGroup` before init | `await Userflow.init(...)` first |
40
+ | `Call Userflow.identify() before updateUser()` | `updateUser` before any identify | Call `identify` or `identifyAnonymous` first |
41
+ | `Call Userflow.group() before updateGroup()` | `updateGroup` or a group-scoped button attribute before `group()` | Call `Userflow.group(...)` first |
42
+ | `Missing clientToken` | Empty / whitespace token | Pass the `ct_...` value from the dashboard |
43
+ | `… invalid_client_token: Invalid Userflow.js Token: …` | Wrong token, wrong region, or deactivated env | Copy the token from the matching environment. When the default US host returns this, the message also says `For EU-hosted environments pass serverEndpoint: 'https://e.eu.userflow.com'.` |
44
+ | `… user_signature_required: …` | Env requires identity verification; no `signature` | Compute HMAC on your backend — [identity-verification.md](identity-verification.md) |
45
+ | `… incorrect_user_signature: …` | Signature does not match HMAC-SHA256(secret, userId) | Sign the **same** id string; use `esk_...`, not `ct_...` |
46
+ | `… group_signature_required` / `incorrect_group_signature` | Same rules for `group()` | Sign the group id with the env secret key |
47
+ | `Client message rate limit exceeded (100/min)` | Too many client messages in a 60s window | Each accepted screen uses two slots (`UpdateClientContext` + `screen_viewed`); slow down navigation or wait for the window to refill |
48
+ | `Userflow.identifyAnonymous() is not supported when persistent storage is unavailable.` | AsyncStorage threw while reading or writing the anonymous id | Ensure `@react-native-async-storage/async-storage` is installed and linked |
49
+ | `Userflow.identifyAnonymous() needs @react-native-async-storage/async-storage, which is not linked in this native build. Add it to your app's package.json, run pod install, and rebuild.` | The native module is not in this binary | Add it to the app `package.json`, run `pod install`, and rebuild |
50
+ | Second `init()` seems to ignore new options | A previous `init` is in flight or has succeeded. A rejected `init` can be retried. | Development logs `[Userflow] Userflow.init() already ran with different options. The new clientToken, serverEndpoint, and pairingEndpoint are ignored because init runs once per process. Userflow.reset() does not apply new credentials. Restart the app to change them.` |
25
51
 
26
52
  ## Flow never appeared
27
53
 
@@ -37,29 +63,30 @@ Look for warnings such as:
37
63
 
38
64
  ```text
39
65
  [Userflow] ELEMENT condition … uses an AUTO (codeless) selector that could not be resolved; …
40
- [Userflow] ELEMENT condition … uses unsupported elementState "CLICK" …
66
+ [Userflow] ELEMENT condition … uses unsupported elementState "DISABLED" …
41
67
  ```
42
68
 
43
69
  Or a core warning that a condition type has no evaluator (`INPUT_VALUE`,
44
- `FILLED_IN_INPUT`, …).
70
+ `FILLED_IN_INPUT`, …). `PRESENT`, `NOT_PRESENT`, `CLICK`, and `NOT_CLICK` are
71
+ evaluated. `DISABLED`, `NOT_DISABLED`, and `MOUSEDOWN` are not.
45
72
 
46
- **Workaround:** author the start condition with a **MANUAL** selector and
47
- `PRESENT` / `NOT_PRESENT`, and tag the target with matching `testID="…"` (or
48
- `useUserflowAnchor('…')`). See [anchoring.md](anchoring.md).
73
+ **Workaround:** author the start condition with a **MANUAL** selector and one of
74
+ the four supported states, and tag the target with matching `userflowId`,
75
+ `testID`, or `nativeID` (or `useUserflowAnchor('…')`). See [anchoring.md](anchoring.md).
49
76
 
50
77
  ### 2. Anchor / tooltip placement
51
78
 
52
79
  | Symptom | Likely cause |
53
80
  | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
54
- | “Looking for target…” then “Target not found” | Wrong id vs dashboard `#css`, no matching `testID`/`nativeID`/`accessibilityLabel` or `useUserflowAnchor`, or zero-size measure |
55
- | Tooltip never attaches despite a visible element | **Duplicate** id on disjoint views (ambiguous → fail closed) |
81
+ | “Looking for target…” then “Target not found” | Wrong id vs dashboard `#css`, no matching `userflowId`/`testID`/`nativeID`/`accessibilityLabel` or `useUserflowAnchor`, or zero-size measure |
82
+ | Tooltip never attaches despite a visible element | **Duplicate** id on disjoint views (tooltips fail closed; element conditions still treat any match as present) |
56
83
  | Off-screen target not scrolled into view | Parent `ScrollView` not registered with `useUserflowScrollContainer` |
57
84
  | “To the left/right of target” renders above/below | No room beside the target for even the card's own padding — it shrinks first and flips only as a last resort. Draft/dev logs `… could not be drawn beside the target` |
58
85
  | Side-placed tooltip looks unusually narrow | Expected: a side card takes the room left beside the target and grows taller. Move the target inward, or pick above/below, if you want it wider |
59
86
  | Flow vanished after a few seconds | Theme `tooltipMissingBehavior: END` after tolerance |
60
87
  | Centered card with step content, no notch | Theme `tooltipMissingBehavior: BUBBLE` after missing tolerance |
61
88
 
62
- Id matching: dashboard `#invite-teammates` ↔ `testID="invite-teammates"` (or `useUserflowAnchor('invite-teammates')`).
89
+ Id matching: dashboard `#invite-teammates` ↔ `userflowId="invite-teammates"`, then `testID`, then `nativeID` (or `useUserflowAnchor('invite-teammates')`).
63
90
 
64
91
  ### 3. Screen / provider
65
92
 
@@ -72,28 +99,30 @@ Id matching: dashboard `#invite-teammates` ↔ `testID="invite-teammates"` (or `
72
99
 
73
100
  ### 4. Connection
74
101
 
75
- | Symptom | Likely cause |
76
- | --------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
77
- | `WebSocket connection timed out` / `failed` | Bad `serverEndpoint`, network, or VPN |
78
- | `invalid_message` on channel join / `UpdateClientContext` | ClientContext missing required `pageUrl`, or sending legacy `path`/`screen` | SDK must send `pageUrl: ""` plus `screenPath` / `screenName` (not `path` / `screen`) |
79
- | Long recovery after Wi-Fi ↔ cellular while foregrounded | Install optional `@react-native-community/netinfo` for instant probe |
80
- | Session cleared after returning from background | Away ≥ `SESSION_STALE_AFTER_BACKGROUND_MS` (5 minutes) — by design |
102
+ | Symptom | Likely cause |
103
+ | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
104
+ | `WebSocket connection timed out` / `failed` | Bad `serverEndpoint`, network, or VPN |
105
+ | `invalid_message` on channel join / `UpdateClientContext` | ClientContext missing required `pageUrl`, or sending `screenPath` / legacy `path`/`screen`. The SDK must send `pageUrl: ""` plus `screenName` only |
106
+ | Long recovery after Wi-Fi ↔ cellular while foregrounded | Install optional `@react-native-community/netinfo` for instant probe |
107
+ | Session cleared after returning from background | Away ≥ `SESSION_STALE_AFTER_BACKGROUND_MS` (5 minutes) — by design |
81
108
 
82
109
  ## Builder preview / pairing
83
110
 
84
111
  Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all builds (including release).
85
112
 
86
- | Symptom | Likely cause | Fix |
87
- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
88
- | Deep link opens the app but nothing happens | Scheme added in config but **no native rebuild** | `npx expo prebuild` / new development client; Metro reload is not enough |
89
- | Deep link opens the app but nothing happens, and no **Preview mode** top bar appears | `Userflow.init()` rejected, so there is no session to preview into | Check the logs for `[Userflow] Builder pairing link received, but Userflow.init() failed` — fix that error (usually `clientToken` or `serverEndpoint`) and re-open the link |
90
- | Deep link opens the app and the router shows **Unmatched Route** / "page could not be found" | Deep link is not the root form from the QR; **or** the link was rebuilt with the app's own scheme instead of `scheme_id` | Open the QR unmodified (`userflow-<digits>://?pairing_token=…`). If the log says `a scheme Userflow does not own`, do not substitute your app scheme |
91
- | Pairing deep link ignored (preview URL may still work) | Scheme is `userflow-*` but not `userflow-` + **digits** | Use the env's `scheme_id` from the dashboard (e.g. `userflow-257587`), not the env UUID |
92
- | Builder says “A device was paired earlier…” and Preview closes immediately after a brief spinner | Stale pairing session still present; a ghost device acks | Pair again on the device you are watching, or clear the env's pairing session and re-QR |
93
- | Preview succeeds on the server but the phone stays idle | App is not the paired instance (no **Preview mode** top bar) | Confirm the top bar before hitting Preview; re-open the pairing QR on this install |
94
- | Pairing never connects against a local stack | `pairingEndpoint` still pointing at production | `Userflow.init({ pairingEndpoint: 'http://localhost:40401', serverEndpoint: '…' })` |
95
- | QR / `https://…/pair/<jwt>` does nothing in the app | SDK only parses the **scheme** form after the backend redirect | Open via the OS (scan QR) or forward `{schemeId}://?pairing_token=…` with `handlePairingUrl` |
96
- | Builder selector has no screenshot after Confirm | Missing / unlinked `react-native-view-shot`, or Expo SDK 54 pinned 4.x | Install `react-native-view-shot@^5.0.0` and **rebuild native**. Look for `[Userflow] Required peer react-native-view-shot is not installed` |
113
+ | Symptom | Likely cause | Fix |
114
+ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
115
+ | Deep link opens the app but nothing happens | Scheme added in config but **no native rebuild** | `npx expo prebuild` / new development client; Metro reload is not enough |
116
+ | Deep link opens the app but nothing happens, and no **Preview mode** top bar appears | `Userflow.init()` rejected, so there is no session to preview into | Check the logs for `[Userflow] Builder pairing link received, but Userflow.init() failed` — fix that error (usually `clientToken` or `serverEndpoint`) and re-open the link |
117
+ | Killed app opens from a pairing link with no banner, or Preview returns on the wrong step | Pairing did not resume, or the install joined as a new device while the old presence was still on the topic | Install `expo-secure-store` so a relaunch can resume. A cold start should show **Connecting to Builder…** immediately, then **Preview mode**, with the flow at step 1. `exitPreview()` or an expired token ends resume |
118
+ | Deep link opens the app and the router shows **Unmatched Route** / "page could not be found" | Deep link is not the root form from the QR; **or** the link was rebuilt with the app's own scheme instead of `scheme_id` | Open the QR unmodified (`userflow-<id>://?pairing_token=…`). If the log says `a scheme Userflow does not own`, do not substitute your app scheme |
119
+ | "Can't select this element" right after pairing, or the app jumps to home when pairing | Expo Router navigated on the pairing link | Add `app/+native-intent.ts` exporting `redirectSystemPath` from `@userflow-tech/react-native/expo-router` (see [deep-linking.md](deep-linking.md#expo-router-hosts)) |
120
+ | Pairing deep link ignored (preview URL may still work) | Scheme is `userflow-*` but the id after it is empty or has stray hyphens | Use the env's `scheme_id` from the dashboard exactly (e.g. `userflow-v7twv2fw2ja2jaco7kesvowmem`), not the env UUID |
121
+ | Builder says “A device was paired earlier…” and Preview closes immediately after a brief spinner | Stale pairing session still present; a ghost device acks | Pair again on the device you are watching, or clear the env's pairing session and re-QR |
122
+ | Preview succeeds on the server but the phone stays idle | App is not the paired instance (no **Preview mode** top bar) | Confirm the top bar before hitting Preview; re-open the pairing QR on this install |
123
+ | Pairing never connects against a local stack | `pairingEndpoint` still pointing at production | `Userflow.init({ pairingEndpoint: 'http://localhost:40401', serverEndpoint: '…' })` |
124
+ | QR / `https://…/pair/<jwt>` does nothing in the app | SDK only parses the **scheme** form after the backend redirect | Open via the OS (scan QR) or forward `{schemeId}://?pairing_token=…` with `handlePairingUrl` |
125
+ | Builder selector has no screenshot after Confirm | Missing / unlinked `react-native-view-shot`, or Expo SDK 54 pinned 4.x | Install `react-native-view-shot@^5.0.0` and **rebuild native**. Look for `[Userflow] Required peer react-native-view-shot is not installed` |
97
126
 
98
127
  ## Expo
99
128
 
@@ -103,12 +132,42 @@ Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all buil
103
132
  | Duplicate React / RN instance crashes when linking local packages | Force singletons in Metro — monorepo `docs/metro.md` |
104
133
  | Preview / pairing scheme not registered | Add the `@userflow-tech/react-native` plugin with `schemeId`, then rebuild native |
105
134
 
135
+ ## Jest
136
+
137
+ | Symptom | Likely cause | Fix |
138
+ | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
139
+ | Snapshots gain `nativeID="uf_…"`, `collapsable={false}`, `__ufid`, or `__ufManual` props, and keep changing after unrelated JSX edits | The Babel plugin runs under Jest, because `babel-jest` reads `babel.config.js`. Its ids depend on file path, component name, sibling order, and static labels. | Skip the plugin when `api.env('test')` is true. See the README section "Babel plugin and snapshot tests". |
140
+ | `Caching has already been configured with .never or .forever()` after adding `api.env('test')` | `babel.config.js` still calls `api.cache(true)` before `api.env`. | Remove `api.cache(true)`. `api.env` already caches per environment. |
141
+ | Component tests load the SDK after enabling the Babel plugin | Full mode imports `@userflow-tech/react-native` into every stamped file. | Mock the SDK in the Jest setup file, or skip the plugin in tests. |
142
+
106
143
  ## Still stuck?
107
144
 
108
145
  1. Confirm `await Userflow.init` → `await Userflow.identify` → `UserflowProvider`.
109
146
  2. Search logs for `[Userflow]` and the exact strings in the tables above.
110
- 3. Verify the published flow’s start conditions use MANUAL + PRESENT/NOT_PRESENT
111
- if they depend on an on-device element.
147
+ 3. Verify the published flow’s start conditions use a supported element state
148
+ (`PRESENT`, `NOT_PRESENT`, `CLICK`, `NOT_CLICK`) if they depend on an
149
+ on-device element.
112
150
  4. Confirm the anchor id in code matches the builder selector after stripping `#`.
113
151
  5. For builder Preview: confirm the **Preview mode** top bar is visible before you
114
152
  click Preview in the dashboard.
153
+
154
+ ## Isolated SDK errors (host app still running)
155
+
156
+ The SDK contains overlay render errors and fire-and-forget `track` /
157
+ `updateScreen` failures so they cannot crash the host app. The flow or event is
158
+ dropped; the app keeps running. Isolated failures are logged with
159
+ `console.warn` (not `console.error`, which React Native would report as a
160
+ native crash).
161
+
162
+ Look for:
163
+
164
+ ```text
165
+ [Userflow] isolated error overlay …
166
+ [Userflow] isolated error track …
167
+ ```
168
+
169
+ Contract mistakes still throw (`Call Userflow.init() before identify()`,
170
+ `Call Userflow.identify() before track()`, …). Native module crashes and errors
171
+ in **your** children of `UserflowProvider` are not contained.
172
+
173
+ Full contract: [isolation.md](isolation.md).
@@ -0,0 +1,64 @@
1
+ # WebView banner POC (React Native)
2
+
3
+ Proof of concept for React Native banners that use **Evaluate JavaScript** on buttons—the same `window.userflow` bridge and (when the WebView path is used) web banner DOM + theme **custom.css** as userflow.js on web.
4
+
5
+ ## Enabling
6
+
7
+ 1. **Custom CSS (theme):** Publish custom CSS in the builder (**Edit custom CSS**). When the theme has a `cssVersion`, banners use the WebView renderer and load `custom.css` from the CDN (same URL as userflow.js iframes). Use `.userflow-custom-container-<name>` on container blocks and `.userflow-custom-button-<name>` as button appearance in the builder.
8
+ 2. **Evaluate JavaScript:** Use a button whose **only** action is **Evaluate JavaScript** if the script should auto-run when the WebView loads (once per banner session). Mixed-action buttons run eval on click only.
9
+ 3. `react-native-webview` ships as an SDK dependency; after install or upgrade, **rebuild** the native app (`pod install` on iOS). If Metro still cannot load it, add `react-native-webview` explicitly in the host app and rebuild again.
10
+
11
+ For local SDK development without custom CSS or Evaluate JavaScript, use `setDebugForceWebViewBanner` from `bannerNeedsWebView.ts` (not exported on the public `Userflow` API).
12
+
13
+ Web embeds are unchanged (native userflow.js banner).
14
+
15
+ ## Architecture
16
+
17
+ - **Native shell:** `BannerHost` / `EmbedBannerPlaceholder` unchanged (overlay vs flow, safe area, margins, max width).
18
+ - **Single WebView:** `BannerWebViewBar` renders the web DOM (`userflowjs-banner-*`, `userflowjs-bubble-button-*`) plus inlined frame CSS and a link to `https://cdn.{host}/themes/{themeId}/stylesheets/{cssVersion}/custom.css` when the theme has `cssVersion`.
19
+ - **Actions:** Button clicks post to RN → `BannerSessionEngine.handleActions` → `EVAL_JS` uses the **same** WebView via `evalJsController` (overlay `EvalJsHost` is suppressed while the banner owns the page).
20
+ - **Dismiss from JS:** `userflow.endFlow()` and `userflow.close()` end the **banner session** (same as the native X), not only the tour flow engine.
21
+
22
+ ## Manual test checklist (iOS + Android)
23
+
24
+ - [ ] Standard banner (no Evaluate JavaScript): native `BannerBar`, unchanged layout.
25
+ - [ ] WebView banner: theme custom CSS applies to buttons/content (use builder theme + custom classes on buttons).
26
+ - [ ] Top (`BODY_FIRST`) and bottom (`BODY_LAST`) placement; overlay on/off.
27
+ - [ ] Button **Evaluate JavaScript** runs (`userflow.track`, `userflow.updateUser`, etc.).
28
+ - [ ] **Auto-run on show:** Evaluate JavaScript on an **eval-only** banner button (no other actions on that button) runs when the WebView loads. TinyTime fixture: `apps/tinytime/eval-js-samples/etoro-crypto-deposit-banner-rn.js`.
29
+ - [ ] Dismiss (X) ends banner with user-closed reason.
30
+ - [ ] Small phone, large phone, and tablet aspect ratios—watch for clipped or extra-tall bar (height comes from WebView content measurement).
31
+ - [ ] Rotation: bar height updates after orientation change.
32
+
33
+ ## Findings
34
+
35
+ ### Feasibility
36
+
37
+ - **Works in principle:** WebView can load CDN `custom.css` and reuse web class names; eval JS reuses the existing `wrapCode` / `window.userflow` bridge.
38
+ - **Gaps vs web:** Rich content HTML export is a **subset** (paragraphs, headings, lists, quotes, code, links, attributes)—no images/video/button groups inside content. Button hidden/disabled conditions are not evaluated in the WebView. Fonts rely on theme `fontFamily` / custom CSS, not full web font loading.
39
+
40
+ ### Layout and screen-size risks
41
+
42
+ - Height is driven by content measurement on `.userflowjs-banner-root` and `ResizeObserver` when available; there can be a one-frame jump before measure completes.
43
+ - `overlay: false` push layout depends on measured WebView height—verify on long copy and multiple buttons wrapping.
44
+ - Safe area is applied on the **native** host, not inside the WebView document (unlike some full-screen eval JS samples).
45
+
46
+ ### Single WebView / eval routing
47
+
48
+ - While a WebView banner is mounted, `evalJsController.bannerOwnsWebView` prevents a second overlay WebView.
49
+ - **Conflict:** A flow **Evaluate JavaScript** step running at the same time as a WebView banner would share the banner WebView—not supported in this POC.
50
+
51
+ ### Security / performance
52
+
53
+ - Custom CSS is fetched from the CDN at runtime (network required on first paint).
54
+ - One WebView per banner session with eval JS; memory cost is acceptable for typical use but not ideal for many simultaneous surfaces.
55
+
56
+ ### Follow-ups before production
57
+
58
+ - Builder copy review; document unsupported banner capabilities (sticky scroll, element embed modes, condition-driven buttons).
59
+ - Align with UMD-166 (banner component) and UMD-168 (banner eval extension).
60
+ - Optional: ship compiled `bubble-frame` CSS from CDN instead of bundled subset.
61
+
62
+ ## Customer sample fixtures
63
+
64
+ When validating against a specific customer banner, paste their theme **custom.css** and button **Evaluate JavaScript** into the builder test flow and attach the same snippets to the Jira ticket for regression reference.