@userflow-tech/react-native 0.2.0 → 0.3.1
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/README.md +435 -134
- package/app.plugin.js +11 -3
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +53 -6
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +11 -3
- package/docs/anchoring.md +58 -42
- package/docs/deep-linking.md +70 -33
- package/docs/isolation.md +75 -0
- package/docs/troubleshooting.md +103 -44
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/hostDependencyWarnings.d.ts +18 -0
- package/expo-plugin/hostDependencyWarnings.d.ts.map +1 -0
- package/expo-plugin/hostDependencyWarnings.js +91 -0
- package/expo-plugin/hostDependencyWarnings.js.map +1 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +30 -8
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AnchorRegistry.js +7 -0
- package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +189 -55
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/elementTapMonitor.js +92 -0
- package/lib/commonjs/anchors/elementTapMonitor.js.map +1 -0
- package/lib/commonjs/anchors/elementTargetMatch.js +85 -0
- package/lib/commonjs/anchors/elementTargetMatch.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +122 -87
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.js +105 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +2 -1
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +26 -17
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveElementTargets.js +158 -0
- package/lib/commonjs/anchors/resolveElementTargets.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +26 -8
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
- package/lib/commonjs/anchors/targetPressMonitor.js +9 -3
- package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -1
- package/lib/commonjs/anchors/useUserflowAnchor.js +1 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/commonjs/anonymousId.js +19 -7
- package/lib/commonjs/anonymousId.js.map +1 -1
- package/lib/commonjs/authoring/ElementPickerOverlay.js +126 -50
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeButton.js +8 -3
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +7 -6
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -1
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -1
- package/lib/commonjs/authoring/fingerprintFromInstance.js +204 -4
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/commonjs/authoring/hitTest.js +264 -16
- package/lib/commonjs/authoring/hitTest.js.map +1 -1
- package/lib/commonjs/authoring/hostAtPoint.js +204 -0
- package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
- package/lib/commonjs/content/BannerStepButton.js +68 -0
- package/lib/commonjs/content/BannerStepButton.js.map +1 -0
- package/lib/commonjs/content/buttonAppearance.js +16 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -1
- package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
- package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/commonjs/content/themeColor.js +15 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deepLinking.js +4 -4
- package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
- package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
- package/lib/commonjs/evalJs/bootstrap.js +84 -0
- package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
- package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
- package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
- package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsController.js +124 -0
- package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
- package/lib/commonjs/evalJs/getWebView.js +81 -0
- package/lib/commonjs/evalJs/getWebView.js.map +1 -0
- package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
- package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
- package/lib/commonjs/evalJs/types.js +2 -0
- package/lib/commonjs/evalJs/types.js.map +1 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +19 -0
- package/lib/commonjs/expo-router/index.js.map +1 -1
- package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
- package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/commonjs/index.js +123 -43
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/installCheck.js +151 -0
- package/lib/commonjs/installCheck.js.map +1 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js +245 -27
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +55 -16
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/deepLink.js +22 -5
- package/lib/commonjs/pairing/deepLink.js.map +1 -1
- package/lib/commonjs/pairing/deviceId.js +50 -0
- package/lib/commonjs/pairing/deviceId.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +5 -4
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/tokenStorage.js +47 -7
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
- package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/commonjs/runtime/BannerHost.js +96 -0
- package/lib/commonjs/runtime/BannerHost.js.map +1 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +31 -13
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
- package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +138 -65
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/bannerEngine.js +63 -0
- package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
- package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
- package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
- package/lib/commonjs/runtime/bannerPlacement.js +37 -0
- package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +75 -3
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/isolateCall.js +48 -0
- package/lib/commonjs/runtime/isolateCall.js.map +1 -0
- package/lib/commonjs/runtime/reportSdkError.js +19 -0
- package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
- package/lib/commonjs/runtime/useBannerSession.js +37 -0
- package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
- package/lib/commonjs/screenTracker.js +34 -9
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/storage/asyncStorage.js +67 -0
- package/lib/commonjs/storage/asyncStorage.js.map +1 -0
- package/lib/commonjs/surfaces/BannerBar.js +160 -0
- package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
- package/lib/commonjs/surfaces/BannerSurface.js +78 -0
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +17 -1
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
- package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/commonjs/surfaces/safeArea.js +76 -13
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AnchorRegistry.js +7 -0
- package/lib/module/anchors/AnchorRegistry.js.map +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +189 -55
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/elementTapMonitor.js +87 -0
- package/lib/module/anchors/elementTapMonitor.js.map +1 -0
- package/lib/module/anchors/elementTargetMatch.js +78 -0
- package/lib/module/anchors/elementTargetMatch.js.map +1 -0
- package/lib/module/anchors/fiber/fiberPath.js +118 -0
- package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +120 -87
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/touchTargetFiber.js +100 -0
- package/lib/module/anchors/fiber/touchTargetFiber.js.map +1 -0
- package/lib/module/anchors/fiber/visibleRect.js +139 -0
- package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +73 -37
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
- package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +2 -1
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +25 -18
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveElementTargets.js +152 -0
- package/lib/module/anchors/resolveElementTargets.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +26 -9
- package/lib/module/anchors/semanticMatcher.js.map +1 -1
- package/lib/module/anchors/targetPressMonitor.js +8 -3
- package/lib/module/anchors/targetPressMonitor.js.map +1 -1
- package/lib/module/anchors/useUserflowAnchor.js +1 -0
- package/lib/module/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/module/anonymousId.js +18 -6
- package/lib/module/anonymousId.js.map +1 -1
- package/lib/module/authoring/ElementPickerOverlay.js +128 -52
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeButton.js +8 -3
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/module/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/module/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +7 -6
- package/lib/module/authoring/chrome/tokens.js.map +1 -1
- package/lib/module/authoring/elementPickerController.js.map +1 -1
- package/lib/module/authoring/fingerprintFromInstance.js +198 -4
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/module/authoring/hitTest.js +264 -18
- package/lib/module/authoring/hitTest.js.map +1 -1
- package/lib/module/authoring/hostAtPoint.js +199 -0
- package/lib/module/authoring/hostAtPoint.js.map +1 -0
- package/lib/module/content/BannerStepButton.js +63 -0
- package/lib/module/content/BannerStepButton.js.map +1 -0
- package/lib/module/content/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -1
- package/lib/module/content/resolveBannerButtonChrome.js +41 -0
- package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/module/content/themeColor.js +14 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deepLinking.js +4 -4
- package/lib/module/evalJs/EvalJsHost.js +239 -0
- package/lib/module/evalJs/EvalJsHost.js.map +1 -0
- package/lib/module/evalJs/bootstrap.js +76 -0
- package/lib/module/evalJs/bootstrap.js.map +1 -0
- package/lib/module/evalJs/bridgeMessages.js +139 -0
- package/lib/module/evalJs/bridgeMessages.js.map +1 -0
- package/lib/module/evalJs/evalJsBridge.js +25 -0
- package/lib/module/evalJs/evalJsBridge.js.map +1 -0
- package/lib/module/evalJs/evalJsController.js +119 -0
- package/lib/module/evalJs/evalJsController.js.map +1 -0
- package/lib/module/evalJs/getWebView.js +76 -0
- package/lib/module/evalJs/getWebView.js.map +1 -0
- package/lib/module/evalJs/injectEvalPending.js +15 -0
- package/lib/module/evalJs/injectEvalPending.js.map +1 -0
- package/lib/module/evalJs/types.js +2 -0
- package/lib/module/evalJs/types.js.map +1 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/module/expo-router/index.js +1 -0
- package/lib/module/expo-router/index.js.map +1 -1
- package/lib/module/expo-router/redirectSystemPath.js +70 -0
- package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/module/index.js +119 -45
- package/lib/module/index.js.map +1 -1
- package/lib/module/installCheck.js +139 -0
- package/lib/module/installCheck.js.map +1 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/module/pairing/PairingController.js +245 -27
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +54 -16
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/deepLink.js +21 -5
- package/lib/module/pairing/deepLink.js.map +1 -1
- package/lib/module/pairing/deviceId.js +45 -0
- package/lib/module/pairing/deviceId.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +5 -4
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/tokenStorage.js +47 -7
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/pairing/usePreviewBarHold.js +134 -0
- package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/module/runtime/BannerHost.js +92 -0
- package/lib/module/runtime/BannerHost.js.map +1 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/module/runtime/SdkErrorBoundary.js +55 -0
- package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +31 -13
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowOverlay.js +92 -0
- package/lib/module/runtime/UserflowOverlay.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +139 -66
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/bannerEngine.js +55 -0
- package/lib/module/runtime/bannerEngine.js.map +1 -0
- package/lib/module/runtime/bannerEngineContext.js +7 -0
- package/lib/module/runtime/bannerEngineContext.js.map +1 -0
- package/lib/module/runtime/bannerPlacement.js +30 -0
- package/lib/module/runtime/bannerPlacement.js.map +1 -0
- package/lib/module/runtime/embedBannerRegistry.js +24 -0
- package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +72 -3
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/isolateCall.js +43 -0
- package/lib/module/runtime/isolateCall.js.map +1 -0
- package/lib/module/runtime/reportSdkError.js +15 -0
- package/lib/module/runtime/reportSdkError.js.map +1 -0
- package/lib/module/runtime/useBannerSession.js +33 -0
- package/lib/module/runtime/useBannerSession.js.map +1 -0
- package/lib/module/screenTracker.js +33 -9
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/storage/asyncStorage.js +61 -0
- package/lib/module/storage/asyncStorage.js.map +1 -0
- package/lib/module/surfaces/BannerBar.js +155 -0
- package/lib/module/surfaces/BannerBar.js.map +1 -0
- package/lib/module/surfaces/BannerSurface.js +72 -0
- package/lib/module/surfaces/BannerSurface.js.map +1 -0
- package/lib/module/surfaces/MadeWithUserflow.js +11 -7
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +1 -1
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +17 -1
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/bannerBarLayout.js +69 -0
- package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/module/surfaces/bannerBarTokens.js +37 -0
- package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/module/surfaces/resolveBannerTheme.js +16 -0
- package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/module/surfaces/safeArea.js +72 -13
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +12 -16
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts +36 -0
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +21 -8
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/touchTargetFiber.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/touchTargetFiber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +2 -1
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts +39 -0
- package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anonymousId.d.ts +3 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/commonjs/src/index.d.ts +16 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts +33 -0
- package/lib/typescript/commonjs/src/installCheck.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts +4 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +2 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts +7 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts +15 -0
- package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +9 -1
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +12 -16
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts +36 -0
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts +20 -0
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +21 -8
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/touchTargetFiber.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/touchTargetFiber.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +2 -1
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts +39 -0
- package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +2 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/module/src/anonymousId.d.ts +3 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/content/types.d.ts +1 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -1
- package/lib/typescript/module/src/deepLinking.d.ts +4 -4
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/module/src/index.d.ts +16 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/installCheck.d.ts +33 -0
- package/lib/typescript/module/src/installCheck.d.ts.map +1 -0
- package/lib/typescript/module/src/lifecycle.d.ts +4 -1
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +2 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/module/src/screenTracker.d.ts +7 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/storage/asyncStorage.d.ts +15 -0
- package/lib/typescript/module/src/storage/asyncStorage.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +9 -1
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +16 -3
- package/src/anchors/AnchorRegistry.ts +12 -0
- package/src/anchors/AutoAnchorRegistry.ts +41 -11
- package/src/anchors/elementConditionEvaluator.ts +235 -70
- package/src/anchors/elementTapMonitor.ts +95 -0
- package/src/anchors/elementTargetMatch.ts +90 -0
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +121 -80
- package/src/anchors/fiber/resolveFiberPath.ts +215 -0
- package/src/anchors/fiber/touchTargetFiber.ts +125 -0
- package/src/anchors/fiber/visibleRect.ts +153 -0
- package/src/anchors/fiber/visibleScreens.ts +74 -36
- package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
- package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
- package/src/anchors/resolveAnchorHost.ts +2 -1
- package/src/anchors/resolveAutoAnchorHost.ts +20 -18
- package/src/anchors/resolveElementTargets.ts +165 -0
- package/src/anchors/semanticMatcher.ts +38 -14
- package/src/anchors/targetPressMonitor.ts +12 -3
- package/src/anchors/useUserflowAnchor.ts +1 -0
- package/src/anonymousId.ts +20 -8
- package/src/authoring/ElementPickerOverlay.tsx +168 -59
- package/src/authoring/chrome/ChromeBottomSheet.tsx +49 -8
- package/src/authoring/chrome/ChromeButton.tsx +9 -4
- package/src/authoring/chrome/ChromeIcon.tsx +10 -1
- package/src/authoring/chrome/ChromeTopBar.tsx +39 -15
- package/src/authoring/chrome/DoubleTapBridge.tsx +19 -12
- package/src/authoring/chrome/doubleTapMonitor.ts +10 -0
- package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +7 -2
- package/src/authoring/elementPickerController.ts +2 -4
- package/src/authoring/fingerprintFromInstance.ts +170 -4
- package/src/authoring/hitTest.ts +324 -16
- package/src/authoring/hostAtPoint.ts +247 -0
- package/src/content/BannerStepButton.tsx +91 -0
- package/src/content/buttonAppearance.ts +16 -0
- package/src/content/resolveBannerButtonChrome.ts +49 -0
- package/src/content/themeColor.ts +15 -0
- package/src/content/types.ts +1 -0
- package/src/deepLinking.ts +4 -4
- package/src/evalJs/EvalJsHost.tsx +255 -0
- package/src/evalJs/bootstrap.ts +83 -0
- package/src/evalJs/bridgeMessages.ts +134 -0
- package/src/evalJs/evalJsBridge.ts +42 -0
- package/src/evalJs/evalJsController.ts +127 -0
- package/src/evalJs/getWebView.ts +124 -0
- package/src/evalJs/injectEvalPending.ts +14 -0
- package/src/evalJs/types.ts +56 -0
- package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
- package/src/expo-router/index.ts +8 -0
- package/src/expo-router/redirectSystemPath.ts +86 -0
- package/src/expo-router/useUserflowExpoRouter.ts +2 -2
- package/src/index.ts +139 -45
- package/src/installCheck.ts +191 -0
- package/src/lifecycle.ts +4 -1
- package/src/navigation/WithUserflowReactNavigation.tsx +13 -10
- package/src/navigation/openFlowNavigateUrl.ts +12 -5
- package/src/pairing/PairingController.ts +283 -29
- package/src/pairing/PreviewModeBanner.tsx +71 -14
- package/src/pairing/deepLink.ts +23 -5
- package/src/pairing/deviceId.ts +46 -0
- package/src/pairing/diagnostics.ts +6 -4
- package/src/pairing/tokenStorage.ts +60 -7
- package/src/pairing/usePairingState.ts +2 -0
- package/src/pairing/usePreviewBarHold.ts +160 -0
- package/src/runtime/BannerHost.tsx +102 -0
- package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
- package/src/runtime/SdkErrorBoundary.tsx +77 -0
- package/src/runtime/TargetPressBridge.tsx +36 -13
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +146 -64
- package/src/runtime/bannerEngine.ts +55 -0
- package/src/runtime/bannerEngineContext.ts +5 -0
- package/src/runtime/bannerPlacement.ts +36 -0
- package/src/runtime/embedBannerRegistry.ts +28 -0
- package/src/runtime/flowEngine.ts +76 -3
- package/src/runtime/isolateCall.ts +53 -0
- package/src/runtime/reportSdkError.ts +12 -0
- package/src/runtime/useBannerSession.ts +35 -0
- package/src/screenTracker.ts +34 -8
- package/src/storage/asyncStorage.ts +88 -0
- package/src/surfaces/BannerBar.tsx +176 -0
- package/src/surfaces/BannerSurface.tsx +82 -0
- package/src/surfaces/MadeWithUserflow.tsx +15 -10
- package/src/surfaces/ModalSurface.tsx +1 -1
- package/src/surfaces/TooltipSurface.tsx +17 -1
- package/src/surfaces/bannerBarLayout.ts +74 -0
- package/src/surfaces/bannerBarTokens.ts +34 -0
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
- package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
- package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
- package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
- package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
- package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
- package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
- package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
- package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
- package/src/surfaces/resolveBannerTheme.ts +18 -0
- package/src/surfaces/safeArea.ts +88 -19
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js +4 -4
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/constants.d.ts +2 -0
- package/vendor/core/dist/constants.d.ts.map +1 -1
- package/vendor/core/dist/constants.js +2 -0
- package/vendor/core/dist/constants.js.map +1 -1
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts +20 -1
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/ClientConditionEngine.js +13 -10
- package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +41 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +167 -28
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +38 -2
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +19 -2
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +10 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +68 -29
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/handleActions.d.ts +17 -3
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +17 -14
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/trackCondition.d.ts +2 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackCondition.js +4 -2
- package/vendor/core/dist/engine/trackCondition.js.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +11 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.js +42 -16
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -1
- package/vendor/core/dist/errors.d.ts +11 -1
- package/vendor/core/dist/errors.d.ts.map +1 -1
- package/vendor/core/dist/errors.js +2 -1
- package/vendor/core/dist/errors.js.map +1 -1
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
- package/vendor/core/dist/eventAttributes.js +4 -2
- package/vendor/core/dist/eventAttributes.js.map +1 -1
- package/vendor/core/dist/index.d.ts +5 -2
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +1 -0
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.js +9 -7
- package/vendor/core/dist/normalizeAttributes.js.map +1 -1
- package/vendor/core/dist/transport/pairing.d.ts +5 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
- package/vendor/core/dist/transport/pairing.js +69 -2
- package/vendor/core/dist/transport/pairing.js.map +1 -1
- package/vendor/core/dist/transport/phoenix.d.ts +8 -0
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +16 -2
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/autoData.d.ts +8 -15
- package/vendor/protocol/dist/autoData.d.ts.map +1 -1
- package/vendor/protocol/dist/autoData.js.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +58 -2
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +20 -2
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +22 -12
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +5 -2
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,17 +9,28 @@ release for every content change.
|
|
|
9
9
|
|
|
10
10
|
## Requirements
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
|
12
|
+
Declared minimums: React `>=18.2.0`, React Native `>=0.74.0`. This package's
|
|
13
|
+
test suite runs on React Native 0.81 / React 19.1. The TinyTime sample app in
|
|
14
|
+
this repo runs on Expo SDK 57 / React Native 0.86. Expo Go is not supported.
|
|
15
|
+
|
|
16
|
+
Install AsyncStorage, WebView, and (on bare React Native) device-info in the
|
|
17
|
+
**app**, even though this package also depends on them. Expo SDK 54 and later
|
|
18
|
+
autolink transitive native modules. Bare React Native, and Expo SDK 53 and
|
|
19
|
+
older, only autolink packages listed in the app's own `package.json`. A direct
|
|
20
|
+
install also picks a version that matches the app's React Native.
|
|
21
|
+
|
|
22
|
+
| Package | Required? | Why | If missing |
|
|
23
|
+
| ------------------------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
+
| `react`, `react-native` | Yes | Host runtime. | The app cannot load the SDK. |
|
|
25
|
+
| `@react-native-async-storage/async-storage` | Yes, install in the app | Anonymous user id and the pairing device id. | `identifyAnonymous()` throws. Pairing keeps a device id in memory for the session. A dev-only warning is logged from `Userflow.init`. |
|
|
26
|
+
| `react-native-device-info` | Yes on bare React Native | Host app `app_version` / `app_build`. Expo reads `expo-application` / `expo-constants` instead. | Those attributes are omitted. A dev-only warning is logged on bare React Native. |
|
|
27
|
+
| `react-native-view-shot` `>=5.0.0` | Yes (peer) | Builder element-selection screenshots. | The picker has no screenshot. A dev-only warning is logged from `Userflow.init`. |
|
|
28
|
+
| `react-native-webview` `>=13.8.0` | Yes, install in the app | Evaluate JavaScript and WebView banners. | Those surfaces do not run. A dev-only warning is logged from `Userflow.init`. |
|
|
29
|
+
| `react-native-safe-area-context` | Optional | Insets for modal and tooltip surfaces. | One dev warning. Flow cards use the device's initial safe-area insets, or zero when those are unavailable. |
|
|
30
|
+
| `@react-navigation/native` | Optional | Screen tracking and NAVIGATE routing (React Navigation). | Report screens yourself with `updateScreen` / `useUserflowScreen`. |
|
|
31
|
+
| `expo-router` | Optional | Screen tracking and NAVIGATE routing (Expo Router). | Report screens yourself with `updateScreen` / `useUserflowScreen`. |
|
|
32
|
+
| `@react-native-community/netinfo` | Optional | Instant offline→online reconnect. | Recovery still runs on the heartbeat and when the app returns to the foreground. |
|
|
33
|
+
| `expo-secure-store` | Optional | Persist the Builder pairing JWT in Keychain/Keystore. | The pairing token stays in memory and is lost when the process ends. |
|
|
23
34
|
|
|
24
35
|
Optional peers are declared `optional: true` in `peerDependenciesMeta`, so
|
|
25
36
|
package managers will not warn if you skip them. Required peers (not marked
|
|
@@ -27,46 +38,75 @@ optional) will warn — or fail the install — if they are missing.
|
|
|
27
38
|
|
|
28
39
|
### Expo Go is not supported
|
|
29
40
|
|
|
30
|
-
Use an **Expo development build** (or bare React Native).
|
|
31
|
-
|
|
41
|
+
Use an **Expo development build** (or bare React Native). In development,
|
|
42
|
+
`Userflow.init` logs:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
[Userflow] This app is running in Expo Go, which cannot load the SDK native modules. Builder preview links will not open the app. Use a development build (npx expo run:ios / npx expo run:android).
|
|
46
|
+
```
|
|
32
47
|
|
|
33
48
|
## Install
|
|
34
49
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
50
|
+
### Access
|
|
51
|
+
|
|
52
|
+
Packages publish to the private `@userflow-tech` npm org. Userflow adds the
|
|
53
|
+
client's npm user or organization to a **read-only team** on that org. The
|
|
54
|
+
client then creates a **granular access token** on npm (Read-only, limited to
|
|
55
|
+
`@userflow-tech`). A `404` from `npm install` or `npm view @userflow-tech/react-native`
|
|
56
|
+
means the token is missing, or that user or org is not on the team. npm uses
|
|
57
|
+
404 for a private package the caller cannot see.
|
|
58
|
+
|
|
59
|
+
### npm, Yarn, and CI
|
|
60
|
+
|
|
61
|
+
npm and Yarn 1 read `.npmrc`. Do not commit the token:
|
|
38
62
|
|
|
39
63
|
```ini
|
|
40
64
|
@userflow-tech:registry=https://registry.npmjs.org/
|
|
41
65
|
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
|
42
66
|
```
|
|
43
67
|
|
|
68
|
+
Yarn 2 and later ignore `.npmrc`. Add this to `.yarnrc.yml` instead:
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
npmScopes:
|
|
72
|
+
userflow-tech:
|
|
73
|
+
npmRegistryServer: 'https://registry.npmjs.org'
|
|
74
|
+
npmAuthToken: '${NPM_TOKEN}'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Set `NPM_TOKEN` in the environment that installs dependencies: a local shell,
|
|
78
|
+
CI, and EAS (an EAS secret named `NPM_TOKEN`, available to the install step).
|
|
79
|
+
|
|
80
|
+
### Packages
|
|
81
|
+
|
|
44
82
|
```bash
|
|
45
83
|
# Expo (dev build)
|
|
46
|
-
npx expo install @userflow-tech/react-native react-native-view-shot@^5.0.0
|
|
84
|
+
npx expo install @userflow-tech/react-native @react-native-async-storage/async-storage react-native-webview react-native-view-shot@^5.0.0
|
|
47
85
|
|
|
48
86
|
# Bare React Native
|
|
49
|
-
npm install @userflow-tech/react-native react-native-view-shot
|
|
87
|
+
npm install @userflow-tech/react-native @react-native-async-storage/async-storage react-native-device-info react-native-webview react-native-view-shot@^5.0.0
|
|
50
88
|
cd ios && pod install
|
|
51
89
|
```
|
|
52
90
|
|
|
53
91
|
`react-native-view-shot` is a **required peer** (`>=5.0.0`). It is a native
|
|
54
|
-
module — rebuild after install (Metro reload is not enough). On Expo SDK 54,
|
|
92
|
+
module — rebuild after install (a Metro reload is not enough). On Expo SDK 54,
|
|
55
93
|
unpinned `npx expo install react-native-view-shot` resolves **4.0.3**, which
|
|
56
|
-
does not satisfy the peer
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
`@react-native-async-storage/async-storage` and `react-native-device-info` are
|
|
60
|
-
dependencies of this package and are installed automatically with a normal npm
|
|
61
|
-
install. After adding or upgrading the SDK, rebuild the native app (`cd ios &&
|
|
62
|
-
pod install`, then run again). If autolinking misses a bundled native module
|
|
63
|
-
(common with local `file:` links), install it in the host app explicitly:
|
|
94
|
+
does not satisfy the peer. Pin `^5.0.0` as in the command above. If `expo doctor`
|
|
95
|
+
reports that pin, exclude it from Expo's version check:
|
|
64
96
|
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"expo": {
|
|
100
|
+
"install": {
|
|
101
|
+
"exclude": ["react-native-view-shot"]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
68
105
|
```
|
|
69
106
|
|
|
107
|
+
On a bare React Native app, `expo-secure-store` needs Expo modules installed
|
|
108
|
+
first (`npx install-expo-modules@latest`), then `npx expo install expo-secure-store`.
|
|
109
|
+
|
|
70
110
|
Optional peers as needed:
|
|
71
111
|
|
|
72
112
|
```bash
|
|
@@ -78,72 +118,187 @@ For local tarball installs from this monorepo, pack with `pnpm pack:all` at the
|
|
|
78
118
|
repo root and install the single `@userflow-tech/react-native` tarball. Steps:
|
|
79
119
|
`docs/local-testing.md` in the monorepo.
|
|
80
120
|
|
|
121
|
+
### Install with an AI agent
|
|
122
|
+
|
|
123
|
+
Cursor, Claude Code, and other agents that read Agent Skills can do this
|
|
124
|
+
install. The skill is `install-react-native-with-ai` in
|
|
125
|
+
[userflow/ai-skills-library](https://github.com/userflow/ai-skills-library).
|
|
126
|
+
Web apps use `install-with-ai` from that library instead.
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npx skills add userflow/ai-skills-library@install-react-native-with-ai
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Claude Code loads it from the plugin:
|
|
133
|
+
|
|
134
|
+
```text
|
|
135
|
+
/plugin marketplace add userflow/ai-skills-library
|
|
136
|
+
/plugin install userflow@ai-skills-library
|
|
137
|
+
/userflow:install-react-native-with-ai
|
|
138
|
+
```
|
|
139
|
+
|
|
81
140
|
## Quick start
|
|
82
141
|
|
|
83
142
|
```tsx
|
|
84
143
|
import { Userflow, UserflowProvider } from '@userflow-tech/react-native';
|
|
85
144
|
|
|
86
145
|
await Userflow.init({
|
|
87
|
-
clientToken: 'ct_...', // from the Userflow dashboard → Environments
|
|
88
|
-
// serverEndpoint: 'https://e.userflow.com', // default
|
|
89
|
-
// pairingEndpoint: 'https://e.userflow.com', // default;
|
|
146
|
+
clientToken: 'ct_...', // from the Userflow dashboard → Environments. Never an esk_ secret key.
|
|
147
|
+
// serverEndpoint: 'https://e.userflow.com', // default (US). EU: 'https://e.eu.userflow.com'
|
|
148
|
+
// pairingEndpoint: 'https://e.userflow.com', // default; pairing stays on the US host
|
|
90
149
|
});
|
|
91
150
|
|
|
92
|
-
// Identified user — signature is computed by YOUR backend, never in the app
|
|
93
|
-
|
|
151
|
+
// Identified user — signature is computed by YOUR backend, never in the app.
|
|
152
|
+
// `locale_code` is the same user attribute as web (see Localization below).
|
|
153
|
+
await Userflow.identify('user-123', { name: 'Ada', locale_code: 'da-DK' }, { signature });
|
|
94
154
|
|
|
95
|
-
//
|
|
155
|
+
// Anonymous users count toward MAU. Call this only when you intend to identify
|
|
156
|
+
// signed-out users. The id is stored in AsyncStorage.
|
|
96
157
|
await Userflow.identifyAnonymous();
|
|
97
158
|
```
|
|
98
159
|
|
|
99
|
-
|
|
160
|
+
Call `Userflow.teardown()` when tearing the SDK down (removes AppState and
|
|
161
|
+
NetInfo subscriptions). Call `Userflow.reset()` on logout to clear identity and
|
|
162
|
+
disconnect. `reset()` does not apply a new `clientToken` or endpoint; restart
|
|
163
|
+
the app to change those.
|
|
164
|
+
|
|
165
|
+
### Where to put `init`, `identify`, and `UserflowProvider`
|
|
166
|
+
|
|
167
|
+
Call `Userflow.init` once, as early as you can, from the root component
|
|
168
|
+
(`app/_layout.tsx` with Expo Router, `App.tsx` with bare React Native or React
|
|
169
|
+
Navigation). `UserflowProvider` can mount before that promise resolves. Put it
|
|
170
|
+
once, near the top of the tree, inside `SafeAreaProvider`. Call `identify` after
|
|
171
|
+
sign-in. `identifyAnonymous` identifies signed-out users and counts them toward
|
|
172
|
+
MAU, so use it only when you mean to. Call `Userflow.reset()` on logout.
|
|
173
|
+
|
|
174
|
+
Expo Router:
|
|
100
175
|
|
|
101
176
|
```tsx
|
|
102
|
-
import {
|
|
177
|
+
import { useEffect } from 'react';
|
|
178
|
+
import { Userflow, UserflowProvider } from '@userflow-tech/react-native';
|
|
179
|
+
import { UserflowExpoRouterScreenTracker } from '@userflow-tech/react-native/expo-router';
|
|
180
|
+
import { Stack } from 'expo-router';
|
|
181
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
103
182
|
|
|
104
183
|
export default function RootLayout() {
|
|
184
|
+
useEffect(() => {
|
|
185
|
+
void Userflow.init({ clientToken: 'ct_...' });
|
|
186
|
+
}, []);
|
|
187
|
+
|
|
105
188
|
return (
|
|
106
|
-
<
|
|
107
|
-
<
|
|
108
|
-
|
|
189
|
+
<SafeAreaProvider>
|
|
190
|
+
<UserflowProvider>
|
|
191
|
+
<UserflowExpoRouterScreenTracker />
|
|
192
|
+
<Stack />
|
|
193
|
+
</UserflowProvider>
|
|
194
|
+
</SafeAreaProvider>
|
|
109
195
|
);
|
|
110
196
|
}
|
|
111
197
|
```
|
|
112
198
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
199
|
+
React Navigation:
|
|
200
|
+
|
|
201
|
+
```tsx
|
|
202
|
+
import { useEffect } from 'react';
|
|
203
|
+
import { Userflow, UserflowProvider } from '@userflow-tech/react-native';
|
|
204
|
+
import { WithUserflowReactNavigation } from '@userflow-tech/react-native/navigation';
|
|
205
|
+
import { NavigationContainer } from '@react-navigation/native';
|
|
206
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
207
|
+
|
|
208
|
+
export default function App() {
|
|
209
|
+
useEffect(() => {
|
|
210
|
+
void Userflow.init({ clientToken: 'ct_...' });
|
|
211
|
+
}, []);
|
|
212
|
+
|
|
213
|
+
return (
|
|
214
|
+
<SafeAreaProvider>
|
|
215
|
+
<UserflowProvider>
|
|
216
|
+
<WithUserflowReactNavigation>
|
|
217
|
+
<NavigationContainer>{/* navigators */}</NavigationContainer>
|
|
218
|
+
</WithUserflowReactNavigation>
|
|
219
|
+
</UserflowProvider>
|
|
220
|
+
</SafeAreaProvider>
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Without `SafeAreaProvider`, development logs this once and flow cards fall back
|
|
226
|
+
to the device's initial insets:
|
|
227
|
+
|
|
228
|
+
```text
|
|
229
|
+
[Userflow] UserflowProvider is not inside a <SafeAreaProvider>, so flow cards use the device's initial safe-area insets. Wrap your app in <SafeAreaProvider> from react-native-safe-area-context.
|
|
230
|
+
```
|
|
116
231
|
|
|
117
232
|
### Call order
|
|
118
233
|
|
|
119
|
-
| Call | Before `init()` resolves | Before `identify()`
|
|
120
|
-
| -------------------------------- | ------------------------------------------------------ |
|
|
121
|
-
| `identify` / `identifyAnonymous` | **Throws** `Call Userflow.init() before identify()` | —
|
|
122
|
-
| `group` | **Throws** `Call Userflow.init() before group()` | **Throws** `Call Userflow.identify() before group()`
|
|
123
|
-
| `updateUser` | **Throws** `Call Userflow.init() before updateUser()` | **Throws** `Call Userflow.identify() before updateUser()`
|
|
124
|
-
| `updateGroup` | **Throws** `Call Userflow.init() before updateGroup()` | **Throws** `Call Userflow.identify() before updateGroup()`; also requires a prior `group()`
|
|
125
|
-
| `track` | **Throws** `Call Userflow.init() before track()` | **Throws** `Call Userflow.identify() before track()
|
|
126
|
-
| `updateScreen` | Silently buffers; included on the next channel join | Silently buffers
|
|
234
|
+
| Call | Before `init()` resolves | Before `identify()` |
|
|
235
|
+
| -------------------------------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
236
|
+
| `identify` / `identifyAnonymous` | **Throws** `Call Userflow.init() before identify()` | — |
|
|
237
|
+
| `group` | **Throws** `Call Userflow.init() before group()` | **Throws** `Call Userflow.identify() before group()` |
|
|
238
|
+
| `updateUser` | **Throws** `Call Userflow.init() before updateUser()` | **Throws** `Call Userflow.identify() before updateUser()` |
|
|
239
|
+
| `updateGroup` | **Throws** `Call Userflow.init() before updateGroup()` | **Throws** `Call Userflow.identify() before updateGroup()`; also requires a prior `group()` |
|
|
240
|
+
| `track` | **Throws** `Call Userflow.init() before track()` | **Throws** `Call Userflow.identify() before track()`. Network, rate-limit, and unexpected SDK errors are isolated (the promise resolves; see [isolation.md](docs/isolation.md)) |
|
|
241
|
+
| `updateScreen` | Silently buffers; included on the next channel join | Silently buffers |
|
|
127
242
|
|
|
128
243
|
Other rules:
|
|
129
244
|
|
|
130
|
-
- `init()` is **idempotent
|
|
131
|
-
**not** apply new options.
|
|
132
|
-
|
|
245
|
+
- `init()` is **idempotent** once it has succeeded. A later call returns the
|
|
246
|
+
cached promise and does **not** apply new options. In development, a call
|
|
247
|
+
with a different `clientToken`, `serverEndpoint`, or `pairingEndpoint` while
|
|
248
|
+
that init is in flight or has succeeded logs
|
|
249
|
+
`[Userflow] Userflow.init() already ran with different options. The new clientToken, serverEndpoint, and pairingEndpoint are ignored because init runs once per process. Userflow.reset() does not apply new credentials. Restart the app to change them.`
|
|
250
|
+
Restart the app to change them after a successful init. If `init` rejects
|
|
251
|
+
(wrong token, or the EU endpoint hint), call it again with the corrected
|
|
252
|
+
options; that retry runs. `Userflow.reset()` clears the signed-in user;
|
|
253
|
+
it does not apply new credentials.
|
|
133
254
|
- `identify()` with a **different** user id resets the previous identity first.
|
|
134
255
|
Same-id re-identify merges attributes.
|
|
135
256
|
- Identity verification `signature` is optional in the type, but **required by
|
|
136
257
|
the server** when the environment has identity verification enabled. See
|
|
137
258
|
[docs/identity-verification.md](docs/identity-verification.md).
|
|
138
259
|
|
|
260
|
+
## Localization
|
|
261
|
+
|
|
262
|
+
Pass the end-user's locale the same way as userflow.js: as a user attribute on
|
|
263
|
+
`identify`, `identifyAnonymous`, or `updateUser`. The attribute name is the
|
|
264
|
+
company's locale attribute (default `locale_code`).
|
|
265
|
+
|
|
266
|
+
```ts
|
|
267
|
+
await Userflow.identify('user-123', { name: 'Ada', locale_code: 'da-DK' }, { signature });
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
When that locale is enabled on the flow in the Builder, the end-user sees the
|
|
271
|
+
translated content. If the user has no locale stored, or the stored code is not
|
|
272
|
+
a locale the company has set up, the flow stays in its original language.
|
|
273
|
+
Omitting the attribute on a later identify does not clear a locale already
|
|
274
|
+
stored for that user. A locale the company has, but that is not enabled on this
|
|
275
|
+
flow, hides the flow — same as web.
|
|
276
|
+
|
|
277
|
+
The value is stored on the end user under the company's locale attribute.
|
|
278
|
+
Identifying the same user id on mobile keeps a locale already sent from the web
|
|
279
|
+
app, so mobile does not need to send it again. Sending a new value overwrites
|
|
280
|
+
it; sending `null` clears it. The SDK does not read the device locale.
|
|
281
|
+
|
|
282
|
+
## Host isolation
|
|
283
|
+
|
|
284
|
+
The SDK is in-process JS, so it cannot fully sandbox itself from the host app.
|
|
285
|
+
Overlay render errors and fire-and-forget tracking failures are caught, logged
|
|
286
|
+
as `[Userflow] isolated error` via `console.warn`, and swallowed so they cannot
|
|
287
|
+
unmount or crash the host tree. `init` / `identify` still throw — a swallowed
|
|
288
|
+
identify would look like success. Native crashes and errors in **your** children
|
|
289
|
+
of `UserflowProvider` are out of scope.
|
|
290
|
+
|
|
291
|
+
Details: [docs/isolation.md](docs/isolation.md).
|
|
292
|
+
|
|
139
293
|
## Screen tracking
|
|
140
294
|
|
|
141
295
|
Each accepted screen/path also sends a `screen_viewed` event after identify
|
|
142
|
-
(with `screen_name
|
|
143
|
-
`UpdateClientContext`; both count toward
|
|
144
|
-
presentations are skipped (Expo Router also
|
|
145
|
-
that do not change the pathname are
|
|
146
|
-
|
|
296
|
+
(with `screen_name`, which holds the Expo Router path or the screen name). That
|
|
297
|
+
is a second client message alongside `UpdateClientContext`; both count toward
|
|
298
|
+
the 100/min cap. Modal / sheet presentations are skipped (Expo Router also
|
|
299
|
+
watches navigation state, so overlays that do not change the pathname are
|
|
300
|
+
skipped too). Returning from background past the lifecycle grace window
|
|
301
|
+
re-fires the current screen.
|
|
147
302
|
|
|
148
303
|
### Expo Router
|
|
149
304
|
|
|
@@ -155,13 +310,16 @@ subpath under `UserflowProvider` (the tracker is a separate entry so apps withou
|
|
|
155
310
|
import { UserflowProvider } from '@userflow-tech/react-native';
|
|
156
311
|
import { UserflowExpoRouterScreenTracker } from '@userflow-tech/react-native/expo-router';
|
|
157
312
|
import { Stack } from 'expo-router';
|
|
313
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
158
314
|
|
|
159
315
|
export default function RootLayout() {
|
|
160
316
|
return (
|
|
161
|
-
<
|
|
162
|
-
<
|
|
163
|
-
|
|
164
|
-
|
|
317
|
+
<SafeAreaProvider>
|
|
318
|
+
<UserflowProvider>
|
|
319
|
+
<UserflowExpoRouterScreenTracker />
|
|
320
|
+
<Stack />
|
|
321
|
+
</UserflowProvider>
|
|
322
|
+
</SafeAreaProvider>
|
|
165
323
|
);
|
|
166
324
|
}
|
|
167
325
|
```
|
|
@@ -175,14 +333,17 @@ Wrap `NavigationContainer` with `WithUserflowReactNavigation` from the
|
|
|
175
333
|
import { UserflowProvider } from '@userflow-tech/react-native';
|
|
176
334
|
import { WithUserflowReactNavigation } from '@userflow-tech/react-native/navigation';
|
|
177
335
|
import { NavigationContainer } from '@react-navigation/native';
|
|
336
|
+
import { SafeAreaProvider } from 'react-native-safe-area-context';
|
|
178
337
|
|
|
179
338
|
export default function App() {
|
|
180
339
|
return (
|
|
181
|
-
<
|
|
182
|
-
<
|
|
183
|
-
<
|
|
184
|
-
|
|
185
|
-
|
|
340
|
+
<SafeAreaProvider>
|
|
341
|
+
<UserflowProvider>
|
|
342
|
+
<WithUserflowReactNavigation>
|
|
343
|
+
<NavigationContainer>{/* navigators */}</NavigationContainer>
|
|
344
|
+
</WithUserflowReactNavigation>
|
|
345
|
+
</UserflowProvider>
|
|
346
|
+
</SafeAreaProvider>
|
|
186
347
|
);
|
|
187
348
|
}
|
|
188
349
|
```
|
|
@@ -200,9 +361,11 @@ useUserflowScreen(route.name);
|
|
|
200
361
|
## Element targeting (anchors)
|
|
201
362
|
|
|
202
363
|
Tooltip steps and ELEMENT client conditions resolve a dashboard selector like
|
|
203
|
-
`#invite-teammates` to a host view.
|
|
204
|
-
`accessibilityLabel`
|
|
205
|
-
mean the tooltip misses **or** a gated flow
|
|
364
|
+
`#invite-teammates` to a host view. Tag it with `userflowId` (strongest), then
|
|
365
|
+
`testID`, then `nativeID`, then `accessibilityLabel` — no SDK hook required. A
|
|
366
|
+
misspelled or missing anchor can mean the tooltip misses **or** a gated flow
|
|
367
|
+
never starts at all. `PRESENT`, `NOT_PRESENT`, `CLICK`, and `NOT_CLICK`
|
|
368
|
+
auto-start conditions are evaluated on device.
|
|
206
369
|
|
|
207
370
|
```tsx
|
|
208
371
|
import { Pressable, Text } from 'react-native';
|
|
@@ -230,10 +393,10 @@ Full contract, prop priority, missing-target behavior, and duplicate-id rules:
|
|
|
230
393
|
|
|
231
394
|
To preview draft flows from the Userflow builder onto a device (QR / deep link):
|
|
232
395
|
|
|
233
|
-
1. Register the environment's **`scheme_id`** (e.g.
|
|
234
|
-
the env UUID) with the
|
|
235
|
-
|
|
236
|
-
reload is not enough.
|
|
396
|
+
1. Register the environment's **`scheme_id`** (e.g.
|
|
397
|
+
`userflow-v7twv2fw2ja2jaco7kesvowmem` — **not** the env UUID) with the
|
|
398
|
+
`@userflow-tech/react-native` config plugin, then **rebuild native**
|
|
399
|
+
(`npx expo prebuild` / a new development client). Metro reload is not enough.
|
|
237
400
|
2. Call `Userflow.init` (optionally with `pairingEndpoint` / `serverEndpoint`
|
|
238
401
|
for staging or local stacks) and wrap the tree in `UserflowProvider`.
|
|
239
402
|
3. Open the builder Preview dialog → **Pair a device** → scan/open the QR. The
|
|
@@ -243,7 +406,9 @@ To preview draft flows from the Userflow builder onto a device (QR / deep link):
|
|
|
243
406
|
```json
|
|
244
407
|
{
|
|
245
408
|
"expo": {
|
|
246
|
-
"plugins": [
|
|
409
|
+
"plugins": [
|
|
410
|
+
["@userflow-tech/react-native", { "schemeId": "userflow-v7twv2fw2ja2jaco7kesvowmem" }]
|
|
411
|
+
]
|
|
247
412
|
}
|
|
248
413
|
}
|
|
249
414
|
```
|
|
@@ -259,12 +424,12 @@ await Userflow.init({
|
|
|
259
424
|
|
|
260
425
|
Deep-link / pairing helpers:
|
|
261
426
|
|
|
262
|
-
| Member | Description
|
|
263
|
-
| ----------------------- |
|
|
264
|
-
| `didHandleURL(url)` | Handle a one-shot preview deep link (`…://?token=…`).
|
|
265
|
-
| `handlePairingUrl(url)` | Handle a pairing deep link (`…://?pairing_token
|
|
266
|
-
| `exitPreview()` | Disconnect the pairing websocket and leave preview mode.
|
|
267
|
-
| `PreviewModeBanner` | Mounted by `UserflowProvider` while paired
|
|
427
|
+
| Member | Description |
|
|
428
|
+
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
429
|
+
| `didHandleURL(url)` | Handle a one-shot preview deep link (`…://?token=…`). |
|
|
430
|
+
| `handlePairingUrl(url)` | Handle a pairing deep link (`…://?pairing_token=…`, optionally `&purpose=preview` or `&purpose=select_element`). |
|
|
431
|
+
| `exitPreview()` | Disconnect the pairing websocket and leave preview mode. |
|
|
432
|
+
| `PreviewModeBanner` | Mounted by `UserflowProvider` while paired. The top bar shows at once for a preview link, stays hidden for an element-selection link and after any pick until the next preview, and waits briefly on a link with no purpose. |
|
|
268
433
|
|
|
269
434
|
Full scheme registration, Linking ownership, and verify commands:
|
|
270
435
|
[docs/deep-linking.md](docs/deep-linking.md). Symptom table:
|
|
@@ -299,54 +464,54 @@ Screen tracking ≠ action routing. React Navigation apps need
|
|
|
299
464
|
|
|
300
465
|
### `Userflow`
|
|
301
466
|
|
|
302
|
-
| Member | Description
|
|
303
|
-
| --------------------------------------------------------- |
|
|
304
|
-
| `init(config)` | Validate credentials, store config, start lifecycle + network controllers.
|
|
305
|
-
| `identify(userId, attributes?, options?)` | Identify a user; auto-sets `sdk` / `device_os` / `device_type` and `app_version` / `app_build` from init; `options.signature` for identity verification.
|
|
306
|
-
| `identifyAnonymous(attributes?, options?)` | Stable anonymous id via AsyncStorage; auto-sets `sdk` / `device_os` / `device_type` and `app_version` / `app_build`.
|
|
307
|
-
| `group(groupId, attributes?, options?)` | Associate the current user with a group.
|
|
308
|
-
| `updateUser(attributes?)` | Upsert attributes for the current user without re-identifying.
|
|
309
|
-
| `updateGroup(attributes?, options?)` | Upsert group / membership attributes without re-grouping.
|
|
310
|
-
| `track(name, attributes?, options?)` | Record a custom event (literal attribute values only); `userOnly` skips group.
|
|
311
|
-
| `reset()` | Clear identity, client conditions, flow session; disconnect.
|
|
312
|
-
| `teardown()` | Stop AppState / NetInfo / screen-tracking subscriptions.
|
|
313
|
-
| `updateScreen(name)` | Report the active screen (prefer hooks when possible).
|
|
314
|
-
| `setOnNavigate(handler)` | Override or clear the host NAVIGATE handler.
|
|
315
|
-
| `reportActivity()` | Reset the idle timer; reconnect an idle-suspended socket.
|
|
316
|
-
| `didHandleURL(url)` | Handle a Userflow preview deep link (`…://?token=…`).
|
|
317
|
-
| `handlePairingUrl(url)` | Handle a Builder pairing deep link (`…://?pairing_token
|
|
318
|
-
| `exitPreview()` | Leave Builder preview mode; disconnect the pairing websocket
|
|
319
|
-
| `inspectPairingDeepLink(url)` | Classify a URL as pairing without consuming it; reports rejection reason.
|
|
320
|
-
| `isPairingAttempt(reason)` | True when a rejection was a recognisable pairing attempt worth reporting.
|
|
321
|
-
| `parsePairingDeepLink(url)` / `isUserflowPairingUrl(url)` | Parse / detect a pairing deep link.
|
|
322
|
-
| `getUserId()` | Current user id, or `null` before identify.
|
|
323
|
-
| `getAttributes()` | Copy of attributes for the current user.
|
|
324
|
-
| `getFlowSessionEngine()` | Mid-flow session engine (created lazily; attach runs after identify).
|
|
325
|
-
| `getHostAppVersion()` | Host app native version cached at init, or `null` before init / when unavailable.
|
|
326
|
-
| `getDeviceContext()` | Platform metadata cached during `init` (`sdk`, `deviceOs`, `deviceType`), or `null` before init.
|
|
327
|
-
| `logHostAppVersion()` | Log the host app's native version (not `SDK_VERSION`) and platform OS. Uses bundled device-info on bare RN.
|
|
328
|
-
| `logDeviceContext()` | Log cached user-attribute values (`sdk` / `device_os` / `device_type`). Requires `init`.
|
|
467
|
+
| Member | Description |
|
|
468
|
+
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
469
|
+
| `init(config)` | Validate credentials, store config, start lifecycle + network controllers. |
|
|
470
|
+
| `identify(userId, attributes?, options?)` | Identify a user; auto-sets `sdk` / `device_os` / `device_type` and `app_version` / `app_build` from init; `options.signature` for identity verification. |
|
|
471
|
+
| `identifyAnonymous(attributes?, options?)` | Stable anonymous id via AsyncStorage; auto-sets `sdk` / `device_os` / `device_type` and `app_version` / `app_build`. |
|
|
472
|
+
| `group(groupId, attributes?, options?)` | Associate the current user with a group. |
|
|
473
|
+
| `updateUser(attributes?)` | Upsert attributes for the current user without re-identifying. |
|
|
474
|
+
| `updateGroup(attributes?, options?)` | Upsert group / membership attributes without re-grouping. |
|
|
475
|
+
| `track(name, attributes?, options?)` | Record a custom event (literal attribute values only); `userOnly` skips group. Misuse (`UserflowAuthError`) rejects; network / rate-limit / SDK bugs are isolated. |
|
|
476
|
+
| `reset()` | Clear identity, client conditions, flow session; disconnect. |
|
|
477
|
+
| `teardown()` | Stop AppState / NetInfo / screen-tracking subscriptions. |
|
|
478
|
+
| `updateScreen(name)` | Report the active screen (prefer hooks when possible). |
|
|
479
|
+
| `setOnNavigate(handler)` | Override or clear the host NAVIGATE handler. |
|
|
480
|
+
| `reportActivity()` | Reset the idle timer; reconnect an idle-suspended socket. |
|
|
481
|
+
| `didHandleURL(url)` | Handle a Userflow preview deep link (`…://?token=…`). |
|
|
482
|
+
| `handlePairingUrl(url)` | Handle a Builder pairing deep link (`…://?pairing_token=…`). Works in every build; the signed JWT gates the session. |
|
|
483
|
+
| `exitPreview()` | Leave Builder preview mode; disconnect the pairing websocket. Works in every build. |
|
|
484
|
+
| `inspectPairingDeepLink(url)` | Classify a URL as pairing without consuming it; reports rejection reason. |
|
|
485
|
+
| `isPairingAttempt(reason)` | True when a rejection was a recognisable pairing attempt worth reporting. |
|
|
486
|
+
| `parsePairingDeepLink(url)` / `isUserflowPairingUrl(url)` | Parse / detect a pairing deep link. |
|
|
487
|
+
| `getUserId()` | Current user id, or `null` before identify. |
|
|
488
|
+
| `getAttributes()` | Copy of attributes for the current user. |
|
|
489
|
+
| `getFlowSessionEngine()` | Mid-flow session engine (created lazily; attach runs after identify). |
|
|
490
|
+
| `getHostAppVersion()` | Host app native version cached at init, or `null` before init / when unavailable. |
|
|
491
|
+
| `getDeviceContext()` | Platform metadata cached during `init` (`sdk`, `deviceOs`, `deviceType`), or `null` before init. |
|
|
492
|
+
| `logHostAppVersion()` | Log the host app's native version (not `SDK_VERSION`) and platform OS. Uses bundled device-info on bare RN. |
|
|
493
|
+
| `logDeviceContext()` | Log cached user-attribute values (`sdk` / `device_os` / `device_type`). Requires `init`. |
|
|
329
494
|
|
|
330
495
|
### Hooks and components
|
|
331
496
|
|
|
332
|
-
| Export | Description
|
|
333
|
-
| --------------------------------------- |
|
|
334
|
-
| `UserflowProvider` | Root overlay host. Does not track screens on its own.
|
|
335
|
-
| `PreviewModeBanner` | Shown by the provider
|
|
336
|
-
| `useUserflow()` | Provider context (`{ engine }`); throws outside the provider.
|
|
337
|
-
| `useFlowSessionState()` | Reactive view of the active mid-flow session (advanced / custom UI).
|
|
338
|
-
| `useUserflowScreen(name)` | Report the active screen from a React tree.
|
|
339
|
-
| `useUserflowAnchor(id)` | Optional override: register a view as a MANUAL target (beats `testID`).
|
|
340
|
-
| `useUserflowScrollContainer(onScroll?)` | Optional override: register a `ScrollView` for tooltip scroll-into-view.
|
|
341
|
-
| `Userflow.setScrollPadding(padding)` | Sticky chrome insets when scrolling targets into view.
|
|
342
|
-
| `Userflow.setCustomScrollIntoView(fn)` | Replace scroll-into-view (e.g. unsupported scroll libraries).
|
|
497
|
+
| Export | Description |
|
|
498
|
+
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
499
|
+
| `UserflowProvider` | Root overlay host. Does not track screens on its own. Overlay render errors are isolated from host children. |
|
|
500
|
+
| `PreviewModeBanner` | Shown by the provider while a Builder pairing session is active. It shows at once for a preview link, stays hidden for an element-selection link and after any pick until the next preview, and waits briefly on a link with no purpose. |
|
|
501
|
+
| `useUserflow()` | Provider context (`{ engine }`); throws outside the provider. |
|
|
502
|
+
| `useFlowSessionState()` | Reactive view of the active mid-flow session (advanced / custom UI). |
|
|
503
|
+
| `useUserflowScreen(name)` | Report the active screen from a React tree. |
|
|
504
|
+
| `useUserflowAnchor(id)` | Optional override: register a view as a MANUAL target (beats `userflowId` / `testID`). |
|
|
505
|
+
| `useUserflowScrollContainer(onScroll?)` | Optional override: register a `ScrollView` for tooltip scroll-into-view. |
|
|
506
|
+
| `Userflow.setScrollPadding(padding)` | Sticky chrome insets when scrolling targets into view. |
|
|
507
|
+
| `Userflow.setCustomScrollIntoView(fn)` | Replace scroll-into-view (e.g. unsupported scroll libraries). |
|
|
343
508
|
|
|
344
509
|
### Subpath exports
|
|
345
510
|
|
|
346
|
-
| Import | Provides
|
|
347
|
-
| ----------------------------------------- |
|
|
348
|
-
| `@userflow-tech/react-native/navigation` | `WithUserflowReactNavigation`
|
|
349
|
-
| `@userflow-tech/react-native/expo-router` | `UserflowExpoRouterScreenTracker`, `useUserflowExpoRouter` |
|
|
511
|
+
| Import | Provides |
|
|
512
|
+
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
513
|
+
| `@userflow-tech/react-native/navigation` | `WithUserflowReactNavigation` |
|
|
514
|
+
| `@userflow-tech/react-native/expo-router` | `UserflowExpoRouterScreenTracker`, `useUserflowExpoRouter`, `redirectSystemPath` (for `+native-intent`) |
|
|
350
515
|
|
|
351
516
|
### Constants
|
|
352
517
|
|
|
@@ -359,24 +524,160 @@ Screen tracking ≠ action routing. React Navigation apps need
|
|
|
359
524
|
|
|
360
525
|
## Guides in this package
|
|
361
526
|
|
|
362
|
-
| Doc | Topic
|
|
363
|
-
| -------------------------------------------------------------- |
|
|
364
|
-
| [docs/anchoring.md](docs/anchoring.md) | Manual targets, scroll containers, missing-target behavior
|
|
365
|
-
| [docs/
|
|
366
|
-
| [docs/
|
|
367
|
-
| [docs/
|
|
368
|
-
| [docs/
|
|
527
|
+
| Doc | Topic |
|
|
528
|
+
| -------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
529
|
+
| [docs/anchoring.md](docs/anchoring.md) | Manual targets, scroll containers, missing-target behavior |
|
|
530
|
+
| [docs/isolation.md](docs/isolation.md) | What “isolated as possible” means; overlay + `track` guards |
|
|
531
|
+
| [docs/deep-linking.md](docs/deep-linking.md) | Builder preview URLs and pairing sessions |
|
|
532
|
+
| [docs/identity-verification.md](docs/identity-verification.md) | HMAC signature on your backend |
|
|
533
|
+
| [docs/troubleshooting.md](docs/troubleshooting.md) | Symptom → cause for common integration failures |
|
|
534
|
+
| [docs/theme-mapping.md](docs/theme-mapping.md) | Web → RN theme token mapping (contributor-facing) |
|
|
369
535
|
|
|
370
536
|
## Experimental
|
|
371
537
|
|
|
372
538
|
- AUTO / codeless element targeting (exact-id fast path + scored matcher;
|
|
373
539
|
scored path needs Babel full mode to populate the auto-anchor registry).
|
|
374
540
|
See [docs/anchoring.md](docs/anchoring.md).
|
|
541
|
+
- Build-time stamping with `@userflow-tech/react-native/babel-plugin`. Jest
|
|
542
|
+
runs the plugin too, which changes snapshots. Read
|
|
543
|
+
[Babel plugin and snapshot tests](#babel-plugin-and-snapshot-tests) before
|
|
544
|
+
enabling it.
|
|
545
|
+
|
|
546
|
+
## Install diagnostics
|
|
547
|
+
|
|
548
|
+
In development, the first `Userflow.init` checks native module registration and
|
|
549
|
+
logs one warning when something the SDK needs is not linked. It does not
|
|
550
|
+
`require` an unlinked package. Rebuild the native app after fixing the list; a
|
|
551
|
+
Metro reload is not enough. The warning looks like this (only the missing lines
|
|
552
|
+
are included):
|
|
553
|
+
|
|
554
|
+
```text
|
|
555
|
+
[Userflow] Native setup is incomplete. Flows may not run until you fix the following, then rebuild the app (a Metro reload is not enough):
|
|
556
|
+
- @react-native-async-storage/async-storage is not linked. Anonymous users and Builder pairing will not persist. Add it to the app package.json (npx expo install @react-native-async-storage/async-storage), run pod install on iOS, and rebuild.
|
|
557
|
+
- react-native-view-shot is not linked, so Builder element selection gets no screenshot. Install react-native-view-shot@^5.0.0 and rebuild. On Expo SDK 54, pin ^5.0.0; an unpinned npx expo install resolves 4.0.3.
|
|
558
|
+
- react-native-webview is not linked. Evaluate JavaScript and WebView banners will not run. Install it (npx expo install react-native-webview) and rebuild.
|
|
559
|
+
- react-native-device-info is not linked, so app_version and app_build are not sent. npm install react-native-device-info, then rebuild.
|
|
560
|
+
See docs/troubleshooting.md.
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
Passing an environment secret key as `clientToken` throws:
|
|
564
|
+
|
|
565
|
+
```text
|
|
566
|
+
clientToken is an environment secret key (esk_...). That key must never ship in the app. Pass the client token (ct_...) from Settings → Environments instead.
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
When the default US endpoint rejects the token with `invalid_client_token`, the
|
|
570
|
+
error also says: `For EU-hosted environments pass serverEndpoint: 'https://e.eu.userflow.com'.`
|
|
571
|
+
Pairing stays on `https://e.userflow.com`.
|
|
572
|
+
|
|
573
|
+
`expo prebuild` warns when the config plugin has no `schemeId`, when
|
|
574
|
+
`react-native-view-shot` is missing or older than 5, and (on Expo SDK 53 and
|
|
575
|
+
older) when AsyncStorage or WebView is not a direct dependency. Passing an
|
|
576
|
+
environment UUID as `schemeId` fails the prebuild:
|
|
577
|
+
|
|
578
|
+
```text
|
|
579
|
+
[@userflow-tech/react-native] schemeId "550e8400-e29b-41d4-a716-446655440000" looks like an environment id. Pass the scheme_id value that starts with userflow- (an opaque id from the dashboard), not the environment UUID.
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
## Jest
|
|
583
|
+
|
|
584
|
+
Mock the package in the host app's Jest setup so tests do not load native
|
|
585
|
+
modules. Mock the router entry you import as well:
|
|
586
|
+
|
|
587
|
+
```ts
|
|
588
|
+
// jest.setup.ts
|
|
589
|
+
import type { ReactNode } from 'react';
|
|
590
|
+
|
|
591
|
+
jest.mock('@userflow-tech/react-native', () => ({
|
|
592
|
+
Userflow: {
|
|
593
|
+
init: jest.fn(() => Promise.resolve()),
|
|
594
|
+
identify: jest.fn(() => Promise.resolve()),
|
|
595
|
+
identifyAnonymous: jest.fn(() => Promise.resolve()),
|
|
596
|
+
reset: jest.fn(() => Promise.resolve()),
|
|
597
|
+
track: jest.fn(() => Promise.resolve()),
|
|
598
|
+
updateScreen: jest.fn(),
|
|
599
|
+
},
|
|
600
|
+
UserflowProvider: ({ children }: { children: ReactNode }) => children,
|
|
601
|
+
}));
|
|
602
|
+
|
|
603
|
+
// Expo Router
|
|
604
|
+
jest.mock('@userflow-tech/react-native/expo-router', () => ({
|
|
605
|
+
UserflowExpoRouterScreenTracker: () => null,
|
|
606
|
+
}));
|
|
607
|
+
|
|
608
|
+
// React Navigation
|
|
609
|
+
jest.mock('@userflow-tech/react-native/navigation', () => ({
|
|
610
|
+
WithUserflowReactNavigation: ({ children }: { children: ReactNode }) => children,
|
|
611
|
+
}));
|
|
612
|
+
```
|
|
613
|
+
|
|
614
|
+
In a JavaScript setup file, drop the `ReactNode` import and the type
|
|
615
|
+
annotations.
|
|
616
|
+
|
|
617
|
+
A custom Metro config that does not extend `getDefaultConfig` from `expo/metro-config`
|
|
618
|
+
or `@react-native/metro-config` leaves `allowOptionalDependencies` off. Optional
|
|
619
|
+
peers that this package loads inside `try/catch` then fail the bundle with
|
|
620
|
+
`Unable to resolve module`. Extend the default config so that flag stays on.
|
|
621
|
+
|
|
622
|
+
### Babel plugin and snapshot tests
|
|
623
|
+
|
|
624
|
+
If you add the optional `@userflow-tech/react-native/babel-plugin` to
|
|
625
|
+
`babel.config.js`, Jest runs it too, because `babel-jest` reads the same config.
|
|
626
|
+
The plugin adds props to `View`, `Text`, `Pressable`, the Touchables,
|
|
627
|
+
`TextInput`, and `Image`, and React Native's Jest mocks render them, so they
|
|
628
|
+
appear in snapshots:
|
|
629
|
+
|
|
630
|
+
```diff
|
|
631
|
+
<Text
|
|
632
|
+
+ __ufid="src/SettingsScreen.tsx::SettingsScreen > View#0 > Text{text=Settings}"
|
|
633
|
+
+ collapsable={false}
|
|
634
|
+
+ nativeID="uf_1mcelg9"
|
|
635
|
+
>
|
|
636
|
+
Settings
|
|
637
|
+
</Text>
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
- `nativeID="uf_…"` is added to elements without a `testID`, `nativeID`, or
|
|
641
|
+
`userflowId`.
|
|
642
|
+
- `collapsable={false}` is added to `View`, `Text`, `Pressable`, and the
|
|
643
|
+
Touchables, including elements that have a `testID`.
|
|
644
|
+
- `__ufid` (the element's path in the file) is added in every non-production
|
|
645
|
+
build, which includes Jest.
|
|
646
|
+
- `__ufManual="true"` is added to elements that have a `testID`, `nativeID`, or
|
|
647
|
+
`userflowId`.
|
|
648
|
+
|
|
649
|
+
Updating the snapshots once does not settle it. The ids come from the file path,
|
|
650
|
+
the component name, each element's position among siblings of the same type, and
|
|
651
|
+
static labels. Changing a label, adding an element above others of the same type,
|
|
652
|
+
or moving or renaming a file changes them again. The plugin also imports this
|
|
653
|
+
package into every stamped file, so any test that renders a stamped component
|
|
654
|
+
loads the SDK. Keep the mock above in the Jest setup file.
|
|
655
|
+
|
|
656
|
+
Skip the plugin under Jest:
|
|
657
|
+
|
|
658
|
+
```js
|
|
659
|
+
// babel.config.js
|
|
660
|
+
module.exports = function (api) {
|
|
661
|
+
const isTest = api.env('test');
|
|
662
|
+
return {
|
|
663
|
+
presets: ['babel-preset-expo'],
|
|
664
|
+
plugins: isTest ? [] : ['@userflow-tech/react-native/babel-plugin'],
|
|
665
|
+
};
|
|
666
|
+
};
|
|
667
|
+
```
|
|
668
|
+
|
|
669
|
+
Remove `api.cache(true)` if your config has it. Called before `api.env`, it makes
|
|
670
|
+
Babel throw `Caching has already been configured with .never or .forever()`.
|
|
671
|
+
`api.env` already caches the config per environment. Development and release
|
|
672
|
+
builds still run the plugin.
|
|
673
|
+
|
|
674
|
+
To keep some stamping under test, pass `{ stampOnly: isTest }` to the plugin
|
|
675
|
+
instead. Snapshots then gain only `nativeID` and `collapsable`, and stamped files
|
|
676
|
+
skip the SDK import. The plugin's `exclude` option does not help here: it skips
|
|
677
|
+
the files it lists, not the components a test renders.
|
|
375
678
|
|
|
376
679
|
## What is not available yet
|
|
377
680
|
|
|
378
|
-
- Banners and embed (inline) surfaces
|
|
379
|
-
- `Userflow.track()` / custom event tracking
|
|
380
681
|
- `INPUT_VALUE` / `FILLED_IN_INPUT` client conditions
|
|
381
682
|
|
|
382
683
|
Flows gated on unsupported client conditions stay unknown and **never start**.
|