@userflow-tech/react-native 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1332) hide show
  1. package/README.md +154 -79
  2. package/app.plugin.js +19 -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 +70 -15
  6. package/babel-plugin/index.js.map +1 -1
  7. package/babel-plugin.js +21 -0
  8. package/docs/anchoring.md +141 -13
  9. package/docs/deep-linking.md +83 -43
  10. package/docs/isolation.md +75 -0
  11. package/docs/theme-mapping.md +44 -15
  12. package/docs/troubleshooting.md +73 -43
  13. package/docs/webview-custom-banner-poc.md +64 -0
  14. package/expo-plugin/withUserflow.d.ts +3 -2
  15. package/expo-plugin/withUserflow.d.ts.map +1 -1
  16. package/expo-plugin/withUserflow.js +15 -9
  17. package/expo-plugin/withUserflow.js.map +1 -1
  18. package/lib/commonjs/anchors/AutoAnchorRegistry.js +150 -2
  19. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
  20. package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
  21. package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
  22. package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
  23. package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
  24. package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
  25. package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
  26. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
  27. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
  28. package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
  29. package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
  30. package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
  31. package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
  32. package/lib/commonjs/anchors/fiber/findAnchorFiber.js +60 -50
  33. package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
  34. package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
  35. package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
  36. package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
  37. package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
  38. package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
  39. package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
  40. package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
  41. package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
  42. package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
  43. package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
  44. package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
  45. package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
  46. package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
  47. package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
  48. package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
  49. package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
  50. package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
  51. package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
  52. package/lib/commonjs/anchors/resolveAutoAnchorHost.js +178 -0
  53. package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
  54. package/lib/commonjs/anchors/semanticMatcher.js +303 -0
  55. package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
  56. package/lib/commonjs/anonymousId.js +4 -1
  57. package/lib/commonjs/anonymousId.js.map +1 -1
  58. package/lib/commonjs/authoring/ElementPickerOverlay.js +566 -0
  59. package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
  60. package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
  61. package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
  62. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
  63. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
  64. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +86 -0
  65. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  66. package/lib/commonjs/authoring/chrome/ChromeButton.js +99 -0
  67. package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
  68. package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
  69. package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
  70. package/lib/commonjs/authoring/chrome/ChromeIcon.js +43 -0
  71. package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
  72. package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
  73. package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
  74. package/lib/commonjs/authoring/chrome/ChromeTopBar.js +123 -0
  75. package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
  76. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +64 -0
  77. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
  78. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +90 -0
  79. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
  80. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  81. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  82. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  83. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  84. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  85. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  86. package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
  87. package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  88. package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  89. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
  90. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  91. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  92. package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
  93. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  94. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  95. package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
  96. package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
  97. package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
  98. package/lib/commonjs/authoring/chrome/tokens.js +151 -0
  99. package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
  100. package/lib/commonjs/authoring/doubleTap.js +23 -0
  101. package/lib/commonjs/authoring/doubleTap.js.map +1 -0
  102. package/lib/commonjs/authoring/elementPickerController.js +102 -0
  103. package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
  104. package/lib/commonjs/authoring/fingerprintFromInstance.js +395 -0
  105. package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
  106. package/lib/commonjs/authoring/hitTest.js +354 -0
  107. package/lib/commonjs/authoring/hitTest.js.map +1 -0
  108. package/lib/commonjs/authoring/hostAtPoint.js +204 -0
  109. package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
  110. package/lib/commonjs/content/BannerStepButton.js +68 -0
  111. package/lib/commonjs/content/BannerStepButton.js.map +1 -0
  112. package/lib/commonjs/content/RichContentRenderer.js +12 -2
  113. package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
  114. package/lib/commonjs/content/StepButton.js +19 -4
  115. package/lib/commonjs/content/StepButton.js.map +1 -1
  116. package/lib/commonjs/content/buttonAppearance.js +16 -0
  117. package/lib/commonjs/content/buttonAppearance.js.map +1 -1
  118. package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
  119. package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
  120. package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
  121. package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
  122. package/lib/commonjs/content/themeColor.js +26 -0
  123. package/lib/commonjs/content/themeColor.js.map +1 -1
  124. package/lib/commonjs/deepLinking.js +4 -4
  125. package/lib/commonjs/deviceContext.js +158 -0
  126. package/lib/commonjs/deviceContext.js.map +1 -0
  127. package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
  128. package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
  129. package/lib/commonjs/evalJs/bootstrap.js +84 -0
  130. package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
  131. package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
  132. package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
  133. package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
  134. package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
  135. package/lib/commonjs/evalJs/evalJsController.js +124 -0
  136. package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
  137. package/lib/commonjs/evalJs/getWebView.js +81 -0
  138. package/lib/commonjs/evalJs/getWebView.js.map +1 -0
  139. package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
  140. package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
  141. package/lib/commonjs/evalJs/types.js +2 -0
  142. package/lib/commonjs/evalJs/types.js.map +1 -0
  143. package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
  144. package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
  145. package/lib/commonjs/expo-router/index.js +19 -0
  146. package/lib/commonjs/expo-router/index.js.map +1 -1
  147. package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
  148. package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
  149. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +42 -6
  150. package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
  151. package/lib/commonjs/hostAppVersion.js +242 -0
  152. package/lib/commonjs/hostAppVersion.js.map +1 -0
  153. package/lib/commonjs/index.js +214 -26
  154. package/lib/commonjs/index.js.map +1 -1
  155. package/lib/commonjs/lifecycle.js +2 -0
  156. package/lib/commonjs/lifecycle.js.map +1 -1
  157. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +22 -10
  158. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
  159. package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
  160. package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
  161. package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
  162. package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
  163. package/lib/commonjs/pairing/PairingController.js +272 -27
  164. package/lib/commonjs/pairing/PairingController.js.map +1 -1
  165. package/lib/commonjs/pairing/PreviewModeBanner.js +250 -84
  166. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
  167. package/lib/commonjs/pairing/deepLink.js +22 -5
  168. package/lib/commonjs/pairing/deepLink.js.map +1 -1
  169. package/lib/commonjs/pairing/deviceId.js +47 -0
  170. package/lib/commonjs/pairing/deviceId.js.map +1 -0
  171. package/lib/commonjs/pairing/diagnostics.js +14 -4
  172. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  173. package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
  174. package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
  175. package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
  176. package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
  177. package/lib/commonjs/pairing/tokenStorage.js +72 -9
  178. package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
  179. package/lib/commonjs/pairing/usePairingState.js +5 -1
  180. package/lib/commonjs/pairing/usePairingState.js.map +1 -1
  181. package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
  182. package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
  183. package/lib/commonjs/runtime/BannerHost.js +96 -0
  184. package/lib/commonjs/runtime/BannerHost.js.map +1 -0
  185. package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
  186. package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
  187. package/lib/commonjs/runtime/FlowRenderer.js +45 -21
  188. package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
  189. package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
  190. package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
  191. package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
  192. package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
  193. package/lib/commonjs/runtime/TargetPressBridge.js +27 -51
  194. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
  195. package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
  196. package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
  197. package/lib/commonjs/runtime/UserflowProvider.js +154 -30
  198. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
  199. package/lib/commonjs/runtime/bannerEngine.js +63 -0
  200. package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
  201. package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
  202. package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
  203. package/lib/commonjs/runtime/bannerPlacement.js +37 -0
  204. package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
  205. package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
  206. package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
  207. package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
  208. package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
  209. package/lib/commonjs/runtime/flowEngine.js +78 -4
  210. package/lib/commonjs/runtime/flowEngine.js.map +1 -1
  211. package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
  212. package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
  213. package/lib/commonjs/runtime/isolateCall.js +48 -0
  214. package/lib/commonjs/runtime/isolateCall.js.map +1 -0
  215. package/lib/commonjs/runtime/reportSdkError.js +19 -0
  216. package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
  217. package/lib/commonjs/runtime/useBannerSession.js +37 -0
  218. package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
  219. package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
  220. package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
  221. package/lib/commonjs/screenTracker.js +72 -5
  222. package/lib/commonjs/screenTracker.js.map +1 -1
  223. package/lib/commonjs/surfaces/BannerBar.js +160 -0
  224. package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
  225. package/lib/commonjs/surfaces/BannerSurface.js +78 -0
  226. package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
  227. package/lib/commonjs/surfaces/CardFade.js +31 -0
  228. package/lib/commonjs/surfaces/CardFade.js.map +1 -0
  229. package/lib/commonjs/surfaces/CloseButton.js +11 -6
  230. package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
  231. package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
  232. package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
  233. package/lib/commonjs/surfaces/ModalSurface.js +51 -35
  234. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
  235. package/lib/commonjs/surfaces/TooltipSurface.js +383 -88
  236. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
  237. package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
  238. package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
  239. package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
  240. package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
  241. package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
  242. package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
  243. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
  244. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
  245. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
  246. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
  247. package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
  248. package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
  249. package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
  250. package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
  251. package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
  252. package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
  253. package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
  254. package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
  255. package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
  256. package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
  257. package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
  258. package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
  259. package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
  260. package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
  261. package/lib/commonjs/surfaces/cardTransition.js +70 -0
  262. package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
  263. package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
  264. package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
  265. package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
  266. package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
  267. package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
  268. package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
  269. package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
  270. package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
  271. package/lib/commonjs/surfaces/safeArea.js +23 -0
  272. package/lib/commonjs/surfaces/safeArea.js.map +1 -1
  273. package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
  274. package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
  275. package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
  276. package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
  277. package/lib/commonjs/surfaces/themeChrome.js +4 -1
  278. package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
  279. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
  280. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
  281. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
  282. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
  283. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
  284. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  285. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
  286. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  287. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
  288. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  289. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
  290. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  291. package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
  292. package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
  293. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
  294. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  295. package/lib/commonjs/version.js +1 -1
  296. package/lib/module/anchors/AutoAnchorRegistry.js +151 -2
  297. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
  298. package/lib/module/anchors/anchorChangeTicker.js +10 -0
  299. package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
  300. package/lib/module/anchors/elementConditionEvaluator.js +25 -12
  301. package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
  302. package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
  303. package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
  304. package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
  305. package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
  306. package/lib/module/anchors/fiber/fiberInternals.js +139 -3
  307. package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
  308. package/lib/module/anchors/fiber/fiberPath.js +118 -0
  309. package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
  310. package/lib/module/anchors/fiber/findAnchorFiber.js +60 -50
  311. package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
  312. package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
  313. package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
  314. package/lib/module/anchors/fiber/readHostContent.js +127 -0
  315. package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
  316. package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
  317. package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
  318. package/lib/module/anchors/fiber/visibleRect.js +139 -0
  319. package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
  320. package/lib/module/anchors/fiber/visibleScreens.js +73 -37
  321. package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
  322. package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
  323. package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
  324. package/lib/module/anchors/fiberAnchorCache.js +40 -0
  325. package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
  326. package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
  327. package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
  328. package/lib/module/anchors/resolveAnchorHost.js +15 -21
  329. package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
  330. package/lib/module/anchors/resolveAutoAnchorHost.js +174 -0
  331. package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
  332. package/lib/module/anchors/semanticMatcher.js +297 -0
  333. package/lib/module/anchors/semanticMatcher.js.map +1 -0
  334. package/lib/module/anonymousId.js +4 -2
  335. package/lib/module/anonymousId.js.map +1 -1
  336. package/lib/module/authoring/ElementPickerOverlay.js +561 -0
  337. package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
  338. package/lib/module/authoring/capturePickerScreenshot.js +68 -0
  339. package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
  340. package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
  341. package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
  342. package/lib/module/authoring/chrome/ChromeBottomSheet.js +81 -0
  343. package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  344. package/lib/module/authoring/chrome/ChromeButton.js +94 -0
  345. package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
  346. package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
  347. package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
  348. package/lib/module/authoring/chrome/ChromeIcon.js +37 -0
  349. package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
  350. package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
  351. package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
  352. package/lib/module/authoring/chrome/ChromeTopBar.js +117 -0
  353. package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
  354. package/lib/module/authoring/chrome/DoubleTapBridge.js +59 -0
  355. package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
  356. package/lib/module/authoring/chrome/doubleTapMonitor.js +85 -0
  357. package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
  358. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  359. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  360. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  361. package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  362. package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  363. package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  364. package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
  365. package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  366. package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  367. package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
  368. package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  369. package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  370. package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
  371. package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  372. package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  373. package/lib/module/authoring/chrome/icons/xmark.png +0 -0
  374. package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
  375. package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
  376. package/lib/module/authoring/chrome/tokens.js +147 -0
  377. package/lib/module/authoring/chrome/tokens.js.map +1 -0
  378. package/lib/module/authoring/doubleTap.js +18 -0
  379. package/lib/module/authoring/doubleTap.js.map +1 -0
  380. package/lib/module/authoring/elementPickerController.js +97 -0
  381. package/lib/module/authoring/elementPickerController.js.map +1 -0
  382. package/lib/module/authoring/fingerprintFromInstance.js +381 -0
  383. package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
  384. package/lib/module/authoring/hitTest.js +346 -0
  385. package/lib/module/authoring/hitTest.js.map +1 -0
  386. package/lib/module/authoring/hostAtPoint.js +199 -0
  387. package/lib/module/authoring/hostAtPoint.js.map +1 -0
  388. package/lib/module/content/BannerStepButton.js +63 -0
  389. package/lib/module/content/BannerStepButton.js.map +1 -0
  390. package/lib/module/content/RichContentRenderer.js +12 -2
  391. package/lib/module/content/RichContentRenderer.js.map +1 -1
  392. package/lib/module/content/StepButton.js +19 -4
  393. package/lib/module/content/StepButton.js.map +1 -1
  394. package/lib/module/content/buttonAppearance.js +14 -0
  395. package/lib/module/content/buttonAppearance.js.map +1 -1
  396. package/lib/module/content/resolveBannerButtonChrome.js +41 -0
  397. package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
  398. package/lib/module/content/resolveStepButtonChrome.js +8 -6
  399. package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
  400. package/lib/module/content/themeColor.js +24 -0
  401. package/lib/module/content/themeColor.js.map +1 -1
  402. package/lib/module/deepLinking.js +4 -4
  403. package/lib/module/deviceContext.js +142 -0
  404. package/lib/module/deviceContext.js.map +1 -0
  405. package/lib/module/evalJs/EvalJsHost.js +239 -0
  406. package/lib/module/evalJs/EvalJsHost.js.map +1 -0
  407. package/lib/module/evalJs/bootstrap.js +76 -0
  408. package/lib/module/evalJs/bootstrap.js.map +1 -0
  409. package/lib/module/evalJs/bridgeMessages.js +139 -0
  410. package/lib/module/evalJs/bridgeMessages.js.map +1 -0
  411. package/lib/module/evalJs/evalJsBridge.js +25 -0
  412. package/lib/module/evalJs/evalJsBridge.js.map +1 -0
  413. package/lib/module/evalJs/evalJsController.js +119 -0
  414. package/lib/module/evalJs/evalJsController.js.map +1 -0
  415. package/lib/module/evalJs/getWebView.js +76 -0
  416. package/lib/module/evalJs/getWebView.js.map +1 -0
  417. package/lib/module/evalJs/injectEvalPending.js +15 -0
  418. package/lib/module/evalJs/injectEvalPending.js.map +1 -0
  419. package/lib/module/evalJs/types.js +2 -0
  420. package/lib/module/evalJs/types.js.map +1 -0
  421. package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
  422. package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
  423. package/lib/module/expo-router/index.js +1 -0
  424. package/lib/module/expo-router/index.js.map +1 -1
  425. package/lib/module/expo-router/redirectSystemPath.js +70 -0
  426. package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
  427. package/lib/module/expo-router/useUserflowExpoRouter.js +44 -8
  428. package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
  429. package/lib/module/hostAppVersion.js +225 -0
  430. package/lib/module/hostAppVersion.js.map +1 -0
  431. package/lib/module/index.js +211 -29
  432. package/lib/module/index.js.map +1 -1
  433. package/lib/module/lifecycle.js +2 -0
  434. package/lib/module/lifecycle.js.map +1 -1
  435. package/lib/module/navigation/WithUserflowReactNavigation.js +23 -11
  436. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
  437. package/lib/module/navigation/isOverlayPresentation.js +58 -0
  438. package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
  439. package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
  440. package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
  441. package/lib/module/pairing/PairingController.js +273 -28
  442. package/lib/module/pairing/PairingController.js.map +1 -1
  443. package/lib/module/pairing/PreviewModeBanner.js +250 -85
  444. package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
  445. package/lib/module/pairing/deepLink.js +21 -5
  446. package/lib/module/pairing/deepLink.js.map +1 -1
  447. package/lib/module/pairing/deviceId.js +41 -0
  448. package/lib/module/pairing/deviceId.js.map +1 -0
  449. package/lib/module/pairing/diagnostics.js +13 -4
  450. package/lib/module/pairing/diagnostics.js.map +1 -1
  451. package/lib/module/pairing/elementPickerRelay.js +87 -0
  452. package/lib/module/pairing/elementPickerRelay.js.map +1 -0
  453. package/lib/module/pairing/resolvePreviewChrome.js +48 -0
  454. package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
  455. package/lib/module/pairing/tokenStorage.js +71 -9
  456. package/lib/module/pairing/tokenStorage.js.map +1 -1
  457. package/lib/module/pairing/usePairingState.js +5 -1
  458. package/lib/module/pairing/usePairingState.js.map +1 -1
  459. package/lib/module/pairing/usePreviewBarHold.js +134 -0
  460. package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
  461. package/lib/module/runtime/BannerHost.js +92 -0
  462. package/lib/module/runtime/BannerHost.js.map +1 -0
  463. package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
  464. package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
  465. package/lib/module/runtime/FlowRenderer.js +45 -21
  466. package/lib/module/runtime/FlowRenderer.js.map +1 -1
  467. package/lib/module/runtime/FlowSurfaceFade.js +49 -26
  468. package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
  469. package/lib/module/runtime/SdkErrorBoundary.js +55 -0
  470. package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
  471. package/lib/module/runtime/TargetPressBridge.js +27 -51
  472. package/lib/module/runtime/TargetPressBridge.js.map +1 -1
  473. package/lib/module/runtime/UserflowOverlay.js +92 -0
  474. package/lib/module/runtime/UserflowOverlay.js.map +1 -0
  475. package/lib/module/runtime/UserflowProvider.js +155 -31
  476. package/lib/module/runtime/UserflowProvider.js.map +1 -1
  477. package/lib/module/runtime/bannerEngine.js +55 -0
  478. package/lib/module/runtime/bannerEngine.js.map +1 -0
  479. package/lib/module/runtime/bannerEngineContext.js +7 -0
  480. package/lib/module/runtime/bannerEngineContext.js.map +1 -0
  481. package/lib/module/runtime/bannerPlacement.js +30 -0
  482. package/lib/module/runtime/bannerPlacement.js.map +1 -0
  483. package/lib/module/runtime/changedTouchPoints.js +43 -0
  484. package/lib/module/runtime/changedTouchPoints.js.map +1 -0
  485. package/lib/module/runtime/embedBannerRegistry.js +24 -0
  486. package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
  487. package/lib/module/runtime/flowEngine.js +75 -4
  488. package/lib/module/runtime/flowEngine.js.map +1 -1
  489. package/lib/module/runtime/flowSessionViewState.js +32 -7
  490. package/lib/module/runtime/flowSessionViewState.js.map +1 -1
  491. package/lib/module/runtime/isolateCall.js +43 -0
  492. package/lib/module/runtime/isolateCall.js.map +1 -0
  493. package/lib/module/runtime/reportSdkError.js +15 -0
  494. package/lib/module/runtime/reportSdkError.js.map +1 -0
  495. package/lib/module/runtime/useBannerSession.js +33 -0
  496. package/lib/module/runtime/useBannerSession.js.map +1 -0
  497. package/lib/module/runtime/useFlowSessionState.js +2 -1
  498. package/lib/module/runtime/useFlowSessionState.js.map +1 -1
  499. package/lib/module/screenTracker.js +67 -5
  500. package/lib/module/screenTracker.js.map +1 -1
  501. package/lib/module/surfaces/BannerBar.js +155 -0
  502. package/lib/module/surfaces/BannerBar.js.map +1 -0
  503. package/lib/module/surfaces/BannerSurface.js +72 -0
  504. package/lib/module/surfaces/BannerSurface.js.map +1 -0
  505. package/lib/module/surfaces/CardFade.js +26 -0
  506. package/lib/module/surfaces/CardFade.js.map +1 -0
  507. package/lib/module/surfaces/CloseButton.js +10 -6
  508. package/lib/module/surfaces/CloseButton.js.map +1 -1
  509. package/lib/module/surfaces/MadeWithUserflow.js +11 -7
  510. package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
  511. package/lib/module/surfaces/ModalSurface.js +53 -37
  512. package/lib/module/surfaces/ModalSurface.js.map +1 -1
  513. package/lib/module/surfaces/TooltipSurface.js +385 -91
  514. package/lib/module/surfaces/TooltipSurface.js.map +1 -1
  515. package/lib/module/surfaces/bannerBarLayout.js +69 -0
  516. package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
  517. package/lib/module/surfaces/bannerBarTokens.js +37 -0
  518. package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
  519. package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
  520. package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
  521. package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
  522. package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
  523. package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
  524. package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
  525. package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
  526. package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
  527. package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
  528. package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
  529. package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
  530. package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
  531. package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
  532. package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
  533. package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
  534. package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
  535. package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
  536. package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
  537. package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
  538. package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
  539. package/lib/module/surfaces/cardTransition.js +64 -0
  540. package/lib/module/surfaces/cardTransition.js.map +1 -0
  541. package/lib/module/surfaces/resolveBannerTheme.js +16 -0
  542. package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
  543. package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
  544. package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
  545. package/lib/module/surfaces/resolveModalLayout.js +7 -3
  546. package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
  547. package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
  548. package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
  549. package/lib/module/surfaces/safeArea.js +22 -0
  550. package/lib/module/surfaces/safeArea.js.map +1 -1
  551. package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
  552. package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
  553. package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
  554. package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
  555. package/lib/module/surfaces/themeChrome.js +3 -1
  556. package/lib/module/surfaces/themeChrome.js.map +1 -1
  557. package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
  558. package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
  559. package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
  560. package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
  561. package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
  562. package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  563. package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
  564. package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  565. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
  566. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  567. package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
  568. package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  569. package/lib/module/surfaces/tooltip/rect.js +11 -0
  570. package/lib/module/surfaces/tooltip/rect.js.map +1 -1
  571. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
  572. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  573. package/lib/module/version.js +1 -1
  574. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +40 -0
  575. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  576. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
  577. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  578. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
  579. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  580. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  581. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  582. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  583. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  584. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
  585. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  586. package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
  587. package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
  588. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
  589. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
  590. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  591. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  592. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
  593. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  594. package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
  595. package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
  596. package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
  597. package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
  598. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
  599. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
  600. package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
  601. package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
  602. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
  603. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  604. package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
  605. package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
  606. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
  607. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  608. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  609. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  610. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +50 -0
  611. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
  612. package/lib/typescript/commonjs/src/anonymousId.d.ts +1 -0
  613. package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
  614. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +8 -0
  615. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  616. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
  617. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  618. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  619. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  620. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +24 -0
  621. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  622. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
  623. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  624. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  625. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  626. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  627. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  628. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  629. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  630. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +33 -0
  631. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  632. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  633. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  634. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +31 -0
  635. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  636. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +142 -0
  637. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
  638. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
  639. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
  640. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +58 -0
  641. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
  642. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +81 -0
  643. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  644. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +75 -0
  645. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
  646. package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
  647. package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
  648. package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
  649. package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
  650. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
  651. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
  652. package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
  653. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
  654. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
  655. package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
  656. package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
  657. package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  658. package/lib/typescript/commonjs/src/content/themeColor.d.ts +7 -0
  659. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
  660. package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
  661. package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
  662. package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
  663. package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
  664. package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
  665. package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
  666. package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
  667. package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
  668. package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
  669. package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
  670. package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
  671. package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
  672. package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
  673. package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
  674. package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
  675. package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
  676. package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
  677. package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
  678. package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
  679. package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
  680. package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
  681. package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
  682. package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
  683. package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
  684. package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
  685. package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
  686. package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
  687. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
  688. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  689. package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
  690. package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
  691. package/lib/typescript/commonjs/src/index.d.ts +69 -3
  692. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  693. package/lib/typescript/commonjs/src/lifecycle.d.ts +10 -1
  694. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
  695. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  696. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
  697. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  698. package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
  699. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +78 -4
  700. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
  701. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +14 -1
  702. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  703. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
  704. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
  705. package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
  706. package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
  707. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +8 -2
  708. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
  709. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
  710. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
  711. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
  712. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  713. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +16 -2
  714. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
  715. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
  716. package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
  717. package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
  718. package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
  719. package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
  720. package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
  721. package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
  722. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
  723. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
  724. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
  725. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  726. package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
  727. package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
  728. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
  729. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
  730. package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
  731. package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
  732. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +15 -7
  733. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
  734. package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
  735. package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
  736. package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
  737. package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
  738. package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
  739. package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
  740. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
  741. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
  742. package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
  743. package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
  744. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
  745. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
  746. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
  747. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
  748. package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
  749. package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
  750. package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
  751. package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
  752. package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
  753. package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
  754. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
  755. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
  756. package/lib/typescript/commonjs/src/screenTracker.d.ts +26 -4
  757. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
  758. package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
  759. package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
  760. package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
  761. package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
  762. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
  763. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
  764. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
  765. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
  766. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
  767. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
  768. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
  769. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
  770. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
  771. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
  772. package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
  773. package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
  774. package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
  775. package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
  776. package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
  777. package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
  778. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
  779. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
  780. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
  781. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
  782. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
  783. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
  784. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
  785. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
  786. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
  787. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
  788. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
  789. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
  790. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
  791. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
  792. package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
  793. package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
  794. package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
  795. package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
  796. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
  797. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
  798. package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
  799. package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
  800. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  801. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  802. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
  803. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  804. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  805. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  806. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +6 -0
  807. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
  808. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  809. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  810. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  811. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  812. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
  813. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
  814. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  815. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  816. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  817. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  818. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  819. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  820. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  821. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  822. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  823. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  824. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  825. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  826. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
  827. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
  828. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  829. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  830. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  831. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +40 -0
  832. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  833. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
  834. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  835. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
  836. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  837. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  838. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  839. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  840. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  841. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
  842. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  843. package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
  844. package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
  845. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
  846. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
  847. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  848. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  849. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
  850. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  851. package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
  852. package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
  853. package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
  854. package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
  855. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
  856. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
  857. package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
  858. package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
  859. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
  860. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  861. package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
  862. package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
  863. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
  864. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  865. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  866. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  867. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +50 -0
  868. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
  869. package/lib/typescript/module/src/anonymousId.d.ts +1 -0
  870. package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
  871. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +8 -0
  872. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  873. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
  874. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  875. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  876. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  877. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +24 -0
  878. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  879. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
  880. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  881. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  882. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  883. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  884. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  885. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  886. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  887. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +33 -0
  888. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  889. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  890. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  891. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +31 -0
  892. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  893. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +142 -0
  894. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
  895. package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
  896. package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
  897. package/lib/typescript/module/src/authoring/elementPickerController.d.ts +58 -0
  898. package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
  899. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +81 -0
  900. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  901. package/lib/typescript/module/src/authoring/hitTest.d.ts +75 -0
  902. package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
  903. package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
  904. package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
  905. package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
  906. package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
  907. package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
  908. package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
  909. package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
  910. package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
  911. package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
  912. package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
  913. package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
  914. package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  915. package/lib/typescript/module/src/content/themeColor.d.ts +7 -0
  916. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
  917. package/lib/typescript/module/src/content/types.d.ts +1 -0
  918. package/lib/typescript/module/src/content/types.d.ts.map +1 -1
  919. package/lib/typescript/module/src/deepLinking.d.ts +4 -4
  920. package/lib/typescript/module/src/deviceContext.d.ts +66 -0
  921. package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
  922. package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
  923. package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
  924. package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
  925. package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
  926. package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
  927. package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
  928. package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
  929. package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
  930. package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
  931. package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
  932. package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
  933. package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
  934. package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
  935. package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
  936. package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
  937. package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
  938. package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
  939. package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
  940. package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
  941. package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
  942. package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
  943. package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
  944. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
  945. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  946. package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
  947. package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
  948. package/lib/typescript/module/src/index.d.ts +69 -3
  949. package/lib/typescript/module/src/index.d.ts.map +1 -1
  950. package/lib/typescript/module/src/lifecycle.d.ts +10 -1
  951. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
  952. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  953. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
  954. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  955. package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
  956. package/lib/typescript/module/src/pairing/PairingController.d.ts +78 -4
  957. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
  958. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +14 -1
  959. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  960. package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
  961. package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
  962. package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
  963. package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
  964. package/lib/typescript/module/src/pairing/diagnostics.d.ts +8 -2
  965. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
  966. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
  967. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
  968. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
  969. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  970. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +16 -2
  971. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
  972. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
  973. package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
  974. package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
  975. package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
  976. package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
  977. package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
  978. package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
  979. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
  980. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
  981. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
  982. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  983. package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
  984. package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
  985. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
  986. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
  987. package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
  988. package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
  989. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +15 -7
  990. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
  991. package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
  992. package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
  993. package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
  994. package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
  995. package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
  996. package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
  997. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
  998. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
  999. package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
  1000. package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
  1001. package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
  1002. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
  1003. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
  1004. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
  1005. package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
  1006. package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
  1007. package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
  1008. package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
  1009. package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
  1010. package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
  1011. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
  1012. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
  1013. package/lib/typescript/module/src/screenTracker.d.ts +26 -4
  1014. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
  1015. package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
  1016. package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
  1017. package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
  1018. package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
  1019. package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
  1020. package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
  1021. package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
  1022. package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
  1023. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
  1024. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
  1025. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
  1026. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
  1027. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
  1028. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
  1029. package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
  1030. package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
  1031. package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
  1032. package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
  1033. package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
  1034. package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
  1035. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
  1036. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
  1037. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
  1038. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
  1039. package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
  1040. package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
  1041. package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
  1042. package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
  1043. package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
  1044. package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
  1045. package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
  1046. package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
  1047. package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
  1048. package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
  1049. package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
  1050. package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
  1051. package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
  1052. package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
  1053. package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
  1054. package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
  1055. package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
  1056. package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
  1057. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  1058. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  1059. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
  1060. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  1061. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  1062. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  1063. package/lib/typescript/module/src/surfaces/safeArea.d.ts +6 -0
  1064. package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
  1065. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  1066. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  1067. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  1068. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  1069. package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
  1070. package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
  1071. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  1072. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  1073. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  1074. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  1075. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  1076. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  1077. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  1078. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  1079. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  1080. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  1081. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  1082. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  1083. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
  1084. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
  1085. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  1086. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  1087. package/lib/typescript/module/src/version.d.ts +1 -1
  1088. package/package.json +24 -17
  1089. package/src/anchors/AutoAnchorRegistry.ts +169 -2
  1090. package/src/anchors/anchorChangeTicker.ts +10 -0
  1091. package/src/anchors/elementConditionEvaluator.ts +29 -16
  1092. package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
  1093. package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
  1094. package/src/anchors/fiber/fiberInternals.ts +166 -3
  1095. package/src/anchors/fiber/fiberPath.ts +117 -0
  1096. package/src/anchors/fiber/findAnchorFiber.ts +57 -47
  1097. package/src/anchors/fiber/indexHostFibers.ts +136 -0
  1098. package/src/anchors/fiber/readHostContent.ts +146 -0
  1099. package/src/anchors/fiber/resolveFiberPath.ts +215 -0
  1100. package/src/anchors/fiber/visibleRect.ts +153 -0
  1101. package/src/anchors/fiber/visibleScreens.ts +74 -36
  1102. package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
  1103. package/src/anchors/fiberAnchorCache.ts +45 -0
  1104. package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
  1105. package/src/anchors/resolveAnchorHost.ts +23 -23
  1106. package/src/anchors/resolveAutoAnchorHost.ts +182 -0
  1107. package/src/anchors/semanticMatcher.ts +385 -0
  1108. package/src/anonymousId.ts +2 -1
  1109. package/src/authoring/ElementPickerOverlay.tsx +662 -0
  1110. package/src/authoring/capturePickerScreenshot.ts +90 -0
  1111. package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
  1112. package/src/authoring/chrome/ChromeBottomSheet.tsx +110 -0
  1113. package/src/authoring/chrome/ChromeButton.tsx +108 -0
  1114. package/src/authoring/chrome/ChromeDialog.tsx +121 -0
  1115. package/src/authoring/chrome/ChromeIcon.tsx +49 -0
  1116. package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
  1117. package/src/authoring/chrome/ChromeTopBar.tsx +150 -0
  1118. package/src/authoring/chrome/DoubleTapBridge.tsx +67 -0
  1119. package/src/authoring/chrome/doubleTapMonitor.ts +90 -0
  1120. package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  1121. package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  1122. package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  1123. package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  1124. package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  1125. package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  1126. package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
  1127. package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  1128. package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  1129. package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
  1130. package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  1131. package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  1132. package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
  1133. package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  1134. package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  1135. package/src/authoring/chrome/icons/xmark.png +0 -0
  1136. package/src/authoring/chrome/icons/xmark@2x.png +0 -0
  1137. package/src/authoring/chrome/icons/xmark@3x.png +0 -0
  1138. package/src/authoring/chrome/tokens.ts +111 -0
  1139. package/src/authoring/doubleTap.ts +27 -0
  1140. package/src/authoring/elementPickerController.ts +133 -0
  1141. package/src/authoring/fingerprintFromInstance.ts +318 -0
  1142. package/src/authoring/hitTest.ts +441 -0
  1143. package/src/authoring/hostAtPoint.ts +247 -0
  1144. package/src/content/BannerStepButton.tsx +91 -0
  1145. package/src/content/RichContentRenderer.tsx +22 -1
  1146. package/src/content/StepButton.tsx +17 -2
  1147. package/src/content/buttonAppearance.ts +16 -0
  1148. package/src/content/resolveBannerButtonChrome.ts +49 -0
  1149. package/src/content/resolveStepButtonChrome.ts +12 -6
  1150. package/src/content/themeColor.ts +25 -0
  1151. package/src/content/types.ts +1 -0
  1152. package/src/deepLinking.ts +4 -4
  1153. package/src/deviceContext.ts +168 -0
  1154. package/src/evalJs/EvalJsHost.tsx +255 -0
  1155. package/src/evalJs/bootstrap.ts +83 -0
  1156. package/src/evalJs/bridgeMessages.ts +134 -0
  1157. package/src/evalJs/evalJsBridge.ts +42 -0
  1158. package/src/evalJs/evalJsController.ts +127 -0
  1159. package/src/evalJs/getWebView.ts +124 -0
  1160. package/src/evalJs/injectEvalPending.ts +14 -0
  1161. package/src/evalJs/types.ts +56 -0
  1162. package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
  1163. package/src/expo-router/index.ts +8 -0
  1164. package/src/expo-router/redirectSystemPath.ts +86 -0
  1165. package/src/expo-router/useUserflowExpoRouter.ts +49 -6
  1166. package/src/hostAppVersion.ts +258 -0
  1167. package/src/index.ts +255 -27
  1168. package/src/lifecycle.ts +12 -1
  1169. package/src/navigation/WithUserflowReactNavigation.tsx +26 -7
  1170. package/src/navigation/isOverlayPresentation.ts +76 -0
  1171. package/src/navigation/openFlowNavigateUrl.ts +12 -5
  1172. package/src/pairing/PairingController.ts +311 -28
  1173. package/src/pairing/PreviewModeBanner.tsx +307 -94
  1174. package/src/pairing/deepLink.ts +23 -5
  1175. package/src/pairing/deviceId.ts +43 -0
  1176. package/src/pairing/diagnostics.ts +14 -4
  1177. package/src/pairing/elementPickerRelay.ts +100 -0
  1178. package/src/pairing/resolvePreviewChrome.ts +57 -0
  1179. package/src/pairing/tokenStorage.ts +91 -9
  1180. package/src/pairing/usePairingState.ts +4 -0
  1181. package/src/pairing/usePreviewBarHold.ts +160 -0
  1182. package/src/runtime/BannerHost.tsx +102 -0
  1183. package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
  1184. package/src/runtime/FlowRenderer.tsx +55 -27
  1185. package/src/runtime/FlowSurfaceFade.tsx +51 -30
  1186. package/src/runtime/SdkErrorBoundary.tsx +77 -0
  1187. package/src/runtime/TargetPressBridge.tsx +29 -40
  1188. package/src/runtime/UserflowOverlay.tsx +118 -0
  1189. package/src/runtime/UserflowProvider.tsx +162 -24
  1190. package/src/runtime/bannerEngine.ts +55 -0
  1191. package/src/runtime/bannerEngineContext.ts +5 -0
  1192. package/src/runtime/bannerPlacement.ts +36 -0
  1193. package/src/runtime/changedTouchPoints.ts +34 -0
  1194. package/src/runtime/embedBannerRegistry.ts +28 -0
  1195. package/src/runtime/flowEngine.ts +78 -3
  1196. package/src/runtime/flowSessionViewState.ts +42 -4
  1197. package/src/runtime/isolateCall.ts +53 -0
  1198. package/src/runtime/reportSdkError.ts +12 -0
  1199. package/src/runtime/useBannerSession.ts +35 -0
  1200. package/src/runtime/useFlowSessionState.ts +2 -0
  1201. package/src/screenTracker.ts +73 -5
  1202. package/src/surfaces/BannerBar.tsx +176 -0
  1203. package/src/surfaces/BannerSurface.tsx +82 -0
  1204. package/src/surfaces/CardFade.tsx +18 -0
  1205. package/src/surfaces/CloseButton.tsx +17 -7
  1206. package/src/surfaces/MadeWithUserflow.tsx +15 -10
  1207. package/src/surfaces/ModalSurface.tsx +49 -36
  1208. package/src/surfaces/TooltipSurface.tsx +423 -87
  1209. package/src/surfaces/bannerBarLayout.ts +74 -0
  1210. package/src/surfaces/bannerBarTokens.ts +34 -0
  1211. package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
  1212. package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
  1213. package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
  1214. package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
  1215. package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
  1216. package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
  1217. package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
  1218. package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
  1219. package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
  1220. package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
  1221. package/src/surfaces/cardTransition.ts +67 -0
  1222. package/src/surfaces/resolveBannerTheme.ts +18 -0
  1223. package/src/surfaces/resolveHighlightChrome.ts +139 -0
  1224. package/src/surfaces/resolveModalLayout.ts +16 -8
  1225. package/src/surfaces/resolveTooltipLayout.ts +1 -14
  1226. package/src/surfaces/safeArea.ts +29 -0
  1227. package/src/surfaces/surfaceInteractionConfig.ts +25 -0
  1228. package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
  1229. package/src/surfaces/themeChrome.ts +5 -3
  1230. package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
  1231. package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
  1232. package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
  1233. package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
  1234. package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
  1235. package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
  1236. package/src/surfaces/tooltip/rect.ts +11 -0
  1237. package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
  1238. package/src/version.ts +1 -1
  1239. package/vendor/core/dist/attributes.d.ts +1 -2
  1240. package/vendor/core/dist/attributes.d.ts.map +1 -1
  1241. package/vendor/core/dist/attributes.js +4 -4
  1242. package/vendor/core/dist/attributes.js.map +1 -1
  1243. package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
  1244. package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
  1245. package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
  1246. package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
  1247. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +109 -1
  1248. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
  1249. package/vendor/core/dist/engine/FlowSessionEngine.js +417 -17
  1250. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
  1251. package/vendor/core/dist/engine/PairingEngine.d.ts +82 -3
  1252. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
  1253. package/vendor/core/dist/engine/PairingEngine.js +122 -11
  1254. package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
  1255. package/vendor/core/dist/engine/UserflowCore.d.ts +33 -5
  1256. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
  1257. package/vendor/core/dist/engine/UserflowCore.js +107 -24
  1258. package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
  1259. package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
  1260. package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
  1261. package/vendor/core/dist/engine/conditionOperators.js +168 -0
  1262. package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
  1263. package/vendor/core/dist/engine/handleActions.d.ts +43 -6
  1264. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
  1265. package/vendor/core/dist/engine/handleActions.js +145 -15
  1266. package/vendor/core/dist/engine/handleActions.js.map +1 -1
  1267. package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
  1268. package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
  1269. package/vendor/core/dist/engine/simpleObservable.js +29 -0
  1270. package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
  1271. package/vendor/core/dist/engine/trackCondition.d.ts +27 -0
  1272. package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
  1273. package/vendor/core/dist/engine/trackCondition.js +179 -0
  1274. package/vendor/core/dist/engine/trackCondition.js.map +1 -0
  1275. package/vendor/core/dist/engine/trackStepTriggers.d.ts +31 -0
  1276. package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
  1277. package/vendor/core/dist/engine/trackStepTriggers.js +75 -0
  1278. package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
  1279. package/vendor/core/dist/errors.d.ts +11 -1
  1280. package/vendor/core/dist/errors.d.ts.map +1 -1
  1281. package/vendor/core/dist/errors.js +2 -1
  1282. package/vendor/core/dist/errors.js.map +1 -1
  1283. package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
  1284. package/vendor/core/dist/eventAttributes.js +4 -2
  1285. package/vendor/core/dist/eventAttributes.js.map +1 -1
  1286. package/vendor/core/dist/index.d.ts +7 -3
  1287. package/vendor/core/dist/index.d.ts.map +1 -1
  1288. package/vendor/core/dist/index.js +3 -1
  1289. package/vendor/core/dist/index.js.map +1 -1
  1290. package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
  1291. package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
  1292. package/vendor/core/dist/normalizeAttributes.js +129 -0
  1293. package/vendor/core/dist/normalizeAttributes.js.map +1 -0
  1294. package/vendor/core/dist/transport/pairing.d.ts +5 -0
  1295. package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
  1296. package/vendor/core/dist/transport/pairing.js +69 -2
  1297. package/vendor/core/dist/transport/pairing.js.map +1 -1
  1298. package/vendor/core/dist/transport/phoenix.d.ts +19 -6
  1299. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
  1300. package/vendor/core/dist/transport/phoenix.js +75 -7
  1301. package/vendor/core/dist/transport/phoenix.js.map +1 -1
  1302. package/vendor/core/dist/types.d.ts +26 -1
  1303. package/vendor/core/dist/types.d.ts.map +1 -1
  1304. package/vendor/core/dist/version.d.ts +1 -1
  1305. package/vendor/core/dist/version.js +1 -1
  1306. package/vendor/core/package.json +1 -1
  1307. package/vendor/protocol/dist/attributes.d.ts +43 -0
  1308. package/vendor/protocol/dist/attributes.d.ts.map +1 -0
  1309. package/vendor/protocol/dist/attributes.js +15 -0
  1310. package/vendor/protocol/dist/attributes.js.map +1 -0
  1311. package/vendor/protocol/dist/autoData.d.ts +10 -17
  1312. package/vendor/protocol/dist/autoData.d.ts.map +1 -1
  1313. package/vendor/protocol/dist/autoData.js +2 -2
  1314. package/vendor/protocol/dist/autoData.js.map +1 -1
  1315. package/vendor/protocol/dist/events.d.ts +8 -0
  1316. package/vendor/protocol/dist/events.d.ts.map +1 -1
  1317. package/vendor/protocol/dist/flows.d.ts +124 -6
  1318. package/vendor/protocol/dist/flows.d.ts.map +1 -1
  1319. package/vendor/protocol/dist/flows.js +70 -5
  1320. package/vendor/protocol/dist/flows.js.map +1 -1
  1321. package/vendor/protocol/dist/index.d.ts +1 -0
  1322. package/vendor/protocol/dist/index.d.ts.map +1 -1
  1323. package/vendor/protocol/dist/index.js +1 -0
  1324. package/vendor/protocol/dist/index.js.map +1 -1
  1325. package/vendor/protocol/dist/messages.d.ts +46 -15
  1326. package/vendor/protocol/dist/messages.d.ts.map +1 -1
  1327. package/vendor/protocol/dist/messages.js +9 -2
  1328. package/vendor/protocol/dist/messages.js.map +1 -1
  1329. package/vendor/protocol/dist/pairing.d.ts +26 -0
  1330. package/vendor/protocol/dist/pairing.d.ts.map +1 -1
  1331. package/vendor/protocol/dist/pairing.js.map +1 -1
  1332. package/vendor/protocol/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_resolveHighlightChrome","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TooltipHighlight","targetRect","chrome","isHighlightVisible","rings","buildHighlightRings","length","jsx","View","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","Platform","OS","boxShadow","alreadyConsumed","cornerRadius","top","left","nextWidth","nextHeight","outset","StyleSheet","create","position","backgroundColor","overflow"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/TooltipHighlight.tsx"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,uBAAA,GAAAF,OAAA;AAAqF,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,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,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAA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A,MAAM1B,MAAM,GAAG2B,uBAAU,CAACC,MAAM,CAAC;EAC/BzC,IAAI,EAAE;IACJ0C,QAAQ,EAAE,UAAU;IACpBC,eAAe,EAAE,aAAa;IAC9BC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -6,6 +6,44 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.computeTooltipPosition = computeTooltipPosition;
