@userflow-tech/react-native 0.1.1 → 0.2.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 (788) hide show
  1. package/README.md +97 -61
  2. package/app.plugin.js +11 -1
  3. package/babel-plugin/index.d.ts +8 -8
  4. package/babel-plugin/index.d.ts.map +1 -1
  5. package/babel-plugin/index.js +17 -9
  6. package/babel-plugin/index.js.map +1 -1
  7. package/babel-plugin.js +13 -0
  8. package/docs/anchoring.md +141 -13
  9. package/docs/deep-linking.md +18 -15
  10. package/docs/theme-mapping.md +44 -15
  11. package/docs/troubleshooting.md +36 -29
  12. package/expo-plugin/withUserflow.js +1 -1
  13. package/expo-plugin/withUserflow.js.map +1 -1
  14. package/lib/commonjs/anchors/AutoAnchorRegistry.js +124 -2
  15. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
  16. package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
  17. package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
  18. package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
  19. package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
  20. package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
  21. package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
  22. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
  23. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
  24. package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
  25. package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
  26. package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
  27. package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
  28. package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
  29. package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
  30. package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
  31. package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
  32. package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
  33. package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
  34. package/lib/commonjs/anchors/resolveAutoAnchorHost.js +171 -0
  35. package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
  36. package/lib/commonjs/anchors/semanticMatcher.js +285 -0
  37. package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
  38. package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -0
  39. package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
  40. package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
  41. package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
  42. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
  43. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
  44. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +64 -0
  45. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  46. package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -0
  47. package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
  48. package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
  49. package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
  50. package/lib/commonjs/authoring/chrome/ChromeIcon.js +39 -0
  51. package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
  52. package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
  53. package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
  54. package/lib/commonjs/authoring/chrome/ChromeTopBar.js +110 -0
  55. package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
  56. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
  57. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
  58. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -0
  59. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
  60. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  61. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  62. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  63. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  64. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  65. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  66. package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
  67. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  68. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  69. package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
  70. package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
  71. package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
  72. package/lib/commonjs/authoring/chrome/tokens.js +150 -0
  73. package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
  74. package/lib/commonjs/authoring/doubleTap.js +23 -0
  75. package/lib/commonjs/authoring/doubleTap.js.map +1 -0
  76. package/lib/commonjs/authoring/elementPickerController.js +102 -0
  77. package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
  78. package/lib/commonjs/authoring/fingerprintFromInstance.js +195 -0
  79. package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
  80. package/lib/commonjs/authoring/hitTest.js +106 -0
  81. package/lib/commonjs/authoring/hitTest.js.map +1 -0
  82. package/lib/commonjs/content/RichContentRenderer.js +12 -2
  83. package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
  84. package/lib/commonjs/content/StepButton.js +19 -4
  85. package/lib/commonjs/content/StepButton.js.map +1 -1
  86. package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
  87. package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
  88. package/lib/commonjs/content/themeColor.js +11 -0
  89. package/lib/commonjs/content/themeColor.js.map +1 -1
  90. package/lib/commonjs/deviceContext.js +158 -0
  91. package/lib/commonjs/deviceContext.js.map +1 -0
  92. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
  93. package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
  94. package/lib/commonjs/hostAppVersion.js +242 -0
  95. package/lib/commonjs/hostAppVersion.js.map +1 -0
  96. package/lib/commonjs/index.js +118 -5
  97. package/lib/commonjs/index.js.map +1 -1
  98. package/lib/commonjs/lifecycle.js +2 -0
  99. package/lib/commonjs/lifecycle.js.map +1 -1
  100. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +17 -8
  101. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
  102. package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
  103. package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
  104. package/lib/commonjs/pairing/PairingController.js +29 -2
  105. package/lib/commonjs/pairing/PairingController.js.map +1 -1
  106. package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
  107. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
  108. package/lib/commonjs/pairing/diagnostics.js +9 -0
  109. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  110. package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
  111. package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
  112. package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
  113. package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
  114. package/lib/commonjs/pairing/tokenStorage.js +25 -2
  115. package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
  116. package/lib/commonjs/pairing/usePairingState.js +3 -1
  117. package/lib/commonjs/pairing/usePairingState.js.map +1 -1
  118. package/lib/commonjs/runtime/FlowRenderer.js +45 -21
  119. package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
  120. package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
  121. package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
  122. package/lib/commonjs/runtime/TargetPressBridge.js +13 -44
  123. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
  124. package/lib/commonjs/runtime/UserflowProvider.js +74 -20
  125. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
  126. package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
  127. package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
  128. package/lib/commonjs/runtime/flowEngine.js +3 -1
  129. package/lib/commonjs/runtime/flowEngine.js.map +1 -1
  130. package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
  131. package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
  132. package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
  133. package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
  134. package/lib/commonjs/screenTracker.js +46 -4
  135. package/lib/commonjs/screenTracker.js.map +1 -1
  136. package/lib/commonjs/surfaces/CardFade.js +31 -0
  137. package/lib/commonjs/surfaces/CardFade.js.map +1 -0
  138. package/lib/commonjs/surfaces/CloseButton.js +11 -6
  139. package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
  140. package/lib/commonjs/surfaces/ModalSurface.js +50 -34
  141. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
  142. package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
  143. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
  144. package/lib/commonjs/surfaces/cardTransition.js +70 -0
  145. package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
  146. package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
  147. package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
  148. package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
  149. package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
  150. package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
  151. package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
  152. package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
  153. package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
  154. package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
  155. package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
  156. package/lib/commonjs/surfaces/themeChrome.js +4 -1
  157. package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
  158. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
  159. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
  160. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
  161. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
  162. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
  163. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  164. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
  165. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  166. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
  167. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  168. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
  169. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  170. package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
  171. package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
  172. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
  173. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  174. package/lib/commonjs/version.js +1 -1
  175. package/lib/module/anchors/AutoAnchorRegistry.js +125 -2
  176. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
  177. package/lib/module/anchors/anchorChangeTicker.js +10 -0
  178. package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
  179. package/lib/module/anchors/elementConditionEvaluator.js +25 -12
  180. package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
  181. package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
  182. package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
  183. package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
  184. package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
  185. package/lib/module/anchors/fiber/fiberInternals.js +139 -3
  186. package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
  187. package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
  188. package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
  189. package/lib/module/anchors/fiber/readHostContent.js +127 -0
  190. package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
  191. package/lib/module/anchors/fiberAnchorCache.js +40 -0
  192. package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
  193. package/lib/module/anchors/resolveAnchorHost.js +15 -21
  194. package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
  195. package/lib/module/anchors/resolveAutoAnchorHost.js +167 -0
  196. package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
  197. package/lib/module/anchors/semanticMatcher.js +280 -0
  198. package/lib/module/anchors/semanticMatcher.js.map +1 -0
  199. package/lib/module/authoring/ElementPickerOverlay.js +485 -0
  200. package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
  201. package/lib/module/authoring/capturePickerScreenshot.js +68 -0
  202. package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
  203. package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
  204. package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
  205. package/lib/module/authoring/chrome/ChromeBottomSheet.js +59 -0
  206. package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  207. package/lib/module/authoring/chrome/ChromeButton.js +89 -0
  208. package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
  209. package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
  210. package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
  211. package/lib/module/authoring/chrome/ChromeIcon.js +33 -0
  212. package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
  213. package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
  214. package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
  215. package/lib/module/authoring/chrome/ChromeTopBar.js +104 -0
  216. package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
  217. package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
  218. package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
  219. package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -0
  220. package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
  221. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  222. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  223. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  224. package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  225. package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  226. package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  227. package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
  228. package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  229. package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  230. package/lib/module/authoring/chrome/icons/xmark.png +0 -0
  231. package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
  232. package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
  233. package/lib/module/authoring/chrome/tokens.js +146 -0
  234. package/lib/module/authoring/chrome/tokens.js.map +1 -0
  235. package/lib/module/authoring/doubleTap.js +18 -0
  236. package/lib/module/authoring/doubleTap.js.map +1 -0
  237. package/lib/module/authoring/elementPickerController.js +97 -0
  238. package/lib/module/authoring/elementPickerController.js.map +1 -0
  239. package/lib/module/authoring/fingerprintFromInstance.js +187 -0
  240. package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
  241. package/lib/module/authoring/hitTest.js +100 -0
  242. package/lib/module/authoring/hitTest.js.map +1 -0
  243. package/lib/module/content/RichContentRenderer.js +12 -2
  244. package/lib/module/content/RichContentRenderer.js.map +1 -1
  245. package/lib/module/content/StepButton.js +19 -4
  246. package/lib/module/content/StepButton.js.map +1 -1
  247. package/lib/module/content/resolveStepButtonChrome.js +8 -6
  248. package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
  249. package/lib/module/content/themeColor.js +10 -0
  250. package/lib/module/content/themeColor.js.map +1 -1
  251. package/lib/module/deviceContext.js +142 -0
  252. package/lib/module/deviceContext.js.map +1 -0
  253. package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
  254. package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
  255. package/lib/module/hostAppVersion.js +225 -0
  256. package/lib/module/hostAppVersion.js.map +1 -0
  257. package/lib/module/index.js +119 -6
  258. package/lib/module/index.js.map +1 -1
  259. package/lib/module/lifecycle.js +2 -0
  260. package/lib/module/lifecycle.js.map +1 -1
  261. package/lib/module/navigation/WithUserflowReactNavigation.js +18 -9
  262. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
  263. package/lib/module/navigation/isOverlayPresentation.js +58 -0
  264. package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
  265. package/lib/module/pairing/PairingController.js +30 -3
  266. package/lib/module/pairing/PairingController.js.map +1 -1
  267. package/lib/module/pairing/PreviewModeBanner.js +212 -85
  268. package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
  269. package/lib/module/pairing/diagnostics.js +8 -0
  270. package/lib/module/pairing/diagnostics.js.map +1 -1
  271. package/lib/module/pairing/elementPickerRelay.js +87 -0
  272. package/lib/module/pairing/elementPickerRelay.js.map +1 -0
  273. package/lib/module/pairing/resolvePreviewChrome.js +48 -0
  274. package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
  275. package/lib/module/pairing/tokenStorage.js +24 -2
  276. package/lib/module/pairing/tokenStorage.js.map +1 -1
  277. package/lib/module/pairing/usePairingState.js +3 -1
  278. package/lib/module/pairing/usePairingState.js.map +1 -1
  279. package/lib/module/runtime/FlowRenderer.js +45 -21
  280. package/lib/module/runtime/FlowRenderer.js.map +1 -1
  281. package/lib/module/runtime/FlowSurfaceFade.js +49 -26
  282. package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
  283. package/lib/module/runtime/TargetPressBridge.js +12 -43
  284. package/lib/module/runtime/TargetPressBridge.js.map +1 -1
  285. package/lib/module/runtime/UserflowProvider.js +74 -20
  286. package/lib/module/runtime/UserflowProvider.js.map +1 -1
  287. package/lib/module/runtime/changedTouchPoints.js +43 -0
  288. package/lib/module/runtime/changedTouchPoints.js.map +1 -0
  289. package/lib/module/runtime/flowEngine.js +3 -1
  290. package/lib/module/runtime/flowEngine.js.map +1 -1
  291. package/lib/module/runtime/flowSessionViewState.js +32 -7
  292. package/lib/module/runtime/flowSessionViewState.js.map +1 -1
  293. package/lib/module/runtime/useFlowSessionState.js +2 -1
  294. package/lib/module/runtime/useFlowSessionState.js.map +1 -1
  295. package/lib/module/screenTracker.js +42 -4
  296. package/lib/module/screenTracker.js.map +1 -1
  297. package/lib/module/surfaces/CardFade.js +26 -0
  298. package/lib/module/surfaces/CardFade.js.map +1 -0
  299. package/lib/module/surfaces/CloseButton.js +10 -6
  300. package/lib/module/surfaces/CloseButton.js.map +1 -1
  301. package/lib/module/surfaces/ModalSurface.js +52 -36
  302. package/lib/module/surfaces/ModalSurface.js.map +1 -1
  303. package/lib/module/surfaces/TooltipSurface.js +368 -90
  304. package/lib/module/surfaces/TooltipSurface.js.map +1 -1
  305. package/lib/module/surfaces/cardTransition.js +64 -0
  306. package/lib/module/surfaces/cardTransition.js.map +1 -0
  307. package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
  308. package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
  309. package/lib/module/surfaces/resolveModalLayout.js +7 -3
  310. package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
  311. package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
  312. package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
  313. package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
  314. package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
  315. package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
  316. package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
  317. package/lib/module/surfaces/themeChrome.js +3 -1
  318. package/lib/module/surfaces/themeChrome.js.map +1 -1
  319. package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
  320. package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
  321. package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
  322. package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
  323. package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
  324. package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  325. package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
  326. package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  327. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
  328. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  329. package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
  330. package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  331. package/lib/module/surfaces/tooltip/rect.js +11 -0
  332. package/lib/module/surfaces/tooltip/rect.js.map +1 -1
  333. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
  334. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  335. package/lib/module/version.js +1 -1
  336. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +26 -0
  337. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
  339. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
  341. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  343. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  345. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  346. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
  347. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  349. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  350. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
  351. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  352. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
  353. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  354. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
  355. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  357. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  358. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +48 -0
  359. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
  360. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -0
  361. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  362. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
  363. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  365. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  367. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
  369. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  371. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  373. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  375. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  377. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  379. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  381. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  382. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -0
  383. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
  385. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +59 -0
  387. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
  388. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
  389. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  390. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
  391. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
  392. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
  393. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
  394. package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  396. package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
  397. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
  399. package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
  400. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  401. package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
  402. package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/index.d.ts +53 -2
  404. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
  406. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
  407. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
  409. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +7 -0
  411. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
  413. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  414. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
  415. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
  417. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
  419. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +2 -0
  421. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
  422. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
  423. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
  424. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
  425. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
  426. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  427. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
  428. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
  429. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
  430. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
  432. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
  433. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
  434. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
  435. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
  437. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/screenTracker.d.ts +21 -3
  439. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
  440. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
  441. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
  442. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
  443. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +1 -1
  445. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
  446. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
  448. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
  449. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
  450. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
  451. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  452. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  453. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
  454. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  456. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  458. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  459. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  460. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  461. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
  462. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  464. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  466. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  468. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  470. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  471. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  472. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  473. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  474. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  475. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
  476. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
  477. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  478. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  479. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  480. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +26 -0
  481. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  482. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
  483. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  484. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
  485. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  486. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  487. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  488. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  489. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  490. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
  491. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  492. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  493. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  494. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
  495. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  496. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
  497. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  498. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
  499. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  500. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  501. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  502. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +48 -0
  503. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
  504. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -0
  505. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  506. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
  507. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  508. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  509. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  510. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  511. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  512. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
  513. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  514. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  515. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  516. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  517. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  518. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  519. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  520. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  521. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  522. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  523. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  524. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  525. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  526. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -0
  527. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
  528. package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
  529. package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
  530. package/lib/typescript/module/src/authoring/elementPickerController.d.ts +59 -0
  531. package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
  532. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
  533. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  534. package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
  535. package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
  536. package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
  537. package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
  538. package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
  539. package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  540. package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
  541. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
  542. package/lib/typescript/module/src/deviceContext.d.ts +66 -0
  543. package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
  544. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  545. package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
  546. package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
  547. package/lib/typescript/module/src/index.d.ts +53 -2
  548. package/lib/typescript/module/src/index.d.ts.map +1 -1
  549. package/lib/typescript/module/src/lifecycle.d.ts +6 -0
  550. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
  551. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  552. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
  553. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  554. package/lib/typescript/module/src/pairing/PairingController.d.ts +7 -0
  555. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
  556. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
  557. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  558. package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
  559. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
  560. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
  561. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
  562. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
  563. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  564. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +2 -0
  565. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
  566. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
  567. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
  568. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
  569. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
  570. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  571. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
  572. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
  573. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
  574. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
  575. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
  576. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
  577. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
  578. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
  579. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
  580. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
  581. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
  582. package/lib/typescript/module/src/screenTracker.d.ts +21 -3
  583. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
  584. package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
  585. package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
  586. package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
  587. package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
  588. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +1 -1
  589. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
  590. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
  591. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
  592. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
  593. package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
  594. package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
  595. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  596. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  597. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
  598. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  599. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  600. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  601. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  602. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  603. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  604. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  605. package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
  606. package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
  607. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  608. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  609. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  610. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  611. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  612. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  613. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  614. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  615. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  616. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  617. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  618. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  619. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
  620. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
  621. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  622. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  623. package/lib/typescript/module/src/version.d.ts +1 -1
  624. package/package.json +22 -16
  625. package/src/anchors/AutoAnchorRegistry.ts +139 -2
  626. package/src/anchors/anchorChangeTicker.ts +10 -0
  627. package/src/anchors/elementConditionEvaluator.ts +29 -16
  628. package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
  629. package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
  630. package/src/anchors/fiber/fiberInternals.ts +166 -3
  631. package/src/anchors/fiber/indexHostFibers.ts +136 -0
  632. package/src/anchors/fiber/readHostContent.ts +146 -0
  633. package/src/anchors/fiberAnchorCache.ts +45 -0
  634. package/src/anchors/resolveAnchorHost.ts +23 -23
  635. package/src/anchors/resolveAutoAnchorHost.ts +180 -0
  636. package/src/anchors/semanticMatcher.ts +361 -0
  637. package/src/authoring/ElementPickerOverlay.tsx +553 -0
  638. package/src/authoring/capturePickerScreenshot.ts +90 -0
  639. package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
  640. package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
  641. package/src/authoring/chrome/ChromeButton.tsx +103 -0
  642. package/src/authoring/chrome/ChromeDialog.tsx +121 -0
  643. package/src/authoring/chrome/ChromeIcon.tsx +40 -0
  644. package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
  645. package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
  646. package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
  647. package/src/authoring/chrome/doubleTapMonitor.ts +80 -0
  648. package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  649. package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  650. package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  651. package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  652. package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  653. package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  654. package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
  655. package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  656. package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  657. package/src/authoring/chrome/icons/xmark.png +0 -0
  658. package/src/authoring/chrome/icons/xmark@2x.png +0 -0
  659. package/src/authoring/chrome/icons/xmark@3x.png +0 -0
  660. package/src/authoring/chrome/tokens.ts +106 -0
  661. package/src/authoring/doubleTap.ts +27 -0
  662. package/src/authoring/elementPickerController.ts +135 -0
  663. package/src/authoring/fingerprintFromInstance.ts +152 -0
  664. package/src/authoring/hitTest.ts +133 -0
  665. package/src/content/RichContentRenderer.tsx +22 -1
  666. package/src/content/StepButton.tsx +17 -2
  667. package/src/content/resolveStepButtonChrome.ts +12 -6
  668. package/src/content/themeColor.ts +10 -0
  669. package/src/deviceContext.ts +168 -0
  670. package/src/expo-router/useUserflowExpoRouter.ts +47 -4
  671. package/src/hostAppVersion.ts +258 -0
  672. package/src/index.ts +148 -4
  673. package/src/lifecycle.ts +8 -0
  674. package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
  675. package/src/navigation/isOverlayPresentation.ts +76 -0
  676. package/src/pairing/PairingController.ts +32 -3
  677. package/src/pairing/PreviewModeBanner.tsx +250 -94
  678. package/src/pairing/diagnostics.ts +8 -0
  679. package/src/pairing/elementPickerRelay.ts +100 -0
  680. package/src/pairing/resolvePreviewChrome.ts +57 -0
  681. package/src/pairing/tokenStorage.ts +31 -2
  682. package/src/pairing/usePairingState.ts +2 -0
  683. package/src/runtime/FlowRenderer.tsx +55 -27
  684. package/src/runtime/FlowSurfaceFade.tsx +51 -30
  685. package/src/runtime/TargetPressBridge.tsx +14 -32
  686. package/src/runtime/UserflowProvider.tsx +76 -13
  687. package/src/runtime/changedTouchPoints.ts +34 -0
  688. package/src/runtime/flowEngine.ts +2 -0
  689. package/src/runtime/flowSessionViewState.ts +42 -4
  690. package/src/runtime/useFlowSessionState.ts +2 -0
  691. package/src/screenTracker.ts +46 -4
  692. package/src/surfaces/CardFade.tsx +18 -0
  693. package/src/surfaces/CloseButton.tsx +17 -7
  694. package/src/surfaces/MadeWithUserflow.tsx +1 -1
  695. package/src/surfaces/ModalSurface.tsx +48 -35
  696. package/src/surfaces/TooltipSurface.tsx +406 -86
  697. package/src/surfaces/cardTransition.ts +67 -0
  698. package/src/surfaces/resolveHighlightChrome.ts +139 -0
  699. package/src/surfaces/resolveModalLayout.ts +16 -8
  700. package/src/surfaces/resolveTooltipLayout.ts +1 -14
  701. package/src/surfaces/surfaceInteractionConfig.ts +25 -0
  702. package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
  703. package/src/surfaces/themeChrome.ts +5 -3
  704. package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
  705. package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
  706. package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
  707. package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
  708. package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
  709. package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
  710. package/src/surfaces/tooltip/rect.ts +11 -0
  711. package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
  712. package/src/version.ts +1 -1
  713. package/vendor/core/dist/attributes.d.ts +1 -2
  714. package/vendor/core/dist/attributes.d.ts.map +1 -1
  715. package/vendor/core/dist/attributes.js.map +1 -1
  716. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +69 -1
  717. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
  718. package/vendor/core/dist/engine/FlowSessionEngine.js +268 -7
  719. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
  720. package/vendor/core/dist/engine/PairingEngine.d.ts +44 -1
  721. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
  722. package/vendor/core/dist/engine/PairingEngine.js +103 -9
  723. package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
  724. package/vendor/core/dist/engine/UserflowCore.d.ts +23 -4
  725. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
  726. package/vendor/core/dist/engine/UserflowCore.js +64 -1
  727. package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
  728. package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
  729. package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
  730. package/vendor/core/dist/engine/conditionOperators.js +168 -0
  731. package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
  732. package/vendor/core/dist/engine/handleActions.d.ts +27 -4
  733. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
  734. package/vendor/core/dist/engine/handleActions.js +140 -13
  735. package/vendor/core/dist/engine/handleActions.js.map +1 -1
  736. package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
  737. package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
  738. package/vendor/core/dist/engine/simpleObservable.js +29 -0
  739. package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
  740. package/vendor/core/dist/engine/trackCondition.d.ts +25 -0
  741. package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
  742. package/vendor/core/dist/engine/trackCondition.js +177 -0
  743. package/vendor/core/dist/engine/trackCondition.js.map +1 -0
  744. package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
  745. package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
  746. package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
  747. package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
  748. package/vendor/core/dist/index.d.ts +4 -3
  749. package/vendor/core/dist/index.d.ts.map +1 -1
  750. package/vendor/core/dist/index.js +2 -1
  751. package/vendor/core/dist/index.js.map +1 -1
  752. package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
  753. package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
  754. package/vendor/core/dist/normalizeAttributes.js +127 -0
  755. package/vendor/core/dist/normalizeAttributes.js.map +1 -0
  756. package/vendor/core/dist/transport/phoenix.d.ts +11 -6
  757. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
  758. package/vendor/core/dist/transport/phoenix.js +59 -5
  759. package/vendor/core/dist/transport/phoenix.js.map +1 -1
  760. package/vendor/core/dist/types.d.ts +26 -1
  761. package/vendor/core/dist/types.d.ts.map +1 -1
  762. package/vendor/core/dist/version.d.ts +1 -1
  763. package/vendor/core/dist/version.js +1 -1
  764. package/vendor/core/package.json +1 -1
  765. package/vendor/protocol/dist/attributes.d.ts +43 -0
  766. package/vendor/protocol/dist/attributes.d.ts.map +1 -0
  767. package/vendor/protocol/dist/attributes.js +15 -0
  768. package/vendor/protocol/dist/attributes.js.map +1 -0
  769. package/vendor/protocol/dist/autoData.d.ts +2 -2
  770. package/vendor/protocol/dist/autoData.js +2 -2
  771. package/vendor/protocol/dist/events.d.ts +8 -0
  772. package/vendor/protocol/dist/events.d.ts.map +1 -1
  773. package/vendor/protocol/dist/flows.d.ts +66 -4
  774. package/vendor/protocol/dist/flows.d.ts.map +1 -1
  775. package/vendor/protocol/dist/flows.js +50 -3
  776. package/vendor/protocol/dist/flows.js.map +1 -1
  777. package/vendor/protocol/dist/index.d.ts +1 -0
  778. package/vendor/protocol/dist/index.d.ts.map +1 -1
  779. package/vendor/protocol/dist/index.js +1 -0
  780. package/vendor/protocol/dist/index.js.map +1 -1
  781. package/vendor/protocol/dist/messages.d.ts +25 -4
  782. package/vendor/protocol/dist/messages.d.ts.map +1 -1
  783. package/vendor/protocol/dist/messages.js +4 -0
  784. package/vendor/protocol/dist/messages.js.map +1 -1
  785. package/vendor/protocol/dist/pairing.d.ts +26 -0
  786. package/vendor/protocol/dist/pairing.d.ts.map +1 -1
  787. package/vendor/protocol/dist/pairing.js.map +1 -1
  788. package/vendor/protocol/package.json +1 -1
