@userflow-tech/react-native 0.1.0 → 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 (850) hide show
  1. package/README.md +114 -68
  2. package/app.plugin.js +13 -0
  3. package/babel-plugin/index.d.ts +43 -0
  4. package/babel-plugin/index.d.ts.map +1 -0
  5. package/babel-plugin/index.js +862 -0
  6. package/babel-plugin/index.js.map +1 -0
  7. package/babel-plugin.js +13 -0
  8. package/docs/anchoring.md +141 -13
  9. package/docs/deep-linking.md +20 -17
  10. package/docs/theme-mapping.md +44 -15
  11. package/docs/troubleshooting.md +37 -30
  12. package/expo-plugin/withUserflow.d.ts +17 -0
  13. package/expo-plugin/withUserflow.d.ts.map +1 -0
  14. package/expo-plugin/withUserflow.js +99 -0
  15. package/expo-plugin/withUserflow.js.map +1 -0
  16. package/lib/commonjs/anchors/AutoAnchorRegistry.js +125 -3
  17. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
  18. package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
  19. package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
  20. package/lib/commonjs/anchors/autoAnchor.js +1 -1
  21. package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
  22. package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
  23. package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
  24. package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
  25. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
  26. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
  27. package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
  28. package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
  29. package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
  30. package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
  31. package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
  32. package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
  33. package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
  34. package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
  35. package/lib/commonjs/anchors/hintsCodec.js +1 -1
  36. package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
  37. package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
  38. package/lib/commonjs/anchors/resolveAutoAnchorHost.js +171 -0
  39. package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
  40. package/lib/commonjs/anchors/semanticMatcher.js +285 -0
  41. package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
  42. package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -0
  43. package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
  44. package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
  45. package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
  46. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
  47. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
  48. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +64 -0
  49. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  50. package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -0
  51. package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
  52. package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
  53. package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
  54. package/lib/commonjs/authoring/chrome/ChromeIcon.js +39 -0
  55. package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
  56. package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
  57. package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
  58. package/lib/commonjs/authoring/chrome/ChromeTopBar.js +110 -0
  59. package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
  60. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
  61. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
  62. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -0
  63. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
  64. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  65. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  66. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  67. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  68. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  69. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  70. package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
  71. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  72. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  73. package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
  74. package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
  75. package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
  76. package/lib/commonjs/authoring/chrome/tokens.js +150 -0
  77. package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
  78. package/lib/commonjs/authoring/doubleTap.js +23 -0
  79. package/lib/commonjs/authoring/doubleTap.js.map +1 -0
  80. package/lib/commonjs/authoring/elementPickerController.js +102 -0
  81. package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
  82. package/lib/commonjs/authoring/fingerprintFromInstance.js +195 -0
  83. package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
  84. package/lib/commonjs/authoring/hitTest.js +106 -0
  85. package/lib/commonjs/authoring/hitTest.js.map +1 -0
  86. package/lib/commonjs/content/RichContentRenderer.js +12 -2
  87. package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
  88. package/lib/commonjs/content/StepButton.js +19 -4
  89. package/lib/commonjs/content/StepButton.js.map +1 -1
  90. package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
  91. package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
  92. package/lib/commonjs/content/themeColor.js +11 -0
  93. package/lib/commonjs/content/themeColor.js.map +1 -1
  94. package/lib/commonjs/deviceContext.js +158 -0
  95. package/lib/commonjs/deviceContext.js.map +1 -0
  96. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
  97. package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
  98. package/lib/commonjs/hostAppVersion.js +242 -0
  99. package/lib/commonjs/hostAppVersion.js.map +1 -0
  100. package/lib/commonjs/index.js +118 -5
  101. package/lib/commonjs/index.js.map +1 -1
  102. package/lib/commonjs/lifecycle.js +2 -0
  103. package/lib/commonjs/lifecycle.js.map +1 -1
  104. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +17 -8
  105. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
  106. package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
  107. package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
  108. package/lib/commonjs/pairing/PairingController.js +29 -2
  109. package/lib/commonjs/pairing/PairingController.js.map +1 -1
  110. package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
  111. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
  112. package/lib/commonjs/pairing/diagnostics.js +11 -2
  113. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  114. package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
  115. package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
  116. package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
  117. package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
  118. package/lib/commonjs/pairing/tokenStorage.js +25 -2
  119. package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
  120. package/lib/commonjs/pairing/usePairingState.js +3 -1
  121. package/lib/commonjs/pairing/usePairingState.js.map +1 -1
  122. package/lib/commonjs/runtime/FlowRenderer.js +45 -21
  123. package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
  124. package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
  125. package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
  126. package/lib/commonjs/runtime/TargetPressBridge.js +13 -44
  127. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
  128. package/lib/commonjs/runtime/UserflowProvider.js +74 -20
  129. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
  130. package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
  131. package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
  132. package/lib/commonjs/runtime/flowEngine.js +3 -1
  133. package/lib/commonjs/runtime/flowEngine.js.map +1 -1
  134. package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
  135. package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
  136. package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
  137. package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
  138. package/lib/commonjs/screenTracker.js +46 -4
  139. package/lib/commonjs/screenTracker.js.map +1 -1
  140. package/lib/commonjs/surfaces/CardFade.js +31 -0
  141. package/lib/commonjs/surfaces/CardFade.js.map +1 -0
  142. package/lib/commonjs/surfaces/CloseButton.js +11 -6
  143. package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
  144. package/lib/commonjs/surfaces/ModalSurface.js +50 -34
  145. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
  146. package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
  147. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
  148. package/lib/commonjs/surfaces/cardTransition.js +70 -0
  149. package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
  150. package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
  151. package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
  152. package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
  153. package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
  154. package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
  155. package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
  156. package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
  157. package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
  158. package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
  159. package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
  160. package/lib/commonjs/surfaces/themeChrome.js +4 -1
  161. package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
  162. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
  163. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
  164. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
  165. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
  166. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
  167. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  168. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
  169. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  170. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
  171. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  172. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
  173. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  174. package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
  175. package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
  176. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
  177. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  178. package/lib/commonjs/version.js +1 -1
  179. package/lib/module/anchors/AutoAnchorRegistry.js +126 -3
  180. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
  181. package/lib/module/anchors/anchorChangeTicker.js +10 -0
  182. package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
  183. package/lib/module/anchors/autoAnchor.js +1 -1
  184. package/lib/module/anchors/elementConditionEvaluator.js +25 -12
  185. package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
  186. package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
  187. package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
  188. package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
  189. package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
  190. package/lib/module/anchors/fiber/fiberInternals.js +139 -3
  191. package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
  192. package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
  193. package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
  194. package/lib/module/anchors/fiber/readHostContent.js +127 -0
  195. package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
  196. package/lib/module/anchors/fiberAnchorCache.js +40 -0
  197. package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
  198. package/lib/module/anchors/hintsCodec.js +1 -1
  199. package/lib/module/anchors/resolveAnchorHost.js +15 -21
  200. package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
  201. package/lib/module/anchors/resolveAutoAnchorHost.js +167 -0
  202. package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
  203. package/lib/module/anchors/semanticMatcher.js +280 -0
  204. package/lib/module/anchors/semanticMatcher.js.map +1 -0
  205. package/lib/module/authoring/ElementPickerOverlay.js +485 -0
  206. package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
  207. package/lib/module/authoring/capturePickerScreenshot.js +68 -0
  208. package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
  209. package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
  210. package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
  211. package/lib/module/authoring/chrome/ChromeBottomSheet.js +59 -0
  212. package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  213. package/lib/module/authoring/chrome/ChromeButton.js +89 -0
  214. package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
  215. package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
  216. package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
  217. package/lib/module/authoring/chrome/ChromeIcon.js +33 -0
  218. package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
  219. package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
  220. package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
  221. package/lib/module/authoring/chrome/ChromeTopBar.js +104 -0
  222. package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
  223. package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
  224. package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
  225. package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -0
  226. package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
  227. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  228. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  229. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  230. package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  231. package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  232. package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  233. package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
  234. package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  235. package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  236. package/lib/module/authoring/chrome/icons/xmark.png +0 -0
  237. package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
  238. package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
  239. package/lib/module/authoring/chrome/tokens.js +146 -0
  240. package/lib/module/authoring/chrome/tokens.js.map +1 -0
  241. package/lib/module/authoring/doubleTap.js +18 -0
  242. package/lib/module/authoring/doubleTap.js.map +1 -0
  243. package/lib/module/authoring/elementPickerController.js +97 -0
  244. package/lib/module/authoring/elementPickerController.js.map +1 -0
  245. package/lib/module/authoring/fingerprintFromInstance.js +187 -0
  246. package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
  247. package/lib/module/authoring/hitTest.js +100 -0
  248. package/lib/module/authoring/hitTest.js.map +1 -0
  249. package/lib/module/content/RichContentRenderer.js +12 -2
  250. package/lib/module/content/RichContentRenderer.js.map +1 -1
  251. package/lib/module/content/StepButton.js +19 -4
  252. package/lib/module/content/StepButton.js.map +1 -1
  253. package/lib/module/content/resolveStepButtonChrome.js +8 -6
  254. package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
  255. package/lib/module/content/themeColor.js +10 -0
  256. package/lib/module/content/themeColor.js.map +1 -1
  257. package/lib/module/deviceContext.js +142 -0
  258. package/lib/module/deviceContext.js.map +1 -0
  259. package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
  260. package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
  261. package/lib/module/hostAppVersion.js +225 -0
  262. package/lib/module/hostAppVersion.js.map +1 -0
  263. package/lib/module/index.js +119 -6
  264. package/lib/module/index.js.map +1 -1
  265. package/lib/module/lifecycle.js +2 -0
  266. package/lib/module/lifecycle.js.map +1 -1
  267. package/lib/module/navigation/WithUserflowReactNavigation.js +18 -9
  268. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
  269. package/lib/module/navigation/isOverlayPresentation.js +58 -0
  270. package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
  271. package/lib/module/pairing/PairingController.js +30 -3
  272. package/lib/module/pairing/PairingController.js.map +1 -1
  273. package/lib/module/pairing/PreviewModeBanner.js +212 -85
  274. package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
  275. package/lib/module/pairing/diagnostics.js +10 -2
  276. package/lib/module/pairing/diagnostics.js.map +1 -1
  277. package/lib/module/pairing/elementPickerRelay.js +87 -0
  278. package/lib/module/pairing/elementPickerRelay.js.map +1 -0
  279. package/lib/module/pairing/resolvePreviewChrome.js +48 -0
  280. package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
  281. package/lib/module/pairing/tokenStorage.js +24 -2
  282. package/lib/module/pairing/tokenStorage.js.map +1 -1
  283. package/lib/module/pairing/usePairingState.js +3 -1
  284. package/lib/module/pairing/usePairingState.js.map +1 -1
  285. package/lib/module/runtime/FlowRenderer.js +45 -21
  286. package/lib/module/runtime/FlowRenderer.js.map +1 -1
  287. package/lib/module/runtime/FlowSurfaceFade.js +49 -26
  288. package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
  289. package/lib/module/runtime/TargetPressBridge.js +12 -43
  290. package/lib/module/runtime/TargetPressBridge.js.map +1 -1
  291. package/lib/module/runtime/UserflowProvider.js +74 -20
  292. package/lib/module/runtime/UserflowProvider.js.map +1 -1
  293. package/lib/module/runtime/changedTouchPoints.js +43 -0
  294. package/lib/module/runtime/changedTouchPoints.js.map +1 -0
  295. package/lib/module/runtime/flowEngine.js +3 -1
  296. package/lib/module/runtime/flowEngine.js.map +1 -1
  297. package/lib/module/runtime/flowSessionViewState.js +32 -7
  298. package/lib/module/runtime/flowSessionViewState.js.map +1 -1
  299. package/lib/module/runtime/useFlowSessionState.js +2 -1
  300. package/lib/module/runtime/useFlowSessionState.js.map +1 -1
  301. package/lib/module/screenTracker.js +42 -4
  302. package/lib/module/screenTracker.js.map +1 -1
  303. package/lib/module/surfaces/CardFade.js +26 -0
  304. package/lib/module/surfaces/CardFade.js.map +1 -0
  305. package/lib/module/surfaces/CloseButton.js +10 -6
  306. package/lib/module/surfaces/CloseButton.js.map +1 -1
  307. package/lib/module/surfaces/ModalSurface.js +52 -36
  308. package/lib/module/surfaces/ModalSurface.js.map +1 -1
  309. package/lib/module/surfaces/TooltipSurface.js +368 -90
  310. package/lib/module/surfaces/TooltipSurface.js.map +1 -1
  311. package/lib/module/surfaces/cardTransition.js +64 -0
  312. package/lib/module/surfaces/cardTransition.js.map +1 -0
  313. package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
  314. package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
  315. package/lib/module/surfaces/resolveModalLayout.js +7 -3
  316. package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
  317. package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
  318. package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
  319. package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
  320. package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
  321. package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
  322. package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
  323. package/lib/module/surfaces/themeChrome.js +3 -1
  324. package/lib/module/surfaces/themeChrome.js.map +1 -1
  325. package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
  326. package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
  327. package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
  328. package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
  329. package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
  330. package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  331. package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
  332. package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  333. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
  334. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  335. package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
  336. package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  337. package/lib/module/surfaces/tooltip/rect.js +11 -0
  338. package/lib/module/surfaces/tooltip/rect.js.map +1 -1
  339. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
  340. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  341. package/lib/module/version.js +1 -1
  342. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +27 -1
  343. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
  345. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  346. package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts +1 -1
  347. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
  348. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  350. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  351. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  352. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
  354. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  356. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
  358. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
  360. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts +1 -1
  362. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
  363. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  365. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +48 -0
  367. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -0
  369. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
  371. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  373. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  375. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
  377. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  379. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  381. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  382. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  383. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  385. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  387. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  388. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  389. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  390. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -0
  391. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
  392. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
  393. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
  394. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +59 -0
  395. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
  396. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
  397. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  398. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
  399. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
  400. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
  401. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
  402. package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
  403. package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  404. package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
  405. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
  406. package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
  407. package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
  408. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  409. package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
  410. package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
  411. package/lib/typescript/commonjs/src/index.d.ts +53 -2
  412. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  413. package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
  414. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
  415. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
  417. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +7 -0
  419. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
  420. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
  421. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  422. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
  423. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
  424. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
  425. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
  427. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  428. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +2 -0
  429. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
  430. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
  432. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
  433. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
  434. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  435. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
  436. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
  437. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
  438. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
  439. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
  440. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
  441. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
  442. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
  443. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
  445. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
  446. package/lib/typescript/commonjs/src/screenTracker.d.ts +21 -3
  447. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
  448. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
  449. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
  450. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
  451. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
  452. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +1 -1
  453. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
  454. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
  456. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
  458. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
  459. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  460. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  461. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
  462. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  464. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  466. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  467. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  468. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
  470. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
  471. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  472. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  473. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  474. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  475. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  476. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  477. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  478. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  479. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  480. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  481. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  482. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  483. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
  484. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
  485. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  486. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  487. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  488. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +27 -1
  489. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  490. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
  491. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  492. package/lib/typescript/module/src/anchors/autoAnchor.d.ts +1 -1
  493. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
  494. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  495. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  496. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  497. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  498. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  499. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
  500. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  501. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  502. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  503. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
  504. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  505. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
  506. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  507. package/lib/typescript/module/src/anchors/hintsCodec.d.ts +1 -1
  508. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
  509. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  510. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  511. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  512. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +48 -0
  513. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
  514. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -0
  515. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  516. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
  517. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  518. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  519. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  520. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  521. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  522. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
  523. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  524. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  525. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  526. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  527. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  528. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  529. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  530. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  531. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  532. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  533. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  534. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  535. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  536. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -0
  537. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
  538. package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
  539. package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
  540. package/lib/typescript/module/src/authoring/elementPickerController.d.ts +59 -0
  541. package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
  542. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
  543. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  544. package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
  545. package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
  546. package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
  547. package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
  548. package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
  549. package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  550. package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
  551. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
  552. package/lib/typescript/module/src/deviceContext.d.ts +66 -0
  553. package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
  554. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  555. package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
  556. package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
  557. package/lib/typescript/module/src/index.d.ts +53 -2
  558. package/lib/typescript/module/src/index.d.ts.map +1 -1
  559. package/lib/typescript/module/src/lifecycle.d.ts +6 -0
  560. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
  561. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  562. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
  563. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  564. package/lib/typescript/module/src/pairing/PairingController.d.ts +7 -0
  565. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
  566. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
  567. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  568. package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
  569. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
  570. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
  571. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
  572. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
  573. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  574. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +2 -0
  575. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
  576. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
  577. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
  578. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
  579. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
  580. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  581. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
  582. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
  583. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
  584. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
  585. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
  586. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
  587. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
  588. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
  589. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
  590. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
  591. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
  592. package/lib/typescript/module/src/screenTracker.d.ts +21 -3
  593. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
  594. package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
  595. package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
  596. package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
  597. package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
  598. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +1 -1
  599. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
  600. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
  601. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
  602. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
  603. package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
  604. package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
  605. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  606. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  607. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
  608. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  609. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  610. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  611. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  612. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  613. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  614. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  615. package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
  616. package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
  617. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  618. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  619. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  620. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  621. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  622. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  623. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  624. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  625. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  626. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  627. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  628. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  629. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
  630. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
  631. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  632. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  633. package/lib/typescript/module/src/version.d.ts +1 -1
  634. package/package.json +32 -18
  635. package/src/anchors/AutoAnchorRegistry.ts +140 -3
  636. package/src/anchors/anchorChangeTicker.ts +10 -0
  637. package/src/anchors/autoAnchor.ts +1 -1
  638. package/src/anchors/elementConditionEvaluator.ts +29 -16
  639. package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
  640. package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
  641. package/src/anchors/fiber/fiberInternals.ts +166 -3
  642. package/src/anchors/fiber/indexHostFibers.ts +136 -0
  643. package/src/anchors/fiber/readHostContent.ts +146 -0
  644. package/src/anchors/fiberAnchorCache.ts +45 -0
  645. package/src/anchors/hintsCodec.ts +1 -1
  646. package/src/anchors/resolveAnchorHost.ts +23 -23
  647. package/src/anchors/resolveAutoAnchorHost.ts +180 -0
  648. package/src/anchors/semanticMatcher.ts +361 -0
  649. package/src/authoring/ElementPickerOverlay.tsx +553 -0
  650. package/src/authoring/capturePickerScreenshot.ts +90 -0
  651. package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
  652. package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
  653. package/src/authoring/chrome/ChromeButton.tsx +103 -0
  654. package/src/authoring/chrome/ChromeDialog.tsx +121 -0
  655. package/src/authoring/chrome/ChromeIcon.tsx +40 -0
  656. package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
  657. package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
  658. package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
  659. package/src/authoring/chrome/doubleTapMonitor.ts +80 -0
  660. package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  661. package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  662. package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  663. package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  664. package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  665. package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  666. package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
  667. package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  668. package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  669. package/src/authoring/chrome/icons/xmark.png +0 -0
  670. package/src/authoring/chrome/icons/xmark@2x.png +0 -0
  671. package/src/authoring/chrome/icons/xmark@3x.png +0 -0
  672. package/src/authoring/chrome/tokens.ts +106 -0
  673. package/src/authoring/doubleTap.ts +27 -0
  674. package/src/authoring/elementPickerController.ts +135 -0
  675. package/src/authoring/fingerprintFromInstance.ts +152 -0
  676. package/src/authoring/hitTest.ts +133 -0
  677. package/src/content/RichContentRenderer.tsx +22 -1
  678. package/src/content/StepButton.tsx +17 -2
  679. package/src/content/resolveStepButtonChrome.ts +12 -6
  680. package/src/content/themeColor.ts +10 -0
  681. package/src/deviceContext.ts +168 -0
  682. package/src/expo-router/useUserflowExpoRouter.ts +47 -4
  683. package/src/hostAppVersion.ts +258 -0
  684. package/src/index.ts +148 -4
  685. package/src/lifecycle.ts +8 -0
  686. package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
  687. package/src/navigation/isOverlayPresentation.ts +76 -0
  688. package/src/pairing/PairingController.ts +32 -3
  689. package/src/pairing/PreviewModeBanner.tsx +250 -94
  690. package/src/pairing/diagnostics.ts +10 -2
  691. package/src/pairing/elementPickerRelay.ts +100 -0
  692. package/src/pairing/resolvePreviewChrome.ts +57 -0
  693. package/src/pairing/tokenStorage.ts +31 -2
  694. package/src/pairing/usePairingState.ts +2 -0
  695. package/src/runtime/FlowRenderer.tsx +55 -27
  696. package/src/runtime/FlowSurfaceFade.tsx +51 -30
  697. package/src/runtime/TargetPressBridge.tsx +14 -32
  698. package/src/runtime/UserflowProvider.tsx +76 -13
  699. package/src/runtime/changedTouchPoints.ts +34 -0
  700. package/src/runtime/flowEngine.ts +2 -0
  701. package/src/runtime/flowSessionViewState.ts +42 -4
  702. package/src/runtime/useFlowSessionState.ts +2 -0
  703. package/src/screenTracker.ts +46 -4
  704. package/src/surfaces/CardFade.tsx +18 -0
  705. package/src/surfaces/CloseButton.tsx +17 -7
  706. package/src/surfaces/MadeWithUserflow.tsx +1 -1
  707. package/src/surfaces/ModalSurface.tsx +48 -35
  708. package/src/surfaces/TooltipSurface.tsx +406 -86
  709. package/src/surfaces/cardTransition.ts +67 -0
  710. package/src/surfaces/resolveHighlightChrome.ts +139 -0
  711. package/src/surfaces/resolveModalLayout.ts +16 -8
  712. package/src/surfaces/resolveTooltipLayout.ts +1 -14
  713. package/src/surfaces/surfaceInteractionConfig.ts +25 -0
  714. package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
  715. package/src/surfaces/themeChrome.ts +5 -3
  716. package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
  717. package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
  718. package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
  719. package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
  720. package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
  721. package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
  722. package/src/surfaces/tooltip/rect.ts +11 -0
  723. package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
  724. package/src/version.ts +1 -1
  725. package/vendor/core/LICENSE +76 -0
  726. package/vendor/core/README.md +9 -0
  727. package/vendor/core/dist/attributes.d.ts +15 -0
  728. package/vendor/core/dist/attributes.d.ts.map +1 -0
  729. package/vendor/core/dist/attributes.js +55 -0
  730. package/vendor/core/dist/attributes.js.map +1 -0
  731. package/vendor/core/dist/constants.d.ts +21 -0
  732. package/vendor/core/dist/constants.d.ts.map +1 -0
  733. package/vendor/core/dist/constants.js +21 -0
  734. package/vendor/core/dist/constants.js.map +1 -0
  735. package/vendor/core/dist/engine/ClientConditionEngine.d.ts +68 -0
  736. package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -0
  737. package/vendor/core/dist/engine/ClientConditionEngine.js +197 -0
  738. package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -0
  739. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +160 -0
  740. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -0
  741. package/vendor/core/dist/engine/FlowSessionEngine.js +571 -0
  742. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -0
  743. package/vendor/core/dist/engine/PairingEngine.d.ts +135 -0
  744. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -0
  745. package/vendor/core/dist/engine/PairingEngine.js +396 -0
  746. package/vendor/core/dist/engine/PairingEngine.js.map +1 -0
  747. package/vendor/core/dist/engine/UserflowCore.d.ts +145 -0
  748. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -0
  749. package/vendor/core/dist/engine/UserflowCore.js +329 -0
  750. package/vendor/core/dist/engine/UserflowCore.js.map +1 -0
  751. package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
  752. package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
  753. package/vendor/core/dist/engine/conditionOperators.js +168 -0
  754. package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
  755. package/vendor/core/dist/engine/handleActions.d.ts +42 -0
  756. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -0
  757. package/vendor/core/dist/engine/handleActions.js +198 -0
  758. package/vendor/core/dist/engine/handleActions.js.map +1 -0
  759. package/vendor/core/dist/engine/interpolateSessionData.d.ts +7 -0
  760. package/vendor/core/dist/engine/interpolateSessionData.d.ts.map +1 -0
  761. package/vendor/core/dist/engine/interpolateSessionData.js +29 -0
  762. package/vendor/core/dist/engine/interpolateSessionData.js.map +1 -0
  763. package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
  764. package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
  765. package/vendor/core/dist/engine/simpleObservable.js +29 -0
  766. package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
  767. package/vendor/core/dist/engine/trackCondition.d.ts +25 -0
  768. package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
  769. package/vendor/core/dist/engine/trackCondition.js +177 -0
  770. package/vendor/core/dist/engine/trackCondition.js.map +1 -0
  771. package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
  772. package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
  773. package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
  774. package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
  775. package/vendor/core/dist/errors.d.ts +9 -0
  776. package/vendor/core/dist/errors.d.ts.map +1 -0
  777. package/vendor/core/dist/errors.js +15 -0
  778. package/vendor/core/dist/errors.js.map +1 -0
  779. package/vendor/core/dist/eventAttributes.d.ts +7 -0
  780. package/vendor/core/dist/eventAttributes.d.ts.map +1 -0
  781. package/vendor/core/dist/eventAttributes.js +31 -0
  782. package/vendor/core/dist/eventAttributes.js.map +1 -0
  783. package/vendor/core/dist/index.d.ts +31 -0
  784. package/vendor/core/dist/index.d.ts.map +1 -0
  785. package/vendor/core/dist/index.js +22 -0
  786. package/vendor/core/dist/index.js.map +1 -0
  787. package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
  788. package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
  789. package/vendor/core/dist/normalizeAttributes.js +127 -0
  790. package/vendor/core/dist/normalizeAttributes.js.map +1 -0
  791. package/vendor/core/dist/transport/backoff.d.ts +11 -0
  792. package/vendor/core/dist/transport/backoff.d.ts.map +1 -0
  793. package/vendor/core/dist/transport/backoff.js +17 -0
  794. package/vendor/core/dist/transport/backoff.js.map +1 -0
  795. package/vendor/core/dist/transport/pairing.d.ts +121 -0
  796. package/vendor/core/dist/transport/pairing.d.ts.map +1 -0
  797. package/vendor/core/dist/transport/pairing.js +551 -0
  798. package/vendor/core/dist/transport/pairing.js.map +1 -0
  799. package/vendor/core/dist/transport/phoenix.d.ts +228 -0
  800. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -0
  801. package/vendor/core/dist/transport/phoenix.js +811 -0
  802. package/vendor/core/dist/transport/phoenix.js.map +1 -0
  803. package/vendor/core/dist/transport/rateLimiter.d.ts +17 -0
  804. package/vendor/core/dist/transport/rateLimiter.d.ts.map +1 -0
  805. package/vendor/core/dist/transport/rateLimiter.js +30 -0
  806. package/vendor/core/dist/transport/rateLimiter.js.map +1 -0
  807. package/vendor/core/dist/transport/scheduler.d.ts +12 -0
  808. package/vendor/core/dist/transport/scheduler.d.ts.map +1 -0
  809. package/vendor/core/dist/transport/scheduler.js +11 -0
  810. package/vendor/core/dist/transport/scheduler.js.map +1 -0
  811. package/vendor/core/dist/types.d.ts +60 -0
  812. package/vendor/core/dist/types.d.ts.map +1 -0
  813. package/vendor/core/dist/types.js +2 -0
  814. package/vendor/core/dist/types.js.map +1 -0
  815. package/vendor/core/dist/version.d.ts +3 -0
  816. package/vendor/core/dist/version.d.ts.map +1 -0
  817. package/vendor/core/dist/version.js +3 -0
  818. package/vendor/core/dist/version.js.map +1 -0
  819. package/vendor/core/package.json +20 -0
  820. package/vendor/protocol/LICENSE +76 -0
  821. package/vendor/protocol/README.md +8 -0
  822. package/vendor/protocol/dist/attributes.d.ts +43 -0
  823. package/vendor/protocol/dist/attributes.d.ts.map +1 -0
  824. package/vendor/protocol/dist/attributes.js +15 -0
  825. package/vendor/protocol/dist/attributes.js.map +1 -0
  826. package/vendor/protocol/dist/autoData.d.ts +232 -0
  827. package/vendor/protocol/dist/autoData.d.ts.map +1 -0
  828. package/vendor/protocol/dist/autoData.js +78 -0
  829. package/vendor/protocol/dist/autoData.js.map +1 -0
  830. package/vendor/protocol/dist/events.d.ts +24 -0
  831. package/vendor/protocol/dist/events.d.ts.map +1 -0
  832. package/vendor/protocol/dist/events.js +8 -0
  833. package/vendor/protocol/dist/events.js.map +1 -0
  834. package/vendor/protocol/dist/flows.d.ts +360 -0
  835. package/vendor/protocol/dist/flows.d.ts.map +1 -0
  836. package/vendor/protocol/dist/flows.js +201 -0
  837. package/vendor/protocol/dist/flows.js.map +1 -0
  838. package/vendor/protocol/dist/index.d.ts +25 -0
  839. package/vendor/protocol/dist/index.d.ts.map +1 -0
  840. package/vendor/protocol/dist/index.js +17 -0
  841. package/vendor/protocol/dist/index.js.map +1 -0
  842. package/vendor/protocol/dist/messages.d.ts +187 -0
  843. package/vendor/protocol/dist/messages.d.ts.map +1 -0
  844. package/vendor/protocol/dist/messages.js +61 -0
  845. package/vendor/protocol/dist/messages.js.map +1 -0
  846. package/vendor/protocol/dist/pairing.d.ts +82 -0
  847. package/vendor/protocol/dist/pairing.d.ts.map +1 -0
  848. package/vendor/protocol/dist/pairing.js +146 -0
  849. package/vendor/protocol/dist/pairing.js.map +1 -0
  850. package/vendor/protocol/package.json +17 -0
