@userflow-tech/react-native 0.1.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 (783) hide show
  1. package/LICENSE +76 -0
  2. package/README.md +337 -0
  3. package/docs/anchoring.md +264 -0
  4. package/docs/deep-linking.md +271 -0
  5. package/docs/identity-verification.md +95 -0
  6. package/docs/theme-mapping.md +101 -0
  7. package/docs/troubleshooting.md +107 -0
  8. package/lib/commonjs/anchors/AnchorRegistry.js +72 -0
  9. package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -0
  10. package/lib/commonjs/anchors/AutoAnchorRegistry.js +315 -0
  11. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -0
  12. package/lib/commonjs/anchors/ScrollContainerRegistry.js +93 -0
  13. package/lib/commonjs/anchors/ScrollContainerRegistry.js.map +1 -0
  14. package/lib/commonjs/anchors/anchorChangeTicker.js +83 -0
  15. package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -0
  16. package/lib/commonjs/anchors/animationFrame.js +90 -0
  17. package/lib/commonjs/anchors/animationFrame.js.map +1 -0
  18. package/lib/commonjs/anchors/autoAnchor.js +253 -0
  19. package/lib/commonjs/anchors/autoAnchor.js.map +1 -0
  20. package/lib/commonjs/anchors/elementConditionEvaluator.js +82 -0
  21. package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -0
  22. package/lib/commonjs/anchors/fiber/FiberScanRoot.js +90 -0
  23. package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -0
  24. package/lib/commonjs/anchors/fiber/fiberInternals.js +180 -0
  25. package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -0
  26. package/lib/commonjs/anchors/fiber/findAnchorFiber.js +214 -0
  27. package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -0
  28. package/lib/commonjs/anchors/fiber/findScrollAncestors.js +176 -0
  29. package/lib/commonjs/anchors/fiber/findScrollAncestors.js.map +1 -0
  30. package/lib/commonjs/anchors/fiber/measureHostFiber.js +75 -0
  31. package/lib/commonjs/anchors/fiber/measureHostFiber.js.map +1 -0
  32. package/lib/commonjs/anchors/fiber/visibleScreens.js +165 -0
  33. package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -0
  34. package/lib/commonjs/anchors/hintsCodec.js +120 -0
  35. package/lib/commonjs/anchors/hintsCodec.js.map +1 -0
  36. package/lib/commonjs/anchors/resolveAnchorHost.js +112 -0
  37. package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -0
  38. package/lib/commonjs/anchors/resolveManualAnchorId.js +17 -0
  39. package/lib/commonjs/anchors/resolveManualAnchorId.js.map +1 -0
  40. package/lib/commonjs/anchors/scrollAnchorIntoView.js +227 -0
  41. package/lib/commonjs/anchors/scrollAnchorIntoView.js.map +1 -0
  42. package/lib/commonjs/anchors/scrollConfig.js +48 -0
  43. package/lib/commonjs/anchors/scrollConfig.js.map +1 -0
  44. package/lib/commonjs/anchors/targetPressMonitor.js +113 -0
  45. package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -0
  46. package/lib/commonjs/anchors/useUserflowAnchor.js +91 -0
  47. package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -0
  48. package/lib/commonjs/anchors/useUserflowScrollContainer.js +76 -0
  49. package/lib/commonjs/anchors/useUserflowScrollContainer.js.map +1 -0
  50. package/lib/commonjs/anonymousId.js +42 -0
  51. package/lib/commonjs/anonymousId.js.map +1 -0
  52. package/lib/commonjs/content/RichContentRenderer.js +675 -0
  53. package/lib/commonjs/content/RichContentRenderer.js.map +1 -0
  54. package/lib/commonjs/content/StepButton.js +57 -0
  55. package/lib/commonjs/content/StepButton.js.map +1 -0
  56. package/lib/commonjs/content/buttonAppearance.js +18 -0
  57. package/lib/commonjs/content/buttonAppearance.js.map +1 -0
  58. package/lib/commonjs/content/deserialize.js +129 -0
  59. package/lib/commonjs/content/deserialize.js.map +1 -0
  60. package/lib/commonjs/content/imageLayout.js +24 -0
  61. package/lib/commonjs/content/imageLayout.js.map +1 -0
  62. package/lib/commonjs/content/migrateFlowBlocks.js +39 -0
  63. package/lib/commonjs/content/migrateFlowBlocks.js.map +1 -0
  64. package/lib/commonjs/content/openSafeUrl.js +37 -0
  65. package/lib/commonjs/content/openSafeUrl.js.map +1 -0
  66. package/lib/commonjs/content/resolveStepButtonChrome.js +95 -0
  67. package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -0
  68. package/lib/commonjs/content/themeColor.js +106 -0
  69. package/lib/commonjs/content/themeColor.js.map +1 -0
  70. package/lib/commonjs/content/types.js +2 -0
  71. package/lib/commonjs/content/types.js.map +1 -0
  72. package/lib/commonjs/deepLinking.js +162 -0
  73. package/lib/commonjs/deepLinking.js.map +1 -0
  74. package/lib/commonjs/expo-router/UserflowExpoRouterScreenTracker.js +13 -0
  75. package/lib/commonjs/expo-router/UserflowExpoRouterScreenTracker.js.map +1 -0
  76. package/lib/commonjs/expo-router/getExpoRouterScreenTracker.js +44 -0
  77. package/lib/commonjs/expo-router/getExpoRouterScreenTracker.js.map +1 -0
  78. package/lib/commonjs/expo-router/index.js +20 -0
  79. package/lib/commonjs/expo-router/index.js.map +1 -0
  80. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +45 -0
  81. package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -0
  82. package/lib/commonjs/index.js +356 -0
  83. package/lib/commonjs/index.js.map +1 -0
  84. package/lib/commonjs/lifecycle.js +200 -0
  85. package/lib/commonjs/lifecycle.js.map +1 -0
  86. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +69 -0
  87. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -0
  88. package/lib/commonjs/navigation/chainCallbacks.js +16 -0
  89. package/lib/commonjs/navigation/chainCallbacks.js.map +1 -0
  90. package/lib/commonjs/navigation/getActiveRouteName.js +18 -0
  91. package/lib/commonjs/navigation/getActiveRouteName.js.map +1 -0
  92. package/lib/commonjs/navigation/index.js +50 -0
  93. package/lib/commonjs/navigation/index.js.map +1 -0
  94. package/lib/commonjs/navigation/openFlowNavigateUrl.js +110 -0
  95. package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -0
  96. package/lib/commonjs/network.js +90 -0
  97. package/lib/commonjs/network.js.map +1 -0
  98. package/lib/commonjs/pairing/PairingController.js +290 -0
  99. package/lib/commonjs/pairing/PairingController.js.map +1 -0
  100. package/lib/commonjs/pairing/PreviewModeBanner.js +118 -0
  101. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -0
  102. package/lib/commonjs/pairing/deepLink.js +141 -0
  103. package/lib/commonjs/pairing/deepLink.js.map +1 -0
  104. package/lib/commonjs/pairing/diagnostics.js +115 -0
  105. package/lib/commonjs/pairing/diagnostics.js.map +1 -0
  106. package/lib/commonjs/pairing/index.js +58 -0
  107. package/lib/commonjs/pairing/index.js.map +1 -0
  108. package/lib/commonjs/pairing/pairingRuntime.js +85 -0
  109. package/lib/commonjs/pairing/pairingRuntime.js.map +1 -0
  110. package/lib/commonjs/pairing/tokenStorage.js +70 -0
  111. package/lib/commonjs/pairing/tokenStorage.js.map +1 -0
  112. package/lib/commonjs/pairing/usePairingState.js +40 -0
  113. package/lib/commonjs/pairing/usePairingState.js.map +1 -0
  114. package/lib/commonjs/runtime/FlowRenderer.js +57 -0
  115. package/lib/commonjs/runtime/FlowRenderer.js.map +1 -0
  116. package/lib/commonjs/runtime/FlowSurfaceFade.js +53 -0
  117. package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -0
  118. package/lib/commonjs/runtime/TargetPressBridge.js +96 -0
  119. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -0
  120. package/lib/commonjs/runtime/UserflowProvider.js +91 -0
  121. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -0
  122. package/lib/commonjs/runtime/clientConditions.js +50 -0
  123. package/lib/commonjs/runtime/clientConditions.js.map +1 -0
  124. package/lib/commonjs/runtime/flowEngine.js +63 -0
  125. package/lib/commonjs/runtime/flowEngine.js.map +1 -0
  126. package/lib/commonjs/runtime/flowSessionViewState.js +48 -0
  127. package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -0
  128. package/lib/commonjs/runtime/useFlowSessionState.js +25 -0
  129. package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -0
  130. package/lib/commonjs/runtime/userflowCore.js +13 -0
  131. package/lib/commonjs/runtime/userflowCore.js.map +1 -0
  132. package/lib/commonjs/screenTracker.js +87 -0
  133. package/lib/commonjs/screenTracker.js.map +1 -0
  134. package/lib/commonjs/surfaces/CloseButton.js +52 -0
  135. package/lib/commonjs/surfaces/CloseButton.js.map +1 -0
  136. package/lib/commonjs/surfaces/MadeWithUserflow.js +90 -0
  137. package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -0
  138. package/lib/commonjs/surfaces/ModalSurface.js +170 -0
  139. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -0
  140. package/lib/commonjs/surfaces/ProgressBar.js +116 -0
  141. package/lib/commonjs/surfaces/ProgressBar.js.map +1 -0
  142. package/lib/commonjs/surfaces/TooltipSurface.js +638 -0
  143. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -0
  144. package/lib/commonjs/surfaces/absoluteFill.js +29 -0
  145. package/lib/commonjs/surfaces/absoluteFill.js.map +1 -0
  146. package/lib/commonjs/surfaces/assets/png.d.js +2 -0
  147. package/lib/commonjs/surfaces/assets/png.d.js.map +1 -0
  148. package/lib/commonjs/surfaces/assets/userflow-logomark.png +0 -0
  149. package/lib/commonjs/surfaces/parseBackdropOpacity.js +20 -0
  150. package/lib/commonjs/surfaces/parseBackdropOpacity.js.map +1 -0
  151. package/lib/commonjs/surfaces/progress.js +35 -0
  152. package/lib/commonjs/surfaces/progress.js.map +1 -0
  153. package/lib/commonjs/surfaces/resolveCloseButtonColor.js +24 -0
  154. package/lib/commonjs/surfaces/resolveCloseButtonColor.js.map +1 -0
  155. package/lib/commonjs/surfaces/resolveModalLayout.js +67 -0
  156. package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -0
  157. package/lib/commonjs/surfaces/resolveTooltipLayout.js +64 -0
  158. package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -0
  159. package/lib/commonjs/surfaces/safeArea.js +46 -0
  160. package/lib/commonjs/surfaces/safeArea.js.map +1 -0
  161. package/lib/commonjs/surfaces/themeChrome.js +90 -0
  162. package/lib/commonjs/surfaces/themeChrome.js.map +1 -0
  163. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +108 -0
  164. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -0
  165. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +103 -0
  166. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -0
  167. package/lib/commonjs/surfaces/tooltip/TooltipNotch.js +64 -0
  168. package/lib/commonjs/surfaces/tooltip/TooltipNotch.js.map +1 -0
  169. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +102 -0
  170. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -0
  171. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +100 -0
  172. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -0
  173. package/lib/commonjs/surfaces/tooltip/parseBackdropPadding.js +15 -0
  174. package/lib/commonjs/surfaces/tooltip/parseBackdropPadding.js.map +1 -0
  175. package/lib/commonjs/surfaces/tooltip/rect.js +51 -0
  176. package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -0
  177. package/lib/commonjs/useUserflowScreen.js +24 -0
  178. package/lib/commonjs/useUserflowScreen.js.map +1 -0
  179. package/lib/commonjs/version.js +9 -0
  180. package/lib/commonjs/version.js.map +1 -0
  181. package/lib/module/anchors/AnchorRegistry.js +67 -0
  182. package/lib/module/anchors/AnchorRegistry.js.map +1 -0
  183. package/lib/module/anchors/AutoAnchorRegistry.js +309 -0
  184. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -0
  185. package/lib/module/anchors/ScrollContainerRegistry.js +86 -0
  186. package/lib/module/anchors/ScrollContainerRegistry.js.map +1 -0
  187. package/lib/module/anchors/anchorChangeTicker.js +79 -0
  188. package/lib/module/anchors/anchorChangeTicker.js.map +1 -0
  189. package/lib/module/anchors/animationFrame.js +83 -0
  190. package/lib/module/anchors/animationFrame.js.map +1 -0
  191. package/lib/module/anchors/autoAnchor.js +248 -0
  192. package/lib/module/anchors/autoAnchor.js.map +1 -0
  193. package/lib/module/anchors/elementConditionEvaluator.js +79 -0
  194. package/lib/module/anchors/elementConditionEvaluator.js.map +1 -0
  195. package/lib/module/anchors/fiber/FiberScanRoot.js +84 -0
  196. package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -0
  197. package/lib/module/anchors/fiber/fiberInternals.js +164 -0
  198. package/lib/module/anchors/fiber/fiberInternals.js.map +1 -0
  199. package/lib/module/anchors/fiber/findAnchorFiber.js +210 -0
  200. package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -0
  201. package/lib/module/anchors/fiber/findScrollAncestors.js +172 -0
  202. package/lib/module/anchors/fiber/findScrollAncestors.js.map +1 -0
  203. package/lib/module/anchors/fiber/measureHostFiber.js +70 -0
  204. package/lib/module/anchors/fiber/measureHostFiber.js.map +1 -0
  205. package/lib/module/anchors/fiber/visibleScreens.js +159 -0
  206. package/lib/module/anchors/fiber/visibleScreens.js.map +1 -0
  207. package/lib/module/anchors/hintsCodec.js +111 -0
  208. package/lib/module/anchors/hintsCodec.js.map +1 -0
  209. package/lib/module/anchors/resolveAnchorHost.js +105 -0
  210. package/lib/module/anchors/resolveAnchorHost.js.map +1 -0
  211. package/lib/module/anchors/resolveManualAnchorId.js +13 -0
  212. package/lib/module/anchors/resolveManualAnchorId.js.map +1 -0
  213. package/lib/module/anchors/scrollAnchorIntoView.js +222 -0
  214. package/lib/module/anchors/scrollAnchorIntoView.js.map +1 -0
  215. package/lib/module/anchors/scrollConfig.js +40 -0
  216. package/lib/module/anchors/scrollConfig.js.map +1 -0
  217. package/lib/module/anchors/targetPressMonitor.js +105 -0
  218. package/lib/module/anchors/targetPressMonitor.js.map +1 -0
  219. package/lib/module/anchors/useUserflowAnchor.js +87 -0
  220. package/lib/module/anchors/useUserflowAnchor.js.map +1 -0
  221. package/lib/module/anchors/useUserflowScrollContainer.js +71 -0
  222. package/lib/module/anchors/useUserflowScrollContainer.js.map +1 -0
  223. package/lib/module/anonymousId.js +36 -0
  224. package/lib/module/anonymousId.js.map +1 -0
  225. package/lib/module/content/RichContentRenderer.js +670 -0
  226. package/lib/module/content/RichContentRenderer.js.map +1 -0
  227. package/lib/module/content/StepButton.js +52 -0
  228. package/lib/module/content/StepButton.js.map +1 -0
  229. package/lib/module/content/buttonAppearance.js +14 -0
  230. package/lib/module/content/buttonAppearance.js.map +1 -0
  231. package/lib/module/content/deserialize.js +116 -0
  232. package/lib/module/content/deserialize.js.map +1 -0
  233. package/lib/module/content/imageLayout.js +20 -0
  234. package/lib/module/content/imageLayout.js.map +1 -0
  235. package/lib/module/content/migrateFlowBlocks.js +35 -0
  236. package/lib/module/content/migrateFlowBlocks.js.map +1 -0
  237. package/lib/module/content/openSafeUrl.js +32 -0
  238. package/lib/module/content/openSafeUrl.js.map +1 -0
  239. package/lib/module/content/resolveStepButtonChrome.js +90 -0
  240. package/lib/module/content/resolveStepButtonChrome.js.map +1 -0
  241. package/lib/module/content/themeColor.js +99 -0
  242. package/lib/module/content/themeColor.js.map +1 -0
  243. package/lib/module/content/types.js +2 -0
  244. package/lib/module/content/types.js.map +1 -0
  245. package/lib/module/deepLinking.js +152 -0
  246. package/lib/module/deepLinking.js.map +1 -0
  247. package/lib/module/expo-router/UserflowExpoRouterScreenTracker.js +10 -0
  248. package/lib/module/expo-router/UserflowExpoRouterScreenTracker.js.map +1 -0
  249. package/lib/module/expo-router/getExpoRouterScreenTracker.js +39 -0
  250. package/lib/module/expo-router/getExpoRouterScreenTracker.js.map +1 -0
  251. package/lib/module/expo-router/index.js +5 -0
  252. package/lib/module/expo-router/index.js.map +1 -0
  253. package/lib/module/expo-router/useUserflowExpoRouter.js +42 -0
  254. package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -0
  255. package/lib/module/index.js +259 -0
  256. package/lib/module/index.js.map +1 -0
  257. package/lib/module/lifecycle.js +195 -0
  258. package/lib/module/lifecycle.js.map +1 -0
  259. package/lib/module/navigation/WithUserflowReactNavigation.js +65 -0
  260. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -0
  261. package/lib/module/navigation/chainCallbacks.js +12 -0
  262. package/lib/module/navigation/chainCallbacks.js.map +1 -0
  263. package/lib/module/navigation/getActiveRouteName.js +14 -0
  264. package/lib/module/navigation/getActiveRouteName.js.map +1 -0
  265. package/lib/module/navigation/index.js +5 -0
  266. package/lib/module/navigation/index.js.map +1 -0
  267. package/lib/module/navigation/openFlowNavigateUrl.js +100 -0
  268. package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -0
  269. package/lib/module/network.js +85 -0
  270. package/lib/module/network.js.map +1 -0
  271. package/lib/module/pairing/PairingController.js +286 -0
  272. package/lib/module/pairing/PairingController.js.map +1 -0
  273. package/lib/module/pairing/PreviewModeBanner.js +113 -0
  274. package/lib/module/pairing/PreviewModeBanner.js.map +1 -0
  275. package/lib/module/pairing/deepLink.js +134 -0
  276. package/lib/module/pairing/deepLink.js.map +1 -0
  277. package/lib/module/pairing/diagnostics.js +101 -0
  278. package/lib/module/pairing/diagnostics.js.map +1 -0
  279. package/lib/module/pairing/index.js +7 -0
  280. package/lib/module/pairing/index.js.map +1 -0
  281. package/lib/module/pairing/pairingRuntime.js +77 -0
  282. package/lib/module/pairing/pairingRuntime.js.map +1 -0
  283. package/lib/module/pairing/tokenStorage.js +65 -0
  284. package/lib/module/pairing/tokenStorage.js.map +1 -0
  285. package/lib/module/pairing/usePairingState.js +35 -0
  286. package/lib/module/pairing/usePairingState.js.map +1 -0
  287. package/lib/module/runtime/FlowRenderer.js +52 -0
  288. package/lib/module/runtime/FlowRenderer.js.map +1 -0
  289. package/lib/module/runtime/FlowSurfaceFade.js +48 -0
  290. package/lib/module/runtime/FlowSurfaceFade.js.map +1 -0
  291. package/lib/module/runtime/TargetPressBridge.js +91 -0
  292. package/lib/module/runtime/TargetPressBridge.js.map +1 -0
  293. package/lib/module/runtime/UserflowProvider.js +85 -0
  294. package/lib/module/runtime/UserflowProvider.js.map +1 -0
  295. package/lib/module/runtime/clientConditions.js +43 -0
  296. package/lib/module/runtime/clientConditions.js.map +1 -0
  297. package/lib/module/runtime/flowEngine.js +54 -0
  298. package/lib/module/runtime/flowEngine.js.map +1 -0
  299. package/lib/module/runtime/flowSessionViewState.js +42 -0
  300. package/lib/module/runtime/flowSessionViewState.js.map +1 -0
  301. package/lib/module/runtime/useFlowSessionState.js +21 -0
  302. package/lib/module/runtime/useFlowSessionState.js.map +1 -0
  303. package/lib/module/runtime/userflowCore.js +10 -0
  304. package/lib/module/runtime/userflowCore.js.map +1 -0
  305. package/lib/module/screenTracker.js +79 -0
  306. package/lib/module/screenTracker.js.map +1 -0
  307. package/lib/module/surfaces/CloseButton.js +47 -0
  308. package/lib/module/surfaces/CloseButton.js.map +1 -0
  309. package/lib/module/surfaces/MadeWithUserflow.js +83 -0
  310. package/lib/module/surfaces/MadeWithUserflow.js.map +1 -0
  311. package/lib/module/surfaces/ModalSurface.js +165 -0
  312. package/lib/module/surfaces/ModalSurface.js.map +1 -0
  313. package/lib/module/surfaces/ProgressBar.js +111 -0
  314. package/lib/module/surfaces/ProgressBar.js.map +1 -0
  315. package/lib/module/surfaces/TooltipSurface.js +633 -0
  316. package/lib/module/surfaces/TooltipSurface.js.map +1 -0
  317. package/lib/module/surfaces/absoluteFill.js +25 -0
  318. package/lib/module/surfaces/absoluteFill.js.map +1 -0
  319. package/lib/module/surfaces/assets/png.d.js +2 -0
  320. package/lib/module/surfaces/assets/png.d.js.map +1 -0
  321. package/lib/module/surfaces/assets/userflow-logomark.png +0 -0
  322. package/lib/module/surfaces/parseBackdropOpacity.js +16 -0
  323. package/lib/module/surfaces/parseBackdropOpacity.js.map +1 -0
  324. package/lib/module/surfaces/progress.js +31 -0
  325. package/lib/module/surfaces/progress.js.map +1 -0
  326. package/lib/module/surfaces/resolveCloseButtonColor.js +20 -0
  327. package/lib/module/surfaces/resolveCloseButtonColor.js.map +1 -0
  328. package/lib/module/surfaces/resolveModalLayout.js +59 -0
  329. package/lib/module/surfaces/resolveModalLayout.js.map +1 -0
  330. package/lib/module/surfaces/resolveTooltipLayout.js +57 -0
  331. package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -0
  332. package/lib/module/surfaces/safeArea.js +41 -0
  333. package/lib/module/surfaces/safeArea.js.map +1 -0
  334. package/lib/module/surfaces/themeChrome.js +86 -0
  335. package/lib/module/surfaces/themeChrome.js.map +1 -0
  336. package/lib/module/surfaces/tooltip/TooltipBubble.js +103 -0
  337. package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -0
  338. package/lib/module/surfaces/tooltip/TooltipCutout.js +98 -0
  339. package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -0
  340. package/lib/module/surfaces/tooltip/TooltipNotch.js +55 -0
  341. package/lib/module/surfaces/tooltip/TooltipNotch.js.map +1 -0
  342. package/lib/module/surfaces/tooltip/computeTooltipPosition.js +97 -0
  343. package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -0
  344. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +95 -0
  345. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -0
  346. package/lib/module/surfaces/tooltip/parseBackdropPadding.js +11 -0
  347. package/lib/module/surfaces/tooltip/parseBackdropPadding.js.map +1 -0
  348. package/lib/module/surfaces/tooltip/rect.js +44 -0
  349. package/lib/module/surfaces/tooltip/rect.js.map +1 -0
  350. package/lib/module/useUserflowScreen.js +21 -0
  351. package/lib/module/useUserflowScreen.js.map +1 -0
  352. package/lib/module/version.js +5 -0
  353. package/lib/module/version.js.map +1 -0
  354. package/lib/typescript/commonjs/package.json +1 -0
  355. package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +32 -0
  356. package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +113 -0
  358. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts +46 -0
  360. package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +30 -0
  362. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts +21 -0
  364. package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts +31 -0
  366. package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +21 -0
  368. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +41 -0
  370. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -0
  371. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +48 -0
  372. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -0
  373. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +33 -0
  374. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -0
  375. package/lib/typescript/commonjs/src/anchors/fiber/findScrollAncestors.d.ts +47 -0
  376. package/lib/typescript/commonjs/src/anchors/fiber/findScrollAncestors.d.ts.map +1 -0
  377. package/lib/typescript/commonjs/src/anchors/fiber/measureHostFiber.d.ts +20 -0
  378. package/lib/typescript/commonjs/src/anchors/fiber/measureHostFiber.d.ts.map +1 -0
  379. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +42 -0
  380. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts +40 -0
  382. package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts.map +1 -0
  383. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +32 -0
  384. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -0
  385. package/lib/typescript/commonjs/src/anchors/resolveManualAnchorId.d.ts +6 -0
  386. package/lib/typescript/commonjs/src/anchors/resolveManualAnchorId.d.ts.map +1 -0
  387. package/lib/typescript/commonjs/src/anchors/scrollAnchorIntoView.d.ts +59 -0
  388. package/lib/typescript/commonjs/src/anchors/scrollAnchorIntoView.d.ts.map +1 -0
  389. package/lib/typescript/commonjs/src/anchors/scrollConfig.d.ts +30 -0
  390. package/lib/typescript/commonjs/src/anchors/scrollConfig.d.ts.map +1 -0
  391. package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +64 -0
  392. package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -0
  393. package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts +30 -0
  394. package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts +34 -0
  396. package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts.map +1 -0
  397. package/lib/typescript/commonjs/src/anonymousId.d.ts +5 -0
  398. package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -0
  399. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +21 -0
  400. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -0
  401. package/lib/typescript/commonjs/src/content/StepButton.d.ts +13 -0
  402. package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +8 -0
  404. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -0
  405. package/lib/typescript/commonjs/src/content/deserialize.d.ts +27 -0
  406. package/lib/typescript/commonjs/src/content/deserialize.d.ts.map +1 -0
  407. package/lib/typescript/commonjs/src/content/imageLayout.d.ts +13 -0
  408. package/lib/typescript/commonjs/src/content/imageLayout.d.ts.map +1 -0
  409. package/lib/typescript/commonjs/src/content/migrateFlowBlocks.d.ts +12 -0
  410. package/lib/typescript/commonjs/src/content/migrateFlowBlocks.d.ts.map +1 -0
  411. package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts +12 -0
  412. package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts.map +1 -0
  413. package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts +24 -0
  414. package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -0
  415. package/lib/typescript/commonjs/src/content/themeColor.d.ts +43 -0
  416. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -0
  417. package/lib/typescript/commonjs/src/content/types.d.ts +144 -0
  418. package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -0
  419. package/lib/typescript/commonjs/src/deepLinking.d.ts +54 -0
  420. package/lib/typescript/commonjs/src/deepLinking.d.ts.map +1 -0
  421. package/lib/typescript/commonjs/src/expo-router/UserflowExpoRouterScreenTracker.d.ts +3 -0
  422. package/lib/typescript/commonjs/src/expo-router/UserflowExpoRouterScreenTracker.d.ts.map +1 -0
  423. package/lib/typescript/commonjs/src/expo-router/getExpoRouterScreenTracker.d.ts +13 -0
  424. package/lib/typescript/commonjs/src/expo-router/getExpoRouterScreenTracker.d.ts.map +1 -0
  425. package/lib/typescript/commonjs/src/expo-router/index.d.ts +3 -0
  426. package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -0
  427. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +17 -0
  428. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -0
  429. package/lib/typescript/commonjs/src/index.d.ts +112 -0
  430. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  431. package/lib/typescript/commonjs/src/lifecycle.d.ts +96 -0
  432. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -0
  433. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts +21 -0
  434. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -0
  435. package/lib/typescript/commonjs/src/navigation/chainCallbacks.d.ts +3 -0
  436. package/lib/typescript/commonjs/src/navigation/chainCallbacks.d.ts.map +1 -0
  437. package/lib/typescript/commonjs/src/navigation/getActiveRouteName.d.ts +6 -0
  438. package/lib/typescript/commonjs/src/navigation/getActiveRouteName.d.ts.map +1 -0
  439. package/lib/typescript/commonjs/src/navigation/index.d.ts +5 -0
  440. package/lib/typescript/commonjs/src/navigation/index.d.ts.map +1 -0
  441. package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts +33 -0
  442. package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -0
  443. package/lib/typescript/commonjs/src/network.d.ts +42 -0
  444. package/lib/typescript/commonjs/src/network.d.ts.map +1 -0
  445. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +104 -0
  446. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -0
  447. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +11 -0
  448. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -0
  449. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +53 -0
  450. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -0
  451. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +52 -0
  452. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -0
  453. package/lib/typescript/commonjs/src/pairing/index.d.ts +10 -0
  454. package/lib/typescript/commonjs/src/pairing/index.d.ts.map +1 -0
  455. package/lib/typescript/commonjs/src/pairing/pairingRuntime.d.ts +24 -0
  456. package/lib/typescript/commonjs/src/pairing/pairingRuntime.d.ts.map +1 -0
  457. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +16 -0
  458. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -0
  459. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts +4 -0
  460. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -0
  461. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +13 -0
  462. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -0
  463. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +13 -0
  464. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -0
  465. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +16 -0
  466. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -0
  467. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +32 -0
  468. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/runtime/clientConditions.d.ts +10 -0
  470. package/lib/typescript/commonjs/src/runtime/clientConditions.d.ts.map +1 -0
  471. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +17 -0
  472. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -0
  473. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +18 -0
  474. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -0
  475. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +10 -0
  476. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -0
  477. package/lib/typescript/commonjs/src/runtime/userflowCore.d.ts +3 -0
  478. package/lib/typescript/commonjs/src/runtime/userflowCore.d.ts.map +1 -0
  479. package/lib/typescript/commonjs/src/screenTracker.d.ts +28 -0
  480. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -0
  481. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -0
  482. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -0
  483. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +28 -0
  484. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -0
  485. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +23 -0
  486. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -0
  487. package/lib/typescript/commonjs/src/surfaces/ProgressBar.d.ts +19 -0
  488. package/lib/typescript/commonjs/src/surfaces/ProgressBar.d.ts.map +1 -0
  489. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +17 -0
  490. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -0
  491. package/lib/typescript/commonjs/src/surfaces/absoluteFill.d.ts +18 -0
  492. package/lib/typescript/commonjs/src/surfaces/absoluteFill.d.ts.map +1 -0
  493. package/lib/typescript/commonjs/src/surfaces/parseBackdropOpacity.d.ts +5 -0
  494. package/lib/typescript/commonjs/src/surfaces/parseBackdropOpacity.d.ts.map +1 -0
  495. package/lib/typescript/commonjs/src/surfaces/progress.d.ts +14 -0
  496. package/lib/typescript/commonjs/src/surfaces/progress.d.ts.map +1 -0
  497. package/lib/typescript/commonjs/src/surfaces/resolveCloseButtonColor.d.ts +9 -0
  498. package/lib/typescript/commonjs/src/surfaces/resolveCloseButtonColor.d.ts.map +1 -0
  499. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +36 -0
  500. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -0
  501. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +24 -0
  502. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -0
  503. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +11 -0
  504. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -0
  505. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +36 -0
  506. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -0
  507. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +23 -0
  508. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -0
  509. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +31 -0
  510. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -0
  511. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipNotch.d.ts +29 -0
  512. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipNotch.d.ts.map +1 -0
  513. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +43 -0
  514. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -0
  515. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +34 -0
  516. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -0
  517. package/lib/typescript/commonjs/src/surfaces/tooltip/parseBackdropPadding.d.ts +3 -0
  518. package/lib/typescript/commonjs/src/surfaces/tooltip/parseBackdropPadding.d.ts.map +1 -0
  519. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +29 -0
  520. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -0
  521. package/lib/typescript/commonjs/src/useUserflowScreen.d.ts +10 -0
  522. package/lib/typescript/commonjs/src/useUserflowScreen.d.ts.map +1 -0
  523. package/lib/typescript/commonjs/src/version.d.ts +3 -0
  524. package/lib/typescript/commonjs/src/version.d.ts.map +1 -0
  525. package/lib/typescript/module/package.json +1 -0
  526. package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +32 -0
  527. package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -0
  528. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +113 -0
  529. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -0
  530. package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts +46 -0
  531. package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts.map +1 -0
  532. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +30 -0
  533. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -0
  534. package/lib/typescript/module/src/anchors/animationFrame.d.ts +21 -0
  535. package/lib/typescript/module/src/anchors/animationFrame.d.ts.map +1 -0
  536. package/lib/typescript/module/src/anchors/autoAnchor.d.ts +31 -0
  537. package/lib/typescript/module/src/anchors/autoAnchor.d.ts.map +1 -0
  538. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +21 -0
  539. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -0
  540. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +41 -0
  541. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -0
  542. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +48 -0
  543. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -0
  544. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +33 -0
  545. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -0
  546. package/lib/typescript/module/src/anchors/fiber/findScrollAncestors.d.ts +47 -0
  547. package/lib/typescript/module/src/anchors/fiber/findScrollAncestors.d.ts.map +1 -0
  548. package/lib/typescript/module/src/anchors/fiber/measureHostFiber.d.ts +20 -0
  549. package/lib/typescript/module/src/anchors/fiber/measureHostFiber.d.ts.map +1 -0
  550. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +42 -0
  551. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -0
  552. package/lib/typescript/module/src/anchors/hintsCodec.d.ts +40 -0
  553. package/lib/typescript/module/src/anchors/hintsCodec.d.ts.map +1 -0
  554. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +32 -0
  555. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -0
  556. package/lib/typescript/module/src/anchors/resolveManualAnchorId.d.ts +6 -0
  557. package/lib/typescript/module/src/anchors/resolveManualAnchorId.d.ts.map +1 -0
  558. package/lib/typescript/module/src/anchors/scrollAnchorIntoView.d.ts +59 -0
  559. package/lib/typescript/module/src/anchors/scrollAnchorIntoView.d.ts.map +1 -0
  560. package/lib/typescript/module/src/anchors/scrollConfig.d.ts +30 -0
  561. package/lib/typescript/module/src/anchors/scrollConfig.d.ts.map +1 -0
  562. package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +64 -0
  563. package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -0
  564. package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts +30 -0
  565. package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -0
  566. package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts +34 -0
  567. package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts.map +1 -0
  568. package/lib/typescript/module/src/anonymousId.d.ts +5 -0
  569. package/lib/typescript/module/src/anonymousId.d.ts.map +1 -0
  570. package/lib/typescript/module/src/content/RichContentRenderer.d.ts +21 -0
  571. package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -0
  572. package/lib/typescript/module/src/content/StepButton.d.ts +13 -0
  573. package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -0
  574. package/lib/typescript/module/src/content/buttonAppearance.d.ts +8 -0
  575. package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -0
  576. package/lib/typescript/module/src/content/deserialize.d.ts +27 -0
  577. package/lib/typescript/module/src/content/deserialize.d.ts.map +1 -0
  578. package/lib/typescript/module/src/content/imageLayout.d.ts +13 -0
  579. package/lib/typescript/module/src/content/imageLayout.d.ts.map +1 -0
  580. package/lib/typescript/module/src/content/migrateFlowBlocks.d.ts +12 -0
  581. package/lib/typescript/module/src/content/migrateFlowBlocks.d.ts.map +1 -0
  582. package/lib/typescript/module/src/content/openSafeUrl.d.ts +12 -0
  583. package/lib/typescript/module/src/content/openSafeUrl.d.ts.map +1 -0
  584. package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts +24 -0
  585. package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -0
  586. package/lib/typescript/module/src/content/themeColor.d.ts +43 -0
  587. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -0
  588. package/lib/typescript/module/src/content/types.d.ts +144 -0
  589. package/lib/typescript/module/src/content/types.d.ts.map +1 -0
  590. package/lib/typescript/module/src/deepLinking.d.ts +54 -0
  591. package/lib/typescript/module/src/deepLinking.d.ts.map +1 -0
  592. package/lib/typescript/module/src/expo-router/UserflowExpoRouterScreenTracker.d.ts +3 -0
  593. package/lib/typescript/module/src/expo-router/UserflowExpoRouterScreenTracker.d.ts.map +1 -0
  594. package/lib/typescript/module/src/expo-router/getExpoRouterScreenTracker.d.ts +13 -0
  595. package/lib/typescript/module/src/expo-router/getExpoRouterScreenTracker.d.ts.map +1 -0
  596. package/lib/typescript/module/src/expo-router/index.d.ts +3 -0
  597. package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -0
  598. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +17 -0
  599. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -0
  600. package/lib/typescript/module/src/index.d.ts +112 -0
  601. package/lib/typescript/module/src/index.d.ts.map +1 -0
  602. package/lib/typescript/module/src/lifecycle.d.ts +96 -0
  603. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -0
  604. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts +21 -0
  605. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -0
  606. package/lib/typescript/module/src/navigation/chainCallbacks.d.ts +3 -0
  607. package/lib/typescript/module/src/navigation/chainCallbacks.d.ts.map +1 -0
  608. package/lib/typescript/module/src/navigation/getActiveRouteName.d.ts +6 -0
  609. package/lib/typescript/module/src/navigation/getActiveRouteName.d.ts.map +1 -0
  610. package/lib/typescript/module/src/navigation/index.d.ts +5 -0
  611. package/lib/typescript/module/src/navigation/index.d.ts.map +1 -0
  612. package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts +33 -0
  613. package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -0
  614. package/lib/typescript/module/src/network.d.ts +42 -0
  615. package/lib/typescript/module/src/network.d.ts.map +1 -0
  616. package/lib/typescript/module/src/pairing/PairingController.d.ts +104 -0
  617. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -0
  618. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +11 -0
  619. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -0
  620. package/lib/typescript/module/src/pairing/deepLink.d.ts +53 -0
  621. package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -0
  622. package/lib/typescript/module/src/pairing/diagnostics.d.ts +52 -0
  623. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -0
  624. package/lib/typescript/module/src/pairing/index.d.ts +10 -0
  625. package/lib/typescript/module/src/pairing/index.d.ts.map +1 -0
  626. package/lib/typescript/module/src/pairing/pairingRuntime.d.ts +24 -0
  627. package/lib/typescript/module/src/pairing/pairingRuntime.d.ts.map +1 -0
  628. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +16 -0
  629. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -0
  630. package/lib/typescript/module/src/pairing/usePairingState.d.ts +4 -0
  631. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -0
  632. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +13 -0
  633. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -0
  634. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +13 -0
  635. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -0
  636. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +16 -0
  637. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -0
  638. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +32 -0
  639. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -0
  640. package/lib/typescript/module/src/runtime/clientConditions.d.ts +10 -0
  641. package/lib/typescript/module/src/runtime/clientConditions.d.ts.map +1 -0
  642. package/lib/typescript/module/src/runtime/flowEngine.d.ts +17 -0
  643. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -0
  644. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +18 -0
  645. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -0
  646. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +10 -0
  647. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -0
  648. package/lib/typescript/module/src/runtime/userflowCore.d.ts +3 -0
  649. package/lib/typescript/module/src/runtime/userflowCore.d.ts.map +1 -0
  650. package/lib/typescript/module/src/screenTracker.d.ts +28 -0
  651. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -0
  652. package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -0
  653. package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -0
  654. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +28 -0
  655. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -0
  656. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +23 -0
  657. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -0
  658. package/lib/typescript/module/src/surfaces/ProgressBar.d.ts +19 -0
  659. package/lib/typescript/module/src/surfaces/ProgressBar.d.ts.map +1 -0
  660. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +17 -0
  661. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -0
  662. package/lib/typescript/module/src/surfaces/absoluteFill.d.ts +18 -0
  663. package/lib/typescript/module/src/surfaces/absoluteFill.d.ts.map +1 -0
  664. package/lib/typescript/module/src/surfaces/parseBackdropOpacity.d.ts +5 -0
  665. package/lib/typescript/module/src/surfaces/parseBackdropOpacity.d.ts.map +1 -0
  666. package/lib/typescript/module/src/surfaces/progress.d.ts +14 -0
  667. package/lib/typescript/module/src/surfaces/progress.d.ts.map +1 -0
  668. package/lib/typescript/module/src/surfaces/resolveCloseButtonColor.d.ts +9 -0
  669. package/lib/typescript/module/src/surfaces/resolveCloseButtonColor.d.ts.map +1 -0
  670. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +36 -0
  671. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -0
  672. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +24 -0
  673. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -0
  674. package/lib/typescript/module/src/surfaces/safeArea.d.ts +11 -0
  675. package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -0
  676. package/lib/typescript/module/src/surfaces/themeChrome.d.ts +36 -0
  677. package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -0
  678. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +23 -0
  679. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -0
  680. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +31 -0
  681. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -0
  682. package/lib/typescript/module/src/surfaces/tooltip/TooltipNotch.d.ts +29 -0
  683. package/lib/typescript/module/src/surfaces/tooltip/TooltipNotch.d.ts.map +1 -0
  684. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +43 -0
  685. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -0
  686. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +34 -0
  687. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -0
  688. package/lib/typescript/module/src/surfaces/tooltip/parseBackdropPadding.d.ts +3 -0
  689. package/lib/typescript/module/src/surfaces/tooltip/parseBackdropPadding.d.ts.map +1 -0
  690. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +29 -0
  691. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -0
  692. package/lib/typescript/module/src/useUserflowScreen.d.ts +10 -0
  693. package/lib/typescript/module/src/useUserflowScreen.d.ts.map +1 -0
  694. package/lib/typescript/module/src/version.d.ts +3 -0
  695. package/lib/typescript/module/src/version.d.ts.map +1 -0
  696. package/package.json +144 -0
  697. package/src/anchors/AnchorRegistry.ts +81 -0
  698. package/src/anchors/AutoAnchorRegistry.ts +439 -0
  699. package/src/anchors/ScrollContainerRegistry.ts +108 -0
  700. package/src/anchors/anchorChangeTicker.ts +84 -0
  701. package/src/anchors/animationFrame.ts +88 -0
  702. package/src/anchors/autoAnchor.ts +310 -0
  703. package/src/anchors/elementConditionEvaluator.ts +108 -0
  704. package/src/anchors/fiber/FiberScanRoot.tsx +98 -0
  705. package/src/anchors/fiber/fiberInternals.ts +181 -0
  706. package/src/anchors/fiber/findAnchorFiber.ts +225 -0
  707. package/src/anchors/fiber/findScrollAncestors.ts +229 -0
  708. package/src/anchors/fiber/measureHostFiber.ts +85 -0
  709. package/src/anchors/fiber/visibleScreens.ts +173 -0
  710. package/src/anchors/hintsCodec.ts +125 -0
  711. package/src/anchors/resolveAnchorHost.ts +102 -0
  712. package/src/anchors/resolveManualAnchorId.ts +10 -0
  713. package/src/anchors/scrollAnchorIntoView.ts +251 -0
  714. package/src/anchors/scrollConfig.ts +61 -0
  715. package/src/anchors/targetPressMonitor.ts +127 -0
  716. package/src/anchors/useUserflowAnchor.ts +88 -0
  717. package/src/anchors/useUserflowScrollContainer.ts +86 -0
  718. package/src/anonymousId.ts +38 -0
  719. package/src/content/RichContentRenderer.tsx +721 -0
  720. package/src/content/StepButton.tsx +70 -0
  721. package/src/content/buttonAppearance.ts +11 -0
  722. package/src/content/deserialize.ts +147 -0
  723. package/src/content/imageLayout.ts +29 -0
  724. package/src/content/migrateFlowBlocks.ts +39 -0
  725. package/src/content/openSafeUrl.ts +30 -0
  726. package/src/content/resolveStepButtonChrome.ts +122 -0
  727. package/src/content/themeColor.ts +98 -0
  728. package/src/content/types.ts +189 -0
  729. package/src/deepLinking.ts +182 -0
  730. package/src/expo-router/UserflowExpoRouterScreenTracker.tsx +7 -0
  731. package/src/expo-router/getExpoRouterScreenTracker.ts +49 -0
  732. package/src/expo-router/index.ts +2 -0
  733. package/src/expo-router/useUserflowExpoRouter.ts +40 -0
  734. package/src/index.ts +362 -0
  735. package/src/lifecycle.ts +253 -0
  736. package/src/navigation/WithUserflowReactNavigation.tsx +87 -0
  737. package/src/navigation/chainCallbacks.ts +12 -0
  738. package/src/navigation/getActiveRouteName.ts +18 -0
  739. package/src/navigation/index.ts +11 -0
  740. package/src/navigation/openFlowNavigateUrl.ts +113 -0
  741. package/src/network.ts +113 -0
  742. package/src/pairing/PairingController.ts +356 -0
  743. package/src/pairing/PreviewModeBanner.tsx +130 -0
  744. package/src/pairing/deepLink.ts +128 -0
  745. package/src/pairing/diagnostics.ts +135 -0
  746. package/src/pairing/index.ts +19 -0
  747. package/src/pairing/pairingRuntime.ts +76 -0
  748. package/src/pairing/tokenStorage.ts +76 -0
  749. package/src/pairing/usePairingState.ts +43 -0
  750. package/src/runtime/FlowRenderer.tsx +60 -0
  751. package/src/runtime/FlowSurfaceFade.tsx +55 -0
  752. package/src/runtime/TargetPressBridge.tsx +86 -0
  753. package/src/runtime/UserflowProvider.tsx +89 -0
  754. package/src/runtime/clientConditions.ts +42 -0
  755. package/src/runtime/flowEngine.ts +53 -0
  756. package/src/runtime/flowSessionViewState.ts +55 -0
  757. package/src/runtime/useFlowSessionState.ts +36 -0
  758. package/src/runtime/userflowCore.ts +8 -0
  759. package/src/screenTracker.ts +83 -0
  760. package/src/surfaces/CloseButton.tsx +41 -0
  761. package/src/surfaces/MadeWithUserflow.tsx +103 -0
  762. package/src/surfaces/ModalSurface.tsx +215 -0
  763. package/src/surfaces/ProgressBar.tsx +142 -0
  764. package/src/surfaces/TooltipSurface.tsx +743 -0
  765. package/src/surfaces/absoluteFill.ts +24 -0
  766. package/src/surfaces/assets/png.d.ts +4 -0
  767. package/src/surfaces/assets/userflow-logomark.png +0 -0
  768. package/src/surfaces/parseBackdropOpacity.ts +13 -0
  769. package/src/surfaces/progress.ts +37 -0
  770. package/src/surfaces/resolveCloseButtonColor.ts +23 -0
  771. package/src/surfaces/resolveModalLayout.ts +85 -0
  772. package/src/surfaces/resolveTooltipLayout.ts +73 -0
  773. package/src/surfaces/safeArea.ts +48 -0
  774. package/src/surfaces/themeChrome.ts +126 -0
  775. package/src/surfaces/tooltip/TooltipBubble.tsx +123 -0
  776. package/src/surfaces/tooltip/TooltipCutout.tsx +110 -0
  777. package/src/surfaces/tooltip/TooltipNotch.tsx +67 -0
  778. package/src/surfaces/tooltip/computeTooltipPosition.ts +125 -0
  779. package/src/surfaces/tooltip/inferTooltipPlacement.ts +109 -0
  780. package/src/surfaces/tooltip/parseBackdropPadding.ts +8 -0
  781. package/src/surfaces/tooltip/rect.ts +62 -0
  782. package/src/useUserflowScreen.ts +17 -0
  783. package/src/version.ts +2 -0