7
7
  exports.tooltipNotchDiamondSide = tooltipNotchDiamondSide;
8
8
  var _inferTooltipPlacement = require("./inferTooltipPlacement.js");
9
+ /** Pixel slack so a card that sits exactly on the target edge still counts. */
10
+ const ADJACENCY_EPSILON = 0.5;
11
+ function notchCanPointAtTarget(opts) {
12
+ if (opts.notchSize <= 0) return false;
13
+ const {
14
+ placement,
15
+ cx,
16
+ cy,
17
+ bw,
18
+ bh,
19
+ targetRect
20
+ } = opts;
21
+ const targetMidX = targetRect.left + (targetRect.right - targetRect.left) / 2;
22
+ const targetMidY = targetRect.top + (targetRect.bottom - targetRect.top) / 2;
23
+ const reachableX = targetMidX >= cx - ADJACENCY_EPSILON && targetMidX <= cx + bw + ADJACENCY_EPSILON;
24
+ const reachableY = targetMidY >= cy - ADJACENCY_EPSILON && targetMidY <= cy + bh + ADJACENCY_EPSILON;
25
+ switch (placement) {
26
+ case 'BELOW':
27
+ return cy + ADJACENCY_EPSILON >= targetRect.bottom && reachableX;
28
+ case 'ABOVE':
29
+ return cy + bh <= targetRect.top + ADJACENCY_EPSILON && reachableX;
30
+ case 'RIGHT':
31
+ return cx + ADJACENCY_EPSILON >= targetRect.right && reachableY;
32
+ case 'LEFT':
33
+ return cx + bw <= targetRect.left + ADJACENCY_EPSILON && reachableY;
34
+ default:
35
+ return false;
36
+ }
37
+ }
38
+ function resolveViewportInsets(viewportPadding, viewportInsets) {
39
+ return {
40
+ top: viewportInsets?.top ?? viewportPadding,
41
+ right: viewportInsets?.right ?? viewportPadding,
42
+ bottom: viewportInsets?.bottom ?? viewportPadding,
43
+ left: viewportInsets?.left ?? viewportPadding
44
+ };
45
+ }
46
+
9
47
  /**
10
48
  * Side length of the axis-aligned square that, when rotated 45°, yields a
11
49
  * tip that protrudes `notchSize` beyond the card edge (half-diagonal = N).
@@ -29,10 +67,12 @@ function computeTooltipPosition(opts) {
29
67
  placement,
30
68
  notchSize,
31
69
  backdropPadding = 0,
70
+ outsideHighlightSpread = 0,
32
71
  windowSize,
33
72
  bubbleBorderRadius,
34
73
  bubbleBorderWidth = 0,
35
- viewportPadding = _inferTooltipPlacement.VIEWPORT_PADDING
74
+ viewportPadding = _inferTooltipPlacement.VIEWPORT_PADDING,
75
+ viewportInsets
36
76
  } = opts;
37
77
  const {
38
78
  width: cw,
@@ -42,13 +82,15 @@ function computeTooltipPosition(opts) {
42
82
  width: bw,
43
83
  height: bh
44
84
  } = bubbleSize;
85
+ const pad = resolveViewportInsets(viewportPadding, viewportInsets);
86
+ const placementPad = backdropPadding + outsideHighlightSpread;
45
87
  const targetRect = {
46
- top: target.y - backdropPadding,
47
- right: target.x + target.width + backdropPadding,
48
- bottom: target.y + target.height + backdropPadding,
49
- left: target.x - backdropPadding,
50
- width: target.width + backdropPadding * 2,
51
- height: target.height + backdropPadding * 2
88
+ top: target.y - placementPad,
89
+ right: target.x + target.width + placementPad,
90
+ bottom: target.y + target.height + placementPad,
91
+ left: target.x - placementPad,
92
+ width: target.width + placementPad * 2,
93
+ height: target.height + placementPad * 2
52
94
  };
53
95
  let cx = 0;
54
96
  let cy = 0;
@@ -58,30 +100,33 @@ function computeTooltipPosition(opts) {
58
100
  const edgeOffset = -half + Math.max(0, bubbleBorderWidth) + 1;
59
101
  if (placement === 'BELOW' || placement === 'ABOVE') {
60
102
  cx = targetRect.left + targetRect.width / 2 - bw / 2;
61
- cx = Math.max(viewportPadding, Math.min(cw - bw - viewportPadding, cx));
103
+ cx = Math.max(pad.left, Math.min(cw - bw - pad.right, cx));
62
104
  const rawLeft = targetRect.left + targetRect.width / 2 - half - cx;
63
105
  notch.left = Math.max(bubbleBorderRadius, Math.min(bw - bubbleBorderRadius - side, rawLeft));
64
106
  if (placement === 'BELOW') {
65
107
  cy = targetRect.bottom + notchSize;
66
- cy = Math.max(notchSize, Math.min(ch - bh, cy));
108
+ cy = Math.max(pad.top, Math.min(ch - bh - pad.bottom, cy));
67
109
  notch.top = edgeOffset;
68
110
  } else {
69
111
  cy = targetRect.top - notchSize - bh;
70
- cy = Math.max(0, Math.min(ch - bh - notchSize, cy));
112
+ cy = Math.max(pad.top, Math.min(ch - bh - pad.bottom, cy));
71
113
  notch.bottom = edgeOffset;
72
114
  }
73
115
  } else {
74
116
  cy = targetRect.top + targetRect.height / 2 - bh / 2;
75
- cy = Math.max(viewportPadding, Math.min(ch - bh - viewportPadding, cy));
117
+ cy = Math.max(pad.top, Math.min(ch - bh - pad.bottom, cy));
76
118
  const rawTop = targetRect.top + targetRect.height / 2 - half - cy;
77
119
  notch.top = Math.max(bubbleBorderRadius, Math.min(bh - bubbleBorderRadius - side, rawTop));
120
+
121
+ // LEFT keeps pad.left; RIGHT used to min at notchSize, which sat inside the
122
+ // screen margin when the target was near the left edge.
78
123
  if (placement === 'RIGHT') {
79
124
  cx = targetRect.right + notchSize;
80
- cx = Math.max(notchSize, Math.min(cw - bw, cx));
125
+ cx = Math.max(pad.left, Math.min(cw - bw - pad.right, cx));
81
126
  notch.left = edgeOffset;
82
127
  } else {
83
128
  cx = targetRect.left - notchSize - bw;
84
- cx = Math.max(0, Math.min(cw - bw - notchSize, cx));
129
+ cx = Math.max(pad.left, Math.min(cw - bw - notchSize, cx));
85
130
  notch.right = edgeOffset;
86
131
  }
87
132
  }
@@ -91,6 +136,15 @@ function computeTooltipPosition(opts) {
91
136
  y: cy
92
137
  },
93
138
  notchPosition: notch,
139
+ showNotch: notchCanPointAtTarget({
140
+ placement,
141
+ cx,
142
+ cy,
143
+ bw,
144
+ bh,
145
+ targetRect,
146
+ notchSize
147
+ }),
94
148
  targetHighlightRect: {
95
149
  top: target.y - backdropPadding,
96
150
  left: target.x - backdropPadding,
@@ -1 +1 @@
1
- {"version":3,"names":["_inferTooltipPlacement","require","tooltipNotchDiamondSide","notchSize","Math","SQRT2","computeTooltipPosition","opts","target","bubbleSize","placement","backdropPadding","windowSize","bubbleBorderRadius","bubbleBorderWidth","viewportPadding","VIEWPORT_PADDING","width","cw","height","ch","bw","bh","targetRect","top","y","right","x","bottom","left","cx","cy","notch","side","half","edgeOffset","max","min","rawLeft","rawTop","cardPosition","notchPosition","targetHighlightRect"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/computeTooltipPosition.ts"],"mappings":";;;;;;;AAOA,IAAAA,sBAAA,GAAAC,OAAA;AAgBA;AACA;AACA;AACA;AACO,SAASC,uBAAuBA,CAACC,SAAiB,EAAU;EACjE,OAAOA,SAAS,GAAGC,IAAI,CAACC,KAAK;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CAACC,IAUtC,EAAiB;EAChB,MAAM;IACJC,MAAM;IACNC,UAAU;IACVC,SAAS;IACTP,SAAS;IACTQ,eAAe,GAAG,CAAC;IACnBC,UAAU;IACVC,kBAAkB;IAClBC,iBAAiB,GAAG,CAAC;IACrBC,eAAe,GAAGC;EACpB,CAAC,GAAGT,IAAI;EACR,MAAM;IAAEU,KAAK,EAAEC,EAAE;IAAEC,MAAM,EAAEC;EAAG,CAAC,GAAGR,UAAU;EAC5C,MAAM;IAAEK,KAAK,EAAEI,EAAE;IAAEF,MAAM,EAAEG;EAAG,CAAC,GAAGb,UAAU;EAE5C,MAAMc,UAAU,GAAG;IACjBC,GAAG,EAAEhB,MAAM,CAACiB,CAAC,GAAGd,eAAe;IAC/Be,KAAK,EAAElB,MAAM,CAACmB,CAAC,GAAGnB,MAAM,CAACS,KAAK,GAAGN,eAAe;IAChDiB,MAAM,EAAEpB,MAAM,CAACiB,CAAC,GAAGjB,MAAM,CAACW,MAAM,GAAGR,eAAe;IAClDkB,IAAI,EAAErB,MAA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,IAAI,GAAG1B,SAAS,GAAGkB,EAAE;MACrCS,EAAE,GAAG1B,IAAI,CAACgC,GAAG,CAAC,CAAC,EAAEhC,IAAI,CAACiC,GAAG,CAACnB,EAAE,GAAGG,EAAE,GAAGlB,SAAS,EAAE2B,EAAE,CAAC,CAAC;MACnDE,KAAK,CAACN,KAAK,GAAGS,UAAU;IAC1B;EACF;EAEA,OAAO;IACLK,YAAY,EAAE;MAAEb,CAAC,EAAEG,EAAE;MAAEL,CAAC,EAAEM;IAAG,CAAC;IAC9BU,aAAa,EAAET,KAAK;IACpBU,mBAAmB,EAAE;MACnBlB,GAAG,EAAEhB,MAAM,CAACiB,CAAC,GAAGd,eAAe;MAC/BkB,IAAI,EAAErB,MAAM,CAACmB,CAAC,GAAGhB,eAAe;MAChCM,KAAK,EAAET,MAAM,CAACS,KAAK,GAAGN,eAAe,GAAG,CAAC;MACzCQ,MAAM,EAAEX,MAAM,CAACW,MAAM,GAAGR,eAAe,GAAG;IAC5C;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_inferTooltipPlacement","require","ADJACENCY_EPSILON","notchCanPointAtTarget","opts","notchSize","placement","cx","cy","bw","bh","targetRect","targetMidX","left","right","targetMidY","top","bottom","reachableX","reachableY","resolveViewportInsets","viewportPadding","viewportInsets","tooltipNotchDiamondSide","Math","SQRT2","computeTooltipPosition","target","bubbleSize","backdropPadding","outsideHighlightSpread","windowSize","bubbleBorderRadius","bubbleBorderWidth","VIEWPORT_PADDING","width","cw","height","ch","pad","placementPad","y","x","notch","side","half","edgeOffset","max","min","rawLeft","rawTop","cardPosition","notchPosition","showNotch","targetHighlightRect"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/computeTooltipPosition.ts"],"mappings":";;;;;;;AAOA,IAAAA,sBAAA,GAAAC,OAAA;AA6BA;AACA,MAAMC,iBAAiB,GAAG,GAAG;AAE7B,SAASC,qBAAqBA,CAACC,IAQ9B,EAAW;EACV,IAAIA,IAAI,CAACC,SAAS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AGiC,UAAU;IACzB,CAAC,MAAM;MACLvC,EAAE,GAAGI,UAAU,CAACE,IAAI,GAAGR,SAAS,GAAGI,EAAE;MACrCF,EAAE,GAAGiB,IAAI,CAACuB,GAAG,CAACR,GAAG,CAAC1B,IAAI,EAAEW,IAAI,CAACwB,GAAG,CAACZ,EAAE,GAAG3B,EAAE,GAAGJ,SAAS,EAAEE,EAAE,CAAC,CAAC;MAC1DoC,KAAK,CAAC7B,KAAK,GAAGgC,UAAU;IAC1B;EACF;EAEA,OAAO;IACLK,YAAY,EAAE;MAAET,CAAC,EAAEnC,EAAE;MAAEkC,CAAC,EAAEjC;IAAG,CAAC;IAC9B4C,aAAa,EAAET,KAAK;IACpBU,SAAS,EAAElD,qBAAqB,CAAC;MAC/BG,SAAS;MACTC,EAAE;MACFC,EAAE;MACFC,EAAE;MACFC,EAAE;MACFC,UAAU;MACVN;IACF,CAAC,CAAC;IACFiD,mBAAmB,EAAE;MACnBtC,GAAG,EAAEW,MAAM,CAACc,CAAC,GAAGZ,eAAe;MAC/BhB,IAAI,EAAEc,MAAM,CAACe,CAAC,GAAGb,eAAe;MAChCM,KAAK,EAAER,MAAM,CAACQ,KAAK,GAAGN,eAAe,GAAG,CAAC;MACzCQ,MAAM,EAAEV,MAAM,CAACU,MAAM,GAAGR,eAAe,GAAG;IAC5C;EACF,CAAC;AACH","ignoreList":[]}
@@ -5,14 +5,84 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.VIEWPORT_PADDING = void 0;
7
7
  exports.inferTooltipPlacement = inferTooltipPlacement;
8
+ exports.tooltipPlacementFits = tooltipPlacementFits;
8
9
  var _resolveTooltipLayout = require("../resolveTooltipLayout.js");
9
10
  /** Placement sides — string union so Jest protocol mocks stay empty. */
