@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,13 +3,18 @@
3
3
  import * as React from 'react';
4
4
  import { StyleSheet, View } from 'react-native';
5
5
  import { FiberScanRoot } from "../anchors/fiber/FiberScanRoot.js";
6
+ import { ElementPickerOverlay } from "../authoring/ElementPickerOverlay.js";
7
+ import { DoubleTapBridge } from "../authoring/chrome/DoubleTapBridge.js";
8
+ import { elementPickerController } from "../authoring/elementPickerController.js";
6
9
  import { PreviewModeBanner } from "../pairing/PreviewModeBanner.js";
7
10
  import { getPairingController } from "../pairing/pairingRuntime.js";
8
11
  import { usePairingState } from "../pairing/usePairingState.js";
9
12
  import { ABSOLUTE_FILL } from "../surfaces/absoluteFill.js";
13
+ import { SurfaceLayoutInsetsProvider } from "../surfaces/surfaceLayoutInsets.js";
10
14
  import { FlowRenderer } from "./FlowRenderer.js";
11
15
  import { TargetPressBridge } from "./TargetPressBridge.js";
12
16
  import { getFlowSessionEngine } from "./flowEngine.js";
17
+ import { useFlowSessionState } from "./useFlowSessionState.js";
13
18
  import { getUserflowCore } from "./userflowCore.js";
14
19
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
20
  const UserflowContext = /*#__PURE__*/React.createContext(null);
@@ -19,14 +24,16 @@ const UserflowContext = /*#__PURE__*/React.createContext(null);
19
24
  * calling {@link Userflow.init}.
20
25
  *
21
26
  * Children render normally. An absolute overlay sits above them with
22
- * `pointerEvents="box-none"` so taps pass through except where flow UI sits.
27
+ * `pointerEvents="box-none"` so taps pass through except where flow UI blocks
28
+ * them (modals always; tooltips when interaction blocking is enabled).
23
29
  * We deliberately do not use RN `<Modal>` — it is the wrong primitive for
24
30
  * non-modal tooltips (WS6).
25
31
  *
26
32
  * **Expo Router:** also mount `UserflowExpoRouterScreenTracker` from
27
- * `@userflow-tech/react-native/expo-router` under this provider so pathname changes
28
- * and path-like NAVIGATE actions are wired. The tracker is a separate entry so
29
- * apps without `expo-router` are not forced to install that peer.
33
+ * `@userflow-tech/react-native/expo-router` under this provider so pathname and
34
+ * navigation-state changes and path-like NAVIGATE actions are wired. The tracker
35
+ * is a separate entry so apps without `expo-router` are not forced to install
36
+ * that peer.
30
37
  *
31
38
  * **React Navigation:** wrap `NavigationContainer` with
32
39
  * {@link WithUserflowReactNavigation} from `@userflow-tech/react-native/navigation`.
@@ -40,28 +47,72 @@ export function UserflowProvider({
40
47
  engine
41
48
  }), [engine]);
42
49
  const pairingState = usePairingState();
50
+ const {
51
+ session,
52
+ currentStep
53
+ } = useFlowSessionState(engine);
54
+ const [previewConfirming, setPreviewConfirming] = React.useState(false);
55
+ const [pickerActive, setPickerActive] = React.useState(() => elementPickerController.getState().active);
56
+ React.useEffect(() => {
57
+ return elementPickerController.subscribe(next => {
58
+ setPickerActive(next.active);
59
+ });
60
+ }, []);
61
+ const trapHostAccessibility = React.useMemo(() => {
62
+ if (previewConfirming) {
63
+ return true;
64
+ }
65
+ if (!session || !currentStep) {
66
+ return false;
67
+ }
68
+ const appearance = String(currentStep.appearance).toUpperCase();
69
+ if (appearance === 'HIDDEN') {
70
+ return false;
71
+ }
72
+ if (appearance !== 'TOOLTIP') {
73
+ return true;
74
+ }
75
+ return currentStep.tooltipTargetBlocked;
76
+ }, [previewConfirming, session, currentStep]);
43
77
  const onExitPreview = React.useCallback(() => {
44
78
  void getPairingController(getUserflowCore()).exitPreview();
45
79
  }, []);
