@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,290 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PairingController = void 0;
7
+ var _core = require("@userflow-tech/core");
8
+ var _reactNative = require("react-native");
9
+ var _deepLink = require("./deepLink.js");
10
+ var _diagnostics = require("./diagnostics.js");
11
+ var _tokenStorage = require("./tokenStorage.js");
12
+ /**
13
+ * Readiness of the end-user session that a preview attaches to.
14
+ *
15
+ * Pairing listens independently of `Userflow.init()` so a QR link is never
16
+ * lost, but it can only connect once init has resolved. `Userflow.init` drives
17
+ * this via `notifyInitStarted` / `notifyInitialized` / `notifyInitFailed`;
18
+ * a controller nobody reports init progress for stays usable (`ready`).
19
+ */
20
+
21
+ /**
22
+ * Inbound deep links → pairing session → preview mode.
23
+ * Active in all builds (including release); security is the short-lived
24
+ * signed pairing JWT + Builder ability checks, not `__DEV__`.
25
+ */
26
+ class PairingController {
27
+ engine = null;
28
+ started = false;
29
+ urlSub = null;
30
+ appStateSub = null;
31
+ listeners = new Set();
32
+ initPhase = 'ready';
33
+ initFailureReason = null;
34
+ /** Pairing token captured before init resolved, replayed once it does. */
35
+ deferredPairingToken = null;
36
+ /** Diagnostics already emitted for the current init attempt. */
37
+ loggedOnce = new Set();
38
+ constructor(options) {
39
+ this.core = options.core;
40
+ this.pairingEndpoint = options.pairingEndpoint ?? _core.DEFAULT_PAIRING_ENDPOINT;
41
+ this.tokenStore = options.tokenStore ?? (0, _tokenStorage.createPairingTokenStore)();
42
+ this.LinkingModule = options.LinkingModule ?? _reactNative.Linking;
43
+ this.AppStateModule = options.AppStateModule ?? _reactNative.AppState;
44
+ this.clearLocalSession = options.clearLocalSession ?? undefined;
45
+ this.logger = options.logger ?? _diagnostics.defaultPairingLogger;
46
+ }
47
+ getEngine() {
48
+ return this.engine;
49
+ }
50
+
51
+ /** Whether deep-link / AppState listeners have been started. */
52
+ hasStarted() {
53
+ return this.started;
54
+ }
55
+ getState() {
56
+ const blocked = this.blockedState();
57
+ if (blocked) return blocked;
58
+ return this.engine?.getState() ?? {
59
+ status: 'idle',
60
+ pairingId: null,
61
+ deviceId: null,
62
+ previewActive: false,
63
+ lastError: null,
64
+ needsRescan: false,
65
+ awaitingStartCondition: false
66
+ };
67
+ }
68
+
69
+ /**
70
+ * State for a link we captured but cannot act on because init failed. Without
71
+ * this the host app shows no sign that a pairing link was ever received.
72
+ */
73
+ blockedState() {
74
+ if (this.initPhase !== 'failed' || this.deferredPairingToken === null) return null;
75
+ return {
76
+ status: 'error',
77
+ pairingId: null,
78
+ deviceId: null,
79
+ previewActive: false,
80
+ lastError: `Userflow.init() failed, so preview could not start: ${this.initFailureReason ?? 'unknown error'}`,
81
+ needsRescan: true,
82
+ awaitingStartCondition: false
83
+ };
84
+ }
85
+ onStateChange(listener) {
86
+ this.listeners.add(listener);
87
+ return () => {
88
+ this.listeners.delete(listener);
89
+ };
90
+ }
91
+
92
+ /**
93
+ * Start deep-link listeners. Safe to call multiple times, and never rejects —
94
+ * `Userflow.init` fires it without awaiting, so a rejection here would become
95
+ * an unhandled promise rejection.
96
+ */
97
+ async start() {
98
+ if (this.started) return;
99
+ this.started = true;
100
+ try {
101
+ await this.startListening();
102
+ } catch (error) {
103
+ this.warnOnce((0, _diagnostics.pairingListenerSetupFailedMessage)(describeError(error)));
104
+ }
105
+ }
106
+ async startListening() {
107
+ // Exit pairing on app restart: drop any leftover secure token. Guarded so a
108
+ // storage failure cannot cost us the listeners registered below — losing
109
+ // those is what makes an inbound QR link vanish without explanation.
110
+ try {
111
+ await this.tokenStore.clear();
112
+ } catch (error) {
113
+ this.warnOnce((0, _diagnostics.pairingTokenStoreClearFailedMessage)(describeError(error)));
114
+ }
115
+ this.ensureEngine();
116
+ this.urlSub = this.LinkingModule.addEventListener('url', ({
117
+ url
118
+ }) => {
119
+ // handleUrl still rejects for explicit callers (Userflow.handlePairingUrl);
120
+ // the auto-listener has nowhere to report, so log instead of leaving an
121
+ // unhandled rejection.
122
+ void this.handleUrl(url).catch(error => {
123
+ this.warnOnce((0, _diagnostics.pairingConnectFailedMessage)(describeError(error)));
124
+ });
125
+ });
126
+ this.appStateSub = this.AppStateModule.addEventListener('change', next => {
127
+ if (next === 'active') {
128
+ this.engine?.ensureAlive();
129
+ }
130
+ });
131
+ try {
132
+ const initial = await this.LinkingModule.getInitialURL();
133
+ if (initial) await this.handleUrl(initial);
134
+ } catch {
135
+ // Linking may throw on some platforms before the native module is ready.
136
+ }
137
+ }
138
+ stop() {
139
+ this.urlSub?.remove();
140
+ this.urlSub = null;
141
+ this.appStateSub?.remove();
142
+ this.appStateSub = null;
143
+ this.started = false;
144
+ void this.exitPreview();
145
+ }
146
+
147
+ /**
148
+ * Host apps that intercept deep links themselves can forward them here.
149
+ */
150
+ async handleUrl(url) {
151
+ const inspected = (0, _deepLink.inspectPairingDeepLink)(url);
152
+ if (!inspected.ok) {
153
+ // Links that are not recognisably ours belong to the host app. Stay silent
154
+ // so ordinary deep links — and preview links, which accept any
155
+ // `userflow-*` scheme — are never reported as pairing misconfiguration.
156
+ if (!(0, _deepLink.isPairingAttempt)(inspected.reason)) return false;
157
+
158
+ // A deliberate pairing attempt we cannot use. The OS already launched the
159
+ // app, so a silent return is indistinguishable from a broken deep link.
160
+ // Still return true — the URL was recognised as pairing, so the host
161
+ // should stop routing it (see docs/deep-linking.md).
162
+ this.warnOnce((0, _diagnostics.pairingAttemptRejectionMessage)(inspected.reason, url));
163
+ return true;
164
+ }
165
+ if (this.initPhase !== 'ready') {
166
+ // Hold the token rather than discarding it. `notifyInitialized` replays it;
167
+ // `notifyInitFailed` turns it into visible state.
168
+ this.deferredPairingToken = inspected.link.pairingToken;
169
+ this.warnOnce(this.initPhase === 'failed' ? (0, _diagnostics.pairingLinkInitFailedMessage)(this.initFailureReason ?? 'unknown error') : (0, _diagnostics.pairingLinkDeferredMessage)());
170
+ if (this.initPhase === 'failed') this.emit(this.getState());
171
+ return true;
172
+ }
173
+ await this.enterPreview(inspected.link.pairingToken);
174
+ return true;
175
+ }
176
+
177
+ /**
178
+ * Called when `Userflow.init()` begins. Clears a previous failure so a retried
179
+ * init does not keep reporting the old error.
180
+ */
181
+ notifyInitStarted() {
182
+ // A retry is a fresh attempt: allow its diagnostics through again, and drop
183
+ // a "Preview unavailable" banner that no longer reflects reality.
184
+ const wasBlocked = this.blockedState() !== null;
185
+ this.initPhase = 'pending';
186
+ this.initFailureReason = null;
187
+ this.loggedOnce.clear();
188
+ if (wasBlocked) this.emit(this.getState());
189
+ }
190
+
191
+ /**
192
+ * Called when `Userflow.init()` resolves. Connects a link that arrived while
193
+ * init was still in flight.
194
+ */
195
+ async notifyInitialized() {
196
+ this.initPhase = 'ready';
197
+ this.initFailureReason = null;
198
+ const deferred = this.deferredPairingToken;
199
+ if (deferred === null) return;
200
+ this.deferredPairingToken = null;
201
+ try {
202
+ await this.enterPreview(deferred);
203
+ } catch (error) {
204
+ // Preview must not fail host init. `Userflow.init` awaits this, and
205
+ // PairingEngine.start rethrows on every connect failure, so letting this
206
+ // escape would let an expired QR token fail the host app's entire init.
207
+ this.warnOnce((0, _diagnostics.pairingConnectFailedMessage)(describeError(error)));
208
+ }
209
+ }
210
+
211
+ /**
212
+ * Called when `Userflow.init()` rejects. Pairing cannot connect without a
213
+ * session, so surface why instead of failing silently.
214
+ */
215
+ notifyInitFailed(error) {
216
+ this.initPhase = 'failed';
217
+ this.initFailureReason = describeError(error);
218
+ if (this.deferredPairingToken !== null) {
219
+ this.warnOnce((0, _diagnostics.pairingLinkInitFailedMessage)(this.initFailureReason));
220
+ this.emit(this.getState());
221
+ }
222
+ }
223
+
224
+ /**
225
+ * Log `message` at most once per init attempt. Inbound links can repeat (URL
226
+ * event plus host forwarding), and these messages are several lines long.
227
+ */
228
+ warnOnce(message) {
229
+ if (this.loggedOnce.has(message)) return;
230
+ this.loggedOnce.add(message);
231
+ this.logger(message);
232
+ }
233
+
234
+ /** Explicit entry with a raw pairing JWT (tests / advanced hosts). */
235
+ async enterPreview(pairingToken) {
236
+ const engine = this.ensureEngine();
237
+ await this.tokenStore.set(pairingToken);
238
+ await engine.start(pairingToken);
239
+ }
240
+ async exitPreview() {
241
+ // Drop any held link too, so dismissing a blocked banner actually clears it.
242
+ this.deferredPairingToken = null;
243
+ await this.tokenStore.clear();
244
+ this.engine?.stop();
245
+ this.clearLocalSession?.();
246
+ this.emit(this.getState());
247
+ }
248
+
249
+ /** Flush queued startFlowWithToken after identify. */
250
+ notifyIdentified() {
251
+ this.engine?.notifyIdentified();
252
+ }
253
+ ensureEngine() {
254
+ if (this.engine) return this.engine;
255
+ this.engine = new _core.PairingEngine({
256
+ sendClientMessage: message => this.core.send(message),
257
+ onServerMessage: handler => this.core.onServerMessage(handler),
258
+ isIdentified: () => this.core.getUserId() != null,
259
+ pairingOptions: {
260
+ pairingEndpoint: this.pairingEndpoint
261
+ },
262
+ deviceMeta: () => ({
263
+ os: _reactNative.Platform.OS
264
+ })
265
+ });
266
+ this.engine.onStateChange(state => {
267
+ this.emit(state);
268
+ if (state.status === 'token_expired' || state.needsRescan) {
269
+ void this.tokenStore.clear();
270
+ }
271
+ });
272
+ return this.engine;
273
+ }
274
+ emit(state) {
275
+ for (const listener of this.listeners) {
276
+ try {
277
+ listener(state);
278
+ } catch {
279
+ // ignore
280
+ }
281
+ }
282
+ }
283
+ }
284
+ exports.PairingController = PairingController;
285
+ function describeError(error) {
286
+ if (error instanceof Error) return error.message;
287
+ if (typeof error === 'string') return error;
288
+ return String(error);
289
+ }
290
+ //# sourceMappingURL=PairingController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_reactNative","_deepLink","_diagnostics","_tokenStorage","PairingController","engine","started","urlSub","appStateSub","listeners","Set","initPhase","initFailureReason","deferredPairingToken","loggedOnce","constructor","options","core","pairingEndpoint","DEFAULT_PAIRING_ENDPOINT","tokenStore","createPairingTokenStore","LinkingModule","Linking","AppStateModule","AppState","clearLocalSession","undefined","logger","defaultPairingLogger","getEngine","hasStarted","getState","blocked","blockedState","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","onStateChange","listener","add","delete","start","startListening","error","warnOnce","pairingListenerSetupFailedMessage","describeError","clear","pairingTokenStoreClearFailedMessage","ensureEngine","addEventListener","url","handleUrl","catch","pairingConnectFailedMessage","next","ensureAlive","initial","getInitialURL","stop","remove","exitPreview","inspected","inspectPairingDeepLink","ok","isPairingAttempt","reason","pairingAttemptRejectionMessage","link","pairingToken","pairingLinkInitFailedMessage","pairingLinkDeferredMessage","emit","enterPreview","notifyInitStarted","wasBlocked","notifyInitialized","deferred","notifyInitFailed","message","has","set","notifyIdentified","PairingEngine","sendClientMessage","send","onServerMessage","handler","isIdentified","getUserId","pairingOptions","deviceMeta","os","Platform","OS","state","exports","Error","String"],"sourceRoot":"../../../src","sources":["pairing/PairingController.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAUA,IAAAI,aAAA,GAAAJ,OAAA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACO,MAAMK,iBAAiB,CAAC;EACrBC,MAAM,GAAyB,IAAI;EACnCC,OAAO,GAAG,KAAK;EACfC,MAAM,GAA8B,IAAI;EACxCC,WAAW,GAA8B,IAAI;EACpCC,SAAS,GAAG,IAAIC,GAAG,CAA4B,CAAC;EAQzDC,SAAS,GAAc,OAAO;EAC9BC,iBAAiB,GAAkB,IAAI;EAC/C;EACQC,oBAAoB,GAAkB,IAAI;EAClD;EACiBC,UAAU,GAAG,IAAIJ,GAAG,CAAS,CAAC;EAE/CK,WAAWA,CAACC,OAAiC,EAAE;IAC7C,IAAI,CAACC,IAAI,GAAGD,OAAO,CAACC,IAAI;IACxB,IAAI,CAACC,eAAe,GAAGF,OAAO,CAACE,eAAe,IAAIC,8BAAwB;IAC1E,IAAI,CAACC,UAAU,GAAGJ,OAAO,CAACI,UAAU,IAAI,IAAAC,qCAAuB,EAAC,CAAC;IACjE,IAAI,CAACC,aAAa,GA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"__esModule", {
4
+ value: true
5
+ });
6
+ exports.PreviewModeBanner = PreviewModeBanner;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
11
+ /**
12
+ * Overlay chrome for Builder pairing preview mode.
13
+ */
14
+ function PreviewModeBanner({
15
+ state,
16
+ onExit
17
+ }) {
18
+ if (!state.previewActive && state.status === 'idle') return null;
19
+ if (!state.previewActive && state.status !== 'token_expired' && state.status !== 'device_already_paired' && state.status !== 'error') {
20
+ return null;
21
+ }
22
+ const needsRescan = state.needsRescan;
23
+ // No pairing id means the session never started (e.g. init failed), so
24
+ // "Pairing ended" would misdescribe it.
25
+ const neverPaired = state.status === 'error' && !state.previewActive && state.pairingId === null;
26
+ const title = neverPaired ? 'Preview unavailable' : needsRescan ? 'Pairing ended' : 'Preview mode';
27
+ const detail = state.lastError ?? (state.status === 'reconnecting' ? 'Reconnecting…' : state.status === 'connecting' ? 'Connecting to Builder…' :
28
+ // Mirrors the Builder's own wording. Without this the banner reads
29
+ // "Paired" while the flow is absent, which looks like a broken preview
30
+ // rather than a condition that has not matched yet.
31
+ state.awaitingStartCondition ? 'Waiting for auto-start condition to trigger…' : 'Paired with Userflow Builder');
32
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
33
+ style: styles.wrap,
34
+ pointerEvents: "box-none",
35
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
36
+ style: [styles.banner, needsRescan ? styles.bannerWarn : styles.bannerActive],
37
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
38
+ style: styles.textCol,
39
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
40
+ style: styles.title,
41
+ children: title
42
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
43
+ style: styles.detail,
44
+ numberOfLines: 2,
45
+ children: needsRescan ? `${detail} Re-scan the QR code to continue.` : detail
46
+ })]
47
+ }), !needsRescan ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
48
+ accessibilityRole: "button",
49
+ accessibilityLabel: "Exit preview",
50
+ onPress: onExit,
51
+ style: styles.button,
52
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
53
+ style: styles.buttonLabel,
54
+ children: "Exit preview"
55
+ })
56
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
57
+ accessibilityRole: "button",
58
+ accessibilityLabel: "Dismiss pairing message",
59
+ onPress: onExit,
60
+ style: styles.button,
61
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
62
+ style: styles.buttonLabel,
63
+ children: "Dismiss"
64
+ })
65
+ })]
66
+ })
67
+ });
68
+ }
69
+ const styles = _reactNative.StyleSheet.create({
70
+ wrap: {
71
+ position: 'absolute',
72
+ top: 0,
73
+ left: 0,
74
+ right: 0,
75
+ zIndex: 1000
76
+ },
77
+ banner: {
78
+ marginTop: 48,
79
+ marginHorizontal: 12,
80
+ borderRadius: 10,
81
+ paddingHorizontal: 12,
82
+ paddingVertical: 10,
83
+ flexDirection: 'row',
84
+ alignItems: 'center',
85
+ gap: 10
86
+ },
87
+ bannerActive: {
88
+ backgroundColor: 'rgba(17, 24, 39, 0.92)'
89
+ },
90
+ bannerWarn: {
91
+ backgroundColor: 'rgba(127, 29, 29, 0.94)'
92
+ },
93
+ textCol: {
94
+ flex: 1
95
+ },
96
+ title: {
97
+ color: '#ffffff',
98
+ fontSize: 13,
99
+ fontWeight: '700'
100
+ },
101
+ detail: {
102
+ color: 'rgba(255,255,255,0.85)',
103
+ fontSize: 12,
104
+ marginTop: 2
105
+ },
106
+ button: {
107
+ paddingHorizontal: 10,
108
+ paddingVertical: 8,
109
+ borderRadius: 8,
110
+ backgroundColor: 'rgba(255,255,255,0.14)'
111
+ },
112
+ buttonLabel: {
113
+ color: '#ffffff',
114
+ fontSize: 12,
115
+ fontWeight: '600'
116
+ }
117
+ });
118
+ //# sourceMappingURL=PreviewModeBanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PreviewModeBanner","state","onExit","previewActive","status","needsRescan","neverPaired","pairingId","title","detail","lastError","awaitingStartCondition","jsx","View","style","styles","wrap","pointerEvents","children","jsxs","banner","bannerWarn","bannerActive","textCol","Text","numberOfLines","Pressable","accessibilityRole","accessibilityLabel","onPress","button","buttonLabel","StyleSheet","create","position","top","left","right","zIndex","marginTop","marginHorizontal","borderRadius","paddingHorizontal","paddingVertical","flexDirection","alignItems","gap","backgroundColor","flex","color","fontSize","fontWeight"],"sourceRoot":"../../../src","sources":["pairing/PreviewModeBanner.tsx"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAiE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,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AE;EACnB,CAAC;EACDxB,OAAO,EAAE;IACPyB,IAAI,EAAE;EACR,CAAC;EACDxC,KAAK,EAAE;IACLyC,KAAK,EAAE,SAAS;IAChBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACD1C,MAAM,EAAE;IACNwC,KAAK,EAAE,wBAAwB;IAC/BC,QAAQ,EAAE,EAAE;IACZX,SAAS,EAAE;EACb,CAAC;EACDT,MAAM,EAAE;IACNY,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBF,YAAY,EAAE,CAAC;IACfM,eAAe,EAAE;EACnB,CAAC;EACDhB,WAAW,EAAE;IACXkB,KAAK,EAAE,SAAS;IAChBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.inspectPairingDeepLink = inspectPairingDeepLink;
7
+ exports.isPairingAttempt = isPairingAttempt;
8
+ exports.isUserflowPairingUrl = isUserflowPairingUrl;
9
+ exports.parsePairingDeepLink = parsePairingDeepLink;
10
+ /**
11
+ * Parse Builder pairing deep links:
12
+ * {scheme_id}://?pairing_token=<jwt>
13
+ *
14
+ * `scheme_id` is typically `userflow-<digits>`.
15
+ */
16
+
17
+ /** Scheme prefix shared by preview and pairing links. */
18
+ const USERFLOW_SCHEME_PREFIX = 'userflow-';
19
+ const USERFLOW_SCHEME = /^userflow-\d+$/i;
20
+
21
+ /**
22
+ * Why a URL was not treated as a pairing link.
23
+ *
24
+ * `bad-scheme-shape` and `missing-token` are only reported for URLs that
25
+ * actually target pairing (root with a `pairing_token` query), so callers can
26
+ * tell a misconfigured pairing attempt apart from an unrelated link. See
27
+ * {@link isPairingAttempt}.
28
+ */
29
+
30
+ /**
31
+ * Rejections where the URL was a recognisable pairing attempt that could not be
32
+ * used. These are worth reporting; everything else belongs to the host app.
33
+ */
34
+
35
+ /**
36
+ * True when a rejected URL was nonetheless a recognisable pairing attempt rather
37
+ * than someone else's deep link.
38
+ *
39
+ * Callers use this to decide whether a rejection is worth reporting. Preview
40
+ * links accept any `userflow-*` scheme, so scheme shape alone cannot be the
41
+ * signal — reporting on it would flag valid preview links as broken pairing.
42
+ */
43
+ function isPairingAttempt(reason) {
44
+ return reason === 'foreign-scheme' || reason === 'bad-scheme-shape' || reason === 'missing-token';
45
+ }
46
+
47
+ /**
48
+ * Parse `url` as a pairing deep link, reporting why it was rejected.
49
+ * Prefer this over {@link parsePairingDeepLink} when the reason matters.
50
+ */
51
+ function inspectPairingDeepLink(url) {
52
+ if (typeof url !== 'string' || url.length === 0) {
53
+ return {
54
+ ok: false,
55
+ reason: 'not-userflow'
56
+ };
57
+ }
58
+ const schemeMatch = /^([a-z][a-z0-9+.-]*):/i.exec(url);
59
+ if (!schemeMatch?.[1]) return {
60
+ ok: false,
61
+ reason: 'not-userflow'
62
+ };
63
+ const scheme = schemeMatch[1];
64
+ const isUserflowScheme = scheme.toLowerCase().startsWith(USERFLOW_SCHEME_PREFIX);
65
+
66
+ // Parse before judging the scheme: a pairing link opened with the host app's
67
+ // own scheme still needs to be recognisable so it can be reported.
68
+ //
69
+ // Custom schemes are not valid WHATWG URLs on their own. Strip the scheme
70
+ // and re-parse as https. Root forms (`://?…`, `://`) use a placeholder base
71
+ // so the query survives — a bare `https://?…` is an invalid URL.
72
+ const remainder = url.slice(scheme.length + 1).replace(/^\/\//, '');
73
+ let parsed;
74
+ try {
75
+ if (remainder === '' || remainder.startsWith('?') || remainder.startsWith('/')) {
76
+ parsed = new URL(remainder === '' ? '/' : remainder, 'https://userflow.local');
77
+ } else {
78
+ parsed = new URL(`https://${remainder}`);
79
+ }
80
+ } catch {
81
+ return {
82
+ ok: false,
83
+ reason: isUserflowScheme ? 'unparseable' : 'not-userflow'
84
+ };
85
+ }
86
+ const pairingToken = parsed.searchParams.get('pairing_token');
87
+ const hasPairingTokenParam = parsed.searchParams.has('pairing_token');
88
+ const isRoot = (parsed.hostname === '' || parsed.hostname === 'userflow.local') && (parsed.pathname === '' || parsed.pathname === '/');
89
+ // Only the root query form is pairing. A host `/pair` route (or any other
90
+ // path) is left alone even when it carries `pairing_token`.
91
+ const isPair = isRoot && hasPairingTokenParam;
92
+ if (!isUserflowScheme) {
93
+ // Claim a scheme we do not own only when the URL is unmistakably ours: root
94
+ // form *and* our query parameter. That combination means someone swapped
95
+ // the environment's scheme_id for the app's own scheme.
96
+ return isPair ? {
97
+ ok: false,
98
+ reason: 'foreign-scheme'
99
+ } : {
100
+ ok: false,
101
+ reason: 'not-userflow'
102
+ };
103
+ }
104
+ if (!isPair) return {
105
+ ok: false,
106
+ reason: 'not-pair-path'
107
+ };
108
+
109
+ // Only once the URL is known to target pairing does the scheme shape matter.
110
+ // Checking it earlier would misreport preview links on non-numeric schemes.
111
+ if (!USERFLOW_SCHEME.test(scheme)) return {
112
+ ok: false,
113
+ reason: 'bad-scheme-shape'
114
+ };
115
+ if (!pairingToken) return {
116
+ ok: false,
117
+ reason: 'missing-token'
118
+ };
119
+ return {
120
+ ok: true,
121
+ link: {
122
+ scheme,
123
+ pairingToken
124
+ }
125
+ };
126
+ }
127
+
128
+ /**
129
+ * Returns pairing token details when `url` is a Userflow pairing deep link.
130
+ * Accepts only `userflow-*` schemes.
131
+ */
132
+ function parsePairingDeepLink(url) {
133
+ const result = inspectPairingDeepLink(url);
134
+ return result.ok ? result.link : null;
135
+ }
136
+
137
+ /** True when the URL looks like a Userflow pairing deep link. */
138
+ function isUserflowPairingUrl(url) {
139
+ return parsePairingDeepLink(url) != null;
140
+ }
141
+ //# sourceMappingURL=deepLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["USERFLOW_SCHEME_PREFIX","USERFLOW_SCHEME","isPairingAttempt","reason","inspectPairingDeepLink","url","length","ok","schemeMatch","exec","scheme","isUserflowScheme","toLowerCase","startsWith","remainder","slice","replace","parsed","URL","pairingToken","searchParams","get","hasPairingTokenParam","has","isRoot","hostname","pathname","isPair","test","link","parsePairingDeepLink","result","isUserflowPairingUrl"],"sourceRoot":"../../../src","sources":["pairing/deepLink.ts"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA,MAAMA,sBAAsB,GAAG,WAAW;AAC1C,MAAMC,eAAe,GAAG,iBAAiB;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAC9BC,MAAgC,EACG;EACnC,OAAOA,MAAM,KAAK,gBAAgB,IAAIA,MAAM,KAAK,kBAAkB,IAAIA,MAAM,KAAK,eAAe;AACnG;;AAEA;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CAACC,GAA8B,EAAyB;EAC5F,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAIA,GAAG,CAACC,MAAM,KAAK,CAAC,EAAE;IAC/C,OAAO;MAAEC,EAAE,EAAE,KAAK;MAAEJ,MAAM,EAAE;IAAe,CAAC;EAC9C;EAEA,MAAMK,WAAW,GAAG,wBAAwB,CAACC,IAAI,CAACJ,GAAG,CAAC;EACtD,IAAI,CAACG,WAAW,GAAG,CAAC,CAAC,EAAE,OAAO;IAAED,EAAE,EAAE,KAAK;IAAEJ,MAAM,EAAE;EAAe,CAAC;EACnE,MAAMO,MAAM,GAAGF,WAAW,CAAC,CAAC,CAAC;EAC7B,MAAMG,gBAAgB,GAAGD,MAAM,CAACE,WAAW,CAAC,CAAC,CAACC,UAAU,CAACb,sBAAsB,CAAC;;EAEhF;EACA;EACA;EACA;EACA;EACA;EACA,MAAMc,SAAS,GAAGT,GAAG,CAACU,KAAK,CAACL,MAAM,CAACJ,MAAM,GAAG,CAAC,CAAC,CAACU,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;EACnE,IAAIC,MAAW;EACf,IAAI;IACF,IAAIH,SAAS,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