10
11
 
11
12
  const VIEWPORT_PADDING = exports.VIEWPORT_PADDING = _resolveTooltipLayout.TOOLTIP_VIEWPORT_PADDING;
12
13
 
14
+ /** Per-edge screen margin; each omitted edge falls back to `viewportPadding`. */
15
+
16
+ /**
17
+ * Whether `placement` has room beside `target` for `bubbleSize`.
18
+ *
19
+ * Inclusive: a card that exactly fills the remaining gap (LEFT/RIGHT after
20
+ * side-narrowing) still fits. Every side reserves the matching edge margin so
21
+ * this agrees with the clamp in `computeTooltipPosition`; when the two
22
+ * disagree, a placement passes here and is then drawn somewhere else.
23
+ */
24
+ function tooltipPlacementFits({
25
+ target,
26
+ bubbleSize,
27
+ notchSize,
28
+ windowSize,
29
+ placement,
30
+ viewportPadding = VIEWPORT_PADDING,
31
+ viewportInsets,
32
+ minHeight
33
+ }) {
34
+ const {
35
+ width: cw,
36
+ height: ch
37
+ } = windowSize;
38
+ const {
39
+ width: bw,
40
+ height: bh
41
+ } = bubbleSize;
42
+ const clip = {
43
+ top: 0,
44
+ right: cw,
45
+ bottom: ch,
46
+ left: 0
47
+ };
48
+ const targetRect = {
49
+ top: target.y,
50
+ right: target.x + target.width,
51
+ bottom: target.y + target.height,
52
+ left: target.x,
53
+ width: target.width,
54
+ height: target.height
55
+ };
56
+ const midX = targetRect.left + targetRect.width / 2;
57
+ const midY = targetRect.top + targetRect.height / 2;
58
+ const midXIn = midX >= clip.left && midX <= clip.right;
59
+ const midYIn = midY >= clip.top && midY <= clip.bottom;
60
+ const verticalHeight = minHeight != null && Number.isFinite(minHeight) ? Math.min(bh, Math.max(0, minHeight)) : bh;
61
+ const padTop = viewportInsets?.top ?? viewportPadding;
62
+ const padRight = viewportInsets?.right ?? viewportPadding;
63
+ const padBottom = viewportInsets?.bottom ?? viewportPadding;
64
+ const padLeft = viewportInsets?.left ?? viewportPadding;
65
+ switch (placement) {
66
+ case 'BELOW':
67
+ return ch - targetRect.bottom >= verticalHeight + notchSize + padBottom && midXIn;
68
+ case 'ABOVE':
69
+ return targetRect.top >= verticalHeight + notchSize + padTop && midXIn;
70
+ case 'RIGHT':
71
+ return cw - targetRect.right >= bw + notchSize + padRight && midYIn;
72
+ case 'LEFT':
73
+ return targetRect.left >= bw + notchSize + padLeft && midYIn;
74
+ default:
75
+ return false;
76
+ }
77
+ }
78
+
13
79
  /**
14
80
  * Port of web FlowChrome `inferTooltipPlacement` with distance-sorted flip
15
81
  * (not the prototype's fixed BELOW→ABOVE→RIGHT→LEFT priority).
82
+ *
83
+ * When no side fits, returns `desiredPlacement` (or BELOW) as a last resort —
84
+ * callers must check {@link tooltipPlacementFits} on the result to tell a real
85
+ * fit from that fallback.
16
86
  */
