@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.
- package/LICENSE +76 -0
- package/README.md +337 -0
- package/docs/anchoring.md +264 -0
- package/docs/deep-linking.md +271 -0
- package/docs/identity-verification.md +95 -0
- package/docs/theme-mapping.md +101 -0
- package/docs/troubleshooting.md +107 -0
- package/lib/commonjs/anchors/AnchorRegistry.js +72 -0
- package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -0
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +315 -0
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -0
- package/lib/commonjs/anchors/ScrollContainerRegistry.js +93 -0
- package/lib/commonjs/anchors/ScrollContainerRegistry.js.map +1 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js +83 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -0
- package/lib/commonjs/anchors/animationFrame.js +90 -0
- package/lib/commonjs/anchors/animationFrame.js.map +1 -0
- package/lib/commonjs/anchors/autoAnchor.js +253 -0
- package/lib/commonjs/anchors/autoAnchor.js.map +1 -0
- package/lib/commonjs/anchors/elementConditionEvaluator.js +82 -0
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -0
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js +90 -0
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js +180 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +214 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findScrollAncestors.js +176 -0
- package/lib/commonjs/anchors/fiber/findScrollAncestors.js.map +1 -0
- package/lib/commonjs/anchors/fiber/measureHostFiber.js +75 -0
- package/lib/commonjs/anchors/fiber/measureHostFiber.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +165 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -0
- package/lib/commonjs/anchors/hintsCodec.js +120 -0
- package/lib/commonjs/anchors/hintsCodec.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +112 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/resolveManualAnchorId.js +17 -0
- package/lib/commonjs/anchors/resolveManualAnchorId.js.map +1 -0
- package/lib/commonjs/anchors/scrollAnchorIntoView.js +227 -0
- package/lib/commonjs/anchors/scrollAnchorIntoView.js.map +1 -0
- package/lib/commonjs/anchors/scrollConfig.js +48 -0
- package/lib/commonjs/anchors/scrollConfig.js.map +1 -0
- package/lib/commonjs/anchors/targetPressMonitor.js +113 -0
- package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js +91 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -0
- package/lib/commonjs/anchors/useUserflowScrollContainer.js +76 -0
- package/lib/commonjs/anchors/useUserflowScrollContainer.js.map +1 -0
- package/lib/commonjs/anonymousId.js +42 -0
- package/lib/commonjs/anonymousId.js.map +1 -0
- package/lib/commonjs/content/RichContentRenderer.js +675 -0
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -0
- package/lib/commonjs/content/StepButton.js +57 -0
- package/lib/commonjs/content/StepButton.js.map +1 -0
- package/lib/commonjs/content/buttonAppearance.js +18 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -0
- package/lib/commonjs/content/deserialize.js +129 -0
- package/lib/commonjs/content/deserialize.js.map +1 -0
- package/lib/commonjs/content/imageLayout.js +24 -0
- package/lib/commonjs/content/imageLayout.js.map +1 -0
- package/lib/commonjs/content/migrateFlowBlocks.js +39 -0
- package/lib/commonjs/content/migrateFlowBlocks.js.map +1 -0
- package/lib/commonjs/content/openSafeUrl.js +37 -0
- package/lib/commonjs/content/openSafeUrl.js.map +1 -0
- package/lib/commonjs/content/resolveStepButtonChrome.js +95 -0
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -0
- package/lib/commonjs/content/themeColor.js +106 -0
- package/lib/commonjs/content/themeColor.js.map +1 -0
- package/lib/commonjs/content/types.js +2 -0
- package/lib/commonjs/content/types.js.map +1 -0
- package/lib/commonjs/deepLinking.js +162 -0
- package/lib/commonjs/deepLinking.js.map +1 -0
- package/lib/commonjs/expo-router/UserflowExpoRouterScreenTracker.js +13 -0
- package/lib/commonjs/expo-router/UserflowExpoRouterScreenTracker.js.map +1 -0
- package/lib/commonjs/expo-router/getExpoRouterScreenTracker.js +44 -0
- package/lib/commonjs/expo-router/getExpoRouterScreenTracker.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +20 -0
- package/lib/commonjs/expo-router/index.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +45 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -0
- package/lib/commonjs/index.js +356 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lifecycle.js +200 -0
- package/lib/commonjs/lifecycle.js.map +1 -0
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +69 -0
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -0
- package/lib/commonjs/navigation/chainCallbacks.js +16 -0
- package/lib/commonjs/navigation/chainCallbacks.js.map +1 -0
- package/lib/commonjs/navigation/getActiveRouteName.js +18 -0
- package/lib/commonjs/navigation/getActiveRouteName.js.map +1 -0
- package/lib/commonjs/navigation/index.js +50 -0
- package/lib/commonjs/navigation/index.js.map +1 -0
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +110 -0
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -0
- package/lib/commonjs/network.js +90 -0
- package/lib/commonjs/network.js.map +1 -0
- package/lib/commonjs/pairing/PairingController.js +290 -0
- package/lib/commonjs/pairing/PairingController.js.map +1 -0
- package/lib/commonjs/pairing/PreviewModeBanner.js +118 -0
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -0
- package/lib/commonjs/pairing/deepLink.js +141 -0
- package/lib/commonjs/pairing/deepLink.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +115 -0
- package/lib/commonjs/pairing/diagnostics.js.map +1 -0
- package/lib/commonjs/pairing/index.js +58 -0
- package/lib/commonjs/pairing/index.js.map +1 -0
- package/lib/commonjs/pairing/pairingRuntime.js +85 -0
- package/lib/commonjs/pairing/pairingRuntime.js.map +1 -0
- package/lib/commonjs/pairing/tokenStorage.js +70 -0
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -0
- package/lib/commonjs/pairing/usePairingState.js +40 -0
- package/lib/commonjs/pairing/usePairingState.js.map +1 -0
- package/lib/commonjs/runtime/FlowRenderer.js +57 -0
- package/lib/commonjs/runtime/FlowRenderer.js.map +1 -0
- package/lib/commonjs/runtime/FlowSurfaceFade.js +53 -0
- package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +96 -0
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +91 -0
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -0
- package/lib/commonjs/runtime/clientConditions.js +50 -0
- package/lib/commonjs/runtime/clientConditions.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +63 -0
- package/lib/commonjs/runtime/flowEngine.js.map +1 -0
- package/lib/commonjs/runtime/flowSessionViewState.js +48 -0
- package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -0
- package/lib/commonjs/runtime/useFlowSessionState.js +25 -0
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -0
- package/lib/commonjs/runtime/userflowCore.js +13 -0
- package/lib/commonjs/runtime/userflowCore.js.map +1 -0
- package/lib/commonjs/screenTracker.js +87 -0
- package/lib/commonjs/screenTracker.js.map +1 -0
- package/lib/commonjs/surfaces/CloseButton.js +52 -0
- package/lib/commonjs/surfaces/CloseButton.js.map +1 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js +90 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -0
- package/lib/commonjs/surfaces/ModalSurface.js +170 -0
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -0
- package/lib/commonjs/surfaces/ProgressBar.js +116 -0
- package/lib/commonjs/surfaces/ProgressBar.js.map +1 -0
- package/lib/commonjs/surfaces/TooltipSurface.js +638 -0
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -0
- package/lib/commonjs/surfaces/absoluteFill.js +29 -0
- package/lib/commonjs/surfaces/absoluteFill.js.map +1 -0
- package/lib/commonjs/surfaces/assets/png.d.js +2 -0
- package/lib/commonjs/surfaces/assets/png.d.js.map +1 -0
- package/lib/commonjs/surfaces/assets/userflow-logomark.png +0 -0
- package/lib/commonjs/surfaces/parseBackdropOpacity.js +20 -0
- package/lib/commonjs/surfaces/parseBackdropOpacity.js.map +1 -0
- package/lib/commonjs/surfaces/progress.js +35 -0
- package/lib/commonjs/surfaces/progress.js.map +1 -0
- package/lib/commonjs/surfaces/resolveCloseButtonColor.js +24 -0
- package/lib/commonjs/surfaces/resolveCloseButtonColor.js.map +1 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js +67 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -0
- package/lib/commonjs/surfaces/resolveTooltipLayout.js +64 -0
- package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -0
- package/lib/commonjs/surfaces/safeArea.js +46 -0
- package/lib/commonjs/surfaces/safeArea.js.map +1 -0
- package/lib/commonjs/surfaces/themeChrome.js +90 -0
- package/lib/commonjs/surfaces/themeChrome.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +108 -0
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +103 -0
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/TooltipNotch.js +64 -0
- package/lib/commonjs/surfaces/tooltip/TooltipNotch.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +102 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +100 -0
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/parseBackdropPadding.js +15 -0
- package/lib/commonjs/surfaces/tooltip/parseBackdropPadding.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/rect.js +51 -0
- package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -0
- package/lib/commonjs/useUserflowScreen.js +24 -0
- package/lib/commonjs/useUserflowScreen.js.map +1 -0
- package/lib/commonjs/version.js +9 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/anchors/AnchorRegistry.js +67 -0
- package/lib/module/anchors/AnchorRegistry.js.map +1 -0
- package/lib/module/anchors/AutoAnchorRegistry.js +309 -0
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -0
- package/lib/module/anchors/ScrollContainerRegistry.js +86 -0
- package/lib/module/anchors/ScrollContainerRegistry.js.map +1 -0
- package/lib/module/anchors/anchorChangeTicker.js +79 -0
- package/lib/module/anchors/anchorChangeTicker.js.map +1 -0
- package/lib/module/anchors/animationFrame.js +83 -0
- package/lib/module/anchors/animationFrame.js.map +1 -0
- package/lib/module/anchors/autoAnchor.js +248 -0
- package/lib/module/anchors/autoAnchor.js.map +1 -0
- package/lib/module/anchors/elementConditionEvaluator.js +79 -0
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -0
- package/lib/module/anchors/fiber/FiberScanRoot.js +84 -0
- package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -0
- package/lib/module/anchors/fiber/fiberInternals.js +164 -0
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +210 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -0
- package/lib/module/anchors/fiber/findScrollAncestors.js +172 -0
- package/lib/module/anchors/fiber/findScrollAncestors.js.map +1 -0
- package/lib/module/anchors/fiber/measureHostFiber.js +70 -0
- package/lib/module/anchors/fiber/measureHostFiber.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +159 -0
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -0
- package/lib/module/anchors/hintsCodec.js +111 -0
- package/lib/module/anchors/hintsCodec.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +105 -0
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -0
- package/lib/module/anchors/resolveManualAnchorId.js +13 -0
- package/lib/module/anchors/resolveManualAnchorId.js.map +1 -0
- package/lib/module/anchors/scrollAnchorIntoView.js +222 -0
- package/lib/module/anchors/scrollAnchorIntoView.js.map +1 -0
- package/lib/module/anchors/scrollConfig.js +40 -0
- package/lib/module/anchors/scrollConfig.js.map +1 -0
- package/lib/module/anchors/targetPressMonitor.js +105 -0
- package/lib/module/anchors/targetPressMonitor.js.map +1 -0
- package/lib/module/anchors/useUserflowAnchor.js +87 -0
- package/lib/module/anchors/useUserflowAnchor.js.map +1 -0
- package/lib/module/anchors/useUserflowScrollContainer.js +71 -0
- package/lib/module/anchors/useUserflowScrollContainer.js.map +1 -0
- package/lib/module/anonymousId.js +36 -0
- package/lib/module/anonymousId.js.map +1 -0
- package/lib/module/content/RichContentRenderer.js +670 -0
- package/lib/module/content/RichContentRenderer.js.map +1 -0
- package/lib/module/content/StepButton.js +52 -0
- package/lib/module/content/StepButton.js.map +1 -0
- package/lib/module/content/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -0
- package/lib/module/content/deserialize.js +116 -0
- package/lib/module/content/deserialize.js.map +1 -0
- package/lib/module/content/imageLayout.js +20 -0
- package/lib/module/content/imageLayout.js.map +1 -0
- package/lib/module/content/migrateFlowBlocks.js +35 -0
- package/lib/module/content/migrateFlowBlocks.js.map +1 -0
- package/lib/module/content/openSafeUrl.js +32 -0
- package/lib/module/content/openSafeUrl.js.map +1 -0
- package/lib/module/content/resolveStepButtonChrome.js +90 -0
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -0
- package/lib/module/content/themeColor.js +99 -0
- package/lib/module/content/themeColor.js.map +1 -0
- package/lib/module/content/types.js +2 -0
- package/lib/module/content/types.js.map +1 -0
- package/lib/module/deepLinking.js +152 -0
- package/lib/module/deepLinking.js.map +1 -0
- package/lib/module/expo-router/UserflowExpoRouterScreenTracker.js +10 -0
- package/lib/module/expo-router/UserflowExpoRouterScreenTracker.js.map +1 -0
- package/lib/module/expo-router/getExpoRouterScreenTracker.js +39 -0
- package/lib/module/expo-router/getExpoRouterScreenTracker.js.map +1 -0
- package/lib/module/expo-router/index.js +5 -0
- package/lib/module/expo-router/index.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +42 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -0
- package/lib/module/index.js +259 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/lifecycle.js +195 -0
- package/lib/module/lifecycle.js.map +1 -0
- package/lib/module/navigation/WithUserflowReactNavigation.js +65 -0
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -0
- package/lib/module/navigation/chainCallbacks.js +12 -0
- package/lib/module/navigation/chainCallbacks.js.map +1 -0
- package/lib/module/navigation/getActiveRouteName.js +14 -0
- package/lib/module/navigation/getActiveRouteName.js.map +1 -0
- package/lib/module/navigation/index.js +5 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/openFlowNavigateUrl.js +100 -0
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -0
- package/lib/module/network.js +85 -0
- package/lib/module/network.js.map +1 -0
- package/lib/module/pairing/PairingController.js +286 -0
- package/lib/module/pairing/PairingController.js.map +1 -0
- package/lib/module/pairing/PreviewModeBanner.js +113 -0
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -0
- package/lib/module/pairing/deepLink.js +134 -0
- package/lib/module/pairing/deepLink.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +101 -0
- package/lib/module/pairing/diagnostics.js.map +1 -0
- package/lib/module/pairing/index.js +7 -0
- package/lib/module/pairing/index.js.map +1 -0
- package/lib/module/pairing/pairingRuntime.js +77 -0
- package/lib/module/pairing/pairingRuntime.js.map +1 -0
- package/lib/module/pairing/tokenStorage.js +65 -0
- package/lib/module/pairing/tokenStorage.js.map +1 -0
- package/lib/module/pairing/usePairingState.js +35 -0
- package/lib/module/pairing/usePairingState.js.map +1 -0
- package/lib/module/runtime/FlowRenderer.js +52 -0
- package/lib/module/runtime/FlowRenderer.js.map +1 -0
- package/lib/module/runtime/FlowSurfaceFade.js +48 -0
- package/lib/module/runtime/FlowSurfaceFade.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +91 -0
- package/lib/module/runtime/TargetPressBridge.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +85 -0
- package/lib/module/runtime/UserflowProvider.js.map +1 -0
- package/lib/module/runtime/clientConditions.js +43 -0
- package/lib/module/runtime/clientConditions.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +54 -0
- package/lib/module/runtime/flowEngine.js.map +1 -0
- package/lib/module/runtime/flowSessionViewState.js +42 -0
- package/lib/module/runtime/flowSessionViewState.js.map +1 -0
- package/lib/module/runtime/useFlowSessionState.js +21 -0
- package/lib/module/runtime/useFlowSessionState.js.map +1 -0
- package/lib/module/runtime/userflowCore.js +10 -0
- package/lib/module/runtime/userflowCore.js.map +1 -0
- package/lib/module/screenTracker.js +79 -0
- package/lib/module/screenTracker.js.map +1 -0
- package/lib/module/surfaces/CloseButton.js +47 -0
- package/lib/module/surfaces/CloseButton.js.map +1 -0
- package/lib/module/surfaces/MadeWithUserflow.js +83 -0
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -0
- package/lib/module/surfaces/ModalSurface.js +165 -0
- package/lib/module/surfaces/ModalSurface.js.map +1 -0
- package/lib/module/surfaces/ProgressBar.js +111 -0
- package/lib/module/surfaces/ProgressBar.js.map +1 -0
- package/lib/module/surfaces/TooltipSurface.js +633 -0
- package/lib/module/surfaces/TooltipSurface.js.map +1 -0
- package/lib/module/surfaces/absoluteFill.js +25 -0
- package/lib/module/surfaces/absoluteFill.js.map +1 -0
- package/lib/module/surfaces/assets/png.d.js +2 -0
- package/lib/module/surfaces/assets/png.d.js.map +1 -0
- package/lib/module/surfaces/assets/userflow-logomark.png +0 -0
- package/lib/module/surfaces/parseBackdropOpacity.js +16 -0
- package/lib/module/surfaces/parseBackdropOpacity.js.map +1 -0
- package/lib/module/surfaces/progress.js +31 -0
- package/lib/module/surfaces/progress.js.map +1 -0
- package/lib/module/surfaces/resolveCloseButtonColor.js +20 -0
- package/lib/module/surfaces/resolveCloseButtonColor.js.map +1 -0
- package/lib/module/surfaces/resolveModalLayout.js +59 -0
- package/lib/module/surfaces/resolveModalLayout.js.map +1 -0
- package/lib/module/surfaces/resolveTooltipLayout.js +57 -0
- package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -0
- package/lib/module/surfaces/safeArea.js +41 -0
- package/lib/module/surfaces/safeArea.js.map +1 -0
- package/lib/module/surfaces/themeChrome.js +86 -0
- package/lib/module/surfaces/themeChrome.js.map +1 -0
- package/lib/module/surfaces/tooltip/TooltipBubble.js +103 -0
- package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -0
- package/lib/module/surfaces/tooltip/TooltipCutout.js +98 -0
- package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -0
- package/lib/module/surfaces/tooltip/TooltipNotch.js +55 -0
- package/lib/module/surfaces/tooltip/TooltipNotch.js.map +1 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js +97 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -0
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +95 -0
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -0
- package/lib/module/surfaces/tooltip/parseBackdropPadding.js +11 -0
- package/lib/module/surfaces/tooltip/parseBackdropPadding.js.map +1 -0
- package/lib/module/surfaces/tooltip/rect.js +44 -0
- package/lib/module/surfaces/tooltip/rect.js.map +1 -0
- package/lib/module/useUserflowScreen.js +21 -0
- package/lib/module/useUserflowScreen.js.map +1 -0
- package/lib/module/version.js +5 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +113 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts +46 -0
- package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts +31 -0
- package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +41 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +48 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +33 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findScrollAncestors.d.ts +47 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findScrollAncestors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/measureHostFiber.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/measureHostFiber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +42 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts +40 -0
- package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveManualAnchorId.d.ts +6 -0
- package/lib/typescript/commonjs/src/anchors/resolveManualAnchorId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/scrollAnchorIntoView.d.ts +59 -0
- package/lib/typescript/commonjs/src/anchors/scrollAnchorIntoView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/scrollConfig.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/scrollConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +64 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts +34 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts +5 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +21 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/StepButton.d.ts +13 -0
- package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/deserialize.d.ts +27 -0
- package/lib/typescript/commonjs/src/content/deserialize.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/imageLayout.d.ts +13 -0
- package/lib/typescript/commonjs/src/content/imageLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/migrateFlowBlocks.d.ts +12 -0
- package/lib/typescript/commonjs/src/content/migrateFlowBlocks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts +12 -0
- package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts +24 -0
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +43 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts +144 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/deepLinking.d.ts +54 -0
- package/lib/typescript/commonjs/src/deepLinking.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/UserflowExpoRouterScreenTracker.d.ts +3 -0
- package/lib/typescript/commonjs/src/expo-router/UserflowExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/getExpoRouterScreenTracker.d.ts +13 -0
- package/lib/typescript/commonjs/src/expo-router/getExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +17 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +112 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts +96 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts +21 -0
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/chainCallbacks.d.ts +3 -0
- package/lib/typescript/commonjs/src/navigation/chainCallbacks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/getActiveRouteName.d.ts +6 -0
- package/lib/typescript/commonjs/src/navigation/getActiveRouteName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/navigation/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts +33 -0
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/network.d.ts +42 -0
- package/lib/typescript/commonjs/src/network.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +104 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +11 -0
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +53 -0
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +52 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/pairing/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/pairingRuntime.d.ts +24 -0
- package/lib/typescript/commonjs/src/pairing/pairingRuntime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +16 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts +4 -0
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +13 -0
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +13 -0
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +32 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/clientConditions.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/clientConditions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +17 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/userflowCore.d.ts +3 -0
- package/lib/typescript/commonjs/src/runtime/userflowCore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts +28 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +28 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/ProgressBar.d.ts +19 -0
- package/lib/typescript/commonjs/src/surfaces/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +17 -0
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/absoluteFill.d.ts +18 -0
- package/lib/typescript/commonjs/src/surfaces/absoluteFill.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/parseBackdropOpacity.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/parseBackdropOpacity.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/progress.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/progress.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveCloseButtonColor.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/resolveCloseButtonColor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +36 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +24 -0
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +11 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +36 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +31 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipNotch.d.ts +29 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipNotch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +43 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +34 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/parseBackdropPadding.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/parseBackdropPadding.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +29 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useUserflowScreen.d.ts +10 -0
- package/lib/typescript/commonjs/src/useUserflowScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +3 -0
- package/lib/typescript/commonjs/src/version.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +32 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +113 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts +46 -0
- package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +30 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/animationFrame.d.ts +21 -0
- package/lib/typescript/module/src/anchors/animationFrame.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/autoAnchor.d.ts +31 -0
- package/lib/typescript/module/src/anchors/autoAnchor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +21 -0
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +41 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +48 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +33 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findScrollAncestors.d.ts +47 -0
- package/lib/typescript/module/src/anchors/fiber/findScrollAncestors.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/measureHostFiber.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/measureHostFiber.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +42 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/hintsCodec.d.ts +40 -0
- package/lib/typescript/module/src/anchors/hintsCodec.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +32 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveManualAnchorId.d.ts +6 -0
- package/lib/typescript/module/src/anchors/resolveManualAnchorId.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/scrollAnchorIntoView.d.ts +59 -0
- package/lib/typescript/module/src/anchors/scrollAnchorIntoView.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/scrollConfig.d.ts +30 -0
- package/lib/typescript/module/src/anchors/scrollConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +64 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts +30 -0
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts +34 -0
- package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts.map +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts +5 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts +21 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -0
- package/lib/typescript/module/src/content/StepButton.d.ts +13 -0
- package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts +8 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -0
- package/lib/typescript/module/src/content/deserialize.d.ts +27 -0
- package/lib/typescript/module/src/content/deserialize.d.ts.map +1 -0
- package/lib/typescript/module/src/content/imageLayout.d.ts +13 -0
- package/lib/typescript/module/src/content/imageLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/content/migrateFlowBlocks.d.ts +12 -0
- package/lib/typescript/module/src/content/migrateFlowBlocks.d.ts.map +1 -0
- package/lib/typescript/module/src/content/openSafeUrl.d.ts +12 -0
- package/lib/typescript/module/src/content/openSafeUrl.d.ts.map +1 -0
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts +24 -0
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/themeColor.d.ts +43 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -0
- package/lib/typescript/module/src/content/types.d.ts +144 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -0
- package/lib/typescript/module/src/deepLinking.d.ts +54 -0
- package/lib/typescript/module/src/deepLinking.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/UserflowExpoRouterScreenTracker.d.ts +3 -0
- package/lib/typescript/module/src/expo-router/UserflowExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/getExpoRouterScreenTracker.d.ts +13 -0
- package/lib/typescript/module/src/expo-router/getExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +3 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +17 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +112 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/lifecycle.d.ts +96 -0
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts +21 -0
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/chainCallbacks.d.ts +3 -0
- package/lib/typescript/module/src/navigation/chainCallbacks.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/getActiveRouteName.d.ts +6 -0
- package/lib/typescript/module/src/navigation/getActiveRouteName.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/index.d.ts +5 -0
- package/lib/typescript/module/src/navigation/index.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts +33 -0
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -0
- package/lib/typescript/module/src/network.d.ts +42 -0
- package/lib/typescript/module/src/network.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts +104 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +11 -0
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/deepLink.d.ts +53 -0
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +52 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/index.d.ts +10 -0
- package/lib/typescript/module/src/pairing/index.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/pairingRuntime.d.ts +24 -0
- package/lib/typescript/module/src/pairing/pairingRuntime.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +16 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/usePairingState.d.ts +4 -0
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +13 -0
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +13 -0
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +16 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +32 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/clientConditions.d.ts +10 -0
- package/lib/typescript/module/src/runtime/clientConditions.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +17 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +18 -0
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +10 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/userflowCore.d.ts +3 -0
- package/lib/typescript/module/src/runtime/userflowCore.d.ts.map +1 -0
- package/lib/typescript/module/src/screenTracker.d.ts +28 -0
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +28 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/ProgressBar.d.ts +19 -0
- package/lib/typescript/module/src/surfaces/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +17 -0
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/absoluteFill.d.ts +18 -0
- package/lib/typescript/module/src/surfaces/absoluteFill.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/parseBackdropOpacity.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/parseBackdropOpacity.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/progress.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/progress.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveCloseButtonColor.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/resolveCloseButtonColor.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +36 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +24 -0
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +11 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts +36 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +31 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipNotch.d.ts +29 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipNotch.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +43 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +34 -0
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/parseBackdropPadding.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/tooltip/parseBackdropPadding.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +29 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -0
- package/lib/typescript/module/src/useUserflowScreen.d.ts +10 -0
- package/lib/typescript/module/src/useUserflowScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +3 -0
- package/lib/typescript/module/src/version.d.ts.map +1 -0
- package/package.json +144 -0
- package/src/anchors/AnchorRegistry.ts +81 -0
- package/src/anchors/AutoAnchorRegistry.ts +439 -0
- package/src/anchors/ScrollContainerRegistry.ts +108 -0
- package/src/anchors/anchorChangeTicker.ts +84 -0
- package/src/anchors/animationFrame.ts +88 -0
- package/src/anchors/autoAnchor.ts +310 -0
- package/src/anchors/elementConditionEvaluator.ts +108 -0
- package/src/anchors/fiber/FiberScanRoot.tsx +98 -0
- package/src/anchors/fiber/fiberInternals.ts +181 -0
- package/src/anchors/fiber/findAnchorFiber.ts +225 -0
- package/src/anchors/fiber/findScrollAncestors.ts +229 -0
- package/src/anchors/fiber/measureHostFiber.ts +85 -0
- package/src/anchors/fiber/visibleScreens.ts +173 -0
- package/src/anchors/hintsCodec.ts +125 -0
- package/src/anchors/resolveAnchorHost.ts +102 -0
- package/src/anchors/resolveManualAnchorId.ts +10 -0
- package/src/anchors/scrollAnchorIntoView.ts +251 -0
- package/src/anchors/scrollConfig.ts +61 -0
- package/src/anchors/targetPressMonitor.ts +127 -0
- package/src/anchors/useUserflowAnchor.ts +88 -0
- package/src/anchors/useUserflowScrollContainer.ts +86 -0
- package/src/anonymousId.ts +38 -0
- package/src/content/RichContentRenderer.tsx +721 -0
- package/src/content/StepButton.tsx +70 -0
- package/src/content/buttonAppearance.ts +11 -0
- package/src/content/deserialize.ts +147 -0
- package/src/content/imageLayout.ts +29 -0
- package/src/content/migrateFlowBlocks.ts +39 -0
- package/src/content/openSafeUrl.ts +30 -0
- package/src/content/resolveStepButtonChrome.ts +122 -0
- package/src/content/themeColor.ts +98 -0
- package/src/content/types.ts +189 -0
- package/src/deepLinking.ts +182 -0
- package/src/expo-router/UserflowExpoRouterScreenTracker.tsx +7 -0
- package/src/expo-router/getExpoRouterScreenTracker.ts +49 -0
- package/src/expo-router/index.ts +2 -0
- package/src/expo-router/useUserflowExpoRouter.ts +40 -0
- package/src/index.ts +362 -0
- package/src/lifecycle.ts +253 -0
- package/src/navigation/WithUserflowReactNavigation.tsx +87 -0
- package/src/navigation/chainCallbacks.ts +12 -0
- package/src/navigation/getActiveRouteName.ts +18 -0
- package/src/navigation/index.ts +11 -0
- package/src/navigation/openFlowNavigateUrl.ts +113 -0
- package/src/network.ts +113 -0
- package/src/pairing/PairingController.ts +356 -0
- package/src/pairing/PreviewModeBanner.tsx +130 -0
- package/src/pairing/deepLink.ts +128 -0
- package/src/pairing/diagnostics.ts +135 -0
- package/src/pairing/index.ts +19 -0
- package/src/pairing/pairingRuntime.ts +76 -0
- package/src/pairing/tokenStorage.ts +76 -0
- package/src/pairing/usePairingState.ts +43 -0
- package/src/runtime/FlowRenderer.tsx +60 -0
- package/src/runtime/FlowSurfaceFade.tsx +55 -0
- package/src/runtime/TargetPressBridge.tsx +86 -0
- package/src/runtime/UserflowProvider.tsx +89 -0
- package/src/runtime/clientConditions.ts +42 -0
- package/src/runtime/flowEngine.ts +53 -0
- package/src/runtime/flowSessionViewState.ts +55 -0
- package/src/runtime/useFlowSessionState.ts +36 -0
- package/src/runtime/userflowCore.ts +8 -0
- package/src/screenTracker.ts +83 -0
- package/src/surfaces/CloseButton.tsx +41 -0
- package/src/surfaces/MadeWithUserflow.tsx +103 -0
- package/src/surfaces/ModalSurface.tsx +215 -0
- package/src/surfaces/ProgressBar.tsx +142 -0
- package/src/surfaces/TooltipSurface.tsx +743 -0
- package/src/surfaces/absoluteFill.ts +24 -0
- package/src/surfaces/assets/png.d.ts +4 -0
- package/src/surfaces/assets/userflow-logomark.png +0 -0
- package/src/surfaces/parseBackdropOpacity.ts +13 -0
- package/src/surfaces/progress.ts +37 -0
- package/src/surfaces/resolveCloseButtonColor.ts +23 -0
- package/src/surfaces/resolveModalLayout.ts +85 -0
- package/src/surfaces/resolveTooltipLayout.ts +73 -0
- package/src/surfaces/safeArea.ts +48 -0
- package/src/surfaces/themeChrome.ts +126 -0
- package/src/surfaces/tooltip/TooltipBubble.tsx +123 -0
- package/src/surfaces/tooltip/TooltipCutout.tsx +110 -0
- package/src/surfaces/tooltip/TooltipNotch.tsx +67 -0
- package/src/surfaces/tooltip/computeTooltipPosition.ts +125 -0
- package/src/surfaces/tooltip/inferTooltipPlacement.ts +109 -0
- package/src/surfaces/tooltip/parseBackdropPadding.ts +8 -0
- package/src/surfaces/tooltip/rect.ts +62 -0
- package/src/useUserflowScreen.ts +17 -0
- package/src/version.ts +2 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Userflow React Native SDK
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Userflow Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
PROPRIETARY AND CONFIDENTIAL
|
|
6
|
+
|
|
7
|
+
This software and its source code (the "Software") are the proprietary and
|
|
8
|
+
confidential property of Userflow Inc. ("Userflow"). The Software is licensed,
|
|
9
|
+
not sold.
|
|
10
|
+
|
|
11
|
+
1. Grant of License
|
|
12
|
+
|
|
13
|
+
Use of the Software is permitted only by parties who have entered into a
|
|
14
|
+
written agreement with Userflow that expressly covers the Software (the
|
|
15
|
+
"Agreement"), and only for the duration, purposes, and scope set out in
|
|
16
|
+
that Agreement. Where the Software is provided for evaluation or as part
|
|
17
|
+
of an early-access or design-partner program, use is limited to internal
|
|
18
|
+
evaluation and integration testing unless the Agreement states otherwise.
|
|
19
|
+
|
|
20
|
+
If you have not entered into such an Agreement with Userflow, you are
|
|
21
|
+
granted no rights to use, copy, modify, or distribute the Software.
|
|
22
|
+
|
|
23
|
+
2. Restrictions
|
|
24
|
+
|
|
25
|
+
Except as expressly permitted by the Agreement or by applicable law, you
|
|
26
|
+
may not:
|
|
27
|
+
|
|
28
|
+
(a) redistribute, sublicense, sell, rent, lease, or otherwise transfer the
|
|
29
|
+
Software or any portion of it to any third party, except that you may
|
|
30
|
+
ship the Software in compiled or bundled form as an integral part of
|
|
31
|
+
your own applications distributed to your end users, provided you do
|
|
32
|
+
not redistribute the Software as a standalone library or SDK;
|
|
33
|
+
(b) modify or create derivative works of the Software, except for
|
|
34
|
+
automated transformations performed by ordinary build tooling
|
|
35
|
+
(including transpilation, bundling, minification, tree-shaking, and
|
|
36
|
+
source-map generation) and other modifications reasonably necessary
|
|
37
|
+
to integrate the Software into your applications, provided that any
|
|
38
|
+
such modifications remain subject to this notice;
|
|
39
|
+
(c) remove or obscure any copyright, trademark, or other proprietary
|
|
40
|
+
notices contained in the Software;
|
|
41
|
+
(d) disclose the Software's source code to any third party, except to your
|
|
42
|
+
employees and contractors who need access for a purpose permitted by
|
|
43
|
+
the Agreement and who are bound by written confidentiality
|
|
44
|
+
obligations no less protective than those in the Agreement.
|
|
45
|
+
|
|
46
|
+
3. Pre-Release Software
|
|
47
|
+
|
|
48
|
+
The Software may be provided prior to general availability. It may be
|
|
49
|
+
incomplete, may change without notice, and may not be backward compatible
|
|
50
|
+
between versions. Userflow is under no obligation to provide maintenance,
|
|
51
|
+
support, updates, or future releases except as set out in the Agreement.
|
|
52
|
+
|
|
53
|
+
4. No Warranty
|
|
54
|
+
|
|
55
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
56
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
57
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
58
|
+
|
|
59
|
+
5. Limitation of Liability
|
|
60
|
+
|
|
61
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL
|
|
62
|
+
USERFLOW BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN
|
|
63
|
+
AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
|
64
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
65
|
+
|
|
66
|
+
6. Precedence
|
|
67
|
+
|
|
68
|
+
In the event of a conflict between this notice and the Agreement, the
|
|
69
|
+
Agreement governs.
|
|
70
|
+
|
|
71
|
+
For licensing enquiries, contact:
|
|
72
|
+
|
|
73
|
+
Userflow Inc.
|
|
74
|
+
548 Market St PMB 69598
|
|
75
|
+
San Francisco, CA 94104-5401
|
|
76
|
+
United States
|
package/README.md
ADDED
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
# `@userflow-tech/react-native`
|
|
2
|
+
|
|
3
|
+
Official Userflow SDK for React Native and Expo. Deliver guided flows, tooltips,
|
|
4
|
+
and modals authored in the Userflow dashboard — without shipping a new app
|
|
5
|
+
release for every content change.
|
|
6
|
+
|
|
7
|
+
> Early development. APIs may change. Packages publish to a private npm org
|
|
8
|
+
> (`publishConfig.access: restricted`).
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
| Peer dependency | Required? | Why |
|
|
13
|
+
| ------------------------------------------- | --------- | ------------------------------------------------------------- |
|
|
14
|
+
| `react`, `react-native` | Yes | Host runtime. |
|
|
15
|
+
| `@react-native-async-storage/async-storage` | Yes | Persists the anonymous user id across launches. |
|
|
16
|
+
| `react-native-safe-area-context` | Optional | Correct insets for modal/tooltip surfaces. |
|
|
17
|
+
| `@react-navigation/native` | Optional | Screen tracking + NAVIGATE routing (React Navigation). |
|
|
18
|
+
| `expo-router` | Optional | Screen tracking + NAVIGATE routing (Expo Router). |
|
|
19
|
+
| `@react-native-community/netinfo` | Optional | Instant offline→online reconnect (enhancement, not required). |
|
|
20
|
+
| `expo-secure-store` | Optional | Persist Builder pairing JWT in Keychain/Keystore. |
|
|
21
|
+
|
|
22
|
+
Optional peers are declared `optional: true` in `peerDependenciesMeta`, so
|
|
23
|
+
package managers will not warn if you skip them.
|
|
24
|
+
|
|
25
|
+
### Expo Go is not supported
|
|
26
|
+
|
|
27
|
+
Use an **Expo development build** (or bare React Native). The SDK is not
|
|
28
|
+
compatible with Expo Go.
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Expo (dev build) — include the config plugin for Builder deep-link schemes
|
|
34
|
+
npx expo install @userflow-tech/react-native @userflow-tech/expo @react-native-async-storage/async-storage
|
|
35
|
+
|
|
36
|
+
# Bare React Native
|
|
37
|
+
npm install @userflow-tech/react-native @react-native-async-storage/async-storage
|
|
38
|
+
cd ios && pod install
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Optional peers as needed:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx expo install react-native-safe-area-context @react-native-community/netinfo expo-secure-store
|
|
45
|
+
# and either expo-router or @react-navigation/native, depending on your router
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
For local tarball installs from this monorepo (before the private registry is
|
|
49
|
+
set up), pack with `pnpm pack:all` at the repo root and install **all four**
|
|
50
|
+
tarballs together — a single `@userflow-tech/react-native` tarball alone will fail
|
|
51
|
+
because `@userflow-tech/core@0.1.0` is not on the public registry, and Expo hosts
|
|
52
|
+
need `@userflow-tech/expo` for scheme registration. Steps:
|
|
53
|
+
`docs/local-testing.md` in the monorepo.
|
|
54
|
+
|
|
55
|
+
## Quick start
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
import { Userflow, UserflowProvider } from '@userflow-tech/react-native';
|
|
59
|
+
|
|
60
|
+
await Userflow.init({
|
|
61
|
+
clientToken: 'ct_...', // from the Userflow dashboard → Environments
|
|
62
|
+
// serverEndpoint: 'https://e.userflow.com', // default; set for staging/local
|
|
63
|
+
// pairingEndpoint: 'https://e.userflow.com', // default; set for local Builder pairing
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// Identified user — signature is computed by YOUR backend, never in the app:
|
|
67
|
+
await Userflow.identify('user-123', { name: 'Ada' }, { signature });
|
|
68
|
+
|
|
69
|
+
// …or anonymous (id stored in AsyncStorage):
|
|
70
|
+
await Userflow.identifyAnonymous();
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Wrap the app tree so flows can render:
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
import { UserflowProvider } from '@userflow-tech/react-native';
|
|
77
|
+
|
|
78
|
+
export default function RootLayout() {
|
|
79
|
+
return (
|
|
80
|
+
<UserflowProvider>
|
|
81
|
+
<App />
|
|
82
|
+
</UserflowProvider>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Call `Userflow.teardown()` when tearing the SDK down (removes AppState and
|
|
88
|
+
NetInfo subscriptions). Call `Userflow.reset()` on logout to clear identity and
|
|
89
|
+
disconnect.
|
|
90
|
+
|
|
91
|
+
### Call order
|
|
92
|
+
|
|
93
|
+
| Call | Before `init()` resolves | Before `identify()` |
|
|
94
|
+
| -------------------------------- | --------------------------------------------------- | ---------------------------------------------------- |
|
|
95
|
+
| `identify` / `identifyAnonymous` | **Throws** `Call Userflow.init() before identify()` | — |
|
|
96
|
+
| `group` | **Throws** `Call Userflow.init() before group()` | **Throws** `Call Userflow.identify() before group()` |
|
|
97
|
+
| `track` | **Throws** `Call Userflow.init() before track()` | **Throws** `Call Userflow.identify() before track()` |
|
|
98
|
+
| `updateScreen` | Silently buffers; included on the next channel join | Silently buffers |
|
|
99
|
+
|
|
100
|
+
Other rules:
|
|
101
|
+
|
|
102
|
+
- `init()` is **idempotent**. A second call returns the cached promise and does
|
|
103
|
+
**not** apply new options. Restart the process (or call `reset()` then
|
|
104
|
+
re-init carefully) if you need different credentials.
|
|
105
|
+
- `identify()` with a **different** user id resets the previous identity first.
|
|
106
|
+
Same-id re-identify merges attributes.
|
|
107
|
+
- Identity verification `signature` is optional in the type, but **required by
|
|
108
|
+
the server** when the environment has identity verification enabled. See
|
|
109
|
+
[docs/identity-verification.md](docs/identity-verification.md).
|
|
110
|
+
|
|
111
|
+
## Screen tracking
|
|
112
|
+
|
|
113
|
+
### Expo Router
|
|
114
|
+
|
|
115
|
+
Mount `UserflowExpoRouterScreenTracker` from the `@userflow-tech/react-native/expo-router`
|
|
116
|
+
subpath under `UserflowProvider` (the tracker is a separate entry so apps without
|
|
117
|
+
`expo-router` are not forced to install that peer):
|
|
118
|
+
|
|
119
|
+
```tsx
|
|
120
|
+
import { UserflowProvider } from '@userflow-tech/react-native';
|
|
121
|
+
import { UserflowExpoRouterScreenTracker } from '@userflow-tech/react-native/expo-router';
|
|
122
|
+
import { Stack } from 'expo-router';
|
|
123
|
+
|
|
124
|
+
export default function RootLayout() {
|
|
125
|
+
return (
|
|
126
|
+
<UserflowProvider>
|
|
127
|
+
<UserflowExpoRouterScreenTracker />
|
|
128
|
+
<Stack />
|
|
129
|
+
</UserflowProvider>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### React Navigation
|
|
135
|
+
|
|
136
|
+
Wrap `NavigationContainer` with `WithUserflowReactNavigation` from the
|
|
137
|
+
`@userflow-tech/react-native/navigation` subpath:
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
import { UserflowProvider } from '@userflow-tech/react-native';
|
|
141
|
+
import { WithUserflowReactNavigation } from '@userflow-tech/react-native/navigation';
|
|
142
|
+
import { NavigationContainer } from '@react-navigation/native';
|
|
143
|
+
|
|
144
|
+
export default function App() {
|
|
145
|
+
return (
|
|
146
|
+
<UserflowProvider>
|
|
147
|
+
<WithUserflowReactNavigation>
|
|
148
|
+
<NavigationContainer>{/* navigators */}</NavigationContainer>
|
|
149
|
+
</WithUserflowReactNavigation>
|
|
150
|
+
</UserflowProvider>
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Manual
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
import { Userflow, useUserflowScreen } from '@userflow-tech/react-native';
|
|
159
|
+
|
|
160
|
+
Userflow.updateScreen('Profile');
|
|
161
|
+
// or inside a component:
|
|
162
|
+
useUserflowScreen(route.name);
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Element targeting (anchors)
|
|
166
|
+
|
|
167
|
+
Tooltip steps and ELEMENT client conditions resolve a dashboard selector like
|
|
168
|
+
`#invite-teammates` to a host view. Prefer a plain `testID` (or `nativeID` /
|
|
169
|
+
`accessibilityLabel`) — no SDK hook required. A misspelled or missing anchor can
|
|
170
|
+
mean the tooltip misses **or** a gated flow never starts at all.
|
|
171
|
+
|
|
172
|
+
```tsx
|
|
173
|
+
import { Pressable, Text } from 'react-native';
|
|
174
|
+
|
|
175
|
+
function InviteScreen() {
|
|
176
|
+
return (
|
|
177
|
+
<Pressable testID="invite-teammates">
|
|
178
|
+
<Text>Invite teammates</Text>
|
|
179
|
+
</Pressable>
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Targets inside a `ScrollView` / `FlatList` are scrolled into view automatically.
|
|
185
|
+
`useUserflowScrollContainer` is only needed as an override for scroll libraries
|
|
186
|
+
the fiber walk cannot drive — see [docs/anchoring.md](docs/anchoring.md).
|
|
187
|
+
|
|
188
|
+
In the Userflow builder, set the MANUAL step selector CSS to `#invite-teammates`
|
|
189
|
+
(or `invite-teammates`). Use `useUserflowAnchor(id)` only when you need an
|
|
190
|
+
explicit override (e.g. a third-party component that does not accept `testID`).
|
|
191
|
+
Full contract, prop priority, missing-target behavior, and duplicate-id rules:
|
|
192
|
+
[docs/anchoring.md](docs/anchoring.md).
|
|
193
|
+
|
|
194
|
+
## Builder preview & pairing
|
|
195
|
+
|
|
196
|
+
To preview draft flows from the Userflow builder onto a device (QR / deep link):
|
|
197
|
+
|
|
198
|
+
1. Register the environment's **`scheme_id`** (e.g. `userflow-257587` — **not**
|
|
199
|
+
the env UUID) with the `@userflow-tech/expo` config plugin, then **rebuild
|
|
200
|
+
native** (`npx expo prebuild` / a new development client). Metro reload is
|
|
201
|
+
not enough.
|
|
202
|
+
2. Call `Userflow.init` (optionally with `pairingEndpoint` / `serverEndpoint`
|
|
203
|
+
for staging or local stacks) and wrap the tree in `UserflowProvider`.
|
|
204
|
+
3. Open the builder Preview dialog → **Pair a device** → scan/open the QR. The
|
|
205
|
+
app should show a **Preview mode** banner.
|
|
206
|
+
4. Hit **Preview** in the builder. The draft flow lands on that paired device.
|
|
207
|
+
|
|
208
|
+
```json
|
|
209
|
+
{
|
|
210
|
+
"expo": {
|
|
211
|
+
"plugins": [["@userflow-tech/expo", { "schemeId": "userflow-257587" }]]
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
```ts
|
|
217
|
+
await Userflow.init({
|
|
218
|
+
clientToken: 'ct_...',
|
|
219
|
+
// Local Userflow stack example:
|
|
220
|
+
// serverEndpoint: 'http://localhost:40401',
|
|
221
|
+
// pairingEndpoint: 'http://localhost:40401',
|
|
222
|
+
});
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Deep-link / pairing helpers:
|
|
226
|
+
|
|
227
|
+
| Member | Description |
|
|
228
|
+
| ----------------------- | -------------------------------------------------------- |
|
|
229
|
+
| `didHandleURL(url)` | Handle a one-shot preview deep link (`…://?token=…`). |
|
|
230
|
+
| `handlePairingUrl(url)` | Handle a pairing deep link (`…://?pairing_token=…`). |
|
|
231
|
+
| `exitPreview()` | Disconnect the pairing websocket and leave preview mode. |
|
|
232
|
+
| `PreviewModeBanner` | Mounted by `UserflowProvider` while paired. |
|
|
233
|
+
|
|
234
|
+
Full scheme registration, Linking ownership, and verify commands:
|
|
235
|
+
[docs/deep-linking.md](docs/deep-linking.md). Symptom table:
|
|
236
|
+
[docs/troubleshooting.md](docs/troubleshooting.md#builder-preview--pairing).
|
|
237
|
+
|
|
238
|
+
## Connection resilience
|
|
239
|
+
|
|
240
|
+
Recovery from a dropped or silently-dead socket works out of the box:
|
|
241
|
+
|
|
242
|
+
1. Reconnect ladder on socket `close` / `error`
|
|
243
|
+
2. Adaptive heartbeat with a short reply deadline
|
|
244
|
+
3. Foreground liveness probe when the app returns
|
|
245
|
+
|
|
246
|
+
`@react-native-community/netinfo` is an optional enhancement for near-instant
|
|
247
|
+
offline→online recovery. Without it, recovery still happens at the next
|
|
248
|
+
heartbeat or foreground return.
|
|
249
|
+
|
|
250
|
+
## NAVIGATE actions
|
|
251
|
+
|
|
252
|
+
Flow NAVIGATE buttons open URLs in this order:
|
|
253
|
+
|
|
254
|
+
1. Host `onNavigate` from `Userflow.init({ onNavigate })` / `Userflow.setOnNavigate` (wins)
|
|
255
|
+
2. http(s) / mailto / tel → Linking
|
|
256
|
+
3. Path-like in-app URLs → Expo Router `push` or React Navigation `navigate`
|
|
257
|
+
4. Otherwise best-effort Linking
|
|
258
|
+
|
|
259
|
+
Screen tracking ≠ action routing. React Navigation apps need
|
|
260
|
+
`WithUserflowReactNavigation` for in-app NAVIGATE. Expo Router apps need
|
|
261
|
+
`UserflowExpoRouterScreenTracker` from `@userflow-tech/react-native/expo-router`.
|
|
262
|
+
|
|
263
|
+
## API reference
|
|
264
|
+
|
|
265
|
+
### `Userflow`
|
|
266
|
+
|
|
267
|
+
| Member | Description |
|
|
268
|
+
| --------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
269
|
+
| `init(config)` | Validate credentials, store config, start lifecycle + network controllers. |
|
|
270
|
+
| `identify(userId, attributes?, options?)` | Identify a user; `options.signature` for identity verification. |
|
|
271
|
+
| `identifyAnonymous(attributes?, options?)` | Stable anonymous id via AsyncStorage. |
|
|
272
|
+
| `group(groupId, attributes?, options?)` | Associate the current user with a group. |
|
|
273
|
+
| `track(name, attributes?, options?)` | Record a custom event (literal attribute values only); `userOnly` skips group. |
|
|
274
|
+
| `reset()` | Clear identity, client conditions, flow session; disconnect. |
|
|
275
|
+
| `teardown()` | Stop AppState / NetInfo / screen-tracking subscriptions. |
|
|
276
|
+
| `updateScreen(name)` | Report the active screen (prefer hooks when possible). |
|
|
277
|
+
| `setOnNavigate(handler)` | Override or clear the host NAVIGATE handler. |
|
|
278
|
+
| `reportActivity()` | Reset the idle timer; reconnect an idle-suspended socket. |
|
|
279
|
+
| `didHandleURL(url)` | Handle a Userflow preview deep link (`…://?token=…`). |
|
|
280
|
+
| `handlePairingUrl(url)` | Handle a Builder pairing deep link (`…://?pairing_token=…`; dev builds only). |
|
|
281
|
+
| `exitPreview()` | Leave Builder preview mode; disconnect the pairing websocket (dev only). |
|
|
282
|
+
| `inspectPairingDeepLink(url)` | Classify a URL as pairing without consuming it; reports rejection reason. |
|
|
283
|
+
| `isPairingAttempt(reason)` | True when a rejection was a recognisable pairing attempt worth reporting. |
|
|
284
|
+
| `parsePairingDeepLink(url)` / `isUserflowPairingUrl(url)` | Parse / detect a pairing deep link. |
|
|
285
|
+
| `getUserId()` | Current user id, or `null` before identify. |
|
|
286
|
+
| `getAttributes()` | Copy of attributes for the current user. |
|
|
287
|
+
| `getFlowSessionEngine()` | Mid-flow session engine (created lazily; attach runs after identify). |
|
|
288
|
+
|
|
289
|
+
### Hooks and components
|
|
290
|
+
|
|
291
|
+
| Export | Description |
|
|
292
|
+
| --------------------------------------- | ------------------------------------------------------------------------ |
|
|
293
|
+
| `UserflowProvider` | Root overlay host. Does not track screens on its own. |
|
|
294
|
+
| `PreviewModeBanner` | Shown by the provider while a Builder pairing session is active. |
|
|
295
|
+
| `useUserflow()` | Provider context (`{ engine }`); throws outside the provider. |
|
|
296
|
+
| `useFlowSessionState()` | Reactive view of the active mid-flow session (advanced / custom UI). |
|
|
297
|
+
| `useUserflowScreen(name)` | Report the active screen from a React tree. |
|
|
298
|
+
| `useUserflowAnchor(id)` | Optional override: register a view as a MANUAL target (beats `testID`). |
|
|
299
|
+
| `useUserflowScrollContainer(onScroll?)` | Optional override: register a `ScrollView` for tooltip scroll-into-view. |
|
|
300
|
+
| `Userflow.setScrollPadding(padding)` | Sticky chrome insets when scrolling targets into view. |
|
|
301
|
+
| `Userflow.setCustomScrollIntoView(fn)` | Replace scroll-into-view (e.g. unsupported scroll libraries). |
|
|
302
|
+
|
|
303
|
+
### Subpath exports
|
|
304
|
+
|
|
305
|
+
| Import | Provides |
|
|
306
|
+
| ----------------------------------------- | ---------------------------------------------------------- |
|
|
307
|
+
| `@userflow-tech/react-native/navigation` | `WithUserflowReactNavigation` |
|
|
308
|
+
| `@userflow-tech/react-native/expo-router` | `UserflowExpoRouterScreenTracker`, `useUserflowExpoRouter` |
|
|
309
|
+
|
|
310
|
+
### Constants
|
|
311
|
+
|
|
312
|
+
| Export | Meaning |
|
|
313
|
+
| ----------------------------------- | ---------------------------------------------------------------- |
|
|
314
|
+
| `SDK_VERSION` | Package version string injected at build time. |
|
|
315
|
+
| `SUSPEND_GRACE_MS` | Grace window before background suspend (3s). |
|
|
316
|
+
| `SESSION_STALE_AFTER_BACKGROUND_MS` | Clear mid-flow session after this long away (5 min). |
|
|
317
|
+
| `INACTIVITY_TIMEOUT_MS` | Foreground idle suspend (5 min; skipped while a flow is active). |
|
|
318
|
+
|
|
319
|
+
## Guides in this package
|
|
320
|
+
|
|
321
|
+
| Doc | Topic |
|
|
322
|
+
| -------------------------------------------------------------- | ---------------------------------------------------------- |
|
|
323
|
+
| [docs/anchoring.md](docs/anchoring.md) | Manual targets, scroll containers, missing-target behavior |
|
|
324
|
+
| [docs/deep-linking.md](docs/deep-linking.md) | Builder preview URLs and pairing sessions |
|
|
325
|
+
| [docs/identity-verification.md](docs/identity-verification.md) | HMAC signature on your backend |
|
|
326
|
+
| [docs/troubleshooting.md](docs/troubleshooting.md) | Symptom → cause for common integration failures |
|
|
327
|
+
| [docs/theme-mapping.md](docs/theme-mapping.md) | Web → RN theme token mapping (contributor-facing) |
|
|
328
|
+
|
|
329
|
+
## What is not available yet
|
|
330
|
+
|
|
331
|
+
- Banners and embed (inline) surfaces
|
|
332
|
+
- `Userflow.track()` / custom event tracking
|
|
333
|
+
- Codeless / AUTO element targeting
|
|
334
|
+
- `INPUT_VALUE` / `FILLED_IN_INPUT` client conditions
|
|
335
|
+
|
|
336
|
+
Flows gated on unsupported client conditions stay unknown and **never start**.
|
|
337
|
+
See [docs/troubleshooting.md](docs/troubleshooting.md).
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# Element targeting (anchors)
|
|
2
|
+
|
|
3
|
+
How element targeting works in the React Native SDK, and how to wire it in a
|
|
4
|
+
host app.
|
|
5
|
+
|
|
6
|
+
**This matters more than tooltip placement alone.** The same resolver powers:
|
|
7
|
+
|
|
8
|
+
1. Tooltip target resolution (`TooltipSurface`)
|
|
9
|
+
2. `ELEMENT` client conditions with `PRESENT` / `NOT_PRESENT` — so a missing or
|
|
10
|
+
misspelled anchor can mean a gated **flow never starts at all**, not merely a
|
|
11
|
+
misplaced tooltip
|
|
12
|
+
|
|
13
|
+
## Preferred: tag with `testID`
|
|
14
|
+
|
|
15
|
+
Dashboard MANUAL selectors store a CSS-like string on `step.selector.css` (or
|
|
16
|
+
`condition.selector.css`). The SDK resolves it with:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
// packages/react-native/src/anchors/resolveManualAnchorId.ts
|
|
20
|
+
return trimmed.startsWith('#') ? trimmed.slice(1) : trimmed;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then looks up a measurable host, in order:
|
|
24
|
+
|
|
25
|
+
1. **`useUserflowAnchor` registry** (explicit override)
|
|
26
|
+
2. Fiber-tree scan for a matching **`testID`**
|
|
27
|
+
3. Else matching **`nativeID`**
|
|
28
|
+
4. Else matching **`accessibilityLabel`**
|
|
29
|
+
|
|
30
|
+
| Dashboard `selector.css` | Resolved id | Host code |
|
|
31
|
+
| ------------------------ | ------------------ | --------------------------------------- |
|
|
32
|
+
| `#invite-teammates` | `invite-teammates` | `<Pressable testID="invite-teammates">` |
|
|
33
|
+
| `invite-teammates` | `invite-teammates` | `<Pressable testID="invite-teammates">` |
|
|
34
|
+
| ` #x ` | `x` | `<View testID="x">` |
|
|
35
|
+
|
|
36
|
+
Only a plain id (with optional leading `#`) is supported. Compound CSS
|
|
37
|
+
(`.class`, `[attr]`, `div > button`) is **not** parsed — the trimmed string
|
|
38
|
+
minus a leading `#` becomes the registry / prop key literally.
|
|
39
|
+
|
|
40
|
+
```tsx
|
|
41
|
+
import { Pressable, Text } from 'react-native';
|
|
42
|
+
|
|
43
|
+
function InviteButton() {
|
|
44
|
+
return (
|
|
45
|
+
<Pressable testID="invite-teammates">
|
|
46
|
+
<Text>Invite teammates</Text>
|
|
47
|
+
</Pressable>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
No SDK import is required on the target view. Prefer **MANUAL** selectors in the
|
|
53
|
+
builder for mobile. `AUTO` (codeless) selectors are not evaluated today;
|
|
54
|
+
conditions that use them stay unknown and gated flows do not start.
|
|
55
|
+
|
|
56
|
+
### Prop priority
|
|
57
|
+
|
|
58
|
+
When resolving via the fiber scan, the highest matching tier wins so a `testID`
|
|
59
|
+
hit is never made ambiguous by an unrelated `accessibilityLabel` elsewhere on
|
|
60
|
+
the screen:
|
|
61
|
+
|
|
62
|
+
1. `testID`
|
|
63
|
+
2. `nativeID`
|
|
64
|
+
3. `accessibilityLabel`
|
|
65
|
+
|
|
66
|
+
### Duplicate ids fail closed
|
|
67
|
+
|
|
68
|
+
Multiple mounts of the same id are allowed, but `TooltipSurface` treats an
|
|
69
|
+
**ambiguous** id as **missing** — it never picks one arbitrarily. Nested
|
|
70
|
+
duplicates on a single root-to-leaf chain (e.g. `Pressable` forwarding `testID`
|
|
71
|
+
to its inner `View`) collapse to one host. Prefer unique ids per screen.
|
|
72
|
+
|
|
73
|
+
### Only visible screens are scanned
|
|
74
|
+
|
|
75
|
+
A navigator keeps earlier screens mounted, so the scan skips screens that are
|
|
76
|
+
covered by another one. Without this, an anchor on the screen underneath would
|
|
77
|
+
resolve and measure to a plausible on-screen rect, and reusing one id across two
|
|
78
|
+
stacked screens would fail closed as ambiguous.
|
|
79
|
+
|
|
80
|
+
Visibility comes from `react-native-screens`:
|
|
81
|
+
|
|
82
|
+
- **Native stack** (`RNSScreenStack`): every mounted screen reports
|
|
83
|
+
`activityState === 2`, so the **last** sibling branch is treated as the top
|
|
84
|
+
one (including iOS `modal` / `transparentModal`, which render as
|
|
85
|
+
`RNSModalScreen`).
|
|
86
|
+
- **Container navigators** (tabs, etc.): `activityState` picks the focused
|
|
87
|
+
branch(es). When several branches are active (multi-pane), all stay
|
|
88
|
+
scannable — last-sibling fallback is stack-only so visible panes are not
|
|
89
|
+
pruned.
|
|
90
|
+
|
|
91
|
+
Views outside the screen stack — tab bars, headers, other global chrome — are
|
|
92
|
+
always scanned. Apps without `react-native-screens` prune nothing and behave as
|
|
93
|
+
before.
|
|
94
|
+
|
|
95
|
+
`useUserflowAnchor` is checked before the scan and is not screen-scoped, so it
|
|
96
|
+
can still pin a target on a covered screen when you need that.
|
|
97
|
+
|
|
98
|
+
### Rows inside virtualized lists
|
|
99
|
+
|
|
100
|
+
`FlatList` / `SectionList` only mount rows near the viewport, so a `testID` on a
|
|
101
|
+
far-off row does not exist in the tree yet and resolves as **missing** — the same
|
|
102
|
+
way `document.querySelector` cannot see an unrendered row on web. Anchor to
|
|
103
|
+
something already mounted, or keep the target row rendered.
|
|
104
|
+
|
|
105
|
+
### Third-party / composite components
|
|
106
|
+
|
|
107
|
+
If a wrapper carries `testID` but does not forward it to a native host, the SDK
|
|
108
|
+
still finds it and measures the shallowest host descendant under that composite.
|
|
109
|
+
|
|
110
|
+
## Override: `useUserflowAnchor`
|
|
111
|
+
|
|
112
|
+
Use the hook when you need an explicit override — for example a library
|
|
113
|
+
component that does not accept `testID`, or when the same string appears on
|
|
114
|
+
multiple views and you must pin one:
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
function useUserflowAnchor(id: string): React.RefCallback<View>;
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
import { Pressable, Text } from 'react-native';
|
|
122
|
+
import { useUserflowAnchor } from '@userflow-tech/react-native';
|
|
123
|
+
|
|
124
|
+
function InviteButton() {
|
|
125
|
+
const inviteRef = useUserflowAnchor('invite-teammates');
|
|
126
|
+
return (
|
|
127
|
+
<Pressable ref={inviteRef}>
|
|
128
|
+
<Text>Invite teammates</Text>
|
|
129
|
+
</Pressable>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Notes:
|
|
135
|
+
|
|
136
|
+
- Empty / falsy `id` never registers.
|
|
137
|
+
- On unmount or ref detach, the host is unregistered.
|
|
138
|
+
- Changing `id` re-registers under the new key.
|
|
139
|
+
- A registered hook host **beats** a fiber `testID` match for the same id.
|
|
140
|
+
- Text-only or pure-JS components without a native handle will not measure.
|
|
141
|
+
|
|
142
|
+
## `useUserflowScrollContainer` (optional override)
|
|
143
|
+
|
|
144
|
+
For `testID` anchors inside a `ScrollView` / `FlatList`, the SDK discovers the
|
|
145
|
+
scroll ancestor via the fiber walk and scrolls the target into view
|
|
146
|
+
automatically — no hook required.
|
|
147
|
+
|
|
148
|
+
Register a scroll container explicitly when:
|
|
149
|
+
|
|
150
|
+
- The scroller is a library the fiber walk cannot drive (some FlashList /
|
|
151
|
+
Reanimated setups), or
|
|
152
|
+
- The target is only registered via `useUserflowAnchor` without a discoverable
|
|
153
|
+
fiber
|
|
154
|
+
|
|
155
|
+
```tsx
|
|
156
|
+
import { Pressable, ScrollView, Text } from 'react-native';
|
|
157
|
+
import { useUserflowScrollContainer } from '@userflow-tech/react-native';
|
|
158
|
+
|
|
159
|
+
function InviteScreen() {
|
|
160
|
+
const scroll = useUserflowScrollContainer();
|
|
161
|
+
|
|
162
|
+
return (
|
|
163
|
+
<ScrollView {...scroll}>
|
|
164
|
+
<Pressable testID="invite-teammates">
|
|
165
|
+
<Text>Invite teammates</Text>
|
|
166
|
+
</Pressable>
|
|
167
|
+
</ScrollView>
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
You can also replace scroll behavior entirely with
|
|
173
|
+
`Userflow.setCustomScrollIntoView(fn)`, or reserve space for sticky chrome with
|
|
174
|
+
`Userflow.setScrollPadding({ top, bottom, left, right })` — both mirror the web
|
|
175
|
+
SDK.
|
|
176
|
+
|
|
177
|
+
Screen tracking ≠ scroll registration. Only `ScrollView`s you pass through this
|
|
178
|
+
hook participate in the registry override path.
|
|
179
|
+
|
|
180
|
+
## Backdrop interaction
|
|
181
|
+
|
|
182
|
+
When a tooltip step has `backdrop: true` and `tooltipTargetBlocked: false`, the
|
|
183
|
+
dimmed cutout is **visual only** (`pointerEvents="none"` on the four bands).
|
|
184
|
+
Touches reach the app underneath, so the host screen stays scrollable and
|
|
185
|
+
tappable — React Native cannot block taps while allowing scroll the way web's
|
|
186
|
+
`mousedown`-only swallow does.
|
|
187
|
+
|
|
188
|
+
When `tooltipTargetBlocked: true`, a transparent capture layer covers **only
|
|
189
|
+
the highlight hole** so the target cannot be pressed. The rest of the app stays
|
|
190
|
+
tappable and scrollable (dim bands remain `pointerEvents="none"`). Modal steps
|
|
191
|
+
are unchanged and remain blocking.
|
|
192
|
+
|
|
193
|
+
## When target element is clicked
|
|
194
|
+
|
|
195
|
+
Builder “When target element is clicked” maps to the step’s `actions` list (same
|
|
196
|
+
as web). While a tooltip target is measured, `actions` is non-empty, and
|
|
197
|
+
`tooltipTargetBlocked` is false, the SDK observes taps on the **measured target
|
|
198
|
+
rect** via a pass-through bridge around app content (`TargetPressBridge` in
|
|
199
|
+
`UserflowProvider`).
|
|
200
|
+
|
|
201
|
+
- The app control still receives the press (no overlay hole `Pressable`).
|
|
202
|
+
- A tap that starts and ends inside the target within a small movement slop
|
|
203
|
+
runs `engine.handleActions(step.actions)` — typically `GO_TO_STEP` / close /
|
|
204
|
+
navigate, same executor as tooltip buttons.
|
|
205
|
+
- Empty `actions`, blocked targets, missing/fallback UI, and scrolls that exceed
|
|
206
|
+
the slop do not fire.
|
|
207
|
+
|
|
208
|
+
ELEMENT condition `CLICK` / `MOUSEDOWN` gating is separate and still unsupported
|
|
209
|
+
— see [client-conditions.md](client-conditions.md) / [troubleshooting.md](troubleshooting.md).
|
|
210
|
+
|
|
211
|
+
## Missing-target behavior
|
|
212
|
+
|
|
213
|
+
When a tooltip cannot resolve / measure its target:
|
|
214
|
+
|
|
215
|
+
1. **Before first measure** — renders nothing (blank overlay).
|
|
216
|
+
2. **Waiting** — centered “Looking for target…” spinner.
|
|
217
|
+
3. **After** `theme.tooltipMissingToleranceSeconds` (default **5s**) — the
|
|
218
|
+
theme’s `tooltipMissingBehavior` applies:
|
|
219
|
+
|
|
220
|
+
| Behavior | After tolerance |
|
|
221
|
+
| ---------------- | ------------------------------------------------------------------------------ |
|
|
222
|
+
| `FLAG` (default) | Centered “Target not found” card; keeps remeasuring slowly for recovery |
|
|
223
|
+
| `ERROR` | Same missing UI as `FLAG` |
|
|
224
|
+
| `BUBBLE` | Centered card with normal step content (modal-like fallback) |
|
|
225
|
+
| `END` | Hides the flow UI (`null`); in draft/preview mode shows the missing UI instead |
|
|
226
|
+
|
|
227
|
+
Ambiguous ids, missing hosts, and zero-width/height measures all count as
|
|
228
|
+
missing.
|
|
229
|
+
|
|
230
|
+
## ELEMENT client conditions
|
|
231
|
+
|
|
232
|
+
For `PRESENT` / `NOT_PRESENT` on a MANUAL selector, the evaluator resolves the
|
|
233
|
+
same id through `resolveAnchorHost` (registry + fiber scan). A found host means
|
|
234
|
+
the anchor is uniquely resolvable on a **visible** navigator screen — covered
|
|
235
|
+
stack screens count as absent. Pixel visibility inside a scroll view is not
|
|
236
|
+
checked. Ambiguous ids report unknown (`null`) so gated flows stay blocked.
|
|
237
|
+
Unsupported states (`CLICK`, `DISABLED`, …) and `AUTO` selectors stay unknown —
|
|
238
|
+
see [troubleshooting.md](troubleshooting.md).
|
|
239
|
+
|
|
240
|
+
## How the fiber scan works (brief)
|
|
241
|
+
|
|
242
|
+
`UserflowProvider` wraps the app in a class-component scan root that exposes its
|
|
243
|
+
production `_reactInternals` fiber. When a MANUAL selector is not in the
|
|
244
|
+
explicit registry, the SDK walks that subtree (bounded DFS, skipping covered
|
|
245
|
+
screens), matches the id on `memoizedProps`, and measures the host via a
|
|
246
|
+
feature-detected
|
|
247
|
+
`measureInWindow` chain (Paper host method, Fabric
|
|
248
|
+
`nativeFabricUIManager`, then `UIManager` by tag). Accessors never throw — an RN
|
|
249
|
+
internals rename degrades to not-found rather than crashing the host app.
|
|
250
|
+
|
|
251
|
+
The walk is capped so a dense tree cannot stall the JS thread. Hitting the cap
|
|
252
|
+
warns (every time in `__DEV__`, once per process in production) and otherwise
|
|
253
|
+
looks like a missing anchor — prefer
|
|
254
|
+
[`useUserflowAnchor`](#override-useuserflowanchor) for targets the scan cannot
|
|
255
|
+
reach.
|
|
256
|
+
|
|
257
|
+
The Userflow overlay is a _sibling_ of the scan root, so SDK-owned `testID`s
|
|
258
|
+
(`userflow-tooltip-surface`, …) cannot self-match.
|
|
259
|
+
|
|
260
|
+
## See also
|
|
261
|
+
|
|
262
|
+
- [troubleshooting.md](troubleshooting.md) — “flow never appeared” checklist
|
|
263
|
+
- [theme-mapping.md](theme-mapping.md) — chrome tokens that affect tooltip UI
|
|
264
|
+
- Repo `docs/client-conditions.md` (monorepo only) — track / toggle protocol internals
|