@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,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Inbound deep-link handling for builder preview.
|
|
5
|
+
*
|
|
6
|
+
* Host apps register their environment's `scheme_id` (e.g. `userflow-257587`) as
|
|
7
|
+
* a URL scheme at build time. The SDK matches inbound URLs by prefix + root
|
|
8
|
+
* query (no init config) and starts a draft flow via `StartFlowWithToken` once
|
|
9
|
+
* a user is identified.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { Linking } from 'react-native';
|
|
13
|
+
|
|
14
|
+
/** Scheme prefix required for Userflow deep links (build-time registration). */
|
|
15
|
+
export const USERFLOW_URL_SCHEME_PREFIX = 'userflow-';
|
|
16
|
+
let deps = null;
|
|
17
|
+
let pendingToken = null;
|
|
18
|
+
let lastHandledToken = null;
|
|
19
|
+
let urlSubscription = null;
|
|
20
|
+
let started = false;
|
|
21
|
+
function getLinking() {
|
|
22
|
+
return deps?.linking ?? {
|
|
23
|
+
getInitialURL: () => Linking.getInitialURL(),
|
|
24
|
+
addEventListener: (type, handler) => Linking.addEventListener(type, handler)
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Parse a Userflow preview deep link.
|
|
30
|
+
* Accepts `userflow-*://?token=...` (root form).
|
|
31
|
+
*
|
|
32
|
+
* A root URL carrying `pairing_token` instead of `token` is a pairing link —
|
|
33
|
+
* leave it for {@link inspectPairingDeepLink}.
|
|
34
|
+
*/
|
|
35
|
+
export function parsePreviewDeepLink(url) {
|
|
36
|
+
const trimmed = url.trim();
|
|
37
|
+
if (!trimmed) return null;
|
|
38
|
+
const schemeMatch = /^([a-z][a-z0-9+.-]*):/i.exec(trimmed);
|
|
39
|
+
if (!schemeMatch?.[1]) return null;
|
|
40
|
+
const scheme = schemeMatch[1];
|
|
41
|
+
if (!scheme.toLowerCase().startsWith(USERFLOW_URL_SCHEME_PREFIX)) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Custom schemes need a rewrite so root forms (`://?token=…`) parse.
|
|
46
|
+
const remainder = trimmed.slice(scheme.length + 1).replace(/^\/\//, '');
|
|
47
|
+
let parsed;
|
|
48
|
+
try {
|
|
49
|
+
if (remainder === '' || remainder.startsWith('?') || remainder.startsWith('/')) {
|
|
50
|
+
parsed = new URL(remainder === '' ? '/' : remainder, 'https://userflow.local');
|
|
51
|
+
} else {
|
|
52
|
+
parsed = new URL(`https://${remainder}`);
|
|
53
|
+
}
|
|
54
|
+
} catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Pairing wins at the root when both query shapes could apply.
|
|
59
|
+
if (parsed.searchParams.has('pairing_token')) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
const host = parsed.hostname.toLowerCase();
|
|
63
|
+
const path = parsed.pathname.replace(/\/+$/, '') || '/';
|
|
64
|
+
const isRoot = (host === '' || host === 'userflow.local') && (path === '' || path === '/');
|
|
65
|
+
if (!isRoot) {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const token = parsed.searchParams.get('token')?.trim() ?? '';
|
|
69
|
+
if (!token) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
token
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
async function applyToken(token) {
|
|
77
|
+
if (!deps) return;
|
|
78
|
+
if (lastHandledToken === token) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (!deps.isIdentified()) {
|
|
82
|
+
pendingToken = token;
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
pendingToken = null;
|
|
86
|
+
lastHandledToken = token;
|
|
87
|
+
await deps.startFlowWithToken(token);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Handle an inbound URL. Returns true when it was a Userflow preview deep link.
|
|
92
|
+
*/
|
|
93
|
+
export async function didHandleURL(url) {
|
|
94
|
+
const parsed = parsePreviewDeepLink(url);
|
|
95
|
+
if (!parsed) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
await applyToken(parsed.token);
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Flush a buffered preview token after identify (no-op if none / not identified). */
|
|
103
|
+
export async function flushPendingPreviewToken() {
|
|
104
|
+
if (!deps || !pendingToken || !deps.isIdentified()) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const token = pendingToken;
|
|
108
|
+
pendingToken = null;
|
|
109
|
+
lastHandledToken = token;
|
|
110
|
+
await deps.startFlowWithToken(token);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** Wire dependencies and start Listening for inbound URLs. Idempotent. */
|
|
114
|
+
export function startDeepLinking(nextDeps) {
|
|
115
|
+
deps = nextDeps;
|
|
116
|
+
if (started) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
started = true;
|
|
120
|
+
const linking = getLinking();
|
|
121
|
+
void linking.getInitialURL().then(url => {
|
|
122
|
+
if (url) {
|
|
123
|
+
void didHandleURL(url);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
urlSubscription = linking.addEventListener('url', ({
|
|
127
|
+
url
|
|
128
|
+
}) => {
|
|
129
|
+
void didHandleURL(url);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** Stop Listening and clear buffered preview state. */
|
|
134
|
+
export function stopDeepLinking() {
|
|
135
|
+
urlSubscription?.remove();
|
|
136
|
+
urlSubscription = null;
|
|
137
|
+
started = false;
|
|
138
|
+
pendingToken = null;
|
|
139
|
+
lastHandledToken = null;
|
|
140
|
+
deps = null;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** Test helper: inspect buffered token without flushing. */
|
|
144
|
+
export function __getPendingPreviewTokenForTests() {
|
|
145
|
+
return pendingToken;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** Test helper: reset module state between suites. */
|
|
149
|
+
export function __resetDeepLinkingForTests() {
|
|
150
|
+
stopDeepLinking();
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=deepLinking.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Linking","USERFLOW_URL_SCHEME_PREFIX","deps","pendingToken","lastHandledToken","urlSubscription","started","getLinking","linking","getInitialURL","addEventListener","type","handler","parsePreviewDeepLink","url","trimmed","trim","schemeMatch","exec","scheme","toLowerCase","startsWith","remainder","slice","length","replace","parsed","URL","searchParams","has","host","hostname","path","pathname","isRoot","token","get","applyToken","isIdentified","startFlowWithToken","didHandleURL","flushPendingPreviewToken","startDeepLinking","nextDeps","then","stopDeepLinking","remove","__getPendingPreviewTokenForTests","__resetDeepLinkingForTests"],"sourceRoot":"../../src","sources":["deepLinking.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,OAAO,QAAQ,cAAc;;AAEtC;AACA,OAAO,MAAMC,0BAA0B,GAAG,WAAW;AAyBrD,IAAIC,IAA4B,GAAG,IAAI;AACvC,IAAIC,YAA2B,GAAG,I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AAY;AACrB;;AAEA;AACA,OAAO,SAAS6C,0BAA0BA,CAAA,EAAS;EACjDH,eAAe,CAAC,CAAC;AACnB","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useUserflowExpoRouter } from "./useUserflowExpoRouter.js";
|
|
4
|
+
|
|
5
|
+
/** Invisible component that wires Expo Router pathname tracking into the SDK. */
|
|
6
|
+
export function UserflowExpoRouterScreenTracker() {
|
|
7
|
+
useUserflowExpoRouter();
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=UserflowExpoRouterScreenTracker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useUserflowExpoRouter","UserflowExpoRouterScreenTracker"],"sourceRoot":"../../../src","sources":["expo-router/UserflowExpoRouterScreenTracker.tsx"],"mappings":";;AAAA,SAASA,qBAAqB,QAAQ,4BAAyB;;AAE/D;AACA,OAAO,SAASC,+BAA+BA,CAAA,EAAS;EACtDD,qBAAqB,CAAC,CAAC;EACvB,OAAO,IAAI;AACb","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
let cached;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns the Expo Router screen tracker when a real `expo-router` peer is
|
|
7
|
+
* installed (both `usePathname` and `useRouter`), otherwise `null`.
|
|
8
|
+
*
|
|
9
|
+
* Not part of the public API — hosts mount {@link UserflowExpoRouterScreenTracker}
|
|
10
|
+
* from `@userflow-tech/react-native/expo-router`. Kept for unit tests that probe
|
|
11
|
+
* partial / absent `expo-router` stubs.
|
|
12
|
+
*/
|
|
13
|
+
export function getExpoRouterScreenTracker() {
|
|
14
|
+
if (cached !== undefined) return cached;
|
|
15
|
+
if (typeof require !== 'function') {
|
|
16
|
+
cached = null;
|
|
17
|
+
return cached;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- optional peer probe
|
|
21
|
+
const expoRouter = require('expo-router');
|
|
22
|
+
if (typeof expoRouter?.usePathname !== 'function' || typeof expoRouter?.useRouter !== 'function') {
|
|
23
|
+
cached = null;
|
|
24
|
+
return cached;
|
|
25
|
+
}
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
|
27
|
+
const mod = require('./UserflowExpoRouterScreenTracker');
|
|
28
|
+
cached = mod.UserflowExpoRouterScreenTracker;
|
|
29
|
+
} catch {
|
|
30
|
+
cached = null;
|
|
31
|
+
}
|
|
32
|
+
return cached;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** @internal Resets module cache between tests. */
|
|
36
|
+
export function resetExpoRouterScreenTrackerCacheForTests() {
|
|
37
|
+
cached = undefined;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=getExpoRouterScreenTracker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["cached","getExpoRouterScreenTracker","undefined","require","expoRouter","usePathname","useRouter","mod","UserflowExpoRouterScreenTracker","resetExpoRouterScreenTrackerCacheForTests"],"sourceRoot":"../../../src","sources":["expo-router/getExpoRouterScreenTracker.ts"],"mappings":";;AAEA,IAAIA,MAAwC;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CAAA,EAAyB;EACjE,IAAID,MAAM,KAAKE,SAAS,EAAE,OAAOF,MAAM;EAEvC,IAAI,OAAOG,OAAO,KAAK,UAAU,EAAE;IACjCH,MAAM,GAAG,IAAI;IACb,OAAOA,MAAM;EACf;EAEA,IAAI;IACF;IACA,MAAMI,UAAU,GAAGD,OAAO,CAAC,aAAa,CAGvC;IACD,IACE,OAAOC,UAAU,EAAEC,WAAW,KAAK,UAAU,IAC7C,OAAOD,UAAU,EAAEE,SAAS,KAAK,UAAU,EAC3C;MACAN,MAAM,GAAG,IAAI;MACb,OAAOA,MAAM;IACf;IACA;IACA,MAAMO,GAAG,GAAGJ,OAAO,CAAC,mCAAmC,CAEtD;IACDH,MAAM,GAAGO,GAAG,CAACC,+BAA+B;EAC9C,CAAC,CAAC,MAAM;IACNR,MAAM,GAAG,IAAI;EACf;EAEA,OAAOA,MAAM;AACf;;AAEA;AACA,OAAO,SAASS,yCAAyCA,CAAA,EAAS;EAChET,MAAM,GAAGE,SAAS;AACpB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useUserflowExpoRouter","UserflowExpoRouterScreenTracker"],"sourceRoot":"../../../src","sources":["expo-router/index.ts"],"mappings":";;AAAA,SAASA,qBAAqB,QAAQ,4BAAyB;AAC/D,SAASC,+BAA+B,QAAQ,sCAAmC","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { usePathname, useRouter } from 'expo-router';
|
|
4
|
+
import { useEffect } from 'react';
|
|
5
|
+
import { setExpoRouterNavigator } from "../navigation/openFlowNavigateUrl.js";
|
|
6
|
+
import { handleScreenChange } from "../screenTracker.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Tracks Expo Router pathname changes for Userflow screen detection and
|
|
10
|
+
* registers `router.push` for path-like flow NAVIGATE actions.
|
|
11
|
+
*
|
|
12
|
+
* Mount via {@link UserflowExpoRouterScreenTracker} from
|
|
13
|
+
* `@userflow-tech/react-native/expo-router` under {@link UserflowProvider}. Do not
|
|
14
|
+
* import this hook from the package root — that would force every host app to
|
|
15
|
+
* install the `expo-router` peer.
|
|
16
|
+
*
|
|
17
|
+
* Pathnames are reported as `{ path }` and mapped to wire `screenPath`
|
|
18
|
+
* (not `screenName`).
|
|
19
|
+
*
|
|
20
|
+
* Screen tracking ≠ action routing: NAVIGATE for in-app paths uses the router
|
|
21
|
+
* handle registered here; http(s)/mailto/tel still go through Linking.
|
|
22
|
+
*/
|
|
23
|
+
export function useUserflowExpoRouter() {
|
|
24
|
+
const pathname = usePathname();
|
|
25
|
+
const router = useRouter();
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
handleScreenChange(pathname ? {
|
|
28
|
+
path: pathname
|
|
29
|
+
} : undefined);
|
|
30
|
+
}, [pathname]);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
setExpoRouterNavigator({
|
|
33
|
+
push: href => {
|
|
34
|
+
router.push(href);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return () => {
|
|
38
|
+
setExpoRouterNavigator(null);
|
|
39
|
+
};
|
|
40
|
+
}, [router]);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=useUserflowExpoRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["usePathname","useRouter","useEffect","setExpoRouterNavigator","handleScreenChange","useUserflowExpoRouter","pathname","router","path","undefined","push","href"],"sourceRoot":"../../../src","sources":["expo-router/useUserflowExpoRouter.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,QAAQ,aAAa;AACpD,SAASC,SAAS,QAAQ,OAAO;AAEjC,SAASC,sBAAsB,QAAQ,sCAAmC;AAC1E,SAASC,kBAAkB,QAAQ,qBAAkB;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,qBAAqBA,CAAA,EAAS;EAC5C,MAAMC,QAAQ,GAAGN,WAAW,CAAC,CAAC;EAC9B,MAAMO,MAAM,GAAGN,SAAS,CAAC,CAAC;EAE1BC,SAAS,CAAC,MAAM;IACdE,kBAAkB,CAACE,QAAQ,GAAG;MAAEE,IAAI,EAAEF;IAAS,CAAC,GAAGG,SAAS,CAAC;EAC/D,CAAC,EAAE,CAACH,QAAQ,CAAC,CAAC;EAEdJ,SAAS,CAAC,MAAM;IACdC,sBAAsB,CAAC;MACrBO,IAAI,EAAGC,IAAI,IAAK;QACdJ,MAAM,CAACG,IAAI,CAACC,IAAa,CAAC;MAC5B;IACF,CAAC,CAAC;IACF,OAAO,MAAM;MACXR,sBAAsB,CAAC,IAAI,CAAC;IAC9B,CAAC;EACH,CAAC,EAAE,CAACI,MAAM,CAAC,CAAC;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @userflow-tech/react-native — public API for the Userflow React Native SDK.
|
|
5
|
+
*
|
|
6
|
+
* Exposes the `Userflow` singleton host apps import. Auth/identity and the
|
|
7
|
+
* transport live in `@userflow-tech/core`; this binding is a thin facade that
|
|
8
|
+
* delegates to the core engine, wires React Native app lifecycle
|
|
9
|
+
* (background/foreground + idle) to the connection, hosts the flow session
|
|
10
|
+
* engine + provider overlay for Phase 3 rendering, and tracks screen changes.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import "./anchors/autoAnchor.js";
|
|
14
|
+
import { anchorChangeTicker } from "./anchors/anchorChangeTicker.js";
|
|
15
|
+
import { notifyAnchorScreenChange } from "./anchors/resolveAnchorHost.js";
|
|
16
|
+
import { setCustomScrollIntoView as setCustomScrollIntoViewConfig, setScrollPadding as setScrollPaddingConfig } from "./anchors/scrollConfig.js";
|
|
17
|
+
import { clearAnonymousId, getOrCreateAnonymousId } from "./anonymousId.js";
|
|
18
|
+
import { didHandleURL, flushPendingPreviewToken, startDeepLinking, stopDeepLinking } from "./deepLinking.js";
|
|
19
|
+
import { LifecycleController } from "./lifecycle.js";
|
|
20
|
+
import { setHostOnNavigate } from "./navigation/openFlowNavigateUrl.js";
|
|
21
|
+
import { NetworkController } from "./network.js";
|
|
22
|
+
import { getPairingController, installPairingController } from "./pairing/pairingRuntime.js";
|
|
23
|
+
import { attachClientConditionEngine, resetClientConditionEngine } from "./runtime/clientConditions.js";
|
|
24
|
+
import { attachFlowSessionEngine, clearFlowSessionEngineLocalSession, getFlowSessionEngine, hasActiveFlowSession, resetFlowSessionEngine } from "./runtime/flowEngine.js";
|
|
25
|
+
import { getUserflowCore } from "./runtime/userflowCore.js";
|
|
26
|
+
import { disableScreenTracking, enableScreenTracking, handleScreenChange, setScreenChangeReporter } from "./screenTracker.js";
|
|
27
|
+
export { SDK_VERSION } from "./version.js";
|
|
28
|
+
export { UserflowProvider, useUserflow } from "./runtime/UserflowProvider.js";
|
|
29
|
+
export { useFlowSessionState } from "./runtime/useFlowSessionState.js";
|
|
30
|
+
export { useUserflowScreen } from "./useUserflowScreen.js";
|
|
31
|
+
export { useUserflowAnchor } from "./anchors/useUserflowAnchor.js";
|
|
32
|
+
export { __userflowAutoAnchor } from "./anchors/autoAnchor.js";
|
|
33
|
+
export { useUserflowScrollContainer } from "./anchors/useUserflowScrollContainer.js";
|
|
34
|
+
export { INACTIVITY_TIMEOUT_MS, SESSION_STALE_AFTER_BACKGROUND_MS, SUSPEND_GRACE_MS } from "./lifecycle.js";
|
|
35
|
+
export { inspectPairingDeepLink, isPairingAttempt, parsePairingDeepLink, isUserflowPairingUrl, PreviewModeBanner } from "./pairing/index.js";
|
|
36
|
+
|
|
37
|
+
/** Configuration passed to {@link Userflow.init}. */
|
|
38
|
+
|
|
39
|
+
const core = getUserflowCore();
|
|
40
|
+
const lifecycle = new LifecycleController({
|
|
41
|
+
suspend: () => core.suspend(),
|
|
42
|
+
resume: () => {
|
|
43
|
+
core.resume();
|
|
44
|
+
// After reconnect, flush mid-flow client messages that failed while offline.
|
|
45
|
+
void getFlowSessionEngine(core).flushPendingSends();
|
|
46
|
+
},
|
|
47
|
+
clearLocalSession: () => {
|
|
48
|
+
clearFlowSessionEngineLocalSession();
|
|
49
|
+
// Engine may not exist yet; still clear any transport join resume id.
|
|
50
|
+
core.setFlowSessionId(null);
|
|
51
|
+
},
|
|
52
|
+
ensureAlive: () => core.ensureAlive(),
|
|
53
|
+
hasActiveSession: () => hasActiveFlowSession()
|
|
54
|
+
});
|
|
55
|
+
const network = new NetworkController({
|
|
56
|
+
// Probe if still "connected" (half-open) or reconnect eagerly if already dropped.
|
|
57
|
+
ensureAlive: () => core.ensureAlive()
|
|
58
|
+
});
|
|
59
|
+
function wireScreenChangeReporter() {
|
|
60
|
+
setScreenChangeReporter(location => {
|
|
61
|
+
lifecycle.reportActivity();
|
|
62
|
+
const screenKey = 'path' in location ? `path:${location.path}` : `screen:${location.screen}`;
|
|
63
|
+
notifyAnchorScreenChange(screenKey);
|
|
64
|
+
anchorChangeTicker.notify();
|
|
65
|
+
if (__DEV__) {
|
|
66
|
+
const identified = core.getUserId() != null;
|
|
67
|
+
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
68
|
+
console.log('[Userflow] updateScreen', location, identified ? '(push UpdateClientContext)' : '(buffered until identify)');
|
|
69
|
+
}
|
|
70
|
+
// Mirrors web: only pushes UpdateClientContext after identify; before that the
|
|
71
|
+
// location is remembered and included on the next end-user channel join.
|
|
72
|
+
void core.updateScreen(location).catch(() => {
|
|
73
|
+
// Screen updates are best-effort; connection drops / rate limits should not
|
|
74
|
+
// surface to the host app's navigation path.
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
wireScreenChangeReporter();
|
|
79
|
+
function wireDeepLinking() {
|
|
80
|
+
startDeepLinking({
|
|
81
|
+
isIdentified: () => core.getUserId() != null,
|
|
82
|
+
startFlowWithToken: token => core.startFlowWithToken(token)
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
async function afterIdentify() {
|
|
86
|
+
attachFlowSessionEngine(core);
|
|
87
|
+
attachClientConditionEngine(core);
|
|
88
|
+
getPairingController(core).notifyIdentified();
|
|
89
|
+
lifecycle.reportActivity();
|
|
90
|
+
try {
|
|
91
|
+
await flushPendingPreviewToken();
|
|
92
|
+
} catch {
|
|
93
|
+
// Preview start is best-effort; identify must still succeed for the host app.
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Public SDK entry point. Delegates to the platform-agnostic engine in
|
|
99
|
+
* `@userflow-tech/core` and manages the app-lifecycle subscription.
|
|
100
|
+
*/
|
|
101
|
+
export const Userflow = {
|
|
102
|
+
/** Validate credentials, store configuration, and wire app-lifecycle handling. */
|
|
103
|
+
init(config) {
|
|
104
|
+
setHostOnNavigate(config.onNavigate);
|
|
105
|
+
lifecycle.start();
|
|
106
|
+
network.start();
|
|
107
|
+
wireScreenChangeReporter();
|
|
108
|
+
wireDeepLinking();
|
|
109
|
+
// Builder pairing (QR deep links) — active in all builds.
|
|
110
|
+
//
|
|
111
|
+
// Listeners attach *before* core.init so an inbound QR link is captured even
|
|
112
|
+
// when init is still in flight or ends up rejecting. The OS launches the app
|
|
113
|
+
// from the deep link regardless of SDK state, so a listener installed only on
|
|
114
|
+
// the success path makes a failed init look like a broken deep link.
|
|
115
|
+
const pairing = installPairingController(core, {
|
|
116
|
+
...(config.pairingEndpoint !== undefined ? {
|
|
117
|
+
pairingEndpoint: config.pairingEndpoint
|
|
118
|
+
} : {}),
|
|
119
|
+
clearLocalSession: () => {
|
|
120
|
+
clearFlowSessionEngineLocalSession();
|
|
121
|
+
core.setFlowSessionId(null);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
pairing.notifyInitStarted();
|
|
125
|
+
void pairing.start();
|
|
126
|
+
return core.init(config).then(async resolved => {
|
|
127
|
+
enableScreenTracking();
|
|
128
|
+
await pairing.notifyInitialized();
|
|
129
|
+
return resolved;
|
|
130
|
+
}, error => {
|
|
131
|
+
pairing.notifyInitFailed(error);
|
|
132
|
+
throw error;
|
|
133
|
+
});
|
|
134
|
+
},
|
|
135
|
+
/**
|
|
136
|
+
* Forward a Userflow pairing deep link into the SDK.
|
|
137
|
+
* Prefer automatic Linking interception from {@link Userflow.init}; use this
|
|
138
|
+
* when the host app owns URL routing.
|
|
139
|
+
*/
|
|
140
|
+
handlePairingUrl(url) {
|
|
141
|
+
return getPairingController(core).handleUrl(url);
|
|
142
|
+
},
|
|
143
|
+
/** Exit Builder preview mode and disconnect the pairing websocket. */
|
|
144
|
+
exitPreview() {
|
|
145
|
+
return getPairingController(core).exitPreview();
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* Override or clear the host NAVIGATE handler (same as `init({ onNavigate })`).
|
|
149
|
+
* Wins over React Navigation / Expo Router / Linking when set.
|
|
150
|
+
*/
|
|
151
|
+
setOnNavigate(handler) {
|
|
152
|
+
setHostOnNavigate(handler);
|
|
153
|
+
},
|
|
154
|
+
/** Identify the current user and upsert their attributes. */
|
|
155
|
+
async identify(userId, attributes, options) {
|
|
156
|
+
const previousId = core.getUserId();
|
|
157
|
+
// Clear before join so the new channel is not seeded with another user's
|
|
158
|
+
// client-condition snapshot.
|
|
159
|
+
if (previousId != null && previousId !== userId) {
|
|
160
|
+
resetClientConditionEngine();
|
|
161
|
+
core.setClientConditions([]);
|
|
162
|
+
await clearAnonymousId();
|
|
163
|
+
}
|
|
164
|
+
await core.identify(userId, attributes, options);
|
|
165
|
+
await afterIdentify();
|
|
166
|
+
},
|
|
167
|
+
/** Identify an anonymous user with a stable auto-generated id stored on device. */
|
|
168
|
+
async identifyAnonymous(attributes, options) {
|
|
169
|
+
const anonymousId = await getOrCreateAnonymousId();
|
|
170
|
+
const previousId = core.getUserId();
|
|
171
|
+
if (previousId != null && previousId !== anonymousId) {
|
|
172
|
+
resetClientConditionEngine();
|
|
173
|
+
core.setClientConditions([]);
|
|
174
|
+
}
|
|
175
|
+
await core.identify(anonymousId, attributes, options);
|
|
176
|
+
await afterIdentify();
|
|
177
|
+
},
|
|
178
|
+
/**
|
|
179
|
+
* Handle an inbound URL. Returns `true` when it was a Userflow preview deep
|
|
180
|
+
* link (`userflow-*://?token=...`).
|
|
181
|
+
* Prefer letting {@link init} auto-listen; call this when the host app already
|
|
182
|
+
* owns Linking.
|
|
183
|
+
*/
|
|
184
|
+
didHandleURL(url) {
|
|
185
|
+
return didHandleURL(url);
|
|
186
|
+
},
|
|
187
|
+
/** Associate the current user with a group and upsert group/membership attributes. */
|
|
188
|
+
group(groupId, attributes, options) {
|
|
189
|
+
lifecycle.reportActivity();
|
|
190
|
+
return core.group(groupId, attributes, options);
|
|
191
|
+
},
|
|
192
|
+
/** Record a custom analytics event for the current user (and group, unless `userOnly`). */
|
|
193
|
+
track(name, attributes, options) {
|
|
194
|
+
lifecycle.reportActivity();
|
|
195
|
+
return core.track(name, attributes, options);
|
|
196
|
+
},
|
|
197
|
+
/** The currently identified user id, or `null` before identify. */
|
|
198
|
+
getUserId() {
|
|
199
|
+
return core.getUserId();
|
|
200
|
+
},
|
|
201
|
+
/** A copy of the attributes recorded for the current user. */
|
|
202
|
+
getAttributes() {
|
|
203
|
+
return core.getAttributes();
|
|
204
|
+
},
|
|
205
|
+
/** The flow session engine (created lazily; attach runs after identify). */
|
|
206
|
+
getFlowSessionEngine() {
|
|
207
|
+
return getFlowSessionEngine(core);
|
|
208
|
+
},
|
|
209
|
+
/** Clears the current user identity and disconnects from Userflow. */
|
|
210
|
+
async reset() {
|
|
211
|
+
resetClientConditionEngine();
|
|
212
|
+
resetFlowSessionEngine();
|
|
213
|
+
core.reset();
|
|
214
|
+
await clearAnonymousId();
|
|
215
|
+
},
|
|
216
|
+
/** Remove app-lifecycle, network, and deep-link subscriptions (call on unmount / teardown). */
|
|
217
|
+
teardown() {
|
|
218
|
+
getPairingController(core).stop();
|
|
219
|
+
lifecycle.stop();
|
|
220
|
+
network.stop();
|
|
221
|
+
disableScreenTracking();
|
|
222
|
+
stopDeepLinking();
|
|
223
|
+
},
|
|
224
|
+
/**
|
|
225
|
+
* Signal user activity so the foreground idle timer resets and an
|
|
226
|
+
* idle-suspended socket reconnects. Prefer automatic signals from
|
|
227
|
+
* {@link updateScreen} / identify / group; call this for touch or other
|
|
228
|
+
* host-app activity the SDK does not observe.
|
|
229
|
+
*/
|
|
230
|
+
reportActivity() {
|
|
231
|
+
lifecycle.reportActivity();
|
|
232
|
+
},
|
|
233
|
+
/**
|
|
234
|
+
* Report the active React Navigation (or manual) screen name. Prefer
|
|
235
|
+
* {@link useUserflowScreen} in React trees; use this for imperative updates
|
|
236
|
+
* outside hooks. When a user is identified, pushes `UpdateClientContext`
|
|
237
|
+
* with `screen` set (Expo Router pathnames use `path` via the Expo helper).
|
|
238
|
+
*/
|
|
239
|
+
updateScreen(screenName) {
|
|
240
|
+
handleScreenChange(screenName ? {
|
|
241
|
+
screen: screenName
|
|
242
|
+
} : undefined);
|
|
243
|
+
},
|
|
244
|
+
/**
|
|
245
|
+
* Sticky header/footer insets applied when scrolling tooltip targets into
|
|
246
|
+
* view (mirrors web `userflow.setScrollPadding`).
|
|
247
|
+
*/
|
|
248
|
+
setScrollPadding(padding) {
|
|
249
|
+
setScrollPaddingConfig(padding);
|
|
250
|
+
},
|
|
251
|
+
/**
|
|
252
|
+
* Replace the SDK's scroll-into-view behavior. Pass `null` to restore the
|
|
253
|
+
* default fiber / registry path (mirrors web `userflow.setCustomScrollIntoView`).
|
|
254
|
+
*/
|
|
255
|
+
setCustomScrollIntoView(fn) {
|
|
256
|
+
setCustomScrollIntoViewConfig(fn);
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["anchorChangeTicker","notifyAnchorScreenChange","setCustomScrollIntoView","setCustomScrollIntoViewConfig","setScrollPadding","setScrollPaddingConfig","clearAnonymousId","getOrCreateAnonymousId","didHandleURL","flushPendingPreviewToken","startDeepLinking","stopDeepLinking","LifecycleController","setHostOnNavigate","NetworkController","getPairingController","installPairingController","attachClientConditionEngine","resetClientConditionEngine","attachFlowSessionEngine","clearFlowSessionEngineLocalSession","getFlowSessionEngine","hasActiveFlowSession","resetFlowSessionEngine","getUserflowCore","disableScreenTracking","enableScreenTracking","handleScreenChange","setScreenChangeReporter","SDK_VERSION","UserflowProvider","useUserflow","useFlowSessionState","useUserflowScreen","useUserflowAnchor","__userflowAutoAnchor","useUserflowScrollContainer","INACTIVITY_TIMEOUT_MS","SESSION_STALE_AFTER_BACKGROUND_MS","SUSPEND_GRACE_MS","inspectPairingDeepLink","isPairingAttempt","parsePairingDeepLink","isUserflowPairingUrl","PreviewModeBanner","core","lifecycle","suspend","resume","flushPendingSends","clearLocalSession","setFlowSessionId","ensureAlive","hasActiveSession","network","wireScreenChangeReporter","location","reportActivity","screenKey","path","screen","notify","__DEV__","identified","getUserId","console","log","updateScreen","catch","wireDeepLinking","isIdentified","startFlowWithToken","token","afterIdentify","notifyIdentified","Userflow","init","config","onNavigate","start","pairing","pairingEndpoint","undefined","notifyInitStarted","then","resolved","notifyInitialized","error","notifyInitFailed","handlePairingUrl","url","handleUrl","exitPreview","setOnNavigate","handler","identify","userId","attributes","options","previousId","setClientConditions","identifyAnonymous","anonymousId","group","groupId","track","name","getAttributes","reset","teardown","stop","screenName","padding","fn"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,OAAO,yBAAsB;AAC7B,SAASA,kBAAkB,QAAQ,iCAA8B;AACjE,SAASC,wBAAwB,QAAQ,gCAA6B;AACtE,SACEC,uBAAuB,IAAIC,6BAA6B,EACxDC,gBAAgB,IAAIC,sBAAsB,QAGrC,2BAAwB;AAC/B,SAASC,gBAAgB,EAAEC,sBAAsB,QAAQ,kBAAe;AACxE,SACEC,YAAY,EACZC,wBAAwB,EACxBC,gBAAgB,EAChBC,eAAe,QACV,kBAAe;AACtB,SAASC,mBAAmB,QAAQ,gBAAa;AACjD,SAASC,iBAAiB,QAAkC,qCAAkC;AAC9F,SAASC,iBAAiB,QAAQ,cAAW;AAC7C,SAASC,oBAAoB,EAAEC,wBAAwB,QAAQ,6BAA0B;AACzF,SACEC,2BAA2B,EAC3BC,0BAA0B,QACrB,+BAA4B;AACnC,SACEC,uBAAuB,EACvBC,kCAAkC,EAClCC,oBAAoB,EACpBC,oBAAoB,EACpBC,sBAAsB,QACjB,y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