@@ -3,40 +3,55 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.FIRST_RESOLVE_DELAY_MS = void 0;
6
7
  exports.TooltipSurface = TooltipSurface;
7
8
  var React = _interopRequireWildcard(require("react"));
8
9
  var _reactNative = require("react-native");
9
10
  var _AnchorRegistry = require("../anchors/AnchorRegistry.js");
11
+ var _AutoAnchorRegistry = require("../anchors/AutoAnchorRegistry.js");
10
12
  var _animationFrame = require("../anchors/animationFrame.js");
11
13
  var _FiberScanRoot = require("../anchors/fiber/FiberScanRoot.js");
12
14
  var _resolveAnchorHost = require("../anchors/resolveAnchorHost.js");
15
+ var _resolveAutoAnchorHost = require("../anchors/resolveAutoAnchorHost.js");
13
16
  var _resolveManualAnchorId = require("../anchors/resolveManualAnchorId.js");
14
17
  var _scrollAnchorIntoView = require("../anchors/scrollAnchorIntoView.js");
15
18
  var _scrollConfig = require("../anchors/scrollConfig.js");
16
19
  var _targetPressMonitor = require("../anchors/targetPressMonitor.js");
17
20
  var _RichContentRenderer = require("../content/RichContentRenderer.js");
21
+ var _CardFade = require("./CardFade.js");
18
22
  var _CloseButton = require("./CloseButton.js");
