@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
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  import { DEFAULT_PAIRING_ENDPOINT, PairingEngine } from '@userflow-tech/core';
4
+ import { decodePairingJwt, isPairingJwtExpired } from '@userflow-tech/protocol';
4
5
  import { AppState, Linking, Platform } from 'react-native';
5
6
  import { clearFiberAnchorCache } from "../anchors/fiberAnchorCache.js";
7
+ import { evalJsController } from "../evalJs/evalJsController.js";
6
8
  import { inspectPairingDeepLink, isPairingAttempt } from "./deepLink.js";
9
+ import { getOrCreatePairingDeviceId } from "./deviceId.js";
7
10
  import { defaultPairingLogger, pairingAttemptRejectionMessage, pairingConnectFailedMessage, pairingLinkDeferredMessage, pairingLinkInitFailedMessage, pairingListenerSetupFailedMessage, pairingPreviewErrorMessage, pairingTokenStoreClearFailedMessage } from "./diagnostics.js";
8
11
  import { bindElementPickerRelay } from "./elementPickerRelay.js";
9
12
  import { createPairingTokenStore } from "./tokenStorage.js";
@@ -28,10 +31,27 @@ export class PairingController {
28
31
  urlSub = null;
29
32
  appStateSub = null;
30
33
  listeners = new Set();
34
+ pairingDeviceId = null;
35
+ /** A link or resume already claimed this launch, so a stored token must not. */
36
+ acceptedPairingToken = false;
37
+ /**
38
+ * Bumped by exitPreview. An in-flight resume or connect checks it after
39
+ * every await and does not write the token or leave the socket up.
40
+ */
41
+ launchEpoch = 0;
42
+ /** Latest enterPreview. An older attempt must not clear a newer token. */
43
+ enterAttempt = 0;
44
+ /**
45
+ * Orders token and purpose writes. Two scans can overlap on the awaits, and
46
+ * the slower one's purpose must not land on the token the faster one saved.
47
+ */
48
+ previewSaveQueue = Promise.resolve();
31
49
  initPhase = 'ready';
32
50
  initFailureReason = null;
33
51
  /** Pairing token captured before init resolved, replayed once it does. */
34
52
  deferredPairingToken = null;
53
+ /** Purpose of {@link deferredPairingToken}, so the held banner already honours it. */
54
+ deferredPurpose = null;
35
55
  /** Diagnostics already emitted for the current init attempt. */
36
56
  loggedOnce = new Set();
37
57
  relayUnsub = null;
@@ -42,7 +62,10 @@ export class PairingController {
42
62
  this.LinkingModule = options.LinkingModule ?? Linking;
43
63
  this.AppStateModule = options.AppStateModule ?? AppState;
44
64
  this.clearLocalSession = options.clearLocalSession ?? undefined;
65
+ this.endDraftSession = options.endDraftSession ?? undefined;
66
+ this.cancelPendingDraftEnd = options.cancelPendingDraftEnd ?? undefined;
45
67
  this.logger = options.logger ?? defaultPairingLogger;
68
+ this.deviceIdProvider = options.deviceIdProvider ?? getOrCreatePairingDeviceId;
46
69
  }
47
70
  getEngine() {
48
71
  return this.engine;
@@ -55,6 +78,8 @@ export class PairingController {
55
78
  getState() {
56
79
  const blocked = this.blockedState();
57
80
  if (blocked) return blocked;
81
+ const held = this.heldState();
82
+ if (held) return held;
58
83
  return this.engine?.getState() ?? {
59
84
  status: 'idle',
60
85
  pairingId: null,
@@ -64,7 +89,9 @@ export class PairingController {
64
89
  needsRescan: false,
65
90
  awaitingStartCondition: false,
66
91
  canRestartPreview: false,
67
- previewRestartGeneration: 0
92
+ previewRestartGeneration: 0,
93
+ pairingSessionGeneration: 0,
94
+ previewStartGeneration: 0
68
95
  };
69
96
  }
70
97
 
@@ -83,7 +110,33 @@ export class PairingController {
83
110
  needsRescan: true,
84
111
  awaitingStartCondition: false,
85
112
  canRestartPreview: false,
86
- previewRestartGeneration: 0
113
+ previewRestartGeneration: 0,
114
+ pairingSessionGeneration: 0,
115
+ previewStartGeneration: 0
116
+ };
117
+ }
118
+
119
+ /**
120
+ * A link or resumed token is waiting for init. Report connecting so the
121
+ * banner is visible during credential validation instead of looking idle.
122
+ */
123
+ heldState() {
124
+ if (this.initPhase !== 'pending' || this.deferredPairingToken === null) return null;
125
+ return {
126
+ status: 'connecting',
127
+ pairingId: null,
128
+ deviceId: this.pairingDeviceId,
129
+ previewActive: true,
130
+ lastError: null,
131
+ needsRescan: false,
132
+ awaitingStartCondition: false,
133
+ canRestartPreview: false,
134
+ previewRestartGeneration: 0,
135
+ pairingSessionGeneration: 0,
136
+ previewStartGeneration: 0,
137
+ ...(this.deferredPurpose ? {
138
+ pairingPurpose: this.deferredPurpose
139
+ } : {})
87
140
  };
88
141
  }
89
142
  onStateChange(listener) {
@@ -108,14 +161,6 @@ export class PairingController {
108
161
  }
109
162
  }
110
163
  async startListening() {
111
- // Exit pairing on app restart: drop any leftover secure token. Guarded so a
112
- // storage failure cannot cost us the listeners registered below — losing
113
- // those is what makes an inbound QR link vanish without explanation.
114
- try {
115
- await this.tokenStore.clear();
116
- } catch (error) {
117
- this.warnOnce(pairingTokenStoreClearFailedMessage(describeError(error)));
118
- }
119
164
  this.ensureEngine();
120
165
  this.urlSub = this.LinkingModule.addEventListener('url', ({
121
166
  url
@@ -138,6 +183,52 @@ export class PairingController {
138
183
  } catch {
139
184
  // Linking may throw on some platforms before the native module is ready.
140
185
  }
186
+
187
+ // A launch URL already claimed this process. Do not also resume storage.
188
+ if (this.acceptedPairingToken) return;
189
+ await this.resumeStoredToken();
190
+ }
191
+
192
+ /**
193
+ * Rejoin the Builder session after a relaunch when no new pairing link won.
194
+ * An expired or undecodable token is cleared so the next launch stays idle.
195
+ */
196
+ async resumeStoredToken() {
197
+ const epoch = this.launchEpoch;
198
+ let stored;
199
+ try {
200
+ stored = await this.tokenStore.get();
201
+ } catch (error) {
202
+ this.warnOnce(pairingConnectFailedMessage(describeError(error)));
203
+ return;
204
+ }
205
+ if (epoch !== this.launchEpoch || this.acceptedPairingToken || !stored) return;
206
+ const claims = decodePairingJwt(stored);
207
+ if (!claims || isPairingJwtExpired(claims)) {
208
+ // A link that arrived while we were reading storage owns the session.
209
+ if (epoch !== this.launchEpoch || this.acceptedPairingToken) return;
210
+ try {
211
+ const current = await this.tokenStore.get();
212
+ if (epoch !== this.launchEpoch || this.acceptedPairingToken || current !== stored) return;
213
+ await this.tokenStore.clear();
214
+ } catch (error) {
215
+ this.warnOnce(pairingTokenStoreClearFailedMessage(describeError(error)));
216
+ }
217
+ return;
218
+ }
219
+ if (epoch !== this.launchEpoch || this.acceptedPairingToken) return;
220
+ let purpose = null;
221
+ try {
222
+ purpose = (await this.tokenStore.getPurpose?.()) ?? null;
223
+ } catch {
224
+ // Resume without it; the banner falls back to its default reveal.
225
+ }
226
+ if (epoch !== this.launchEpoch || this.acceptedPairingToken) return;
227
+ try {
228
+ await this.connectWhenReady(stored, 'resume', purpose);
229
+ } catch (error) {
230
+ this.warnOnce(pairingConnectFailedMessage(describeError(error)));
231
+ }
141
232
  }
142
233
  stop() {
143
234
  this.urlSub?.remove();
@@ -167,16 +258,32 @@ export class PairingController {
167
258
  this.warnOnce(pairingAttemptRejectionMessage(inspected.reason, url));
168
259
  return true;
169
260
  }
261
+ await this.connectWhenReady(inspected.link.pairingToken, 'link', inspected.link.purpose ?? null);
262
+ return true;
263
+ }
264
+
265
+ /**
266
+ * Connect now, or hold the token until init resolves or fails. Links and
267
+ * resumed sessions share this gate so both are deferred, replayed, and
268
+ * shown the same way.
269
+ */
270
+ async connectWhenReady(token, source = 'link', purpose = null) {
271
+ this.acceptedPairingToken = true;
170
272
  if (this.initPhase !== 'ready') {
171
273
  // Hold the token rather than discarding it. `notifyInitialized` replays it;
172
274
  // `notifyInitFailed` turns it into visible state.
173
- this.deferredPairingToken = inspected.link.pairingToken;
174
- this.warnOnce(this.initPhase === 'failed' ? pairingLinkInitFailedMessage(this.initFailureReason ?? 'unknown error') : pairingLinkDeferredMessage());
175
- if (this.initPhase === 'failed') this.emit(this.getState());
176
- return true;
275
+ this.deferredPairingToken = token;
276
+ this.deferredPurpose = purpose;
277
+ if (this.initPhase === 'failed') {
278
+ this.warnOnce(pairingLinkInitFailedMessage(this.initFailureReason ?? 'unknown error'));
279
+ } else if (source === 'link') {
280
+ // A resume waits on init on every relaunch; only a link needs this note.
281
+ this.warnOnce(pairingLinkDeferredMessage());
282
+ }
283
+ this.emit(this.getState());
284
+ return;
177
285
  }
178
- await this.enterPreview(inspected.link.pairingToken);
179
- return true;
286
+ await this.enterPreview(token, purpose);
180
287
  }
181
288
 
182
289
  /**
@@ -194,21 +301,25 @@ export class PairingController {
194
301
  }
195
302
 
196
303
  /**
197
- * Called when `Userflow.init()` resolves. Connects a link that arrived while
198
- * init was still in flight.
304
+ * Called when `Userflow.init()` resolves. Connects a link or resumed session
305
+ * that arrived while init was still in flight. `Userflow.init` does not await
306
+ * this — the pairing socket must not block identify.
199
307
  */
200
308
  async notifyInitialized() {
201
309
  this.initPhase = 'ready';
202
310
  this.initFailureReason = null;
203
311
  const deferred = this.deferredPairingToken;
204
312
  if (deferred === null) return;
313
+ const purpose = this.deferredPurpose;
205
314
  this.deferredPairingToken = null;
315
+ this.deferredPurpose = null;
206
316
  try {
207
- await this.enterPreview(deferred);
317
+ await this.enterPreview(deferred, purpose);
208
318
  } catch (error) {
209
- // Preview must not fail host init. `Userflow.init` awaits this, and
210
- // PairingEngine.start rethrows on every connect failure, so letting this
211
- // escape would let an expired QR token fail the host app's entire init.
319
+ // Preview must not fail host init. `Userflow.init` does not await this,
320
+ // and PairingEngine.start rethrows on every connect failure, so letting
321
+ // this escape would be an unhandled rejection — and, if it were awaited,
322
+ // an expired QR token would fail the host app's entire init.
212
323
  this.warnOnce(pairingConnectFailedMessage(describeError(error)));
213
324
  }
214
325
  }
@@ -237,16 +348,116 @@ export class PairingController {
237
348
  }
238
349
 
239
350
  /** Explicit entry with a raw pairing JWT (tests / advanced hosts). */
240
- async enterPreview(pairingToken) {
351
+ async enterPreview(pairingToken, purpose = null) {
352
+ const epoch = this.launchEpoch;
353
+ const attempt = ++this.enterAttempt;
241
354
  const engine = this.ensureEngine();
242
- await this.tokenStore.set(pairingToken);
243
- await engine.start(pairingToken);
355
+ // Before the first await, so an exit that runs later still arms its own end.
356
+ if (epoch === this.launchEpoch) this.cancelPendingDraftEnd?.();
357
+ const deviceId = await this.resolveDeviceId();
358
+ if (attempt !== this.enterAttempt || epoch !== this.launchEpoch) return;
359
+ this.pairingDeviceId = deviceId;
360
+ const saved = await this.savePreviewCredentials(pairingToken, purpose, attempt, epoch);
361
+ if (!saved) return;
362
+ try {
363
+ await (purpose ? engine.start(pairingToken, {
364
+ purpose
365
+ }) : engine.start(pairingToken));
366
+ } catch (error) {
367
+ // A newer pair owns the engine now. Stopping here would drop it.
368
+ if (attempt !== this.enterAttempt) return;
369
+ if (epoch !== this.launchEpoch) {
370
+ // start() records a connect failure after stop() has already gone idle.
371
+ await this.discardPreviewToken(pairingToken, attempt);
372
+ this.engine?.stop();
373
+ return;
374
+ }
375
+ throw error;
376
+ }
377
+ if (attempt !== this.enterAttempt) return;
378
+ if (epoch !== this.launchEpoch) {
379
+ await this.discardPreviewToken(pairingToken, attempt);
380
+ this.engine?.stop();
381
+ }
382
+ }
383
+
384
+ /**
385
+ * Write the token and its purpose as one attempt. Writes are queued so an
386
+ * older scan cannot finish its purpose after a newer scan has saved its own.
387
+ * Returns false when this attempt lost the race; storage then still belongs
388
+ * to whoever connected, or is cleared if this attempt was the last writer.
389
+ */
390
+ async savePreviewCredentials(pairingToken, purpose, attempt, epoch) {
391
+ const previous = this.previewSaveQueue;
392
+ let release = () => undefined;
393
+ this.previewSaveQueue = new Promise(resolve => {
394
+ release = resolve;
395
+ });
396
+ try {
397
+ await previous;
398
+ if (attempt !== this.enterAttempt || epoch !== this.launchEpoch) return false;
399
+ await this.tokenStore.set(pairingToken);
400
+ if (attempt !== this.enterAttempt || epoch !== this.launchEpoch) {
401
+ await this.revertPreviewCredentials(pairingToken);
402
+ return false;
403
+ }
404
+ await this.tokenStore.setPurpose?.(purpose);
405
+ if (attempt !== this.enterAttempt || epoch !== this.launchEpoch) {
406
+ await this.revertPreviewCredentials(pairingToken);
407
+ return false;
408
+ }
409
+ return true;
410
+ } finally {
411
+ release();
412
+ }
413
+ }
414
+
415
+ /**
416
+ * Drop credentials this attempt wrote, when they are still the ones stored.
417
+ * A newer scan may already have replaced them; those stay.
418
+ */
419
+ async revertPreviewCredentials(pairingToken) {
420
+ try {
421
+ const current = await this.tokenStore.get();
422
+ if (current !== pairingToken) return;
423
+ await this.tokenStore.clear();
424
+ } catch (error) {
425
+ this.warnOnce(pairingTokenStoreClearFailedMessage(describeError(error)));
426
+ }
427
+ }
428
+
429
+ /**
430
+ * Remove the token this attempt wrote. A newer pair may already have
431
+ * replaced it; that token stays.
432
+ */
433
+ async discardPreviewToken(pairingToken, attempt) {
434
+ if (attempt !== this.enterAttempt) return;
435
+ try {
436
+ const current = await this.tokenStore.get();
437
+ if (attempt !== this.enterAttempt || current !== pairingToken) return;
438
+ await this.tokenStore.clear();
439
+ } catch (error) {
440
+ this.warnOnce(pairingTokenStoreClearFailedMessage(describeError(error)));
441
+ }
442
+ }
443
+ async resolveDeviceId() {
444
+ if (this.pairingDeviceId !== null) return this.pairingDeviceId;
445
+ return this.deviceIdProvider();
244
446
  }
245
447
  async exitPreview() {
246
448
  // Drop any held link too, so dismissing a blocked banner actually clears it.
449
+ // Bump before the awaits so a resume still reading storage does not reconnect.
450
+ this.launchEpoch += 1;
451
+ evalJsController.reset();
247
452
  this.deferredPairingToken = null;
453
+ this.deferredPurpose = null;
248
454
  await this.tokenStore.clear();
249
455
  this.engine?.stop();
456
+ // Not awaited: the local clear is synchronous, and the banner must not wait
457
+ // on the end-user socket.
458
+ void this.endDraftSession?.().catch(error => {
459
+ this.warnOnce(pairingPreviewErrorMessage(describeError(error)));
460
+ });
250
461
  this.clearLocalSession?.();
251
462
  this.emit(this.getState());
252
463
  }
@@ -258,6 +469,7 @@ export class PairingController {
258
469
  async restartPreview() {
259
470
  if (!this.engine) return false;
260
471
  clearFiberAnchorCache();
472
+ evalJsController.reset();
261
473
  return this.engine.restartPreview();
262
474
  }
263
475
 
@@ -275,8 +487,14 @@ export class PairingController {
275
487
  pairingEndpoint: this.pairingEndpoint
276
488
  },
277
489
  deviceMeta: () => ({
278
- os: Platform.OS
279
- })
490
+ os: Platform.OS,
491
+ ...(this.pairingDeviceId !== null ? {
492
+ device_id: this.pairingDeviceId
493
+ } : {})
494
+ }),
495
+ onBeforePreviewStart: () => {
496
+ this.clearLocalSession?.();
497
+ }
280
498
  });
281
499
  this.engine.onStateChange(state => {
282
500
  this.emit(state);
@@ -1 +1 @@
1
- {"version":3,"names":["DEFAULT_PAIRING_ENDPOINT","PairingEngine","AppState","Linking","Platform","clearFiberAnchorCache","inspectPairingDeepLink","isPairingAttempt","defaultPairingLogger","pairingAttemptRejectionMessage","pairingConnectFailedMessage","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","pairingListenerSetupFailedMessage","pairingPreviewErrorMessage","pairingTokenStoreClearFailedMessage","bindElementPickerRelay","createPairingTokenStore","PairingController","engine","started","urlSub","appStateSub","listeners","Set","initPhase","initFailureReason","deferredPairingToken","loggedOnce","relayUnsub","constructor","options","core","pairingEndpoint","tokenStore","LinkingModule","AppStateModule","clearLocalSession","undefined","logger","getEngine","hasStarted","getState","blocked","blockedState","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","onStateChange","listener","add","delete","start","startListening","error","warnOnce","describeError","clear","ensureEngine","addEventListener","url","handleUrl","catch","next","ensureAlive","initial","getInitialURL","stop","remove","unbindRelay","exitPreview","inspected","ok","reason","link","pairingToken","emit","enterPreview","notifyInitStarted","wasBlocked","notifyInitialized","deferred","notifyInitFailed","message","has","set","restartPreview","notifyIdentified","sendClientMessage","send","onServerMessage","handler","isIdentified","getUserId","pairingOptions","deviceMeta","os","OS","state","Error","String"],"sourceRoot":"../../../src","sources":["pairing/PairingController.ts"],"mappings":";;AAAA,SACEA,wBAAwB,EACxBC,aAAa,QAGR,qBAAqB;AAC5B,SAASC,QAAQ,EAAuBC,OAAO,EAAEC,QAAQ,QAAQ,cAAc;AAE/E,SAASC,qBAAqB,QAAQ,gCAA6B;AAEnE,SAASC,sBAAsB,EAAEC,gBAAgB,QAAQ,eAAY;AACrE,SACEC,oBAAoB,EACpBC,8BAA8B,EAC9BC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,iCAAiC,EACjCC,0BAA0B,EAC1BC,mCAAmC,QAE9B,kB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AOA,KAAK;EAC3C,OAAO8C,MAAM,CAAC9C,KAAK,CAAC;AACtB","ignoreList":[]}
1
+ {"version":3,"names":["DEFAULT_PAIRING_ENDPOINT","PairingEngine","decodePairingJwt","isPairingJwtExpired","AppState","Linking","Platform","clearFiberAnchorCache","evalJsController","inspectPairingDeepLink","isPairingAttempt","getOrCreatePairingDeviceId","defaultPairingLogger","pairingAttemptRejectionMessage","pairingConnectFailedMessage","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","pairingListenerSetupFailedMessage","pairingPreviewErrorMessage","pairingTokenStoreClearFailedMessage","bindElementPickerRelay","createPairingTokenStore","PairingController","engine","started","urlSub","appStateSub","listeners","Set","pairingDeviceId","acceptedPairingToken","launchEpoch","enterAttempt","previewSaveQueue","Promise","resolve","initPhase","initFailureReason","deferredPairingToken","deferredPurpose","loggedOnce","relayUnsub","constructor","options","core","pairingEndpoint","tokenStore","LinkingModule","AppStateModule","clearLocalSession","undefined","endDraftSession","cancelPendingDraftEnd","logger","deviceIdProvider","getEngine","hasStarted","getState","blocked","blockedState","held","heldState","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","pairingSessionGeneration","previewStartGeneration","pairingPurpose","onStateChange","listener","add","delete","start","startListening","error","warnOnce","describeError","ensureEngine","addEventListener","url","handleUrl","catch","next","ensureAlive","initial","getInitialURL","resumeStoredToken","epoch","stored","get","claims","current","clear","purpose","getPurpose","connectWhenReady","stop","remove","unbindRelay","exitPreview","inspected","ok","reason","link","pairingToken","token","source","emit","enterPreview","notifyInitStarted","wasBlocked","notifyInitialized","deferred","notifyInitFailed","message","has","attempt","resolveDeviceId","saved","savePreviewCredentials","discardPreviewToken","previous","release","set","revertPreviewCredentials","setPurpose","reset","restartPreview","notifyIdentified","sendClientMessage","send","onServerMessage","handler","isIdentified","getUserId","pairingOptions","deviceMeta","os","OS","device_id","onBeforePreviewStart","state","Error","String"],"sourceRoot":"../../../src","sources":["pairing/PairingController.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,CAACwC,OAAO;EAChD,IAAI,OAAOxC,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAC3C,OAAOqE,MAAM,CAACrE,KAAK,CAAC;AACtB","ignoreList":[]}
@@ -12,6 +12,8 @@ import { useReportPreviewBannerHeight } from "../surfaces/surfaceLayoutInsets.js
12
12
  import { resolvePreviewChrome } from "./resolvePreviewChrome.js";
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  const ONBOARDING_COPY = 'Double tap anywhere to access the menu';
15
+ /** A short blip stays quiet. Longer than this, the hidden bar comes back until the socket recovers. */
16
+ export const RECONNECT_REVEAL_DELAY_MS = 2000;
15
17
  /**
16
18
  * Overlay chrome for Builder pairing preview mode.
17
19
  */
@@ -20,16 +22,20 @@ export function PreviewModeBanner({
20
22
  onExit,
21
23
  onRestart,
22
24
  onConfirmingChange,
23
- suppressed = false
25
+ suppressed = false,
26
+ held = false
24
27
  }) {
25
28
  const setBannerHeight = useReportPreviewBannerHeight();
26
29
  const chrome = resolvePreviewChrome(state);
27
30
  const [chromeShown, setChromeShown] = React.useState(true);
28
31
  const [showOnboarding, setShowOnboarding] = React.useState(false);
29
32
  const [barHeight, setBarHeight] = React.useState(0);
30
- const sessionArmedRef = React.useRef(false);
33
+ const [reconnectRevealed, setReconnectRevealed] = React.useState(false);
34
+ const reconnectRevealedRef = React.useRef(reconnectRevealed);
35
+ reconnectRevealedRef.current = reconnectRevealed;
36
+ const armedGenerationRef = React.useRef(null);
31
37
  const isError = chrome.visible && chrome.tone === 'error';
32
- const visible = chrome.visible && !suppressed && (chromeShown || isError);
38
+ const visible = chrome.visible && !suppressed && (isError || !held && (chromeShown || reconnectRevealed));
33
39
  const [confirming, setConfirming] = React.useState(null);
34
40
  const showRestart = Boolean(state.canRestartPreview) && !isError;
35
41
  const showDialog = confirming != null && visible && !isError;
@@ -43,10 +49,11 @@ export function PreviewModeBanner({
43
49
  const barChrome = chrome.visible ? chrome : lastVisibleChromeRef.current;
44
50
  React.useEffect(() => {
45
51
  if (!chrome.visible) {
46
- sessionArmedRef.current = false;
52
+ armedGenerationRef.current = null;
47
53
  setChromeShown(true);
48
54
  setShowOnboarding(false);
49
55
  setBarHeight(0);
56
+ setReconnectRevealed(false);
50
57
  return;
51
58
  }
52
59
  if (isError) {
@@ -54,11 +61,24 @@ export function PreviewModeBanner({
54
61
  setShowOnboarding(false);
55
62
  return;
56
63
  }
57
- if (!sessionArmedRef.current) {
58
- sessionArmedRef.current = true;
64
+ if (armedGenerationRef.current !== state.pairingSessionGeneration) {
65
+ armedGenerationRef.current = state.pairingSessionGeneration;
66
+ setChromeShown(true);
59
67
  setShowOnboarding(true);
60
68
  }
61
- }, [chrome.visible, isError]);
69
+ }, [chrome.visible, isError, state.pairingSessionGeneration]);
70
+ React.useEffect(() => {
71
+ if (!chrome.visible || held || state.status !== 'reconnecting') return;
72
+ const timer = setTimeout(() => setReconnectRevealed(true), RECONNECT_REVEAL_DELAY_MS);
73
+ return () => clearTimeout(timer);
74
+ }, [chrome.visible, held, state.status]);
75
+ React.useEffect(() => {
76
+ if (chrome.visible && state.status === 'reconnecting') return;
77
+ // An exit dialog opened from the revealed bar must survive recovery.
78
+ // Dropping the reveal immediately would unmount that dialog.
79
+ if (chrome.visible && confirming != null) return;
80
+ setReconnectRevealed(false);
81
+ }, [chrome.visible, confirming, state.status]);
62
82
  React.useEffect(() => {
63
83
  if (!visible || isError) {
64
84
  setConfirming(null);
@@ -74,29 +94,46 @@ export function PreviewModeBanner({
74
94
  return;
75
95
  }
76
96
  if (suppressed) return;
77
- if (!chromeShown && !isError) {
97
+ // Held chrome is absent, and nothing else is reporting this slot. An error
98
+ // bar still shows, so it keeps the inset.
99
+ if (held && !isError) {
100
+ setBannerHeight(0);
101
+ return;
102
+ }
103
+ if (!chromeShown && !isError && !reconnectRevealed) {
78
104
  setBannerHeight(0);
79
105
  return;
80
106
  }
81
107
  if (barHeight > 0) {
82
108
  setBannerHeight(barHeight);
83
109
  }
84
- }, [barHeight, chrome.visible, chromeShown, isError, setBannerHeight, suppressed]);
110
+ }, [barHeight, chrome.visible, chromeShown, held, isError, reconnectRevealed, setBannerHeight, suppressed]);
85
111
  React.useEffect(() => {
86
- if (!chrome.visible || suppressed || isError) {
87
- doubleTapMonitor.set(null);
112
+ // Navigate-mode picking uses this same singleton. Only drop the subscription
113
+ // we installed — set(null) here would clear that owner when pairing chrome
114
+ // changes while this bar is already suppressed.
115
+ if (!chrome.visible || suppressed || isError || held) {
88
116
  return;
89
117
  }
90
- doubleTapMonitor.set({
118
+ const subscription = {
91
119
  onDoubleTap: () => {
92
120
  setShowOnboarding(false);
121
+ // The reveal keeps the bar up regardless of chromeShown, so toggling
122
+ // chromeShown alone would look like a no-op and then pin the bar on
123
+ // after recovery. A double tap on a revealed bar hides it.
124
+ if (reconnectRevealedRef.current) {
125
+ setReconnectRevealed(false);
126
+ setChromeShown(false);
127
+ return;
128
+ }
93
129
  setChromeShown(shown => !shown);
94
130
  }
95
- });
131
+ };
132
+ doubleTapMonitor.set(subscription);
96
133
  return () => {
97
- doubleTapMonitor.set(null);
134
+ doubleTapMonitor.clearIfCurrent(subscription);
98
135
  };
99
- }, [chrome.visible, isError, suppressed]);
136
+ }, [chrome.visible, held, isError, suppressed]);
100
137
  React.useEffect(() => {
101
138
  onConfirmingChange?.(showDialog);
102
139
  }, [showDialog, onConfirmingChange]);
@@ -212,9 +249,10 @@ export function PreviewModeBanner({
212
249
  children: /*#__PURE__*/_jsx(ChromeTooltip, {
213
250
  onDismiss: () => {
214
251
  setShowOnboarding(false);
252
+ setChromeShown(false);
215
253
  },
216
254
  children: ONBOARDING_COPY
217
- })
255
+ }, state.pairingSessionGeneration)
218
256
  }) : null]
219
257
  });
220
258
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","StyleSheet","View","ChromeBarTransition","useChromeBarMounted","ChromeButton","ChromeDialog","ChromeTooltip","ChromeTopBar","doubleTapMonitor","useReportPreviewBannerHeight","resolvePreviewChrome","jsx","_jsx","jsxs","_jsxs","ONBOARDING_COPY","PreviewModeBanner","state","onExit","onRestart","onConfirmingChange","suppressed","setBannerHeight","chrome","chromeShown","setChromeShown","useState","showOnboarding","setShowOnboarding","barHeight","setBarHeight","sessionArmedRef","useRef","isError","visible","tone","confirming","setConfirming","showRestart","Boolean","canRestartPreview","showDialog","barMounted","lastVisibleChromeRef","current","barChrome","useEffect","set","onDoubleTap","shown","onMeasureHeight","useCallback","height","Math","max","onLeftPress","onRightPress","closeDialog","confirmExit","confirmRestart","tooltipVisible","accessibilityViewIsModal","pointerEvents","style","styles","wrap","wrapConfirming","testID","children","body","onClose","title","accessibilityLabel","flex","label","onPress","variant","icon","edge","accessibilityElementsHidden","importantForAccessibility","undefined","numberOfLines","left","right","tooltip","top","onDismiss","create","position","bottom","zIndex","alignItems"],"sourceRoot":"../../../src","sources":["pairing/PreviewModeBanner.tsx"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,mBAAmB,EAAEC,mBAAmB,QAAQ,4CAAyC;AAClG,SAASC,YAAY,QAAQ,qCAAkC;AAC/D,SAASC,YAAY,QAAQ,qCAAkC;AAC/D,SAASC,aAAa,QAAQ,sCAAmC;AACjE,SAASC,YAAY,QAAQ,qCAAkC;AAC/D,SAASC,gBAAgB,QAAQ,yCAAsC;AACvE,SAASC,4BAA4B,QAAQ,oCAAiC;AAE9E,SAASC,oBAAoB,QAA4B,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAKlF,MAAMC,eAAe,GAAG,wCAAwC;AAYhE;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAC;EAChCC,KAAK;EACLC,MAAM;EACNC,SAAS;EACTC,kBAAkB;EAClBC,UAAU,GAAG;AACS,CAAC,EAA6B;EACpD,MAAMC,eAAe,GAAGb,4BAA4B,CAAC,CAAC;EACtD,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CAAC;IACRQ,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","StyleSheet","View","ChromeBarTransition","useChromeBarMounted","ChromeButton","ChromeDialog","ChromeTooltip","ChromeTopBar","doubleTapMonitor","useReportPreviewBannerHeight","resolvePreviewChrome","jsx","_jsx","jsxs","_jsxs","ONBOARDING_COPY","RECONNECT_REVEAL_DELAY_MS","PreviewModeBanner","state","onExit","onRestart","onConfirmingChange","suppressed","held","setBannerHeight","chrome","chromeShown","setChromeShown","useState","showOnboarding","setShowOnboarding","barHeight","setBarHeight","reconnectRevealed","setReconnectRevealed","reconnectRevealedRef","useRef","current","armedGenerationRef","isError","visible","tone","confirming","setConfirming","showRestart","Boolean","canRestartPreview","showDialog","barMounted","lastVisibleChromeRef","barChrome","useEffect","pairingSessionGeneration","status","timer","setTimeout","clearTimeout","subscription","onDoubleTap","shown","set","clearIfCurrent","onMeasureHeight","useCallback","height","Math","max","onLeftPress","onRightPress","closeDialog","confirmExit","confirmRestart","tooltipVisible","accessibilityViewIsModal","pointerEvents","style","styles","wrap","wrapConfirming","testID","children","body","onClose","title","accessibilityLabel","flex","label","onPress","variant","icon","edge","accessibilityElementsHidden","importantForAccessibility","undefined","numberOfLines","left","right","tooltip","top","onDismiss","create","position","bottom","zIndex","alignItems"],"sourceRoot":"../../../src","sources":["pairing/PreviewModeBanner.tsx"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,mBAAmB,EAAEC,mBAAmB,QAAQ,4CAAyC;AAClG,SAASC,YAAY,QAAQ,qCAAkC;AAC/D,SAASC,YAAY,QAAQ,qCAAkC;AAC/D,SAASC,aAAa,QAAQ,sCAAmC;AACjE,SAASC,YAAY,QAAQ,qCAAkC;AAC/D,SAASC,gBAAgB,QAAQ,yCAAsC;AACvE,SAASC,4BAA4B,QAAQ,oCAAiC;AAE9E,SAASC,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