@userflow-tech/react-native 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (788) hide show
  1. package/README.md +97 -61
  2. package/app.plugin.js +11 -1
  3. package/babel-plugin/index.d.ts +8 -8
  4. package/babel-plugin/index.d.ts.map +1 -1
  5. package/babel-plugin/index.js +17 -9
  6. package/babel-plugin/index.js.map +1 -1
  7. package/babel-plugin.js +13 -0
  8. package/docs/anchoring.md +141 -13
  9. package/docs/deep-linking.md +18 -15
  10. package/docs/theme-mapping.md +44 -15
  11. package/docs/troubleshooting.md +36 -29
  12. package/expo-plugin/withUserflow.js +1 -1
  13. package/expo-plugin/withUserflow.js.map +1 -1
  14. package/lib/commonjs/anchors/AutoAnchorRegistry.js +124 -2
  15. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
  16. package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
  17. package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
  18. package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
  19. package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
  20. package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
  21. package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
  22. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
  23. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
  24. package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
  25. package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
  26. package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
  27. package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
  28. package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
  29. package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
  30. package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
  31. package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
  32. package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
  33. package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
  34. package/lib/commonjs/anchors/resolveAutoAnchorHost.js +171 -0
  35. package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
  36. package/lib/commonjs/anchors/semanticMatcher.js +285 -0
  37. package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
  38. package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -0
  39. package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
  40. package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
  41. package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
  42. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
  43. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
  44. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +64 -0
  45. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  46. package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -0
  47. package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
  48. package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
  49. package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
  50. package/lib/commonjs/authoring/chrome/ChromeIcon.js +39 -0
  51. package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
  52. package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
  53. package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
  54. package/lib/commonjs/authoring/chrome/ChromeTopBar.js +110 -0
  55. package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
  56. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
  57. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
  58. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -0
  59. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
  60. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  61. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  62. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  63. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  64. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  65. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  66. package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
  67. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  68. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  69. package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
  70. package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
  71. package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
  72. package/lib/commonjs/authoring/chrome/tokens.js +150 -0
  73. package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
  74. package/lib/commonjs/authoring/doubleTap.js +23 -0
  75. package/lib/commonjs/authoring/doubleTap.js.map +1 -0
  76. package/lib/commonjs/authoring/elementPickerController.js +102 -0
  77. package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
  78. package/lib/commonjs/authoring/fingerprintFromInstance.js +195 -0
  79. package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
  80. package/lib/commonjs/authoring/hitTest.js +106 -0
  81. package/lib/commonjs/authoring/hitTest.js.map +1 -0
  82. package/lib/commonjs/content/RichContentRenderer.js +12 -2
  83. package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
  84. package/lib/commonjs/content/StepButton.js +19 -4
  85. package/lib/commonjs/content/StepButton.js.map +1 -1
  86. package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
  87. package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
  88. package/lib/commonjs/content/themeColor.js +11 -0
  89. package/lib/commonjs/content/themeColor.js.map +1 -1
  90. package/lib/commonjs/deviceContext.js +158 -0
  91. package/lib/commonjs/deviceContext.js.map +1 -0
  92. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
  93. package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
  94. package/lib/commonjs/hostAppVersion.js +242 -0
  95. package/lib/commonjs/hostAppVersion.js.map +1 -0
  96. package/lib/commonjs/index.js +118 -5
  97. package/lib/commonjs/index.js.map +1 -1
  98. package/lib/commonjs/lifecycle.js +2 -0
  99. package/lib/commonjs/lifecycle.js.map +1 -1
  100. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +17 -8
  101. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
  102. package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
  103. package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
  104. package/lib/commonjs/pairing/PairingController.js +29 -2
  105. package/lib/commonjs/pairing/PairingController.js.map +1 -1
  106. package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
  107. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
  108. package/lib/commonjs/pairing/diagnostics.js +9 -0
  109. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  110. package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
  111. package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
  112. package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
  113. package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
  114. package/lib/commonjs/pairing/tokenStorage.js +25 -2
  115. package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
  116. package/lib/commonjs/pairing/usePairingState.js +3 -1
  117. package/lib/commonjs/pairing/usePairingState.js.map +1 -1
  118. package/lib/commonjs/runtime/FlowRenderer.js +45 -21
  119. package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
  120. package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
  121. package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
  122. package/lib/commonjs/runtime/TargetPressBridge.js +13 -44
  123. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
  124. package/lib/commonjs/runtime/UserflowProvider.js +74 -20
  125. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
  126. package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
  127. package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
  128. package/lib/commonjs/runtime/flowEngine.js +3 -1
  129. package/lib/commonjs/runtime/flowEngine.js.map +1 -1
  130. package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
  131. package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
  132. package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
  133. package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
  134. package/lib/commonjs/screenTracker.js +46 -4
  135. package/lib/commonjs/screenTracker.js.map +1 -1
  136. package/lib/commonjs/surfaces/CardFade.js +31 -0
  137. package/lib/commonjs/surfaces/CardFade.js.map +1 -0
  138. package/lib/commonjs/surfaces/CloseButton.js +11 -6
  139. package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
  140. package/lib/commonjs/surfaces/ModalSurface.js +50 -34
  141. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
  142. package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
  143. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
  144. package/lib/commonjs/surfaces/cardTransition.js +70 -0
  145. package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
  146. package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
  147. package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
  148. package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
  149. package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
  150. package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
  151. package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
  152. package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
  153. package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
  154. package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
  155. package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
  156. package/lib/commonjs/surfaces/themeChrome.js +4 -1
  157. package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
  158. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
  159. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
  160. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
  161. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
  162. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
  163. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  164. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
  165. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  166. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
  167. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  168. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
  169. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  170. package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
  171. package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
  172. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
  173. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  174. package/lib/commonjs/version.js +1 -1
  175. package/lib/module/anchors/AutoAnchorRegistry.js +125 -2
  176. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
  177. package/lib/module/anchors/anchorChangeTicker.js +10 -0
  178. package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
  179. package/lib/module/anchors/elementConditionEvaluator.js +25 -12
  180. package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
  181. package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
  182. package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
  183. package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
  184. package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
  185. package/lib/module/anchors/fiber/fiberInternals.js +139 -3
  186. package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
  187. package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
  188. package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
  189. package/lib/module/anchors/fiber/readHostContent.js +127 -0
  190. package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
  191. package/lib/module/anchors/fiberAnchorCache.js +40 -0
  192. package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
  193. package/lib/module/anchors/resolveAnchorHost.js +15 -21
  194. package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
  195. package/lib/module/anchors/resolveAutoAnchorHost.js +167 -0
  196. package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
  197. package/lib/module/anchors/semanticMatcher.js +280 -0
  198. package/lib/module/anchors/semanticMatcher.js.map +1 -0
  199. package/lib/module/authoring/ElementPickerOverlay.js +485 -0
  200. package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
  201. package/lib/module/authoring/capturePickerScreenshot.js +68 -0
  202. package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
  203. package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
  204. package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
  205. package/lib/module/authoring/chrome/ChromeBottomSheet.js +59 -0
  206. package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  207. package/lib/module/authoring/chrome/ChromeButton.js +89 -0
  208. package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
  209. package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
  210. package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
  211. package/lib/module/authoring/chrome/ChromeIcon.js +33 -0
  212. package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
  213. package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
  214. package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
  215. package/lib/module/authoring/chrome/ChromeTopBar.js +104 -0
  216. package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
  217. package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
  218. package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
  219. package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -0
  220. package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
  221. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  222. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  223. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  224. package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  225. package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  226. package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  227. package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
  228. package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  229. package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  230. package/lib/module/authoring/chrome/icons/xmark.png +0 -0
  231. package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
  232. package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
  233. package/lib/module/authoring/chrome/tokens.js +146 -0
  234. package/lib/module/authoring/chrome/tokens.js.map +1 -0
  235. package/lib/module/authoring/doubleTap.js +18 -0
  236. package/lib/module/authoring/doubleTap.js.map +1 -0
  237. package/lib/module/authoring/elementPickerController.js +97 -0
  238. package/lib/module/authoring/elementPickerController.js.map +1 -0
  239. package/lib/module/authoring/fingerprintFromInstance.js +187 -0
  240. package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
  241. package/lib/module/authoring/hitTest.js +100 -0
  242. package/lib/module/authoring/hitTest.js.map +1 -0
  243. package/lib/module/content/RichContentRenderer.js +12 -2
  244. package/lib/module/content/RichContentRenderer.js.map +1 -1
  245. package/lib/module/content/StepButton.js +19 -4
  246. package/lib/module/content/StepButton.js.map +1 -1
  247. package/lib/module/content/resolveStepButtonChrome.js +8 -6
  248. package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
  249. package/lib/module/content/themeColor.js +10 -0
  250. package/lib/module/content/themeColor.js.map +1 -1
  251. package/lib/module/deviceContext.js +142 -0
  252. package/lib/module/deviceContext.js.map +1 -0
  253. package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
  254. package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
  255. package/lib/module/hostAppVersion.js +225 -0
  256. package/lib/module/hostAppVersion.js.map +1 -0
  257. package/lib/module/index.js +119 -6
  258. package/lib/module/index.js.map +1 -1
  259. package/lib/module/lifecycle.js +2 -0
  260. package/lib/module/lifecycle.js.map +1 -1
  261. package/lib/module/navigation/WithUserflowReactNavigation.js +18 -9
  262. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
  263. package/lib/module/navigation/isOverlayPresentation.js +58 -0
  264. package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
  265. package/lib/module/pairing/PairingController.js +30 -3
  266. package/lib/module/pairing/PairingController.js.map +1 -1
  267. package/lib/module/pairing/PreviewModeBanner.js +212 -85
  268. package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
  269. package/lib/module/pairing/diagnostics.js +8 -0
  270. package/lib/module/pairing/diagnostics.js.map +1 -1
  271. package/lib/module/pairing/elementPickerRelay.js +87 -0
  272. package/lib/module/pairing/elementPickerRelay.js.map +1 -0
  273. package/lib/module/pairing/resolvePreviewChrome.js +48 -0
  274. package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
  275. package/lib/module/pairing/tokenStorage.js +24 -2
  276. package/lib/module/pairing/tokenStorage.js.map +1 -1
  277. package/lib/module/pairing/usePairingState.js +3 -1
  278. package/lib/module/pairing/usePairingState.js.map +1 -1
  279. package/lib/module/runtime/FlowRenderer.js +45 -21
  280. package/lib/module/runtime/FlowRenderer.js.map +1 -1
  281. package/lib/module/runtime/FlowSurfaceFade.js +49 -26
  282. package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
  283. package/lib/module/runtime/TargetPressBridge.js +12 -43
  284. package/lib/module/runtime/TargetPressBridge.js.map +1 -1
  285. package/lib/module/runtime/UserflowProvider.js +74 -20
  286. package/lib/module/runtime/UserflowProvider.js.map +1 -1
  287. package/lib/module/runtime/changedTouchPoints.js +43 -0
  288. package/lib/module/runtime/changedTouchPoints.js.map +1 -0
  289. package/lib/module/runtime/flowEngine.js +3 -1
  290. package/lib/module/runtime/flowEngine.js.map +1 -1
  291. package/lib/module/runtime/flowSessionViewState.js +32 -7
  292. package/lib/module/runtime/flowSessionViewState.js.map +1 -1
  293. package/lib/module/runtime/useFlowSessionState.js +2 -1
  294. package/lib/module/runtime/useFlowSessionState.js.map +1 -1
  295. package/lib/module/screenTracker.js +42 -4
  296. package/lib/module/screenTracker.js.map +1 -1
  297. package/lib/module/surfaces/CardFade.js +26 -0
  298. package/lib/module/surfaces/CardFade.js.map +1 -0
  299. package/lib/module/surfaces/CloseButton.js +10 -6
  300. package/lib/module/surfaces/CloseButton.js.map +1 -1
  301. package/lib/module/surfaces/ModalSurface.js +52 -36
  302. package/lib/module/surfaces/ModalSurface.js.map +1 -1
  303. package/lib/module/surfaces/TooltipSurface.js +368 -90
  304. package/lib/module/surfaces/TooltipSurface.js.map +1 -1
  305. package/lib/module/surfaces/cardTransition.js +64 -0
  306. package/lib/module/surfaces/cardTransition.js.map +1 -0
  307. package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
  308. package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
  309. package/lib/module/surfaces/resolveModalLayout.js +7 -3
  310. package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
  311. package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
  312. package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
  313. package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
  314. package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
  315. package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
  316. package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
  317. package/lib/module/surfaces/themeChrome.js +3 -1
  318. package/lib/module/surfaces/themeChrome.js.map +1 -1
  319. package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
  320. package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
  321. package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
  322. package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
  323. package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
  324. package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  325. package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
  326. package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  327. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
  328. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  329. package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
  330. package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  331. package/lib/module/surfaces/tooltip/rect.js +11 -0
  332. package/lib/module/surfaces/tooltip/rect.js.map +1 -1
  333. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
  334. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  335. package/lib/module/version.js +1 -1
  336. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +26 -0
  337. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
  339. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
  341. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  343. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  345. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  346. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
  347. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  349. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  350. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
  351. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  352. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
  353. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  354. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
  355. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  357. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  358. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +48 -0
  359. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
  360. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -0
  361. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  362. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
  363. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  365. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  367. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
  369. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  371. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  373. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  375. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  377. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  379. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  381. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  382. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -0
  383. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
  385. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +59 -0
  387. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
  388. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
  389. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  390. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
  391. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
  392. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
  393. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
  394. package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  396. package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
  397. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
  399. package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
  400. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  401. package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
  402. package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/index.d.ts +53 -2
  404. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
  406. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
  407. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
  409. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +7 -0
  411. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
  413. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  414. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
  415. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
  417. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
  419. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +2 -0
  421. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
  422. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
  423. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
  424. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
  425. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
  426. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  427. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
  428. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
  429. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
  430. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
  432. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
  433. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
  434. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
  435. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
  437. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/screenTracker.d.ts +21 -3
  439. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
  440. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
  441. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
  442. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
  443. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +1 -1
  445. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
  446. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
  448. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
  449. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
  450. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
  451. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  452. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  453. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
  454. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  456. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  458. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  459. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  460. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  461. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
  462. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  464. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  466. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  468. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  470. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  471. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  472. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  473. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  474. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  475. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
  476. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
  477. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  478. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  479. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  480. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +26 -0
  481. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  482. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
  483. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  484. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
  485. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  486. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  487. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  488. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  489. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  490. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
  491. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  492. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  493. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  494. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
  495. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  496. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
  497. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  498. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
  499. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  500. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  501. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  502. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +48 -0
  503. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
  504. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -0
  505. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  506. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
  507. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  508. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  509. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  510. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  511. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  512. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
  513. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  514. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  515. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  516. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  517. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  518. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  519. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  520. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  521. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  522. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  523. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  524. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  525. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  526. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -0
  527. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
  528. package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
  529. package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
  530. package/lib/typescript/module/src/authoring/elementPickerController.d.ts +59 -0
  531. package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
  532. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
  533. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  534. package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
  535. package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
  536. package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
  537. package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
  538. package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
  539. package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  540. package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
  541. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
  542. package/lib/typescript/module/src/deviceContext.d.ts +66 -0
  543. package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
  544. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  545. package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
  546. package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
  547. package/lib/typescript/module/src/index.d.ts +53 -2
  548. package/lib/typescript/module/src/index.d.ts.map +1 -1
  549. package/lib/typescript/module/src/lifecycle.d.ts +6 -0
  550. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
  551. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  552. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
  553. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  554. package/lib/typescript/module/src/pairing/PairingController.d.ts +7 -0
  555. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
  556. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
  557. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  558. package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
  559. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
  560. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
  561. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
  562. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
  563. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  564. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +2 -0
  565. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
  566. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
  567. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
  568. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
  569. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
  570. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  571. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
  572. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
  573. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
  574. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
  575. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
  576. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
  577. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
  578. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
  579. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
  580. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
  581. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
  582. package/lib/typescript/module/src/screenTracker.d.ts +21 -3
  583. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
  584. package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
  585. package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
  586. package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
  587. package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
  588. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +1 -1
  589. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
  590. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
  591. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
  592. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
  593. package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
  594. package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
  595. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  596. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  597. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
  598. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  599. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  600. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  601. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  602. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  603. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  604. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  605. package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
  606. package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
  607. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  608. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  609. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  610. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  611. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  612. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  613. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  614. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  615. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  616. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  617. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  618. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  619. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
  620. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
  621. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  622. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  623. package/lib/typescript/module/src/version.d.ts +1 -1
  624. package/package.json +22 -16
  625. package/src/anchors/AutoAnchorRegistry.ts +139 -2
  626. package/src/anchors/anchorChangeTicker.ts +10 -0
  627. package/src/anchors/elementConditionEvaluator.ts +29 -16
  628. package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
  629. package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
  630. package/src/anchors/fiber/fiberInternals.ts +166 -3
  631. package/src/anchors/fiber/indexHostFibers.ts +136 -0
  632. package/src/anchors/fiber/readHostContent.ts +146 -0
  633. package/src/anchors/fiberAnchorCache.ts +45 -0
  634. package/src/anchors/resolveAnchorHost.ts +23 -23
  635. package/src/anchors/resolveAutoAnchorHost.ts +180 -0
  636. package/src/anchors/semanticMatcher.ts +361 -0
  637. package/src/authoring/ElementPickerOverlay.tsx +553 -0
  638. package/src/authoring/capturePickerScreenshot.ts +90 -0
  639. package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
  640. package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
  641. package/src/authoring/chrome/ChromeButton.tsx +103 -0
  642. package/src/authoring/chrome/ChromeDialog.tsx +121 -0
  643. package/src/authoring/chrome/ChromeIcon.tsx +40 -0
  644. package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
  645. package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
  646. package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
  647. package/src/authoring/chrome/doubleTapMonitor.ts +80 -0
  648. package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  649. package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  650. package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  651. package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  652. package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  653. package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  654. package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
  655. package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  656. package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  657. package/src/authoring/chrome/icons/xmark.png +0 -0
  658. package/src/authoring/chrome/icons/xmark@2x.png +0 -0
  659. package/src/authoring/chrome/icons/xmark@3x.png +0 -0
  660. package/src/authoring/chrome/tokens.ts +106 -0
  661. package/src/authoring/doubleTap.ts +27 -0
  662. package/src/authoring/elementPickerController.ts +135 -0
  663. package/src/authoring/fingerprintFromInstance.ts +152 -0
  664. package/src/authoring/hitTest.ts +133 -0
  665. package/src/content/RichContentRenderer.tsx +22 -1
  666. package/src/content/StepButton.tsx +17 -2
  667. package/src/content/resolveStepButtonChrome.ts +12 -6
  668. package/src/content/themeColor.ts +10 -0
  669. package/src/deviceContext.ts +168 -0
  670. package/src/expo-router/useUserflowExpoRouter.ts +47 -4
  671. package/src/hostAppVersion.ts +258 -0
  672. package/src/index.ts +148 -4
  673. package/src/lifecycle.ts +8 -0
  674. package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
  675. package/src/navigation/isOverlayPresentation.ts +76 -0
  676. package/src/pairing/PairingController.ts +32 -3
  677. package/src/pairing/PreviewModeBanner.tsx +250 -94
  678. package/src/pairing/diagnostics.ts +8 -0
  679. package/src/pairing/elementPickerRelay.ts +100 -0
  680. package/src/pairing/resolvePreviewChrome.ts +57 -0
  681. package/src/pairing/tokenStorage.ts +31 -2
  682. package/src/pairing/usePairingState.ts +2 -0
  683. package/src/runtime/FlowRenderer.tsx +55 -27
  684. package/src/runtime/FlowSurfaceFade.tsx +51 -30
  685. package/src/runtime/TargetPressBridge.tsx +14 -32
  686. package/src/runtime/UserflowProvider.tsx +76 -13
  687. package/src/runtime/changedTouchPoints.ts +34 -0
  688. package/src/runtime/flowEngine.ts +2 -0
  689. package/src/runtime/flowSessionViewState.ts +42 -4
  690. package/src/runtime/useFlowSessionState.ts +2 -0
  691. package/src/screenTracker.ts +46 -4
  692. package/src/surfaces/CardFade.tsx +18 -0
  693. package/src/surfaces/CloseButton.tsx +17 -7
  694. package/src/surfaces/MadeWithUserflow.tsx +1 -1
  695. package/src/surfaces/ModalSurface.tsx +48 -35
  696. package/src/surfaces/TooltipSurface.tsx +406 -86
  697. package/src/surfaces/cardTransition.ts +67 -0
  698. package/src/surfaces/resolveHighlightChrome.ts +139 -0
  699. package/src/surfaces/resolveModalLayout.ts +16 -8
  700. package/src/surfaces/resolveTooltipLayout.ts +1 -14
  701. package/src/surfaces/surfaceInteractionConfig.ts +25 -0
  702. package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
  703. package/src/surfaces/themeChrome.ts +5 -3
  704. package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
  705. package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
  706. package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
  707. package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
  708. package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
  709. package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
  710. package/src/surfaces/tooltip/rect.ts +11 -0
  711. package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
  712. package/src/version.ts +1 -1
  713. package/vendor/core/dist/attributes.d.ts +1 -2
  714. package/vendor/core/dist/attributes.d.ts.map +1 -1
  715. package/vendor/core/dist/attributes.js.map +1 -1
  716. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +69 -1
  717. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
  718. package/vendor/core/dist/engine/FlowSessionEngine.js +268 -7
  719. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
  720. package/vendor/core/dist/engine/PairingEngine.d.ts +44 -1
  721. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
  722. package/vendor/core/dist/engine/PairingEngine.js +103 -9
  723. package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
  724. package/vendor/core/dist/engine/UserflowCore.d.ts +23 -4
  725. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
  726. package/vendor/core/dist/engine/UserflowCore.js +64 -1
  727. package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
  728. package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
  729. package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
  730. package/vendor/core/dist/engine/conditionOperators.js +168 -0
  731. package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
  732. package/vendor/core/dist/engine/handleActions.d.ts +27 -4
  733. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
  734. package/vendor/core/dist/engine/handleActions.js +140 -13
  735. package/vendor/core/dist/engine/handleActions.js.map +1 -1
  736. package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
  737. package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
  738. package/vendor/core/dist/engine/simpleObservable.js +29 -0
  739. package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
  740. package/vendor/core/dist/engine/trackCondition.d.ts +25 -0
  741. package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
  742. package/vendor/core/dist/engine/trackCondition.js +177 -0
  743. package/vendor/core/dist/engine/trackCondition.js.map +1 -0
  744. package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
  745. package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
  746. package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
  747. package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
  748. package/vendor/core/dist/index.d.ts +4 -3
  749. package/vendor/core/dist/index.d.ts.map +1 -1
  750. package/vendor/core/dist/index.js +2 -1
  751. package/vendor/core/dist/index.js.map +1 -1
  752. package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
  753. package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
  754. package/vendor/core/dist/normalizeAttributes.js +127 -0
  755. package/vendor/core/dist/normalizeAttributes.js.map +1 -0
  756. package/vendor/core/dist/transport/phoenix.d.ts +11 -6
  757. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
  758. package/vendor/core/dist/transport/phoenix.js +59 -5
  759. package/vendor/core/dist/transport/phoenix.js.map +1 -1
  760. package/vendor/core/dist/types.d.ts +26 -1
  761. package/vendor/core/dist/types.d.ts.map +1 -1
  762. package/vendor/core/dist/version.d.ts +1 -1
  763. package/vendor/core/dist/version.js +1 -1
  764. package/vendor/core/package.json +1 -1
  765. package/vendor/protocol/dist/attributes.d.ts +43 -0
  766. package/vendor/protocol/dist/attributes.d.ts.map +1 -0
  767. package/vendor/protocol/dist/attributes.js +15 -0
  768. package/vendor/protocol/dist/attributes.js.map +1 -0
  769. package/vendor/protocol/dist/autoData.d.ts +2 -2
  770. package/vendor/protocol/dist/autoData.js +2 -2
  771. package/vendor/protocol/dist/events.d.ts +8 -0
  772. package/vendor/protocol/dist/events.d.ts.map +1 -1
  773. package/vendor/protocol/dist/flows.d.ts +66 -4
  774. package/vendor/protocol/dist/flows.d.ts.map +1 -1
  775. package/vendor/protocol/dist/flows.js +50 -3
  776. package/vendor/protocol/dist/flows.js.map +1 -1
  777. package/vendor/protocol/dist/index.d.ts +1 -0
  778. package/vendor/protocol/dist/index.d.ts.map +1 -1
  779. package/vendor/protocol/dist/index.js +1 -0
  780. package/vendor/protocol/dist/index.js.map +1 -1
  781. package/vendor/protocol/dist/messages.d.ts +25 -4
  782. package/vendor/protocol/dist/messages.d.ts.map +1 -1
  783. package/vendor/protocol/dist/messages.js +4 -0
  784. package/vendor/protocol/dist/messages.js.map +1 -1
  785. package/vendor/protocol/dist/pairing.d.ts +26 -0
  786. package/vendor/protocol/dist/pairing.d.ts.map +1 -1
  787. package/vendor/protocol/dist/pairing.js.map +1 -1
  788. package/vendor/protocol/package.json +1 -1
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import * as React from 'react';
4
- import { StyleSheet, View } from 'react-native';
4
+ import { Platform, StyleSheet, View } from 'react-native';
5
+ import { CardFade } from "../CardFade.js";
5
6
  import { ABSOLUTE_FILL } from "../absoluteFill.js";