@@ -6,64 +6,221 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.PreviewModeBanner = PreviewModeBanner;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
+ var _ChromeBarTransition = require("../authoring/chrome/ChromeBarTransition.js");
10
+ var _ChromeButton = require("../authoring/chrome/ChromeButton.js");
11
+ var _ChromeDialog = require("../authoring/chrome/ChromeDialog.js");
12
+ var _ChromeTooltip = require("../authoring/chrome/ChromeTooltip.js");
13
+ var _ChromeTopBar = require("../authoring/chrome/ChromeTopBar.js");
14
+ var _doubleTapMonitor = require("../authoring/chrome/doubleTapMonitor.js");
15
+ var _surfaceLayoutInsets = require("../surfaces/surfaceLayoutInsets.js");
16
+ var _resolvePreviewChrome = require("./resolvePreviewChrome.js");
9
17
  var _jsxRuntime = require("react/jsx-runtime");
10
18
  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); }
19
+ const ONBOARDING_COPY = 'Double tap anywhere to access the menu';
11
20
  /**
12
21
  * Overlay chrome for Builder pairing preview mode.
13
22
  */
14
23
  function PreviewModeBanner({
15
24
  state,
16
- onExit
25
+ onExit,
26
+ onRestart,
27
+ onConfirmingChange,
28
+ suppressed = false
17
29
  }) {
18
- if (!state.previewActive && state.status === 'idle') return null;
19
- if (!state.previewActive && state.status !== 'token_expired' && state.status !== 'device_already_paired' && state.status !== 'error') {
20
- return null;
30
+ const setBannerHeight = (0, _surfaceLayoutInsets.useReportPreviewBannerHeight)();
31
+ const chrome = (0, _resolvePreviewChrome.resolvePreviewChrome)(state);
32
+ const [chromeShown, setChromeShown] = React.useState(true);
33
+ const [showOnboarding, setShowOnboarding] = React.useState(false);
34
+ const [barHeight, setBarHeight] = React.useState(0);
35
+ const sessionArmedRef = React.useRef(false);
36
+ const isError = chrome.visible && chrome.tone === 'error';
37
+ const visible = chrome.visible && !suppressed && (chromeShown || isError);
38
+ const [confirming, setConfirming] = React.useState(null);
39
+ const showRestart = Boolean(state.canRestartPreview) && !isError;
40
+ const showDialog = confirming != null && visible && !isError;
41
+ // Keep the bar mounted through its slide-out (double-tap hide, preview end,
42
+ // or picker suppression), rendering the last known chrome while it leaves.
43
+ const barMounted = (0, _ChromeBarTransition.useChromeBarMounted)(visible);
44
+ const lastVisibleChromeRef = React.useRef(null);
45
+ if (chrome.visible) {
46
+ lastVisibleChromeRef.current = chrome;
21
47
  }
22
- const needsRescan = state.needsRescan;
23
- // No pairing id means the session never started (e.g. init failed), so
24
- // "Pairing ended" would misdescribe it.
25
- const neverPaired = state.status === 'error' && !state.previewActive && state.pairingId === null;
26
- const title = neverPaired ? 'Preview unavailable' : needsRescan ? 'Pairing ended' : 'Preview mode';
27
- const detail = state.lastError ?? (state.status === 'reconnecting' ? 'Reconnecting…' : state.status === 'connecting' ? 'Connecting to Builder…' :
28
- // Mirrors the Builder's own wording. Without this the banner reads
29
- // "Paired" while the flow is absent, which looks like a broken preview
30
- // rather than a condition that has not matched yet.
31
- state.awaitingStartCondition ? 'Waiting for auto-start condition to trigger…' : 'Paired with Userflow Builder');
32
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
33
- style: styles.wrap,
48
+ const barChrome = chrome.visible ? chrome : lastVisibleChromeRef.current;
49
+ React.useEffect(() => {
50
+ if (!chrome.visible) {
51
+ sessionArmedRef.current = false;
52
+ setChromeShown(true);
53
+ setShowOnboarding(false);
54
+ setBarHeight(0);
55
+ return;
56
+ }
57
+ if (isError) {
58
+ setChromeShown(true);
59
+ setShowOnboarding(false);
60
+ return;
61
+ }
62
+ if (!sessionArmedRef.current) {
63
+ sessionArmedRef.current = true;
64
+ setShowOnboarding(true);
65
+ }
66
+ }, [chrome.visible, isError]);
67
+ React.useEffect(() => {
68
+ if (!visible || isError) {
69
+ setConfirming(null);
70
+ return;
71
+ }
72
+ if (confirming === 'restart' && !state.canRestartPreview) {
73
+ setConfirming(null);
74
+ }
75
+ }, [confirming, isError, state.canRestartPreview, visible]);
76
+ React.useEffect(() => {
77
+ if (!chrome.visible) {
78
+ setBannerHeight(0);
79
+ return;
80
+ }
81
+ if (suppressed) return;
82
+ if (!chromeShown && !isError) {
83
+ setBannerHeight(0);
84
+ return;
85
+ }
86
+ if (barHeight > 0) {
87
+ setBannerHeight(barHeight);
88
+ }
89
+ }, [barHeight, chrome.visible, chromeShown, isError, setBannerHeight, suppressed]);
90
+ React.useEffect(() => {
91
+ if (!chrome.visible || suppressed || isError) {
92
+ _doubleTapMonitor.doubleTapMonitor.set(null);
93
+ return;
94
+ }
95
+ _doubleTapMonitor.doubleTapMonitor.set({
96
+ onDoubleTap: () => {
97
+ setShowOnboarding(false);
98
+ setChromeShown(shown => !shown);
99
+ }
100
+ });
101
+ return () => {
102
+ _doubleTapMonitor.doubleTapMonitor.set(null);
103
+ };
104
+ }, [chrome.visible, isError, suppressed]);
105
+ React.useEffect(() => {
106
+ onConfirmingChange?.(showDialog);
107
+ }, [showDialog, onConfirmingChange]);
108
+ React.useEffect(() => {
109
+ return () => {
110
+ onConfirmingChange?.(false);
111
+ };
112
+ }, [onConfirmingChange]);
113
+ const onMeasureHeight = React.useCallback(height => {
114
+ setBarHeight(Math.max(0, height));
115
+ }, []);
116
+ const onLeftPress = React.useCallback(() => {
117
+ if (isError) {
118
+ onExit();
119
+ return;
120
+ }
121
+ setConfirming('exit');
122
+ }, [isError, onExit]);
123
+ const onRightPress = React.useCallback(() => {
124
+ if (isError || !state.canRestartPreview) return;
125
+ setConfirming('restart');
126
+ }, [isError, state.canRestartPreview]);
127
+ const closeDialog = React.useCallback(() => {
128
+ setConfirming(null);
129
+ }, []);
130
+ const confirmExit = React.useCallback(() => {
131
+ setConfirming(null);
132
+ onExit();
133
+ }, [onExit]);
134
+ const confirmRestart = React.useCallback(() => {
135
+ setConfirming(null);
136
+ onRestart?.();
137
+ }, [onRestart]);
138
+ if (!barMounted && !showDialog) return null;
139
+ const tooltipVisible = visible && showOnboarding && !isError && !showDialog;
140
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
141
+ accessibilityViewIsModal: showDialog,
34
142
  pointerEvents: "box-none",
35
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
36
- style: [styles.banner, needsRescan ? styles.bannerWarn : styles.bannerActive],
37
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
38
- style: styles.textCol,
39
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
40
- style: styles.title,
41
- children: title
42
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
43
- style: styles.detail,
44
- numberOfLines: 2,
45
- children: needsRescan ? `${detail} Re-scan the QR code to continue.` : detail
46
- })]
47
- }), !needsRescan ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
48
- accessibilityRole: "button",
143
+ style: [styles.wrap, showDialog ? styles.wrapConfirming : null],
144
+ testID: "userflow-preview-banner",
145
+ children: [showDialog && confirming === 'exit' ?
146
+ /*#__PURE__*/
147
+ // Dialog first so its scrim paints under the bar (Figma: Overlay then Button Sheet).
148
+ (0, _jsxRuntime.jsxs)(_ChromeDialog.ChromeDialog, {
149
+ body: "You will need to pair your device again in Userflow to preview this flow.",
150
+ onClose: closeDialog,
151
+ title: "Exit preview mode?",
152
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
153
+ accessibilityLabel: "Cancel",
154
+ flex: true,
155
+ label: "Cancel",
156
+ onPress: closeDialog,
157
+ testID: "userflow-preview-exit-cancel",
158
+ variant: "secondary"
159
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
49
160
  accessibilityLabel: "Exit preview",
50
- onPress: onExit,
51
- style: styles.button,
52
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
53
- style: styles.buttonLabel,
54
- children: "Exit preview"
55
- })
56
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
57
- accessibilityRole: "button",
58
- accessibilityLabel: "Dismiss pairing message",
59
- onPress: onExit,
60
- style: styles.button,
61
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
62
- style: styles.buttonLabel,
63
- children: "Dismiss"
64
- })
161
+ flex: true,
162
+ icon: "arrow-left-from-bracket",
163
+ label: "Exit",
164
+ onPress: confirmExit,
165
+ testID: "userflow-preview-exit-confirm"
65
166
  })]