80
+ const onRestartPreview = React.useCallback(() => {
81
+ void getPairingController(getUserflowCore()).restartPreview();
82
+ }, []);
46
83
  return /*#__PURE__*/_jsx(UserflowContext.Provider, {
47
84
  value: contextValue,
48
- children: /*#__PURE__*/_jsxs(View, {
49
- style: styles.root,
50
- collapsable: false,
51
- children: [/*#__PURE__*/_jsx(TargetPressBridge, {
52
- children: /*#__PURE__*/_jsx(FiberScanRoot, {
53
- children: children
85
+ children: /*#__PURE__*/_jsx(SurfaceLayoutInsetsProvider, {
86
+ children: /*#__PURE__*/_jsx(DoubleTapBridge, {
87
+ children: /*#__PURE__*/_jsxs(View, {
88
+ style: styles.root,
89
+ collapsable: false,
90
+ children: [/*#__PURE__*/_jsx(View, {
91
+ style: styles.appContent,
92
+ testID: "userflow-app-content",
93
+ importantForAccessibility: trapHostAccessibility ? 'no-hide-descendants' : undefined,
94
+ accessibilityElementsHidden: trapHostAccessibility ? true : undefined,
95
+ children: /*#__PURE__*/_jsx(TargetPressBridge, {
96
+ children: /*#__PURE__*/_jsx(FiberScanRoot, {
97
+ children: children
98
+ })
99
+ })
100
+ }), /*#__PURE__*/_jsxs(View, {
101
+ style: styles.overlay,
102
+ pointerEvents: "box-none",
103
+ children: [/*#__PURE__*/_jsx(PreviewModeBanner, {
104
+ onConfirmingChange: setPreviewConfirming,
105
+ onExit: onExitPreview,
106
+ onRestart: onRestartPreview,
107
+ state: pairingState,
108
+ suppressed: pickerActive
109
+ }), /*#__PURE__*/_jsx(FlowRenderer, {
110
+ engine: engine,
111
+ previewRestartGeneration: pairingState.previewRestartGeneration
112
+ }), /*#__PURE__*/_jsx(ElementPickerOverlay, {})]
113
+ })]
54
114
  })
55
- }), /*#__PURE__*/_jsxs(View, {
56
- style: styles.overlay,
57
- pointerEvents: "box-none",
58
- children: [/*#__PURE__*/_jsx(PreviewModeBanner, {
59
- state: pairingState,
60
- onExit: onExitPreview
61
- }), /*#__PURE__*/_jsx(FlowRenderer, {
62
- engine: engine
63
- })]
64
- })]
115
+ })
65
116
  })
66
117
  });
67
118
  }
@@ -78,6 +129,9 @@ const styles = StyleSheet.create({
78
129
  root: {
79
130
  flex: 1
80
131
  },
132
+ appContent: {
133
+ flex: 1
134
+ },
81
135
  overlay: {
82
136
  ...ABSOLUTE_FILL
83
137
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","StyleSheet","View","FiberScanRoot","PreviewModeBanner","getPairingController","usePairingState","ABSOLUTE_FILL","FlowRenderer","TargetPressBridge","getFlowSessionEngine","getUserflowCore","jsx","_jsx","jsxs","_jsxs","UserflowContext","createContext","UserflowProvider","children","engine","engineProp","contextValue","useMemo","pairingState","onExitPreview","useCallback","exitPreview","Provider","value","style","styles","root","collapsable","overlay","pointerEvents","state","onExit","useUserflow","ctx","useContext","Error","create","flex"],"sourceRoot":"../../../src","sources":["runtime/UserflowProvider.tsx"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,aAAa,QAAQ,mCAAgC;AAC9D,SAASC,iBAAiB,QAAQ,iCAA8B;AAChE,SAASC,oBAAoB,QAAQ,8BAA2B;AAChE,SAASC,eAAe,QAAQ,+BAA4B;AAC5D,SA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K,EAAEC,MAAM,CAACG,OAAQ;QAACC,aAAa,EAAC,UAAU;QAAAhB,QAAA,gBACnDN,IAAA,CAACT,iBAAiB;UAACgC,KAAK,EAAEZ,YAAa;UAACa,MAAM,EAAEZ;QAAc,CAAE,CAAC,eACjEZ,IAAA,CAACL,YAAY;UAACY,MAAM,EAAEA;QAAO,CAAE,CAAC;MAAA,CAC5B,CAAC;IAAA,CACH;EAAC,CACiB,CAAC;AAE/B;;AAEA;AACA,OAAO,SAASkB,WAAWA,CAAA,EAAyB;EAClD,MAAMC,GAAG,GAAGvC,KAAK,CAACwC,UAAU,CAACxB,eAAe,CAAC;EAC7C,IAAI,CAACuB,GAAG,EAAE;IACR,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC;EAC3E;EACA,OAAOF,GAAG;AACZ;AAEA,MAAMR,MAAM,GAAG9B,UAAU,CAACyC,MAAM,CAAC;EAC/BV,IAAI,EAAE;IACJW,IAAI,EAAE;EACR,CAAC;EACDT,OAAO,EAAE;IACP,GAAG3B;EACL;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","StyleSheet","View","FiberScanRoot","ElementPickerOverlay","DoubleTapBridge","elementPickerController","PreviewModeBanner","getPairingController","usePairingState","ABSOLUTE_FILL","SurfaceLayoutInsetsProvider","FlowRenderer","TargetPressBridge","getFlowSessionEngine","useFlowSessionState","getUserflowCore","jsx","_jsx","jsxs","_jsxs","UserflowContext","createContext","UserflowProvider","children","engine","engineProp","contextValue","useMemo","pairingState","session","currentStep","previewConfirming","setPreviewConfirming","useState","pickerActive","setPickerActive","getState","active","useEffect","subscribe","next","trapHostAccessibility","appearance","String","toUpperCase","tooltipTargetBlocked","onExitPreview","useCallback","exitPreview","onRestartPreview","restartPreview","Provider","value","style","styles","root","collapsable","appContent","testID","importantForAccessibility","undefined","accessibilityElementsHidden","overlay","pointerEvents","onConfirmingChange","onExit","onRestart","state","suppressed","previewRestartGeneration","useUserflow","ctx","useContext","Error","create","flex"],"s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AEA;AACA,OAAO,SAASmE,WAAWA,CAAA,EAAyB;EAClD,MAAMC,GAAG,GAAGxE,KAAK,CAACyE,UAAU,CAACpD,eAAe,CAAC;EAC7C,IAAI,CAACmD,GAAG,EAAE;IACR,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC;EAC3E;EACA,OAAOF,GAAG;AACZ;AAEA,MAAMjB,MAAM,GAAGtD,UAAU,CAAC0E,MAAM,CAAC;EAC/BnB,IAAI,EAAE;IACJoB,IAAI,EAAE;EACR,CAAC;EACDlB,UAAU,EAAE;IACVkB,IAAI,EAAE;EACR,CAAC;EACDb,OAAO,EAAE;IACP,GAAGrD;EACL;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Touches that just started/ended/cancelled for this event. Prefer
5
+ * `changedTouches` so multi-touch uses the finger(s) that actually changed —
6
+ * `touches[0]` may be an already-active finger. Each touch carries `identifier`
7
+ * so monitors can pair start/end per finger.
8
+ */
9
+ export function changedTouchPoints(event) {
10
+ const {
11
+ changedTouches,
12
+ touches,
13
+ identifier,
14
+ pageX,
15
+ pageY
16
+ } = event.nativeEvent;
17
+ if (changedTouches && changedTouches.length > 0) {
18
+ return changedTouches.map(touch => ({
19
+ identifier: touch.identifier,
20
+ pageX: touch.pageX,
21
+ pageY: touch.pageY
22
+ }));
23
+ }
24
+ if (touches && touches.length > 0) {
25
+ const touch = touches[touches.length - 1];
26
+ return [{
27
+ identifier: touch.identifier,
28
+ pageX: touch.pageX,
29
+ pageY: touch.pageY
30
+ }];
31
+ }
32
+ return [{
33
+ identifier: identifier ?? 0,
34
+ pageX,
35
+ pageY
36
+ }];
37
+ }
38
+ export function forEachChangedTouch(event, fn) {
39
+ for (const touch of changedTouchPoints(event)) {
40
+ fn(touch.identifier, touch.pageX, touch.pageY);
41
+ }
42
+ }
43
+ //# sourceMappingURL=changedTouchPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["changedTouchPoints","event","changedTouches","touches","identifier","pageX","pageY","nativeEvent","length","map","touch","forEachChangedTouch","fn"],"sourceRoot":"../../../src","sources":["runtime/changedTouchPoints.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,kBAAkBA,CAChCC,KAA4B,EACqC;EACjE,MAAM;IAAEC,cAAc;IAAEC,OAAO;IAAEC,UAAU;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGL,KAAK,CAACM,WAAW;EAC/E,IAAIL,cAAc,IAAIA,cAAc,CAACM,MAAM,GAAG,CAAC,EAAE;IAC/C,OAAON,cAAc,CAACO,GAAG,CAAEC,KAAK,KAAM;MACpCN,UAAU,EAAEM,KAAK,CAACN,UAAU;MAC5BC,KAAK,EAAEK,KAAK,CAACL,KAAK;MAClBC,KAAK,EAAEI,KAAK,CAACJ;IACf,CAAC,CAAC,CAAC;EACL;EACA,IAAIH,OAAO,IAAIA,OAAO,CAACK,MAAM,GAAG,CAAC,EAAE;IACjC,MAAME,KAAK,GAAGP,OAAO,CAACA,OAAO,CAACK,MAAM,GAAG,CAAC,CAAE;IAC1C,OAAO,CAAC;MAAEJ,UAAU,EAAEM,KAAK,CAACN,UAAU;MAAEC,KAAK,EAAEK,KAAK,CAACL,KAAK;MAAEC,KAAK,EAAEI,KAAK,CAACJ;IAAM,CAAC,CAAC;EACnF;EACA,OAAO,CAAC;IAAEF,UAAU,EAAEA,UAAU,IAAI,CAAC;IAAEC,KAAK;IAAEC;EAAM,CAAC,CAAC;AACxD;AAEA,OAAO,SAASK,mBAAmBA,CACjCV,KAA4B,EAC5BW,EAAsF,EAChF;EACN,KAAK,MAAMF,KAAK,IAAIV,kBAAkB,CAACC,KAAK,CAAC,EAAE;IAC7CW,EAAE,CAACF,KAAK,CAACN,UAAU,EAAEM,KAAK,CAACL,KAAK,EAAEK,KAAK,CAACJ,KAAK,CAAC;EAChD;AACF","ignoreList":[]}
@@ -15,7 +15,9 @@ export function getFlowSessionEngine(core) {
15
15
  },
16
16
  onOpenExternalUrl: url => {
17
17
  void openFlowNavigateUrl(url);
18
- }
18
+ },
19
+ updateUser: attributes => core.updateUser(attributes),
20
+ updateGroup: (attributes, options) => core.updateGroup(attributes, options)
19
21
  });
20
22
  }
21
23
  return flowEngine;
@@ -1 +1 @@
1
- {"version":3,"names":["FlowSessionEngine","openFlowNavigateUrl","flowEngine","getFlowSessionEngine","core","transport","send","message","onServerMessage","handler","setFlowSessionId","id","onOpenExternalUrl","url","attachFlowSessionEngine","engine","attach","resetFlowSessionEngine","reset","clearFlowSessionEngineLocalSession","clearLocalSession","hasActiveFlowSession","getFlowSession","__resetFlowSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/flowEngine.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAA2B,qBAAqB;AAE1E,SAASC,mBAAmB,QAAQ,sCAAmC;AAEvE,IAAIC,UAAoC,GAAG,IAAI;;AAE/C;AACA,OAAO,SAASC,oBAAoBA,CAACC,IAAkB,EAAqB;EAC1E,IAAI,CAACF,UAAU,EAAE;IACfA,UAAU,GAAG,IAAIF,iBAAiB,CAAC;MACjCK,SAAS,EAAE;QACTC,IAAI,EAAGC,OAAO,IAAKH,IAAI,CAACE,IAAI,CAACC,OAAO,CAAC;QACrCC,eAAe,EAAGC,OAAO,IAAKL,IAAI,CAACI,eAAe,CAACC,OAAO,CAAC;QAC3DC,gBAAgB,EAAGC,EAAE,IAAKP,IAAI,CAACM,gBAAgB,CAACC,EAAE;MACpD,CAAC;MACDC,iBAAiB,EAAGC,GAAG,IAAK;QAC1B,KAAKZ,mBAAmB,CAACY,GAAG,CAAC;MAC/B;IACF,CAAC,CAAC;EACJ;EACA,OAAOX,UAAU;AACnB;;AAEA;AACA,OAAO,SAASY,uBAAuBA,CAACV,IAAkB,EAAqB;EAC7E,MAAMW,MAAM,GAAGZ,oBAAoB,CAACC,IAAI,CAAC;EACzCW,MAAM,CAACC,MAAM,CAAC,CAAC;EACf,OAAOD,MAAM;AACf;;AAEA;AACA,OAAO,SAASE,sBAAsBA,CAAA,EAAS;EAC7Cf,UAAU,EAAEgB,KAAK,CAAC,CAAC;AACrB;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,kCAAkCA,CAAA,EAAS;EACzDjB,UAAU,EAAEkB,iBAAiB,CAAC,CAAC;AACjC;;AAEA;AACA,OAAO,SAASC,oBAAoBA,CAAA,EAAY;EAC9C,OAAOnB,UAAU,EAAEoB,cAAc,CAAC,CAAC,IAAI,IAAI;AAC7C;;AAEA;AACA,OAAO,SAASC,gCAAgCA,CAAA,EAAS;EACvDrB,UAAU,EAAEgB,KAAK,CAAC,CAAC;EACnBhB,UAAU,GAAG,IAAI;AACnB","ignoreList":[]}
1
+ {"version":3,"names":["FlowSessionEngine","openFlowNavigateUrl","flowEngine","getFlowSessionEngine","core","transport","send","message","onServerMessage","handler","setFlowSessionId","id","onOpenExternalUrl","url","updateUser","attributes","updateGroup","options","attachFlowSessionEngine","engine","attach","resetFlowSessionEngine","reset","clearFlowSessionEngineLocalSession","clearLocalSession","hasActiveFlowSession","getFlowSession","__resetFlowSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/flowEngine.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAA2B,qBAAqB;AAE1E,SAASC,mBAAmB,QAAQ,sCAAmC;AAEvE,IAAIC,UAAoC,GAAG,IAAI;;AAE/C;AACA,OAAO,SAASC,oBAAoBA,CAACC,IAAkB,EAAqB;EAC1E,IAAI,CAACF,UAAU,EAAE;IACfA,UAAU,GAAG,IAAIF,iBAAiB,CAAC;MACjCK,SAAS,EAAE;QACTC,IAAI,EAAGC,OAAO,IAAKH,IAAI,CAACE,IAAI,CAACC,OAAO,CAAC;QACrCC,eAAe,EAAGC,OAAO,IAAKL,IAAI,CAACI,eAAe,CAACC,OAAO,CAAC;QAC3DC,gBAAgB,EAAGC,EAAE,IAAKP,IAAI,CAACM,gBAAgB,CAACC,EAAE;MACpD,CAAC;MACDC,iBAAiB,EAAGC,GAAG,IAAK;QAC1B,KAAKZ,mBAAmB,CAACY,GAAG,CAAC;MAC/B,CAAC;MACDC,UAAU,EAAGC,UAAU,IAAKX,IAAI,CAACU,UAAU,CAACC,UAAU,CAAC;MACvDC,WAAW,EAAEA,CAACD,UAAU,EAAEE,OAAO,KAAKb,IAAI,CAACY,WAAW,CAACD,UAAU,EAAEE,OAAO;IAC5E,CAAC,CAAC;EACJ;EACA,OAAOf,UAAU;AACnB;;AAEA;AACA,OAAO,SAASgB,uBAAuBA,CAACd,IAAkB,EAAqB;EAC7E,MAAMe,MAAM,GAAGhB,oBAAoB,CAACC,IAAI,CAAC;EACzCe,MAAM,CAACC,MAAM,CAAC,CAAC;EACf,OAAOD,MAAM;AACf;;AAEA;AACA,OAAO,SAASE,sBAAsBA,CAAA,EAAS;EAC7CnB,UAAU,EAAEoB,KAAK,CAAC,CAAC;AACrB;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,kCAAkCA,CAAA,EAAS;EACzDrB,UAAU,EAAEsB,iBAAiB,CAAC,CAAC;AACjC;;AAEA;AACA,OAAO,SAASC,oBAAoBA,CAAA,EAAY;EAC9C,OAAOvB,UAAU,EAAEwB,cAAc,CAAC,CAAC,IAAI,IAAI;AAC7C;;AAEA;AACA,OAAO,SAASC,gCAAgCA,CAAA,EAAS;EACvDzB,UAAU,EAAEoB,KAAK,CAAC,CAAC;EACnBpB,UAAU,GAAG,IAAI;AACnB","ignoreList":[]}
@@ -5,36 +5,61 @@
5
5
  export function initialFlowSessionViewState(session) {
6
6
  return {
7
7
  session,
8
- currentStepId: session?.currentStep?.id ?? null
8
+ currentStepId: session?.currentStep?.id ?? null,
9
+ stepShowNonce: 0
9
10
  };
10
11
  }
11
12
 
12
13
  /**
13
14
  * Reduces engine events into view state.
14
15
  *
15
- * Important: `goToStep` updates `currentStepId` without requiring a new
16
- * `sessionChange` — the engine mutates `session.currentStep` in place and
17
- * `ForceGoToStep` does not update it at all.
16
+ * `goToStep` updates `currentStepId` without a new `sessionChange`. A later
17
+ * same-session SetFlowSession must not snap back to `session.currentStep` —
18
+ * tracking a button event enqueues `check_sessions`, which can push a stale
19
+ * current step. Web `FlowApp` `updateSession` keeps the local step for the
20
+ * same session id (and only falls back if that step was deleted from the
21
+ * version).
18
22
  */
19
23
  export function reduceFlowSessionViewState(state, event) {
20
24
  switch (event.type) {
21
25
  case 'sessionChange':
22
26
  return {
23
27
  session: event.session,
24
- currentStepId: event.session?.currentStep?.id ?? null
28
+ currentStepId: resolveSessionChangeStepId(state, event.session),
29
+ stepShowNonce: state.session?.id === event.session?.id ? state.stepShowNonce : 0
25
30
  };
26
31
  case 'goToStep':
27
32
  return {
28
33
  ...state,
29
- currentStepId: event.stepId
34
+ currentStepId: event.stepId,
35
+ stepShowNonce: state.stepShowNonce + 1
30
36
  };
31
37
  case 'flowEnded':
32
38
  return {
33
39
  session: null,
34
- currentStepId: null
40
+ currentStepId: null,
41
+ stepShowNonce: 0
35
42
  };
36
43
  }
37
44
  }
45
+ function resolveSessionChangeStepId(state, session) {
46
+ if (session == null) {
47
+ return null;
48
+ }
49
+ if (state.session?.id !== session.id || state.currentStepId == null) {
50
+ return session.currentStep?.id ?? null;
51
+ }
52
+ const previousStep = state.session.version.steps.find(step => step.id === state.currentStepId);
53
+ const byCrossVersionId = previousStep == null ? undefined : session.version.steps.find(step => step.crossVersionId === previousStep.crossVersionId);
54
+ if (byCrossVersionId) {
55
+ return byCrossVersionId.id;
56
+ }
57
+ const byId = session.version.steps.find(step => step.id === state.currentStepId);
58
+ if (byId) {
59
+ return byId.id;
60
+ }
61
+ return session.currentStep?.id ?? null;
62
+ }
38
63
  export function resolveCurrentStep(session, currentStepId) {
39
64
  if (!session || !currentStepId) return null;
40
65
  return session.version.steps.find(step => step.id === currentStepId) ?? null;
@@ -1 +1 @@
1
- {"version":3,"names":["initialFlowSessionViewState","session","currentStepId","currentStep","id","reduceFlowSessionViewState","state","event","type","stepId","resolveCurrentStep","version","steps","find","step"],"sourceRoot":"../../../src","sources":["runtime/flowSessionViewState.ts"],"mappings":";;AAGA;;AAMA,OAAO,SAASA,2BAA2BA,CACzCC,OAAmC,EACb;EACtB,OAAO;IACLA,OAAO;IACPC,aAAa,EAAED,OAAO,EAAEE,WAAW,EAAEC,EAAE,IAAI;EAC7C,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CACxCC,KAA2B,EAC3BC,KAA6B,EACP;EACtB,QAAQA,KAAK,CAACC,IAAI;IAChB,KAAK,eAAe;MAClB,OAAO;QACLP,OAAO,EAAEM,KAAK,CAACN,OAAO;QACtBC,aAAa,EAAEK,KAAK,CAACN,OAAO,EAAEE,WAAW,EAAEC,EAAE,IAAI;MACnD,CAAC;IACH,KAAK,UAAU;MACb,OAAO;QACL,GAAGE,KAAK;QACRJ,aAAa,EAAEK,KAAK,CAACE;MACvB,CAAC;IACH,KAAK,WAAW;MACd,OAAO;QACLR,OAAO,EAAE,IAAI;QACbC,aAAa,EAAE;MACjB,CAAC;EACL;AACF;AAEA,OAAO,SAASQ,kBAAkBA,CAChCT,OAAmC,EACnCC,aAA4B,EACH;EACzB,IAAI,CAACD,OAAO,IAAI,CAACC,aAAa,EAAE,OAAO,IAAI;EAC3C,OAAOD,OAAO,CAACU,OAAO,CAACC,KAAK,CAACC,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACV,EAAE,KAAKF,aAAa,CAAC,IAAI,IAAI;AAChF","ignoreList":[]}
1
+ {"version":3,"names":["initialFlowSessionViewState","session","currentStepId","currentStep","id","stepShowNonce","reduceFlowSessionViewState","state","event","type","resolveSessionChangeStepId","stepId","previousStep","version","steps","find","step","byCrossVersionId","undefined","crossVersionId","byId","resolveCurrentStep"],"sourceRoot":"../../../src","sources":["runtime/flowSessionViewState.ts"],"mappings":";;AAGA;;AAYA,OAAO,SAASA,2BAA2BA,CACzCC,OAAmC,EACb;EACtB,OAAO;IACLA,OAAO;IACPC,aAAa,EAA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,YAAY,IAAI,IAAI,GAChBM,SAAS,GACTjB,OAAO,CAACY,OAAO,CAACC,KAAK,CAACC,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACG,cAAc,KAAKP,YAAY,CAACO,cAAc,CAAC;EAC/F,IAAIF,gBAAgB,EAAE;IACpB,OAAOA,gBAAgB,CAACb,EAAE;EAC5B;EACA,MAAMgB,IAAI,GAAGnB,OAAO,CAACY,OAAO,CAACC,KAAK,CAACC,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACZ,EAAE,KAAKG,KAAK,CAACL,aAAa,CAAC;EAClF,IAAIkB,IAAI,EAAE;IACR,OAAOA,IAAI,CAAChB,EAAE;EAChB;EACA,OAAOH,OAAO,CAACE,WAAW,EAAEC,EAAE,IAAI,IAAI;AACxC;AAEA,OAAO,SAASiB,kBAAkBA,CAChCpB,OAAmC,EACnCC,aAA4B,EACH;EACzB,IAAI,CAACD,OAAO,IAAI,CAACC,aAAa,EAAE,OAAO,IAAI;EAC3C,OAAOD,OAAO,CAACY,OAAO,CAACC,KAAK,CAACC,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACZ,EAAE,KAAKF,aAAa,CAAC,IAAI,IAAI;AAChF","ignoreList":[]}
@@ -15,7 +15,8 @@ export function useFlowSessionState(engine) {
15
15
  return {
16
16
  session: state.session,
17
17
  currentStepId: state.currentStepId,
18
- currentStep: resolveCurrentStep(state.session, state.currentStepId)
18
+ currentStep: resolveCurrentStep(state.session, state.currentStepId),
19
+ stepShowNonce: state.stepShowNonce
19
20
  };
20
21
  }
21
22
  //# sourceMappingURL=useFlowSessionState.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useReducer","initialFlowSessionViewState","reduceFlowSessionViewState","resolveCurrentStep","useFlowSessionState","engine","state","dispatch","undefined","getFlowSession","type","session","on","currentStepId","currentStep"],"sourceRoot":"../../../src","sources":["runtime/useFlowSessionState.ts"],"mappings":";;AAEA,SAASA,SAAS,EAAEC,UAAU,QAAQ,OAAO;AAE7C,SACEC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,kBAAkB,QACb,2BAAwB;AAQ/B;AACA,OAAO,SAASC,mBAAmBA,CAACC,MAAyB,EAAoB;EAC/E,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGP,UAAU,CAACE,0BAA0B,EAAEM,SAAS,EAAE,MAC1EP,2BAA2B,CAACI,MAAM,CAACI,cAAc,CAAC,CAAC,CACrD,CAAC;EAEDV,SAAS,CAAC,MAAM;IACdQ,QAAQ,CAAC;MACPG,IAAI,EAAE,eAAe;MACrBC,OAAO,EAAEN,MAAM,CAACI,cAAc,CAAC;IACjC,CAAC,CAAC;IACF,OAAOJ,MAAM,CAACO,EAAE,CAACL,QAAQ,CAAC;EAC5B,CAAC,EAAE,CAACF,MAAM,CAAC,CAAC;EAEZ,OAAO;IACLM,OAAO,EAAEL,KAAK,CAACK,OAAO;IACtBE,aAAa,EAAEP,KAAK,CAACO,aAAa;IAClCC,WAAW,EAAEX,kBAAkB,CAACG,KAAK,CAACK,OAAO,EAAEL,KAAK,CAACO,aAAa;EACpE,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useReducer","initialFlowSessionViewState","reduceFlowSessionViewState","resolveCurrentStep","useFlowSessionState","engine","state","dispatch","undefined","getFlowSession","type","session","on","currentStepId","currentStep","stepShowNonce"],"sourceRoot":"../../../src","sources":["runtime/useFlowSessionState.ts"],"mappings":";;AAEA,SAASA,SAAS,EAAEC,UAAU,QAAQ,OAAO;AAE7C,SACEC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,kBAAkB,QACb,2BAAwB;AAS/B;AACA,OAAO,SAASC,mBAAmBA,CAACC,MAAyB,EAAoB;EAC/E,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGP,UAAU,CAACE,0BAA0B,EAAEM,SAAS,EAAE,MAC1EP,2BAA2B,CAACI,MAAM,CAACI,cAAc,CAAC,CAAC,CACrD,CAAC;EAEDV,SAAS,CAAC,MAAM;IACdQ,QAAQ,CAAC;MACPG,IAAI,EAAE,eAAe;MACrBC,OAAO,EAAEN,MAAM,CAACI,cAAc,CAAC;IACjC,CAAC,CAAC;IACF,OAAOJ,MAAM,CAACO,EAAE,CAACL,QAAQ,CAAC;EAC5B,CAAC,EAAE,CAACF,MAAM,CAAC,CAAC;EAEZ,OAAO;IACLM,OAAO,EAAEL,KAAK,CAACK,OAAO;IACtBE,aAAa,EAAEP,KAAK,CAACO,aAAa;IAClCC,WAAW,EAAEX,kBAAkB,CAACG,KAAK,CAACK,OAAO,EAAEL,KAAK,CAACO,aAAa,CAAC;IACnEE,aAAa,EAAET,KAAK,CAACS;EACvB,CAAC;AACH","ignoreList":[]}
@@ -1,9 +1,14 @@
1
1
  "use strict";
2
2
 
3
+ /** Predefined mobile screen-view event (web analogue: `page_viewed`). */
4
+ export const SCREEN_VIEWED_EVENT = 'screen_viewed';
5
+
3
6
  /** Called when a new location is accepted (after enable + dedupe). */
4
7
 
5
8
  let enabled = false;
6
9
  let currentKey = null;
10
+ /** Last accepted (or pending) location — used by the in-app element picker. */
11
+ let currentLocation = null;
7
12
  /** Latest location seen while tracking was disabled; flushed on enable. */
8
13
  let pendingLocation = null;
9
14
  let reporter = null;
@@ -11,6 +16,20 @@ function locationKey(location) {
11
16
  return 'path' in location ? `path:${location.path}` : `screen:${location.screen}`;
12
17
  }
13
18
 
19
+ /** Event attributes for `screen_viewed`, or `null` when the location has no identity. */
20
+ export function screenViewedAttributes(location) {
21
+ if ('path' in location) {
22
+ if (!location.path) return null;
23
+ return {
24
+ screen_path: location.path
25
+ };
26
+ }
27
+ if (!location.screen) return null;
28
+ return {
29
+ screen_name: location.screen
30
+ };
31
+ }
32
+
14
33
  /**
15
34
  * Registers the callback invoked when the active screen/path changes.
16
35
  * The React Native facade wires this to `UserflowCore.updateScreen`.
@@ -20,9 +39,15 @@ export function setScreenChangeReporter(next) {
20
39
  }
21
40
  function report(location) {
22
41
  currentKey = locationKey(location);
42
+ currentLocation = location;
23
43
  reporter?.(location);
24
44
  }
25
45
 
46
+ /** Latest screen/path the SDK has recorded, or `null` before the first report. */
47
+ export function getCurrentScreenLocation() {
48
+ return currentLocation ?? pendingLocation;
49
+ }
50
+
26
51
  /** Activates screen-change tracking after a successful {@link Userflow.init}. */
27
52
  export function enableScreenTracking() {
28
53
  enabled = true;
@@ -39,13 +64,16 @@ export function enableScreenTracking() {
39
64
  export function disableScreenTracking() {
40
65
  enabled = false;
41
66
  currentKey = null;
67
+ currentLocation = null;
42
68
  pendingLocation = null;
43
69
  }
44
70
 
45
71
  /**
46
72
  * Records a navigation to `location` when tracking is enabled.
47
- * Duplicate consecutive locations are ignored. On change, notifies the reporter
48
- * so the SDK can push `UpdateClientContext` to the backend.
73
+ * Duplicate consecutive locations are ignored unless `{ force: true }` (used
74
+ * after overlay dismiss, AppState resume, and first identify). On change,
75
+ * notifies the reporter so the SDK can push `UpdateClientContext` and
76
+ * `screen_viewed`.
49
77
  *
50
78
  * Locations observed before {@link enableScreenTracking} are remembered and
51
79
  * flushed when tracking is enabled (so init-after-mount still picks up the
@@ -54,7 +82,7 @@ export function disableScreenTracking() {
54
82
  * - Expo Router: `{ path: "/settings/billing" }` → wire `screenPath`
55
83
  * - React Navigation / manual: `{ screen: "BillingSettings" }` → wire `screenName`
56
84
  */
57
- export function handleScreenChange(location) {
85
+ export function handleScreenChange(location, options) {
58
86
  if (!location) return;
59
87
  if ('path' in location) {
60
88
  if (!location.path) return;
@@ -65,14 +93,24 @@ export function handleScreenChange(location) {
65
93
  pendingLocation = location;
66
94
  return;
67
95
  }
68
- if (locationKey(location) === currentKey) return;
96
+ if (!options?.force && locationKey(location) === currentKey) return;
69
97
  pendingLocation = null;
70
98
  report(location);
71
99
  }
72
100
 
101
+ /** Re-report the current screen, bypassing consecutive dedupe (resume / identify). */
102
+ export function reportCurrentScreen() {
103
+ const location = getCurrentScreenLocation();
104
+ if (!location) return;
105
+ handleScreenChange(location, {
106
+ force: true
107
+ });
108
+ }
109
+
73
110
  /** @internal Resets tracker state between tests. Does not clear the reporter. */
74
111
  export function resetScreenTrackerForTests() {
75
112
  enabled = false;
113
+ currentLocation = null;
76
114
  currentKey = null;
77
115
  pendingLocation = null;
78
116
  }
@@ -1 +1 @@
1
- {"version":3,"names":["enabled","currentKey","pendingLocation","reporter","locationKey","location","path","screen","setScreenChangeReporter","next","report","enableScreenTracking","disableScreenTracking","handleScreenChange","resetScreenTrackerForTests"],"sourceRoot":"../../src","sources":["screenTracker.ts"],"mappings":";;AAEA;;AAGA,IAAIA,OAAO,GAAG,KAAK;AACnB,IAAIC,UAAyB,GAAG,IAAI;AACpC;AACA,IAAIC,eAA4C,GAAG,IAAI;AACvD,IAAIC,QAAqC,GAAG,IAAI;AAEhD,SAASC,WAAWA,CAACC,QAA8B,EAAU;EAC3D,OAAO,MAAM,IAAIA,QAAQ,GAAG,QAAQA,QAAQ,CAACC,IAAI,EAAE,GAAG,UAAUD,QAAQ,CAACE,MAAM,EAAE;AACnF;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAACC,IAAiC,EAAQ;EAC/EN,QAAQ,GAAGM,IAAI;AACjB;AAEA,SAASC,MAAMA,CAACL,QAA8B,EAAQ;EACpDJ,UAAU,GAAGG,WAAW,CAACC,QAAQ,CAAC;EAClCF,QAAQ,GAAGE,QAAQ,CAAC;AACtB;;AAEA;AACA,OAAO,SAASM,oBAAoBA,CAAA,EAAS;EAC3CX,OAAO,GAAG,IAAI;EACd,IAAIE,eAAe,IAAIE,WAAW,CAACF,eAAe,CAAC,KAAKD,UAAU,EAAE;IAClE,MAAMI,QAAQ,GAAGH,eAAe;IAChCA,eAAe,GAAG,IAAI;IACtBQ,MAAM,CAACL,QAAQ,CAAC;EAClB,CAAC,MAAM;IACLH,eAAe,GAAG,IAAI;EACxB;AACF;;AAEA;AACA,OAAO,SAASU,qBAAqBA,CAAA,EAAS;EAC5CZ,OAAO,GAAG,KAAK;EACfC,UAAU,GAAG,IAAI;EACjBC,eAAe,GAAG,IAAI;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASW,kBAAkBA,CAACR,QAA0C,EAAQ;EACnF,IAAI,CAACA,QAAQ,EAAE;EACf,IAAI,MAAM,IAAIA,QAAQ,EAAE;IACtB,IAAI,CAACA,QAAQ,CAACC,IAAI,EAAE;EACtB,CAAC,MAAM,IAAI,CAACD,QAAQ,CAACE,MAAM,EAAE;IAC3B;EACF;EAEA,IAAI,CAACP,OAAO,EAAE;IACZE,eAAe,GAAGG,QAAQ;IAC1B;EACF;EAEA,IAAID,WAAW,CAACC,QAAQ,CAAC,KAAKJ,UAAU,EAAE;EAC1CC,eAAe,GAAG,IAAI;EACtBQ,MAAM,CAACL,QAAQ,CAAC;AAClB;;AAEA;AACA,OAAO,SAASS,0BAA0BA,CAAA,EAAS;EACjDd,OAAO,GAAG,KAAK;EACfC,UAAU,GAAG,IAAI;EACjBC,eAAe,GAAG,IAAI;AACxB","ignoreList":[]}
1
+ {"version":3,"names":["SCREEN_VIEWED_EVENT","enabled","currentKey","currentLocation","pendingLocation","reporter","locationKey","location","path","screen","screenViewedAttributes","screen_path","screen_name","setScreenChangeReporter","next","report","getCurrentScreenLocation","enableScreenTracking","disableScreenTracking","handleScreenChange","options","force","reportCurrentScreen","resetScreenTrackerForTests"],"sourceRoot":"../../src","sources":["screenTracker.ts"],"mappings":";;AAEA;AACA,OAAO,MAAMA,mBAAmB,GAAG,eAAe;;AAElD;;AAQA,IAAIC,OAAO,GAAG,KAAK;AACnB,IAAIC,UAAyB,GAAG,IAAI;AACpC;AACA,IAAIC,eAA4C,GAAG,IAAI;AACvD;AACA,IAAIC,eAA4C,GAAG,IAAI;AACvD,IAAIC,QAAqC,GAAG,IAAI;AAEhD,SAASC,WAAWA,CAACC,QAA8B,EAAU;EAC3D,OAAO,MAAM,IAAIA,QAAQ,GAAG,QAAQA,QAAQ,CAACC,IAAI,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AACA;AACA;AACA,OAAO,SAASe,kBAAkBA,CAChCZ,QAA0C,EAC1Ca,OAAmC,EAC7B;EACN,IAAI,CAACb,QAAQ,EAAE;EACf,IAAI,MAAM,IAAIA,QAAQ,EAAE;IACtB,IAAI,CAACA,QAAQ,CAACC,IAAI,EAAE;EACtB,CAAC,MAAM,IAAI,CAACD,QAAQ,CAACE,MAAM,EAAE;IAC3B;EACF;EAEA,IAAI,CAACR,OAAO,EAAE;IACZG,eAAe,GAAGG,QAAQ;IAC1B;EACF;EAEA,IAAI,CAACa,OAAO,EAAEC,KAAK,IAAIf,WAAW,CAACC,QAAQ,CAAC,KAAKL,UAAU,EAAE;EAC7DE,eAAe,GAAG,IAAI;EACtBW,MAAM,CAACR,QAAQ,CAAC;AAClB;;AAEA;AACA,OAAO,SAASe,mBAAmBA,CAAA,EAAS;EAC1C,MAAMf,QAAQ,GAAGS,wBAAwB,CAAC,CAAC;EAC3C,IAAI,CAACT,QAAQ,EAAE;EACfY,kBAAkB,CAACZ,QAAQ,EAAE;IAAEc,KAAK,EAAE;EAAK,CAAC,CAAC;AAC/C;;AAEA;AACA,OAAO,SAASE,0BAA0BA,CAAA,EAAS;EACjDtB,OAAO,GAAG,KAAK;EACfE,eAAe,GAAG,IAAI;EACtBD,UAAU,GAAG,IAAI;EACjBE,eAAe,GAAG,IAAI;AACxB","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Animated } from 'react-native';
5
+ import { useCardOpacity } from "./cardTransition.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ /**
8
+ * Card chrome root that fades itself through step transitions.
9
+ *
10
+ * This has to wrap the card view itself, not sit higher up in a surface: the
11
+ * fade starts from this component's mount, and a tooltip's surface renders long
12
+ * before its card does.
13
+ */
14
+ export function CardFade({
15
+ style,
16
+ ...rest
17
+ }) {
18
+ const opacity = useCardOpacity();
19
+ return /*#__PURE__*/_jsx(Animated.View, {
20
+ ...rest,
21
+ style: opacity ? [style, {
22
+ opacity
23
+ }] : style
24
+ });
25
+ }
26
+ //# sourceMappingURL=CardFade.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Animated","useCardOpacity","jsx","_jsx","CardFade","style","rest","opacity","View"],"sourceRoot":"../../../src","sources":["surfaces/CardFade.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,cAAc,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAAC;EAAEC,KAAK;EAAE,GAAGC;AAAoB,CAAC,EAAsB;EAC9E,MAAMC,OAAO,GAAGN,cAAc,CAAC,CAAC;EAChC,oBAAOE,IAAA,CAACH,QAAQ,CAACQ,IAAI;IAAA,GAAKF,IAAI;IAAED,KAAK,EAAEE,OAAO,GAAG,CAACF,KAAK,EAAE;MAAEE;IAAQ,CAAC,CAAC,GAAGF;EAAM,CAAE,CAAC;AACnF","ignoreList":[]}
@@ -3,10 +3,14 @@
3
3
  import * as React from 'react';
4
4
  import { Pressable, StyleSheet, Text } from 'react-native';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
- /** Web close control: 24×24 hit target, 8px from the top-trailing corner. Pass muted color from {@link resolveCloseButtonColor}. */
6
+ export const CLOSE_BUTTON_SIZE = 24;
7
+ export const CLOSE_BUTTON_INSET = 8;
8
+ /** Web close control: 24×24 hit target. Pass muted color from {@link resolveCloseButtonColor}. */
7
9
  export function CloseButton({
8
10
  onPress,
9
- color
11
+ color,
12
+ top = CLOSE_BUTTON_INSET,
13
+ right = CLOSE_BUTTON_INSET
10
14
  }) {
11
15
  return /*#__PURE__*/_jsx(Pressable, {
12
16
  testID: "userflow-modal-close",
@@ -16,6 +20,8 @@ export function CloseButton({
16
20
  style: ({
17
21
  pressed
18
22
  }) => [styles.button, {
23
+ top,
24
+ right,
19
25
  opacity: pressed ? 0.6 : 1
20
26
  }],
21
27
  hitSlop: 8,
@@ -30,11 +36,9 @@ export function CloseButton({
30
36
  const styles = StyleSheet.create({
31
37
  button: {
32
38
  position: 'absolute',
33
- top: 8,
34
- right: 8,
35
39
  zIndex: 2,
36
- width: 24,
37
- height: 24,
40
+ width: CLOSE_BUTTON_SIZE,
41
+ height: CLOSE_BUTTON_SIZE,
38
42
  alignItems: 'center',
39
43
  justifyContent: 'center'
40
44
  },
@@ -1 +1 @@
1
- {"version":3,"names":["React","Pressable","StyleSheet","Text","jsx","_jsx","CloseButton","onPress","color","testID","accessibilityRole","accessibilityLabel","style","pressed","styles","button","opacity","hitSlop","children","icon","create","position","top","right","zIndex","width","height","alignItems","justifyContent","fontSize","fontWeight","lineHeight"],"sourceRoot":"../../../src","sources":["surfaces/CloseButton.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO3D;AACA,OAAO,SAASC,WAAWA,CAAC;EAAEC,OAAO;EAAEC;AAAwB,CAAC,EAAsB;EACpF,oBACEH,IAAA,CAACJ,SAAS;IACRQ,MAAM,EAAC,sBAAsB;IAC7BC,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAC,OAAO;IAC1BJ,OAAO,EAAEA,OAAQ;IACjBK,KAAK,EAAEA,CAAC;MAAEC;IAAQ,CAAC,KAAK,CAACC,MAAM,CAACC,MAAM,EAAE;MAAEC,OAAO,EAAEH,OAAO,GAAG,GAAG,GAAG;IAAE,CAAC,CAAE;IACxEI,OAAO,EAAE,CAAE;IAAAC,QAAA,eAEXb,IAAA,CAACF,IAAI;MAACS,KAAK,EAAE,CAACE,MAAM,CAACK,IAAI,EAAE;QAAEX;MAAM,CAAC,CAAE;MAAAU,QAAA,EAAC;IAAC,CAAM;EAAC,CACtC,CAAC;AAEhB;AAEA,MAAMJ,MAAM,GAAGZ,UAAU,CAACkB,MAAM,CAAC;EAC/BL,MAAM,EAAE;IACNM,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDT,IAAI,EAAE;IACJU,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Pressable","StyleSheet","Text","jsx","_jsx","CLOSE_BUTTON_SIZE","CLOSE_BUTTON_INSET","CloseButton","onPress","color","top","right","testID","accessibilityRole","accessibilityLabel","style","pressed","styles","button","opacity","hitSlop","children","icon","create","position","zIndex","width","height","alignItems","justifyContent","fontSize","fontWeight","lineHeight"],"sourceRoot":"../../../src","sources":["surfaces/CloseButton.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3D,OAAO,MAAMC,iBAAiB,GAAG,EAAE;AACnC,OAAO,MAAMC,kBAAkB,GAAG,CAAC;AAWnC;AACA,OAAO,SAASC,WAAWA,CAAC;EAC1BC,OAAO;EACPC,KAAK;EACLC,GAAG,GAAGJ,kBAAkB;EACxBK,KAAK,GAAGL;AACQ,CAAC,EAAsB;EACvC,oBACEF,IAAA,CAACJ,SAAS;IACRY,MAAM,EAAC,sBAAsB;IAC7BC,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAC,OAAO;IAC1BN,OAAO,EAAEA,OAAQ;IACjBO,KAAK,EAAEA,CAAC;MAAEC;IAAQ,CAAC,KAAK,CAACC,MAAM,CAACC,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