6
7
  import { TooltipNotch } from "./TooltipNotch.js";
7
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -9,27 +10,66 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
10
  * Tooltip chrome shell: diamond notch + card fill sharing one shadow family.
10
11
  *
11
12
  * Web draws card and notch as a single silhouette under `filter: drop-shadow`.
12
- * RN has no silhouette filter, so the card uses a dedicated shadow layer and
13
- * `elevation` on the fill (Android). The notch itself is not shadowed — a
14
- * second blurred shadow on the rotated square leaves a gray band at the pointer
15
- * base when it points up into the anchor. An inset fill diamond on top erases
16
- * that seam (and bordered stroke gaps) without clipping the outer tip.
13
+ * RN has no silhouette filter — on both platforms a view's shadow is derived
14
+ * from that view's own bounds, and the notch hangs at a negative offset
15
+ * *outside* the card's bounds. No shadow cast by the card or by the shell can
16
+ * ever reach it, so the diamond has to cast its own, and the two shadows
17
+ * together trace the card + tip outline.
18
+ *
19
+ * The order is what keeps that honest. A shadow is painted with its own layer,
20
+ * so only a layer drawn *before* the notch may cast a card-sized shadow —
21
+ * otherwise it lands on the exposed tip as a gray band. Hence: shadow layer,
22
+ * then notch, then the fill and seam cover, both silent.
23
+ *
24
+ * iOS gets `shadow*` on the notch (`elevation` is inert there); Android gets
25
+ * `elevation`, which is the only shadow it honors on a rotated view.
17
26
  */
