@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
@@ -1,7 +1,8 @@
1
1
  import { assertValidAttributeNames, assertValidEventName } from '../attributes.js';
2
2
  import { DEFAULT_SERVER_ENDPOINT } from '../constants.js';
3
- import { normalizeTrackEventAttributes } from '../eventAttributes.js';
4
3
  import { UserflowAuthError } from '../errors.js';
4
+ import { normalizeTrackEventAttributes } from '../eventAttributes.js';
5
+ import { normalizeAttributes } from '../normalizeAttributes.js';
5
6
  import { PhoenixConnection, validateCredentials } from '../transport/phoenix.js';
6
7
  const DEFAULT_CLIENT_CONTEXT = {
7
8
  pageUrl: '',
@@ -11,7 +12,7 @@ const DEFAULT_CLIENT_CONTEXT = {
11
12
  function requireField(value, name) {
12
13
  const trimmed = value?.trim();
13
14
  if (!trimmed)
14
- throw new UserflowAuthError(`Missing ${name}`);
15
+ throw new UserflowAuthError(`Missing ${name}`, { isHostContract: true });
15
16
  return trimmed;
16
17
  }
17
18
  /**
@@ -24,6 +25,8 @@ export class UserflowCore {
24
25
  this.connection = null;
25
26
  this.userId = null;
26
27
  this.identitySignature = null;
28
+ this.groupId = null;
29
+ this.groupSignature = null;
27
30
  this.attributes = {};
28
31
  this.clientContext = { ...DEFAULT_CLIENT_CONTEXT };
29
32
  this.initPromise = null;
@@ -49,12 +52,31 @@ export class UserflowCore {
49
52
  group(groupId, attributes = {}, options = {}) {
50
53
  return this.doGroup(groupId, attributes, options);
51
54
  }
55
+ /**
56
+ * Upsert attributes for the current user without re-identifying.
57
+ * Requires a prior {@link identify}. Used by flow `SET_ATTRIBUTE` actions.
58
+ */
59
+ updateUser(attributes = {}) {
60
+ return this.doUpdateUser(attributes);
61
+ }
62
+ /**
63
+ * Upsert attributes for the current group / membership without re-grouping.
64
+ * Requires a prior {@link group}. Used by flow `SET_ATTRIBUTE` actions
65
+ * whose FQN is `group/…` or `group_membership/…`.
66
+ */
67
+ updateGroup(attributes = {}, options = {}) {
68
+ return this.doUpdateGroup(attributes, options);
69
+ }
52
70
  track(name, attributes = {}, options = {}) {
53
71
  return this.doTrack(name, attributes, options);
54
72
  }
55
73
  getUserId() {
56
74
  return this.userId;
57
75
  }
76
+ /** Configured end-user API host after {@link init}, or null before init. */
77
+ getServerEndpoint() {
78
+ return this.config?.serverEndpoint ?? null;
79
+ }
58
80
  getAttributes() {
59
81
  return { ...this.attributes };
60
82
  }
@@ -103,7 +125,7 @@ export class UserflowCore {
103
125
  */
104
126
  async send(message) {
105
127
  if (!this.connection) {
106
- return Promise.reject(new UserflowAuthError('Call Userflow.identify() before send()'));
128
+ return Promise.reject(new UserflowAuthError('Call Userflow.identify() before send()', { isHostContract: true }));
107
129
  }
108
130
  await this.ensureConnected();
109
131
  return this.connection.send(message);
@@ -115,7 +137,7 @@ export class UserflowCore {
115
137
  async startFlowWithToken(token) {
116
138
  const trimmed = token.trim();
117
139
  if (!trimmed) {
118
- throw new UserflowAuthError('Missing preview token');
140
+ throw new UserflowAuthError('Missing preview token', { isHostContract: true });
119
141
  }
120
142
  await this.send({ kind: 'StartFlowWithToken', token: trimmed });
121
143
  }
@@ -125,7 +147,9 @@ export class UserflowCore {
125
147
  */
126
148
  onServerMessage(handler) {
127
149
  if (!this.connection) {
128
- throw new UserflowAuthError('Call Userflow.identify() before onServerMessage()');
150
+ throw new UserflowAuthError('Call Userflow.identify() before onServerMessage()', {
151
+ isHostContract: true,
152
+ });
129
153
  }
130
154
  return this.connection.onServerMessage(handler);
131
155
  }
@@ -136,6 +160,13 @@ export class UserflowCore {
136
160
  setFlowSessionId(flowSessionId) {
137
161
  this.connection?.setFlowSessionId(flowSessionId);
138
162
  }
163
+ /**
164
+ * Tell the transport which banner session to resume on (re)join.
165
+ * No-op before identify / connection creation.
166
+ */
167
+ setBannerSessionId(bannerSessionId) {
168
+ this.connection?.setBannerSessionId(bannerSessionId);
169
+ }
139
170
  /**
140
171
  * Tell the transport which client-condition snapshot to include on (re)join.
141
172
  * No-op before identify / connection creation.
@@ -149,23 +180,16 @@ export class UserflowCore {
149
180
  * next channel join.
150
181
  *
151
182
  * Expo Router should pass `{ path }`; React Navigation / manual callers pass
152
- * `{ screen }`. Those map to wire fields `screenPath` / `screenName`.
183
+ * `{ screen }`. Both map to the wire field `screenName` — the backend has no
184
+ * separate path field.
153
185
  * `pageUrl` stays `""` on mobile (required by the backend, web-only otherwise).
154
186
  */
155
187
  async updateScreen(location) {
156
- const next = 'path' in location
157
- ? {
158
- ...this.clientContext,
159
- pageUrl: this.clientContext.pageUrl || '',
160
- screenPath: location.path,
161
- screenName: null,
162
- }
163
- : {
164
- ...this.clientContext,
165
- pageUrl: this.clientContext.pageUrl || '',
166
- screenPath: null,
167
- screenName: location.screen,
168
- };
188
+ const next = {
189
+ ...this.clientContext,
190
+ pageUrl: this.clientContext.pageUrl || '',
191
+ screenName: 'path' in location ? location.path : location.screen,
192
+ };
169
193
  this.clientContext = next;
170
194
  if (!this.connection || !this.userId) {
171
195
  this.connection?.setClientContext(next);
@@ -178,6 +202,8 @@ export class UserflowCore {
178
202
  reset() {
179
203
  this.userId = null;
180
204
  this.identitySignature = null;
205
+ this.groupId = null;
206
+ this.groupSignature = null;
181
207
  this.attributes = {};
182
208
  this.clientContext = { ...DEFAULT_CLIENT_CONTEXT };
183
209
  this.connection?.disconnect();
@@ -185,13 +211,15 @@ export class UserflowCore {
185
211
  }
186
212
  requireInit() {
187
213
  if (!this.config) {
188
- throw new UserflowAuthError('Call Userflow.init() before identify()');
214
+ throw new UserflowAuthError('Call Userflow.init() before identify()', {
215
+ isHostContract: true,
216
+ });
189
217
  }
190
218
  return this.config;
191
219
  }
192
220
  requireInitForGroup() {
193
221
  if (!this.config) {
194
- throw new UserflowAuthError('Call Userflow.init() before group()');
222
+ throw new UserflowAuthError('Call Userflow.init() before group()', { isHostContract: true });
195
223
  }
196
224
  return this.config;
197
225
  }
@@ -204,12 +232,16 @@ export class UserflowCore {
204
232
  this.config = { clientToken, serverEndpoint };
205
233
  this.userId = null;
206
234
  this.identitySignature = null;
235
+ this.groupId = null;
236
+ this.groupSignature = null;
207
237
  this.attributes = {};
208
238
  return this.config;
209
239
  }
210
240
  requireIdentified() {
211
241
  if (!this.userId) {
212
- throw new UserflowAuthError('Call Userflow.identify() before group()');
242
+ throw new UserflowAuthError('Call Userflow.identify() before group()', {
243
+ isHostContract: true,
244
+ });
213
245
  }
214
246
  }
215
247
  async doIdentify(userId, attributes, options) {
@@ -245,13 +277,64 @@ export class UserflowCore {
245
277
  groupAttributes: attributes ?? {},
246
278
  membershipAttributes: options.membership ?? {},
247
279
  });
280
+ this.groupId = externalId;
281
+ this.groupSignature = signature;
282
+ }
283
+ requireIdentifiedFor(method) {
284
+ if (!this.userId) {
285
+ throw new UserflowAuthError(`Call Userflow.identify() before ${method}()`, {
286
+ isHostContract: true,
287
+ });
288
+ }
289
+ }
290
+ requireGroup() {
291
+ this.requireIdentifiedFor('updateGroup');
292
+ if (!this.groupId) {
293
+ throw new UserflowAuthError('Call Userflow.group() before updateGroup()', {
294
+ isHostContract: true,
295
+ });
296
+ }
297
+ return this.groupId;
298
+ }
299
+ async doUpdateUser(attributes) {
300
+ if (!this.config) {
301
+ throw new UserflowAuthError('Call Userflow.init() before updateUser()', {
302
+ isHostContract: true,
303
+ });
304
+ }
305
+ this.requireIdentifiedFor('updateUser');
306
+ const normalized = normalizeAttributes(attributes);
307
+ assertValidAttributeNames('user', normalized);
308
+ await this.ensureConnected();
309
+ await this.connection.updateUser(normalized);
310
+ }
311
+ async doUpdateGroup(attributes, options) {
312
+ if (!this.config) {
313
+ throw new UserflowAuthError('Call Userflow.init() before updateGroup()', {
314
+ isHostContract: true,
315
+ });
316
+ }
317
+ const groupId = this.requireGroup();
318
+ const groupAttributes = normalizeAttributes(attributes);
319
+ const membershipAttributes = normalizeAttributes(options.membership);
320
+ assertValidAttributeNames('group', groupAttributes);
321
+ assertValidAttributeNames('group_membership', membershipAttributes);
322
+ await this.ensureConnected();
323
+ await this.connection.group({
324
+ groupExternalId: groupId,
325
+ groupSignature: this.groupSignature,
326
+ groupAttributes,
327
+ membershipAttributes,
328
+ });
248
329
  }
249
330
  async doTrack(name, attributes, options) {
250
331
  if (!this.config) {
251
- throw new UserflowAuthError('Call Userflow.init() before track()');
332
+ throw new UserflowAuthError('Call Userflow.init() before track()', { isHostContract: true });
252
333
  }
253
334
  if (!this.userId) {
254
- throw new UserflowAuthError('Call Userflow.identify() before track()');
335
+ throw new UserflowAuthError('Call Userflow.identify() before track()', {
336
+ isHostContract: true,
337
+ });
255
338
  }
256
339
  const eventName = requireField(name, 'name');
257
340
  assertValidEvent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I,CAAC,UAAW,CAAC,KAAK,CAAC;YAC3B,eAAe,EAAE,OAAO;YACxB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe;YACf,oBAAoB;SACrB,CAAC,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,OAAO,CACnB,IAAY,EACZ,UAAmC,EACnC,OAA6B;QAE7B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAI,iBAAiB,CAAC,qCAAqC,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/F,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAI,iBAAiB,CAAC,yCAAyC,EAAE;gBACrE,cAAc,EAAE,IAAI;aACrB,CAAC,CAAC;QACL,CAAC;QAED,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAC7C,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAEhC,MAAM,IAAI,CAAC,IAAI,CAAC;YACd,IAAI,EAAE,YAAY;YAClB,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ;YAC5B,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,6BAA6B,CAAC,UAAU,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,16 @@
1
+ import type { FlowConditionFragment, SessionDataFragment } from '@userflow-tech/protocol';
2
+ import { FlowConditionOperator } from '@userflow-tech/protocol';
3
+ export interface CompareOpts {
4
+ sessionData: SessionDataFragment[];
5
+ condition: FlowConditionFragment;
6
+ value: string | string[] | null;
7
+ now?: () => number;
8
+ }
9
+ type CompareFn = (opts: CompareOpts) => boolean;
10
+ /**
11
+ * ATTRIBUTE comparison operators, ported from web
12
+ * `userflowjs/util/flow-condition-operators.ts` without date-fns.
13
+ */
14
+ export declare const conditionOperators: Record<FlowConditionOperator, CompareFn>;
15
+ export {};
16
+ //# sourceMappingURL=conditionOperators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditionOperators.d.ts","sourceRoot":"","sources":["../../src/engine/conditionOperators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,SAAS,EAAE,qBAAqB,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,KAAK,SAAS,GAAG,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,qBAAqB,EAAE,SAAS,CA6IvE,CAAC"}
@@ -0,0 +1,168 @@
1
+ import { FlowConditionOperator } from '@userflow-tech/protocol';
2
+ import { interpolateSessionData } from './interpolateSessionData.js';
3
+ /**
4
+ * ATTRIBUTE comparison operators, ported from web
5
+ * `userflowjs/util/flow-condition-operators.ts` without date-fns.
6
+ */
7
+ export const conditionOperators = {
8
+ [FlowConditionOperator.ABSOLUTE_EQ]: ({ condition, value }) => {
9
+ const actual = parseDateValue(value);
10
+ const start = parseAbsoluteDateValue(condition.value, '00:00:00.000');
11
+ const end = parseAbsoluteDateValue(condition.value, '23:59:59.999');
12
+ return (actual != null &&
13
+ start != null &&
14
+ end != null &&
15
+ !isBefore(actual, start) &&
16
+ !isAfter(actual, end));
17
+ },
18
+ [FlowConditionOperator.ABSOLUTE_GT]: ({ condition, value }) => {
19
+ const actual = parseDateValue(value);
20
+ const end = parseAbsoluteDateValue(condition.value, '23:59:59.999');
21
+ return actual != null && end != null && isAfter(actual, end);
22
+ },
23
+ [FlowConditionOperator.ABSOLUTE_LT]: ({ condition, value }) => {
24
+ const actual = parseDateValue(value);
25
+ const start = parseAbsoluteDateValue(condition.value, '00:00:00.000');
26
+ return actual != null && start != null && isBefore(actual, start);
27
+ },
28
+ [FlowConditionOperator.AND]: () => false,
29
+ [FlowConditionOperator.BETWEEN]: ({ condition, value }) => !!value &&
30
+ !!condition.value &&
31
+ !!condition.value2 &&
32
+ parseFloat(valueToString(value)) >= parseFloat(condition.value) &&
33
+ parseFloat(valueToString(value)) <= parseFloat(condition.value2),
34
+ [FlowConditionOperator.CONTAINS]: ({ sessionData, condition, value }) => !!value &&
35
+ valueToString(value)
36
+ .toLowerCase()
37
+ .includes(interpolateSessionData(condition.value || '', sessionData).toLowerCase()),
38
+ [FlowConditionOperator.EMPTY]: ({ value }) => value == null || value === '' || (Array.isArray(value) && value.length === 0),
39
+ [FlowConditionOperator.ENDS_WITH]: ({ sessionData, condition, value }) => !!value &&
40
+ valueToString(value)
41
+ .toLowerCase()
42
+ .endsWith(interpolateSessionData(condition.value || '', sessionData).toLowerCase()),
43
+ [FlowConditionOperator.EQ]: ({ sessionData, condition, value }) => interpolateSessionData(condition.value || '', sessionData) === valueToString(value),
44
+ [FlowConditionOperator.EXCLUDES_ALL]: ({ condition, value }) => {
45
+ const valueSet = new Set(valueToList(value));
46
+ return !(condition.values || []).some((item) => valueSet.has(item));
47
+ },
48
+ [FlowConditionOperator.EXCLUDES_ANY]: ({ condition, value }) => {
49
+ const valueSet = new Set(valueToList(value));
50
+ return !(condition.values || []).every((item) => valueSet.has(item));
51
+ },
52
+ [FlowConditionOperator.FALSE]: ({ value }) => valueToString(value).toLowerCase() === 'false',
53
+ [FlowConditionOperator.GT]: ({ condition, value }) => !!value && !!condition.value && parseFloat(valueToString(value)) > parseFloat(condition.value),
54
+ [FlowConditionOperator.GTE]: ({ condition, value }) => !!value && !!condition.value && parseFloat(valueToString(value)) >= parseFloat(condition.value),
55
+ [FlowConditionOperator.INCLUDES_ALL]: ({ condition, value }) => {
56
+ const valueSet = new Set(valueToList(value));
57
+ return (condition.values || []).every((item) => valueSet.has(item));
58
+ },
59
+ [FlowConditionOperator.INCLUDES_ANY]: ({ condition, value }) => {
60
+ const valueSet = new Set(valueToList(value));
61
+ return (condition.values || []).some((item) => valueSet.has(item));
62
+ },
63
+ [FlowConditionOperator.LT]: ({ condition, value }) => !!value && !!condition.value && parseFloat(valueToString(value)) < parseFloat(condition.value),
64
+ [FlowConditionOperator.LTE]: ({ condition, value }) => !!value && !!condition.value && parseFloat(valueToString(value)) <= parseFloat(condition.value),
65
+ [FlowConditionOperator.NE]: ({ sessionData, condition, value }) => interpolateSessionData(condition.value || '', sessionData) !== valueToString(value),
66
+ [FlowConditionOperator.NOT_CONTAINS]: ({ sessionData, condition, value }) => !value ||
67
+ !valueToString(value)
68
+ .toLowerCase()
69
+ .includes(interpolateSessionData(condition.value || '', sessionData).toLowerCase()),
70
+ [FlowConditionOperator.NOT_EMPTY]: ({ value }) => value != null && value !== '' && (!Array.isArray(value) || value.length > 0),
71
+ [FlowConditionOperator.NOT_REGEX]: ({ condition, value }) => !compareRegex(condition, value),
72
+ [FlowConditionOperator.OR]: () => false,
73
+ [FlowConditionOperator.REGEX]: ({ condition, value }) => compareRegex(condition, value),
74
+ [FlowConditionOperator.RELATIVE_EQ]: ({ condition, value, now = Date.now }) => {
75
+ const actual = parseDateValue(value);
76
+ const target = parseRelativeDate(condition.value, now);
77
+ if (actual == null || target == null) {
78
+ return false;
79
+ }
80
+ return !isBefore(actual, target) && isBefore(actual, addUtcDays(target, 1));
81
+ },
82
+ [FlowConditionOperator.RELATIVE_GT]: ({ condition, value, now = Date.now }) => {
83
+ const actual = parseDateValue(value);
84
+ const target = parseRelativeDate(condition.value, now);
85
+ if (actual == null || target == null) {
86
+ return false;
87
+ }
88
+ return isAfter(actual, target);
89
+ },
90
+ [FlowConditionOperator.RELATIVE_LT]: ({ condition, value, now = Date.now }) => {
91
+ const actual = parseDateValue(value);
92
+ const target = parseRelativeDate(condition.value, now);
93
+ if (actual == null || target == null) {
94
+ return false;
95
+ }
96
+ return isBefore(actual, target);
97
+ },
98
+ [FlowConditionOperator.STARTS_WITH]: ({ sessionData, condition, value }) => !!value &&
99
+ valueToString(value)
100
+ .toLowerCase()
101
+ .startsWith(interpolateSessionData(condition.value || '', sessionData).toLowerCase()),
102
+ [FlowConditionOperator.TRUE]: ({ value }) => valueToString(value).toLowerCase() === 'true',
103
+ [FlowConditionOperator.URL]: () => false,
104
+ };
105
+ function parseDateValue(dateString) {
106
+ if (Array.isArray(dateString)) {
107
+ dateString = dateString[0] ?? null;
108
+ }
109
+ if (!dateString) {
110
+ return null;
111
+ }
112
+ if (/^\d{4}-\d{2}-\d{2}$/.test(dateString)) {
113
+ dateString += 'T00:00:00.000Z';
114
+ }
115
+ else if (!/(Z|([+-]\d\d:\d\d))$/i.test(dateString)) {
116
+ dateString += 'Z';
117
+ }
118
+ const parsed = new Date(dateString);
119
+ return Number.isNaN(parsed.valueOf()) ? null : parsed;
120
+ }
121
+ function parseAbsoluteDateValue(dateString, time) {
122
+ if (!dateString) {
123
+ return null;
124
+ }
125
+ const parsed = new Date(`${dateString}T${time}Z`);
126
+ return Number.isNaN(parsed.valueOf()) ? null : parsed;
127
+ }
128
+ function parseRelativeDate(daysString, now) {
129
+ if (!daysString) {
130
+ return null;
131
+ }
132
+ const days = parseInt(daysString, 10);
133
+ if (Number.isNaN(days)) {
134
+ return null;
135
+ }
136
+ const date = new Date(now());
137
+ date.setUTCDate(date.getUTCDate() - days);
138
+ return date;
139
+ }
140
+ function addUtcDays(date, days) {
141
+ const next = new Date(date.getTime());
142
+ next.setUTCDate(next.getUTCDate() + days);
143
+ return next;
144
+ }
145
+ function isBefore(left, right) {
146
+ return left.getTime() < right.getTime();
147
+ }
148
+ function isAfter(left, right) {
149
+ return left.getTime() > right.getTime();
150
+ }
151
+ function compareRegex(condition, value) {
152
+ if (!condition.value) {
153
+ return false;
154
+ }
155
+ try {
156
+ return new RegExp(condition.value).test(valueToString(value));
157
+ }
158
+ catch {
159
+ return false;
160
+ }
161
+ }
162
+ function valueToString(value) {
163
+ return Array.isArray(value) ? (value[0] ?? '') : value == null ? '' : value;
164
+ }
165
+ function valueToList(value) {
166
+ return Array.isArray(value) ? value : value === '' || value == null ? [] : [value];
167
+ }
168
+ //# sourceMappingURL=conditionOperators.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditionOperators.js","sourceRoot":"","sources":["../../src/engine/conditionOperators.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAWrE;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA6C;IAC1E,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;QAC5D,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,KAAK,GAAG,sBAAsB,CAAC,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;QACtE,MAAM,GAAG,GAAG,sBAAsB,CAAC,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;QACpE,OAAO,CACL,MAAM,IAAI,IAAI;YACd,KAAK,IAAI,IAAI;YACb,GAAG,IAAI,IAAI;YACX,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC;YACxB,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CACtB,CAAC;IACJ,CAAC;IAED,CAAC,qBAAqB,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;QAC5D,MAAM,MAAM,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,GAAG,GAAG,sBAAsB,CAAC,SAAS,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;QACpE,OAAO,MAAM,IAAI,IAAI,IAAI,GA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,CAAC,CAAC,CAAC,KAAK,KAAK,EAAE,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACrF,CAAC"}
@@ -1,19 +1,56 @@
1
- import type { FlowActionFragment, FlowSessionFragment, FlowStepFragment } from '@userflow-tech/protocol';
2
- import { EndFlowReasonInput } from '@userflow-tech/protocol';
1
+ import type { BannerSessionFragment, FlowActionFragment, FlowSessionFragment, FlowStepFragment } from '@userflow-tech/protocol';
2
+ import { EndFlowReasonInput, StartFlowReasonInput } from '@userflow-tech/protocol';
3
+ import type { PublicAttributes } from '../types.js';
3
4
  /** Narrow surface handleActions needs from FlowSessionEngine (avoids a circular import). */
4
5
  export interface FlowActionRunner {
5
6
  goToStep(step: FlowStepFragment): Promise<void>;
6
7
  endFlow(endReason: EndFlowReasonInput): Promise<void>;
8
+ trackButtonEvent(eventName: string, token: string, stepCvid: string | null, sessionId: string | null): Promise<void>;
9
+ startFlow(options: {
10
+ flowId: string;
11
+ stepCvid: string | null;
12
+ startReason: StartFlowReasonInput;
13
+ replaceCurrent: boolean;
14
+ }): Promise<void>;
15
+ updateUser(attributes: PublicAttributes): Promise<void>;
16
+ updateGroup(attributes: PublicAttributes, options?: {
17
+ membership?: PublicAttributes;
18
+ }): Promise<void>;
19
+ /**
20
+ * Open a server batch so `check_sessions` is deferred until {@link endBatch}.
21
+ * Web `trackButtonEvent` sends `{batch: true}` for the same reason.
22
+ */
23
+ beginBatch(): Promise<void>;
24
+ endBatch(): Promise<void>;
25
+ }
26
+ /** Customer JavaScript handed to the host (a WebView on React Native). */
27
+ export interface EvalJsRequest {
28
+ code: string;
29
+ sessionId: string;
30
+ flowId: string;
31
+ draftMode: boolean;
7
32
  }
8
33
  export interface HandleActionsDeps {
9
34
  engine: FlowActionRunner;
10
35
  onOpenExternalUrl?: (url: string) => void;
36
+ /**
37
+ * Run an Evaluate JavaScript action. When omitted, the action warns and
38
+ * does nothing (hosts that have not installed the WebView runtime).
39
+ */
40
+ onEvalJs?: (request: EvalJsRequest) => void;
11
41
  warn?: (message: string) => void;
12
42
  }
13
43
  /**
14
- * MVP port of web `handleActions`: GO_TO_STEP, CLOSE_FLOW, NAVIGATE.
15
- * Ordering matches userflowjs — NEW_TAB navigate sync, other actions in parallel,
16
- * SAME_TAB navigate last.
44
+ * MVP port of web `handleActions`: GO_TO_STEP, CLOSE_FLOW, NAVIGATE,
45
+ * TRACK_BUTTON_EVENT, START_FLOW, SET_ATTRIBUTE, EVAL_JS (when `onEvalJs`
46
+ * is set). Ordering: NEW_TAB navigate
47
+ * first (before BeginBatch), then track-button + other actions in one
48
+ * `Promise.all` (web `regularActions`), SAME_TAB navigate last.
49
+ *
50
+ * Track-button events open a server batch (web `{batch: true}`). Awaiting
51
+ * track *before* GO_TO_STEP lets that event's `check_sessions` unset or
52
+ * restart the session, so go-to-step never emits and the flow looks stuck.
17
53
  */
18
- export declare function handleActions(session: FlowSessionFragment, actions: FlowActionFragment[], deps: HandleActionsDeps): Promise<void>;
54
+ export type ActionSession = FlowSessionFragment | BannerSessionFragment;
55
+ export declare function handleActions(session: ActionSession, actions: FlowActionFragment[], deps: HandleActionsDeps): Promise<void>;
19
56
  //# sourceMappingURL=handleActions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handleActions.d.ts","sourceRoot":"","sources":["../../src/engine/handleActions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAGnB,MAAM,yBAAyB,CAAC;AAIjC,4FAA4F;AAC5F,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,OAAO,CAAC,SAAS,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvD;AAED,MAA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