19
- var _resolveCloseButtonColor = require("./resolveCloseButtonColor.js");
20
23
  var _MadeWithUserflow = require("./MadeWithUserflow.js");
21
24
  var _ProgressBar = require("./ProgressBar.js");
22
25
  var _absoluteFill = require("./absoluteFill.js");
26
+ var _cardTransition = require("./cardTransition.js");
23
27
  var _parseBackdropOpacity = require("./parseBackdropOpacity.js");
24
28
  var _progress = require("./progress.js");
25
- var _safeArea = require("./safeArea.js");
29
+ var _resolveCloseButtonColor = require("./resolveCloseButtonColor.js");
30
+ var _resolveHighlightChrome = require("./resolveHighlightChrome.js");
31
+ var _resolveModalLayout = require("./resolveModalLayout.js");
32
+ var _resolveTooltipLayout = require("./resolveTooltipLayout.js");
33
+ var _surfaceLayoutInsets = require("./surfaceLayoutInsets.js");
26
34
  var _themeChrome = require("./themeChrome.js");
27
35
  var _TooltipBubble = require("./tooltip/TooltipBubble.js");
28
36
  var _TooltipCutout = require("./tooltip/TooltipCutout.js");
37
+ var _TooltipHighlight = require("./tooltip/TooltipHighlight.js");
29
38
  var _computeTooltipPosition = require("./tooltip/computeTooltipPosition.js");
