@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
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
# Deep linking (builder preview & pairing)
|
|
2
|
+
|
|
3
|
+
The React Native SDK can open a draft flow when the host app receives a Userflow
|
|
4
|
+
preview deep link (typically from a QR code in the builder), and can keep a
|
|
5
|
+
**Builder pairing** websocket session open so repeated Previews land on the same
|
|
6
|
+
device without rescanning.
|
|
7
|
+
|
|
8
|
+
Session auth is unchanged: `clientToken` + `identify` / `identifyAnonymous`. The
|
|
9
|
+
deep link only carries a short-lived preview or pairing credential — it does not
|
|
10
|
+
pick the environment.
|
|
11
|
+
|
|
12
|
+
## URL formats
|
|
13
|
+
|
|
14
|
+
### One-shot preview
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
{schemeId}://?token={startFlowToken}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Example:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
userflow-257587://?token=SFMyNTY...
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- `{schemeId}` is your environment's `scheme_id` from the dashboard — a full
|
|
27
|
+
scheme of the form `userflow-` followed by **digits** (not the env UUID). This
|
|
28
|
+
is the **only** scheme you register; the same one also carries pairing links.
|
|
29
|
+
The SDK never parses an environment out of the URL — `clientToken` passed to
|
|
30
|
+
`init` is what identifies the environment.
|
|
31
|
+
- `{startFlowToken}` is a short-lived token minted by the builder
|
|
32
|
+
(`prepareDraftFlow`).
|
|
33
|
+
|
|
34
|
+
The SDK matches inbound URLs by **scheme prefix** (`userflow-`) and a root query
|
|
35
|
+
(`?token=…`). There is no `urlScheme` option on `Userflow.init()`. Register your
|
|
36
|
+
`scheme_id` at build time so the OS routes the builder QR into your app. A root
|
|
37
|
+
URL carrying `pairing_token` instead of `token` is treated as pairing, not
|
|
38
|
+
preview.
|
|
39
|
+
|
|
40
|
+
### Builder pairing
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
{schemeId}://?pairing_token={pairingJwt}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The builder QR usually points at `https://<api-host>/pair/<jwt>`; the backend
|
|
47
|
+
redirects that to the scheme form the SDK parses. Pairing requires the
|
|
48
|
+
`scheme_id` shape specifically (`userflow-` + digits) — an arbitrary
|
|
49
|
+
`userflow-*` scheme can match preview links but **not** pairing ones.
|
|
50
|
+
|
|
51
|
+
## Expo Router hosts
|
|
52
|
+
|
|
53
|
+
No extra host files are required for Builder pairing or preview.
|
|
54
|
+
|
|
55
|
+
The builder QR redirects to `{schemeId}://?pairing_token=…`. Expo Router treats
|
|
56
|
+
that as `/`, which every app already has, so there is no **Unmatched Route**
|
|
57
|
+
screen. The SDK still consumes the URL through React Native `Linking` after
|
|
58
|
+
`Userflow.init()`. Preview tokens travel over the pairing websocket after
|
|
59
|
+
connect — there is no separate preview path URL from the builder.
|
|
60
|
+
|
|
61
|
+
Bare React Native / React Navigation apps need nothing beyond scheme
|
|
62
|
+
registration either.
|
|
63
|
+
|
|
64
|
+
## 1. Register the scheme at build time
|
|
65
|
+
|
|
66
|
+
### Expo
|
|
67
|
+
|
|
68
|
+
If you are using `app.config.js`:
|
|
69
|
+
|
|
70
|
+
```js
|
|
71
|
+
// app.config.js
|
|
72
|
+
module.exports = {
|
|
73
|
+
expo: {
|
|
74
|
+
plugins: [['@userflow-tech/expo', { schemeId: 'userflow-257587' }]],
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If you are using `app.json`:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
// app.json
|
|
83
|
+
{
|
|
84
|
+
"expo": {
|
|
85
|
+
"plugins": [["@userflow-tech/expo", { "schemeId": "userflow-257587" }]]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Then **rebuild native projects** (`npx expo prebuild` and a new development
|
|
91
|
+
client, or `npx expo run:ios` / `run:android`). A Metro reload alone does **not**
|
|
92
|
+
register the URL scheme. Expo Go is not supported.
|
|
93
|
+
|
|
94
|
+
### Bare React Native
|
|
95
|
+
|
|
96
|
+
**iOS** — add a URL type in `Info.plist`:
|
|
97
|
+
|
|
98
|
+
```xml
|
|
99
|
+
<key>CFBundleURLTypes</key>
|
|
100
|
+
<array>
|
|
101
|
+
<dict>
|
|
102
|
+
<key>CFBundleURLSchemes</key>
|
|
103
|
+
<array>
|
|
104
|
+
<string>userflow-257587</string>
|
|
105
|
+
</array>
|
|
106
|
+
</dict>
|
|
107
|
+
</array>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Android** — add an intent filter on your main activity in `AndroidManifest.xml`:
|
|
111
|
+
|
|
112
|
+
```xml
|
|
113
|
+
<intent-filter>
|
|
114
|
+
<action android:name="android.intent.action.VIEW" />
|
|
115
|
+
<category android:name="android.intent.category.DEFAULT" />
|
|
116
|
+
<category android:name="android.intent.category.BROWSABLE" />
|
|
117
|
+
<data android:scheme="userflow-257587" />
|
|
118
|
+
</intent-filter>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Rebuild the native app after changing these files.
|
|
122
|
+
|
|
123
|
+
## 2. Initialize the SDK
|
|
124
|
+
|
|
125
|
+
```ts
|
|
126
|
+
await Userflow.init({
|
|
127
|
+
clientToken: 'ct_...',
|
|
128
|
+
// Defaults to production. Override for staging / local stacks:
|
|
129
|
+
// serverEndpoint: 'http://localhost:40401',
|
|
130
|
+
// pairingEndpoint: 'http://localhost:40401',
|
|
131
|
+
});
|
|
132
|
+
await Userflow.identify(userId); // or identifyAnonymous()
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Wrap the tree in `UserflowProvider`. It mounts a **Preview mode** banner while
|
|
136
|
+
a pairing session is active — that banner is the success signal that this
|
|
137
|
+
device is the one the builder will preview into.
|
|
138
|
+
|
|
139
|
+
`Userflow.init()` attaches the inbound-URL listeners (React Native `Linking`)
|
|
140
|
+
**before** it validates credentials, so a link that arrives while init is still
|
|
141
|
+
in flight is held rather than dropped, then applied once init resolves. If a
|
|
142
|
+
preview link arrives before identify, the token is buffered and sent as
|
|
143
|
+
`StartFlowWithToken` once a user is identified. Pairing websocket paths are
|
|
144
|
+
available in all builds (including release).
|
|
145
|
+
|
|
146
|
+
### When `init()` fails
|
|
147
|
+
|
|
148
|
+
Pairing needs a live end-user session, so a failed `init()` means a scanned QR
|
|
149
|
+
code cannot connect. This is worth calling out because the failure is easy to
|
|
150
|
+
misread: the URL scheme is registered in the **native** project at build time,
|
|
151
|
+
so the OS still launches your app from the QR code — it just arrives in an app
|
|
152
|
+
with no session to preview into.
|
|
153
|
+
|
|
154
|
+
The SDK does not fail silently here. It logs an actionable reason:
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
[Userflow] Builder pairing link received, but Userflow.init() failed so pairing
|
|
158
|
+
cannot start: invalid_client_token: … Fix the init error — most often an invalid
|
|
159
|
+
clientToken or an unreachable serverEndpoint — then re-open the pairing link.
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
and `UserflowProvider` renders a **Preview unavailable** banner carrying the
|
|
163
|
+
same reason. If you see the app open with no banner at all, check that your
|
|
164
|
+
`init()` call is actually resolving — host apps commonly swallow it:
|
|
165
|
+
|
|
166
|
+
```ts
|
|
167
|
+
// Don't hide the failure that explains why pairing never starts.
|
|
168
|
+
Userflow.init({ clientToken: 'ct_...' }).catch((error) => {
|
|
169
|
+
console.warn('[app] Userflow init failed', error);
|
|
170
|
+
});
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Other pairing links the SDK reports rather than dropping: one whose scheme is
|
|
174
|
+
not a valid `scheme_id` (`userflow-` followed by digits), one **opened with your
|
|
175
|
+
app's own scheme** instead of the `scheme_id`, one with no `pairing_token`, and a
|
|
176
|
+
session that fails to connect because the token expired or the device is already
|
|
177
|
+
paired.
|
|
178
|
+
|
|
179
|
+
That third case is worth spelling out, because it does not look like a Userflow
|
|
180
|
+
problem. Substituting your app's scheme — `myapp://?pairing_token=…` instead of
|
|
181
|
+
`userflow-257587://?pairing_token=…` — still launches the app, since your own
|
|
182
|
+
scheme is registered, but the SDK rejects it as a foreign scheme (logged +
|
|
183
|
+
**Preview unavailable** banner when recognisable). Use the `scheme_id` exactly
|
|
184
|
+
as the QR code provides it.
|
|
185
|
+
|
|
186
|
+
Reporting is limited to URLs the SDK can recognise as pairing attempts, so your
|
|
187
|
+
own deep links stay quiet — as do preview links, which accept any `userflow-*`
|
|
188
|
+
scheme and so cannot be judged on scheme shape. A foreign scheme is only claimed
|
|
189
|
+
when the URL is the root form with a `pairing_token` parameter. Pairing tokens
|
|
190
|
+
are redacted from anything the SDK logs.
|
|
191
|
+
|
|
192
|
+
A pairing failure never fails `Userflow.init()`. If the QR token has expired,
|
|
193
|
+
`init()` still resolves and the app runs normally, with the reason logged and
|
|
194
|
+
shown in the banner.
|
|
195
|
+
|
|
196
|
+
Optional: install `expo-secure-store` so the pairing JWT can persist in
|
|
197
|
+
Keychain/Keystore for the duration of the session
|
|
198
|
+
(`npx expo install expo-secure-store`).
|
|
199
|
+
|
|
200
|
+
### Host apps that already own Linking
|
|
201
|
+
|
|
202
|
+
```ts
|
|
203
|
+
import { Linking } from 'react-native';
|
|
204
|
+
import { Userflow } from '@userflow-tech/react-native';
|
|
205
|
+
|
|
206
|
+
Linking.addEventListener('url', async ({ url }) => {
|
|
207
|
+
// Preview tokens
|
|
208
|
+
if (await Userflow.didHandleURL(url)) return;
|
|
209
|
+
// Builder pairing
|
|
210
|
+
if (await Userflow.handlePairingUrl(url)) return;
|
|
211
|
+
// handle your own deep links
|
|
212
|
+
});
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
`didHandleURL` returns `true` only for Userflow preview URLs.
|
|
216
|
+
`handlePairingUrl` returns `true` only for pairing URLs. Both are safe alongside
|
|
217
|
+
the SDK auto-listener.
|
|
218
|
+
|
|
219
|
+
`handlePairingUrl` returns `true` as soon as it recognises a pairing link — the
|
|
220
|
+
URL belongs to Userflow, so stop routing it — even when connecting is deferred
|
|
221
|
+
until `init()` resolves. It returns `false` for links that are not Userflow's,
|
|
222
|
+
so your own routing still runs. To classify a URL without consuming it, use
|
|
223
|
+
`inspectPairingDeepLink(url)`, which reports why a URL was rejected
|
|
224
|
+
(`not-userflow`, `foreign-scheme`, `bad-scheme-shape`, `unparseable`,
|
|
225
|
+
`not-pair-path`, `missing-token`). `isPairingAttempt(reason)` narrows that to the
|
|
226
|
+
rejections worth reporting — the ones where the URL was a recognisable pairing
|
|
227
|
+
attempt that could not be used.
|
|
228
|
+
|
|
229
|
+
Call `Userflow.exitPreview()` (or the banner's Exit control) to disconnect the
|
|
230
|
+
pairing websocket.
|
|
231
|
+
|
|
232
|
+
## 3. Verify
|
|
233
|
+
|
|
234
|
+
```sh
|
|
235
|
+
# iOS
|
|
236
|
+
npx uri-scheme open "userflow-257587://?token=TEST" --ios
|
|
237
|
+
|
|
238
|
+
# Android
|
|
239
|
+
npx uri-scheme open "userflow-257587://?token=TEST" --android
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Use a real token from the builder when testing end-to-end. For the full
|
|
243
|
+
pair-then-preview loop:
|
|
244
|
+
|
|
245
|
+
1. Open Preview in the builder → **Pair a device** → scan/open the QR.
|
|
246
|
+
2. Confirm the app shows the **Preview mode** banner.
|
|
247
|
+
3. Hit **Preview** in the builder — the draft flow should appear on that device.
|
|
248
|
+
|
|
249
|
+
The builder offers two preview modes. Previewing directly starts the draft flow
|
|
250
|
+
immediately, skipping its start conditions. Previewing **when auto start
|
|
251
|
+
conditions are triggered** instead leaves the server waiting for the flow's
|
|
252
|
+
conditions to match, so nothing appears until they do — the banner reads
|
|
253
|
+
**Waiting for auto-start condition to trigger…** meanwhile. A flow that never
|
|
254
|
+
shows up in that mode points at the condition, not at pairing.
|
|
255
|
+
|
|
256
|
+
## Local / staging endpoints
|
|
257
|
+
|
|
258
|
+
Defaults target production (`https://e.userflow.com` for the end-user socket;
|
|
259
|
+
pairing defaults to the US-pinned production host). When pointing at a local or
|
|
260
|
+
staging stack, set both:
|
|
261
|
+
|
|
262
|
+
```ts
|
|
263
|
+
await Userflow.init({
|
|
264
|
+
clientToken: 'ct_...',
|
|
265
|
+
serverEndpoint: 'http://localhost:40401',
|
|
266
|
+
pairingEndpoint: 'http://localhost:40401',
|
|
267
|
+
});
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
See [troubleshooting.md](troubleshooting.md#builder-preview--pairing) for common
|
|
271
|
+
pairing failures.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Identity verification
|
|
2
|
+
|
|
3
|
+
How to compute the `signature` option for `Userflow.identify` and
|
|
4
|
+
`Userflow.group`.
|
|
5
|
+
|
|
6
|
+
The React Native SDK mirrors the web SDK: the signature is an **HMAC-SHA256 of
|
|
7
|
+
the external id**, computed on **your backend** with the environment’s **secret
|
|
8
|
+
key**. Never embed the secret key in the mobile app.
|
|
9
|
+
|
|
10
|
+
## Keys
|
|
11
|
+
|
|
12
|
+
| Key | Prefix | Where it goes |
|
|
13
|
+
| ------------ | --------- | ------------------------------------------- |
|
|
14
|
+
| Client token | `ct_...` | `Userflow.init({ clientToken })` in the app |
|
|
15
|
+
| Secret key | `esk_...` | Your backend only (HMAC signing) |
|
|
16
|
+
|
|
17
|
+
Find both under **Userflow dashboard → Settings → Environments**.
|
|
18
|
+
|
|
19
|
+
## Algorithm
|
|
20
|
+
|
|
21
|
+
The Userflow backend verifies:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
HMAC-SHA256(secret_key, userId_or_groupId) → lowercase hex
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Equivalent Node.js:
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
const crypto = require('crypto');
|
|
31
|
+
|
|
32
|
+
function signExternalId(id, secretKey) {
|
|
33
|
+
return crypto.createHmac('sha256', secretKey).update(String(id)).digest('hex');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Example Express handler — never call this from the mobile app:
|
|
37
|
+
app.get('/userflow/signature', requireAuth, (req, res) => {
|
|
38
|
+
const userId = req.user.id; // same string you will pass to Userflow.identify
|
|
39
|
+
const signature = signExternalId(userId, process.env.USERFLOW_SECRET_KEY);
|
|
40
|
+
res.json({ userId, signature });
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Uppercase hex is accepted by the server (it lowercases before compare), but
|
|
45
|
+
prefer lowercase.
|
|
46
|
+
|
|
47
|
+
## App usage
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { Userflow } from '@userflow-tech/react-native';
|
|
51
|
+
|
|
52
|
+
await Userflow.init({ clientToken: 'ct_...' });
|
|
53
|
+
|
|
54
|
+
const { signature } = await yourApi.fetchUserflowSignature();
|
|
55
|
+
await Userflow.identify('user-123', { name: 'Ada' }, { signature });
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
For groups:
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
await Userflow.group(
|
|
62
|
+
'org-9',
|
|
63
|
+
{ name: 'Acme' },
|
|
64
|
+
{
|
|
65
|
+
signature: groupSignature, // HMAC of the group id
|
|
66
|
+
membership: { role: 'admin' },
|
|
67
|
+
},
|
|
68
|
+
);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## When is it required?
|
|
72
|
+
|
|
73
|
+
- **Client type:** `signature` is always optional.
|
|
74
|
+
- **Server:** if the environment has identity verification enabled
|
|
75
|
+
(`signature_required`), joins without a signature fail with
|
|
76
|
+
`user_signature_required`, and wrong signatures fail with
|
|
77
|
+
`incorrect_user_signature` (same pattern for groups).
|
|
78
|
+
|
|
79
|
+
Anonymous credential validation during `init()` can succeed even when
|
|
80
|
+
signatures are required for real users — identity verification is enforced on
|
|
81
|
+
the identified end-user channel join, not on the anonymous probe.
|
|
82
|
+
|
|
83
|
+
## Common mistakes
|
|
84
|
+
|
|
85
|
+
| Mistake | Result |
|
|
86
|
+
| ------------------------------------------------- | --------------------------------- |
|
|
87
|
+
| Signing with the client token (`ct_...`) | `incorrect_user_signature` |
|
|
88
|
+
| Signing a different string than the `identify` id | `incorrect_user_signature` |
|
|
89
|
+
| Computing HMAC in the app / shipping `esk_...` | Security incident; rotate the key |
|
|
90
|
+
| Omitting signature when the env requires it | `user_signature_required` |
|
|
91
|
+
|
|
92
|
+
## See also
|
|
93
|
+
|
|
94
|
+
- [troubleshooting.md](troubleshooting.md) — exact error strings
|
|
95
|
+
- Web docs: https://userflow.com/docs/dev/identity-verification
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Theme mapping (web → React Native)
|
|
2
|
+
|
|
3
|
+
Phase 3 maps Userflow web theme tokens onto React Native styles used by flow chrome.
|
|
4
|
+
This is an interim visual baseline aligned with the mobile tooltip/modal design specs.
|
|
5
|
+
|
|
6
|
+
## Card chrome — `resolveBubbleChrome`
|
|
7
|
+
|
|
8
|
+
Source: `src/surfaces/themeChrome.ts`
|
|
9
|
+
|
|
10
|
+
| Web / theme token | RN usage |
|
|
11
|
+
| ----------------------------------------- | ---------------------------------------------------------------- |
|
|
12
|
+
| `backgroundColor` | Card `backgroundColor` |
|
|
13
|
+
| `bubbleBorderRadius` (default `10`) | Card `borderRadius` |
|
|
14
|
+
| `bubbleBorderWidth` / `bubbleBorderColor` | Card border |
|
|
15
|
+
| `tooltipNotchSize` (default `10`) | Tooltip notch size; `0` hides notch |
|
|
16
|
+
| Modal content padding | `40` (web modal) |
|
|
17
|
+
| Tooltip / bubble content padding | `24` (web tooltip) |
|
|
18
|
+
| Shadow | Approximate dual drop-shadow via `shadow*` + Android `elevation` |
|
|
19
|
+
|
|
20
|
+
Modal cards use `overflow: 'hidden'` so the progress bar clips to the radius.
|
|
21
|
+
Tooltip cards use `overflow: 'visible'` so the notch is not clipped.
|
|
22
|
+
|
|
23
|
+
## Progress — `ProgressBar`
|
|
24
|
+
|
|
25
|
+
| Theme token | RN usage |
|
|
26
|
+
| ---------------------------------------- | ------------------------------------------------- |
|
|
27
|
+
| `progressBarEnabled` | Show / hide |
|
|
28
|
+
| `progressBarPosition` (`TOP` / `BOTTOM`) | Placement flush on the card edge |
|
|
29
|
+
| `progressBarType` | `DEFAULT` fraction bar; `NUMBERED` shows `1 of N` |
|
|
30
|
+
| Step `progress` + step index | Fraction via `resolveStepProgress` |
|
|
31
|
+
|
|
32
|
+
## Buttons — `StepButton`
|
|
33
|
+
|
|
34
|
+
| Theme token | RN usage |
|
|
35
|
+
| ------------------------------- | ---------------------------- |
|
|
36
|
+
| `defaultButtonBackgroundColor` | Primary button fill |
|
|
37
|
+
| `defaultButtonFontColor` | Primary button label |
|
|
38
|
+
| Button fragment colors when set | Override defaults per button |
|
|
39
|
+
|
|
40
|
+
## Backdrop & cutout
|
|
41
|
+
|
|
42
|
+
| Theme token | RN usage |
|
|
43
|
+
| ------------------------------------------------------------ | ----------------------------------------------- |
|
|
44
|
+
| `backdropColor` | Modal full-screen backdrop; tooltip cutout fill |
|
|
45
|
+
| `backdropOpacity` | Parsed float (`parseBackdropOpacity`) |
|
|
46
|
+
| `modalBackdropOnclick` | `DISMISS` → tap backdrop ends flow |
|
|
47
|
+
| Step `backdrop` / `backdropPadding` / `tooltipTargetBlocked` | Tooltip cutout hole + blocking |
|
|
48
|
+
|
|
49
|
+
## Typography
|
|
50
|
+
|
|
51
|
+
| Theme token | RN usage |
|
|
52
|
+
| ------------ | ----------------------------------- |
|
|
53
|
+
| `fontColor` | Body / heading / close affordance |
|
|
54
|
+
| `fontSize` | Base body size |
|
|
55
|
+
| `fontFamily` | Applied where Text styles accept it |
|
|
56
|
+
|
|
57
|
+
## Quote / code-block — TreeDoc chrome
|
|
58
|
+
|
|
59
|
+
Source of truth: web `userflowjs/styles/bubble-frame.styl` in the main Userflow
|
|
60
|
+
web repo (blockquote / `code` / `pre > code`) and TreeDoc markup
|
|
61
|
+
(`blockquote`, `pre > code`). Spacing tokens from web `$padding-*` assume
|
|
62
|
+
**1rem = 16px**.
|
|
63
|
+
|
|
64
|
+
Implementation: `src/content/RichContentRenderer.tsx` + `src/content/themeColor.ts`.
|
|
65
|
+
|
|
66
|
+
| Token | rem | RN px |
|
|
67
|
+
| ------------- | ----- | ----- |
|
|
68
|
+
| `$padding-2` | 0.125 | 2 |
|
|
69
|
+
| `$padding-4` | 0.25 | 4 |
|
|
70
|
+
| `$padding-8` | 0.5 | 8 |
|
|
71
|
+
| `$padding-16` | 1 | 16 |
|
|
72
|
+
|
|
73
|
+
Root content uses `gap: 8` (`ROOT_CONTENT_GAP`). Quote/code add
|
|
74
|
+
`marginBottom: 8` when not last so gap + margin ≈ web’s 16px block spacing.
|
|
75
|
+
|
|
76
|
+
### Quote (`blockquote`)
|
|
77
|
+
|
|
78
|
+
| Web rule | RN |
|
|
79
|
+
| ----------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
80
|
+
| `border-inline-start: 2px solid rgba(fg, 0.15)` | `borderStartWidth: 2`, `borderStartColor` via `foregroundAlpha(fontColor, 0.15)` |
|
|
81
|
+
| `padding: $padding-4 $padding-16` | `paddingVertical: 4`, `paddingHorizontal: 16` |
|
|
82
|
+
| `margin-bottom: $padding-16` when not last | `marginBottom: 8` (+ root gap 8); last painted sibling: 0 |
|
|
83
|
+
| `min-height: var(--userflow-line-height, 24px)` | `minHeight: 24` |
|
|
84
|
+
| Not italic by default | No forced `fontStyle: 'italic'` |
|
|
85
|
+
|
|
86
|
+
### Code-block (`pre > code`) and inline `code` mark
|
|
87
|
+
|
|
88
|
+
| Web rule | RN |
|
|
89
|
+
| -------------------------------------------------------------------------- | ------------------------------------------------------------------ |
|
|
90
|
+
| Mono stack (`SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace`) | iOS `Menlo`, Android `monospace` |
|
|
91
|
+
| `font-size: calc(font-size * 0.875)` | `fontSize * 0.875` |
|
|
92
|
+
| `background: rgba(fg, 0.05)` | `foregroundAlpha(fontColor, 0.05)` (hex / rgb / rgba) |
|
|
93
|
+
| `border-radius: calc(font-size * 0.25)` | `fontSize * 0.25` |
|
|
94
|
+
| `pre > code` padding `$padding-8` | `padding: 8` + horizontal `ScrollView` (`nestedScrollEnabled`) |
|
|
95
|
+
| Inline `code` padding `$padding-2 $padding-4` | View chrome wrapper + `paddingVertical: 2`, `paddingHorizontal: 4` |
|
|
96
|
+
|
|
97
|
+
## Safe area
|
|
98
|
+
|
|
99
|
+
Surfaces pad with `useUserflowSafeAreaInsets` (optional peer
|
|
100
|
+
`react-native-safe-area-context`, zero fallback) so cards clear Dynamic Island /
|
|
101
|
+
home indicator regions on notched devices.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Symptom → cause for common `@userflow-tech/react-native` integration failures.
|
|
4
|
+
Messages are quoted exactly so you can search logs for them.
|
|
5
|
+
|
|
6
|
+
## Init / identify / group
|
|
7
|
+
|
|
8
|
+
| Symptom / log message | Likely cause | Fix |
|
|
9
|
+
| --------------------------------------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
|
10
|
+
| `Call Userflow.init() before identify()` | `identify` / `identifyAnonymous` before `init()` resolved | `await Userflow.init(...)` first |
|
|
11
|
+
| `Call Userflow.init() before group()` | `group` before init | Same |
|
|
12
|
+
| `Call Userflow.identify() before group()` | `group` before any identify | Call `identify` or `identifyAnonymous` first |
|
|
13
|
+
| `Missing clientToken` | Empty / whitespace token | Pass the `ct_...` value from the dashboard |
|
|
14
|
+
| `… invalid_client_token: Invalid Userflow.js Token: …` | Wrong token, wrong region, or deactivated env | Copy the token from the matching environment; EU tokens may need an EU `serverEndpoint` |
|
|
15
|
+
| `… user_signature_required: …` | Env requires identity verification; no `signature` | Compute HMAC on your backend — [identity-verification.md](identity-verification.md) |
|
|
16
|
+
| `… incorrect_user_signature: …` | Signature does not match HMAC-SHA256(secret, userId) | Sign the **same** id string; use `esk_...`, not `ct_...` |
|
|
17
|
+
| `… group_signature_required` / `incorrect_group_signature` | Same rules for `group()` | Sign the group id with the env secret key |
|
|
18
|
+
| `Client message rate limit exceeded (100/min)` | Too many client messages in a 60s window | Reduce chatter; wait for the window to refill |
|
|
19
|
+
| `Userflow.identifyAnonymous() is not supported when persistent storage is unavailable.` | AsyncStorage threw at runtime | Ensure `@react-native-async-storage/async-storage` is installed and linked |
|
|
20
|
+
| Module resolution failure for AsyncStorage | Required peer missing | `npx expo install @react-native-async-storage/async-storage` |
|
|
21
|
+
| Second `init()` seems to ignore new options | `init()` is idempotent | Expected; use a fresh process or `reset()` carefully |
|
|
22
|
+
|
|
23
|
+
## Flow never appeared
|
|
24
|
+
|
|
25
|
+
Check **device logs first** (`__DEV__` warnings), then the checklist below.
|
|
26
|
+
|
|
27
|
+
### 1. Unsupported client condition (silent)
|
|
28
|
+
|
|
29
|
+
A flow gated on a condition the SDK cannot evaluate stays `isTrue: null`. The
|
|
30
|
+
server treats **unknown exactly like false**, so the flow **never starts** and
|
|
31
|
+
nothing throws.
|
|
32
|
+
|
|
33
|
+
Look for warnings such as:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
[Userflow] ELEMENT condition … uses an AUTO (codeless) selector; …
|
|
37
|
+
[Userflow] ELEMENT condition … uses unsupported elementState "CLICK" …
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or a core warning that a condition type has no evaluator (`INPUT_VALUE`,
|
|
41
|
+
`FILLED_IN_INPUT`, …).
|
|
42
|
+
|
|
43
|
+
**Workaround:** author the start condition with a **MANUAL** selector and
|
|
44
|
+
`PRESENT` / `NOT_PRESENT`, and tag the target with matching `testID="…"` (or
|
|
45
|
+
`useUserflowAnchor('…')`). See [anchoring.md](anchoring.md).
|
|
46
|
+
|
|
47
|
+
### 2. Anchor / tooltip placement
|
|
48
|
+
|
|
49
|
+
| Symptom | Likely cause |
|
|
50
|
+
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| “Looking for target…” then “Target not found” | Wrong id vs dashboard `#css`, no matching `testID`/`nativeID`/`accessibilityLabel` or `useUserflowAnchor`, or zero-size measure |
|
|
52
|
+
| Tooltip never attaches despite a visible element | **Duplicate** id on disjoint views (ambiguous → fail closed) |
|
|
53
|
+
| Off-screen target not scrolled into view | Parent `ScrollView` not registered with `useUserflowScrollContainer` |
|
|
54
|
+
| Flow vanished after a few seconds | Theme `tooltipMissingBehavior: END` after tolerance |
|
|
55
|
+
| Centered card with step content, no notch | Theme `tooltipMissingBehavior: BUBBLE` after missing tolerance |
|
|
56
|
+
|
|
57
|
+
Id matching: dashboard `#invite-teammates` ↔ `testID="invite-teammates"` (or `useUserflowAnchor('invite-teammates')`).
|
|
58
|
+
|
|
59
|
+
### 3. Screen / provider
|
|
60
|
+
|
|
61
|
+
| Symptom | Likely cause |
|
|
62
|
+
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
63
|
+
| No overlay at all | Missing `UserflowProvider` above the tree |
|
|
64
|
+
| Wrong screen / flow never qualifies | Screen not reported — Expo Router needs `UserflowExpoRouterScreenTracker` under the provider; React Navigation needs `WithUserflowReactNavigation`; or call `updateScreen` / `useUserflowScreen` |
|
|
65
|
+
| Works only after identify | Expected for server-driven sessions; `updateScreen` before identify only buffers |
|
|
66
|
+
|
|
67
|
+
### 4. Connection
|
|
68
|
+
|
|
69
|
+
| Symptom | Likely cause |
|
|
70
|
+
| --------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
71
|
+
| `WebSocket connection timed out` / `failed` | Bad `serverEndpoint`, network, or VPN |
|
|
72
|
+
| `invalid_message` on channel join / `UpdateClientContext` | ClientContext missing required `pageUrl`, or sending legacy `path`/`screen` | SDK must send `pageUrl: ""` plus `screenPath` / `screenName` (not `path` / `screen`) |
|
|
73
|
+
| Long recovery after Wi-Fi ↔ cellular while foregrounded | Install optional `@react-native-community/netinfo` for instant probe |
|
|
74
|
+
| Session cleared after returning from background | Away ≥ `SESSION_STALE_AFTER_BACKGROUND_MS` (5 minutes) — by design |
|
|
75
|
+
|
|
76
|
+
## Builder preview / pairing
|
|
77
|
+
|
|
78
|
+
Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all builds (including release).
|
|
79
|
+
|
|
80
|
+
| Symptom | Likely cause | Fix |
|
|
81
|
+
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
82
|
+
| Deep link opens the app but nothing happens | Scheme added in config but **no native rebuild** | `npx expo prebuild` / new development client; Metro reload is not enough |
|
|
83
|
+
| Deep link opens the app but nothing happens, and no **Preview mode** banner appears | `Userflow.init()` rejected, so there is no session to preview into | Check the logs for `[Userflow] Builder pairing link received, but Userflow.init() failed` — fix that error (usually `clientToken` or `serverEndpoint`) and re-open the link |
|
|
84
|
+
| Deep link opens the app and the router shows **Unmatched Route** / "page could not be found" | Deep link is not the root form from the QR; **or** the link was rebuilt with the app's own scheme instead of `scheme_id` | Open the QR unmodified (`userflow-<digits>://?pairing_token=…`). If the log says `a scheme Userflow does not own`, do not substitute your app scheme |
|
|
85
|
+
| Pairing deep link ignored (preview URL may still work) | Scheme is `userflow-*` but not `userflow-` + **digits** | Use the env's `scheme_id` from the dashboard (e.g. `userflow-257587`), not the env UUID |
|
|
86
|
+
| Builder says “A device was paired earlier…” and Preview closes immediately after a brief spinner | Stale pairing session still present; a ghost device acks | Pair again on the device you are watching, or clear the env's pairing session and re-QR |
|
|
87
|
+
| Preview succeeds on the server but the phone stays idle | App is not the paired instance (no **Preview mode** banner) | Confirm the banner before hitting Preview; re-open the pairing QR on this install |
|
|
88
|
+
| Pairing never connects against a local stack | `pairingEndpoint` still pointing at production | `Userflow.init({ pairingEndpoint: 'http://localhost:40401', serverEndpoint: '…' })` |
|
|
89
|
+
| QR / `https://…/pair/<jwt>` does nothing in the app | SDK only parses the **scheme** form after the backend redirect | Open via the OS (scan QR) or forward `{schemeId}://?pairing_token=…` with `handlePairingUrl` |
|
|
90
|
+
|
|
91
|
+
## Expo
|
|
92
|
+
|
|
93
|
+
| Symptom | Fix |
|
|
94
|
+
| ----------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
95
|
+
| Crashes or missing native modules in Expo Go | Use a **development build**; Expo Go is not supported |
|
|
96
|
+
| Duplicate React / RN instance crashes when linking local packages | Force singletons in Metro — monorepo `docs/metro.md` |
|
|
97
|
+
| Preview / pairing scheme not registered | Add `@userflow-tech/expo` with `schemeId`, then rebuild native |
|
|
98
|
+
|
|
99
|
+
## Still stuck?
|
|
100
|
+
|
|
101
|
+
1. Confirm `await Userflow.init` → `await Userflow.identify` → `UserflowProvider`.
|
|
102
|
+
2. Search logs for `[Userflow]` and the exact strings in the tables above.
|
|
103
|
+
3. Verify the published flow’s start conditions use MANUAL + PRESENT/NOT_PRESENT
|
|
104
|
+
if they depend on an on-device element.
|
|
105
|
+
4. Confirm the anchor id in code matches the builder selector after stripping `#`.
|
|
106
|
+
5. For builder Preview: confirm the **Preview mode** banner is visible before you
|
|
107
|
+
click Preview in the dashboard.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.anchorRegistry = exports.AnchorRegistry = void 0;
|
|
7
|
+
/** Host view that can be measured in window coordinates. */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Manual-anchor registry for Phase 3 (WS6). Codeless resolution is Phase 4.
|
|
11
|
+
* Multiple mounts of the same id keep a set; {@link get} returns the most
|
|
12
|
+
* recently registered host.
|
|
13
|
+
*/
|
|
14
|
+
class AnchorRegistry {
|
|
15
|
+
anchors = new Map();
|
|
16
|
+
listeners = new Set();
|
|
17
|
+
register(id, host) {
|
|
18
|
+
if (!id) return;
|
|
19
|
+
let set = this.anchors.get(id);
|
|
20
|
+
if (!set) {
|
|
21
|
+
set = new Set();
|
|
22
|
+
this.anchors.set(id, set);
|
|
23
|
+
}
|
|
24
|
+
set.add(host);
|
|
25
|
+
this.emit();
|
|
26
|
+
}
|
|
27
|
+
unregister(id, host) {
|
|
28
|
+
const set = this.anchors.get(id);
|
|
29
|
+
if (!set) return;
|
|
30
|
+
set.delete(host);
|
|
31
|
+
if (set.size === 0) {
|
|
32
|
+
this.anchors.delete(id);
|
|
33
|
+
}
|
|
34
|
+
this.emit();
|
|
35
|
+
}
|
|
36
|
+
get(id) {
|
|
37
|
+
const set = this.anchors.get(id);
|
|
38
|
+
if (!set || set.size === 0) return null;
|
|
39
|
+
let last = null;
|
|
40
|
+
for (const host of set) {
|
|
41
|
+
last = host;
|
|
42
|
+
}
|
|
43
|
+
return last;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** True when more than one host is registered for the same id. */
|
|
47
|
+
isAmbiguous(id) {
|
|
48
|
+
return (this.anchors.get(id)?.size ?? 0) > 1;
|
|
49
|
+
}
|
|
50
|
+
subscribe(listener) {
|
|
51
|
+
this.listeners.add(listener);
|
|
52
|
+
return () => {
|
|
53
|
+
this.listeners.delete(listener);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Test helper — clear all anchors. */
|
|
58
|
+
clear() {
|
|
59
|
+
this.anchors.clear();
|
|
60
|
+
this.emit();
|
|
61
|
+
}
|
|
62
|
+
emit() {
|
|
63
|
+
for (const listener of this.listeners) {
|
|
64
|
+
listener();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** Module singleton used by {@link useUserflowAnchor} and TooltipSurface. */
|
|
70
|
+
exports.AnchorRegistry = AnchorRegistry;
|
|
71
|
+
const anchorRegistry = exports.anchorRegistry = new AnchorRegistry();
|
|
72
|
+
//# sourceMappingURL=AnchorRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AnchorRegistry","anchors","Map","listeners","Set","register","id","host","set","get","add","emit","unregister","delete","size","last","isAmbiguous","subscribe","listener","clear","exports","anchorRegistry"],"sourceRoot":"../../../src","sources":["anchors/AnchorRegistry.ts"],"mappings":";;;;;;AAAA;;AAcA;AACA;AACA;AACA;AACA;AACO,MAAMA,cAAc,CAAC;EACTC,OAAO,GAAG,IAAIC,GAAG,CAA0B,CAAC;EAC5CC,SAAS,GAAG,IAAIC,GAAG,CAAW,CAAC;EAEhDC,QAAQA,CAACC,EAAU,EAAEC,IAAgB,EAAQ;IAC3C,IAAI,CAACD,EAAE,EAAE;IACT,IAAIE,GAAG,GAAG,IAAI,CAACP,OAAO,CAACQ,GAAG,CAACH,EAAE,CAAC;IAC9B,IAAI,CAACE,GAAG,EAAE;MACRA,GAAG,GAAG,IAAIJ,GAAG,CAAC,CAAC;MACf,IAAI,CAACH,OAAO,CAACO,GAAG,CAACF,EAAE,EAAEE,GAAG,CAAC;IAC3B;IACAA,GAAG,CAACE,GAAG,CAACH,IAAI,CAAC;IACb,IAAI,CAACI,IAAI,CAAC,CAAC;EACb;EAEAC,UAAUA,CAACN,EAAU,EAAEC,IAAgB,EAAQ;IAC7C,MAAMC,GAAG,GAAG,IAAI,CAACP,OAAO,CAACQ,GAAG,CAACH,EAAE,CAAC;IAChC,IAAI,CAACE,GAAG,EAAE;IACVA,GAAG,CAACK,MAAM,CAACN,IAAI,CAAC;IAChB,IAAIC,GAAG,CAACM,IAAI,KAAK,CAAC,EAAE;MAClB,IAAI,CAACb,OAAO,CAACY,MAAM,CAACP,EAAE,CAAC;IACzB;IACA,IAAI,CAACK,IAAI,CAAC,CAAC;EACb;EAEAF,GAAGA,CAACH,EAAU,EAAqB;IACjC,MAAME,GAAG,GAAG,IAAI,CAACP,OAAO,CAACQ,GAAG,CAACH,EAAE,CAAC;IAChC,IAAI,CAACE,GAAG,IAAIA,GAAG,CAACM,IAAI,KAAK,CAAC,EAAE,OAAO,IAAI;IACvC,IAAIC,IAAuB,GAAG,IAAI;IAClC,KAAK,MAAMR,IAAI,IAAIC,GAAG,EAAE;MACtBO,IAAI,GAAGR,IAAI;IACb;IACA,OAAOQ,IAAI;EACb;;EAEA;EACAC,WAAWA,CAACV,EAAU,EAAW;IAC/B,OAAO,CAAC,IAAI,CAACL,OAAO,CAACQ,GAAG,CAACH,EAAE,CAAC,EAAEQ,IAAI,IAAI,CAAC,IAAI,CAAC;EAC9C;EAEAG,SAASA,CAACC,QAAkB,EAAc;IACxC,IAAI,CAACf,SAAS,CAACO,GAAG,CAACQ,QAAQ,CAAC;IAC5B,OAAO,MAAM;MACX,IAAI,CAACf,SAAS,CAACU,MAAM,CAACK,QAAQ,CAAC;IACjC,CAAC;EACH;;EAEA;EACAC,KAAKA,CAAA,EAAS;IACZ,IAAI,CAAClB,OAAO,CAACkB,KAAK,CAAC,CAAC;IACpB,IAAI,CAACR,IAAI,CAAC,CAAC;EACb;EAEQA,IAAIA,CAAA,EAAS;IACnB,KAAK,MAAMO,QAAQ,IAAI,IAAI,CAACf,SAAS,EAAE;MACrCe,QAAQ,CAAC,CAAC;IACZ;EACF;AACF;;AAEA;AAAAE,OAAA,CAAApB,cAAA,GAAAA,cAAA;AACO,MAAMqB,cAAc,GAAAD,OAAA,CAAAC,cAAA,GAAG,IAAIrB,cAAc,CAAC,CAAC","ignoreList":[]}
|