18
27
  export function TooltipBubble({
19
28
  chrome,
20
29
  notchPosition,
21
30
  style,
22
31
  onLayout,
23
- children
32
+ children,
33
+ maxHeight,
34
+ showNotch: showNotchProp = true
24
35
  }) {
25
- const showNotch = chrome.notchSize > 0;
36
+ const showNotch = showNotchProp && chrome.notchSize > 0;
26
37
  const bordered = chrome.borderWidth > 0;
38
+ // Only bordered themes need the diamond seam cover, to keep the stroke even
39
+ // where the notch meets the card. It is opaque and sits above the fill, so
40
+ // borderless themes must skip it or it paints over the card's own text.
41
+ const showSeamCover = showNotch && bordered;
42
+ // Borderless: a 2pt strip of fill color on the pointer edge covers the iOS
43
+ // hairline where `overflow: hidden` anti-aliases the card against the dim.
44
+ // Inset by the radius so it does not square off the corners. Bordered cards
45
+ // already have a stroke there — painting fill over it would hide the border.
46
+ const notchEdge = showNotch && !bordered ? protrudingNotchEdge(notchPosition) : null;
27
47
  // Web paints the notch with border color when bordered, otherwise the card
28
48
  // fill. Never use literal `transparent` — that hides the pointer entirely.
29
49
  const notchColor = bordered && chrome.borderColor !== 'transparent' ? chrome.borderColor : chrome.backgroundColor;
30
- // Android draws by elevation, so every layer above the card shadow has to be
50
+ // Android draws by elevation, so every layer above the shadow layer has to be
31
51
  // raised with it or the opaque shadow layer paints over the card body.
32
52
  const elevation = chrome.shadowStyle.elevation ?? 0;
53
+ // Raising a layer on Android also makes it cast its own elevation shadow,
54
+ // painted directly beneath that layer, so anything above the notch has to
55
+ // give its shadow up. `shadowColor: 'transparent'` does that on both
56
+ // platforms — it is the one shadow prop Android honors (API 28+), and on iOS
57
+ // it cancels the shadow outright — so this needs no platform split.
58
+ const raisedSilent = {
59
+ elevation,
60
+ shadowColor: 'transparent'
61
+ };
62
+ // The one caster above the shadow layer. iOS reads this diamond's own
63
+ // bounds, and the 45° layer rotation carries the shadow with it, so the tip
64
+ // gets a shadow shaped like the tip.
65
+ const notchShadow = Platform.OS === 'ios' ? {
66
+ shadowColor: chrome.shadowStyle.shadowColor,
67
+ shadowOffset: chrome.shadowStyle.shadowOffset,
68
+ shadowOpacity: chrome.shadowStyle.shadowOpacity,
69
+ shadowRadius: chrome.shadowStyle.shadowRadius
70
+ } : {
71
+ elevation
72
+ };
33
73
  const notchProps = {
34
74
  notchSize: chrome.notchSize,
35
75
  ...(notchPosition.top !== undefined ? {
@@ -45,7 +85,7 @@ export function TooltipBubble({
45
85
  right: notchPosition.right
46
86
  } : {})
47
87
  };
48
- return /*#__PURE__*/_jsxs(View, {
88
+ return /*#__PURE__*/_jsxs(CardFade, {
49
89
  testID: "userflow-tooltip-card",
50
90
  accessibilityViewIsModal: true,
51
91
  pointerEvents: "auto",
@@ -53,37 +93,106 @@ export function TooltipBubble({
53
93
  style: [styles.shell, style],
54
94
  children: [/*#__PURE__*/_jsx(View, {
55
95
  pointerEvents: "none",
96
+ testID: "userflow-tooltip-card-shadow",
56
97
  style: [styles.cardShadow, chrome.shadowStyle, {
57
- elevation: 0,
58
98
  borderRadius: chrome.borderRadius,
59
99
  backgroundColor: chrome.backgroundColor
60
100
  }]
61
101
  }), showNotch ? /*#__PURE__*/_jsx(TooltipNotch, {
62
102
  ...notchProps,
63
103
  notchColor: notchColor,
64
- style: styles.notchLayer
104
+ style: [styles.notchLayer, notchShadow]
65
105
  }) : null, /*#__PURE__*/_jsx(View, {
66
- style: [chrome.fillStyle, styles.fill, {
67
- elevation
68
- }],
69
- children: children
70
- }), showNotch ? /*#__PURE__*/_jsx(TooltipNotch, {
106
+ testID: "userflow-tooltip-card-fill",
107
+ style: [chrome.fillStyle, styles.fill,
108
+ // Keep the opaque rounded skin unclipped so its top edge composites
109
+ // onto this layer instead of the dim. Content still clips inside.
110
+ styles.fillSkin, raisedSilent, maxHeight != null ? {
111
+ maxHeight
112
+ } : null],
113
+ children: /*#__PURE__*/_jsx(View, {
114
+ testID: "userflow-tooltip-card-fill-clip",
115
+ style: [styles.fillClip, {
116
+ borderRadius: chrome.borderRadius
117
+ }, maxHeight != null ? {
118
+ maxHeight
119
+ } : null],
120
+ children: children
121
+ })
122
+ }), notchEdge ? /*#__PURE__*/_jsx(View, {
123
+ pointerEvents: "none",
124
+ testID: "userflow-tooltip-notch-edge-cap",
125
+ style: [styles.notchSeamCover, edgeCapStyle(notchEdge, chrome.borderRadius, chrome.backgroundColor), raisedSilent]
126
+ }) : null, showSeamCover ? /*#__PURE__*/_jsx(TooltipNotch, {
71
127
  ...notchProps,
72
128
  notchColor: chrome.backgroundColor,
73
129
  inset: Math.max(chrome.borderWidth, 1),
74
- style: [styles.notchSeamCover, {
75
- elevation
76
- }],
130
+ style: [styles.notchSeamCover, raisedSilent],
77
131
  testID: "userflow-tooltip-notch-seam"
78
132
  }) : null]
79
133
  });
80
134
  }
135
+
136
+ /** Pixel-thick cover for the fill hairline on the pointer's card edge. */
137
+ const EDGE_CAP_THICKNESS = 2;
138
+
139
+ /**
140
+ * The pointer hangs *outside* the card, so its edge offset is negative.
141
+ * Along-edge alignment (the other axis) is positive and must be ignored.
142
+ */
143
+ function protrudingNotchEdge(position) {
144
+ if (position.top != null && position.top < 0) return 'top';
145
+ if (position.bottom != null && position.bottom < 0) return 'bottom';
146
+ if (position.left != null && position.left < 0) return 'left';
147
+ if (position.right != null && position.right < 0) return 'right';
148
+ return null;
149
+ }
150
+ function edgeCapStyle(edge, borderRadius, backgroundColor) {
151
+ const inset = borderRadius;
152
+ const along = {
153
+ position: 'absolute',
154
+ backgroundColor
155
+ };
156
+ switch (edge) {
157
+ case 'top':
158
+ return {
159
+ ...along,
160
+ top: 0,
161
+ left: inset,
162
+ right: inset,
163
+ height: EDGE_CAP_THICKNESS
164
+ };
165
+ case 'bottom':
166
+ return {
167
+ ...along,
168
+ bottom: 0,
169
+ left: inset,
170
+ right: inset,
171
+ height: EDGE_CAP_THICKNESS
172
+ };
173
+ case 'left':
174
+ return {
175
+ ...along,
176
+ left: 0,
177
+ top: inset,
178
+ bottom: inset,
179
+ width: EDGE_CAP_THICKNESS
180
+ };
181
+ case 'right':
182
+ return {
183
+ ...along,
184
+ right: 0,
185
+ top: inset,
186
+ bottom: inset,
187
+ width: EDGE_CAP_THICKNESS
188
+ };
189
+ }
190
+ }
81
191
  const styles = StyleSheet.create({
82
192
  shell: {
83
193
  position: 'relative',
84
194
  backgroundColor: 'transparent',
85
195
  overflow: 'visible',
86
- maxHeight: '80%',
87
196
  flexShrink: 1
88
197
  },
89
198
  cardShadow: {
@@ -94,7 +203,19 @@ const styles = StyleSheet.create({
94
203
  zIndex: 1
95
204
  },
96
205
  fill: {
97
- zIndex: 2
206
+ zIndex: 2,
207
+ minHeight: 0,
208
+ flexShrink: 1
209
+ },
210
+ fillSkin: {
211
+ overflow: 'visible'
212
+ },
213
+ fillClip: {
214
+ overflow: 'hidden',
215
+ minHeight: 0,
216
+ flexShrink: 1
217
+ // Do not set flexGrow / flex: 1. The card sizes to its content; grow in an
218
+ // auto-height parent collapses the fill to 0 and leaves only the notch.
98
219
  },
99
220
  notchSeamCover: {
100
221
  zIndex: 3
@@ -1 +1 @@
1
- {"version":3,"names":["React","StyleSheet","View","ABSOLUTE_FILL","TooltipNotch","jsx","_jsx","jsxs","_jsxs","TooltipBubble","chrome","notchPosition","style","onLayout","children","showNotch","notchSize","bordered","borderWidth","notchColor","borderColor","backgroundColor","elevation","shadowStyle","notchProps","top","undefined","bottom","left","right","testID","accessibilityViewIsModal","pointerEvents","styles","shell","cardShadow","borderRadius","notchLayer","fillStyle","fill","inset","Math","max","notchSeamCover","create","position","overflow","maxHeight","flexShrink","zIndex"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/TooltipBubble.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,UAAU,EACVC,IAAI,QAIC,cAAc;AAErB,SAASC,aAAa,QAAQ,oBAAiB;AAG/C,SAASC,YAAY,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAW9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAC;EAC5BC,MAAM;EACNC,aAAa;EACbC,KAAK;EACLC,QAAQ;EACRC;AACkB,CAAC,EAAsB;EACzC,MAAMC,SAAS,GAAGL,MAAM,CAACM,SAAS,GAAG,CAAC;EACtC,MAAMC,QAAQ,GAAGP,MAAM,CAACQ,WAAW,GAAG,CAAC;EACvC;EACA;EACA,MAAMC,UAAU,GACdF,QAAQ,IAAIP,MAAM,CAACU,WAAW,KAAK,aAAa,GAAGV,MAAM,CAACU,WAAW,GAAGV,MAAM,CAACW,eAAe;EAChG;EACA;EACA,MAAMC,SAAS,GAAGZ,MAAM,CAACa,WAAW,CAACD,SAAS,IAAI,CAAC;EACnD,MAAME,UAAU,GAAG;IACjBR,SAAS,EAAEN,MAAM,CAACM,SAAS;IAC3B,IAAIL,aAAa,CAACc,GAAG,KAAKC,SAAS,GAAG;MAAED,GAAG,EAAEd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A,CAACF,YAAY;MAAA,GACPoB,UAAU;MACdL,UAAU,EAAET,MAAM,CAACW,eAAgB;MACnCmB,KAAK,EAAEC,IAAI,CAACC,GAAG,CAAChC,MAAM,CAACQ,WAAW,EAAE,CAAC,CAAE;MACvCN,KAAK,EAAE,CAACqB,MAAM,CAACU,cAAc,EAAE;QAAErB;MAAU,CAAC,CAAE;MAC9CQ,MAAM,EAAC;IAA6B,CACrC,CAAC,GACA,IAAI;EAAA,CACJ,CAAC;AAEX;AAEA,MAAMG,MAAM,GAAGhC,UAAU,CAAC2C,MAAM,CAAC;EAC/BV,KAAK,EAAE;IACLW,QAAQ,EAAE,UAAU;IACpBxB,eAAe,EAAE,aAAa;IAC9ByB,QAAQ,EAAE,SAAS;IACnBC,SAAS,EAAE,KAAK;IAChBC,UAAU,EAAE;EACd,CAAC;EACDb,UAAU,EAAE;IACV,GAAGhC,aAAa;IAChB8C,MAAM,EAAE;EACV,CAAC;EACDZ,UAAU,EAAE;IACVY,MAAM,EAAE;EACV,CAAC;EACDV,IAAI,EAAE;IACJU,MAAM,EAAE;EACV,CAAC;EACDN,cAAc,EAAE;IACdM,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Platform","StyleSheet","View","CardFade","ABSOLUTE_FILL","TooltipNotch","jsx","_jsx","jsxs","_jsxs","TooltipBubble","chrome","notchPosition","style","onLayout","children","maxHeight","showNotch","showNotchProp","notchSize","bordered","borderWidth","showSeamCover","notchEdge","protrudingNotchEdge","notchColor","borderColor","backgroundColor","elevation","shadowStyle","raisedSilent","shadowColor","notchShadow","OS","shadowOffset","shadowOpacity","shadowRadius","notchProps","top","undefined","bottom","left","right","testID","accessibilityViewIsModal","pointerEvents","styles","shell","cardShadow","borderRadius","notchLayer","fillStyle","fill","fillSkin","fillClip","notchSeamCover","edgeCapStyle","inset","Math","max","EDGE_CAP_THICKNESS","position","edge","along","height","width","create","overflow","flexShrink","zIndex","minHeight"],"sourceRoot":"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AO;QAAE,GAAGG,KAAK;QAAEtB,IAAI,EAAE,CAAC;QAAEH,GAAG,EAAEmB,KAAK;QAAEjB,MAAM,EAAEiB,KAAK;QAAEQ,KAAK,EAAEL;MAAmB,CAAC;IACpF,KAAK,OAAO;MACV,OAAO;QAAE,GAAGG,KAAK;QAAErB,KAAK,EAAE,CAAC;QAAEJ,GAAG,EAAEmB,KAAK;QAAEjB,MAAM,EAAEiB,KAAK;QAAEQ,KAAK,EAAEL;MAAmB,CAAC;EACvF;AACF;AAEA,MAAMd,MAAM,GAAG7C,UAAU,CAACiE,MAAM,CAAC;EAC/BnB,KAAK,EAAE;IACLc,QAAQ,EAAE,UAAU;IACpBlC,eAAe,EAAE,aAAa;IAC9BwC,QAAQ,EAAE,SAAS;IACnBC,UAAU,EAAE;EACd,CAAC;EACDpB,UAAU,EAAE;IACV,GAAG5C,aAAa;IAChBiE,MAAM,EAAE;EACV,CAAC;EACDnB,UAAU,EAAE;IACVmB,MAAM,EAAE;EACV,CAAC;EACDjB,IAAI,EAAE;IACJiB,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE,CAAC;IACZF,UAAU,EAAE;EACd,CAAC;EACDf,QAAQ,EAAE;IACRc,QAAQ,EAAE;EACZ,CAAC;EACDb,QAAQ,EAAE;IACRa,QAAQ,EAAE,QAAQ;IAClBG,SAAS,EAAE,CAAC;IACZF,UAAU,EAAE;IACZ;IACA;EACF,CAAC;EACDb,cAAc,EAAE;IACdc,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -3,18 +3,61 @@
3
3
  import * as React from 'react';
4
4
  import { Dimensions, StyleSheet, View } from 'react-native';
5
5
  import { ABSOLUTE_FILL } from "../absoluteFill.js";
6
+ import { getSurfaceInteractionBlocking } from "../surfaceInteractionConfig.js";
6
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ /** No hole yet: collapses the top/left/right bands, leaving one full-screen band. */
9
+ const NO_HOLE = {
10
+ top: 0,
11
+ left: 0,
12
+ width: 0,
13
+ height: 0
14
+ };
15
+
16
+ /**
17
+ * Intersect the hole with the screen, or drop it when the target is off-screen.
18
+ *
19
+ * Targets are measured before `scrollAnchorIntoView` has brought them in, so an
20
+ * unclamped rect can sit above the viewport. The bands then disagree — the top
21
+ * one collapses while the side ones still paint at y=0 — and leave phantom dim
22
+ * blocks pinned to the top edge that reflow as the scroll settles.
23
+ */
24
+ function clampToScreen(rect, screenWidth, screenHeight) {
25
+ if (rect == null) {
26
+ return null;
27
+ }
28
+ const top = Math.max(0, rect.top);
29
+ const left = Math.max(0, rect.left);
30
+ const bottom = Math.min(screenHeight, rect.top + rect.height);
31
+ const right = Math.min(screenWidth, rect.left + rect.width);
32
+ if (bottom <= top || right <= left) {
33
+ return null;
34
+ }
35
+ return {
36
+ top,
37
+ left,
38
+ width: right - left,
39
+ height: bottom - top
40
+ };
41
+ }
42
+
7
43
  /**
8
44
  * Four-block dimmed cutout around the padded target (web tooltip backdrop).
9
45
  *
10
- * Dim bands use `pointerEvents="none"` so touches reach the app — React Native
11
- * cannot block taps while allowing scroll the way web's `mousedown`-only
12
- * swallow does. When `targetBlocked`, only the hole (target) is covered with a
13
- * transparent `pointerEvents="auto"` layer.
46
+ * When surface interaction blocking is enabled (default), dim bands use
47
+ * `pointerEvents="auto"` so taps outside the hole are swallowed. The target
48
+ * hole stays open for guided-tour taps unless `targetBlocked` seals it.
49
+ *
50
+ * When blocking is disabled (`Userflow.setSurfaceInteractionBlocking(false)`),
51
+ * bands revert to `pointerEvents="none"` so the host app stays scrollable and
52
+ * tappable — legacy pass-through behavior. The `targetBlocked` hole seal is
53
+ * unchanged and still mounts when set.
14
54
  *
15
- * MVP note: each block uses its own translucent opacity. That matches non-overlapping
16
- * tiles well, but can look slightly uneven vs web’s single shadow-hole when other
17
- * translucent overlays stack. Acceptable for Phase 3; a single masked layer can come later.
55
+ * The bands are opaque and share one translucent parent, so the dim is composited
56
+ * once. Per-band opacity looks identical while the tiles truly abut, but any frame
57
+ * where two of them overlap darkens twice: going from no hole to a measured one
58
+ * grows the top band while the bottom band still covers the screen, which painted a
59
+ * doubled rectangle over the upper screen until the geometry settled. Group opacity
60
+ * makes overlap invisible instead of relying on the four rects always agreeing.
18
61
  */
19
62
  export function TooltipCutout({
20
63
  targetRect,
@@ -26,59 +69,69 @@ export function TooltipCutout({
26
69
  width: sw,
27
70
  height: sh
28
71
  } = Dimensions.get('window');
72
+ const hole = clampToScreen(targetRect, sw, sh);
29
73
  const {
30
74
  top,
31
75
  left,
32
76
  width,
33
77
  height
34
- } = targetRect;
78
+ } = hole ?? NO_HOLE;
35
79
  const right = left + width;
36
80
  const bottom = top + height;
37
81
  const blockStyle = {
38
- backgroundColor: backdropColor,
39
- opacity: backdropOpacity
82
+ backgroundColor: backdropColor
40
83
  };
84
+ const blockInteraction = getSurfaceInteractionBlocking();
85
+ const bandPointerEvents = blockInteraction ? 'auto' : 'none';
86
+ const dimPointerEvents = blockInteraction ? 'box-none' : 'none';
41
87
  return /*#__PURE__*/_jsxs(View, {
42
88
  style: ABSOLUTE_FILL,
43
89
  pointerEvents: "box-none",
44
90
  testID: "userflow-tooltip-cutout",
45
- children: [/*#__PURE__*/_jsx(View, {
46
- pointerEvents: "none",
47
- testID: "userflow-tooltip-cutout-top",
48
- style: [styles.block, blockStyle, {
49
- top: 0,
50
- left: 0,
51
- width: sw,
52
- height: Math.max(0, top)
53
- }]
54
- }), /*#__PURE__*/_jsx(View, {
55
- pointerEvents: "none",
56
- testID: "userflow-tooltip-cutout-left",
57
- style: [styles.block, blockStyle, {
58
- top: Math.max(0, top),
59
- left: 0,
60
- width: Math.max(0, left),
61
- height: Math.max(0, height)
62
- }]
63
- }), /*#__PURE__*/_jsx(View, {
64
- pointerEvents: "none",
65
- testID: "userflow-tooltip-cutout-right",
66
- style: [styles.block, blockStyle, {
67
- top: Math.max(0, top),
68
- left: Math.max(0, right),
69
- width: Math.max(0, sw - right),
70
- height: Math.max(0, height)
71
- }]
72
- }), /*#__PURE__*/_jsx(View, {
73
- pointerEvents: "none",
74
- testID: "userflow-tooltip-cutout-bottom",
75
- style: [styles.block, blockStyle, {
76
- top: Math.max(0, bottom),
77
- left: 0,
78
- width: sw,
79
- height: Math.max(0, sh - bottom)
80
- }]
81
- }), targetBlocked ? /*#__PURE__*/_jsx(View, {
91
+ children: [/*#__PURE__*/_jsxs(View, {
92
+ pointerEvents: dimPointerEvents,
93
+ testID: "userflow-tooltip-cutout-dim",
94
+ style: [ABSOLUTE_FILL, {
95
+ opacity: backdropOpacity
96
+ }],
97
+ children: [/*#__PURE__*/_jsx(View, {
98
+ pointerEvents: bandPointerEvents,
99
+ testID: "userflow-tooltip-cutout-top",
100
+ style: [styles.block, blockStyle, {
101
+ top: 0,
102
+ left: 0,
103
+ width: sw,
104
+ height: Math.max(0, top)
105
+ }]
106
+ }), /*#__PURE__*/_jsx(View, {
107
+ pointerEvents: bandPointerEvents,
108
+ testID: "userflow-tooltip-cutout-left",
109
+ style: [styles.block, blockStyle, {
110
+ top: Math.max(0, top),
111
+ left: 0,
112
+ width: Math.max(0, left),
113
+ height: Math.max(0, height)
114
+ }]
115
+ }), /*#__PURE__*/_jsx(View, {
116
+ pointerEvents: bandPointerEvents,
117
+ testID: "userflow-tooltip-cutout-right",
118
+ style: [styles.block, blockStyle, {
119
+ top: Math.max(0, top),
120
+ left: Math.max(0, right),
121
+ width: Math.max(0, sw - right),
122
+ height: Math.max(0, height)
123
+ }]
124
+ }), /*#__PURE__*/_jsx(View, {
125
+ pointerEvents: bandPointerEvents,
126
+ testID: "userflow-tooltip-cutout-bottom",
127
+ style: [styles.block, blockStyle, {
128
+ top: Math.max(0, bottom),
129
+ left: 0,
130
+ width: sw,
131
+ height: Math.max(0, sh - bottom)
132
+ }]
133
+ })]
134
+ }), targetBlocked && hole != null ? /*#__PURE__*/_jsx(View, {
82
135
  pointerEvents: "auto",
83
136
  testID: "userflow-tooltip-target-block",
84
137
  style: [styles.block, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Dimensions","StyleSheet","View","ABSOLUTE_FILL","jsx","_jsx","jsxs","_jsxs","TooltipCutout","targetRect","backdropColor","backdropOpacity","targetBlocked","width","sw","height","sh","get","top","left","right","bottom","blockStyle","backgroundColor","opacity","style","pointerEvents","testID","children","styles","block","Math","max","create","position"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/TooltipCutout.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE3D,SAASC,aAAa,QAAQ,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAoBhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAC;EAC5BC,UAAU;EACVC,aAAa;EACbC,eAAe;EACfC;AACkB,CAAC,EAAsB;EACzC,MAAM;IAAEC,KAAK,EAAEC,EAAE;IAAEC,MAAM,EAAEC;EAAG,CAAC,GAAGhB,UAAU,CAACiB,GAAG,CAAC,QAAQ,CAAC;EAC1D,MAAM;IAAEC,GAAG;IAAEC,IAAI;IAAEN,KAAK;IAAEE;EAAO,CAAC,GAAGN,UAAU;EAC/C,MAAMW,KAAK,GAAGD,IAAI,GAAGN,KAAK;EAC1B,MAAMQ,MAAM,GAAGH,GAAG,GAAGH,MAAM;EAC3B,MAAMO,UAAU,GAAG;IAAEC,eAAe,EAAEb,aAAa;IAAEc,OAAO,EAAEb;EAAgB,CAAC;EAE/E,oBACEJ,KAAA,CAACL,IAAI;IAACuB,KAAK,EAAEtB,aAAc;IAACuB,aAAa,EAAC,UAAU;IAACC,MAAM,EAAC,yBAAyB;IAAAC,QAAA,gBACnFvB,IAAA,CAACH,IAAI;MACHwB,aAAa,EAAC,MAAM;MACpBC,MAAM,EAAC,6BAA6B;MACpCF,KAAK,EAAE,CAACI,MAAM,CAACC,KAA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AAC,CAAC,EAAEX,MAAM,CAAC;QAAEF,IAAI,EAAE,CAAC;QAAEN,KAAK,EAAEC,EAAE;QAAEC,MAAM,EAAEgB,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEhB,EAAE,GAAGK,MAAM;MAAE,CAAC;IAClF,CACH,CAAC,EACDT,aAAa,gBACZP,IAAA,CAACH,IAAI;MACHwB,aAAa,EAAC,MAAM;MACpBC,MAAM,EAAC,+BAA+B;MACtCF,KAAK,EAAE,CACLI,MAAM,CAACC,KAAK,EACZ;QACEZ,GAAG;QACHC,IAAI;QACJN,KAAK,EAAEkB,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEnB,KAAK,CAAC;QACzBE,MAAM,EAAEgB,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEjB,MAAM;MAC5B,CAAC;IACD,CACH,CAAC,GACA,IAAI;EAAA,CACJ,CAAC;AAEX;AAEA,MAAMc,MAAM,GAAG5B,UAAU,CAACgC,MAAM,CAAC;EAC/BH,KAAK,EAAE;IACLI,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Dimensions","StyleSheet","View","ABSOLUTE_FILL","getSurfaceInteractionBlocking","jsx","_jsx","jsxs","_jsxs","NO_HOLE","top","left","width","height","clampToScreen","rect","screenWidth","screenHeight","Math","max","bottom","min","right","TooltipCutout","targetRect","backdropColor","backdropOpacity","targetBlocked","sw","sh","get","hole","blockStyle","backgroundColor","blockInteraction","bandPointerEvents","dimPointerEvents","style","pointerEvents","testID","children","opacity","styles","block","create","position"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/TooltipCutout.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE3D,SAASC,aAAa,QAAQ,oBAAiB;AAC/C,SAASC,6BAA6B,QAAQ,gCAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA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CAACJ,IAAI;MACHoC,aAAa,EAAC,MAAM;MACpBC,MAAM,EAAC,+BAA+B;MACtCF,KAAK,EAAE,CACLK,MAAM,CAACC,KAAK,EACZ;QACEjC,GAAG;QACHC,IAAI;QACJC,KAAK,EAAEM,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEP,KAAK,CAAC;QACzBC,MAAM,EAAEK,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEN,MAAM;MAC5B,CAAC;IACD,CACH,CAAC,GACA,IAAI;EAAA,CACJ,CAAC;AAEX;AAEA,MAAM6B,MAAM,GAAGzC,UAAU,CAAC2C,MAAM,CAAC;EAC/BD,KAAK,EAAE;IACLE,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Platform, StyleSheet, View } from 'react-native';
5
+ import { isHighlightVisible } from "../resolveHighlightChrome.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ /**
8
+ * Mobile focus ring for the tooltip hole (mockup: thin brand stroke + soft
9
+ * halo). Web uses one CSS `box-shadow`; RN approximates that with a 2px
10
+ * stroke, one translucent band, and a real blur where the platform can
11
+ * paint a colored shadow (`shadow*` on iOS, `boxShadow` on RN 0.76+).
12
+ *
13
+ * Ring chrome is passed as a style array so `StyleSheet.create` numeric IDs
14
+ * are not object-spread (that drops `position: 'absolute'` on device).
15
+ */
16
+ export function TooltipHighlight({
17
+ targetRect,
18
+ chrome
19
+ }) {
20
+ if (!isHighlightVisible(chrome)) return null;
21
+ const rings = buildHighlightRings(targetRect, chrome);
22
+ if (rings.length === 0) return null;
23
+ return /*#__PURE__*/_jsx(View, {
24
+ pointerEvents: "none",
25
+ testID: "userflow-tooltip-highlight",
26
+ children: rings.map(ring => /*#__PURE__*/_jsx(View, {
27
+ pointerEvents: "none",
28
+ testID: ring.testID,
29
+ style: ring.style
30
+ }, ring.testID))
31
+ });
32
+ }
33
+ export function buildHighlightRings(rect, chrome) {
34
+ if (rect.width <= 0 || rect.height <= 0) return [];
35
+ const inset = chrome.type === 'INSIDE';
36
+ const rings = [];
37
+ let consumed = 0;
38
+ if (chrome.strokeWidth > 0) {
39
+ const frame = ringFrame(rect, chrome.strokeWidth, consumed, inset, chrome.borderRadius);
40
+ if (frame) {
41
+ rings.push({
42
+ testID: 'userflow-tooltip-highlight-stroke',
43
+ style: [styles.ring, frame, {
44
+ borderWidth: chrome.strokeWidth,
45
+ borderColor: chrome.color,
46
+ ...strokeGlow(chrome)
47
+ }]
48
+ });
49
+ consumed += chrome.strokeWidth;
50
+ }
51
+ }
52
+ if (chrome.radius > 0) {
53
+ const frame = ringFrame(rect, chrome.radius, consumed, inset, chrome.borderRadius);
54
+ if (frame) {
55
+ rings.push({
56
+ testID: 'userflow-tooltip-highlight-glow',
57
+ style: [styles.ring, frame, {
58
+ borderWidth: chrome.radius,
59
+ borderColor: chrome.glowColor
60
+ }]
61
+ });
62
+ }
63
+ }
64
+ return rings;
65
+ }
66
+ function strokeGlow(chrome) {
67
+ const blur = Math.max(chrome.radius, 6);
68
+ const glow = {
69
+ shadowColor: chrome.color,
70
+ shadowOffset: {
71
+ width: 0,
72
+ height: 0
73
+ },
74
+ shadowOpacity: Math.min(0.45, chrome.opacity),
75
+ shadowRadius: blur
76
+ };
77
+ if (Platform?.OS !== 'ios') {
78
+ glow.boxShadow = `0px 0px ${blur}px 0px ${chrome.glowColor}`;
79
+ }
80
+ return glow;
81
+ }
82
+ function ringFrame(rect, borderWidth, alreadyConsumed, inset, cornerRadius) {
83
+ if (borderWidth <= 0) return null;
84
+ const {
85
+ top,
86
+ left,
87
+ width,
88
+ height
89
+ } = rect;
90
+ if (inset) {
91
+ const nextWidth = width - alreadyConsumed * 2;
92
+ const nextHeight = height - alreadyConsumed * 2;
93
+ if (nextWidth < borderWidth * 2 || nextHeight < borderWidth * 2) return null;
94
+ return {
95
+ top: top + alreadyConsumed,
96
+ left: left + alreadyConsumed,
97
+ width: nextWidth,
98
+ height: nextHeight,
99
+ borderRadius: Math.max(0, cornerRadius - alreadyConsumed)
100
+ };
101
+ }
102
+ const outset = alreadyConsumed + borderWidth;
103
+ return {
104
+ top: top - outset,
105
+ left: left - outset,
106
+ width: width + outset * 2,
107
+ height: height + outset * 2,
108
+ borderRadius: cornerRadius + outset
109
+ };
110
+ }
111
+ const styles = StyleSheet.create({
112
+ ring: {
113
+ position: 'absolute',
114
+ backgroundColor: 'transparent',
115
+ overflow: 'visible'
116
+ }
117
+ });
118
+ //# sourceMappingURL=TooltipHighlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Platform","StyleSheet","View","isHighlightVisible","jsx","_jsx","TooltipHighlight","targetRect","chrome","rings","buildHighlightRings","length","pointerEvents","testID","children","map","ring","style","rect","width","height","inset","type","consumed","strokeWidth","frame","ringFrame","borderRadius","push","styles","borderWidth","borderColor","color","strokeGlow","radius","glowColor","blur","Math","max","glow","shadowColor","shadowOffset","shadowOpacity","min","opacity","shadowRadius","OS","boxShadow","alreadyConsumed","cornerRadius","top","left","nextWidth","nextHeight","outset","create","position","backgroundColor","overflow"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/TooltipHighlight.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAwC,cAAc;AAEzF,SAASC,kBAAkB,QAA8B,8BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAcrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAAC;EAC/BC,UAAU;EACVC;AACqB,CAAC,EAA6B;EACnD,IAAI,CAACL,kBAAkB,CAACK,MAAM,CAAC,EAAE,OAAO,IAAI;EAE5C,MAAMC,KAAK,GAAGC,mBAAmB,CAACH,UAAU,EAAEC,MAAM,CAAC;EACrD,IAAIC,KAAK,CAACE,MAAM,KAAK,CAAC,EAAE,OA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