30
39
  var _inferTooltipPlacement = require("./tooltip/inferTooltipPlacement.js");
31
40
  var _parseBackdropPadding = require("./tooltip/parseBackdropPadding.js");
41
+ var _placementDiagnostics = require("./tooltip/placementDiagnostics.js");
32
42
  var _rect = require("./tooltip/rect.js");
33
- var _resolveTooltipLayout = require("./resolveTooltipLayout.js");
43
+ var _resolveSideCardWidth = require("./tooltip/resolveSideCardWidth.js");
34
44
  var _jsxRuntime = require("react/jsx-runtime");
35
45
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
36
46
  /** Interval for re-resolving a missing / remounted anchor (not for live measure). */
37
47
  const RESOLVE_MS = 250;
38
48
  /** Slower resolve poll after FLAG/ERROR report so a late-mounting target can recover. */
39
49
  const RESOLVE_SLOW_MS = 1000;
50
+ /**
51
+ * One-frame delay before the first resolve after a step/reset so dialog
52
+ * teardown cannot arm the missing-target timer with a 0-size measure.
53
+ */
54
+ const FIRST_RESOLVE_DELAY_MS = exports.FIRST_RESOLVE_DELAY_MS = 16;
40
55
  /**
41
56
  * Max scroll-into-view attempts per step while the target stays partially
42
57
  * clipped. Only a safety net for targets that can never become fully visible —
@@ -60,6 +75,19 @@ function missingBehavior(theme) {
60
75
  return String(theme.tooltipMissingBehavior ?? 'FLAG').toUpperCase();
61
76
  }
62
77
 
78
+ /** Dim with no card yet, for the frames between mount and the first measure. */
79
+ function backdropOnly(blocker) {
80
+ if (blocker == null) {
81
+ return null;
82
+ }
83
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
84
+ style: styles.root,
85
+ testID: "userflow-tooltip-surface",
86
+ pointerEvents: "box-none",
87
+ children: blocker
88
+ });
89
+ }
90
+
63
91
  /**
64
92
  * Anchored tooltip chrome: measure manual / fiber anchor, place with web flip/shift,
65
93
  * optional cutout backdrop, missing-target report + theme fallbacks.
@@ -69,7 +97,8 @@ function TooltipSurface({
69
97
  session,
70
98
  currentStep,
71
99
  theme,
72
- lookupAttribute
100
+ lookupAttribute,
101
+ resetNonce = 0
73
102
  }) {
74
103
  const version = session.version;
75
104
  const chrome = (0, _themeChrome.resolveBubbleChrome)(theme, 'tooltip');
@@ -77,13 +106,32 @@ function TooltipSurface({
77
106
  const showClose = !version.closeDisabled;
78
107
  const backdropOpacity = (0, _parseBackdropOpacity.parseBackdropOpacity)(theme.backdropOpacity);
79
108
  const backdropPadding = (0, _parseBackdropPadding.parseBackdropPadding)(currentStep.backdropPadding);
80
- const anchorId = (0, _resolveManualAnchorId.resolveManualAnchorId)(currentStep.selector?.css);
109
+ const selector = currentStep.selector;
110
+ const isAuto = selector?.type === 'AUTO';
111
+ const autoData = selector?.autoData ?? null;
112
+ const anchorId = isAuto ? null : (0, _resolveManualAnchorId.resolveManualAnchorId)(selector?.css);
113
+ const targetKey = isAuto ? `auto:${autoData ?? ''}` : anchorId ?? '';
114
+ const highlight = currentStep.backdrop ? (0, _resolveHighlightChrome.resolveHighlightChrome)(theme, backdropPadding) : null;
115
+ const outsideHighlightSpread = highlight ? (0, _resolveHighlightChrome.outsideHighlightOutset)(highlight) : 0;
81
116
  const desiredPlacement = normalizePlacement(currentStep.tooltipPlacement);
82
117
  const behavior = missingBehavior(theme);
83
- const insets = (0, _safeArea.useUserflowSafeAreaInsets)();
84
- const centerPaddingStyle = (0, _resolveTooltipLayout.resolveTooltipCenterPadding)(insets);
118
+ /**
119
+ * An exiting card stays mounted for the fade, so anything it fires belongs to
120
+ * a step the user already left. Mirrored into a ref for the callbacks that run
121
+ * outside render (native touches, measure callbacks, timers).
122
+ */
123
+ const isExiting = (0, _cardTransition.useCardTransitionPhase)() === 'exiting';
124
+ const exitingRef = React.useRef(isExiting);
125
+ exitingRef.current = isExiting;
126
+ const layoutInsets = (0, _surfaceLayoutInsets.useSurfaceLayoutInsets)();
127
+ const centerPaddingStyle = layoutInsets;
85
128
  const [keyboardBottomInset, setKeyboardBottomInset] = React.useState(0);
86
129
  const [target, setTarget] = React.useState(null);