66
- })
167
+ }) : null, showDialog && confirming === 'restart' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_ChromeDialog.ChromeDialog, {
168
+ body: "This will restart the flow from the first step.",
169
+ onClose: closeDialog,
170
+ title: "Restart flow?",
171
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
172
+ accessibilityLabel: "Cancel",
173
+ flex: true,
174
+ label: "Cancel",
175
+ onPress: closeDialog,
176
+ testID: "userflow-preview-restart-cancel",
177
+ variant: "secondary"
178
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
179
+ accessibilityLabel: "Restart flow",
180
+ flex: true,
181
+ icon: "arrow-rotate-left",
182
+ label: "Restart",
183
+ onPress: confirmRestart,
184
+ testID: "userflow-preview-restart-confirm"
185
+ })]
186
+ }) : null, barMounted && barChrome ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeBarTransition.ChromeBarTransition, {
187
+ edge: "top",
188
+ pointerEvents: "box-none",
189
+ visible: visible,
190
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeTopBar.ChromeTopBar, {
191
+ accessibilityElementsHidden: showDialog,
192
+ importantForAccessibility: showDialog ? 'no-hide-descendants' : undefined,
193
+ label: barChrome.label,
194
+ numberOfLines: barChrome.numberOfLines,
195
+ onMeasureHeight: onMeasureHeight,
196
+ tone: barChrome.tone,
197
+ left: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
198
+ accessibilityLabel: isError ? 'Dismiss pairing message' : 'Exit preview',
199
+ icon: "arrow-left-from-bracket",
200
+ onPress: onLeftPress,
201
+ testID: "userflow-preview-exit",
202
+ variant: "icon"
203
+ }),
204
+ right: showRestart ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeButton.ChromeButton, {
205
+ accessibilityLabel: "Restart flow",
206
+ icon: "arrow-rotate-left",
207
+ onPress: onRightPress,
208
+ testID: "userflow-preview-restart",
209
+ variant: "icon"
210
+ }) : undefined
211
+ })
212
+ }) : null, tooltipVisible ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
213
+ pointerEvents: "none",
214
+ style: [styles.tooltip, {
215
+ top: barHeight
216
+ }],
217
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeTooltip.ChromeTooltip, {
218
+ onDismiss: () => {
219
+ setShowOnboarding(false);
220
+ },
221
+ children: ONBOARDING_COPY
222
+ })
223
+ }) : null]
67
224
  });
