@userflow-tech/react-native 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +435 -134
- package/app.plugin.js +11 -3
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +53 -6
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +11 -3
- package/docs/anchoring.md +58 -42
- package/docs/deep-linking.md +70 -33
- package/docs/isolation.md +75 -0
- package/docs/troubleshooting.md +103 -44
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/hostDependencyWarnings.d.ts +18 -0
- package/expo-plugin/hostDependencyWarnings.d.ts.map +1 -0
- package/expo-plugin/hostDependencyWarnings.js +91 -0
- package/expo-plugin/hostDependencyWarnings.js.map +1 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +30 -8
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AnchorRegistry.js +7 -0
- package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +189 -55
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/elementTapMonitor.js +92 -0
- package/lib/commonjs/anchors/elementTapMonitor.js.map +1 -0
- package/lib/commonjs/anchors/elementTargetMatch.js +85 -0
- package/lib/commonjs/anchors/elementTargetMatch.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +122 -87
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.js +105 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +2 -1
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +26 -17
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveElementTargets.js +158 -0
- package/lib/commonjs/anchors/resolveElementTargets.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +26 -8
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
- package/lib/commonjs/anchors/targetPressMonitor.js +9 -3
- package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -1
- package/lib/commonjs/anchors/useUserflowAnchor.js +1 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/commonjs/anonymousId.js +19 -7
- package/lib/commonjs/anonymousId.js.map +1 -1
- package/lib/commonjs/authoring/ElementPickerOverlay.js +126 -50
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeButton.js +8 -3
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +7 -6
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -1
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -1
- package/lib/commonjs/authoring/fingerprintFromInstance.js +204 -4
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/commonjs/authoring/hitTest.js +264 -16
- package/lib/commonjs/authoring/hitTest.js.map +1 -1
- package/lib/commonjs/authoring/hostAtPoint.js +204 -0
- package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
- package/lib/commonjs/content/BannerStepButton.js +68 -0
- package/lib/commonjs/content/BannerStepButton.js.map +1 -0
- package/lib/commonjs/content/buttonAppearance.js +16 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -1
- package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
- package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/commonjs/content/themeColor.js +15 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deepLinking.js +4 -4
- package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
- package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
- package/lib/commonjs/evalJs/bootstrap.js +84 -0
- package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
- package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
- package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
- package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsController.js +124 -0
- package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
- package/lib/commonjs/evalJs/getWebView.js +81 -0
- package/lib/commonjs/evalJs/getWebView.js.map +1 -0
- package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
- package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
- package/lib/commonjs/evalJs/types.js +2 -0
- package/lib/commonjs/evalJs/types.js.map +1 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +19 -0
- package/lib/commonjs/expo-router/index.js.map +1 -1
- package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
- package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/commonjs/index.js +123 -43
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/installCheck.js +151 -0
- package/lib/commonjs/installCheck.js.map +1 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js +245 -27
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +55 -16
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/deepLink.js +22 -5
- package/lib/commonjs/pairing/deepLink.js.map +1 -1
- package/lib/commonjs/pairing/deviceId.js +50 -0
- package/lib/commonjs/pairing/deviceId.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +5 -4
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/tokenStorage.js +47 -7
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
- package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/commonjs/runtime/BannerHost.js +96 -0
- package/lib/commonjs/runtime/BannerHost.js.map +1 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +31 -13
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
- package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +138 -65
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/bannerEngine.js +63 -0
- package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
- package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
- package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
- package/lib/commonjs/runtime/bannerPlacement.js +37 -0
- package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +75 -3
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/isolateCall.js +48 -0
- package/lib/commonjs/runtime/isolateCall.js.map +1 -0
- package/lib/commonjs/runtime/reportSdkError.js +19 -0
- package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
- package/lib/commonjs/runtime/useBannerSession.js +37 -0
- package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
- package/lib/commonjs/screenTracker.js +34 -9
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/storage/asyncStorage.js +67 -0
- package/lib/commonjs/storage/asyncStorage.js.map +1 -0
- package/lib/commonjs/surfaces/BannerBar.js +160 -0
- package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
- package/lib/commonjs/surfaces/BannerSurface.js +78 -0
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +17 -1
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
- package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/commonjs/surfaces/safeArea.js +76 -13
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AnchorRegistry.js +7 -0
- package/lib/module/anchors/AnchorRegistry.js.map +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +189 -55
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/elementTapMonitor.js +87 -0
- package/lib/module/anchors/elementTapMonitor.js.map +1 -0
- package/lib/module/anchors/elementTargetMatch.js +78 -0
- package/lib/module/anchors/elementTargetMatch.js.map +1 -0
- package/lib/module/anchors/fiber/fiberPath.js +118 -0
- package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +120 -87
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/touchTargetFiber.js +100 -0
- package/lib/module/anchors/fiber/touchTargetFiber.js.map +1 -0
- package/lib/module/anchors/fiber/visibleRect.js +139 -0
- package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +73 -37
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
- package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +2 -1
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +25 -18
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveElementTargets.js +152 -0
- package/lib/module/anchors/resolveElementTargets.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +26 -9
- package/lib/module/anchors/semanticMatcher.js.map +1 -1
- package/lib/module/anchors/targetPressMonitor.js +8 -3
- package/lib/module/anchors/targetPressMonitor.js.map +1 -1
- package/lib/module/anchors/useUserflowAnchor.js +1 -0
- package/lib/module/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/module/anonymousId.js +18 -6
- package/lib/module/anonymousId.js.map +1 -1
- package/lib/module/authoring/ElementPickerOverlay.js +128 -52
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeButton.js +8 -3
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/module/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/module/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +7 -6
- package/lib/module/authoring/chrome/tokens.js.map +1 -1
- package/lib/module/authoring/elementPickerController.js.map +1 -1
- package/lib/module/authoring/fingerprintFromInstance.js +198 -4
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/module/authoring/hitTest.js +264 -18
- package/lib/module/authoring/hitTest.js.map +1 -1
- package/lib/module/authoring/hostAtPoint.js +199 -0
- package/lib/module/authoring/hostAtPoint.js.map +1 -0
- package/lib/module/content/BannerStepButton.js +63 -0
- package/lib/module/content/BannerStepButton.js.map +1 -0
- package/lib/module/content/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -1
- package/lib/module/content/resolveBannerButtonChrome.js +41 -0
- package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/module/content/themeColor.js +14 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deepLinking.js +4 -4
- package/lib/module/evalJs/EvalJsHost.js +239 -0
- package/lib/module/evalJs/EvalJsHost.js.map +1 -0
- package/lib/module/evalJs/bootstrap.js +76 -0
- package/lib/module/evalJs/bootstrap.js.map +1 -0
- package/lib/module/evalJs/bridgeMessages.js +139 -0
- package/lib/module/evalJs/bridgeMessages.js.map +1 -0
- package/lib/module/evalJs/evalJsBridge.js +25 -0
- package/lib/module/evalJs/evalJsBridge.js.map +1 -0
- package/lib/module/evalJs/evalJsController.js +119 -0
- package/lib/module/evalJs/evalJsController.js.map +1 -0
- package/lib/module/evalJs/getWebView.js +76 -0
- package/lib/module/evalJs/getWebView.js.map +1 -0
- package/lib/module/evalJs/injectEvalPending.js +15 -0
- package/lib/module/evalJs/injectEvalPending.js.map +1 -0
- package/lib/module/evalJs/types.js +2 -0
- package/lib/module/evalJs/types.js.map +1 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/module/expo-router/index.js +1 -0
- package/lib/module/expo-router/index.js.map +1 -1
- package/lib/module/expo-router/redirectSystemPath.js +70 -0
- package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/module/index.js +119 -45
- package/lib/module/index.js.map +1 -1
- package/lib/module/installCheck.js +139 -0
- package/lib/module/installCheck.js.map +1 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/module/pairing/PairingController.js +245 -27
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +54 -16
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/deepLink.js +21 -5
- package/lib/module/pairing/deepLink.js.map +1 -1
- package/lib/module/pairing/deviceId.js +45 -0
- package/lib/module/pairing/deviceId.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +5 -4
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/tokenStorage.js +47 -7
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/pairing/usePreviewBarHold.js +134 -0
- package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/module/runtime/BannerHost.js +92 -0
- package/lib/module/runtime/BannerHost.js.map +1 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/module/runtime/SdkErrorBoundary.js +55 -0
- package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +31 -13
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowOverlay.js +92 -0
- package/lib/module/runtime/UserflowOverlay.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +139 -66
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/bannerEngine.js +55 -0
- package/lib/module/runtime/bannerEngine.js.map +1 -0
- package/lib/module/runtime/bannerEngineContext.js +7 -0
- package/lib/module/runtime/bannerEngineContext.js.map +1 -0
- package/lib/module/runtime/bannerPlacement.js +30 -0
- package/lib/module/runtime/bannerPlacement.js.map +1 -0
- package/lib/module/runtime/embedBannerRegistry.js +24 -0
- package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +72 -3
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/isolateCall.js +43 -0
- package/lib/module/runtime/isolateCall.js.map +1 -0
- package/lib/module/runtime/reportSdkError.js +15 -0
- package/lib/module/runtime/reportSdkError.js.map +1 -0
- package/lib/module/runtime/useBannerSession.js +33 -0
- package/lib/module/runtime/useBannerSession.js.map +1 -0
- package/lib/module/screenTracker.js +33 -9
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/storage/asyncStorage.js +61 -0
- package/lib/module/storage/asyncStorage.js.map +1 -0
- package/lib/module/surfaces/BannerBar.js +155 -0
- package/lib/module/surfaces/BannerBar.js.map +1 -0
- package/lib/module/surfaces/BannerSurface.js +72 -0
- package/lib/module/surfaces/BannerSurface.js.map +1 -0
- package/lib/module/surfaces/MadeWithUserflow.js +11 -7
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +1 -1
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +17 -1
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/bannerBarLayout.js +69 -0
- package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/module/surfaces/bannerBarTokens.js +37 -0
- package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/module/surfaces/resolveBannerTheme.js +16 -0
- package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/module/surfaces/safeArea.js +72 -13
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +12 -16
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts +36 -0
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +21 -8
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/touchTargetFiber.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/touchTargetFiber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +2 -1
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts +39 -0
- package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anonymousId.d.ts +3 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/commonjs/src/index.d.ts +16 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts +33 -0
- package/lib/typescript/commonjs/src/installCheck.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts +4 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +2 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts +7 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts +15 -0
- package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +9 -1
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +12 -16
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts +36 -0
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts +20 -0
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +21 -8
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/touchTargetFiber.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/touchTargetFiber.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +2 -1
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts +39 -0
- package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +2 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/module/src/anonymousId.d.ts +3 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/content/types.d.ts +1 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -1
- package/lib/typescript/module/src/deepLinking.d.ts +4 -4
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/module/src/index.d.ts +16 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/installCheck.d.ts +33 -0
- package/lib/typescript/module/src/installCheck.d.ts.map +1 -0
- package/lib/typescript/module/src/lifecycle.d.ts +4 -1
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +2 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/module/src/screenTracker.d.ts +7 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/storage/asyncStorage.d.ts +15 -0
- package/lib/typescript/module/src/storage/asyncStorage.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +9 -1
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +16 -3
- package/src/anchors/AnchorRegistry.ts +12 -0
- package/src/anchors/AutoAnchorRegistry.ts +41 -11
- package/src/anchors/elementConditionEvaluator.ts +235 -70
- package/src/anchors/elementTapMonitor.ts +95 -0
- package/src/anchors/elementTargetMatch.ts +90 -0
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +121 -80
- package/src/anchors/fiber/resolveFiberPath.ts +215 -0
- package/src/anchors/fiber/touchTargetFiber.ts +125 -0
- package/src/anchors/fiber/visibleRect.ts +153 -0
- package/src/anchors/fiber/visibleScreens.ts +74 -36
- package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
- package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
- package/src/anchors/resolveAnchorHost.ts +2 -1
- package/src/anchors/resolveAutoAnchorHost.ts +20 -18
- package/src/anchors/resolveElementTargets.ts +165 -0
- package/src/anchors/semanticMatcher.ts +38 -14
- package/src/anchors/targetPressMonitor.ts +12 -3
- package/src/anchors/useUserflowAnchor.ts +1 -0
- package/src/anonymousId.ts +20 -8
- package/src/authoring/ElementPickerOverlay.tsx +168 -59
- package/src/authoring/chrome/ChromeBottomSheet.tsx +49 -8
- package/src/authoring/chrome/ChromeButton.tsx +9 -4
- package/src/authoring/chrome/ChromeIcon.tsx +10 -1
- package/src/authoring/chrome/ChromeTopBar.tsx +39 -15
- package/src/authoring/chrome/DoubleTapBridge.tsx +19 -12
- package/src/authoring/chrome/doubleTapMonitor.ts +10 -0
- package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +7 -2
- package/src/authoring/elementPickerController.ts +2 -4
- package/src/authoring/fingerprintFromInstance.ts +170 -4
- package/src/authoring/hitTest.ts +324 -16
- package/src/authoring/hostAtPoint.ts +247 -0
- package/src/content/BannerStepButton.tsx +91 -0
- package/src/content/buttonAppearance.ts +16 -0
- package/src/content/resolveBannerButtonChrome.ts +49 -0
- package/src/content/themeColor.ts +15 -0
- package/src/content/types.ts +1 -0
- package/src/deepLinking.ts +4 -4
- package/src/evalJs/EvalJsHost.tsx +255 -0
- package/src/evalJs/bootstrap.ts +83 -0
- package/src/evalJs/bridgeMessages.ts +134 -0
- package/src/evalJs/evalJsBridge.ts +42 -0
- package/src/evalJs/evalJsController.ts +127 -0
- package/src/evalJs/getWebView.ts +124 -0
- package/src/evalJs/injectEvalPending.ts +14 -0
- package/src/evalJs/types.ts +56 -0
- package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
- package/src/expo-router/index.ts +8 -0
- package/src/expo-router/redirectSystemPath.ts +86 -0
- package/src/expo-router/useUserflowExpoRouter.ts +2 -2
- package/src/index.ts +139 -45
- package/src/installCheck.ts +191 -0
- package/src/lifecycle.ts +4 -1
- package/src/navigation/WithUserflowReactNavigation.tsx +13 -10
- package/src/navigation/openFlowNavigateUrl.ts +12 -5
- package/src/pairing/PairingController.ts +283 -29
- package/src/pairing/PreviewModeBanner.tsx +71 -14
- package/src/pairing/deepLink.ts +23 -5
- package/src/pairing/deviceId.ts +46 -0
- package/src/pairing/diagnostics.ts +6 -4
- package/src/pairing/tokenStorage.ts +60 -7
- package/src/pairing/usePairingState.ts +2 -0
- package/src/pairing/usePreviewBarHold.ts +160 -0
- package/src/runtime/BannerHost.tsx +102 -0
- package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
- package/src/runtime/SdkErrorBoundary.tsx +77 -0
- package/src/runtime/TargetPressBridge.tsx +36 -13
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +146 -64
- package/src/runtime/bannerEngine.ts +55 -0
- package/src/runtime/bannerEngineContext.ts +5 -0
- package/src/runtime/bannerPlacement.ts +36 -0
- package/src/runtime/embedBannerRegistry.ts +28 -0
- package/src/runtime/flowEngine.ts +76 -3
- package/src/runtime/isolateCall.ts +53 -0
- package/src/runtime/reportSdkError.ts +12 -0
- package/src/runtime/useBannerSession.ts +35 -0
- package/src/screenTracker.ts +34 -8
- package/src/storage/asyncStorage.ts +88 -0
- package/src/surfaces/BannerBar.tsx +176 -0
- package/src/surfaces/BannerSurface.tsx +82 -0
- package/src/surfaces/MadeWithUserflow.tsx +15 -10
- package/src/surfaces/ModalSurface.tsx +1 -1
- package/src/surfaces/TooltipSurface.tsx +17 -1
- package/src/surfaces/bannerBarLayout.ts +74 -0
- package/src/surfaces/bannerBarTokens.ts +34 -0
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
- package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
- package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
- package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
- package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
- package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
- package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
- package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
- package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
- package/src/surfaces/resolveBannerTheme.ts +18 -0
- package/src/surfaces/safeArea.ts +88 -19
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js +4 -4
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/constants.d.ts +2 -0
- package/vendor/core/dist/constants.d.ts.map +1 -1
- package/vendor/core/dist/constants.js +2 -0
- package/vendor/core/dist/constants.js.map +1 -1
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts +20 -1
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/ClientConditionEngine.js +13 -10
- package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +41 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +167 -28
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +38 -2
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +19 -2
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +10 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +68 -29
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/handleActions.d.ts +17 -3
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +17 -14
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/trackCondition.d.ts +2 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackCondition.js +4 -2
- package/vendor/core/dist/engine/trackCondition.js.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +11 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.js +42 -16
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -1
- package/vendor/core/dist/errors.d.ts +11 -1
- package/vendor/core/dist/errors.d.ts.map +1 -1
- package/vendor/core/dist/errors.js +2 -1
- package/vendor/core/dist/errors.js.map +1 -1
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
- package/vendor/core/dist/eventAttributes.js +4 -2
- package/vendor/core/dist/eventAttributes.js.map +1 -1
- package/vendor/core/dist/index.d.ts +5 -2
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +1 -0
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.js +9 -7
- package/vendor/core/dist/normalizeAttributes.js.map +1 -1
- package/vendor/core/dist/transport/pairing.d.ts +5 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
- package/vendor/core/dist/transport/pairing.js +69 -2
- package/vendor/core/dist/transport/pairing.js.map +1 -1
- package/vendor/core/dist/transport/phoenix.d.ts +8 -0
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +16 -2
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/autoData.d.ts +8 -15
- package/vendor/protocol/dist/autoData.d.ts.map +1 -1
- package/vendor/protocol/dist/autoData.js.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +58 -2
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +20 -2
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +22 -12
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +5 -2
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -12,6 +12,7 @@ exports.setHostOnNavigate = setHostOnNavigate;
|
|
|
12
12
|
exports.setReactNavigationRef = setReactNavigationRef;
|
|
13
13
|
var _reactNative = require("react-native");
|
|
14
14
|
var _openSafeUrl = require("../content/openSafeUrl.js");
|
|
15
|
+
var _isolateCall = require("../runtime/isolateCall.js");
|
|
15
16
|
let hostOnNavigate = null;
|
|
16
17
|
let navigationRef = null;
|
|
17
18
|
let expoRouter = null;
|
|
@@ -73,7 +74,9 @@ async function openFlowNavigateUrl(url) {
|
|
|
73
74
|
const trimmed = url.trim();
|
|
74
75
|
if (!trimmed) return;
|
|
75
76
|
if (hostOnNavigate) {
|
|
76
|
-
await
|
|
77
|
+
await (0, _isolateCall.isolateAsync)('onNavigate', async () => {
|
|
78
|
+
await hostOnNavigate(trimmed);
|
|
79
|
+
});
|
|
77
80
|
return;
|
|
78
81
|
}
|
|
79
82
|
if (isExternalNavigateUrl(trimmed)) {
|
|
@@ -82,13 +85,17 @@ async function openFlowNavigateUrl(url) {
|
|
|
82
85
|
}
|
|
83
86
|
if (isInAppNavigateUrl(trimmed)) {
|
|
84
87
|
if (expoRouter) {
|
|
85
|
-
|
|
88
|
+
(0, _isolateCall.isolateSync)('onNavigate', () => {
|
|
89
|
+
expoRouter.push(normalizeInAppPath(trimmed));
|
|
90
|
+
});
|
|
86
91
|
return;
|
|
87
92
|
}
|
|
88
93
|
if (navigationRef?.isReady()) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
(0, _isolateCall.isolateSync)('onNavigate', () => {
|
|
95
|
+
const name = routeNameFromPath(trimmed);
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- route names are host-defined
|
|
97
|
+
navigationRef.navigate(name);
|
|
98
|
+
});
|
|
92
99
|
return;
|
|
93
100
|
}
|
|
94
101
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_openSafeUrl","hostOnNavigate","navigationRef","expoRouter","setHostOnNavigate","handler","setReactNavigationRef","ref","setExpoRouterNavigator","router","isExternalNavigateUrl","url","isSafeUrl","isInAppNavigateUrl","trimmed","trim","test","normalizeInAppPath","startsWith","routeNameFromPath","path","normalized","replace","first","split","openFlowNavigateUrl","openSafeUrl","push","isReady","name","navigate","Linking","openURL","resetFlowNavigateRegistryForTests"],"sourceRoot":"../../../src","sources":["navigation/openFlowNavigateUrl.ts"],"mappings":";;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAQA,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_openSafeUrl","_isolateCall","hostOnNavigate","navigationRef","expoRouter","setHostOnNavigate","handler","setReactNavigationRef","ref","setExpoRouterNavigator","router","isExternalNavigateUrl","url","isSafeUrl","isInAppNavigateUrl","trimmed","trim","test","normalizeInAppPath","startsWith","routeNameFromPath","path","normalized","replace","first","split","openFlowNavigateUrl","isolateAsync","openSafeUrl","isolateSync","push","isReady","name","navigate","Linking","openURL","resetFlowNavigateRegistryForTests"],"sourceRoot":"../../../src","sources":["navigation/openFlowNavigateUrl.ts"],"mappings":";;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAQA,IAAIG,cAA0C,GAAG,IAAI;AACrD,IAAIC,aAA2D,GAAG,IAAI;AACtE,IAAIC,UAAiC,GAAG,IAAI;;AAE5C;AACO,SAASC,iBAAiBA,CAACC,OAA+C,EAAQ;EACvFJ,cAAc,GAAGI,OAAO,IAAI,IAAI;AAClC;;AAEA;AACO,SAASC,qBAAqBA,CACnCC,GAA6D,EACvD;EACNL,aAAa,GAAGK,GAAG,IAAI,IAAI;AAC7B;;AAEA;AACO,SAASC,sBAAsBA,CAACC,MAAyC,EAAQ;EACtFN,UAAU,GAAGM,MAAM,IAAI,IAAI;AAC7B;;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AC,EAAE;IAClC,MAAM,IAAAa,wBAAW,EAACb,OAAO,CAAC;IAC1B;EACF;EAEA,IAAID,kBAAkB,CAACC,OAAO,CAAC,EAAE;IAC/B,IAAIX,UAAU,EAAE;MACd,IAAAyB,wBAAW,EAAC,YAAY,EAAE,MAAM;QAC9BzB,UAAU,CAAE0B,IAAI,CAACZ,kBAAkB,CAACH,OAAO,CAAC,CAAC;MAC/C,CAAC,CAAC;MACF;IACF;IACA,IAAIZ,aAAa,EAAE4B,OAAO,CAAC,CAAC,EAAE;MAC5B,IAAAF,wBAAW,EAAC,YAAY,EAAE,MAAM;QAC9B,MAAMG,IAAI,GAAGZ,iBAAiB,CAACL,OAAO,CAAC;QACvC;QACCZ,aAAa,CAA2C8B,QAAQ,CAACD,IAAW,CAAC;MAChF,CAAC,CAAC;MACF;IACF;EACF;;EAEA;EACA,IAAI;IACF,MAAME,oBAAO,CAACC,OAAO,CAACpB,OAAO,CAAC;EAChC,CAAC,CAAC,MAAM;IACN;EAAA;AAEJ;;AAEA;AACO,SAASqB,iCAAiCA,CAAA,EAAS;EACxDlC,cAAc,GAAG,IAAI;EACrBC,aAAa,GAAG,IAAI;EACpBC,UAAU,GAAG,IAAI;AACnB","ignoreList":[]}
|
|
@@ -5,9 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.PairingController = void 0;
|
|
7
7
|
var _core = require("@userflow-tech/core");
|
|
8
|
+
var _protocol = require("@userflow-tech/protocol");
|
|
8
9
|
var _reactNative = require("react-native");
|
|
9
10
|
var _fiberAnchorCache = require("../anchors/fiberAnchorCache.js");
|
|
11
|
+
var _evalJsController = require("../evalJs/evalJsController.js");
|
|
10
12
|
var _deepLink = require("./deepLink.js");
|
|
13
|
+
var _deviceId = require("./deviceId.js");
|
|
11
14
|
var _diagnostics = require("./diagnostics.js");
|
|
12
15
|
var _elementPickerRelay = require("./elementPickerRelay.js");
|
|
13
16
|
var _tokenStorage = require("./tokenStorage.js");
|
|
@@ -31,10 +34,27 @@ class PairingController {
|
|
|
31
34
|
urlSub = null;
|
|
32
35
|
appStateSub = null;
|
|
33
36
|
listeners = new Set();
|
|
37
|
+
pairingDeviceId = null;
|
|
38
|
+
/** A link or resume already claimed this launch, so a stored token must not. */
|
|
39
|
+
acceptedPairingToken = false;
|
|
40
|
+
/**
|
|
41
|
+
* Bumped by exitPreview. An in-flight resume or connect checks it after
|
|
42
|
+
* every await and does not write the token or leave the socket up.
|
|
43
|
+
*/
|
|
44
|
+
launchEpoch = 0;
|
|
45
|
+
/** Latest enterPreview. An older attempt must not clear a newer token. */
|
|
46
|
+
enterAttempt = 0;
|
|
47
|
+
/**
|
|
48
|
+
* Orders token and purpose writes. Two scans can overlap on the awaits, and
|
|
49
|
+
* the slower one's purpose must not land on the token the faster one saved.
|
|
50
|
+
*/
|
|
51
|
+
previewSaveQueue = Promise.resolve();
|
|
34
52
|
initPhase = 'ready';
|
|
35
53
|
initFailureReason = null;
|
|
36
54
|
/** Pairing token captured before init resolved, replayed once it does. */
|
|
37
55
|
deferredPairingToken = null;
|
|
56
|
+
/** Purpose of {@link deferredPairingToken}, so the held banner already honours it. */
|
|
57
|
+
deferredPurpose = null;
|
|
38
58
|
/** Diagnostics already emitted for the current init attempt. */
|
|
39
59
|
loggedOnce = new Set();
|
|
40
60
|
relayUnsub = null;
|
|
@@ -45,7 +65,10 @@ class PairingController {
|
|
|
45
65
|
this.LinkingModule = options.LinkingModule ?? _reactNative.Linking;
|
|
46
66
|
this.AppStateModule = options.AppStateModule ?? _reactNative.AppState;
|
|
47
67
|
this.clearLocalSession = options.clearLocalSession ?? undefined;
|
|
68
|
+
this.endDraftSession = options.endDraftSession ?? undefined;
|
|
69
|
+
this.cancelPendingDraftEnd = options.cancelPendingDraftEnd ?? undefined;
|
|
48
70
|
this.logger = options.logger ?? _diagnostics.defaultPairingLogger;
|
|
71
|
+
this.deviceIdProvider = options.deviceIdProvider ?? _deviceId.getOrCreatePairingDeviceId;
|
|
49
72
|
}
|
|
50
73
|
getEngine() {
|
|
51
74
|
return this.engine;
|
|
@@ -58,6 +81,8 @@ class PairingController {
|
|
|
58
81
|
getState() {
|
|
59
82
|
const blocked = this.blockedState();
|
|
60
83
|
if (blocked) return blocked;
|
|
84
|
+
const held = this.heldState();
|
|
85
|
+
if (held) return held;
|
|
61
86
|
return this.engine?.getState() ?? {
|
|
62
87
|
status: 'idle',
|
|
63
88
|
pairingId: null,
|
|
@@ -67,7 +92,9 @@ class PairingController {
|
|
|
67
92
|
needsRescan: false,
|
|
68
93
|
awaitingStartCondition: false,
|
|
69
94
|
canRestartPreview: false,
|
|
70
|
-
previewRestartGeneration: 0
|
|
95
|
+
previewRestartGeneration: 0,
|
|
96
|
+
pairingSessionGeneration: 0,
|
|
97
|
+
previewStartGeneration: 0
|
|
71
98
|
};
|
|
72
99
|
}
|
|
73
100
|
|
|
@@ -86,7 +113,33 @@ class PairingController {
|
|
|
86
113
|
needsRescan: true,
|
|
87
114
|
awaitingStartCondition: false,
|
|
88
115
|
canRestartPreview: false,
|
|
89
|
-
previewRestartGeneration: 0
|
|
116
|
+
previewRestartGeneration: 0,
|
|
117
|
+
pairingSessionGeneration: 0,
|
|
118
|
+
previewStartGeneration: 0
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* A link or resumed token is waiting for init. Report connecting so the
|
|
124
|
+
* banner is visible during credential validation instead of looking idle.
|
|
125
|
+
*/
|
|
126
|
+
heldState() {
|
|
127
|
+
if (this.initPhase !== 'pending' || this.deferredPairingToken === null) return null;
|
|
128
|
+
return {
|
|
129
|
+
status: 'connecting',
|
|
130
|
+
pairingId: null,
|
|
131
|
+
deviceId: this.pairingDeviceId,
|
|
132
|
+
previewActive: true,
|
|
133
|
+
lastError: null,
|
|
134
|
+
needsRescan: false,
|
|
135
|
+
awaitingStartCondition: false,
|
|
136
|
+
canRestartPreview: false,
|
|
137
|
+
previewRestartGeneration: 0,
|
|
138
|
+
pairingSessionGeneration: 0,
|
|
139
|
+
previewStartGeneration: 0,
|
|
140
|
+
...(this.deferredPurpose ? {
|
|
141
|
+
pairingPurpose: this.deferredPurpose
|
|
142
|
+
} : {})
|
|
90
143
|
};
|
|
91
144
|
}
|
|
92
145
|
onStateChange(listener) {
|
|
@@ -111,14 +164,6 @@ class PairingController {
|
|
|
111
164
|
}
|
|
112
165
|
}
|
|
113
166
|
async startListening() {
|
|
114
|
-
// Exit pairing on app restart: drop any leftover secure token. Guarded so a
|
|
115
|
-
// storage failure cannot cost us the listeners registered below — losing
|
|
116
|
-
// those is what makes an inbound QR link vanish without explanation.
|
|
117
|
-
try {
|
|
118
|
-
await this.tokenStore.clear();
|
|
119
|
-
} catch (error) {
|
|
120
|
-
this.warnOnce((0, _diagnostics.pairingTokenStoreClearFailedMessage)(describeError(error)));
|
|
121
|
-
}
|
|
122
167
|
this.ensureEngine();
|
|
123
168
|
this.urlSub = this.LinkingModule.addEventListener('url', ({
|
|
124
169
|
url
|
|
@@ -141,6 +186,52 @@ class PairingController {
|
|
|
141
186
|
} catch {
|
|
142
187
|
// Linking may throw on some platforms before the native module is ready.
|
|
143
188
|
}
|
|
189
|
+
|
|
190
|
+
// A launch URL already claimed this process. Do not also resume storage.
|
|
191
|
+
if (this.acceptedPairingToken) return;
|
|
192
|
+
await this.resumeStoredToken();
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Rejoin the Builder session after a relaunch when no new pairing link won.
|
|
197
|
+
* An expired or undecodable token is cleared so the next launch stays idle.
|
|
198
|
+
*/
|
|
199
|
+
async resumeStoredToken() {
|
|
200
|
+
const epoch = this.launchEpoch;
|
|
201
|
+
let stored;
|
|
202
|
+
try {
|
|
203
|
+
stored = await this.tokenStore.get();
|
|
204
|
+
} catch (error) {
|
|
205
|
+
this.warnOnce((0, _diagnostics.pairingConnectFailedMessage)(describeError(error)));
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (epoch !== this.launchEpoch || this.acceptedPairingToken || !stored) return;
|
|
209
|
+
const claims = (0, _protocol.decodePairingJwt)(stored);
|
|
210
|
+
if (!claims || (0, _protocol.isPairingJwtExpired)(claims)) {
|
|
211
|
+
// A link that arrived while we were reading storage owns the session.
|
|
212
|
+
if (epoch !== this.launchEpoch || this.acceptedPairingToken) return;
|
|
213
|
+
try {
|
|
214
|
+
const current = await this.tokenStore.get();
|
|
215
|
+
if (epoch !== this.launchEpoch || this.acceptedPairingToken || current !== stored) return;
|
|
216
|
+
await this.tokenStore.clear();
|
|
217
|
+
} catch (error) {
|
|
218
|
+
this.warnOnce((0, _diagnostics.pairingTokenStoreClearFailedMessage)(describeError(error)));
|
|
219
|
+
}
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (epoch !== this.launchEpoch || this.acceptedPairingToken) return;
|
|
223
|
+
let purpose = null;
|
|
224
|
+
try {
|
|
225
|
+
purpose = (await this.tokenStore.getPurpose?.()) ?? null;
|
|
226
|
+
} catch {
|
|
227
|
+
// Resume without it; the banner falls back to its default reveal.
|
|
228
|
+
}
|
|
229
|
+
if (epoch !== this.launchEpoch || this.acceptedPairingToken) return;
|
|
230
|
+
try {
|
|
231
|
+
await this.connectWhenReady(stored, 'resume', purpose);
|
|
232
|
+
} catch (error) {
|
|
233
|
+
this.warnOnce((0, _diagnostics.pairingConnectFailedMessage)(describeError(error)));
|
|
234
|
+
}
|
|
144
235
|
}
|
|
145
236
|
stop() {
|
|
146
237
|
this.urlSub?.remove();
|
|
@@ -170,16 +261,32 @@ class PairingController {
|
|
|
170
261
|
this.warnOnce((0, _diagnostics.pairingAttemptRejectionMessage)(inspected.reason, url));
|
|
171
262
|
return true;
|
|
172
263
|
}
|
|
264
|
+
await this.connectWhenReady(inspected.link.pairingToken, 'link', inspected.link.purpose ?? null);
|
|
265
|
+
return true;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Connect now, or hold the token until init resolves or fails. Links and
|
|
270
|
+
* resumed sessions share this gate so both are deferred, replayed, and
|
|
271
|
+
* shown the same way.
|
|
272
|
+
*/
|
|
273
|
+
async connectWhenReady(token, source = 'link', purpose = null) {
|
|
274
|
+
this.acceptedPairingToken = true;
|
|
173
275
|
if (this.initPhase !== 'ready') {
|
|
174
276
|
// Hold the token rather than discarding it. `notifyInitialized` replays it;
|
|
175
277
|
// `notifyInitFailed` turns it into visible state.
|
|
176
|
-
this.deferredPairingToken =
|
|
177
|
-
this.
|
|
178
|
-
if (this.initPhase === 'failed')
|
|
179
|
-
|
|
278
|
+
this.deferredPairingToken = token;
|
|
279
|
+
this.deferredPurpose = purpose;
|
|
280
|
+
if (this.initPhase === 'failed') {
|
|
281
|
+
this.warnOnce((0, _diagnostics.pairingLinkInitFailedMessage)(this.initFailureReason ?? 'unknown error'));
|
|
282
|
+
} else if (source === 'link') {
|
|
283
|
+
// A resume waits on init on every relaunch; only a link needs this note.
|
|
284
|
+
this.warnOnce((0, _diagnostics.pairingLinkDeferredMessage)());
|
|
285
|
+
}
|
|
286
|
+
this.emit(this.getState());
|
|
287
|
+
return;
|
|
180
288
|
}
|
|
181
|
-
await this.enterPreview(
|
|
182
|
-
return true;
|
|
289
|
+
await this.enterPreview(token, purpose);
|
|
183
290
|
}
|
|
184
291
|
|
|
185
292
|
/**
|
|
@@ -197,21 +304,25 @@ class PairingController {
|
|
|
197
304
|
}
|
|
198
305
|
|
|
199
306
|
/**
|
|
200
|
-
* Called when `Userflow.init()` resolves. Connects a link
|
|
201
|
-
* init was still in flight.
|
|
307
|
+
* Called when `Userflow.init()` resolves. Connects a link or resumed session
|
|
308
|
+
* that arrived while init was still in flight. `Userflow.init` does not await
|
|
309
|
+
* this — the pairing socket must not block identify.
|
|
202
310
|
*/
|
|
203
311
|
async notifyInitialized() {
|
|
204
312
|
this.initPhase = 'ready';
|
|
205
313
|
this.initFailureReason = null;
|
|
206
314
|
const deferred = this.deferredPairingToken;
|
|
207
315
|
if (deferred === null) return;
|
|
316
|
+
const purpose = this.deferredPurpose;
|
|
208
317
|
this.deferredPairingToken = null;
|
|
318
|
+
this.deferredPurpose = null;
|
|
209
319
|
try {
|
|
210
|
-
await this.enterPreview(deferred);
|
|
320
|
+
await this.enterPreview(deferred, purpose);
|
|
211
321
|
} catch (error) {
|
|
212
|
-
// Preview must not fail host init. `Userflow.init`
|
|
213
|
-
// PairingEngine.start rethrows on every connect failure, so letting
|
|
214
|
-
// escape would
|
|
322
|
+
// Preview must not fail host init. `Userflow.init` does not await this,
|
|
323
|
+
// and PairingEngine.start rethrows on every connect failure, so letting
|
|
324
|
+
// this escape would be an unhandled rejection — and, if it were awaited,
|
|
325
|
+
// an expired QR token would fail the host app's entire init.
|
|
215
326
|
this.warnOnce((0, _diagnostics.pairingConnectFailedMessage)(describeError(error)));
|
|
216
327
|
}
|
|
217
328
|
}
|
|
@@ -240,16 +351,116 @@ class PairingController {
|
|
|
240
351
|
}
|
|
241
352
|
|
|
242
353
|
/** Explicit entry with a raw pairing JWT (tests / advanced hosts). */
|
|
243
|
-
async enterPreview(pairingToken) {
|
|
354
|
+
async enterPreview(pairingToken, purpose = null) {
|
|
355
|
+
const epoch = this.launchEpoch;
|
|
356
|
+
const attempt = ++this.enterAttempt;
|
|
244
357
|
const engine = this.ensureEngine();
|
|
245
|
-
await
|
|
246
|
-
|
|
358
|
+
// Before the first await, so an exit that runs later still arms its own end.
|
|
359
|
+
if (epoch === this.launchEpoch) this.cancelPendingDraftEnd?.();
|
|
360
|
+
const deviceId = await this.resolveDeviceId();
|
|
361
|
+
if (attempt !== this.enterAttempt || epoch !== this.launchEpoch) return;
|
|
362
|
+
this.pairingDeviceId = deviceId;
|
|
363
|
+
const saved = await this.savePreviewCredentials(pairingToken, purpose, attempt, epoch);
|
|
364
|
+
if (!saved) return;
|
|
365
|
+
try {
|
|
366
|
+
await (purpose ? engine.start(pairingToken, {
|
|
367
|
+
purpose
|
|
368
|
+
}) : engine.start(pairingToken));
|
|
369
|
+
} catch (error) {
|
|
370
|
+
// A newer pair owns the engine now. Stopping here would drop it.
|
|
371
|
+
if (attempt !== this.enterAttempt) return;
|
|
372
|
+
if (epoch !== this.launchEpoch) {
|
|
373
|
+
// start() records a connect failure after stop() has already gone idle.
|
|
374
|
+
await this.discardPreviewToken(pairingToken, attempt);
|
|
375
|
+
this.engine?.stop();
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
throw error;
|
|
379
|
+
}
|
|
380
|
+
if (attempt !== this.enterAttempt) return;
|
|
381
|
+
if (epoch !== this.launchEpoch) {
|
|
382
|
+
await this.discardPreviewToken(pairingToken, attempt);
|
|
383
|
+
this.engine?.stop();
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Write the token and its purpose as one attempt. Writes are queued so an
|
|
389
|
+
* older scan cannot finish its purpose after a newer scan has saved its own.
|
|
390
|
+
* Returns false when this attempt lost the race; storage then still belongs
|
|
391
|
+
* to whoever connected, or is cleared if this attempt was the last writer.
|
|
392
|
+
*/
|
|
393
|
+
async savePreviewCredentials(pairingToken, purpose, attempt, epoch) {
|
|
394
|
+
const previous = this.previewSaveQueue;
|
|
395
|
+
let release = () => undefined;
|
|
396
|
+
this.previewSaveQueue = new Promise(resolve => {
|
|
397
|
+
release = resolve;
|
|
398
|
+
});
|
|
399
|
+
try {
|
|
400
|
+
await previous;
|
|
401
|
+
if (attempt !== this.enterAttempt || epoch !== this.launchEpoch) return false;
|
|
402
|
+
await this.tokenStore.set(pairingToken);
|
|
403
|
+
if (attempt !== this.enterAttempt || epoch !== this.launchEpoch) {
|
|
404
|
+
await this.revertPreviewCredentials(pairingToken);
|
|
405
|
+
return false;
|
|
406
|
+
}
|
|
407
|
+
await this.tokenStore.setPurpose?.(purpose);
|
|
408
|
+
if (attempt !== this.enterAttempt || epoch !== this.launchEpoch) {
|
|
409
|
+
await this.revertPreviewCredentials(pairingToken);
|
|
410
|
+
return false;
|
|
411
|
+
}
|
|
412
|
+
return true;
|
|
413
|
+
} finally {
|
|
414
|
+
release();
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* Drop credentials this attempt wrote, when they are still the ones stored.
|
|
420
|
+
* A newer scan may already have replaced them; those stay.
|
|
421
|
+
*/
|
|
422
|
+
async revertPreviewCredentials(pairingToken) {
|
|
423
|
+
try {
|
|
424
|
+
const current = await this.tokenStore.get();
|
|
425
|
+
if (current !== pairingToken) return;
|
|
426
|
+
await this.tokenStore.clear();
|
|
427
|
+
} catch (error) {
|
|
428
|
+
this.warnOnce((0, _diagnostics.pairingTokenStoreClearFailedMessage)(describeError(error)));
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Remove the token this attempt wrote. A newer pair may already have
|
|
434
|
+
* replaced it; that token stays.
|
|
435
|
+
*/
|
|
436
|
+
async discardPreviewToken(pairingToken, attempt) {
|
|
437
|
+
if (attempt !== this.enterAttempt) return;
|
|
438
|
+
try {
|
|
439
|
+
const current = await this.tokenStore.get();
|
|
440
|
+
if (attempt !== this.enterAttempt || current !== pairingToken) return;
|
|
441
|
+
await this.tokenStore.clear();
|
|
442
|
+
} catch (error) {
|
|
443
|
+
this.warnOnce((0, _diagnostics.pairingTokenStoreClearFailedMessage)(describeError(error)));
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
async resolveDeviceId() {
|
|
447
|
+
if (this.pairingDeviceId !== null) return this.pairingDeviceId;
|
|
448
|
+
return this.deviceIdProvider();
|
|
247
449
|
}
|
|
248
450
|
async exitPreview() {
|
|
249
451
|
// Drop any held link too, so dismissing a blocked banner actually clears it.
|
|
452
|
+
// Bump before the awaits so a resume still reading storage does not reconnect.
|
|
453
|
+
this.launchEpoch += 1;
|
|
454
|
+
_evalJsController.evalJsController.reset();
|
|
250
455
|
this.deferredPairingToken = null;
|
|
456
|
+
this.deferredPurpose = null;
|
|
251
457
|
await this.tokenStore.clear();
|
|
252
458
|
this.engine?.stop();
|
|
459
|
+
// Not awaited: the local clear is synchronous, and the banner must not wait
|
|
460
|
+
// on the end-user socket.
|
|
461
|
+
void this.endDraftSession?.().catch(error => {
|
|
462
|
+
this.warnOnce((0, _diagnostics.pairingPreviewErrorMessage)(describeError(error)));
|
|
463
|
+
});
|
|
253
464
|
this.clearLocalSession?.();
|
|
254
465
|
this.emit(this.getState());
|
|
255
466
|
}
|
|
@@ -261,6 +472,7 @@ class PairingController {
|
|
|
261
472
|
async restartPreview() {
|
|
262
473
|
if (!this.engine) return false;
|
|
263
474
|
(0, _fiberAnchorCache.clearFiberAnchorCache)();
|
|
475
|
+
_evalJsController.evalJsController.reset();
|
|
264
476
|
return this.engine.restartPreview();
|
|
265
477
|
}
|
|
266
478
|
|
|
@@ -278,8 +490,14 @@ class PairingController {
|
|
|
278
490
|
pairingEndpoint: this.pairingEndpoint
|
|
279
491
|
},
|
|
280
492
|
deviceMeta: () => ({
|
|
281
|
-
os: _reactNative.Platform.OS
|
|
282
|
-
|
|
493
|
+
os: _reactNative.Platform.OS,
|
|
494
|
+
...(this.pairingDeviceId !== null ? {
|
|
495
|
+
device_id: this.pairingDeviceId
|
|
496
|
+
} : {})
|
|
497
|
+
}),
|
|
498
|
+
onBeforePreviewStart: () => {
|
|
499
|
+
this.clearLocalSession?.();
|
|
500
|
+
}
|
|
283
501
|
});
|
|
284
502
|
this.engine.onStateChange(state => {
|
|
285
503
|
this.emit(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_reactNative","_fiberAnchorCache","_deepLink","_diagnostics","_elementPickerRelay","_tokenStorage","PairingController","engine","started","urlSub","appStateSub","listeners","Set","initPhase","initFailureReason","deferredPairingToken","loggedOnce","relayUnsub","constructor","options","core","pairingEndpoint","DEFAULT_PAIRING_ENDPOINT","tokenStore","createPairingTokenStore","LinkingModule","Linking","AppStateModule","AppState","clearLocalSession","undefined","logger","defaultPairingLogger","getEngine","hasStarted","getState","blocked","blockedState","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","onStateChange","listener","add","delete","start","startListening","error","warnOnce","pairingListenerSetupFailedMessage","describeError","clear","pairingTokenStoreClearFailedMessage","ensureEngine","addEventListener","url","handleUrl","catch","pairingConnectFailedMessage","next","ensureAlive","initial","getInitialURL","stop","remove","unbindRelay","exitPreview","inspected","inspectPairingDeepLink","ok","isPairingAttempt","reason","pairingAttemptRejectionMessage","link","pairingToken","pairingLinkInitFailedMessage","pairingLinkDeferredMessage","emit","enterPreview","notifyInitStarted","wasBlocked","notifyInitialized","deferred","notifyInitFailed","message","has","set","restartPreview","clearFiberAnchorCache","notifyIdentified","PairingEngine","sendClientMessage","send","onServerMessage","handler","isIdentified","getUserId","pairingOptions","deviceMeta","os","Platform","OS","state","pairingPreviewErrorMessage","bindElementPickerRelay","exports","Error","String"],"sourceRoot":"../../../src","sources":["pairing/PairingController.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAWA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAqBA;AACA;AACA;AACA;AACA;AACO,MAAMO,iBAAiB,CAAC;EACrBC,MAAM,GAAyB,IAAI;EACnCC,OAAO,GAAG,KAAK;EACfC,MAAM,GAA8B,IAAI;EACxCC,WAAW,GAA8B,IAAI;EACpCC,SAAS,GAAG,IAAIC,GAAG,CAA4B,CAAC;EAQzDC,SAAS,GAAc,OAAO;EAC9BC,iBAAiB,GAAkB,IAAI;EAC/C;EACQC,oBAAoB,GAAkB,IAAI;EAClD;EACiBC,UAAU,GAAG,IAAIJ,GAAG,CAAS,CAAC;EACvC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C,IAAAuD,uCAA0B,EAACD,KAAK,CAAClE,SAAS,CAAC,CAAC;MAC5D;MACA,IAAIkE,KAAK,CAACtE,MAAM,KAAK,eAAe,IAAIsE,KAAK,CAACjE,WAAW,EAAE;QACzD,KAAK,IAAI,CAACpB,UAAU,CAACkC,KAAK,CAAC,CAAC;MAC9B;IACF,CAAC,CAAC;IAEF,IAAI,CAACc,WAAW,CAAC,CAAC;IAClB,IAAI,CAACtD,UAAU,GAAG,IAAA6F,0CAAsB,EAAC,IAAI,CAACvG,MAAM,CAAC;IAErD,OAAO,IAAI,CAACA,MAAM;EACpB;EAEQgE,WAAWA,CAAA,EAAS;IAC1B,IAAI,CAACtD,UAAU,GAAG,CAAC;IACnB,IAAI,CAACA,UAAU,GAAG,IAAI;EACxB;EAEQkE,IAAIA,CAACyB,KAAyB,EAAQ;IAC5C,KAAK,MAAM5D,QAAQ,IAAI,IAAI,CAACrC,SAAS,EAAE;MACrC,IAAI;QACFqC,QAAQ,CAAC4D,KAAK,CAAC;MACjB,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ;EACF;AACF;AAACG,OAAA,CAAAzG,iBAAA,GAAAA,iBAAA;AAED,SAASkD,aAAaA,CAACH,KAAc,EAAU;EAC7C,IAAIA,KAAK,YAAY2D,KAAK,EAAE,OAAO3D,KAAK,CAACqC,OAAO;EAChD,IAAI,OAAOrC,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAC3C,OAAO4D,MAAM,CAAC5D,KAAK,CAAC;AACtB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_core","require","_protocol","_reactNative","_fiberAnchorCache","_evalJsController","_deepLink","_deviceId","_diagnostics","_elementPickerRelay","_tokenStorage","PairingController","engine","started","urlSub","appStateSub","listeners","Set","pairingDeviceId","acceptedPairingToken","launchEpoch","enterAttempt","previewSaveQueue","Promise","resolve","initPhase","initFailureReason","deferredPairingToken","deferredPurpose","loggedOnce","relayUnsub","constructor","options","core","pairingEndpoint","DEFAULT_PAIRING_ENDPOINT","tokenStore","createPairingTokenStore","LinkingModule","Linking","AppStateModule","AppState","clearLocalSession","undefined","endDraftSession","cancelPendingDraftEnd","logger","defaultPairingLogger","deviceIdProvider","getOrCreatePairingDeviceId","getEngine","hasStarted","getState","blocked","blockedState","held","heldState","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","pairingSessionGeneration","previewStartGeneration","pairingPurpose","onStateChange","listener","add","delete","start","startListening","error","warnOnce","pairingListenerSetupFailedMessage","describeError","ensureEngine","addEventListener","url","handleUrl","catch","pairingConnectFailedMessage","next","ensureAlive","initial","getInitialURL","resumeStoredToken","epoch","stored","get","claims","decodePairingJwt","isPairingJwtExpired","current","clear","pairingTokenStoreClearFailedMessage","purpose","getPurpose","connectWhenReady","stop","remove","unbindRelay","exitPreview","inspected","inspectPairingDeepLink","ok","isPairingAttempt","reason","pairingAttemptRejectionMessage","link","pairingToken","token","source","pairingLinkInitFailedMessage","pairingLinkDeferredMessage","emit","enterPreview","notifyInitStarted","wasBlocked","notifyInitialized","deferred","notifyInitFailed","message","has","attempt","resolveDeviceId","saved","savePreviewCredentials","discardPreviewToken","previous","release","set","revertPreviewCredentials","setPurpose","evalJsController","reset","pairingPreviewErrorMessage","restartPreview","clearFiberAnchorCache","notifyIdentified","PairingEngine","sendClientMessage","send","onServerMessage","handler","isIdentified","getUserId","pairingOptions","deviceMeta","os","Platform","OS","device_id","onBeforePreviewStart","state","bindElementPickerRelay","exports","Error","String"],"sourceRoot":"../../../src","sources":["pairing/PairingController.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAOA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAEA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAN,OAAA;AACA,IAAAO,YAAA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AAK,CAAChG,SAAS,EAAE;QACnB,IAAI,CAACe,QAAQ,CAAC,IAAA+D,uCAA0B,EAACkB,KAAK,CAAChG,SAAS,CAAC,CAAC;MAC5D;MACA,IAAIgG,KAAK,CAACpG,MAAM,KAAK,eAAe,IAAIoG,KAAK,CAAC/F,WAAW,EAAE;QACzD,KAAK,IAAI,CAAC1B,UAAU,CAAC6D,KAAK,CAAC,CAAC;MAC9B;IACF,CAAC,CAAC;IAEF,IAAI,CAACO,WAAW,CAAC,CAAC;IAClB,IAAI,CAAC1E,UAAU,GAAG,IAAAgI,0CAAsB,EAAC,IAAI,CAAClJ,MAAM,CAAC;IAErD,OAAO,IAAI,CAACA,MAAM;EACpB;EAEQ4F,WAAWA,CAAA,EAAS;IAC1B,IAAI,CAAC1E,UAAU,GAAG,CAAC;IACnB,IAAI,CAACA,UAAU,GAAG,IAAI;EACxB;EAEQwF,IAAIA,CAACuC,KAAyB,EAAQ;IAC5C,KAAK,MAAMvF,QAAQ,IAAI,IAAI,CAACtD,SAAS,EAAE;MACrC,IAAI;QACFsD,QAAQ,CAACuF,KAAK,CAAC;MACjB,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ;EACF;AACF;AAACE,OAAA,CAAApJ,iBAAA,GAAAA,iBAAA;AAED,SAASmE,aAAaA,CAACH,KAAc,EAAU;EAC7C,IAAIA,KAAK,YAAYqF,KAAK,EAAE,OAAOrF,KAAK,CAACkD,OAAO;EAChD,IAAI,OAAOlD,KAAK,KAAK,QAAQ,EAAE,OAAOA,KAAK;EAC3C,OAAOsF,MAAM,CAACtF,KAAK,CAAC;AACtB","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PreviewModeBanner = PreviewModeBanner;
|
|
7
|
+
exports.RECONNECT_REVEAL_DELAY_MS = void 0;
|
|
7
8
|
var React = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _reactNative = require("react-native");
|
|
9
10
|
var _ChromeBarTransition = require("../authoring/chrome/ChromeBarTransition.js");
|
|
@@ -17,6 +18,8 @@ var _resolvePreviewChrome = require("./resolvePreviewChrome.js");
|
|
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
19
20
|
const ONBOARDING_COPY = 'Double tap anywhere to access the menu';
|
|
21
|
+
/** A short blip stays quiet. Longer than this, the hidden bar comes back until the socket recovers. */
|
|
22
|
+
const RECONNECT_REVEAL_DELAY_MS = exports.RECONNECT_REVEAL_DELAY_MS = 2000;
|
|
20
23
|
/**
|
|
21
24
|
* Overlay chrome for Builder pairing preview mode.
|
|
22
25
|
*/
|
|
@@ -25,16 +28,20 @@ function PreviewModeBanner({
|
|
|
25
28
|
onExit,
|
|
26
29
|
onRestart,
|
|
27
30
|
onConfirmingChange,
|
|
28
|
-
suppressed = false
|
|
31
|
+
suppressed = false,
|
|
32
|
+
held = false
|
|
29
33
|
}) {
|
|
30
34
|
const setBannerHeight = (0, _surfaceLayoutInsets.useReportPreviewBannerHeight)();
|
|
31
35
|
const chrome = (0, _resolvePreviewChrome.resolvePreviewChrome)(state);
|
|
32
36
|
const [chromeShown, setChromeShown] = React.useState(true);
|
|
33
37
|
const [showOnboarding, setShowOnboarding] = React.useState(false);
|
|
34
38
|
const [barHeight, setBarHeight] = React.useState(0);
|
|
35
|
-
const
|
|
39
|
+
const [reconnectRevealed, setReconnectRevealed] = React.useState(false);
|
|
40
|
+
const reconnectRevealedRef = React.useRef(reconnectRevealed);
|
|
41
|
+
reconnectRevealedRef.current = reconnectRevealed;
|
|
42
|
+
const armedGenerationRef = React.useRef(null);
|
|
36
43
|
const isError = chrome.visible && chrome.tone === 'error';
|
|
37
|
-
const visible = chrome.visible && !suppressed && (chromeShown ||
|
|
44
|
+
const visible = chrome.visible && !suppressed && (isError || !held && (chromeShown || reconnectRevealed));
|
|
38
45
|
const [confirming, setConfirming] = React.useState(null);
|
|
39
46
|
const showRestart = Boolean(state.canRestartPreview) && !isError;
|
|
40
47
|
const showDialog = confirming != null && visible && !isError;
|
|
@@ -48,10 +55,11 @@ function PreviewModeBanner({
|
|
|
48
55
|
const barChrome = chrome.visible ? chrome : lastVisibleChromeRef.current;
|
|
49
56
|
React.useEffect(() => {
|
|
50
57
|
if (!chrome.visible) {
|
|
51
|
-
|
|
58
|
+
armedGenerationRef.current = null;
|
|
52
59
|
setChromeShown(true);
|
|
53
60
|
setShowOnboarding(false);
|
|
54
61
|
setBarHeight(0);
|
|
62
|
+
setReconnectRevealed(false);
|
|
55
63
|
return;
|
|
56
64
|
}
|
|
57
65
|
if (isError) {
|
|
@@ -59,11 +67,24 @@ function PreviewModeBanner({
|
|
|
59
67
|
setShowOnboarding(false);
|
|
60
68
|
return;
|
|
61
69
|
}
|
|
62
|
-
if (
|
|
63
|
-
|
|
70
|
+
if (armedGenerationRef.current !== state.pairingSessionGeneration) {
|
|
71
|
+
armedGenerationRef.current = state.pairingSessionGeneration;
|
|
72
|
+
setChromeShown(true);
|
|
64
73
|
setShowOnboarding(true);
|
|
65
74
|
}
|
|
66
|
-
}, [chrome.visible, isError]);
|
|
75
|
+
}, [chrome.visible, isError, state.pairingSessionGeneration]);
|
|
76
|
+
React.useEffect(() => {
|
|
77
|
+
if (!chrome.visible || held || state.status !== 'reconnecting') return;
|
|
78
|
+
const timer = setTimeout(() => setReconnectRevealed(true), RECONNECT_REVEAL_DELAY_MS);
|
|
79
|
+
return () => clearTimeout(timer);
|
|
80
|
+
}, [chrome.visible, held, state.status]);
|
|
81
|
+
React.useEffect(() => {
|
|
82
|
+
if (chrome.visible && state.status === 'reconnecting') return;
|
|
83
|
+
// An exit dialog opened from the revealed bar must survive recovery.
|
|
84
|
+
// Dropping the reveal immediately would unmount that dialog.
|
|
85
|
+
if (chrome.visible && confirming != null) return;
|
|
86
|
+
setReconnectRevealed(false);
|
|
87
|
+
}, [chrome.visible, confirming, state.status]);
|
|
67
88
|
React.useEffect(() => {
|
|
68
89
|
if (!visible || isError) {
|
|
69
90
|
setConfirming(null);
|
|
@@ -79,29 +100,46 @@ function PreviewModeBanner({
|
|
|
79
100
|
return;
|
|
80
101
|
}
|
|
81
102
|
if (suppressed) return;
|
|
82
|
-
|
|
103
|
+
// Held chrome is absent, and nothing else is reporting this slot. An error
|
|
104
|
+
// bar still shows, so it keeps the inset.
|
|
105
|
+
if (held && !isError) {
|
|
106
|
+
setBannerHeight(0);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
if (!chromeShown && !isError && !reconnectRevealed) {
|
|
83
110
|
setBannerHeight(0);
|
|
84
111
|
return;
|
|
85
112
|
}
|
|
86
113
|
if (barHeight > 0) {
|
|
87
114
|
setBannerHeight(barHeight);
|
|
88
115
|
}
|
|
89
|
-
}, [barHeight, chrome.visible, chromeShown, isError, setBannerHeight, suppressed]);
|
|
116
|
+
}, [barHeight, chrome.visible, chromeShown, held, isError, reconnectRevealed, setBannerHeight, suppressed]);
|
|
90
117
|
React.useEffect(() => {
|
|
91
|
-
|
|
92
|
-
|
|
118
|
+
// Navigate-mode picking uses this same singleton. Only drop the subscription
|
|
119
|
+
// we installed — set(null) here would clear that owner when pairing chrome
|
|
120
|
+
// changes while this bar is already suppressed.
|
|
121
|
+
if (!chrome.visible || suppressed || isError || held) {
|
|
93
122
|
return;
|
|
94
123
|
}
|
|
95
|
-
|
|
124
|
+
const subscription = {
|
|
96
125
|
onDoubleTap: () => {
|
|
97
126
|
setShowOnboarding(false);
|
|
127
|
+
// The reveal keeps the bar up regardless of chromeShown, so toggling
|
|
128
|
+
// chromeShown alone would look like a no-op and then pin the bar on
|
|
129
|
+
// after recovery. A double tap on a revealed bar hides it.
|
|
130
|
+
if (reconnectRevealedRef.current) {
|
|
131
|
+
setReconnectRevealed(false);
|
|
132
|
+
setChromeShown(false);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
98
135
|
setChromeShown(shown => !shown);
|
|
99
136
|
}
|
|
100
|
-
}
|
|
137
|
+
};
|
|
138
|
+
_doubleTapMonitor.doubleTapMonitor.set(subscription);
|
|
101
139
|
return () => {
|
|
102
|
-
_doubleTapMonitor.doubleTapMonitor.
|
|
140
|
+
_doubleTapMonitor.doubleTapMonitor.clearIfCurrent(subscription);
|
|
103
141
|
};
|
|
104
|
-
}, [chrome.visible, isError, suppressed]);
|
|
142
|
+
}, [chrome.visible, held, isError, suppressed]);
|
|
105
143
|
React.useEffect(() => {
|
|
106
144
|
onConfirmingChange?.(showDialog);
|
|
107
145
|
}, [showDialog, onConfirmingChange]);
|
|
@@ -217,9 +255,10 @@ function PreviewModeBanner({
|
|
|
217
255
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChromeTooltip.ChromeTooltip, {
|
|
218
256
|
onDismiss: () => {
|
|
219
257
|
setShowOnboarding(false);
|
|
258
|
+
setChromeShown(false);
|
|
220
259
|
},
|
|
221
260
|
children: ONBOARDING_COPY
|
|
222
|
-
})
|
|
261
|
+
}, state.pairingSessionGeneration)
|
|
223
262
|
}) : null]
|
|
224
263
|
});
|
|
225
264
|
}
|