130
+ /**
131
+ * Placeholder until the card's first `onLayout`. A narrowed LEFT/RIGHT can
132
+ * leave a 2–3× smaller/taller measurement here; that must not leak into the
133
+ * next step's `fits()` (see the reset on `currentStep.id`).
134
+ */
87
135
  const [bubbleSize, setBubbleSize] = React.useState({
88
136
  width: 280,
89
137
  height: 160
@@ -93,9 +141,21 @@ function TooltipSurface({
93
141
  const [registryTick, setRegistryTick] = React.useState(0);
94
142
  /** True after at least one *failed* measure for the current step/anchor. */
95
143
  const [measureAttempted, setMeasureAttempted] = React.useState(false);
144
+ /**
145
+ * False only after a same-step `resetNonce` bump (preview restart) until one
146
+ * frame has passed, so dialog teardown cannot 0-size FLAG.
147
+ */
148
+ const [resolveArmed, setResolveArmed] = React.useState(true);
149
+ const targetingIdentityRef = React.useRef({
150
+ stepId: currentStep.id,
151
+ targetKey,
152
+ resetNonce
153
+ });
96
154
  const reportedRef = React.useRef(false);
97
155
  const placementRef = React.useRef(placement);
98
156
  placementRef.current = placement;
157
+ const desiredPlacementRef = React.useRef(desiredPlacement);
158
+ desiredPlacementRef.current = desiredPlacement;
99
159
  const mountedRef = React.useRef(true);
100
160
  const targetRef = React.useRef(null);
101
161
  /** Bounded scroll-into-view attempts for the current step. */
@@ -108,14 +168,33 @@ function TooltipSurface({
108
168
  const scrollSettledRef = React.useRef(false);
109
169
  /** In-flight measureInWindow guard for the rAF loop. */
110
170
  const measureInFlightRef = React.useRef(false);
171
+ /**
172
+ * Bumped whenever the resolved host is dropped. `measureInWindow` is async, so
173
+ * a measurement dispatched before the drop can still land after it — without
174
+ * this guard it re-anchors a target the resolver has already rejected, and the
175
+ * tooltip flip-flops between anchored and "looking for target".
176
+ */
177
+ const resolveEpochRef = React.useRef(0);
111
178
  /** Latest resolved host fiber (for scroll-ancestor walk + rAF remeasure). */
112
179
  const hostFiberRef = React.useRef(null);
113
180
  const hostMeasureRef = React.useRef(null);
114
181
  const hostScrollIntoViewRef = React.useRef(undefined);
182
+ /** Fiber-cache key for the current host; AUTO exact-id path sets this even when `anchorId` is null. */
183
+ const fiberCacheIdRef = React.useRef(null);
184
+ /** Step id we already warned about for a dropped LEFT/RIGHT placement. */
185
+ const warnedSidePlacementStepRef = React.useRef(null);
186
+ const currentStepIdRef = React.useRef(currentStep.id);
187
+ currentStepIdRef.current = currentStep.id;
188
+ /**
189
+ * Step the current `target` rect was measured for. A step advance re-renders
190
+ * with the new step before the reset effect clears `target`, so for one commit
191
+ * the new step's placement is evaluated against the previous target.
192
+ */
193
+ const targetStepIdRef = React.useRef(null);
115
194
  const keyboardBottomInsetRef = React.useRef(keyboardBottomInset);
116
195
  keyboardBottomInsetRef.current = keyboardBottomInset;
117
- const insetsRef = React.useRef(insets);
118
- insetsRef.current = insets;
196
+ const insetsRef = React.useRef(layoutInsets);
197
+ insetsRef.current = layoutInsets;
119
198
  const missingModeRef = React.useRef(missingMode);
120
199
  missingModeRef.current = missingMode;
121
200
  const behaviorRef = React.useRef(behavior);
@@ -134,9 +213,11 @@ function TooltipSurface({
134
213
  React.useEffect(() => {
135
214
  const bump = () => setRegistryTick(n => n + 1);
136
215
  const unsubRegistry = _AnchorRegistry.anchorRegistry.subscribe(bump);
216
+ const unsubAuto = _AutoAnchorRegistry.autoAnchorRegistry.subscribe(bump);
137
217
  const unsubScan = _FiberScanRoot.fiberScanRoot.subscribe(bump);
138
218
  return () => {
139
219
  unsubRegistry();
220
+ unsubAuto();
140
221
  unsubScan();
141
222
  };
142
223
  }, []);
@@ -145,16 +226,49 @@ function TooltipSurface({
145
226
  scrollAttemptsRef.current = 0;
146
227
  scrollSettledRef.current = false;
147
228
  measureInFlightRef.current = false;
229
+ resolveEpochRef.current += 1;
148
230
  hostFiberRef.current = null;
149
231
  hostMeasureRef.current = null;
150
232
  hostScrollIntoViewRef.current = undefined;
233
+ fiberCacheIdRef.current = null;
234
+ warnedSidePlacementStepRef.current = null;
235
+ targetStepIdRef.current = null;
151
236
  targetRef.current = null;
237
+ // Drop the previous card's measured size and side so the next step does not
238
+ // inherit a wrapped 115×400 LEFT into `fits(currentPlacement)`.
239
+ const nextPlacement = desiredPlacementRef.current ?? 'BELOW';
240
+ placementRef.current = nextPlacement;
241
+ setPlacement(nextPlacement);
242
+ setBubbleSize({
243
+ width: 280,
244
+ height: 160
245
+ });
152
246
  setMissingMode('waiting');
153
247
  setMeasureAttempted(false);
154
248
  setTarget(null);
155
- }, [currentStep.id, anchorId]);
249
+ const prev = targetingIdentityRef.current;
250
+ const sameIdentity = prev.stepId === currentStep.id && prev.targetKey === targetKey;
251
+ const nonceBumped = prev.resetNonce !== resetNonce;
252
+ targetingIdentityRef.current = {
253
+ stepId: currentStep.id,
254
+ targetKey,
255
+ resetNonce
256
+ };
257
+ // Defer only a same-step restart bootstrap. A real step/target change
258
+ // should resolve on the first paint.
259
+ setResolveArmed(!(sameIdentity && nonceBumped));
260
+ (0, _resolveAnchorHost.clearFiberAnchorCache)();
261
+ }, [currentStep.id, targetKey, resetNonce]);
262
+ React.useEffect(() => {
263
+ if (resolveArmed) return;
264
+ const handle = setTimeout(() => {
265
+ if (mountedRef.current) setResolveArmed(true);
266
+ }, FIRST_RESOLVE_DELAY_MS);
267
+ return () => clearTimeout(handle);
268
+ }, [resolveArmed]);
156
269
  const applyTarget = React.useCallback(next => {
157
270
  if (!mountedRef.current) return;
271
+ targetStepIdRef.current = next == null ? null : currentStepIdRef.current;
158
272
  if ((0, _rect.rectsEqual)(targetRef.current, next)) return;
159
273
  if (next == null) {
160
274
  // The anchor went away (unmount / navigation), so whatever scroll position
@@ -170,20 +284,40 @@ function TooltipSurface({
170
284
  if (!mountedRef.current) return;
171
285
  setMeasureAttempted(prev => prev ? prev : true);
172
286
  }, []);
287
+
288
+ /**
289
+ * Forget the resolved host and report the target as gone. Bumping the epoch
290
+ * voids any measurement still in flight for it, and releasing the in-flight
291
+ * guard lets the next resolve measure immediately instead of waiting on a
292
+ * callback that no longer means anything.
293
+ */
294
+ const dropHost = React.useCallback(() => {
295
+ resolveEpochRef.current += 1;
296
+ measureInFlightRef.current = false;
297
+ hostFiberRef.current = null;
298
+ hostMeasureRef.current = null;
299
+ hostScrollIntoViewRef.current = undefined;
300
+ fiberCacheIdRef.current = null;
301
+ markMeasureAttempted();
302
+ applyTarget(null);
303
+ }, [applyTarget, markMeasureAttempted]);
173
304
  const effectiveViewport = React.useCallback(() => {
174
305
  const windowSize = _reactNative.Dimensions.get('window');
175
306
  const scrollPadding = (0, _scrollConfig.getScrollPadding)();
307
+ const layoutPad = (0, _surfaceLayoutInsets.paddingAsEdgeInsets)(insetsRef.current);
176
308
  return (0, _rect.buildEffectiveViewport)({
177
309
  width: windowSize.width,
178
310
  height: Math.max(0, windowSize.height - keyboardBottomInsetRef.current)
179
311
  }, {
180
- top: (insetsRef.current.top ?? 0) + (scrollPadding?.top ?? 0),
181
- right: (insetsRef.current.right ?? 0) + (scrollPadding?.right ?? 0),
182
- bottom: (insetsRef.current.bottom ?? 0) + (scrollPadding?.bottom ?? 0),
183
- left: (insetsRef.current.left ?? 0) + (scrollPadding?.left ?? 0)
312
+ top: layoutPad.top + (scrollPadding?.top ?? 0),
313
+ right: layoutPad.right + (scrollPadding?.right ?? 0),
314
+ bottom: layoutPad.bottom + (scrollPadding?.bottom ?? 0),
315
+ left: layoutPad.left + (scrollPadding?.left ?? 0)
184
316
  });
185
317
  }, []);
186
318
  const maybeScrollIntoView = React.useCallback(rect => {
319
+ // Scrolling the app to reveal a target we are fading away from is visible.
320
+ if (exitingRef.current) return;
187
321
  if (scrollSettledRef.current) return;
188
322
  if ((0, _rect.isRectFullyVisible)(rect, effectiveViewport())) {
189
323
  scrollSettledRef.current = true;
@@ -216,40 +350,32 @@ function TooltipSurface({
216
350
  */
217
351
  const resolveTarget = React.useCallback(() => {
218
352
  if (!mountedRef.current) return;
219
- if (!anchorId) {
220
- hostFiberRef.current = null;
221
- hostMeasureRef.current = null;
222
- hostScrollIntoViewRef.current = undefined;
223
- markMeasureAttempted();
224
- applyTarget(null);
225
- return;
226
- }
227
- const resolution = (0, _resolveAnchorHost.resolveAnchorHost)(anchorId);
228
- if (resolution.status !== 'found') {
229
- hostFiberRef.current = null;
230
- hostMeasureRef.current = null;
231
- hostScrollIntoViewRef.current = undefined;
232
- markMeasureAttempted();
233
- applyTarget(null);
353
+ const resolution = isAuto ? (0, _resolveAutoAnchorHost.resolveAutoAnchorHost)(autoData) : anchorId ? (0, _resolveAnchorHost.resolveAnchorHost)(anchorId) : null;
354
+ if (!resolution || resolution.status !== 'found') {
355
+ dropHost();
234
356
  return;
235
357
  }
236
358
  hostFiberRef.current = resolution.fiber ?? null;
237
359
  hostMeasureRef.current = resolution.host.measureInWindow;
238
360
  hostScrollIntoViewRef.current = resolution.host.scrollIntoView;
361
+ fiberCacheIdRef.current = 'fiberCacheId' in resolution && typeof resolution.fiberCacheId === 'string' ? resolution.fiberCacheId : anchorId ?? null;
239
362
 
240
363
  // Kick an immediate measure after resolve so the first paint isn't waiting
241
364
  // on the next rAF (and so missing targets still mark attempted).
242
365
  if (measureInFlightRef.current) return;
366
+ const epoch = resolveEpochRef.current;
243
367
  measureInFlightRef.current = true;
244
368
  resolution.host.measureInWindow((x, y, width, height) => {
369
+ if (resolveEpochRef.current !== epoch) {
370
+ measureInFlightRef.current = false;
371
+ return;
372
+ }
245
373
  measureInFlightRef.current = false;
246
374
  if (!mountedRef.current) return;
247
375
  if (width <= 0 || height <= 0) {
248
- (0, _resolveAnchorHost.invalidateFiberAnchor)(anchorId);
249
- hostFiberRef.current = null;
250
- hostMeasureRef.current = null;
251
- markMeasureAttempted();
252
- applyTarget(null);
376
+ const cacheId = fiberCacheIdRef.current;
377
+ if (cacheId) (0, _resolveAnchorHost.invalidateFiberAnchor)(cacheId);
378
+ dropHost();
253
379
  return;
254
380
  }
255
381
  const rect = {
@@ -261,7 +387,7 @@ function TooltipSurface({
261
387
  maybeScrollIntoView(rect);
262
388
  applyTarget(rect);
263
389
  });
264
- }, [anchorId, applyTarget, markMeasureAttempted, maybeScrollIntoView]);
390
+ }, [anchorId, applyTarget, autoData, dropHost, isAuto, maybeScrollIntoView]);
265
391
 
266
392
  /**
267
393
  * Live re-measure of an already-resolved host. Driven by the shared rAF hub
@@ -272,16 +398,19 @@ function TooltipSurface({
272
398
  if (measureInFlightRef.current) return;
273
399
  const measure = hostMeasureRef.current;
274
400
  if (!measure) return;
401
+ const epoch = resolveEpochRef.current;
275
402
  measureInFlightRef.current = true;
276
403
  measure((x, y, width, height) => {
404
+ if (resolveEpochRef.current !== epoch) {
405
+ measureInFlightRef.current = false;
406
+ return;
407
+ }
277
408
  measureInFlightRef.current = false;
278
409
  if (!mountedRef.current) return;
279
410
  if (width <= 0 || height <= 0) {
280
- if (anchorId) (0, _resolveAnchorHost.invalidateFiberAnchor)(anchorId);
281
- hostFiberRef.current = null;
282
- hostMeasureRef.current = null;
283
- markMeasureAttempted();
284
- applyTarget(null);
411
+ const cacheId = fiberCacheIdRef.current;
412
+ if (cacheId) (0, _resolveAnchorHost.invalidateFiberAnchor)(cacheId);
413
+ dropHost();
285
414
  return;
286
415
  }
287
416
  const rect = {
@@ -293,13 +422,17 @@ function TooltipSurface({
293
422
  maybeScrollIntoView(rect);
294
423
  applyTarget(rect);
295
424
  });
296
- }, [anchorId, applyTarget, markMeasureAttempted, maybeScrollIntoView]);
425
+ }, [applyTarget, dropHost, maybeScrollIntoView]);
297
426
  React.useEffect(() => {
427
+ if (!resolveArmed) return;
298
428
  resolveTarget();
299
- }, [resolveTarget, registryTick]);
429
+ }, [resolveTarget, registryTick, resolveArmed]);
300
430
 
301
431
  // Resolve poll: recover missing / remounted anchors. Live measurement is on rAF.
302
432
  React.useEffect(() => {
433
+ if (!resolveArmed) {
434
+ return;
435
+ }
303
436
  const allowsRecovery = behavior === 'FLAG' || behavior === 'ERROR' || behavior === 'END' && session.draftMode;
304
437
  const pauseAfterReport = missingMode === 'reported' && !allowsRecovery;
305
438
  if (pauseAfterReport) {
@@ -325,7 +458,7 @@ function TooltipSurface({
325
458
  kbShow.remove();
326
459
  kbHide.remove();
327
460
  };
328
- }, [resolveTarget, missingMode, behavior, session.draftMode]);
461
+ }, [resolveTarget, missingMode, behavior, session.draftMode, resolveArmed]);
329
462
 
330
463
  // rAF tracking while a host is resolved (and we are not paused after report).
331
464
  React.useEffect(() => {
@@ -359,7 +492,7 @@ function TooltipSurface({
359
492
  }
360
493
  const ms = parseToleranceMs(theme.tooltipMissingToleranceSeconds);
361
494
  const timer = setTimeout(() => {
362
- if (!mountedRef.current || reportedRef.current) return;
495
+ if (!mountedRef.current || exitingRef.current || reportedRef.current) return;
363
496
  reportedRef.current = true;
364
497
  setMissingMode('reported');
365
498
  void engine.reportTooltipTargetMissing(currentStep.id);
@@ -386,7 +519,31 @@ function TooltipSurface({
386
519
  height: Math.max(0, windowDims.height - keyboardBottomInset)
387
520
  }), [windowDims.width, windowDims.height, keyboardBottomInset]);
388
521
  const cardMaxWidth = (0, _resolveTooltipLayout.resolveTooltipCardMaxWidth)(theme, currentStep.width, windowSize.width);
389
- const cardLayoutStyle = (0, _resolveTooltipLayout.resolveTooltipCardLayout)(cardMaxWidth, windowSize.width);
522
+ const viewportMaxHeight = (0, _resolveModalLayout.resolveModalCardMaxHeight)(windowSize.height, layoutInsets);
523
+ const minCardHeight = (0, _resolveSideCardWidth.tooltipMinCardHeight)({
524
+ contentPadding: chrome.contentPadding,
525
+ borderWidth: chrome.borderWidth,
526
+ cardMaxHeight: viewportMaxHeight
527
+ });
528
+ const minSideCardWidth = (0, _resolveSideCardWidth.tooltipMinSideCardWidth)({
529
+ contentPadding: chrome.contentPadding,
530
+ borderWidth: chrome.borderWidth,
531
+ cardMaxWidth
532
+ });
533
+ const sideCardWidth = React.useMemo(() => {
534
+ if (!target) return null;
535
+ if (desiredPlacement !== 'LEFT' && desiredPlacement !== 'RIGHT') return null;
536
+ const placementTarget = (0, _rect.expandRect)(target, backdropPadding + outsideHighlightSpread);
537
+ return (0, _resolveSideCardWidth.resolveTooltipSideCardWidth)({
538
+ placement: desiredPlacement,
539
+ target: placementTarget,
540
+ windowWidth: windowSize.width,
541
+ notchSize: chrome.notchSize,
542
+ cardMaxWidth,
543
+ minWidth: minSideCardWidth
544
+ });
545
+ }, [target, desiredPlacement, backdropPadding, outsideHighlightSpread, windowSize.width, chrome.notchSize, cardMaxWidth, minSideCardWidth]);
546
+ const defaultCardLayoutStyle = (0, _resolveTooltipLayout.resolveTooltipCardLayout)(cardMaxWidth, windowSize.width);
390
547
  const buttonsAlign = (0, _resolveTooltipLayout.resolveTooltipButtonsAlign)(theme);
391
548
  const progressBarProps = {
392
549
  enabled: theme.progressBarEnabled,
@@ -403,102 +560,220 @@ function TooltipSurface({
403
560
  const showWaitingUi = isMissing && missingMode === 'waiting' && measureAttempted;
404
561
  const layout = React.useMemo(() => {
405
562
  if (!target) return null;
563
+ // A target left over from the previous step belongs to that step's
564
+ // measurement; placing against it would also reuse that step's card size.
565
+ if (targetStepIdRef.current !== currentStep.id) return null;
566
+ const placementTarget = (0, _rect.expandRect)(target, backdropPadding + outsideHighlightSpread);
567
+ const viewportInsets = (0, _surfaceLayoutInsets.paddingAsEdgeInsets)(layoutInsets);
568
+ const height = Math.min(bubbleSize.height, viewportMaxHeight);
569
+ const inferSize = sideCardWidth != null ? {
570
+ width: sideCardWidth,
571
+ height
572
+ } : {
573
+ width: cardMaxWidth,
574
+ height
575
+ };
406
576
  const nextPlacement = (0, _inferTooltipPlacement.inferTooltipPlacement)({
407
- target,
408
- bubbleSize,
577
+ target: placementTarget,
578
+ bubbleSize: inferSize,
409
579
  notchSize: chrome.notchSize,
410
580
  windowSize,
411
581
  currentPlacement: placementRef.current,
412
- desiredPlacement
582
+ desiredPlacement,
583
+ viewportInsets,
584
+ minHeight: minCardHeight
585
+ });
586
+ const honorSide = sideCardWidth != null && nextPlacement === desiredPlacement && (nextPlacement === 'LEFT' || nextPlacement === 'RIGHT');
587
+ const fitted = (0, _inferTooltipPlacement.tooltipPlacementFits)({
588
+ target: placementTarget,
589
+ bubbleSize: inferSize,
590
+ notchSize: chrome.notchSize,
591
+ windowSize,
592
+ placement: nextPlacement,
593
+ viewportInsets,
594
+ minHeight: minCardHeight
413
595
  });
596
+ let maxCardHeight = viewportMaxHeight;
597
+ if (nextPlacement === 'ABOVE' || nextPlacement === 'BELOW') {
598
+ const gap = (0, _resolveSideCardWidth.tooltipVerticalGap)({
599
+ placement: nextPlacement,
600
+ target: placementTarget,
601
+ windowHeight: windowSize.height,
602
+ notchSize: chrome.notchSize,
603
+ viewportInsets
604
+ });
605
+ const budget = Math.floor(gap);
606
+ if (Number.isFinite(budget) && budget > 0) {
607
+ maxCardHeight = Math.max(minCardHeight, Math.min(viewportMaxHeight, budget));
608
+ }
609
+ }
610
+ const positionHeight = Math.min(height, maxCardHeight);
611
+ const positionSize = honorSide ? {
612
+ width: sideCardWidth,
613
+ height: positionHeight
614
+ } : {
615
+ width: cardMaxWidth,
616
+ height: positionHeight
617
+ };
414
618
  return {
415
619
  placement: nextPlacement,
620
+ honorSide,
621
+ fitted,
622
+ maxCardHeight,
416
623
  ...(0, _computeTooltipPosition.computeTooltipPosition)({
417
624
  target,
418
- bubbleSize,
625
+ bubbleSize: positionSize,
419
626
  placement: nextPlacement,
420
627
  notchSize: chrome.notchSize,
421
628
  backdropPadding,
629
+ outsideHighlightSpread,
422
630
  windowSize,
423
631
  bubbleBorderRadius: chrome.borderRadius,
424
- bubbleBorderWidth: chrome.borderWidth
632
+ bubbleBorderWidth: chrome.borderWidth,
633
+ viewportInsets
425
634
  })
426
635
  };
427
- }, [target, bubbleSize, chrome.notchSize, chrome.borderRadius, chrome.borderWidth, windowSize, desiredPlacement, backdropPadding]);
636
+ }, [target, bubbleSize, sideCardWidth, cardMaxWidth, viewportMaxHeight, minCardHeight, currentStep.id, chrome.notchSize, chrome.borderRadius, chrome.borderWidth, windowSize, desiredPlacement, backdropPadding, outsideHighlightSpread, layoutInsets]);
637
+ const cardLayoutStyle = layout?.honorSide && sideCardWidth != null ? {
638
+ width: sideCardWidth,
639
+ maxWidth: sideCardWidth
640
+ } : defaultCardLayoutStyle;
428
641
  React.useEffect(() => {
429
642
  if (layout && layout.placement !== placement) {
430
643
  setPlacement(layout.placement);
431
644
  }
432
645
  }, [layout, placement]);
646
+ React.useEffect(() => {
647
+ if (!layout || !target) return;
648
+ if (desiredPlacement !== 'LEFT' && desiredPlacement !== 'RIGHT') return;
649
+ // A target left over from the previous step says nothing about this one.
650
+ if (targetStepIdRef.current !== currentStep.id) return;
651
+ if (!(session.draftMode || __DEV__)) return;
652
+ if (warnedSidePlacementStepRef.current === currentStep.id) return;
653
+ if (layout.placement === desiredPlacement) {
654
+ // Last-resort return of the authored side: nothing actually fit.
655
+ if (layout.fitted) return;
656
+ warnedSidePlacementStepRef.current = currentStep.id;
657
+ (0, _placementDiagnostics.warnTooltipPlacementUnanchored)({
658
+ requested: desiredPlacement
659
+ });
660
+ return;
661
+ }
662
+ // Only the structural floor — not keyboard / off-screen flips. A resolved
663
+ // width means the room was there and something else moved the card.
664
+ if (sideCardWidth != null) return;
665
+ warnedSidePlacementStepRef.current = currentStep.id;
666
+ const placementTarget = (0, _rect.expandRect)(target, backdropPadding + outsideHighlightSpread);
667
+ (0, _placementDiagnostics.warnTooltipSidePlacementDropped)({
668
+ requested: desiredPlacement,
669
+ used: layout.placement,
670
+ availableGap: (0, _resolveSideCardWidth.tooltipSideGap)({
671
+ placement: desiredPlacement,
672
+ target: placementTarget,
673
+ windowWidth: windowSize.width,
674
+ notchSize: chrome.notchSize
675
+ }),
676
+ minWidth: minSideCardWidth
677
+ });
678
+ }, [layout, target, desiredPlacement, sideCardWidth, session.draftMode, currentStep.id, backdropPadding, outsideHighlightSpread, windowSize.width, chrome.notchSize, minSideCardWidth]);
433
679
 
434
680
  // Web parity: "When target element is clicked" → step.actions.
435
681
  // Observe taps via TargetPressBridge (pass-through); do not steal the press.
436
682
  const hasTarget = target != null;
437
683
  const targetActions = currentStep.actions;
438
684
  React.useEffect(() => {
439
- if (!hasTarget || currentStep.tooltipTargetBlocked || targetActions.length === 0) {
685
+ // Release the monitor while exiting: it is a singleton, and a tap landing on
686
+ // the old target would run the departing step's actions.
687
+ if (isExiting || !hasTarget || currentStep.tooltipTargetBlocked || targetActions.length === 0) {
440
688
  _targetPressMonitor.targetPressMonitor.clear();
441
689
  return;
442
690
  }
443
691
  _targetPressMonitor.targetPressMonitor.set({
444
692
  getRect: () => targetRef.current,
445
693
  onPress: () => {
694
+ // Native touches are async relative to commits, so re-check the phase.
695
+ if (exitingRef.current) return;
446
696
  void engine.handleActions(targetActions);
447
697
  }
448
698
  });
449
699
  return () => {
450
700
  _targetPressMonitor.targetPressMonitor.clear();
451
701
  };
452
- }, [hasTarget, currentStep.tooltipTargetBlocked, targetActions, engine]);
702
+ }, [hasTarget, currentStep.tooltipTargetBlocked, targetActions, engine, isExiting]);
703
+
704
+ // Painted from mount rather than once the target lands, so a modal → tooltip
705
+ // swap keeps the dim continuous instead of blinking it off for the frames the
706
+ // anchor takes to measure. The hole opens when `layout` arrives.
707
+ // Always mount the cutout: when `backdrop` is off the dim opacity is 0 but
708
+ // the bands still block host taps (unless interaction blocking is disabled).
709
+ const interactionBlocker = /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipCutout.TooltipCutout, {
710
+ targetRect: layout?.targetHighlightRect ?? null,
711
+ backdropColor: theme.backdropColor,
712
+ backdropOpacity: currentStep.backdrop ? backdropOpacity : 0,
713
+ targetBlocked: currentStep.tooltipTargetBlocked
714
+ });
453
715
  if (hideAfterEnd) {
454
716
  return null;
455
717
  }
718
+ const showBranding = session.flow.company.flowBranding;
719
+ const contentPadding = chrome.contentPadding;
456
720
 
457
- // Still pending the first measure attempt — stay invisible briefly.
721
+ // Still pending the first measure attempt — only the blocker shows.
458
722
  if (isMissing && missingMode === 'waiting' && !measureAttempted) {
459
- return null;
723
+ return backdropOnly(interactionBlocker);
460
724
  }
461
725
  if (showWaitingUi) {
462
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
726
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
463
727
  style: styles.root,
464
728
  testID: "userflow-tooltip-surface",
465
729
  pointerEvents: "box-none",
466
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
730
+ children: [interactionBlocker, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
467
731
  style: [styles.center, centerPaddingStyle],
468
732
  pointerEvents: "box-none",
469
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
733
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardFade.CardFade, {
470
734
  testID: "userflow-tooltip-waiting",
471
735
  accessibilityViewIsModal: true,
472
736
  pointerEvents: "auto",
473
737
  style: [chrome.shadowStyle, styles.waitingCard, cardLayoutStyle, {
474
738
  borderRadius: chrome.borderRadius,
475
- backgroundColor: chrome.backgroundColor
739
+ backgroundColor: chrome.backgroundColor,
740
+ maxHeight: viewportMaxHeight
476
741
  }],
477
742
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
478
743
  style: [chrome.fillStyle, {
479
- padding: chrome.contentPadding,
480
- alignItems: 'center'
744
+ maxHeight: viewportMaxHeight,
745
+ minHeight: 0
481
746
  }],
482
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
483
- color: theme.fontColor
484
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
747
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
485
748
  style: {
486
- color: theme.fontColor,
487
- fontSize: theme.fontSize,
488
- marginTop: 12,
489
- textAlign: 'center'
749
+ paddingHorizontal: contentPadding,
750
+ paddingTop: contentPadding,
751
+ paddingBottom: showBranding ? _MadeWithUserflow.MADE_WITH_USERFLOW_GAP : contentPadding,
752
+ alignItems: 'center'
490
753
  },
491
- children: "Looking for target\u2026"
754
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
755
+ color: theme.fontColor
756
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
757
+ style: {
758
+ color: theme.fontColor,
759
+ fontSize: theme.fontSize,
760
+ marginTop: 12,
761
+ textAlign: 'center'
762
+ },
763
+ children: "Looking for target\u2026"
764
+ })]
765
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_MadeWithUserflow.MadeWithUserflow, {
766
+ company: session.flow.company,
767
+ color: theme.fontColor,
768
+ contentPadding: contentPadding
492
769
  })]
493
770
  })
494
771
  })
495
- })
772
+ })]
496
773
  });
497
774
  }
498
775
  const progressTop = theme.progressBarEnabled && theme.progressBarPosition === 'TOP';
499
776
  const progressBottom = theme.progressBarEnabled && theme.progressBarPosition === 'BOTTOM';
500
- const showBranding = session.flow.company.flowBranding;
501
- const contentPadding = chrome.contentPadding;
502
777
  const cardBody = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
503
778
  children: [showClose ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CloseButton.CloseButton, {
504
779
  onPress: endAsUserClosed,
@@ -554,46 +829,49 @@ function TooltipSurface({
554
829
  })]
555
830
  });
556
831
  if (showAsBubbleFallback || showMissingUi) {
557
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
832
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
558
833
  style: styles.root,
559
834
  testID: "userflow-tooltip-surface",
560
835
  pointerEvents: "box-none",
561
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
836
+ children: [interactionBlocker, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
562
837
  style: [styles.center, centerPaddingStyle],
563
838
  pointerEvents: "box-none",
564
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
839
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardFade.CardFade, {
565
840
  testID: "userflow-tooltip-card",
566
841
  accessibilityViewIsModal: true,
567
842
  pointerEvents: "auto",
568
843
  onLayout: onCardLayout,
569
844
  style: [chrome.shadowStyle, styles.fallbackCard, cardLayoutStyle, {
570
845
  borderRadius: chrome.borderRadius,
571
- backgroundColor: chrome.backgroundColor
846
+ backgroundColor: chrome.backgroundColor,
847
+ maxHeight: viewportMaxHeight
572
848
  }],
573
849
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
574
- style: [chrome.fillStyle, styles.fallbackFill],
850
+ style: [chrome.fillStyle, styles.fallbackFill, {
851
+ maxHeight: viewportMaxHeight
852
+ }],
575
853
  children: cardBody
576
854
  })
577
855
  })
578
- })
856
+ })]
579
857
  });
580
858
  }
581
859
  if (!layout || !target) {
582
- return null;
860
+ return backdropOnly(interactionBlocker);
583
861
  }
584
862
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
585
863
  style: styles.root,
586
864
  testID: "userflow-tooltip-surface",
587
865
  pointerEvents: "box-none",
588
- children: [currentStep.backdrop ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipCutout.TooltipCutout, {
866
+ children: [interactionBlocker, highlight ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipHighlight.TooltipHighlight, {
589
867
  targetRect: layout.targetHighlightRect,
590
- backdropColor: theme.backdropColor,
591
- backdropOpacity: backdropOpacity,
592
- targetBlocked: currentStep.tooltipTargetBlocked
868
+ chrome: highlight
593
869
  }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipBubble.TooltipBubble, {
594
870
  chrome: chrome,
595
871
  notchPosition: layout.notchPosition,
596
872
  onLayout: onCardLayout,
873
+ maxHeight: layout.maxCardHeight,
874
+ showNotch: layout.showNotch,
597
875
  style: {
598
876
  position: 'absolute',
599
877
  left: layout.cardPosition.x,
@@ -614,18 +892,19 @@ const styles = _reactNative.StyleSheet.create({
614
892
  alignItems: 'center'
615
893
  },
616
894
  fallbackCard: {
617
- maxHeight: '80%',
618
895
  flexShrink: 1
619
896
  },
620
897
  fallbackFill: {
621
- flexShrink: 1
898
+ flexShrink: 1,
899
+ minHeight: 0
622
900
  },
623
901
  waitingCard: {
624
902
  width: '100%'
625
903
  },
626
904
  scroll: {
627
- flexGrow: 0,
628
- flexShrink: 1
905
+ flexGrow: 1,
906
+ flexShrink: 1,
907
+ minHeight: 0
629
908
  },
630
909
  scrollContent: {
631
910
  flexGrow: 1