68
225
  }
69
226
  const styles = _reactNative.StyleSheet.create({
@@ -72,47 +229,17 @@ const styles = _reactNative.StyleSheet.create({
72
229
  top: 0,
73
230
  left: 0,
74
231
  right: 0,
232
+ bottom: 0,
75
233
  zIndex: 1000
76
234
  },
77
- banner: {
78
- marginTop: 48,
79
- marginHorizontal: 12,
80
- borderRadius: 10,
81
- paddingHorizontal: 12,
82
- paddingVertical: 10,
83
- flexDirection: 'row',
84
- alignItems: 'center',
85
- gap: 10
86
- },
87
- bannerActive: {
88
- backgroundColor: 'rgba(17, 24, 39, 0.92)'
89
- },
90
- bannerWarn: {
91
- backgroundColor: 'rgba(127, 29, 29, 0.94)'
92
- },
93
- textCol: {
94
- flex: 1
95
- },
96
- title: {
97
- color: '#ffffff',
98
- fontSize: 13,
99
- fontWeight: '700'
235
+ wrapConfirming: {
236
+ zIndex: 1200
100
237
  },
101
- detail: {
102
- color: 'rgba(255,255,255,0.85)',
103
- fontSize: 12,
104
- marginTop: 2
105
- },
106
- button: {
107
- paddingHorizontal: 10,
108
- paddingVertical: 8,
109
- borderRadius: 8,
110
- backgroundColor: 'rgba(255,255,255,0.14)'
111
- },
112
- buttonLabel: {
113
- color: '#ffffff',
114
- fontSize: 12,
115
- fontWeight: '600'
238
+ tooltip: {
239
+ position: 'absolute',
240
+ left: 0,
241
+ right: 0,
242
+ alignItems: 'center'
116
243
  }
117
244
  });
118
245
  //# sourceMappingURL=PreviewModeBanner.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PreviewModeBanner","state","onExit","previewActive","status","needsRescan","neverPaired","pairingId","title","detail","lastError","awaitingStartCondition","jsx","View","style","styles","wrap","pointerEvents","children","jsxs","banner","bannerWarn","bannerActive","textCol","Text","numberOfLines","Pressable","accessibilityRole","accessibilityLabel","onPress","button","buttonLabel","StyleSheet","create","position","top","left","right","zIndex","marginTop","marginHorizontal","borderRadius","paddingHorizontal","paddingVertical","flexDirection","alignItems","gap","backgroundColor","flex","color","fontSize","fontWeight"],"sourceRoot":"../../../src","sources":["pairing/PreviewModeBanner.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAiE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,C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BC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_ChromeBarTransition","_ChromeButton","_ChromeDialog","_ChromeTooltip","_ChromeTopBar","_doubleTapMonitor","_surfaceLayoutInsets","_resolvePreviewChrome","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ONBOARDING_COPY","PreviewModeBanner","state","onExit","onRestart","onConfirmingChange","suppressed","setBannerHeight","useReportPreviewBannerHeight","chrome","resolvePreviewChrome","chromeShown","setChromeShown","useState","showOnboarding","setShowOnboarding","barHeight","setBarHeight","sessionArmedRef","useRef","isError","visible","tone","confirming","setConfirming","showRestart","Boolean","canRestartPreview","showDialog","barMounted","useChromeBarMounted","lastVisibleChromeRef","current","barChrome","useEffect","doubleTapMonitor","onDoubleTap","shown","onMeasureHeight","useCallback","height","Math","max","onLeftPress","onRightPress","closeDialog","confirmExit","confirmRestart","tooltipVisible","jsxs","View","accessibilityViewIsModal","pointerEvents","style","styles","wrap","wrapConfirming","testID","children","ChromeDialog","body","onClose","title","jsx","ChromeButton","accessibilityLabel","flex","label","onPress","variant","icon","ChromeBarTransition","edge","ChromeTopBar","accessibilityElementsHidden","importantForAccessibility","undefined","numberOfLines","left","right","tooltip","top","ChromeTooltip","onDismiss","StyleSheet","create","position","bottom","zIndex","alignItems"],"sourceRoot":"../../../src","sources":["pairing/PreviewModeBanner.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAA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A2G,aAAa;QACZC,SAAS,EAAEA,CAAA,KAAM;UACfpE,iBAAiB,CAAC,KAAK,CAAC;QAC1B,CAAE;QAAA2C,QAAA,EAED1D;MAAe,CACH;IAAC,CACZ,CAAC,GACL,IAAI;EAAA,CACJ,CAAC;AAEX;AAEA,MAAMsD,MAAM,GAAG8B,uBAAU,CAACC,MAAM,CAAC;EAC/B9B,IAAI,EAAE;IACJ+B,QAAQ,EAAE,UAAU;IACpBL,GAAG,EAAE,CAAC;IACNH,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRQ,MAAM,EAAE,CAAC;IACTC,MAAM,EAAE;EACV,CAAC;EACDhC,cAAc,EAAE;IACdgC,MAAM,EAAE;EACV,CAAC;EACDR,OAAO,EAAE;IACPM,QAAQ,EAAE,UAAU;IACpBR,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRU,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -11,6 +11,7 @@ exports.pairingLinkDeferredMessage = pairingLinkDeferredMessage;
11
11
  exports.pairingLinkInitFailedMessage = pairingLinkInitFailedMessage;
12
12
  exports.pairingListenerSetupFailedMessage = pairingListenerSetupFailedMessage;
13
13
  exports.pairingMissingTokenMessage = pairingMissingTokenMessage;
14
+ exports.pairingPreviewErrorMessage = pairingPreviewErrorMessage;
14
15
  exports.pairingSchemeShapeMessage = pairingSchemeShapeMessage;
15
16
  exports.pairingTokenStoreClearFailedMessage = pairingTokenStoreClearFailedMessage;
16
17
  /**
@@ -69,6 +70,14 @@ function pairingConnectFailedMessage(reason) {
69
70
  return `${PREFIX} Builder pairing could not connect: ${reason}. The app is unaffected — ` + `re-open the pairing link from the Builder to try again.`;
70
71
  }
71
72
 
73
+ /**
74
+ * Engine-reported pairing failure (`lastError`). The preview top bar no longer
75
+ * has a second line for this, so it must reach Metro under the `[Userflow]` prefix.
76
+ */
77
+ function pairingPreviewErrorMessage(reason) {
78
+ return `${PREFIX} Builder pairing: ${reason}`;
79
+ }
80
+
72
81
  /** A pairing link arrived without the `pairing_token` query parameter. */
73
82
  function pairingMissingTokenMessage(url) {
74
83
  return `${PREFIX} Ignoring Builder pairing link "${redactPairingToken(url)}": no ` + `"pairing_token" query parameter. Open the link straight from the Builder QR ` + `code rather than reconstructing it by hand.`;
@@ -79,7 +88,7 @@ function pairingMissingTokenMessage(url) {
79
88
  * host app's own scheme substituted for the environment's `scheme_id`.
80
89
  */
81
90
  function pairingForeignSchemeMessage(url) {
82
- return `${PREFIX} Ignoring "${redactPairingToken(url)}": this is a Builder pairing ` + `link, but it was opened with a scheme Userflow does not own. Use your ` + `environment's scheme_id ("userflow-" followed by digits) exactly as the ` + `pairing QR code provides it — do not substitute your app's own scheme. ` + `Register it via the @userflow-tech/expo plugin ({ schemeId: 'userflow-…' }) and ` + `rebuild the native app; a Metro reload is not enough.`;
91
+ return `${PREFIX} Ignoring "${redactPairingToken(url)}": this is a Builder pairing ` + `link, but it was opened with a scheme Userflow does not own. Use your ` + `environment's scheme_id ("userflow-" followed by digits) exactly as the ` + `pairing QR code provides it — do not substitute your app's own scheme. ` + `Register it via the @userflow-tech/react-native plugin ({ schemeId: 'userflow-…' }) and ` + `rebuild the native app; a Metro reload is not enough.`;
83
92
  }
84
93
 
85
94
  /** Message for a pairing attempt that could not be used. */
@@ -110,6 +119,6 @@ function pairingListenerSetupFailedMessage(reason) {
110
119
  * can match preview links but not pairing ones.
111
120
  */
112
121
  function pairingSchemeShapeMessage(url) {
113
- return `${PREFIX} Ignoring Builder pairing link "${redactPairingToken(url)}": the scheme must be your ` + `environment's scheme_id — "userflow-" followed by digits (e.g. userflow-257587). ` + `Check the schemeId passed to the @userflow-tech/expo plugin.`;
122
+ return `${PREFIX} Ignoring Builder pairing link "${redactPairingToken(url)}": the scheme must be your ` + `environment's scheme_id — "userflow-" followed by digits (e.g. userflow-257587). ` + `Check the schemeId passed to the @userflow-tech/react-native plugin.`;
114
123
  }
115
124
  //# sourceMappingURL=diagnostics.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PREFIX","redactPairingToken","url","replace","defaultPairingLogger","message","console","warn","exports","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","reason","pairingConnectFailedMessage","pairingMissingTokenMessage","pairingForeignSchemeMessage","pairingAttemptRejectionMessage","pairingSchemeShapeMessage","pairingTokenStoreClearFailedMessage","pairingListenerSetupFailedMessage"],"sourceRoot":"../../../src","sources":["pairing/diagnostics.ts"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,MAAM,GAAG,YAAY;;AAE3B;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAACC,GAAW,EAAU;EAC/C,OAAOA,GAAG,CAACC,OAAO,CAAC,wBAAwB,EAAE,cAAc,CAAC;AAC9D;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAmC,GAAIC,OAAO,IAAK;EAC9D;EACAC,OAAO,CAACC,IAAI,CAACF,OAAO,CAAC;AACvB,CAAC;;AAED;AAAAG,OAAA,CAAAJ,oBAAA,GAAAA,oBAAA;AACO,SAASK,0BAA0BA,CAAA,EAAW;EACnD,OACE,GAAGT,MAAM,kEAAkE,GAC3E,uDAAuD;AAE3D;;AAEA;AACA;AACA;AACA;AACO,SAASU,4BAA4BA,CAACC,MAAc,EAAU;EACnE,OACE,GAAGX,MAAM,wEAAwE,GACjF,iBAAiBW,MAAM,2DAA2D,GAClF,mEAAmE;AAEvE;;AAEA;AACA;AACA;AACA;AACO,SAASC,2BAA2BA,CAACD,MAAc,EAAU;EAClE,OACE,GAAGX,MAAM,uCAAuCW,MAAM,4BAA4B,GAClF,yDAAyD;AAE7D;;AAEA;AACO,SAASE,0BAA0BA,CAACX,GAAW,EAAU;EAC9D,OACE,GAAGF,MAAM,mCAAmCC,kBAAkB,CAACC,GAAG,CAAC,QAAQ,GAC3E,8EAA8E,GAC9E,6CAA6C;AAEjD;;AAEA;AACA;AACA;AACA;AACO,SAASY,2BAA2BA,CAACZ,GAAW,EAAU;EAC/D,OACE,GAAGF,MAAM,cAAcC,kBAAkB,CAACC,GAAG,CAAC,+BAA+B,GAC7E,wEAAwE,GACxE,0EAA0E,GAC1E,yEAAyE,GACzE,kFAAkF,GAClF,uDAAuD;AAE3D;;AAEA;AACO,SAASa,8BAA8BA,CAC5CJ,MAA+B,EAC/BT,GAAW,EACH;EACR,QAAQS,MAAM;IACZ,KAAK,gBAAgB;MACnB,OAAOG,2BAA2B,CAACZ,GAAG,CAAC;IACzC,KAAK,kBAAkB;MACrB,OAAOc,yBAAyB,CAACd,GAAG,CAAC;IACvC,KAAK,eAAe;MAClB,OAAOW,0BAA0B,CAACX,GAAG,CAAC;EAC1C;AACF;;AAEA;AACO,SAASe,mCAAmCA,CAACN,MAAc,EAAU;EAC1E,OACE,GAAGX,MAAM,8CAA8CW,MAAM,iBAAiB,GAC9E,6EAA6E;AAEjF;;AAEA;AACO,SAASO,iCAAiCA,CAACP,MAAc,EAAU;EACxE,OACE,GAAGX,MAAM,+CAA+CW,MAAM,iBAAiB,GAC/E,4EAA4E;AAEhF;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASK,yBAAyBA,CAACd,GAAW,EAAU;EAC7D,OACE,GAAGF,MAAM,mCAAmCC,kBAAkB,CAACC,GAAG,CAAC,6BAA6B,GAChG,mFAAmF,GACnF,8DAA8D;AAElE","ignoreList":[]}
1
+ {"version":3,"names":["PREFIX","redactPairingToken","url","replace","defaultPairingLogger","message","console","warn","exports","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","reason","pairingConnectFailedMessage","pairingPreviewErrorMessage","pairingMissingTokenMessage","pairingForeignSchemeMessage","pairingAttemptRejectionMessage","pairingSchemeShapeMessage","pairingTokenStoreClearFailedMessage","pairingListenerSetupFailedMessage"],"sourceRoot":"../../../src","sources":["pairing/diagnostics.ts"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAC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ASc,8BAA8BA,CAC5CL,MAA+B,EAC/BT,GAAW,EACH;EACR,QAAQS,MAAM;IACZ,KAAK,gBAAgB;MACnB,OAAOI,2BAA2B,CAACb,GAAG,CAAC;IACzC,KAAK,kBAAkB;MACrB,OAAOe,yBAAyB,CAACf,GAAG,CAAC;IACvC,KAAK,eAAe;MAClB,OAAOY,0BAA0B,CAACZ,GAAG,CAAC;EAC1C;AACF;;AAEA;AACO,SAASgB,mCAAmCA,CAACP,MAAc,EAAU;EAC1E,OACE,GAAGX,MAAM,8CAA8CW,MAAM,iBAAiB,GAC9E,6EAA6E;AAEjF;;AAEA;AACO,SAASQ,iCAAiCA,CAACR,MAAc,EAAU;EACxE,OACE,GAAGX,MAAM,+CAA+CW,MAAM,iBAAiB,GAC/E,4EAA4E;AAEhF;;AAEA;AACA;AACA;AACA;AACA;AACO,SAASM,yBAAyBA,CAACf,GAAW,EAAU;EAC7D,OACE,GAAGF,MAAM,mCAAmCC,kBAAkB,CAACC,GAAG,CAAC,6BAA6B,GAChG,mFAAmF,GACnF,sEAAsE;AAE1E","ignoreList":[]}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.bindElementPickerRelay = bindElementPickerRelay;
7
+ var _core = require("@userflow-tech/core");
8
+ var _elementPickerController = require("../authoring/elementPickerController.js");
9
+ function asRecord(payload) {
10
+ return payload && typeof payload === 'object' ? payload : {};
11
+ }
12
+ function idempotencyKeyOf(payload) {
13
+ const key = asRecord(payload)['idempotency_key'];
14
+ return typeof key === 'string' && key.length > 0 ? key : null;
15
+ }
16
+ function resultPayload(key, result) {
17
+ return {
18
+ idempotency_key: key,
19
+ ok: true,
20
+ autoData: result.autoData,
21
+ text: result.text ?? null,
22
+ ...(result.screenshot ? {
23
+ screenshot: {
24
+ dataUrl: result.screenshot.dataUrl,
25
+ width: result.screenshot.width,
26
+ height: result.screenshot.height,
27
+ targetX1: result.screenshot.targetX1,
28
+ targetY1: result.screenshot.targetY1,
29
+ targetX2: result.screenshot.targetX2,
30
+ targetY2: result.screenshot.targetY2
31
+ }
32
+ } : {})
33
+ };
34
+ }
35
+
36
+ /**
37
+ * Bridge pairing-channel `selectElement*` events onto {@link elementPickerController}.
38
+ * UI-free: the overlay (and QA harness) own the actual picking.
39
+ */
40
+ function bindElementPickerRelay(engine) {
41
+ if (typeof engine.onRelay !== 'function' || typeof engine.sendRelay !== 'function') {
42
+ return () => undefined;
43
+ }
44
+ let ignoreNextCancelSend = false;
45
+
46
+ /** Result delivery: ignore ack timeouts; surface connection failures. */
47
+ const sendResult = async (key, result) => {
48
+ try {
49
+ await engine.sendRelay('selectElementResult', resultPayload(key, result));
50
+ } catch (error) {
51
+ if (typeof _core.isPairingPushAckTimeout === 'function' && (0, _core.isPairingPushAckTimeout)(error)) {
52
+ return;
53
+ }
54
+ throw error;
55
+ }
56
+ };
57
+
58
+ /** Cancel is best-effort: ignore timeout and disconnect. */
59
+ const sendCancel = key => {
60
+ void engine.sendRelay('selectElementCancel', {
61
+ idempotency_key: key
62
+ }).catch(() => undefined);
63
+ };
64
+ const unsub = engine.onRelay((event, payload) => {
65
+ if (event === 'selectElement') {
66
+ const key = idempotencyKeyOf(payload);
67
+ if (!key) return;
68
+ _elementPickerController.elementPickerController.beginSelection({
69
+ requestId: key,
70
+ onResult: result => sendResult(key, result),
71
+ onCancel: () => {
72
+ if (ignoreNextCancelSend) return;
73
+ sendCancel(key);
74
+ }
75
+ });
76
+ return;
77
+ }
78
+ if (event === 'selectElementCancel') {
79
+ ignoreNextCancelSend = true;
80
+ _elementPickerController.elementPickerController.cancel();
81
+ ignoreNextCancelSend = false;
82
+ }
83
+ });
84
+ return () => {
85
+ unsub();
86
+ ignoreNextCancelSend = true;
87
+ _elementPickerController.elementPickerController.cancel();
88
+ ignoreNextCancelSend = false;
89
+ };
90
+ }
91
+ //# sourceMappingURL=elementPickerRelay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_elementPickerController","asRecord","payload","idempotencyKeyOf","key","length","resultPayload","result","idempotency_key","ok","autoData","text","screenshot","dataUrl","width","height","targetX1","targetY1","targetX2","targetY2","bindElementPickerRelay","engine","onRelay","sendRelay","undefined","ignoreNextCancelSend","sendResult","error","isPairingPushAckTimeout","sendCancel","catch","unsub","event","elementPickerController","beginSelection","requestId","onResult","onCancel","cancel"],"sourceRoot":"../../../src","sources":["pairing/elementPickerRelay.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,wBAAA,GAAAD,OAAA;AAUA,SAASE,QAAQA,CAACC,OAAgB,EAA2B;EAC3D,OAAOA,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,GAAIA,OAAO,GAA+B,CAAC,CAAC;AAC3F;AAEA,SAASC,gBAAgBA,CAACD,OAAgB,EAAiB;EACzD,MAAME,GAAG,GAAGH,QAAQ,CAACC,OAAO,CAAC,CAAC,iBAAiB,CAAC;EAChD,OAAO,OAAOE,GAAG,KAAK,QAAQ,IAAIA,GAAG,CAACC,MAAM,GAAG,CAAC,GAAGD,GAAG,GAAG,IAAI;AAC/D;AAEA,SAASE,aAAaA,CAACF,GAAW,EAAEG,MAA2B,EAA2B;EACxF,OAAO;IACLC,eAAe,EAAEJ,GAAG;IACpBK,EAAE,EAAE,IAAI;IACRC,QAAQ,EAAEH,MAAM,CAACG,QAAQ;IACzBC,IAAI,EAAEJ,MAAM,CAACI,IAAI,IAAI,IAAI;IACzB,IAAIJ,MAAM,CAACK,UAAU,GACjB;MACEA,UAAU,EAAE;QACVC,OAAO,EAAEN,MAAM,CAACK,UAAU,CAACC,OAAO;QAClCC,KAAK,EAAEP,MAAM,CAACK,UAAU,CAACE,KAAK;QAC9BC,MAAM,EAAER,MAAM,CAACK,UAAU,CAACG,MAAM;QAChCC,QAAQ,EAAET,MAAM,CAACK,UAAU,CAACI,QAAQ;QACpCC,QAAQ,EAAEV,MAAM,CAACK,UAAU,CAACK,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U,CAACtB,GAAG,EAAEG,MAAM,CAAC;QAC7C8B,QAAQ,EAAEA,CAAA,KAAM;UACd,IAAIZ,oBAAoB,EAAE;UAC1BI,UAAU,CAACzB,GAAG,CAAC;QACjB;MACF,CAAC,CAAC;MACF;IACF;IAEA,IAAI4B,KAAK,KAAK,qBAAqB,EAAE;MACnCP,oBAAoB,GAAG,IAAI;MAC3BQ,gDAAuB,CAACK,MAAM,CAAC,CAAC;MAChCb,oBAAoB,GAAG,KAAK;IAC9B;EACF,CAAC,CAAC;EAEF,OAAO,MAAM;IACXM,KAAK,CAAC,CAAC;IACPN,oBAAoB,GAAG,IAAI;IAC3BQ,gDAAuB,CAACK,MAAM,CAAC,CAAC;IAChCb,oBAAoB,GAAG,KAAK;EAC9B,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.resolvePreviewChrome = resolvePreviewChrome;
7
+ function isBannerVisible(state) {
8
+ if (!state.previewActive && state.status === 'idle') return false;
9
+ if (!state.previewActive && state.status !== 'token_expired' && state.status !== 'device_already_paired' && state.status !== 'error') {
10
+ return false;
11
+ }
12
+ return true;
13
+ }
14
+ function shown(tone, label, numberOfLines = 1) {
15
+ return {
16
+ visible: true,
17
+ tone,
18
+ label,
19
+ numberOfLines
20
+ };
21
+ }
22
+
23
+ /**
24
+ * Maps pairing-engine state onto the preview top-bar chrome.
25
+ * Pure: no React, so the nine-case table can be asserted without a renderer.
26
+ */
27
+ function resolvePreviewChrome(state) {
28
+ if (!isBannerVisible(state)) return {
29
+ visible: false
30
+ };
31
+ switch (state.status) {
32
+ case 'connecting':
33
+ return shown('default', 'Connecting to Builder…');
34
+ case 'reconnecting':
35
+ return shown('default', 'Reconnecting…');
36
+ case 'token_expired':
37
+ return shown('error', 'Pairing ended - rescan to continue', 2);
38
+ case 'device_already_paired':
39
+ return shown('error', 'Another device is already paired', 2);
40
+ case 'error':
41
+ if (state.pairingId === null) {
42
+ return shown('error', 'Preview unavailable');
43
+ }
44
+ return shown('error', 'Pairing ended - rescan to continue', 2);
45
+ default:
46
+ if (state.awaitingStartCondition) {
47
+ return shown('default', 'Waiting for auto-start condition…');
48
+ }
49
+ return shown('default', 'Preview mode');
50
+ }
51
+ }
52
+ //# sourceMappingURL=resolvePreviewChrome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isBannerVisible","state","previewActive","status","shown","tone","label","numberOfLines","visible","resolvePreviewChrome","pairingId","awaitingStartCondition"],"sourceRoot":"../../../src","sources":["pairing/resolvePreviewChrome.ts"],"mappings":";;;;;;AAQA,SAASA,eAAeA,CAACC,KAAyB,EAAW;EAC3D,IAAI,CAACA,KAAK,CAACC,aAAa,IAAID,KAAK,CAACE,MAAM,KAAK,MAAM,EAAE,OAAO,KAAK;EACjE,IACE,CAACF,KAAK,CAACC,aAAa,IACpBD,KAAK,CAACE,MAAM,KAAK,eAAe,IAChCF,KAAK,CAACE,MAAM,KAAK,uBAAuB,IACxCF,KAAK,CAACE,MAAM,KAAK,OAAO,EACxB;IACA,OAAO,KAAK;EACd;EACA,OAAO,IAAI;AACb;AAEA,SAASC,KAAKA,CACZC,IAAsB,EACtBC,KAAa,EACbC,aAAa,GAAG,CAAC,EAC0B;EAC3C,OAAO;IAAEC,OAAO,EAAE,IAAI;IAAEH,IAAI;IAAEC,KAAK;IAAEC;EAAc,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACO,SAASE,oBAAoBA,CAACR,KAAyB,EAAiB;EAC7E,IAAI,CAACD,eAAe,CAACC,KAAK,CAAC,EAAE,OAAO;IAAEO,OAAO,EAAE;EAAM,CAAC;EAEtD,QAAQP,KAAK,CAACE,MAAM;IAClB,KAAK,YAAY;MACf,OAAOC,KAAK,CAAC,SAAS,EAAE,wBAAwB,CAAC;IACnD,KAAK,cAAc;MACjB,OAAOA,KAAK,CAAC,SAAS,EAAE,eAAe,CAAC;IAC1C,KAAK,eAAe;MAClB,OAAOA,KAAK,CAAC,OAAO,EAAE,oCAAoC,EAAE,CAAC,CAAC;IAChE,KAAK,uBAAuB;MAC1B,OAAOA,KAAK,CAAC,OAAO,EAAE,kCAAkC,EAAE,CAAC,CAAC;IAC9D,KAAK,OAAO;MACV,IAAIH,KAAK,CAACS,SAAS,KAAK,IAAI,EAAE;QAC5B,OAAON,KAAK,CAAC,OAAO,EAAE,qBAAqB,CAAC;MAC9C;MACA,OAAOA,KAAK,CAAC,OAAO,EAAE,oCAAoC,EAAE,CAAC,CAAC;IAChE;MACE,IAAIH,KAAK,CAACU,sBAAsB,EAAE;QAChC,OAAOP,KAAK,CAAC,SAAS,EAAE,mCAAmC,CAAC;MAC9D;MACA,OAAOA,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC;EAC3C;AACF","ignoreList":[]}
@@ -5,20 +5,38 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.createMemoryPairingTokenStore = createMemoryPairingTokenStore;
7
7
  exports.createPairingTokenStore = createPairingTokenStore;
8
+ exports.resetPairingTokenStoreCacheForTests = resetPairingTokenStoreCacheForTests;
8
9
  /**
9
10
  * Persist the pairing JWT for reconnect within the current app session.
10
11
  * Cleared on SDK init / exit preview / app restart (pairing exits on restart).
11
12
  */
12
13
 
13
14
  const STORAGE_KEY = 'userflow:pairingToken';
15
+ let cachedSecureStore;
16
+
17
+ /** Expo modules must be installed natively — not just the JS package. */
18
+ function isExpoModulesRuntimeAvailable() {
19
+ const expo = globalThis.expo;
20
+ return typeof expo?.EventEmitter === 'function';
21
+ }
14
22
  function tryLoadExpoSecureStore() {
23
+ if (cachedSecureStore !== undefined) return cachedSecureStore;
24
+ if (typeof require !== 'function' || !isExpoModulesRuntimeAvailable()) {
25
+ cachedSecureStore = null;
26
+ return cachedSecureStore;
27
+ }
15
28
  try {
16
29
  // Optional peer — absent in bare RN without expo-secure-store.
17
30
  // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- optional peer at import time
18
- return require('expo-secure-store');
31
+ cachedSecureStore = require('expo-secure-store');
19
32
  } catch {
20
- return null;
33
+ cachedSecureStore = null;
34
+ if (__DEV__) {
35
+ // eslint-disable-next-line no-console -- intentional missing-optional-peer diagnostic
36
+ console.warn('[Userflow] Optional peer expo-secure-store is unavailable; ' + 'pairing JWT persistence falls back to in-memory storage.');
37
+ }
21
38
  }
39
+ return cachedSecureStore;
22
40
  }
23
41
 
24
42
  /** In-memory store used when SecureStore is unavailable (and in tests). */
@@ -67,4 +85,9 @@ function createPairingTokenStore() {
67
85
  }
68
86
  };
69
87
  }
88
+
89
+ /** @internal Resets module cache between tests. */
90
+ function resetPairingTokenStoreCacheForTests() {
91
+ cachedSecureStore = undefined;
92
+ }
70
93
  //# sourceMappingURL=tokenStorage.js.map