@@ -0,0 +1,214 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.findAnchorFiber = findAnchorFiber;
7
+ exports.nearestHostDescendant = nearestHostDescendant;
8
+ var _fiberInternals = require("./fiberInternals.js");
9
+ var _visibleScreens = require("./visibleScreens.js");
10
+ /**
11
+ * Soft cap so a dense screen cannot stall the JS thread. One modest Expo Router
12
+ * screen measures ~2,700 fibers, and a navigation stack keeps earlier screens
13
+ * mounted, so this has to allow for several screens at once.
14
+ */
15
+ const MAX_NODES = 60_000;
16
+
17
+ /** One production warning per process — truncation must not look like "missing". */
18
+ let maxNodesWarned = false;
19
+ const TIER_ORDER = ['testID', 'nativeID', 'accessibilityLabel'];
20
+ /**
21
+ * Bounded DFS under `rootFiber` looking for fibers whose memoizedProps match
22
+ * `id` on testID, then nativeID, then accessibilityLabel. Uses the highest
23
+ * tier that has any match so a testID hit is never made ambiguous by an
24
+ * unrelated accessibilityLabel.
25
+ *
26
+ * Composite matches descend to the shallowest host descendant. Multiple
27
+ * matches on a single root-to-leaf chain (e.g. Pressable forwarding testID to
28
+ * its inner View) collapse to the outermost host. Disjoint matches fail closed
29
+ * as ambiguous.
30
+ *
31
+ * The walk never follows `rootFiber.sibling` so the Userflow overlay (a sibling
32
+ * of {@link FiberScanRoot} in UserflowProvider) cannot self-match SDK testIDs.
33
+ */
34
+ function findAnchorFiber(rootFiber, id) {
35
+ if (!rootFiber || !id) return {
36
+ status: 'missing'
37
+ };
38
+ try {
39
+ const byTier = {
40
+ testID: [],
41
+ nativeID: [],
42
+ accessibilityLabel: []
43
+ };
44
+ const stack = [rootFiber];
45
+ // Branches belonging to screens the user cannot see. Their siblings are
46
+ // still walked, so only the covered subtree is skipped.
47
+ const covered = new Set();
48
+ let visited = 0;
49
+ while (stack.length > 0 && visited < MAX_NODES) {
50
+ const fiber = stack.pop();
51
+ if (!fiber) continue;
52
+ visited += 1;
53
+ if (covered.has(fiber)) {
54
+ // Keep following the chain, but do not match or descend here.
55
+ if (fiber !== rootFiber) {
56
+ const sibling = (0, _fiberInternals.getSibling)(fiber);
57
+ if (sibling) stack.push(sibling);
58
+ }
59
+ continue;
60
+ }
61
+ const props = (0, _fiberInternals.getMemoizedProps)(fiber);
62
+ if (props) {
63
+ if (typeof props.testID === 'string' && props.testID === id) {
64
+ byTier.testID.push(fiber);
65
+ }
66
+ if (typeof props.nativeID === 'string' && props.nativeID === id) {
67
+ byTier.nativeID.push(fiber);
68
+ }
69
+ if (typeof props.accessibilityLabel === 'string' && props.accessibilityLabel === id) {
70
+ byTier.accessibilityLabel.push(fiber);
71
+ }
72
+ }
73
+
74
+ // Descend into children. Do NOT follow the seed root's sibling — in
75
+ // UserflowProvider the overlay (with SDK testIDs) is a sibling of
76
+ // FiberScanRoot and must stay outside the scan.
77
+ if (fiber !== rootFiber) {
78
+ const sibling = (0, _fiberInternals.getSibling)(fiber);
79
+ if (sibling) stack.push(sibling);
80
+ }
81
+ if ((0, _visibleScreens.isScreenContainerFiber)(fiber)) {
82
+ for (const branch of (0, _visibleScreens.coveredScreenBranches)(fiber)) {
83
+ covered.add(branch);
84
+ }
85
+ }
86
+ const child = (0, _fiberInternals.getChild)(fiber);
87
+ if (child) stack.push(child);
88
+ }
89
+ if (visited >= MAX_NODES) {
90
+ // Truncation would otherwise look exactly like "the anchor isn't there".
91
+ // eslint-disable-next-line no-console -- actionable: the anchor may exist but was not reached
92
+ const warn = message => console.warn(message);
93
+ if (__DEV__) {
94
+ warn(`[Userflow] Anchor scan for "${id}" stopped after ${MAX_NODES} nodes. ` + `The element may exist but was not reached. Register it explicitly with ` + `useUserflowAnchor("${id}") to skip the scan.`);
95
+ } else if (!maxNodesWarned) {
96
+ maxNodesWarned = true;
97
+ warn(`[Userflow] Anchor scan stopped after ${MAX_NODES} nodes; some anchors may ` + `be missed. Prefer useUserflowAnchor for deep or dense trees.`);
98
+ }
99
+ }
100
+ for (const tier of TIER_ORDER) {
101
+ const matches = byTier[tier];
102
+ if (matches.length === 0) continue;
103
+ const hosts = uniqueHosts(matches);
104
+ if (hosts.length === 0) continue;
105
+ if (hosts.length === 1) {
106
+ return {
107
+ status: 'found',
108
+ fiber: hosts[0],
109
+ tier
110
+ };
111
+ }
112
+ const collapsed = collapseToChains(hosts);
113
+ if (collapsed.length === 1) {
114
+ return {
115
+ status: 'found',
116
+ fiber: collapsed[0],
117
+ tier
118
+ };
119
+ }
120
+ return {
121
+ status: 'ambiguous',
122
+ tier
123
+ };
124
+ }
125
+ return {
126
+ status: 'missing'
127
+ };
128
+ } catch {
129
+ return {
130
+ status: 'missing'
131
+ };
132
+ }
133
+ }
134
+
135
+ /**
136
+ * For each matched fiber, resolve the shallowest host descendant (or itself
137
+ * when already a host). Deduplicate by identity / alternate.
138
+ */
139
+ function uniqueHosts(matches) {
140
+ const seen = new Set();
141
+ const out = [];
142
+ for (const match of matches) {
143
+ const host = nearestHostDescendant(match) ?? ((0, _fiberInternals.isHostFiber)(match) ? match : null);
144
+ if (!host) continue;
145
+ const identity = host.alternate ?? host;
146
+ if (seen.has(host) || seen.has(identity)) continue;
147
+ seen.add(host);
148
+ seen.add(identity);
149
+ if (host.alternate) seen.add(host.alternate);
150
+ out.push(host);
151
+ }
152
+ return out;
153
+ }
154
+
155
+ /**
156
+ * BFS under `fiber` for the shallowest host descendant. Returns `fiber` itself
157
+ * when it is already a host.
158
+ */
159
+ function nearestHostDescendant(fiber, maxNodes = 2_000) {
160
+ if (!fiber) return null;
161
+ if ((0, _fiberInternals.isHostFiber)(fiber)) return fiber;
162
+ const queue = [fiber];
163
+ let visited = 0;
164
+ while (queue.length > 0 && visited < maxNodes) {
165
+ const f = queue.shift();
166
+ if (!f) continue;
167
+ visited += 1;
168
+ if (f !== fiber && (0, _fiberInternals.isHostFiber)(f)) return f;
169
+ let child = (0, _fiberInternals.getChild)(f);
170
+ while (child) {
171
+ queue.push(child);
172
+ child = (0, _fiberInternals.getSibling)(child);
173
+ }
174
+ }
175
+ return null;
176
+ }
177
+
178
+ /**
179
+ * Collapse hosts that all lie on one ancestor chain into the outermost
180
+ * (closest to the root). Disjoint subtrees remain as separate entries.
181
+ */
182
+ function collapseToChains(hosts) {
183
+ if (hosts.length <= 1) return hosts;
184
+
185
+ // Prefer the outermost host when A is an ancestor of B.
186
+ const survivors = [];
187
+ for (const candidate of hosts) {
188
+ let dominated = false;
189
+ for (let i = survivors.length - 1; i >= 0; i -= 1) {
190
+ const other = survivors[i];
191
+ if (isAncestorOf(other, candidate)) {
192
+ // other is outer — drop candidate
193
+ dominated = true;
194
+ break;
195
+ }
196
+ if (isAncestorOf(candidate, other)) {
197
+ // candidate is outer — replace other
198
+ survivors.splice(i, 1);
199
+ }
200
+ }
201
+ if (!dominated) survivors.push(candidate);
202
+ }
203
+ return survivors;
204
+ }
205
+ function isAncestorOf(ancestor, descendant) {
206
+ let cur = descendant;
207
+ for (let depth = 0; cur && depth < _fiberInternals.MAX_ANCESTOR_WALK; depth += 1) {
208
+ if (cur === ancestor) return true;
209
+ if (ancestor.alternate && cur === ancestor.alternate) return true;
210
+ cur = (0, _fiberInternals.getReturn)(cur);
211
+ }
212
+ return false;
213
+ }
214
+ //# sourceMappingURL=findAnchorFiber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_fiberInternals","require","_visibleScreens","MAX_NODES","maxNodesWarned","TIER_ORDER","findAnchorFiber","rootFiber","id","status","byTier","testID","nativeID","accessibilityLabel","stack","covered","Set","visited","length","fiber","pop","has","sibling","getSibling","push","props","getMemoizedProps","isScreenContainerFiber","branch","coveredScreenBranches","add","child","getChild","warn","message","console","__DEV__","tier","matches","hosts","uniqueHosts","collapsed","collapseToChains","seen","out","match","host","nearestHostDescendant","isHostFiber","identity","alternate","maxNodes","queue","f","shift","survivors","candidate","dominated","i","other","isAncestorOf","splice","ancestor","descendant","cur","depth","MAX_ANCESTOR_WALK","getReturn"],"sourceRoot":"../../../../src","sources":["anchors/fiber/findAnchorFiber.ts"],"mappings":";;;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AASA,IAAAC,eAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA,MAA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K,CAACrB,MAAM,IAAI,CAAC,EAAE,OAAOqB,KAAK;;EAEnC;EACA,MAAMgB,SAAqB,GAAG,EAAE;EAChC,KAAK,MAAMC,SAAS,IAAIjB,KAAK,EAAE;IAC7B,IAAIkB,SAAS,GAAG,KAAK;IACrB,KAAK,IAAIC,CAAC,GAAGH,SAAS,CAACrC,MAAM,GAAG,CAAC,EAAEwC,CAAC,IAAI,CAAC,EAAEA,CAAC,IAAI,CAAC,EAAE;MACjD,MAAMC,KAAK,GAAGJ,SAAS,CAACG,CAAC,CAAE;MAC3B,IAAIE,YAAY,CAACD,KAAK,EAAEH,SAAS,CAAC,EAAE;QAClC;QACAC,SAAS,GAAG,IAAI;QAChB;MACF;MACA,IAAIG,YAAY,CAACJ,SAAS,EAAEG,KAAK,CAAC,EAAE;QAClC;QACAJ,SAAS,CAACM,MAAM,CAACH,CAAC,EAAE,CAAC,CAAC;MACxB;IACF;IACA,IAAI,CAACD,SAAS,EAAEF,SAAS,CAAC/B,IAAI,CAACgC,SAAS,CAAC;EAC3C;EACA,OAAOD,SAAS;AAClB;AAEA,SAASK,YAAYA,CAACE,QAAkB,EAAEC,UAAoB,EAAW;EACvE,IAAIC,GAAa,GAAGD,UAAU;EAC9B,KAAK,IAAIE,KAAK,GAAG,CAAC,EAAED,GAAG,IAAIC,KAAK,GAAGC,iCAAiB,EAAED,KAAK,IAAI,CAAC,EAAE;IAChE,IAAID,GAAG,KAAKF,QAAQ,EAAE,OAAO,IAAI;IACjC,IAAIA,QAAQ,CAACZ,SAAS,IAAIc,GAAG,KAAKF,QAAQ,CAACZ,SAAS,EAAE,OAAO,IAAI;IACjEc,GAAG,GAAG,IAAAG,yBAAS,EAACH,GAAG,CAAC;EACtB;EACA,OAAO,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.findScrollAncestors = findScrollAncestors;
7
+ var _fiberInternals = require("./fiberInternals.js");
8
+ var _findAnchorFiber = require("./findAnchorFiber.js");
9
+ /**
10
+ * Walk the fiber `return` chain from an anchor host upward and collect
11
+ * scrollable ancestors (innermost first). Used to scroll tooltip targets into
12
+ * view without requiring the host app to register ScrollViews.
13
+ *
14
+ * Detection is duck-typed on `stateNode` (ScrollView → `scrollTo`,
15
+ * FlatList/VirtualizedList → `scrollToOffset`, SectionList → `scrollToLocation`)
16
+ * so an RN rename degrades to "no scroll ancestor" rather than crashing.
17
+ */
18
+
19
+ const SCROLL_METHODS = ['scrollTo', 'scrollToOffset', 'scrollToLocation'];
20
+
21
+ /** Native host types that own the scroll viewport. */
22
+ const SCROLL_HOST_TYPES = new Set(['RCTScrollView', 'AndroidHorizontalScrollView']);
23
+
24
+ /** Native host type for the scroll content (moves with contentOffset). */
25
+ const SCROLL_CONTENT_TYPES = new Set(['RCTScrollContentView', 'AndroidHorizontalScrollContentView']);
26
+ /**
27
+ * Collect scrollable ancestors of `fiber`, innermost first.
28
+ * Never throws — missing / renamed internals simply yield an empty list.
29
+ */
30
+ function findScrollAncestors(fiber) {
31
+ const out = [];
32
+ if (!fiber) return out;
33
+ try {
34
+ let current = fiber;
35
+ for (let depth = 0; current && depth < _fiberInternals.MAX_ANCESTOR_WALK; depth += 1) {
36
+ const instance = asScrollableInstance((0, _fiberInternals.getStateNode)(current));
37
+ if (instance) {
38
+ const {
39
+ containerFiber,
40
+ contentFiber
41
+ } = resolveScrollGeometry(current, instance);
42
+ out.push({
43
+ instance,
44
+ containerFiber,
45
+ contentFiber,
46
+ horizontal: isHorizontal(instance, current)
47
+ });
48
+ }
49
+ current = (0, _fiberInternals.getReturn)(current);
50
+ }
51
+ } catch {
52
+ // Feature-detection must itself never throw.
53
+ }
54
+ return out;
55
+ }
56
+ function asScrollableInstance(node) {
57
+ if (!node || typeof node !== 'object') return null;
58
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
59
+ const n = node;
60
+ for (const method of SCROLL_METHODS) {
61
+ if (typeof n[method] === 'function') {
62
+ return n;
63
+ }
64
+ }
65
+ // FlatList/SectionList often expose the list via `_listRef`.
66
+ if (n._listRef && typeof n._listRef === 'object') {
67
+ return asScrollableInstance(n._listRef);
68
+ }
69
+ return null;
70
+ }
71
+ function isHorizontal(instance, fiber) {
72
+ try {
73
+ if (instance.props && typeof instance.props.horizontal === 'boolean') {
74
+ return instance.props.horizontal;
75
+ }
76
+ const props = (0, _fiberInternals.getMemoizedProps)(fiber);
77
+ if (props && typeof props.horizontal === 'boolean') {
78
+ return props.horizontal;
79
+ }
80
+ } catch {
81
+ // Best-effort.
82
+ }
83
+ return false;
84
+ }
85
+
86
+ /**
87
+ * Resolve the viewport host + content host for offset-from-measure.
88
+ *
89
+ * Prefers imperative refs on the ScrollView instance when present; otherwise
90
+ * walks descendants looking for RCTScrollView / RCTScrollContentView.
91
+ */
92
+ function resolveScrollGeometry(scrollFiber, instance) {
93
+ // Prefer live refs when the instance is a ScrollView (bind `this`).
94
+ const nativeRef = safeCall(instance, instance.getNativeScrollRef);
95
+ const innerRef = safeCall(instance, instance.getInnerViewRef);
96
+ let containerFiber = fiberFromMaybeInstance(nativeRef) ?? findDescendantByHostType(scrollFiber, SCROLL_HOST_TYPES);
97
+ let contentFiber = fiberFromMaybeInstance(innerRef) ?? (containerFiber ? findDescendantByHostType(containerFiber, SCROLL_CONTENT_TYPES) : findDescendantByHostType(scrollFiber, SCROLL_CONTENT_TYPES));
98
+
99
+ // Fall back: nearest host under the scroll composite = viewport; its first
100
+ // host child is typically the content wrapper.
101
+ if (!containerFiber) {
102
+ containerFiber = (0, _findAnchorFiber.nearestHostDescendant)(scrollFiber);
103
+ }
104
+ if (!contentFiber && containerFiber) {
105
+ contentFiber = firstHostChild(containerFiber);
106
+ }
107
+ return {
108
+ containerFiber,
109
+ contentFiber
110
+ };
111
+ }
112
+ function fiberFromMaybeInstance(instance) {
113
+ if (!instance || typeof instance === 'number') return null;
114
+ try {
115
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
116
+ const inst = instance;
117
+ const handle = inst._reactInternals ?? inst._reactInternalFiber ?? inst.__internalInstanceHandle ?? inst._internalInstanceHandle;
118
+ if (handle) return handle;
119
+ // Fabric public instance may itself be a host stateNode with a fiber link.
120
+ if ((0, _fiberInternals.isHostFiber)({
121
+ stateNode: instance,
122
+ tag: 5
123
+ })) {
124
+ // No fiber pointer — caller will measure via stateNode directly if needed.
125
+ return null;
126
+ }
127
+ } catch {
128
+ // Best-effort.
129
+ }
130
+ return null;
131
+ }
132
+ function findDescendantByHostType(fiber, types, maxNodes = 2_000) {
133
+ if (!fiber) return null;
134
+ const queue = [fiber];
135
+ let visited = 0;
136
+ while (queue.length > 0 && visited < maxNodes) {
137
+ const f = queue.shift();
138
+ if (!f) continue;
139
+ visited += 1;
140
+ if (f !== fiber && (0, _fiberInternals.isHostFiber)(f)) {
141
+ const name = (0, _fiberInternals.getHostTypeName)(f);
142
+ if (name && types.has(name)) return f;
143
+ }
144
+ let child = (0, _fiberInternals.getChild)(f);
145
+ while (child) {
146
+ queue.push(child);
147
+ child = (0, _fiberInternals.getSibling)(child);
148
+ }
149
+ }
150
+ return null;
151
+ }
152
+ function firstHostChild(fiber) {
153
+ let child = (0, _fiberInternals.getChild)(fiber);
154
+ let guard = 0;
155
+ while (child && guard < 200) {
156
+ if ((0, _fiberInternals.isHostFiber)(child)) return child;
157
+ // Prefer descending into the first child before siblings.
158
+ const grandchild = (0, _fiberInternals.getChild)(child);
159
+ if (grandchild) {
160
+ child = grandchild;
161
+ } else {
162
+ child = (0, _fiberInternals.getSibling)(child);
163
+ }
164
+ guard += 1;
165
+ }
166
+ return null;
167
+ }
168
+ function safeCall(self, fn) {
169
+ if (typeof fn !== 'function') return null;
170
+ try {
171
+ return fn.call(self);
172
+ } catch {
173
+ return null;
174
+ }
175
+ }
176
+ //# sourceMappingURL=findScrollAncestors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_fiberInternals","require","_findAnchorFiber","SCROLL_METHODS","SCROLL_HOST_TYPES","Set","SCROLL_CONTENT_TYPES","findScrollAncestors","fiber","out","current","depth","MAX_ANCESTOR_WALK","instance","asScrollableInstance","getStateNode","containerFiber","contentFiber","resolveScrollGeometry","push","horizontal","isHorizontal","getReturn","node","n","method","_listRef","props","getMemoizedProps","scrollFiber","nativeRef","safeCall","getNativeScrollRef","innerRef","getInnerViewRef","fiberFromMaybeInstance","findDescendantByHostType","nearestHostDescendant","firstHostChild","inst","handle","_reactInternals","_reactInternalFiber","__internalInstanceHandle","_internalInstanceHandle","isHostFiber","stateNode","tag","types","maxNodes","queue","visited","length","f","shift","name","getHostTypeName","has","child","getChild","getSibling","guard","grandchild","self","fn","call"],"sourceRoot":"../../../../src","sources":["anchors/fiber/findScrollAncestors.ts"],"mappings":";;;;;;AAUA,IAAAA,eAAA,GAAAC,OAAA;AAWA,IAAAC,gBAAA,GAAAD,OAAA;AArBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA,MAAME,cAAc,GAAG,CAAC,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,CAAU;;AAElF;AACA,MAAMC,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAAC,eAAe,EAAE,6BAA6B,CAAC,CAAC;;AAEnF;AACA,MAAMC,oBAAoB,GAAG,IAAID,GAAG,CAAC,CACnC,sBAAsB,EACtB,oCAAoC,CACrC,CAAC;AA8BF;AACA;AACA;AACA;AACO,SAASE,mBAAmBA,CAACC,KAAe,EAAoB;EACrE,MAAMC,GAAqB,GAAG,EAAE;EAChC,IAAI,CAACD,KAAK,EAAE,OAAOC,GAAG;EAEtB,IAAI;IACF,IAAIC,OAAiB,GAAGF,KAAK;IAC7B,KAAK,IAAIG,KAAK,GAAG,CAAC,EAAED,OAAO,IAAIC,KAAK,GAAGC,iCAAiB,EAAED,KAAK,IAAI,CAAC,EAAE;MACpE,MAAME,QAAQ,GAAGC,oBAAoB,CAAC,IAAAC,4BAAY,EAACL,OAAO,CAAC,CAAC;MAC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pC;IACA,MAAMI,UAAU,GAAG,IAAAH,wBAAQ,EAACD,KAAK,CAAC;IAClC,IAAII,UAAU,EAAE;MACdJ,KAAK,GAAGI,UAAU;IACpB,CAAC,MAAM;MACLJ,KAAK,GAAG,IAAAE,0BAAU,EAACF,KAAK,CAAC;IAC3B;IACAG,KAAK,IAAI,CAAC;EACZ;EACA,OAAO,IAAI;AACb;AAEA,SAAS9B,QAAQA,CAACgC,IAAwB,EAAEC,EAA+B,EAAW;EACpF,IAAI,OAAOA,EAAE,KAAK,UAAU,EAAE,OAAO,IAAI;EACzC,IAAI;IACF,OAAOA,EAAE,CAACC,IAAI,CAACF,IAAI,CAAC;EACtB,CAAC,CAAC,MAAM;IACN,OAAO,IAAI;EACb;AACF","ignoreList":[]}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createFiberMeasureInWindow = createFiberMeasureInWindow;
7
+ exports.measureHostFiber = measureHostFiber;
8
+ var _reactNative = require("react-native");
9
+ var _fiberInternals = require("./fiberInternals.js");
10
+ /**
11
+ * Feature-detected `measureInWindow` for a host fiber. Tries, in order:
12
+ *
13
+ * 1. `stateNode.measureInWindow` — Paper host, or materialized Fabric public instance
14
+ * 2. `nativeFabricUIManager.measureInWindow(stateNode.node, …)` — Fabric without public instance
15
+ * 3. `stateNode.canonical.publicInstance.measureInWindow`
16
+ * 4. `UIManager.measureInWindow(nativeTag, …)` — last resort
17
+ *
18
+ * Invokes `callback` with zeros when no measurable path is found (callers treat
19
+ * zero-size as missing).
20
+ */
21
+ function measureHostFiber(fiber, callback) {
22
+ const fail = () => {
23
+ callback(0, 0, 0, 0);
24
+ };
25
+ if (!fiber) {
26
+ fail();
27
+ return;
28
+ }
29
+ try {
30
+ const stateNode = (0, _fiberInternals.getStateNode)(fiber);
31
+ if (!stateNode || typeof stateNode !== 'object') {
32
+ fail();
33
+ return;
34
+ }
35
+
36
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
+ const node = stateNode;
38
+ if (typeof node.measureInWindow === 'function') {
39
+ node.measureInWindow(callback);
40
+ return;
41
+ }
42
+
43
+ // Fabric: measure via the shadow node without materializing a public instance.
44
+ const fabricNode = node.node;
45
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
46
+ const fabricUIManager = globalThis.nativeFabricUIManager;
47
+ if (fabricNode != null && fabricUIManager && typeof fabricUIManager.measureInWindow === 'function') {
48
+ fabricUIManager.measureInWindow(fabricNode, callback);
49
+ return;
50
+ }
51
+ const publicInstance = node.canonical?.publicInstance;
52
+ if (publicInstance && typeof publicInstance.measureInWindow === 'function') {
53
+ publicInstance.measureInWindow(callback);
54
+ return;
55
+ }
56
+ const nativeTag = node._nativeTag ?? node.__nativeTag ?? node.nativeTag ?? node.canonical?.nativeTag;
57
+ if (typeof nativeTag === 'number' && Number.isFinite(nativeTag)) {
58
+ _reactNative.UIManager.measureInWindow(nativeTag, callback);
59
+ return;
60
+ }
61
+ } catch {
62
+ // Fall through to fail.
63
+ }
64
+ fail();
65
+ }
66
+
67
+ /**
68
+ * Build an `AnchorHost`-compatible `measureInWindow` bound to a host fiber.
69
+ */
70
+ function createFiberMeasureInWindow(fiber) {
71
+ return callback => {
72
+ measureHostFiber(fiber, callback);
73
+ };
74
+ }
75
+ //# sourceMappingURL=measureHostFiber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_fiberInternals","measureHostFiber","fiber","callback","fail","stateNode","getStateNode","node","measureInWindow","fabricNode","fabricUIManager","globalThis","nativeFabricUIManager","publicInstance","canonical","nativeTag","_nativeTag","__nativeTag","Number","isFinite","UIManager","createFiberMeasureInWindow"],"sourceRoot":"../../../../src","sources":["anchors/fiber/measureHostFiber.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,eAAA,GAAAD,OAAA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO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,sBAAS,CAACZ,eAAe,CAACO,SAAS,EAAEZ,QAAQ,CAAC;MAC9C;IACF;EACF,CAAC,CAAC,MAAM;IACN;EAAA;EAGFC,IAAI,CAAC,CAAC;AACR;;AAEA;AACA;AACA;AACO,SAASiB,0BAA0BA,CACxCnB,KAAe,EAC8B;EAC7C,OAAQC,QAAQ,IAAK;IACnBF,gBAAgB,CAACC,KAAK,EAAEC,QAAQ,CAAC;EACnC,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.coveredScreenBranches = coveredScreenBranches;
7
+ exports.isFiberOnVisibleScreen = isFiberOnVisibleScreen;
8
+ exports.isScreenContainerFiber = isScreenContainerFiber;
9
+ var _fiberInternals = require("./fiberInternals.js");
10
+ /**
11
+ * Restricts anchor scanning to the screens a user can actually see.
12
+ *
13
+ * A navigator keeps earlier screens mounted, so without this a tooltip could
14
+ * anchor to a view on a covered screen — measured on device: with a screen
15
+ * pushed on top, an anchor on the screen underneath still resolved and measured
16
+ * to an on-screen rect. Reusing one `testID` across two stacked screens also
17
+ * degraded to `ambiguous` and failed closed, even though only one was visible.
18
+ *
19
+ * Rules, derived from what react-native-screens actually exposes:
20
+ *
21
+ * - Native stack (`RNSScreenStack`): every mounted screen reports
22
+ * `activityState === 2`, so it is useless as a discriminator. Sibling order
23
+ * is what matters — the **last** branch owning a screen is on top.
24
+ * - Container-style navigators (tabs, non-native stacks) do vary
25
+ * `activityState`, so the active branches win. When every branch is active
26
+ * (e.g. multi-pane), all stay scannable — we must not fall back to
27
+ * last-sibling there, or visible panes get pruned.
28
+ *
29
+ * Branches that own no screen at all (tab bars, headers, other global chrome)
30
+ * are always kept, so anchors outside the screen stack keep resolving.
31
+ *
32
+ * Everything is feature-detected: an app without react-native-screens, or a
33
+ * renamed native component, prunes nothing and behaves as before.
34
+ */
35
+
36
+ /** Host screen types (push screens and iOS modal presentations). */
37
+ const SCREEN_TYPES = new Set(['RNSScreen', 'RNSModalScreen']);
38
+
39
+ /** Host components that own a set of sibling screen branches. */
40
+ const SCREEN_CONTAINER_TYPES = new Set(['RNSScreenStack', 'RNSScreenContainer', 'RNSScreenNavigationContainer']);
41
+
42
+ /** Native stacks cannot use activityState; last sibling branch is on top. */
43
+ const STACK_CONTAINER_TYPES = new Set(['RNSScreenStack']);
44
+
45
+ /** `activityState === 2` is react-native-screens' "on screen" value. */
46
+ const ACTIVITY_STATE_ACTIVE = 2;
47
+
48
+ /** Bound for the per-branch search for the screen it owns. */
49
+ const MAX_BRANCH_NODES = 400;
50
+ function isScreenContainerFiber(fiber) {
51
+ const type = (0, _fiberInternals.getHostTypeName)(fiber);
52
+ return type !== undefined && SCREEN_CONTAINER_TYPES.has(type);
53
+ }
54
+ function isScreenFiber(fiber) {
55
+ const type = (0, _fiberInternals.getHostTypeName)(fiber);
56
+ return type !== undefined && SCREEN_TYPES.has(type);
57
+ }
58
+ function isStackContainer(fiber) {
59
+ const type = (0, _fiberInternals.getHostTypeName)(fiber);
60
+ return type !== undefined && STACK_CONTAINER_TYPES.has(type);
61
+ }
62
+
63
+ /** Nearest screen under `branch`, not crossing into a nested container. */
64
+ function ownedScreen(branch) {
65
+ const stack = [branch];
66
+ let visited = 0;
67
+ while (stack.length > 0 && visited < MAX_BRANCH_NODES) {
68
+ const fiber = stack.pop();
69
+ if (!fiber) continue;
70
+ visited += 1;
71
+ if (isScreenFiber(fiber)) return fiber;
72
+ // A nested container's screens belong to that container, not this branch.
73
+ // Still follow siblings so a screen next to a nested navigator is found.
74
+ if (fiber !== branch && isScreenContainerFiber(fiber)) {
75
+ const sibling = (0, _fiberInternals.getSibling)(fiber);
76
+ if (sibling) stack.push(sibling);
77
+ continue;
78
+ }
79
+ const child = (0, _fiberInternals.getChild)(fiber);
80
+ if (child) stack.push(child);
81
+ if (fiber !== branch) {
82
+ const sibling = (0, _fiberInternals.getSibling)(fiber);
83
+ if (sibling) stack.push(sibling);
84
+ }
85
+ }
86
+ return null;
87
+ }
88
+ function isActive(screen) {
89
+ return (0, _fiberInternals.getMemoizedProps)(screen)?.activityState === ACTIVITY_STATE_ACTIVE;
90
+ }
91
+
92
+ /**
93
+ * Branches of `container` that are covered by another screen and so must not be
94
+ * scanned. Empty when there is nothing to prune. Alternates are included so a
95
+ * fiber captured on a previous render still matches.
96
+ */
97
+ function coveredScreenBranches(container) {
98
+ const branches = [];
99
+ let child = (0, _fiberInternals.getChild)(container);
100
+ let guard = 0;
101
+ while (child && guard < 200) {
102
+ const screen = ownedScreen(child);
103
+ if (screen) branches.push({
104
+ branch: child,
105
+ screen
106
+ });
107
+ child = (0, _fiberInternals.getSibling)(child);
108
+ guard += 1;
109
+ }
110
+ const covered = new Set();
111
+ if (branches.length <= 1) return covered;
112
+ let visible;
113
+ if (isStackContainer(container)) {
114
+ // Native stack: activityState is always 2 for mounted screens; last branch
115
+ // owns the top of the stack (including an iOS RNSModalScreen presentation).
116
+ visible = [branches[branches.length - 1]];
117
+ } else {
118
+ const active = branches.filter(entry => isActive(entry.screen));
119
+ // Keep every active pane (tabs + multi-visible). If none report active
120
+ // (transition), fall back to last sibling rather than pruning everything.
121
+ visible = active.length > 0 ? active : [branches[branches.length - 1]];
122
+ }
123
+ for (const entry of branches) {
124
+ if (visible.includes(entry)) continue;
125
+ covered.add(entry.branch);
126
+ const alternate = entry.branch.alternate;
127
+ if (alternate) covered.add(alternate);
128
+ }
129
+ return covered;
130
+ }
131
+
132
+ /**
133
+ * Whether `fiber` lives on a screen the user can currently see.
134
+ *
135
+ * Needed in addition to scan-time pruning: a resolved anchor is cached, and the
136
+ * cache would otherwise keep serving a host after its screen was covered by a
137
+ * newly pushed one. Walks outward so nested navigators are handled.
138
+ */
139
+ function isFiberOnVisibleScreen(fiber) {
140
+ if (!fiber) return false;
141
+ try {
142
+ let previous = null;
143
+ let current = fiber;
144
+ for (let depth = 0; current && depth < _fiberInternals.MAX_ANCESTOR_WALK; depth += 1) {
145
+ if (previous) {
146
+ // A cached fiber's `return` chain can point at the previous render, whose
147
+ // container still lists the old branches — so consult both alternates.
148
+ for (const container of [current, (0, _fiberInternals.getAlternate)(current)]) {
149
+ if (!container || !isScreenContainerFiber(container)) continue;
150
+ const covered = coveredScreenBranches(container);
151
+ if (covered.size === 0) continue;
152
+ if (covered.has(previous)) return false;
153
+ const previousAlternate = (0, _fiberInternals.getAlternate)(previous);
154
+ if (previousAlternate && covered.has(previousAlternate)) return false;
155
+ }
156
+ }
157
+ previous = current;
158
+ current = (0, _fiberInternals.getReturn)(current);
159
+ }
160
+ } catch {
161
+ // Visibility is a refinement; never let it break resolution.
162
+ }
163
+ return true;
164
+ }
165
+ //# sourceMappingURL=visibleScreens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_fiberInternals","require","SCREEN_TYPES","Set","SCREEN_CONTAINER_TYPES","STACK_CONTAINER_TYPES","ACTIVITY_STATE_ACTIVE","MAX_BRANCH_NODES","isScreenContainerFiber","fiber","type","getHostTypeName","undefined","has","isScreenFiber","isStackContainer","ownedScreen","branch","stack","visited","length","pop","sibling","getSibling","push","child","getChild","isActive","screen","getMemoizedProps","activityState","coveredScreenBranches","container","branches","guard","covered","visible","active","filter","entry","includes","add","alternate","isFiberOnVisibleScreen","previous","current","depth","MAX_ANCESTOR_WALK","getAlternate","size","previousAlternate","getReturn"],"sourceRoot":"../../../../src","sources":["anchors/fiber/visibleScreens.ts"],"mappings":";;;;;;;;AAyBA,IAAAA,eAAA,GAAAC,OAAA;AAzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA,MAAMC,YAAY,GAAG,IAAIC,GAAG,CAAC,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;;AAE7D;AACA,MAAMC,sBAAsB,GAAG,IAAID,GAAG,CAAC,CACrC,gBAAgB,EAChB,oBAA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