@userflow-tech/react-native 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (852) hide show
  1. package/README.md +116 -77
  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/deep-linking.md +70 -33
  8. package/docs/isolation.md +75 -0
  9. package/docs/troubleshooting.md +40 -17
  10. package/docs/webview-custom-banner-poc.md +64 -0
  11. package/expo-plugin/withUserflow.d.ts +3 -2
  12. package/expo-plugin/withUserflow.d.ts.map +1 -1
  13. package/expo-plugin/withUserflow.js +14 -8
  14. package/expo-plugin/withUserflow.js.map +1 -1
  15. package/lib/commonjs/anchors/AutoAnchorRegistry.js +37 -11
  16. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
  17. package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
  18. package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
  19. package/lib/commonjs/anchors/fiber/findAnchorFiber.js +60 -50
  20. package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
  21. package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
  22. package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
  23. package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
  24. package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
  25. package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
  26. package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
  27. package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
  28. package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
  29. package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
  30. package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
  31. package/lib/commonjs/anchors/resolveAutoAnchorHost.js +22 -15
  32. package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
  33. package/lib/commonjs/anchors/semanticMatcher.js +26 -8
  34. package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
  35. package/lib/commonjs/anonymousId.js +4 -1
  36. package/lib/commonjs/anonymousId.js.map +1 -1
  37. package/lib/commonjs/authoring/ElementPickerOverlay.js +126 -50
  38. package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
  39. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +32 -10
  40. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -1
  41. package/lib/commonjs/authoring/chrome/ChromeButton.js +8 -3
  42. package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -1
  43. package/lib/commonjs/authoring/chrome/ChromeIcon.js +4 -0
  44. package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -1
  45. package/lib/commonjs/authoring/chrome/ChromeTopBar.js +23 -10
  46. package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -1
  47. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +19 -12
  48. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -1
  49. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +10 -0
  50. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -1
  51. package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
  52. package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  53. package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  54. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
  55. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  56. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  57. package/lib/commonjs/authoring/chrome/tokens.js +7 -6
  58. package/lib/commonjs/authoring/chrome/tokens.js.map +1 -1
  59. package/lib/commonjs/authoring/elementPickerController.js.map +1 -1
  60. package/lib/commonjs/authoring/fingerprintFromInstance.js +204 -4
  61. package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
  62. package/lib/commonjs/authoring/hitTest.js +264 -16
  63. package/lib/commonjs/authoring/hitTest.js.map +1 -1
  64. package/lib/commonjs/authoring/hostAtPoint.js +204 -0
  65. package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
  66. package/lib/commonjs/content/BannerStepButton.js +68 -0
  67. package/lib/commonjs/content/BannerStepButton.js.map +1 -0
  68. package/lib/commonjs/content/buttonAppearance.js +16 -0
  69. package/lib/commonjs/content/buttonAppearance.js.map +1 -1
  70. package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
  71. package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
  72. package/lib/commonjs/content/themeColor.js +15 -0
  73. package/lib/commonjs/content/themeColor.js.map +1 -1
  74. package/lib/commonjs/deepLinking.js +4 -4
  75. package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
  76. package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
  77. package/lib/commonjs/evalJs/bootstrap.js +84 -0
  78. package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
  79. package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
  80. package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
  81. package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
  82. package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
  83. package/lib/commonjs/evalJs/evalJsController.js +124 -0
  84. package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
  85. package/lib/commonjs/evalJs/getWebView.js +81 -0
  86. package/lib/commonjs/evalJs/getWebView.js.map +1 -0
  87. package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
  88. package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
  89. package/lib/commonjs/evalJs/types.js +2 -0
  90. package/lib/commonjs/evalJs/types.js.map +1 -0
  91. package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
  92. package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
  93. package/lib/commonjs/expo-router/index.js +19 -0
  94. package/lib/commonjs/expo-router/index.js.map +1 -1
  95. package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
  96. package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
  97. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +2 -2
  98. package/lib/commonjs/index.js +118 -43
  99. package/lib/commonjs/index.js.map +1 -1
  100. package/lib/commonjs/lifecycle.js.map +1 -1
  101. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +14 -11
  102. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
  103. package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
  104. package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
  105. package/lib/commonjs/pairing/PairingController.js +245 -27
  106. package/lib/commonjs/pairing/PairingController.js.map +1 -1
  107. package/lib/commonjs/pairing/PreviewModeBanner.js +55 -16
  108. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
  109. package/lib/commonjs/pairing/deepLink.js +22 -5
  110. package/lib/commonjs/pairing/deepLink.js.map +1 -1
  111. package/lib/commonjs/pairing/deviceId.js +47 -0
  112. package/lib/commonjs/pairing/deviceId.js.map +1 -0
  113. package/lib/commonjs/pairing/diagnostics.js +5 -4
  114. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  115. package/lib/commonjs/pairing/tokenStorage.js +47 -7
  116. package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
  117. package/lib/commonjs/pairing/usePairingState.js +3 -1
  118. package/lib/commonjs/pairing/usePairingState.js.map +1 -1
  119. package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
  120. package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
  121. package/lib/commonjs/runtime/BannerHost.js +96 -0
  122. package/lib/commonjs/runtime/BannerHost.js.map +1 -0
  123. package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
  124. package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
  125. package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
  126. package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
  127. package/lib/commonjs/runtime/TargetPressBridge.js +19 -12
  128. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
  129. package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
  130. package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
  131. package/lib/commonjs/runtime/UserflowProvider.js +135 -65
  132. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
  133. package/lib/commonjs/runtime/bannerEngine.js +63 -0
  134. package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
  135. package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
  136. package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
  137. package/lib/commonjs/runtime/bannerPlacement.js +37 -0
  138. package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
  139. package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
  140. package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
  141. package/lib/commonjs/runtime/flowEngine.js +75 -3
  142. package/lib/commonjs/runtime/flowEngine.js.map +1 -1
  143. package/lib/commonjs/runtime/isolateCall.js +48 -0
  144. package/lib/commonjs/runtime/isolateCall.js.map +1 -0
  145. package/lib/commonjs/runtime/reportSdkError.js +19 -0
  146. package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
  147. package/lib/commonjs/runtime/useBannerSession.js +37 -0
  148. package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
  149. package/lib/commonjs/screenTracker.js +34 -9
  150. package/lib/commonjs/screenTracker.js.map +1 -1
  151. package/lib/commonjs/surfaces/BannerBar.js +160 -0
  152. package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
  153. package/lib/commonjs/surfaces/BannerSurface.js +78 -0
  154. package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
  155. package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
  156. package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
  157. package/lib/commonjs/surfaces/ModalSurface.js +1 -1
  158. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
  159. package/lib/commonjs/surfaces/TooltipSurface.js +17 -1
  160. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
  161. package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
  162. package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
  163. package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
  164. package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
  165. package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
  166. package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
  167. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
  168. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
  169. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
  170. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
  171. package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
  172. package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
  173. package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
  174. package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
  175. package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
  176. package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
  177. package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
  178. package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
  179. package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
  180. package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
  181. package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
  182. package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
  183. package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
  184. package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
  185. package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
  186. package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
  187. package/lib/commonjs/surfaces/safeArea.js +23 -0
  188. package/lib/commonjs/surfaces/safeArea.js.map +1 -1
  189. package/lib/commonjs/version.js +1 -1
  190. package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
  191. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
  192. package/lib/module/anchors/fiber/fiberPath.js +118 -0
  193. package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
  194. package/lib/module/anchors/fiber/findAnchorFiber.js +60 -50
  195. package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
  196. package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
  197. package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
  198. package/lib/module/anchors/fiber/visibleRect.js +139 -0
  199. package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
  200. package/lib/module/anchors/fiber/visibleScreens.js +73 -37
  201. package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
  202. package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
  203. package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
  204. package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
  205. package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
  206. package/lib/module/anchors/resolveAutoAnchorHost.js +22 -15
  207. package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
  208. package/lib/module/anchors/semanticMatcher.js +26 -9
  209. package/lib/module/anchors/semanticMatcher.js.map +1 -1
  210. package/lib/module/anonymousId.js +4 -2
  211. package/lib/module/anonymousId.js.map +1 -1
  212. package/lib/module/authoring/ElementPickerOverlay.js +128 -52
  213. package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
  214. package/lib/module/authoring/chrome/ChromeBottomSheet.js +32 -10
  215. package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -1
  216. package/lib/module/authoring/chrome/ChromeButton.js +8 -3
  217. package/lib/module/authoring/chrome/ChromeButton.js.map +1 -1
  218. package/lib/module/authoring/chrome/ChromeIcon.js +4 -0
  219. package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -1
  220. package/lib/module/authoring/chrome/ChromeTopBar.js +23 -10
  221. package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -1
  222. package/lib/module/authoring/chrome/DoubleTapBridge.js +19 -12
  223. package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -1
  224. package/lib/module/authoring/chrome/doubleTapMonitor.js +10 -0
  225. package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -1
  226. package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
  227. package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  228. package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  229. package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
  230. package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  231. package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  232. package/lib/module/authoring/chrome/tokens.js +7 -6
  233. package/lib/module/authoring/chrome/tokens.js.map +1 -1
  234. package/lib/module/authoring/elementPickerController.js.map +1 -1
  235. package/lib/module/authoring/fingerprintFromInstance.js +198 -4
  236. package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
  237. package/lib/module/authoring/hitTest.js +264 -18
  238. package/lib/module/authoring/hitTest.js.map +1 -1
  239. package/lib/module/authoring/hostAtPoint.js +199 -0
  240. package/lib/module/authoring/hostAtPoint.js.map +1 -0
  241. package/lib/module/content/BannerStepButton.js +63 -0
  242. package/lib/module/content/BannerStepButton.js.map +1 -0
  243. package/lib/module/content/buttonAppearance.js +14 -0
  244. package/lib/module/content/buttonAppearance.js.map +1 -1
  245. package/lib/module/content/resolveBannerButtonChrome.js +41 -0
  246. package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
  247. package/lib/module/content/themeColor.js +14 -0
  248. package/lib/module/content/themeColor.js.map +1 -1
  249. package/lib/module/deepLinking.js +4 -4
  250. package/lib/module/evalJs/EvalJsHost.js +239 -0
  251. package/lib/module/evalJs/EvalJsHost.js.map +1 -0
  252. package/lib/module/evalJs/bootstrap.js +76 -0
  253. package/lib/module/evalJs/bootstrap.js.map +1 -0
  254. package/lib/module/evalJs/bridgeMessages.js +139 -0
  255. package/lib/module/evalJs/bridgeMessages.js.map +1 -0
  256. package/lib/module/evalJs/evalJsBridge.js +25 -0
  257. package/lib/module/evalJs/evalJsBridge.js.map +1 -0
  258. package/lib/module/evalJs/evalJsController.js +119 -0
  259. package/lib/module/evalJs/evalJsController.js.map +1 -0
  260. package/lib/module/evalJs/getWebView.js +76 -0
  261. package/lib/module/evalJs/getWebView.js.map +1 -0
  262. package/lib/module/evalJs/injectEvalPending.js +15 -0
  263. package/lib/module/evalJs/injectEvalPending.js.map +1 -0
  264. package/lib/module/evalJs/types.js +2 -0
  265. package/lib/module/evalJs/types.js.map +1 -0
  266. package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
  267. package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
  268. package/lib/module/expo-router/index.js +1 -0
  269. package/lib/module/expo-router/index.js.map +1 -1
  270. package/lib/module/expo-router/redirectSystemPath.js +70 -0
  271. package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
  272. package/lib/module/expo-router/useUserflowExpoRouter.js +2 -2
  273. package/lib/module/index.js +114 -45
  274. package/lib/module/index.js.map +1 -1
  275. package/lib/module/lifecycle.js.map +1 -1
  276. package/lib/module/navigation/WithUserflowReactNavigation.js +14 -11
  277. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
  278. package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
  279. package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
  280. package/lib/module/pairing/PairingController.js +245 -27
  281. package/lib/module/pairing/PairingController.js.map +1 -1
  282. package/lib/module/pairing/PreviewModeBanner.js +54 -16
  283. package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
  284. package/lib/module/pairing/deepLink.js +21 -5
  285. package/lib/module/pairing/deepLink.js.map +1 -1
  286. package/lib/module/pairing/deviceId.js +41 -0
  287. package/lib/module/pairing/deviceId.js.map +1 -0
  288. package/lib/module/pairing/diagnostics.js +5 -4
  289. package/lib/module/pairing/diagnostics.js.map +1 -1
  290. package/lib/module/pairing/tokenStorage.js +47 -7
  291. package/lib/module/pairing/tokenStorage.js.map +1 -1
  292. package/lib/module/pairing/usePairingState.js +3 -1
  293. package/lib/module/pairing/usePairingState.js.map +1 -1
  294. package/lib/module/pairing/usePreviewBarHold.js +134 -0
  295. package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
  296. package/lib/module/runtime/BannerHost.js +92 -0
  297. package/lib/module/runtime/BannerHost.js.map +1 -0
  298. package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
  299. package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
  300. package/lib/module/runtime/SdkErrorBoundary.js +55 -0
  301. package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
  302. package/lib/module/runtime/TargetPressBridge.js +19 -12
  303. package/lib/module/runtime/TargetPressBridge.js.map +1 -1
  304. package/lib/module/runtime/UserflowOverlay.js +92 -0
  305. package/lib/module/runtime/UserflowOverlay.js.map +1 -0
  306. package/lib/module/runtime/UserflowProvider.js +136 -66
  307. package/lib/module/runtime/UserflowProvider.js.map +1 -1
  308. package/lib/module/runtime/bannerEngine.js +55 -0
  309. package/lib/module/runtime/bannerEngine.js.map +1 -0
  310. package/lib/module/runtime/bannerEngineContext.js +7 -0
  311. package/lib/module/runtime/bannerEngineContext.js.map +1 -0
  312. package/lib/module/runtime/bannerPlacement.js +30 -0
  313. package/lib/module/runtime/bannerPlacement.js.map +1 -0
  314. package/lib/module/runtime/embedBannerRegistry.js +24 -0
  315. package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
  316. package/lib/module/runtime/flowEngine.js +72 -3
  317. package/lib/module/runtime/flowEngine.js.map +1 -1
  318. package/lib/module/runtime/isolateCall.js +43 -0
  319. package/lib/module/runtime/isolateCall.js.map +1 -0
  320. package/lib/module/runtime/reportSdkError.js +15 -0
  321. package/lib/module/runtime/reportSdkError.js.map +1 -0
  322. package/lib/module/runtime/useBannerSession.js +33 -0
  323. package/lib/module/runtime/useBannerSession.js.map +1 -0
  324. package/lib/module/screenTracker.js +33 -9
  325. package/lib/module/screenTracker.js.map +1 -1
  326. package/lib/module/surfaces/BannerBar.js +155 -0
  327. package/lib/module/surfaces/BannerBar.js.map +1 -0
  328. package/lib/module/surfaces/BannerSurface.js +72 -0
  329. package/lib/module/surfaces/BannerSurface.js.map +1 -0
  330. package/lib/module/surfaces/MadeWithUserflow.js +11 -7
  331. package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
  332. package/lib/module/surfaces/ModalSurface.js +1 -1
  333. package/lib/module/surfaces/ModalSurface.js.map +1 -1
  334. package/lib/module/surfaces/TooltipSurface.js +17 -1
  335. package/lib/module/surfaces/TooltipSurface.js.map +1 -1
  336. package/lib/module/surfaces/bannerBarLayout.js +69 -0
  337. package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
  338. package/lib/module/surfaces/bannerBarTokens.js +37 -0
  339. package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
  340. package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
  341. package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
  342. package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
  343. package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
  344. package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
  345. package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
  346. package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
  347. package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
  348. package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
  349. package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
  350. package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
  351. package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
  352. package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
  353. package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
  354. package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
  355. package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
  356. package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
  357. package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
  358. package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
  359. package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
  360. package/lib/module/surfaces/resolveBannerTheme.js +16 -0
  361. package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
  362. package/lib/module/surfaces/safeArea.js +22 -0
  363. package/lib/module/surfaces/safeArea.js.map +1 -1
  364. package/lib/module/version.js +1 -1
  365. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +14 -0
  366. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  367. package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
  368. package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
  370. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
  371. package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
  372. package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
  373. package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
  374. package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
  375. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
  376. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
  377. package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
  378. package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
  379. package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
  380. package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +6 -4
  383. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
  384. package/lib/typescript/commonjs/src/anonymousId.d.ts +1 -0
  385. package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
  386. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +1 -0
  387. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
  388. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
  389. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
  391. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +1 -1
  392. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
  393. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
  394. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
  396. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
  397. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +7 -6
  399. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -1
  400. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +2 -3
  401. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -1
  402. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +57 -2
  403. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
  404. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +47 -3
  405. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
  406. package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
  407. package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
  408. package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
  409. package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
  411. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
  413. package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
  414. package/lib/typescript/commonjs/src/content/themeColor.d.ts +2 -0
  415. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
  417. package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
  418. package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
  419. package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
  420. package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
  421. package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
  422. package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
  423. package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
  424. package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
  425. package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
  426. package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
  427. package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
  428. package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
  429. package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
  430. package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
  431. package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
  432. package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
  433. package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
  434. package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
  435. package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
  436. package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
  437. package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
  438. package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
  439. package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
  440. package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
  441. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
  442. package/lib/typescript/commonjs/src/index.d.ts +16 -1
  443. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/src/lifecycle.d.ts +4 -1
  445. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
  446. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
  448. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +71 -4
  449. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
  450. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +9 -1
  451. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  452. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
  453. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
  454. package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
  455. package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
  456. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +3 -2
  457. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
  458. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +14 -2
  459. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
  460. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
  461. package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
  462. package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
  463. package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
  464. package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
  465. package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
  466. package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
  467. package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
  468. package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
  470. package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
  471. package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
  472. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +9 -3
  473. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
  474. package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
  475. package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
  476. package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
  477. package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
  478. package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
  479. package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
  480. package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
  481. package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
  482. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
  483. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
  484. package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
  485. package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
  486. package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
  487. package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
  488. package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
  489. package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
  490. package/lib/typescript/commonjs/src/screenTracker.d.ts +7 -3
  491. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
  492. package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
  493. package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
  494. package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
  495. package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
  496. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
  497. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
  498. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
  499. package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
  500. package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
  501. package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
  502. package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
  503. package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
  504. package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
  505. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
  506. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
  507. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
  508. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
  509. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
  510. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
  511. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
  512. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
  513. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
  514. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
  515. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
  516. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
  517. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
  518. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
  519. package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
  520. package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
  521. package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
  522. package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
  523. package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
  524. package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
  525. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +6 -0
  526. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
  527. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  528. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +14 -0
  529. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  530. package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
  531. package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
  532. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
  533. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
  534. package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
  535. package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
  536. package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
  537. package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
  538. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
  539. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
  540. package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
  541. package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
  542. package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
  543. package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
  544. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
  545. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +6 -4
  546. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
  547. package/lib/typescript/module/src/anonymousId.d.ts +1 -0
  548. package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
  549. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +1 -0
  550. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
  551. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
  552. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
  553. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
  554. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +1 -1
  555. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
  556. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
  557. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
  558. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
  559. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
  560. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
  561. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +7 -6
  562. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -1
  563. package/lib/typescript/module/src/authoring/elementPickerController.d.ts +2 -3
  564. package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -1
  565. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +57 -2
  566. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
  567. package/lib/typescript/module/src/authoring/hitTest.d.ts +47 -3
  568. package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
  569. package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
  570. package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
  571. package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
  572. package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
  573. package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
  574. package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
  575. package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
  576. package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
  577. package/lib/typescript/module/src/content/themeColor.d.ts +2 -0
  578. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
  579. package/lib/typescript/module/src/content/types.d.ts +1 -0
  580. package/lib/typescript/module/src/content/types.d.ts.map +1 -1
  581. package/lib/typescript/module/src/deepLinking.d.ts +4 -4
  582. package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
  583. package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
  584. package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
  585. package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
  586. package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
  587. package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
  588. package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
  589. package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
  590. package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
  591. package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
  592. package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
  593. package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
  594. package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
  595. package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
  596. package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
  597. package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
  598. package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
  599. package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
  600. package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
  601. package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
  602. package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
  603. package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
  604. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
  605. package/lib/typescript/module/src/index.d.ts +16 -1
  606. package/lib/typescript/module/src/index.d.ts.map +1 -1
  607. package/lib/typescript/module/src/lifecycle.d.ts +4 -1
  608. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
  609. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  610. package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
  611. package/lib/typescript/module/src/pairing/PairingController.d.ts +71 -4
  612. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
  613. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +9 -1
  614. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  615. package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
  616. package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
  617. package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
  618. package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
  619. package/lib/typescript/module/src/pairing/diagnostics.d.ts +3 -2
  620. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
  621. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +14 -2
  622. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
  623. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
  624. package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
  625. package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
  626. package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
  627. package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
  628. package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
  629. package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
  630. package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
  631. package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
  632. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
  633. package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
  634. package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
  635. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +9 -3
  636. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
  637. package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
  638. package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
  639. package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
  640. package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
  641. package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
  642. package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
  643. package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
  644. package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
  645. package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
  646. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
  647. package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
  648. package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
  649. package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
  650. package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
  651. package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
  652. package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
  653. package/lib/typescript/module/src/screenTracker.d.ts +7 -3
  654. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
  655. package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
  656. package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
  657. package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
  658. package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
  659. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
  660. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
  661. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
  662. package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
  663. package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
  664. package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
  665. package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
  666. package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
  667. package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
  668. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
  669. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
  670. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
  671. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
  672. package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
  673. package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
  674. package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
  675. package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
  676. package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
  677. package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
  678. package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
  679. package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
  680. package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
  681. package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
  682. package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
  683. package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
  684. package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
  685. package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
  686. package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
  687. package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
  688. package/lib/typescript/module/src/surfaces/safeArea.d.ts +6 -0
  689. package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
  690. package/lib/typescript/module/src/version.d.ts +1 -1
  691. package/package.json +4 -3
  692. package/src/anchors/AutoAnchorRegistry.ts +41 -11
  693. package/src/anchors/fiber/fiberPath.ts +117 -0
  694. package/src/anchors/fiber/findAnchorFiber.ts +57 -47
  695. package/src/anchors/fiber/resolveFiberPath.ts +215 -0
  696. package/src/anchors/fiber/visibleRect.ts +153 -0
  697. package/src/anchors/fiber/visibleScreens.ts +74 -36
  698. package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
  699. package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
  700. package/src/anchors/resolveAutoAnchorHost.ts +17 -15
  701. package/src/anchors/semanticMatcher.ts +38 -14
  702. package/src/anonymousId.ts +2 -1
  703. package/src/authoring/ElementPickerOverlay.tsx +168 -59
  704. package/src/authoring/chrome/ChromeBottomSheet.tsx +49 -8
  705. package/src/authoring/chrome/ChromeButton.tsx +9 -4
  706. package/src/authoring/chrome/ChromeIcon.tsx +10 -1
  707. package/src/authoring/chrome/ChromeTopBar.tsx +39 -15
  708. package/src/authoring/chrome/DoubleTapBridge.tsx +19 -12
  709. package/src/authoring/chrome/doubleTapMonitor.ts +10 -0
  710. package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
  711. package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  712. package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  713. package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
  714. package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  715. package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  716. package/src/authoring/chrome/tokens.ts +7 -2
  717. package/src/authoring/elementPickerController.ts +2 -4
  718. package/src/authoring/fingerprintFromInstance.ts +170 -4
  719. package/src/authoring/hitTest.ts +324 -16
  720. package/src/authoring/hostAtPoint.ts +247 -0
  721. package/src/content/BannerStepButton.tsx +91 -0
  722. package/src/content/buttonAppearance.ts +16 -0
  723. package/src/content/resolveBannerButtonChrome.ts +49 -0
  724. package/src/content/themeColor.ts +15 -0
  725. package/src/content/types.ts +1 -0
  726. package/src/deepLinking.ts +4 -4
  727. package/src/evalJs/EvalJsHost.tsx +255 -0
  728. package/src/evalJs/bootstrap.ts +83 -0
  729. package/src/evalJs/bridgeMessages.ts +134 -0
  730. package/src/evalJs/evalJsBridge.ts +42 -0
  731. package/src/evalJs/evalJsController.ts +127 -0
  732. package/src/evalJs/getWebView.ts +124 -0
  733. package/src/evalJs/injectEvalPending.ts +14 -0
  734. package/src/evalJs/types.ts +56 -0
  735. package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
  736. package/src/expo-router/index.ts +8 -0
  737. package/src/expo-router/redirectSystemPath.ts +86 -0
  738. package/src/expo-router/useUserflowExpoRouter.ts +2 -2
  739. package/src/index.ts +129 -45
  740. package/src/lifecycle.ts +4 -1
  741. package/src/navigation/WithUserflowReactNavigation.tsx +13 -10
  742. package/src/navigation/openFlowNavigateUrl.ts +12 -5
  743. package/src/pairing/PairingController.ts +283 -29
  744. package/src/pairing/PreviewModeBanner.tsx +71 -14
  745. package/src/pairing/deepLink.ts +23 -5
  746. package/src/pairing/deviceId.ts +43 -0
  747. package/src/pairing/diagnostics.ts +6 -4
  748. package/src/pairing/tokenStorage.ts +60 -7
  749. package/src/pairing/usePairingState.ts +2 -0
  750. package/src/pairing/usePreviewBarHold.ts +160 -0
  751. package/src/runtime/BannerHost.tsx +102 -0
  752. package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
  753. package/src/runtime/SdkErrorBoundary.tsx +77 -0
  754. package/src/runtime/TargetPressBridge.tsx +19 -12
  755. package/src/runtime/UserflowOverlay.tsx +118 -0
  756. package/src/runtime/UserflowProvider.tsx +139 -64
  757. package/src/runtime/bannerEngine.ts +55 -0
  758. package/src/runtime/bannerEngineContext.ts +5 -0
  759. package/src/runtime/bannerPlacement.ts +36 -0
  760. package/src/runtime/embedBannerRegistry.ts +28 -0
  761. package/src/runtime/flowEngine.ts +76 -3
  762. package/src/runtime/isolateCall.ts +53 -0
  763. package/src/runtime/reportSdkError.ts +12 -0
  764. package/src/runtime/useBannerSession.ts +35 -0
  765. package/src/screenTracker.ts +34 -8
  766. package/src/surfaces/BannerBar.tsx +176 -0
  767. package/src/surfaces/BannerSurface.tsx +82 -0
  768. package/src/surfaces/MadeWithUserflow.tsx +15 -10
  769. package/src/surfaces/ModalSurface.tsx +1 -1
  770. package/src/surfaces/TooltipSurface.tsx +17 -1
  771. package/src/surfaces/bannerBarLayout.ts +74 -0
  772. package/src/surfaces/bannerBarTokens.ts +34 -0
  773. package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
  774. package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
  775. package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
  776. package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
  777. package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
  778. package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
  779. package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
  780. package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
  781. package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
  782. package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
  783. package/src/surfaces/resolveBannerTheme.ts +18 -0
  784. package/src/surfaces/safeArea.ts +29 -0
  785. package/src/version.ts +1 -1
  786. package/vendor/core/dist/attributes.d.ts.map +1 -1
  787. package/vendor/core/dist/attributes.js +4 -4
  788. package/vendor/core/dist/attributes.js.map +1 -1
  789. package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
  790. package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
  791. package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
  792. package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
  793. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +41 -1
  794. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
  795. package/vendor/core/dist/engine/FlowSessionEngine.js +167 -28
  796. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
  797. package/vendor/core/dist/engine/PairingEngine.d.ts +38 -2
  798. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
  799. package/vendor/core/dist/engine/PairingEngine.js +19 -2
  800. package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
  801. package/vendor/core/dist/engine/UserflowCore.d.ts +10 -1
  802. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
  803. package/vendor/core/dist/engine/UserflowCore.js +47 -27
  804. package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
  805. package/vendor/core/dist/engine/handleActions.d.ts +17 -3
  806. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
  807. package/vendor/core/dist/engine/handleActions.js +17 -14
  808. package/vendor/core/dist/engine/handleActions.js.map +1 -1
  809. package/vendor/core/dist/engine/trackCondition.d.ts +2 -0
  810. package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -1
  811. package/vendor/core/dist/engine/trackCondition.js +4 -2
  812. package/vendor/core/dist/engine/trackCondition.js.map +1 -1
  813. package/vendor/core/dist/engine/trackStepTriggers.d.ts +11 -1
  814. package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -1
  815. package/vendor/core/dist/engine/trackStepTriggers.js +42 -16
  816. package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -1
  817. package/vendor/core/dist/errors.d.ts +11 -1
  818. package/vendor/core/dist/errors.d.ts.map +1 -1
  819. package/vendor/core/dist/errors.js +2 -1
  820. package/vendor/core/dist/errors.js.map +1 -1
  821. package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
  822. package/vendor/core/dist/eventAttributes.js +4 -2
  823. package/vendor/core/dist/eventAttributes.js.map +1 -1
  824. package/vendor/core/dist/index.d.ts +4 -1
  825. package/vendor/core/dist/index.d.ts.map +1 -1
  826. package/vendor/core/dist/index.js +1 -0
  827. package/vendor/core/dist/index.js.map +1 -1
  828. package/vendor/core/dist/normalizeAttributes.js +9 -7
  829. package/vendor/core/dist/normalizeAttributes.js.map +1 -1
  830. package/vendor/core/dist/transport/pairing.d.ts +5 -0
  831. package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
  832. package/vendor/core/dist/transport/pairing.js +69 -2
  833. package/vendor/core/dist/transport/pairing.js.map +1 -1
  834. package/vendor/core/dist/transport/phoenix.d.ts +8 -0
  835. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
  836. package/vendor/core/dist/transport/phoenix.js +16 -2
  837. package/vendor/core/dist/transport/phoenix.js.map +1 -1
  838. package/vendor/core/dist/version.d.ts +1 -1
  839. package/vendor/core/dist/version.js +1 -1
  840. package/vendor/core/package.json +1 -1
  841. package/vendor/protocol/dist/autoData.d.ts +8 -15
  842. package/vendor/protocol/dist/autoData.d.ts.map +1 -1
  843. package/vendor/protocol/dist/autoData.js.map +1 -1
  844. package/vendor/protocol/dist/flows.d.ts +58 -2
  845. package/vendor/protocol/dist/flows.d.ts.map +1 -1
  846. package/vendor/protocol/dist/flows.js +20 -2
  847. package/vendor/protocol/dist/flows.js.map +1 -1
  848. package/vendor/protocol/dist/messages.d.ts +22 -12
  849. package/vendor/protocol/dist/messages.d.ts.map +1 -1
  850. package/vendor/protocol/dist/messages.js +5 -2
  851. package/vendor/protocol/dist/messages.js.map +1 -1
  852. 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.
