@userflow-tech/react-native 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -77
- 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/deep-linking.md +70 -33
- package/docs/isolation.md +75 -0
- package/docs/troubleshooting.md +40 -17
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +14 -8
- package/expo-plugin/withUserflow.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/fiber/fiberPath.js +122 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +60 -50
- 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/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/resolveAutoAnchorHost.js +22 -15
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/semanticMatcher.js +26 -8
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
- package/lib/commonjs/anonymousId.js +4 -1
- 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 +118 -43
- package/lib/commonjs/index.js.map +1 -1
- 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 +47 -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 +19 -12
- 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 +135 -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/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 +23 -0
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- 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 +60 -50
- 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/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/resolveAutoAnchorHost.js +22 -15
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/module/anchors/semanticMatcher.js +26 -9
- package/lib/module/anchors/semanticMatcher.js.map +1 -1
- package/lib/module/anonymousId.js +4 -2
- 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 +114 -45
- package/lib/module/index.js.map +1 -1
- 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 +41 -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 +19 -12
- 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 +136 -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/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 +22 -0
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/version.js +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/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 +5 -4
- 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/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/resolveAutoAnchorHost.d.ts.map +1 -1
- 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/anonymousId.d.ts +1 -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/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.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/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 +6 -0
- 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/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- 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 +5 -4
- 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/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/resolveAutoAnchorHost.d.ts.map +1 -1
- 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/anonymousId.d.ts +1 -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/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.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/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 +6 -0
- 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 +4 -3
- package/src/anchors/AutoAnchorRegistry.ts +41 -11
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +57 -47
- package/src/anchors/fiber/resolveFiberPath.ts +215 -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/resolveAutoAnchorHost.ts +17 -15
- package/src/anchors/semanticMatcher.ts +38 -14
- package/src/anonymousId.ts +2 -1
- 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 +129 -45
- 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 +43 -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 +19 -12
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +139 -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/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 +29 -0
- 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/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/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 +47 -27
- 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 +4 -1
- 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/docs/deep-linking.md
CHANGED
|
@@ -20,14 +20,15 @@ pick the environment.
|
|
|
20
20
|
Example:
|
|
21
21
|
|
|
22
22
|
```text
|
|
23
|
-
userflow-
|
|
23
|
+
userflow-v7twv2fw2ja2jaco7kesvowmem://?token=SFMyNTY...
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
- `{schemeId}` is your environment's `scheme_id` from the dashboard
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
- `{schemeId}` is your environment's `scheme_id` from the dashboard:
|
|
27
|
+
`userflow-` followed by an opaque id (e.g. `userflow-v7twv2fw2ja2jaco7kesvowmem`).
|
|
28
|
+
Copy it exactly and do not rely on its shape. It is **not** the env UUID.
|
|
29
|
+
This is the **only** scheme you register; the same one also
|
|
30
|
+
carries pairing links. The SDK never parses an environment out of the URL —
|
|
31
|
+
`clientToken` passed to `init` is what identifies the environment.
|
|
31
32
|
- `{startFlowToken}` is a short-lived token minted by the builder
|
|
32
33
|
(`prepareDraftFlow`).
|
|
33
34
|
|
|
@@ -44,22 +45,41 @@ preview.
|
|
|
44
45
|
```
|
|
45
46
|
|
|
46
47
|
The builder QR usually points at `https://<api-host>/pair/<jwt>`; the backend
|
|
47
|
-
redirects that to the scheme form the SDK parses. Pairing requires
|
|
48
|
-
`scheme_id
|
|
49
|
-
|
|
48
|
+
redirects that to the scheme form the SDK parses. Pairing requires a
|
|
49
|
+
well-formed `scheme_id`: `userflow-` plus one or more letters and digits,
|
|
50
|
+
optionally split by single hyphens. A malformed `userflow-*` scheme (empty id,
|
|
51
|
+
stray hyphens) can match preview links but **not** pairing ones.
|
|
50
52
|
|
|
51
53
|
## Expo Router hosts
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
Add `app/+native-intent.ts` so pairing and preview links do not navigate:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
export { redirectSystemPath } from '@userflow-tech/react-native/expo-router';
|
|
59
|
+
```
|
|
54
60
|
|
|
55
61
|
The builder QR redirects to `{schemeId}://?pairing_token=…`. Expo Router treats
|
|
56
|
-
that as
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
that as `/`. For a signed-out user the app's home route then redirects, which
|
|
63
|
+
mounts a second copy of the screen already showing (Sign In, for example).
|
|
64
|
+
Element selection then rejects controls that look duplicated. A signed-in user
|
|
65
|
+
may also be moved off the screen they were on, back to `/`. Returning `null`
|
|
66
|
+
from `redirectSystemPath` keeps the current screen. The SDK still consumes the
|
|
67
|
+
URL through React Native `Linking` after `Userflow.init()`. Preview tokens
|
|
68
|
+
travel over the pairing websocket after connect — there is no separate preview
|
|
69
|
+
path URL from the builder.
|
|
70
|
+
|
|
71
|
+
If the app already has a `+native-intent.ts`, wrap the existing handler:
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { createRedirectSystemPath } from '@userflow-tech/react-native/expo-router';
|
|
75
|
+
|
|
76
|
+
export const redirectSystemPath = createRedirectSystemPath({
|
|
77
|
+
next: (event) => event.path,
|
|
78
|
+
});
|
|
79
|
+
```
|
|
60
80
|
|
|
61
81
|
Bare React Native / React Navigation apps need nothing beyond scheme
|
|
62
|
-
registration
|
|
82
|
+
registration.
|
|
63
83
|
|
|
64
84
|
## 1. Register the scheme at build time
|
|
65
85
|
|
|
@@ -71,7 +91,7 @@ If you are using `app.config.js`:
|
|
|
71
91
|
// app.config.js
|
|
72
92
|
module.exports = {
|
|
73
93
|
expo: {
|
|
74
|
-
plugins: [['@userflow-tech/react-native', { schemeId: 'userflow-
|
|
94
|
+
plugins: [['@userflow-tech/react-native', { schemeId: 'userflow-v7twv2fw2ja2jaco7kesvowmem' }]],
|
|
75
95
|
},
|
|
76
96
|
};
|
|
77
97
|
```
|
|
@@ -82,7 +102,9 @@ If you are using `app.json`:
|
|
|
82
102
|
// app.json
|
|
83
103
|
{
|
|
84
104
|
"expo": {
|
|
85
|
-
"plugins": [
|
|
105
|
+
"plugins": [
|
|
106
|
+
["@userflow-tech/react-native", { "schemeId": "userflow-v7twv2fw2ja2jaco7kesvowmem" }]
|
|
107
|
+
]
|
|
86
108
|
}
|
|
87
109
|
}
|
|
88
110
|
```
|
|
@@ -101,7 +123,7 @@ register the URL scheme. Expo Go is not supported.
|
|
|
101
123
|
<dict>
|
|
102
124
|
<key>CFBundleURLSchemes</key>
|
|
103
125
|
<array>
|
|
104
|
-
<string>userflow-
|
|
126
|
+
<string>userflow-v7twv2fw2ja2jaco7kesvowmem</string>
|
|
105
127
|
</array>
|
|
106
128
|
</dict>
|
|
107
129
|
</array>
|
|
@@ -114,7 +136,7 @@ register the URL scheme. Expo Go is not supported.
|
|
|
114
136
|
<action android:name="android.intent.action.VIEW" />
|
|
115
137
|
<category android:name="android.intent.category.DEFAULT" />
|
|
116
138
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
117
|
-
<data android:scheme="userflow-
|
|
139
|
+
<data android:scheme="userflow-v7twv2fw2ja2jaco7kesvowmem" />
|
|
118
140
|
</intent-filter>
|
|
119
141
|
```
|
|
120
142
|
|
|
@@ -172,17 +194,17 @@ Userflow.init({ clientToken: 'ct_...' }).catch((error) => {
|
|
|
172
194
|
```
|
|
173
195
|
|
|
174
196
|
Other pairing links the SDK reports rather than dropping: one whose scheme is
|
|
175
|
-
not a valid `scheme_id` (`userflow-` followed by digits
|
|
176
|
-
app's own scheme** instead of
|
|
177
|
-
|
|
178
|
-
paired.
|
|
197
|
+
not a valid `scheme_id` (`userflow-` followed by letters and digits, optionally
|
|
198
|
+
split by single hyphens), one **opened with your app's own scheme** instead of
|
|
199
|
+
the `scheme_id`, one with no `pairing_token`, and a session that fails to
|
|
200
|
+
connect because the token expired or the device is already paired.
|
|
179
201
|
|
|
180
202
|
That third case is worth spelling out, because it does not look like a Userflow
|
|
181
203
|
problem. Substituting your app's scheme — `myapp://?pairing_token=…` instead of
|
|
182
|
-
`userflow-
|
|
183
|
-
scheme is registered, but the SDK rejects it as a foreign scheme
|
|
184
|
-
**Preview unavailable** top bar when recognisable). Use the
|
|
185
|
-
as the QR code provides it.
|
|
204
|
+
`userflow-v7twv2fw2ja2jaco7kesvowmem://?pairing_token=…` — still launches the app,
|
|
205
|
+
since your own scheme is registered, but the SDK rejects it as a foreign scheme
|
|
206
|
+
(logged + **Preview unavailable** top bar when recognisable). Use the
|
|
207
|
+
`scheme_id` exactly as the QR code provides it.
|
|
186
208
|
|
|
187
209
|
Reporting is limited to URLs the SDK can recognise as pairing attempts, so your
|
|
188
210
|
own deep links stay quiet — as do preview links, which accept any `userflow-*`
|
|
@@ -194,10 +216,25 @@ A pairing failure never fails `Userflow.init()`. If the QR token has expired,
|
|
|
194
216
|
`init()` still resolves and the app runs normally, with the reason logged under
|
|
195
217
|
`[Userflow]` and the top bar switching to the error tone.
|
|
196
218
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
219
|
+
Relaunching a paired app resumes the Builder session until the pairing token
|
|
220
|
+
expires or you call `Userflow.exitPreview()`. Opening the app from its icon is
|
|
221
|
+
enough — that is what the Builder means by "Open the app if you've paired this
|
|
222
|
+
device". A new pairing link always wins over the stored session.
|
|
223
|
+
|
|
224
|
+
`Userflow.exitPreview()` (or **Exit preview** in the top bar) also ends the
|
|
225
|
+
previewed flow on the server. Otherwise identify would restore it at its last
|
|
226
|
+
step on the next launch.
|
|
227
|
+
|
|
228
|
+
Resume requires `expo-secure-store` (Keychain / Keystore). Install it with
|
|
229
|
+
`npx expo install expo-secure-store` and configure Expo modules in bare React
|
|
230
|
+
Native. Without that module the SDK keeps the token in memory only, so killing
|
|
231
|
+
the app does not resume.
|
|
232
|
+
|
|
233
|
+
The SDK also stores a stable pairing device id in AsyncStorage
|
|
234
|
+
(`userflow:pairingDeviceId`). The server uses it to recognize this install when
|
|
235
|
+
the app rejoins, including a cold start from the pairing link. `reset()` and
|
|
236
|
+
`exitPreview()` do not clear it. A cold start shows **Connecting to Builder…**
|
|
237
|
+
while `Userflow.init()` is still resolving, then **Preview mode**.
|
|
201
238
|
|
|
202
239
|
### Host apps that already own Linking
|
|
203
240
|
|
|
@@ -236,10 +273,10 @@ from JS does not.
|
|
|
236
273
|
|
|
237
274
|
```sh
|
|
238
275
|
# iOS
|
|
239
|
-
npx uri-scheme open "userflow-
|
|
276
|
+
npx uri-scheme open "userflow-v7twv2fw2ja2jaco7kesvowmem://?token=TEST" --ios
|
|
240
277
|
|
|
241
278
|
# Android
|
|
242
|
-
npx uri-scheme open "userflow-
|
|
279
|
+
npx uri-scheme open "userflow-v7twv2fw2ja2jaco7kesvowmem://?token=TEST" --android
|
|
243
280
|
```
|
|
244
281
|
|
|
245
282
|
Use a real token from the builder when testing end-to-end. For the full
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Host isolation
|
|
2
|
+
|
|
3
|
+
What “isolated as possible” means for `@userflow-tech/react-native`.
|
|
4
|
+
|
|
5
|
+
The SDK is in-process JavaScript in the host React tree. It cannot get a
|
|
6
|
+
separate VM, OS process, or native exception handler. Isolation is the set of
|
|
7
|
+
guards below — not a sandbox.
|
|
8
|
+
|
|
9
|
+
## Default host-visible behavior
|
|
10
|
+
|
|
11
|
+
**No overlay, no event, no crash.** Failures inside SDK code are caught, logged
|
|
12
|
+
with `console.warn` and a `[Userflow] isolated error` prefix (always, not
|
|
13
|
+
`__DEV__`-only), and swallowed from the host app’s perspective. `console.warn`
|
|
14
|
+
is intentional: React Native release builds forward `console.error` to the
|
|
15
|
+
native exception manager (Crashlytics / Sentry).
|
|
16
|
+
|
|
17
|
+
## What we contain
|
|
18
|
+
|
|
19
|
+
| Path | Mechanism |
|
|
20
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| React **render / lifecycle** errors in overlay UI (flow surfaces, preview banner, element picker) | Class `SdkErrorBoundary` around the overlay sibling — **not** around host children |
|
|
22
|
+
| Unexpected exceptions and promise rejections on fire-and-forget APIs (`Userflow.track`, `updateScreen`, `reportActivity`, internal `screen_viewed`) | `isolateAsync` / `isolateSync` |
|
|
23
|
+
| Event-handler throws on SDK bridges that wrap the host tree (`TargetPressBridge`, `DoubleTapBridge`) | Local try/catch (`isolateSync`). React error boundaries do not catch event handlers. |
|
|
24
|
+
| Screen-report callbacks in `WithUserflowReactNavigation` | `isolateSync` around the report path only — **not** a React error boundary around `NavigationContainer` |
|
|
25
|
+
|
|
26
|
+
A later flow step can still render after an overlay crash: the boundary retries
|
|
27
|
+
when the session/step identity changes to one that has not already failed.
|
|
28
|
+
Reconnecting the same crashed step stays blank. It does not call `endFlow`
|
|
29
|
+
(that can loop or throw again).
|
|
30
|
+
|
|
31
|
+
## What still throws (host contract)
|
|
32
|
+
|
|
33
|
+
These are integration mistakes or identity-critical results the host must see:
|
|
34
|
+
|
|
35
|
+
- `UserflowAuthError` for misuse (`isHostContract`): missing `init` / `identify`,
|
|
36
|
+
invalid event or attribute names, identity-verification failures. Transport
|
|
37
|
+
`UserflowAuthError`s leave that flag unset.
|
|
38
|
+
- Failures on **identity-critical** APIs: `init`, `identify`,
|
|
39
|
+
`identifyAnonymous`, `reset`. A swallowed `identify` would look like success.
|
|
40
|
+
- `group` / `updateUser` / `updateGroup` still reject on auth and transport
|
|
41
|
+
errors (they are part of the identity path, not fire-and-forget).
|
|
42
|
+
- `useUserflow()` still throws outside `UserflowProvider`.
|
|
43
|
+
- `WithUserflowReactNavigation` still throws if its child is not a single React
|
|
44
|
+
element (host API misuse).
|
|
45
|
+
|
|
46
|
+
`Userflow.track()`:
|
|
47
|
+
|
|
48
|
+
- **Rejects** `UserflowAuthError` (`Call Userflow.init() before track()`,
|
|
49
|
+
`Call Userflow.identify() before track()`, invalid event name).
|
|
50
|
+
- **Resolves** on network failure, rate limit (`UserflowRateLimitError`), and
|
|
51
|
+
unexpected SDK bugs. Check device logs for `[Userflow] isolated error`.
|
|
52
|
+
|
|
53
|
+
## What we cannot contain
|
|
54
|
+
|
|
55
|
+
- Native module / JSI / Hermes **fatal** crashes.
|
|
56
|
+
- Errors in **host children** of `UserflowProvider`. The app tree is never
|
|
57
|
+
inside `SdkErrorBoundary` — wrapping it would hide the customer’s own bugs.
|
|
58
|
+
- Host callbacks the SDK invokes (`onNavigate`, `setCustomScrollIntoView`).
|
|
59
|
+
Those stay the host’s responsibility. The SDK wraps those _call sites_
|
|
60
|
+
(`openFlowNavigateUrl` / `scrollAnchorIntoView`) so a host throw does not take
|
|
61
|
+
down overlay internals, but it does not swallow the host’s own render errors.
|
|
62
|
+
|
|
63
|
+
## Reading the logs
|
|
64
|
+
|
|
65
|
+
Isolated failures look like:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
[Userflow] isolated error overlay Error: …
|
|
69
|
+
[Userflow] isolated error track Error: socket dropped
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The second token is the **scope** (`overlay`, `track`, `updateScreen`,
|
|
73
|
+
`reportActivity`, `double-tap`, `target-press`, `react-navigation-screen`).
|
|
74
|
+
Search logs for `[Userflow] isolated error` when a flow vanishes or an event
|
|
75
|
+
seems missing but the app is still running.
|
package/docs/troubleshooting.md
CHANGED
|
@@ -72,28 +72,30 @@ Id matching: dashboard `#invite-teammates` ↔ `testID="invite-teammates"` (or `
|
|
|
72
72
|
|
|
73
73
|
### 4. Connection
|
|
74
74
|
|
|
75
|
-
| Symptom | Likely cause
|
|
76
|
-
| --------------------------------------------------------- |
|
|
77
|
-
| `WebSocket connection timed out` / `failed` | Bad `serverEndpoint`, network, or VPN
|
|
78
|
-
| `invalid_message` on channel join / `UpdateClientContext` | ClientContext missing required `pageUrl`, or sending legacy `path`/`screen
|
|
79
|
-
| Long recovery after Wi-Fi ↔ cellular while foregrounded | Install optional `@react-native-community/netinfo` for instant probe
|
|
80
|
-
| Session cleared after returning from background | Away ≥ `SESSION_STALE_AFTER_BACKGROUND_MS` (5 minutes) — by design
|
|
75
|
+
| Symptom | Likely cause |
|
|
76
|
+
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
77
|
+
| `WebSocket connection timed out` / `failed` | Bad `serverEndpoint`, network, or VPN |
|
|
78
|
+
| `invalid_message` on channel join / `UpdateClientContext` | ClientContext missing required `pageUrl`, or sending `screenPath` / legacy `path`/`screen`. The SDK must send `pageUrl: ""` plus `screenName` only |
|
|
79
|
+
| Long recovery after Wi-Fi ↔ cellular while foregrounded | Install optional `@react-native-community/netinfo` for instant probe |
|
|
80
|
+
| Session cleared after returning from background | Away ≥ `SESSION_STALE_AFTER_BACKGROUND_MS` (5 minutes) — by design |
|
|
81
81
|
|
|
82
82
|
## Builder preview / pairing
|
|
83
83
|
|
|
84
84
|
Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all builds (including release).
|
|
85
85
|
|
|
86
|
-
| Symptom | Likely cause | Fix
|
|
87
|
-
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
|
88
|
-
| Deep link opens the app but nothing happens | Scheme added in config but **no native rebuild** | `npx expo prebuild` / new development client; Metro reload is not enough
|
|
89
|
-
| Deep link opens the app but nothing happens, and no **Preview mode** top bar appears | `Userflow.init()` rejected, so there is no session to preview into | Check the logs for `[Userflow] Builder pairing link received, but Userflow.init() failed` — fix that error (usually `clientToken` or `serverEndpoint`) and re-open the link
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
86
|
+
| Symptom | Likely cause | Fix |
|
|
87
|
+
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
88
|
+
| Deep link opens the app but nothing happens | Scheme added in config but **no native rebuild** | `npx expo prebuild` / new development client; Metro reload is not enough |
|
|
89
|
+
| Deep link opens the app but nothing happens, and no **Preview mode** top bar appears | `Userflow.init()` rejected, so there is no session to preview into | Check the logs for `[Userflow] Builder pairing link received, but Userflow.init() failed` — fix that error (usually `clientToken` or `serverEndpoint`) and re-open the link |
|
|
90
|
+
| Killed app opens from a pairing link with no banner, or Preview returns on the wrong step | Pairing did not resume, or the install joined as a new device while the old presence was still on the topic | Install `expo-secure-store` so a relaunch can resume. A cold start should show **Connecting to Builder…** immediately, then **Preview mode**, with the flow at step 1. `exitPreview()` or an expired token ends resume |
|
|
91
|
+
| Deep link opens the app and the router shows **Unmatched Route** / "page could not be found" | Deep link is not the root form from the QR; **or** the link was rebuilt with the app's own scheme instead of `scheme_id` | Open the QR unmodified (`userflow-<id>://?pairing_token=…`). If the log says `a scheme Userflow does not own`, do not substitute your app scheme |
|
|
92
|
+
| "Can't select this element" right after pairing, or the app jumps to home when pairing | Expo Router navigated on the pairing link | Add `app/+native-intent.ts` exporting `redirectSystemPath` from `@userflow-tech/react-native/expo-router` (see [deep-linking.md](deep-linking.md#expo-router-hosts)) |
|
|
93
|
+
| Pairing deep link ignored (preview URL may still work) | Scheme is `userflow-*` but the id after it is empty or has stray hyphens | Use the env's `scheme_id` from the dashboard exactly (e.g. `userflow-v7twv2fw2ja2jaco7kesvowmem`), not the env UUID |
|
|
94
|
+
| Builder says “A device was paired earlier…” and Preview closes immediately after a brief spinner | Stale pairing session still present; a ghost device acks | Pair again on the device you are watching, or clear the env's pairing session and re-QR |
|
|
95
|
+
| Preview succeeds on the server but the phone stays idle | App is not the paired instance (no **Preview mode** top bar) | Confirm the top bar before hitting Preview; re-open the pairing QR on this install |
|
|
96
|
+
| Pairing never connects against a local stack | `pairingEndpoint` still pointing at production | `Userflow.init({ pairingEndpoint: 'http://localhost:40401', serverEndpoint: '…' })` |
|
|
97
|
+
| QR / `https://…/pair/<jwt>` does nothing in the app | SDK only parses the **scheme** form after the backend redirect | Open via the OS (scan QR) or forward `{schemeId}://?pairing_token=…` with `handlePairingUrl` |
|
|
98
|
+
| Builder selector has no screenshot after Confirm | Missing / unlinked `react-native-view-shot`, or Expo SDK 54 pinned 4.x | Install `react-native-view-shot@^5.0.0` and **rebuild native**. Look for `[Userflow] Required peer react-native-view-shot is not installed` |
|
|
97
99
|
|
|
98
100
|
## Expo
|
|
99
101
|
|
|
@@ -112,3 +114,24 @@ Full setup: [deep-linking.md](deep-linking.md). Pairing is available in all buil
|
|
|
112
114
|
4. Confirm the anchor id in code matches the builder selector after stripping `#`.
|
|
113
115
|
5. For builder Preview: confirm the **Preview mode** top bar is visible before you
|
|
114
116
|
click Preview in the dashboard.
|
|
117
|
+
|
|
118
|
+
## Isolated SDK errors (host app still running)
|
|
119
|
+
|
|
120
|
+
The SDK contains overlay render errors and fire-and-forget `track` /
|
|
121
|
+
`updateScreen` failures so they cannot crash the host app. The flow or event is
|
|
122
|
+
dropped; the app keeps running. Isolated failures are logged with
|
|
123
|
+
`console.warn` (not `console.error`, which React Native would report as a
|
|
124
|
+
native crash).
|
|
125
|
+
|
|
126
|
+
Look for:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
[Userflow] isolated error overlay …
|
|
130
|
+
[Userflow] isolated error track …
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Contract mistakes still throw (`Call Userflow.init() before identify()`,
|
|
134
|
+
`Call Userflow.identify() before track()`, …). Native module crashes and errors
|
|
135
|
+
in **your** children of `UserflowProvider` are not contained.
|
|
136
|
+
|
|
137
|
+
Full contract: [isolation.md](isolation.md).
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# WebView banner POC (React Native)
|
|
2
|
+
|
|
3
|
+
Proof of concept for React Native banners that use **Evaluate JavaScript** on buttons—the same `window.userflow` bridge and (when the WebView path is used) web banner DOM + theme **custom.css** as userflow.js on web.
|
|
4
|
+
|
|
5
|
+
## Enabling
|
|
6
|
+
|
|
7
|
+
1. **Custom CSS (theme):** Publish custom CSS in the builder (**Edit custom CSS**). When the theme has a `cssVersion`, banners use the WebView renderer and load `custom.css` from the CDN (same URL as userflow.js iframes). Use `.userflow-custom-container-<name>` on container blocks and `.userflow-custom-button-<name>` as button appearance in the builder.
|
|
8
|
+
2. **Evaluate JavaScript:** Use a button whose **only** action is **Evaluate JavaScript** if the script should auto-run when the WebView loads (once per banner session). Mixed-action buttons run eval on click only.
|
|
9
|
+
3. `react-native-webview` ships as an SDK dependency; after install or upgrade, **rebuild** the native app (`pod install` on iOS). If Metro still cannot load it, add `react-native-webview` explicitly in the host app and rebuild again.
|
|
10
|
+
|
|
11
|
+
For local SDK development without custom CSS or Evaluate JavaScript, use `setDebugForceWebViewBanner` from `bannerNeedsWebView.ts` (not exported on the public `Userflow` API).
|
|
12
|
+
|
|
13
|
+
Web embeds are unchanged (native userflow.js banner).
|
|
14
|
+
|
|
15
|
+
## Architecture
|
|
16
|
+
|
|
17
|
+
- **Native shell:** `BannerHost` / `EmbedBannerPlaceholder` unchanged (overlay vs flow, safe area, margins, max width).
|
|
18
|
+
- **Single WebView:** `BannerWebViewBar` renders the web DOM (`userflowjs-banner-*`, `userflowjs-bubble-button-*`) plus inlined frame CSS and a link to `https://cdn.{host}/themes/{themeId}/stylesheets/{cssVersion}/custom.css` when the theme has `cssVersion`.
|
|
19
|
+
- **Actions:** Button clicks post to RN → `BannerSessionEngine.handleActions` → `EVAL_JS` uses the **same** WebView via `evalJsController` (overlay `EvalJsHost` is suppressed while the banner owns the page).
|
|
20
|
+
- **Dismiss from JS:** `userflow.endFlow()` and `userflow.close()` end the **banner session** (same as the native X), not only the tour flow engine.
|
|
21
|
+
|
|
22
|
+
## Manual test checklist (iOS + Android)
|
|
23
|
+
|
|
24
|
+
- [ ] Standard banner (no Evaluate JavaScript): native `BannerBar`, unchanged layout.
|
|
25
|
+
- [ ] WebView banner: theme custom CSS applies to buttons/content (use builder theme + custom classes on buttons).
|
|
26
|
+
- [ ] Top (`BODY_FIRST`) and bottom (`BODY_LAST`) placement; overlay on/off.
|
|
27
|
+
- [ ] Button **Evaluate JavaScript** runs (`userflow.track`, `userflow.updateUser`, etc.).
|
|
28
|
+
- [ ] **Auto-run on show:** Evaluate JavaScript on an **eval-only** banner button (no other actions on that button) runs when the WebView loads. TinyTime fixture: `apps/tinytime/eval-js-samples/etoro-crypto-deposit-banner-rn.js`.
|
|
29
|
+
- [ ] Dismiss (X) ends banner with user-closed reason.
|
|
30
|
+
- [ ] Small phone, large phone, and tablet aspect ratios—watch for clipped or extra-tall bar (height comes from WebView content measurement).
|
|
31
|
+
- [ ] Rotation: bar height updates after orientation change.
|
|
32
|
+
|
|
33
|
+
## Findings
|
|
34
|
+
|
|
35
|
+
### Feasibility
|
|
36
|
+
|
|
37
|
+
- **Works in principle:** WebView can load CDN `custom.css` and reuse web class names; eval JS reuses the existing `wrapCode` / `window.userflow` bridge.
|
|
38
|
+
- **Gaps vs web:** Rich content HTML export is a **subset** (paragraphs, headings, lists, quotes, code, links, attributes)—no images/video/button groups inside content. Button hidden/disabled conditions are not evaluated in the WebView. Fonts rely on theme `fontFamily` / custom CSS, not full web font loading.
|
|
39
|
+
|
|
40
|
+
### Layout and screen-size risks
|
|
41
|
+
|
|
42
|
+
- Height is driven by content measurement on `.userflowjs-banner-root` and `ResizeObserver` when available; there can be a one-frame jump before measure completes.
|
|
43
|
+
- `overlay: false` push layout depends on measured WebView height—verify on long copy and multiple buttons wrapping.
|
|
44
|
+
- Safe area is applied on the **native** host, not inside the WebView document (unlike some full-screen eval JS samples).
|
|
45
|
+
|
|
46
|
+
### Single WebView / eval routing
|
|
47
|
+
|
|
48
|
+
- While a WebView banner is mounted, `evalJsController.bannerOwnsWebView` prevents a second overlay WebView.
|
|
49
|
+
- **Conflict:** A flow **Evaluate JavaScript** step running at the same time as a WebView banner would share the banner WebView—not supported in this POC.
|
|
50
|
+
|
|
51
|
+
### Security / performance
|
|
52
|
+
|
|
53
|
+
- Custom CSS is fetched from the CDN at runtime (network required on first paint).
|
|
54
|
+
- One WebView per banner session with eval JS; memory cost is acceptable for typical use but not ideal for many simultaneous surfaces.
|
|
55
|
+
|
|
56
|
+
### Follow-ups before production
|
|
57
|
+
|
|
58
|
+
- Builder copy review; document unsupported banner capabilities (sticky scroll, element embed modes, condition-driven buttons).
|
|
59
|
+
- Align with UMD-166 (banner component) and UMD-168 (banner eval extension).
|
|
60
|
+
- Optional: ship compiled `bubble-frame` CSS from CDN instead of bundled subset.
|
|
61
|
+
|
|
62
|
+
## Customer sample fixtures
|
|
63
|
+
|
|
64
|
+
When validating against a specific customer banner, paste their theme **custom.css** and button **Evaluate JavaScript** into the builder test flow and attach the same snippets to the Jira ticket for regression reference.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type ConfigPlugin } from '@expo/config-plugins';
|
|
2
2
|
export interface UserflowExpoPluginOptions {
|
|
3
3
|
/**
|
|
4
|
-
* The environment's `scheme_id` from the Userflow dashboard
|
|
5
|
-
*
|
|
4
|
+
* The environment's `scheme_id` from the Userflow dashboard: `userflow-`
|
|
5
|
+
* followed by an opaque id (e.g. `userflow-v7twv2fw2ja2jaco7kesvowmem`).
|
|
6
|
+
* Copy it exactly and do not rely on its shape.
|
|
6
7
|
*
|
|
7
8
|
* `schemeId` is accepted as an alias for the same value (pairing naming).
|
|
8
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withUserflow.d.ts","sourceRoot":"","sources":["../plugin/withUserflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"withUserflow.d.ts","sourceRoot":"","sources":["../plugin/withUserflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAsC9B,MAAM,WAAW,yBAAyB;IACxC;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA4ED,QAAA,MAAM,MAAM,gDAAmE,CAAC;AAEhF,eAAe,MAAM,CAAC"}
|
|
@@ -5,8 +5,8 @@ const config_plugins_1 = require("@expo/config-plugins");
|
|
|
5
5
|
* Expo config plugin shipped inside `@userflow-tech/react-native`.
|
|
6
6
|
*
|
|
7
7
|
* Registers the environment's `scheme_id` as a URL scheme. One scheme serves both
|
|
8
|
-
* builder preview (`userflow-
|
|
9
|
-
* (`userflow-
|
|
8
|
+
* builder preview (`userflow-v7twv2fw2ja2jaco7kesvowmem://?token=...`) and
|
|
9
|
+
* pairing (`userflow-v7twv2fw2ja2jaco7kesvowmem://?pairing_token=...`).
|
|
10
10
|
*
|
|
11
11
|
* Optional peers unlock extras: `@react-native-community/netinfo` enables
|
|
12
12
|
* network-aware reconnect; without it the SDK falls back to heartbeat-based
|
|
@@ -17,7 +17,7 @@ const config_plugins_1 = require("@expo/config-plugins");
|
|
|
17
17
|
*
|
|
18
18
|
* {
|
|
19
19
|
* "expo": {
|
|
20
|
-
* "plugins": [["@userflow-tech/react-native", { "schemeId": "userflow-
|
|
20
|
+
* "plugins": [["@userflow-tech/react-native", { "schemeId": "userflow-v7twv2fw2ja2jaco7kesvowmem" }]]
|
|
21
21
|
* }
|
|
22
22
|
* }
|
|
23
23
|
*
|
|
@@ -28,8 +28,13 @@ const PACKAGE_NAME = '@userflow-tech/react-native';
|
|
|
28
28
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
29
29
|
const PACKAGE_VERSION = require('../package.json').version;
|
|
30
30
|
const USERFLOW_SCHEME_PREFIX = 'userflow-';
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Environment scheme_id shape — must match pairing deep-link validation
|
|
33
|
+
* (`packages/react-native/src/pairing/deepLink.ts`). Everything after
|
|
34
|
+
* `userflow-` is an opaque id owned by the backend, so only check that it is
|
|
35
|
+
* one or more alphanumeric segments joined by single hyphens.
|
|
36
|
+
*/
|
|
37
|
+
const USERFLOW_SCHEME = /^userflow-[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
33
38
|
function normalizeUrlScheme(urlScheme) {
|
|
34
39
|
if (urlScheme == null)
|
|
35
40
|
return null;
|
|
@@ -42,14 +47,15 @@ function normalizeUrlScheme(urlScheme) {
|
|
|
42
47
|
if (!trimmed)
|
|
43
48
|
return null;
|
|
44
49
|
if (trimmed.includes('://') || trimmed.includes('/') || trimmed.includes(':')) {
|
|
45
|
-
throw new Error(`[${PACKAGE_NAME}] urlScheme must be a bare scheme (e.g. "userflow-
|
|
50
|
+
throw new Error(`[${PACKAGE_NAME}] urlScheme must be a bare scheme (e.g. "userflow-v7twv2fw2ja2jaco7kesvowmem"), got "${urlScheme}"`);
|
|
46
51
|
}
|
|
47
52
|
if (!trimmed.startsWith(USERFLOW_SCHEME_PREFIX)) {
|
|
48
53
|
throw new Error(`[${PACKAGE_NAME}] urlScheme must start with "${USERFLOW_SCHEME_PREFIX}", got "${urlScheme}"`);
|
|
49
54
|
}
|
|
50
55
|
if (!USERFLOW_SCHEME.test(trimmed)) {
|
|
51
|
-
throw new Error(`[${PACKAGE_NAME}] urlScheme must be
|
|
52
|
-
`
|
|
56
|
+
throw new Error(`[${PACKAGE_NAME}] urlScheme must be your environment's scheme_id: ` +
|
|
57
|
+
`"${USERFLOW_SCHEME_PREFIX}" followed by letters and digits, optionally split by ` +
|
|
58
|
+
`single hyphens (e.g. "userflow-v7twv2fw2ja2jaco7kesvowmem"), got "${urlScheme}"`);
|
|
53
59
|
}
|
|
54
60
|
return trimmed;
|
|
55
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withUserflow.js","sourceRoot":"","sources":["../plugin/withUserflow.ts"],"names":[],"mappings":";;AAAA,yDAO8B;AAE9B;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,YAAY,GAAG,6BAA6B,CAAC;AACnD,uFAAuF;AACvF,8DAA8D;AAC9D,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAiB,CAAC;AACrE,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAC3C
|
|
1
|
+
{"version":3,"file":"withUserflow.js","sourceRoot":"","sources":["../plugin/withUserflow.ts"],"names":[],"mappings":";;AAAA,yDAO8B;AAE9B;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,YAAY,GAAG,6BAA6B,CAAC;AACnD,uFAAuF;AACvF,8DAA8D;AAC9D,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAiB,CAAC;AACrE,MAAM,sBAAsB,GAAG,WAAW,CAAC;AAC3C;;;;;GAKG;AACH,MAAM,eAAe,GAAG,qCAAqC,CAAC;AAiB9D,SAAS,kBAAkB,CAAC,SAA6B;IACvD,IAAI,SAAS,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IACnC,MAAM,OAAO,GAAG,SAAS;SACtB,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;SACxB,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;SACnB,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACrB,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC1B,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9E,MAAM,IAAI,KAAK,CACb,IAAI,YAAY,wFAAwF,SAAS,GAAG,CACrH,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CACb,IAAI,YAAY,gCAAgC,sBAAsB,WAAW,SAAS,GAAG,CAC9F,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CACb,IAAI,YAAY,oDAAoD;YAClE,IAAI,sBAAsB,wDAAwD;YAClF,qEAAqE,SAAS,GAAG,CACpF,CAAC;IACJ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,wBAAwB,GAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE;IAC3E,OAAO,IAAA,8BAAa,EAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACtC,IAAI,CAAC,0BAAS,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9D,MAAM,CAAC,UAAU,GAAG,0BAAS,CAAC,MAAM,CAAC,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;QAClF,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE;IAC/E,OAAO,IAAA,oCAAmB,EAAC,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QAC5C,MAAM,YAAY,GAAG,8BAAa,CAAC,QAAQ,CAAC,sBAAsB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACtF,MAAM,aAAa,GAAG,YAAY,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QAC1D,MAAM,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YACtD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,gBAAgB,CAAC,KAAK,SAAS,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,aAAa,CAAC,IAAI,CAAC;gBACjB,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,4BAA4B,EAAE,EAAE,CAAC;gBACjE,QAAQ,EAAE;oBACR,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,iCAAiC,EAAE,EAAE;oBAC5D,EAAE,CAAC,EAAE,EAAE,cAAc,EAAE,mCAAmC,EAAE,EAAE;iBAC/D;gBACD,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,CAAC;aAC/C,CAAC,CAAC;YACH,YAAY,CAAC,eAAe,CAAC,GAAG,aAAa,CAAC;QAChD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,YAAY,GAAmD,CAAC,MAAM,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE;IAC5F,MAAM,SAAS,GAAG,kBAAkB,CAAC,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC9E,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,GAAG,wBAAwB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACrD,MAAM,GAAG,4BAA4B,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACzD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,IAAA,oCAAmB,EAAC,YAAY,EAAE,YAAY,EAAE,eAAe,CAAC,CAAC;AAEhF,kBAAe,MAAM,CAAC;AACtB,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC;AACxB,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC"}
|
|
@@ -148,6 +148,10 @@ class AutoAnchorRegistry {
|
|
|
148
148
|
updateInstance(instanceId, patch) {
|
|
149
149
|
const inst = this.instances.get(instanceId);
|
|
150
150
|
if (!inst) return;
|
|
151
|
+
// Stamped hosts call this on every render; notifying for a no-op patch
|
|
152
|
+
// re-renders registry subscribers, which re-render the stamps.
|
|
153
|
+
const keys = Object.keys(patch);
|
|
154
|
+
if (keys.every(key => Object.is(inst[key], patch[key]))) return;
|
|
151
155
|
const prevIds = {
|
|
152
156
|
manualId: inst.manualId,
|
|
153
157
|
userflowId: inst.userflowId,
|
|
@@ -315,6 +319,20 @@ class AutoAnchorRegistry {
|
|
|
315
319
|
return byManual.length > 1 || byManual.some(i => i.ambiguous);
|
|
316
320
|
}
|
|
317
321
|
|
|
322
|
+
/**
|
|
323
|
+
* Whether `inst` still has a look-alike inside `include`.
|
|
324
|
+
*
|
|
325
|
+
* The stored {@link AutoAnchorInstance.ambiguous} flag is registry-wide, so a
|
|
326
|
+
* copy on a covered screen keeps it set. Visibility can only clear that, never
|
|
327
|
+
* add ambiguity: an instance the registry considers unique stays unique.
|
|
328
|
+
*/
|
|
329
|
+
isAmbiguousAmong(inst, include) {
|
|
330
|
+
if (!inst.ambiguous) return false;
|
|
331
|
+
const peers = list => list.filter(i => i === inst || include(i));
|
|
332
|
+
if (inst.manualId) return peers(this.getInstancesByManualId(inst.manualId)).length > 1;
|
|
333
|
+
return this.isTwinWithin(inst, peers(this.getInstancesByTemplatePath(inst.templatePath))) || this.isTwinWithin(inst, peers(this.getInstancesByRegistryKey(inst.registryKey)));
|
|
334
|
+
}
|
|
335
|
+
|
|
318
336
|
/** Test helper — drop every instance and reset ids. */
|
|
319
337
|
clear() {
|
|
320
338
|
this.instances.clear();
|
|
@@ -359,6 +377,24 @@ class AutoAnchorRegistry {
|
|
|
359
377
|
}
|
|
360
378
|
}
|
|
361
379
|
|
|
380
|
+
/**
|
|
381
|
+
* True when `inst` cannot be told apart from another instance in `list`.
|
|
382
|
+
* An unlabelled group only: no content of its own, or a content signature a
|
|
383
|
+
* peer shares.
|
|
384
|
+
*/
|
|
385
|
+
isTwinWithin(inst, list) {
|
|
386
|
+
const unlabelled = list.length > 1 && list.every(i => !i.manualId);
|
|
387
|
+
if (!unlabelled) return false;
|
|
388
|
+
const sig = contentSignature(inst);
|
|
389
|
+
if (!sig) return true;
|
|
390
|
+
let count = 0;
|
|
391
|
+
for (const peer of list) {
|
|
392
|
+
if (contentSignature(peer) === sig) count += 1;
|
|
393
|
+
if (count > 1) return true;
|
|
394
|
+
}
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
|
|
362
398
|
/**
|
|
363
399
|
* Instances sharing a template path are only twins while they look alike.
|
|
364
400
|
* Four rows from one `field()` helper are indistinguishable at register time
|
|
@@ -368,18 +404,8 @@ class AutoAnchorRegistry {
|
|
|
368
404
|
*/
|
|
369
405
|
recomputeAmbiguity(registryKey, templatePath, manualId) {
|
|
370
406
|
const mark = list => {
|
|
371
|
-
const unlabelled = list.length > 1 && list.every(i => !i.manualId);
|
|
372
|
-
const shared = new Map();
|
|
373
|
-
if (unlabelled) {
|
|
374
|
-
for (const i of list) {
|
|
375
|
-
const sig = contentSignature(i);
|
|
376
|
-
if (sig) shared.set(sig, (shared.get(sig) ?? 0) + 1);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
407
|
for (const i of list) {
|
|
380
|
-
|
|
381
|
-
const twins = unlabelled && (!sig || (shared.get(sig) ?? 0) > 1);
|
|
382
|
-
i.ambiguous = twins || (i.manualId ? this.getInstancesByManualId(i.manualId).length > 1 : false);
|
|
408
|
+
i.ambiguous = this.isTwinWithin(i, list) || (i.manualId ? this.getInstancesByManualId(i.manualId).length > 1 : false);
|
|
383
409
|
}
|
|
384
410
|
};
|
|
385
411
|
mark(this.getInstancesByRegistryKey(registryKey));
|