17
87
  function inferTooltipPlacement({
18
88
  target,
@@ -20,7 +90,10 @@ function inferTooltipPlacement({
20
90
  notchSize,
21
91
  windowSize,
22
92
  currentPlacement,
23
- desiredPlacement
93
+ desiredPlacement,
94
+ viewportPadding = VIEWPORT_PADDING,
95
+ viewportInsets,
96
+ minHeight
24
97
  }) {
25
98
  const {
26
99
  width: cw,
@@ -56,24 +129,20 @@ function inferTooltipPlacement({
56
129
  if (targetRect.left >= clip.right) {
57
130
  return clip.right > bw + notchSize ? 'LEFT' : 'RIGHT';
58
131
  }
59
- const fits = p => {
60
- const midX = targetRect.left + targetRect.width / 2;
61
- const midY = targetRect.top + targetRect.height / 2;
62
- const midXIn = midX >= clip.left && midX <= clip.right;
63
- const midYIn = midY >= clip.top && midY <= clip.bottom;
64
- switch (p) {
65
- case 'BELOW':
66
- return ch - targetRect.bottom > bh + notchSize && midXIn;
67
- case 'ABOVE':
68
- return targetRect.top > bh + notchSize && midXIn;
69
- case 'RIGHT':
70
- return cw - targetRect.right > bw + notchSize && midYIn;
71
- case 'LEFT':
72
- return targetRect.left > bw + notchSize && midYIn;
73
- default:
74
- return false;
75
- }
76
- };
132
+ const fits = p => tooltipPlacementFits({
133
+ target,
134
+ bubbleSize,
135
+ notchSize,
136
+ windowSize,
137
+ placement: p,
138
+ viewportPadding,
139
+ ...(viewportInsets != null ? {
140
+ viewportInsets
141
+ } : {}),
142
+ ...(minHeight != null ? {
143
+ minHeight
144
+ } : {})
145
+ });
77
146
  if (desiredPlacement && fits(desiredPlacement)) return desiredPlacement;
78
147
  if (currentPlacement && fits(currentPlacement)) return currentPlacement;
79
148
  const options = [{
@@ -1 +1 @@
1
- {"version":3,"names":["_resolveTooltipLayout","require","VIEWPORT_PADDING","exports","TOOLTIP_VIEWPORT_PADDING","inferTooltipPlacement","target","bubbleSize","notchSize","windowSize","currentPlacement","desiredPlacement","width","cw","height","ch","bw","bh","clip","top","right","bottom","left","targetRect","y","x","fits","p","midX","midY","midXIn","midYIn","options","placement","dist","sort","a","b"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/inferTooltipPlacement.ts"],"mappings":";;;;;;;AAyBA,IAAAA,qBAAA,GAAAC,OAAA;AAzBA;;AA2BO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGE,8CAAwB;;AAExD;AACA;AACA;AACA;AACO,SAASC,qBAAqBA,CAAC;EACpCC,MAAM;EACNC,UAAU;EACVC,SAAS;EACTC,UAAU;EACVC,gBAAgB;EAChBC;AAQF,CAAC,EAAwB;EACvB,MAAM;IAAEC,KAAK,EAAEC,EAAE;IAAEC,MAAM,EAAEC;EAAG,CAAC,GAAGN,UAAU;EAC5C,MAAM;IAAEG,KAAK,EAAEI,EAAE;IAAEF,MAAM,EAAEG;EAAG,CAAC,GAAGV,UAAU;EAC5C,MAAMW,IAAI,GAAG;IAAEC,GAAG,EAAE,CAAC;IAAEC,KAAK,EAAEP,EAAE;IAAEQ,MAAM,EAAEN,EAAE;IAAEO,IAAI,EAAE;EAAE,CAAC;EAEvD,MAAMC,UAAU,GAAG;IACjBJ,GAAG,EAAEb,MAAM,CAACkB,CAAC;IACbJ,KAAK,EAAEd,MAAM,CAACmB,CAAC,GAAGnB,MAAM,CAACM,KAAK;IAC9BS,MAAM,EAAEf,MAAM,CAACkB,CAAC,GAAGlB,MAAM,CAACQ,MAAM;IAChCQ,IAAI,EAAEhB,MAAM,CAACmB,CAAC;IACdb,KAAK,EAAEN,MAAM,CAACM,KAAK;IACnBE,MAAM,EAAER,MAAM,CAACQ;EACjB,CAAC;EAED,IAAIS,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M;MAClD,KAAK,OAAO;QACV,OAAOjB,EAAE,GAAGU,UAAU,CAACH,KAAK,GAAGJ,EAAE,GAAGR,SAAS,IAAIuB,MAAM;MACzD,KAAK,MAAM;QACT,OAAOR,UAAU,CAACD,IAAI,GAAGN,EAAE,GAAGR,SAAS,IAAIuB,MAAM;MACnD;QACE,OAAO,KAAK;IAChB;EACF,CAAC;EAED,IAAIpB,gBAAgB,IAAIe,IAAI,CAACf,gBAAgB,CAAC,EAAE,OAAOA,gBAAgB;EACvE,IAAID,gBAAgB,IAAIgB,IAAI,CAAChB,gBAAgB,CAAC,EAAE,OAAOA,gBAAgB;EAEvE,MAAMsB,OAA4D,GAAG,CACnE;IAAEC,SAAS,EAAE,OAAO;IAAEC,IAAI,EAAEX,UAAU,CAACJ;EAAI,CAAC,EAC5C;IAAEc,SAAS,EAAE,OAAO;IAAEC,IAAI,EAAEnB,EAAE,GAAGQ,UAAU,CAACF;EAAO,CAAC,EACpD;IAAEY,SAAS,EAAE,OAAO;IAAEC,IAAI,EAAEX,UAAU,CAACD;EAAK,CAAC,EAC7C;IAAEW,SAAS,EAAE,MAAM;IAAEC,IAAI,EAAErB,EAAE,GAAGU,UAAU,CAACH;EAAM,CAAC,CACnD;EACDY,OAAO,CAACG,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAACF,IAAI,GAAGG,CAAC,CAACH,IAAI,CAAC;EACvC,KAAK,MAAM;IAAED;EAAU,CAAC,IAAID,OAAO,EAAE;IACnC,IAAIN,IAAI,CAACO,SAAS,CAAC,EAAE,OAAOA,SAAS;EACvC;EAEA,OAAOtB,gBAAgB,IAAI,OAAO;AACpC","ignoreList":[]}
1
+ {"version":3,"names":["_resolveTooltipLayout","require","VIEWPORT_PADDING","exports","TOOLTIP_VIEWPORT_PADDING","tooltipPlacementFits","target","bubbleSize","notchSize","windowSize","placement","viewportPadding","viewportInsets","minHeight","width","cw","height","ch","bw","bh","clip","top","right","bottom","left","targetRect","y","x","midX","midY","midXIn","midYIn","verticalHeight","Number","isFinite","Math","min","max","padTop","padRight","padBottom","padLeft","inferTooltipPlacement","currentPlacement","desiredPlacement","fits","p","options","dist","sort","a","b"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/inferTooltipPlacement.ts"],"mappings":";;;;;;;;AAyBA,IAAAA,qBAAA,GAAAC,OAAA;AAzBA;;AA2BO,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGE,8CAAwB;;AAExD;;AA4BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,oBAAoBA,CAAC;EACnCC,MAAM;EACNC,UAAU;EACVC,SAAS;EACTC,UAAU;EACVC,SAAS;EACTC,eAAe,GAAGT,gBAAgB;EAClCU,cAAc;EACdC;AACwB,CAAC,EAAW;EACpC,MAAM;IAAEC,KAAK,EAAEC,EAAE;IAAEC,MAAM,EAAEC;EAAG,CAAC,GAAGR,UAAU;EAC5C,MAAM;IAAEK,KAAK,EAAEI,EAAE;IAAEF,MAAM,EAAEG;EAAG,CAAC,GAAGZ,UAAU;EAC5C,MAAMa,IAAI,GAAG;IAAEC,GAAG,EAAE,CAAC;IAAEC,KAAK,EAAEP,EAAE;IAAEQ,MAAM,EAAEN,EAAE;IAAEO,IAAI,EAAE;EAAE,CAAC;EACvD,MAAMC,UAAU,GAAG;IACjBJ,GAAG,EAAEf,MAAM,CAACoB,CAAC;IACbJ,KAAK,EAAEhB,MAAM,CAACqB,CAAC,GAAGrB,MAAM,CAACQ,KAAK;IAC9BS,MAAM,EAAEjB,MAAM,CAACoB,CAAC,GAAGpB,MAAM,CAACU,MAAM;IAChCQ,IAAI,EAAElB,MAAM,CAACqB,CAAC;IACdb,KAAK,EAAER,MAAM,CAACQ,KAAK;IACnBE,MAAM,EAAEV,MAAM,CAACU;EACjB,CAAC;EACD,MAAMY,IAAI,GAAGH,UAAU,CAACD,IAAI,GAAGC,UAAU,CAACX,KAAK,GAAG,CAAC;EACnD,MAAMe,IAAI,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,CAAC,IAAIqC,OAAO,EAAE;IACnC,IAAIF,IAAI,CAACnC,SAAS,CAAC,EAAE,OAAOA,SAAS;EACvC;EAEA,OAAOkC,gBAAgB,IAAI,OAAO;AACpC","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.defaultPlacementLogger = void 0;
7
+ exports.tooltipPlacementUnanchoredMessage = tooltipPlacementUnanchoredMessage;
8
+ exports.tooltipSidePlacementDroppedMessage = tooltipSidePlacementDroppedMessage;
9
+ exports.warnTooltipPlacementUnanchored = warnTooltipPlacementUnanchored;
10
+ exports.warnTooltipSidePlacementDropped = warnTooltipSidePlacementDropped;
11
+ const PREFIX = '[Userflow]';
12
+
13
+ /** Sink for placement diagnostics. Injected in tests. */
14
+
15
+ const defaultPlacementLogger = message => {
16
+ // eslint-disable-next-line no-console -- intentional development diagnostic
17
+ console.warn(message);
18
+ };
19
+
20
+ /**
21
+ * A Builder-requested LEFT/RIGHT side could not be drawn at all: the room
22
+ * beside the target is smaller than the card's own chrome, so no width is left
23
+ * to lay content out in. Draft/preview and `__DEV__` only.
24
+ *
25
+ * The caller must not emit this when the side was honored at a reduced width —
26
+ * shrinking is the expected outcome now, and whether it looks good is the
27
+ * author's call — nor for keyboard / off-screen vertical flips, whose cause is
28
+ * not the room beside the target.
29
+ */
30
+ exports.defaultPlacementLogger = defaultPlacementLogger;
31
+ function tooltipSidePlacementDroppedMessage(opts) {
32
+ const gap = Number.isFinite(opts.availableGap) ? Math.max(0, Math.floor(opts.availableGap)) : 0;
33
+ const minWidth = Number.isFinite(opts.minWidth) ? Math.max(0, Math.ceil(opts.minWidth)) : 0;
34
+ return `${PREFIX} Tooltip placement "${opts.requested}" could not be drawn beside the target ` + `(${gap}pt of room beside it; the card needs ${minWidth}pt for its padding and border). ` + `Placed ${opts.used} instead.`;
35
+ }
36
+ function warnTooltipSidePlacementDropped(opts, log = defaultPlacementLogger) {
37
+ log(tooltipSidePlacementDroppedMessage(opts));
38
+ }
39
+
40
+ /**
41
+ * No side had room for the card — including the authored LEFT/RIGHT — so
42
+ * {@link inferTooltipPlacement} returned the requested side as a last resort.
43
+ * Draft/preview and `__DEV__` only. Distinct from
44
+ * {@link tooltipSidePlacementDroppedMessage}, which reports a successful flip.
45
+ */
46
+ function tooltipPlacementUnanchoredMessage(opts) {
47
+ return `${PREFIX} Tooltip placement "${opts.requested}" could not be drawn on any side of the target. ` + `The card is on-screen but the pointer is hidden because it cannot point at the target.`;
48
+ }
49
+ function warnTooltipPlacementUnanchored(opts, log = defaultPlacementLogger) {
50
+ log(tooltipPlacementUnanchoredMessage(opts));
51
+ }
52
+ //# sourceMappingURL=placementDiagnostics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PREFIX","defaultPlacementLogger","message","console","warn","exports","tooltipSidePlacementDroppedMessage","opts","gap","Number","isFinite","availableGap","Math","max","floor","minWidth","ceil","requested","used","warnTooltipSidePlacementDropped","log","tooltipPlacementUnanchoredMessage","warnTooltipPlacementUnanchored"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/placementDiagnostics.ts"],"mappings":";;;;;;;;;;AAEA,MAAMA,MAAM,GAAG,YAAY;;AAE3B;;AAGO,MAAMC,sBAAuC,GAAIC,OAAO,IAAK;EAClE;EACAC,OAAO,CAACC,IAAI,CAACF,OAAO,CAAC;AACvB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATAG,OAAA,CAAAJ,sBAAA,GAAAA,sBAAA;AAUO,SAASK,kCAAkCA,CAACC,IAKlD,EAAU;EACT,MAAMC,GAAG,GAAGC,MAAM,CAACC,QAAQ,CAACH,IAAI,CAACI,YAAY,CAAC,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,KAAK,CAACP,IAAI,CAACI,YAAY,CAAC,CAAC,GAAG,CAAC;EAC/F,MAAMI,QAAQ,GAAGN,MAAM,CAACC,QAAQ,CAACH,IAAI,CAACQ,QAAQ,CAAC,GAAGH,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACI,IAAI,CAACT,IAAI,CAACQ,QAAQ,CAAC,CAAC,GAAG,CAAC;EAC3F,OACE,GAAGf,MAAM,uBAAuBO,IAAI,CAACU,SAAS,yCAAyC,GACvF,IAAIT,GAAG,wCAAwCO,QAAQ,kCAAkC,GACzF,UAAUR,IAAI,CAACW,IAAI,WAAW;AAElC;AAEO,SAASC,+BAA+BA,CAC7CZ,IAKC,EACDa,GAAoB,GAAGnB,sBAAsB,EACvC;EACNmB,GAAG,CAACd,kCAAkC,CAACC,IAAI,CAAC,CAAC;AAC/C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASc,iCAAiCA,CAACd,IAEjD,EAAU;EACT,OACE,GAAGP,MAAM,uBAAuBO,IAAI,CAACU,SAAS,kDAAkD,GAChG,wFAAwF;AAE5F;AAEO,SAASK,8BAA8BA,CAC5Cf,IAAyC,EACzCa,GAAoB,GAAGnB,sBAAsB,EACvC;EACNmB,GAAG,CAACC,iCAAiC,CAACd,IAAI,CAAC,CAAC;AAC9C","ignoreList":[]}
@@ -4,9 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.buildEffectiveViewport = buildEffectiveViewport;
7
+ exports.expandRect = expandRect;
7
8
  exports.isRectFullyVisible = isRectFullyVisible;
8
9
  exports.isRectOffScreen = isRectOffScreen;
9
10
  exports.rectsEqual = rectsEqual;
11
+ /** Grow or shrink `rect` by `padding` on every side. */
12
+ function expandRect(rect, padding) {
13
+ if (padding === 0) return rect;
14
+ return {
15
+ x: rect.x - padding,
16
+ y: rect.y - padding,
17
+ width: rect.width + padding * 2,
18
+ height: rect.height + padding * 2
19
+ };
20
+ }
21
+
10
22
  /** True when two rects are identical (used to avoid redundant setState). */
11
23
  function rectsEqual(a, b) {
12
24
  if (a === b) return true;
@@ -1 +1 @@
1
- {"version":3,"names":["rectsEqual","a","b","x","y","width","height","isRectOffScreen","rect","windowSize","isRectFullyVisible","viewport","buildEffectiveViewport","insets","top","Math","max","right","bottom","left"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/rect.ts"],"mappings":";;;;;;;;;AAEA;AACO,SAASA,UAAUA,CAACC,CAAc,EAAEC,CAAc,EAAW;EAClE,IAAID,CAAC,KAAKC,CAAC,EAAE,OAAO,IAAI;EACxB,IAAID,CAAC,IAAI,IAAI,IAAIC,CAAC,IAAI,IAAI,EAAE,OAAO,KAAK;EACxC,OAAOD,CAAC,CAACE,CAAC,KAAKD,CAAC,CAACC,CAAC,IAAIF,CAAC,CAACG,CAAC,KAAKF,CAAC,CAACE,CAAC,IAAIH,CAAC,CAACI,KAAK,KAAKH,CAAC,CAACG,KAAK,IAAIJ,CAAC,CAACK,MAAM,KAAKJ,CAAC,CAACI,MAAM;AACnF;;AAEA;AACO,SAASC,eAAeA,CAACC,IAAU,EAAEC,UAAsB,EAAW;EAC3E,OACED,IAAI,CAACJ,CAAC,GAAGI,IAAI,CAACF,MAAM,IAAI,CAAC,IACzBE,IAAI,CAACJ,CAAC,IAAIK,UAAU,CAACH,MAAM,IAC3BE,IAAI,CAACL,CAAC,GAAGK,IAAI,CAACH,KAAK,IAAI,CAAC,IACxBG,IAAI,CAACL,CAAC,IAAIM,UAAU,CAACJ,KAAK;AAE9B;;AAEA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACO,SAASK,kBAAkBA,CAACF,IAAU,EAAEG,QAA2B,EAAW;EACnF,IAAIH,IAAI,CAACH,KAAK,IAAI,CAAC,IAAIG,IAAI,CAACF,MAAM,IAAI,CAAC,EAAE,OAAO,KAAK;EACrD,IAAIK,QAAQ,CAACN,KAAK,IAAI,CAAC,IAAIM,QAAQ,CAACL,MAAM,IAAI,CAAC,EAAE,OAAO,KAAK;EAC7D,OACEE,IAAI,CAACL,CAAC,IAAIQ,QAAQ,CAACR,CAAC,IACpBK,IAAI,CAACJ,CAAC,IAAIO,QAAQ,CAACP,CAAC,IACpBI,IAAI,CAACL,CAAC,GAAGK,IAAI,CAACH,KAAK,IAAIM,QAAQ,CAACR,CAAC,GAAGQ,QAAQ,CAACN,KAAK,IAClDG,IAAI,CAACJ,CAAC,GAAGI,IAAI,CAACF,MAAM,IAAIK,QAAQ,CAACP,CAAC,GAAGO,QAAQ,CAACL,MAAM;AAExD;;AAEA;AACO,SAASM,sBAAsBA,CACpCH,UAAsB,EACtBI,MAAyE,EACtD;EACnB,MAAMC,GAAG,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,MAAM,EAAEC,GAAG,IAAI,CAAC,CAAC;EACzC,MAAMG,KAAK,GAAGF,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,MAAM,EAAEI,KAAK,IAAI,CAAC,CAAC;EAC7C,MAAMC,MAAM,GAAGH,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,MAAM,EAAEK,MAAM,IAAI,CAAC,CAAC;EAC/C,MAAMC,IAAI,GAAGJ,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,MAAM,EAAEM,IAAI,IAAI,CAAC,CAAC;EAC3C,OAAO;IACLhB,CAAC,EAAEgB,IAAI;IACPf,CAAC,EAAEU,GAAG;IACNT,KAAK,EAAEU,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEP,UAAU,CAACJ,KAAK,GAAGc,IAAI,GAAGF,KAAK,CAAC;IACnDX,MAAM,EAAES,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEP,UAAU,CAACH,MAAM,GAAGQ,GAAG,GAAGI,MAAM;EACtD,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["expandRect","rect","padding","x","y","width","height","rectsEqual","a","b","isRectOffScreen","windowSize","isRectFullyVisible","viewport","buildEffectiveViewport","insets","top","Math","max","right","bottom","left"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/rect.ts"],"mappings":";;;;;;;;;;AAEA;AACO,SAAS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+1,103 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.resolveTooltipSideCardWidth = resolveTooltipSideCardWidth;
7
+ exports.tooltipMinCardHeight = tooltipMinCardHeight;
8
+ exports.tooltipMinSideCardWidth = tooltipMinSideCardWidth;
9
+ exports.tooltipSideGap = tooltipSideGap;
10
+ exports.tooltipVerticalGap = tooltipVerticalGap;
11
+ var _inferTooltipPlacement = require("./inferTooltipPlacement.js");
12
+ /**
13
+ * Narrowest a side card may get: the width it spends on its own chrome, so
14
+ * content padding on both edges plus the border. Below this there is nothing
15
+ * left to lay text out in, and React Native overflows the card instead of
16
+ * shrinking it — the preview would stop showing the author what ships.
17
+ *
18
+ * Deliberately structural, not a readability judgment. How narrow is *too*
19
+ * narrow to read is the author's call, made against the device preview.
20
+ */
21
+ function tooltipMinSideCardWidth(opts) {
22
+ const contentPadding = Number.isFinite(opts.contentPadding) ? Math.max(0, opts.contentPadding) : 0;
23
+ const borderWidth = opts.borderWidth != null && Number.isFinite(opts.borderWidth) ? Math.max(0, opts.borderWidth) : 0;
24
+ const chromeWidth = contentPadding * 2 + borderWidth * 2;
25
+ // Never demand more width than the card itself: a 40pt step card can still
26
+ // sit on the side even though its own padding would ask for more.
27
+ if (!Number.isFinite(opts.cardMaxWidth) || opts.cardMaxWidth <= 0) return chromeWidth;
28
+ return Math.min(chromeWidth, opts.cardMaxWidth);
29
+ }
30
+
31
+ /**
32
+ * Horizontal room beside an expanded target for a LEFT/RIGHT tooltip.
33
+ *
34
+ * Reserves `viewportPadding` on the screen edge the card grows toward, matching
35
+ * the LEFT/RIGHT clamp in `computeTooltipPosition`. Web clamps side placements
36
+ * to the raw edge instead; RN keeps the screen margin because an edge-to-edge
37
+ * card reads as broken on a phone-width viewport.
38
+ */
39
+ function tooltipSideGap(opts) {
40
+ const {
41
+ placement,
42
+ target,
43
+ windowWidth,
44
+ notchSize,
45
+ viewportPadding = _inferTooltipPlacement.VIEWPORT_PADDING
46
+ } = opts;
47
+ if (placement === 'LEFT') {
48
+ return target.x - notchSize - viewportPadding;
49
+ }
50
+ return windowWidth - (target.x + target.width) - notchSize - viewportPadding;
51
+ }
52
+
53
+ /**
54
+ * Width a LEFT/RIGHT tooltip may use: the room beside the target, capped at the
55
+ * theme width. The card takes whatever is left and grows taller to compensate.
56
+ * Null when not even {@link tooltipMinSideCardWidth} fits, so placement falls
57
+ * back to the vertical flip.
58
+ *
59
+ * `target` must already be expanded by backdrop padding and outside highlight
60
+ * spread — the same rect passed to `inferTooltipPlacement`.
61
+ */
62
+ function resolveTooltipSideCardWidth(opts) {
63
+ const gap = tooltipSideGap(opts);
64
+ const width = Math.min(opts.cardMaxWidth, Math.floor(gap));
65
+ if (!Number.isFinite(width) || width <= 0 || width < opts.minWidth) return null;
66
+ return width;
67
+ }
68
+
69
+ /**
70
+ * Shortest a card may get: the height it spends on its own chrome, so
71
+ * content padding on both edges plus the border. Mirrors
72
+ * {@link tooltipMinSideCardWidth} on the vertical axis.
73
+ */
74
+ function tooltipMinCardHeight(opts) {
75
+ const contentPadding = Number.isFinite(opts.contentPadding) ? Math.max(0, opts.contentPadding) : 0;
76
+ const borderWidth = opts.borderWidth != null && Number.isFinite(opts.borderWidth) ? Math.max(0, opts.borderWidth) : 0;
77
+ const chromeHeight = contentPadding * 2 + borderWidth * 2;
78
+ if (!Number.isFinite(opts.cardMaxHeight) || opts.cardMaxHeight <= 0) return chromeHeight;
79
+ return Math.min(chromeHeight, opts.cardMaxHeight);
80
+ }
81
+
82
+ /**
83
+ * Vertical room above or below an expanded target for an ABOVE/BELOW tooltip.
84
+ *
85
+ * Reserves the matching viewport inset on the edge the card grows toward,
86
+ * matching the ABOVE/BELOW clamp in `computeTooltipPosition`.
87
+ */
88
+ function tooltipVerticalGap(opts) {
89
+ const {
90
+ placement,
91
+ target,
92
+ windowHeight,
93
+ notchSize,
94
+ viewportPadding = _inferTooltipPlacement.VIEWPORT_PADDING
95
+ } = opts;
96
+ const top = opts.viewportInsets?.top ?? viewportPadding;
97
+ const bottom = opts.viewportInsets?.bottom ?? viewportPadding;
98
+ if (placement === 'ABOVE') {
99
+ return target.y - notchSize - top;
100
+ }
101
+ return windowHeight - (target.y + target.height) - notchSize - bottom;
102
+ }
103
+ //# sourceMappingURL=resolveSideCardWidth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_inferTooltipPlacement","require","tooltipMinSideCardWidth","opts","contentPadding","Number","isFinite","Math","max","borderWidth","chromeWidth","cardMaxWidth","min","tooltipSideGap","placement","target","windowWidth","notchSize","viewportPadding","VIEWPORT_PADDING","x","width","resolveTooltipSideCardWidth","gap","floor","minWidth","tooltipMinCardHeight","chromeHeight","cardMaxHeight","tooltipVerticalGap","windowHeight","top","viewportInsets","bottom","y","height"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/resolveSideCardWidth.ts"],"mappings":";;;;;;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,uBAAuBA,CAACC,IAIvC,EAAU;EACT,MAAMC,cAAc,GAAGC,MAAM,CAACC,QAAQ,CAACH,IAAI,CAACC,cAAc,CAAC,GACvDG,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEL,IAAI,CAACC,cAAc,CAAC,GAChC,CAAC;EACL,MAAMK,WAAW,GACfN,IAAI,CAACM,WAAW,IAAI,IAAI,IAAIJ,MAAM,CAACC,QAAQ,CAACH,IAAI,CAACM,WAAW,CAAC,GACzDF,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEL,IAAI,CAACM,WAAW,CAAC,GAC7B,CAAC;EACP,MAAMC,WAAW,GAAGN,cAAc,GAAG,CAAC,GAAGK,WAAW,GAAG,CAAC;EACxD;EACA;EACA,IAAI,CAACJ,MAAM,CAACC,QAAQ,CAACH,IAAI,CAACQ,YAAY,CAAC,IAAIR,IAAI,CAACQ,YAAY,IAAI,CAAC,EAAE,OAAOD,W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IAAI,CAACM,WAAW,CAAC,GACzDF,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEL,IAAI,CAACM,WAAW,CAAC,GAC7B,CAAC;EACP,MAAMkB,YAAY,GAAGvB,cAAc,GAAG,CAAC,GAAGK,WAAW,GAAG,CAAC;EACzD,IAAI,CAACJ,MAAM,CAACC,QAAQ,CAACH,IAAI,CAACyB,aAAa,CAAC,IAAIzB,IAAI,CAACyB,aAAa,IAAI,CAAC,EAAE,OAAOD,YAAY;EACxF,OAAOpB,IAAI,CAACK,GAAG,CAACe,YAAY,EAAExB,IAAI,CAACyB,aAAa,CAAC;AACnD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAAC1B,IAOlC,EAAU;EACT,MAAM;IAAEW,SAAS;IAAEC,MAAM;IAAEe,YAAY;IAAEb,SAAS;IAAEC,eAAe,GAAGC;EAAiB,CAAC,GAAGhB,IAAI;EAC/F,MAAM4B,GAAG,GAAG5B,IAAI,CAAC6B,cAAc,EAAED,GAAG,IAAIb,eAAe;EACvD,MAAMe,MAAM,GAAG9B,IAAI,CAAC6B,cAAc,EAAEC,MAAM,IAAIf,eAAe;EAC7D,IAAIJ,SAAS,KAAK,OAAO,EAAE;IACzB,OAAOC,MAAM,CAACmB,CAAC,GAAGjB,SAAS,GAAGc,GAAG;EACnC;EACA,OAAOD,YAAY,IAAIf,MAAM,CAACmB,CAAC,GAAGnB,MAAM,CAACoB,MAAM,CAAC,GAAGlB,SAAS,GAAGgB,MAAM;AACvE","ignoreList":[]}
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SDK_VERSION = void 0;
7
7
  /** Generated by scripts/write-version.mjs — do not edit. */
8
- const SDK_VERSION = exports.SDK_VERSION = '0.1.1';
8
+ const SDK_VERSION = exports.SDK_VERSION = '0.3.0';
9
9
  //# sourceMappingURL=version.js.map