@@ -72,28 +72,30 @@ Id matching: dashboard `#invite-teammates` ↔ `testID="invite-teammates"` (or `
72
72
 
73
73
  ### 4. Connection
74
74
 
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 |
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 `screenPath` / legacy `path`/`screen`. The SDK must send `pageUrl: ""` plus `screenName` only |
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 |
81
81
 
82
82
  ## Builder preview / pairing
83
83
 
84
84
  Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all builds (including release).
85
85
 
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` |
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
+ | 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 |
91
+ | 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 |
92
+ | "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)) |
93
+ | 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 |
94
+ | 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 |
95
+ | 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 |
96
+ | Pairing never connects against a local stack | `pairingEndpoint` still pointing at production | `Userflow.init({ pairingEndpoint: 'http://localhost:40401', serverEndpoint: '…' })` |
97
+ | 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` |
98
+ | 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
99
 
98
100
  ## Expo
99
101
 
@@ -112,3 +114,24 @@ Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all buil
112
114
  4. Confirm the anchor id in code matches the builder selector after stripping `#`.
113
115
  5. For builder Preview: confirm the **Preview mode** top bar is visible before you
114
116
  click Preview in the dashboard.
117
+
118
+ ## Isolated SDK errors (host app still running)
119
+
120
+ The SDK contains overlay render errors and fire-and-forget `track` /
121
+ `updateScreen` failures so they cannot crash the host app. The flow or event is
122
+ dropped; the app keeps running. Isolated failures are logged with
123
+ `console.warn` (not `console.error`, which React Native would report as a
124
+ native crash).
125
+
126
+ Look for:
127
+
128
+ ```text
129
+ [Userflow] isolated error overlay …
130
+ [Userflow] isolated error track …
131
+ ```
132
+
133
+ Contract mistakes still throw (`Call Userflow.init() before identify()`,
134
+ `Call Userflow.identify() before track()`, …). Native module crashes and errors
135
+ in **your** children of `UserflowProvider` are not contained.
136
+
137
+ 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.
@@ -1,8 +1,9 @@
1
1
  import { type ConfigPlugin } from '@expo/config-plugins';
2
2
  export interface UserflowExpoPluginOptions {
3
3
  /**
4
- * The environment's `scheme_id` from the Userflow dashboard (e.g.
5
- * `userflow-257587`). Must be `userflow-` followed by digits.
4
+ * The environment's `scheme_id` from the Userflow dashboard: `userflow-`
5
+ * followed by an opaque id (e.g. `userflow-v7twv2fw2ja2jaco7kesvowmem`).
6
+ * Copy it exactly and do not rely on its shape.
6
7
  *
7
8
  * `schemeId` is accepted as an alias for the same value (pairing naming).
8
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"withUserflow.d.ts","sourceRoot":"","sources":["../plugin/withUserflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAiC9B,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA2ED,QAAA,MAAM,MAAM,gDAAmE,CAAC;AAEhF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"withUserflow.d.ts","sourceRoot":"","sources":["../plugin/withUserflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAsC9B,MAAM,WAAW,yBAAyB;IACxC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA4ED,QAAA,MAAM,MAAM,gDAAmE,CAAC;AAEhF,eAAe,MAAM,CAAC"}
@@ -5,8 +5,8 @@ const config_plugins_1 = require("@expo/config-plugins");
5
5
  * Expo config plugin shipped inside `@userflow-tech/react-native`.
6
6
  *
7
7
  * Registers the environment's `scheme_id` as a URL scheme. One scheme serves both
8
- * builder preview (`userflow-257587://?token=...`) and pairing
9
- * (`userflow-257587://?pairing_token=...`).
8
+ * builder preview (`userflow-v7twv2fw2ja2jaco7kesvowmem://?token=...`) and
9
+ * pairing (`userflow-v7twv2fw2ja2jaco7kesvowmem://?pairing_token=...`).
10
10
  *
11
11
  * Optional peers unlock extras: `@react-native-community/netinfo` enables
12
12
  * network-aware reconnect; without it the SDK falls back to heartbeat-based
@@ -17,7 +17,7 @@ const config_plugins_1 = require("@expo/config-plugins");
17
17
  *
18
18
  * {
19
19
  * "expo": {
20
- * "plugins": [["@userflow-tech/react-native", { "schemeId": "userflow-257587" }]]
20
+ * "plugins": [["@userflow-tech/react-native", { "schemeId": "userflow-v7twv2fw2ja2jaco7kesvowmem" }]]
21
21
  * }
22
22
  * }
23
23
  *
@@ -28,8 +28,13 @@ const PACKAGE_NAME = '@userflow-tech/react-native';
28
28
  // eslint-disable-next-line @typescript-eslint/no-var-requires
29
29
  const PACKAGE_VERSION = require('../package.json').version;
30
30
  const USERFLOW_SCHEME_PREFIX = 'userflow-';
31
- /** Environment scheme_id shape — must match pairing deep-link validation. */
32
- const USERFLOW_SCHEME = /^userflow-\d+$/;
31
+ /**
32
+ * Environment scheme_id shape — must match pairing deep-link validation
33
+ * (`packages/react-native/src/pairing/deepLink.ts`). Everything after
34
+ * `userflow-` is an opaque id owned by the backend, so only check that it is
35
+ * one or more alphanumeric segments joined by single hyphens.
36
+ */
37
+ const USERFLOW_SCHEME = /^userflow-[a-z0-9]+(?:-[a-z0-9]+)*$/;
33
38
  function normalizeUrlScheme(urlScheme) {
34
39
  if (urlScheme == null)
35
40
  return null;
@@ -42,14 +47,15 @@ function normalizeUrlScheme(urlScheme) {
42
47
  if (!trimmed)
43
48
  return null;
44
49
  if (trimmed.includes('://') || trimmed.includes('/') || trimmed.includes(':')) {
45
- throw new Error(`[${PACKAGE_NAME}] urlScheme must be a bare scheme (e.g. "userflow-257587"), got "${urlScheme}"`);
50
+ throw new Error(`[${PACKAGE_NAME}] urlScheme must be a bare scheme (e.g. "userflow-v7twv2fw2ja2jaco7kesvowmem"), got "${urlScheme}"`);
46
51
  }
47
52
  if (!trimmed.startsWith(USERFLOW_SCHEME_PREFIX)) {
48
53
  throw new Error(`[${PACKAGE_NAME}] urlScheme must start with "${USERFLOW_SCHEME_PREFIX}", got "${urlScheme}"`);
49
54
  }
50
55
  if (!USERFLOW_SCHEME.test(trimmed)) {
51
- throw new Error(`[${PACKAGE_NAME}] urlScheme must be "${USERFLOW_SCHEME_PREFIX}" followed by digits ` +
52
- `(e.g. "userflow-257587"), got "${urlScheme}"`);
56
+ throw new Error(`[${PACKAGE_NAME}] urlScheme must be your environment's scheme_id: ` +
57
+ `"${USERFLOW_SCHEME_PREFIX}" followed by letters and digits, optionally split by ` +
58
+ `single hyphens (e.g. "userflow-v7twv2fw2ja2jaco7kesvowmem"), got "${urlScheme}"`);
53
59
  }
54
60
  return trimmed;
55
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"withUserflow.js","sourceRoot":"","sources":["../plugin/withUserflow.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"withUserflow.js","sourceRoot":"","sources":["../plugin/withUserflow.ts"],"names":[],"mappings":";;AAAA,yDAO8B;AAE9B;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,YAAY,GAAG,6BAA6B,CAAC;AACnD,uFAAuF;AACvF,8DAA8D;AAC9D,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAiB,CAAC;AACrE,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAC3C;;;;;GAKG;AACH,MAAM,eAAe,GAAG,qCAAqC,CAAC;AAiB9D,SAAS,kBAAkB,CAAC,SAA6B;IACvD,IAAI,SAAS,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IACnC,MAAM,OAAO,GAAG,SAAS;SACtB,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;SACxB,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;SACnB,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACrB,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9E,MAAM,IAAI,KAAK,CACb,IAAI,YAAY,wFAAwF,SAAS,GAAG,CACrH,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CACb,IAAI,YAAY,gCAAgC,sBAAsB,WAAW,SAAS,GAAG,CAC9F,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CACb,IAAI,YAAY,oDAAoD;YAClE,IAAI,sBAAsB,wDAAwD;YAClF,qEAAqE,SAAS,GAAG,CACpF,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,wBAAwB,GAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE;IAC3E,OAAO,IAAA,8BAAa,EAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACtC,IAAI,CAAC,0BAAS,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9D,MAAM,CAAC,UAAU,GAAG,0BAAS,CAAC,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;QAClF,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE;IAC/E,OAAO,IAAA,oCAAmB,EAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QAC5C,MAAM,YAAY,GAAG,8BAAa,CAAC,QAAQ,CAAC,sBAAsB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACtF,MAAM,aAAa,GAAG,YAAY,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QAC1D,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACtD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,gBAAgB,CAAC,KAAK,SAAS,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,aAAa,CAAC,IAAI,CAAC;gBACjB,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,4BAA4B,EAAE,EAAE,CAAC;gBACjE,QAAQ,EAAE;oBACR,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,iCAAiC,EAAE,EAAE;oBAC5D,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE,EAAE;iBAC/D;gBACD,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,CAAC;aAC/C,CAAC,CAAC;YACH,YAAY,CAAC,eAAe,CAAC,GAAG,aAAa,CAAC;QAChD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,YAAY,GAAmD,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IAC5F,MAAM,SAAS,GAAG,kBAAkB,CAAC,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC9E,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,GAAG,wBAAwB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACrD,MAAM,GAAG,4BAA4B,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACzD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,IAAA,oCAAmB,EAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC;AAEhF,kBAAe,MAAM,CAAC;AACtB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;AACxB,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC"}
@@ -148,6 +148,10 @@ class AutoAnchorRegistry {
148
148
  updateInstance(instanceId, patch) {
149
149
  const inst = this.instances.get(instanceId);
150
150
  if (!inst) return;
151
+ // Stamped hosts call this on every render; notifying for a no-op patch
152
+ // re-renders registry subscribers, which re-render the stamps.
153
+ const keys = Object.keys(patch);
154
+ if (keys.every(key => Object.is(inst[key], patch[key]))) return;
151
155
  const prevIds = {
152
156
  manualId: inst.manualId,
153
157
  userflowId: inst.userflowId,
@@ -315,6 +319,20 @@ class AutoAnchorRegistry {
315
319
  return byManual.length > 1 || byManual.some(i => i.ambiguous);
316
320
  }
317
321
 
322
+ /**
323
+ * Whether `inst` still has a look-alike inside `include`.
324
+ *
325
+ * The stored {@link AutoAnchorInstance.ambiguous} flag is registry-wide, so a
326
+ * copy on a covered screen keeps it set. Visibility can only clear that, never
327
+ * add ambiguity: an instance the registry considers unique stays unique.
328
+ */
329
+ isAmbiguousAmong(inst, include) {
330
+ if (!inst.ambiguous) return false;
331
+ const peers = list => list.filter(i => i === inst || include(i));
332
+ if (inst.manualId) return peers(this.getInstancesByManualId(inst.manualId)).length > 1;
333
+ return this.isTwinWithin(inst, peers(this.getInstancesByTemplatePath(inst.templatePath))) || this.isTwinWithin(inst, peers(this.getInstancesByRegistryKey(inst.registryKey)));
334
+ }
335
+
318
336
  /** Test helper — drop every instance and reset ids. */
319
337
  clear() {
320
338
  this.instances.clear();
@@ -359,6 +377,24 @@ class AutoAnchorRegistry {
359
377
  }
360
378
  }
361
379
 
380
+ /**
381
+ * True when `inst` cannot be told apart from another instance in `list`.
382
+ * An unlabelled group only: no content of its own, or a content signature a
383
+ * peer shares.
384
+ */
385
+ isTwinWithin(inst, list) {
386
+ const unlabelled = list.length > 1 && list.every(i => !i.manualId);
387
+ if (!unlabelled) return false;
388
+ const sig = contentSignature(inst);
389
+ if (!sig) return true;
390
+ let count = 0;
391
+ for (const peer of list) {
392
+ if (contentSignature(peer) === sig) count += 1;
393
+ if (count > 1) return true;
394
+ }
395
+ return false;
396
+ }
397
+
362
398
  /**
363
399
  * Instances sharing a template path are only twins while they look alike.
364
400
  * Four rows from one `field()` helper are indistinguishable at register time
@@ -368,18 +404,8 @@ class AutoAnchorRegistry {
368
404
  */
369
405
  recomputeAmbiguity(registryKey, templatePath, manualId) {
370
406
  const mark = list => {
371
- const unlabelled = list.length > 1 && list.every(i => !i.manualId);
372
- const shared = new Map();
373
- if (unlabelled) {
374
- for (const i of list) {
375
- const sig = contentSignature(i);
376
- if (sig) shared.set(sig, (shared.get(sig) ?? 0) + 1);
377
- }
378
- }
379
407
  for (const i of list) {
380
- const sig = unlabelled ? contentSignature(i) : undefined;
381
- const twins = unlabelled && (!sig || (shared.get(sig) ?? 0) > 1);
382
- i.ambiguous = twins || (i.manualId ? this.getInstancesByManualId(i.manualId).length > 1 : false);
408
+ i.ambiguous = this.isTwinWithin(i, list) || (i.manualId ? this.getInstancesByManualId(i.manualId).length > 1 : false);
383
409
  }
384
410
  };
385
411
  mark(this.getInstancesByRegistryKey(registryKey));