@userflow-tech/react-native 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -77
- package/app.plugin.js +11 -3
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +53 -6
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +11 -3
- package/docs/deep-linking.md +70 -33
- package/docs/isolation.md +75 -0
- package/docs/troubleshooting.md +40 -17
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +14 -8
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +22 -15
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/semanticMatcher.js +26 -8
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
- package/lib/commonjs/anonymousId.js +4 -1
- package/lib/commonjs/anonymousId.js.map +1 -1
- package/lib/commonjs/authoring/ElementPickerOverlay.js +126 -50
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeButton.js +8 -3
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +7 -6
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -1
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -1
- package/lib/commonjs/authoring/fingerprintFromInstance.js +204 -4
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/commonjs/authoring/hitTest.js +264 -16
- package/lib/commonjs/authoring/hitTest.js.map +1 -1
- package/lib/commonjs/authoring/hostAtPoint.js +204 -0
- package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
- package/lib/commonjs/content/BannerStepButton.js +68 -0
- package/lib/commonjs/content/BannerStepButton.js.map +1 -0
- package/lib/commonjs/content/buttonAppearance.js +16 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -1
- package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
- package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/commonjs/content/themeColor.js +15 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deepLinking.js +4 -4
- package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
- package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
- package/lib/commonjs/evalJs/bootstrap.js +84 -0
- package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
- package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
- package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
- package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsController.js +124 -0
- package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
- package/lib/commonjs/evalJs/getWebView.js +81 -0
- package/lib/commonjs/evalJs/getWebView.js.map +1 -0
- package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
- package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
- package/lib/commonjs/evalJs/types.js +2 -0
- package/lib/commonjs/evalJs/types.js.map +1 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +19 -0
- package/lib/commonjs/expo-router/index.js.map +1 -1
- package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
- package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/commonjs/index.js +118 -43
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js +245 -27
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +55 -16
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/deepLink.js +22 -5
- package/lib/commonjs/pairing/deepLink.js.map +1 -1
- package/lib/commonjs/pairing/deviceId.js +47 -0
- package/lib/commonjs/pairing/deviceId.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +5 -4
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/tokenStorage.js +47 -7
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
- package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/commonjs/runtime/BannerHost.js +96 -0
- package/lib/commonjs/runtime/BannerHost.js.map +1 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +19 -12
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
- package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +135 -65
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/bannerEngine.js +63 -0
- package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
- package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
- package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
- package/lib/commonjs/runtime/bannerPlacement.js +37 -0
- package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +75 -3
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/isolateCall.js +48 -0
- package/lib/commonjs/runtime/isolateCall.js.map +1 -0
- package/lib/commonjs/runtime/reportSdkError.js +19 -0
- package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
- package/lib/commonjs/runtime/useBannerSession.js +37 -0
- package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
- package/lib/commonjs/screenTracker.js +34 -9
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/surfaces/BannerBar.js +160 -0
- package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
- package/lib/commonjs/surfaces/BannerSurface.js +78 -0
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +17 -1
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
- package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/commonjs/surfaces/safeArea.js +23 -0
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/fiber/fiberPath.js +118 -0
- package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/visibleRect.js +139 -0
- package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +73 -37
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
- package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js +22 -15
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/module/anchors/semanticMatcher.js +26 -9
- package/lib/module/anchors/semanticMatcher.js.map +1 -1
- package/lib/module/anonymousId.js +4 -2
- package/lib/module/anonymousId.js.map +1 -1
- package/lib/module/authoring/ElementPickerOverlay.js +128 -52
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeButton.js +8 -3
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/module/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/module/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +7 -6
- package/lib/module/authoring/chrome/tokens.js.map +1 -1
- package/lib/module/authoring/elementPickerController.js.map +1 -1
- package/lib/module/authoring/fingerprintFromInstance.js +198 -4
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/module/authoring/hitTest.js +264 -18
- package/lib/module/authoring/hitTest.js.map +1 -1
- package/lib/module/authoring/hostAtPoint.js +199 -0
- package/lib/module/authoring/hostAtPoint.js.map +1 -0
- package/lib/module/content/BannerStepButton.js +63 -0
- package/lib/module/content/BannerStepButton.js.map +1 -0
- package/lib/module/content/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -1
- package/lib/module/content/resolveBannerButtonChrome.js +41 -0
- package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/module/content/themeColor.js +14 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deepLinking.js +4 -4
- package/lib/module/evalJs/EvalJsHost.js +239 -0
- package/lib/module/evalJs/EvalJsHost.js.map +1 -0
- package/lib/module/evalJs/bootstrap.js +76 -0
- package/lib/module/evalJs/bootstrap.js.map +1 -0
- package/lib/module/evalJs/bridgeMessages.js +139 -0
- package/lib/module/evalJs/bridgeMessages.js.map +1 -0
- package/lib/module/evalJs/evalJsBridge.js +25 -0
- package/lib/module/evalJs/evalJsBridge.js.map +1 -0
- package/lib/module/evalJs/evalJsController.js +119 -0
- package/lib/module/evalJs/evalJsController.js.map +1 -0
- package/lib/module/evalJs/getWebView.js +76 -0
- package/lib/module/evalJs/getWebView.js.map +1 -0
- package/lib/module/evalJs/injectEvalPending.js +15 -0
- package/lib/module/evalJs/injectEvalPending.js.map +1 -0
- package/lib/module/evalJs/types.js +2 -0
- package/lib/module/evalJs/types.js.map +1 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/module/expo-router/index.js +1 -0
- package/lib/module/expo-router/index.js.map +1 -1
- package/lib/module/expo-router/redirectSystemPath.js +70 -0
- package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/module/index.js +114 -45
- package/lib/module/index.js.map +1 -1
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/module/pairing/PairingController.js +245 -27
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +54 -16
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/deepLink.js +21 -5
- package/lib/module/pairing/deepLink.js.map +1 -1
- package/lib/module/pairing/deviceId.js +41 -0
- package/lib/module/pairing/deviceId.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +5 -4
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/tokenStorage.js +47 -7
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/pairing/usePreviewBarHold.js +134 -0
- package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/module/runtime/BannerHost.js +92 -0
- package/lib/module/runtime/BannerHost.js.map +1 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/module/runtime/SdkErrorBoundary.js +55 -0
- package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +19 -12
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowOverlay.js +92 -0
- package/lib/module/runtime/UserflowOverlay.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +136 -66
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/bannerEngine.js +55 -0
- package/lib/module/runtime/bannerEngine.js.map +1 -0
- package/lib/module/runtime/bannerEngineContext.js +7 -0
- package/lib/module/runtime/bannerEngineContext.js.map +1 -0
- package/lib/module/runtime/bannerPlacement.js +30 -0
- package/lib/module/runtime/bannerPlacement.js.map +1 -0
- package/lib/module/runtime/embedBannerRegistry.js +24 -0
- package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +72 -3
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/isolateCall.js +43 -0
- package/lib/module/runtime/isolateCall.js.map +1 -0
- package/lib/module/runtime/reportSdkError.js +15 -0
- package/lib/module/runtime/reportSdkError.js.map +1 -0
- package/lib/module/runtime/useBannerSession.js +33 -0
- package/lib/module/runtime/useBannerSession.js.map +1 -0
- package/lib/module/screenTracker.js +33 -9
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/surfaces/BannerBar.js +155 -0
- package/lib/module/surfaces/BannerBar.js.map +1 -0
- package/lib/module/surfaces/BannerSurface.js +72 -0
- package/lib/module/surfaces/BannerSurface.js.map +1 -0
- package/lib/module/surfaces/MadeWithUserflow.js +11 -7
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +1 -1
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +17 -1
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/bannerBarLayout.js +69 -0
- package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/module/surfaces/bannerBarTokens.js +37 -0
- package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/module/surfaces/resolveBannerTheme.js +16 -0
- package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/module/surfaces/safeArea.js +22 -0
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anonymousId.d.ts +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/commonjs/src/index.d.ts +16 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +4 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts +7 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/module/src/anonymousId.d.ts +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/content/types.d.ts +1 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -1
- package/lib/typescript/module/src/deepLinking.d.ts +4 -4
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/module/src/index.d.ts +16 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +4 -1
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/module/src/screenTracker.d.ts +7 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +4 -3
- package/src/anchors/AutoAnchorRegistry.ts +41 -11
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +57 -47
- package/src/anchors/fiber/resolveFiberPath.ts +215 -0
- package/src/anchors/fiber/visibleRect.ts +153 -0
- package/src/anchors/fiber/visibleScreens.ts +74 -36
- package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
- package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
- package/src/anchors/resolveAutoAnchorHost.ts +17 -15
- package/src/anchors/semanticMatcher.ts +38 -14
- package/src/anonymousId.ts +2 -1
- package/src/authoring/ElementPickerOverlay.tsx +168 -59
- package/src/authoring/chrome/ChromeBottomSheet.tsx +49 -8
- package/src/authoring/chrome/ChromeButton.tsx +9 -4
- package/src/authoring/chrome/ChromeIcon.tsx +10 -1
- package/src/authoring/chrome/ChromeTopBar.tsx +39 -15
- package/src/authoring/chrome/DoubleTapBridge.tsx +19 -12
- package/src/authoring/chrome/doubleTapMonitor.ts +10 -0
- package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +7 -2
- package/src/authoring/elementPickerController.ts +2 -4
- package/src/authoring/fingerprintFromInstance.ts +170 -4
- package/src/authoring/hitTest.ts +324 -16
- package/src/authoring/hostAtPoint.ts +247 -0
- package/src/content/BannerStepButton.tsx +91 -0
- package/src/content/buttonAppearance.ts +16 -0
- package/src/content/resolveBannerButtonChrome.ts +49 -0
- package/src/content/themeColor.ts +15 -0
- package/src/content/types.ts +1 -0
- package/src/deepLinking.ts +4 -4
- package/src/evalJs/EvalJsHost.tsx +255 -0
- package/src/evalJs/bootstrap.ts +83 -0
- package/src/evalJs/bridgeMessages.ts +134 -0
- package/src/evalJs/evalJsBridge.ts +42 -0
- package/src/evalJs/evalJsController.ts +127 -0
- package/src/evalJs/getWebView.ts +124 -0
- package/src/evalJs/injectEvalPending.ts +14 -0
- package/src/evalJs/types.ts +56 -0
- package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
- package/src/expo-router/index.ts +8 -0
- package/src/expo-router/redirectSystemPath.ts +86 -0
- package/src/expo-router/useUserflowExpoRouter.ts +2 -2
- package/src/index.ts +129 -45
- package/src/lifecycle.ts +4 -1
- package/src/navigation/WithUserflowReactNavigation.tsx +13 -10
- package/src/navigation/openFlowNavigateUrl.ts +12 -5
- package/src/pairing/PairingController.ts +283 -29
- package/src/pairing/PreviewModeBanner.tsx +71 -14
- package/src/pairing/deepLink.ts +23 -5
- package/src/pairing/deviceId.ts +43 -0
- package/src/pairing/diagnostics.ts +6 -4
- package/src/pairing/tokenStorage.ts +60 -7
- package/src/pairing/usePairingState.ts +2 -0
- package/src/pairing/usePreviewBarHold.ts +160 -0
- package/src/runtime/BannerHost.tsx +102 -0
- package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
- package/src/runtime/SdkErrorBoundary.tsx +77 -0
- package/src/runtime/TargetPressBridge.tsx +19 -12
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +139 -64
- package/src/runtime/bannerEngine.ts +55 -0
- package/src/runtime/bannerEngineContext.ts +5 -0
- package/src/runtime/bannerPlacement.ts +36 -0
- package/src/runtime/embedBannerRegistry.ts +28 -0
- package/src/runtime/flowEngine.ts +76 -3
- package/src/runtime/isolateCall.ts +53 -0
- package/src/runtime/reportSdkError.ts +12 -0
- package/src/runtime/useBannerSession.ts +35 -0
- package/src/screenTracker.ts +34 -8
- package/src/surfaces/BannerBar.tsx +176 -0
- package/src/surfaces/BannerSurface.tsx +82 -0
- package/src/surfaces/MadeWithUserflow.tsx +15 -10
- package/src/surfaces/ModalSurface.tsx +1 -1
- package/src/surfaces/TooltipSurface.tsx +17 -1
- package/src/surfaces/bannerBarLayout.ts +74 -0
- package/src/surfaces/bannerBarTokens.ts +34 -0
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
- package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
- package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
- package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
- package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
- package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
- package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
- package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
- package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
- package/src/surfaces/resolveBannerTheme.ts +18 -0
- package/src/surfaces/safeArea.ts +29 -0
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js +4 -4
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +41 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +167 -28
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +38 -2
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +19 -2
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +10 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +47 -27
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/handleActions.d.ts +17 -3
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +17 -14
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/trackCondition.d.ts +2 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackCondition.js +4 -2
- package/vendor/core/dist/engine/trackCondition.js.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +11 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.js +42 -16
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -1
- package/vendor/core/dist/errors.d.ts +11 -1
- package/vendor/core/dist/errors.d.ts.map +1 -1
- package/vendor/core/dist/errors.js +2 -1
- package/vendor/core/dist/errors.js.map +1 -1
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
- package/vendor/core/dist/eventAttributes.js +4 -2
- package/vendor/core/dist/eventAttributes.js.map +1 -1
- package/vendor/core/dist/index.d.ts +4 -1
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +1 -0
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.js +9 -7
- package/vendor/core/dist/normalizeAttributes.js.map +1 -1
- package/vendor/core/dist/transport/pairing.d.ts +5 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
- package/vendor/core/dist/transport/pairing.js +69 -2
- package/vendor/core/dist/transport/pairing.js.map +1 -1
- package/vendor/core/dist/transport/phoenix.d.ts +8 -0
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +16 -2
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/autoData.d.ts +8 -15
- package/vendor/protocol/dist/autoData.d.ts.map +1 -1
- package/vendor/protocol/dist/autoData.js.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +58 -2
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +20 -2
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +22 -12
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +5 -2
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -9,7 +9,8 @@ import type { AutoAnchorInstance } from './AutoAnchorRegistry';
|
|
|
9
9
|
import type { AnyFiber } from './fiber/fiberInternals';
|
|
10
10
|
import { fiberFromPublicInstance } from './fiber/fiberInternals';
|
|
11
11
|
import { createFiberMeasureInWindow } from './fiber/measureHostFiber';
|
|
12
|
-
import {
|
|
12
|
+
import { resolveFiberPath } from './fiber/resolveFiberPath';
|
|
13
|
+
import { createVisibleInstanceFilter } from './isInstanceOnVisibleScreen';
|
|
13
14
|
import { resolveAnchorHost } from './resolveAnchorHost';
|
|
14
15
|
import { matchFingerprint, type MatchResult } from './semanticMatcher';
|
|
15
16
|
|
|
@@ -73,19 +74,6 @@ function fiberFromInstance(inst: AutoAnchorInstance): AnyFiber | null {
|
|
|
73
74
|
return fiberFromPublicInstance(inst.ref.current);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
/**
|
|
77
|
-
* Whether a scored instance is on a screen the user can see.
|
|
78
|
-
*
|
|
79
|
-
* No fiber pointer means we cannot prove the host is covered (tests, and hosts
|
|
80
|
-
* whose public instance has no internals link) — same fail-open as apps without
|
|
81
|
-
* react-native-screens.
|
|
82
|
-
*/
|
|
83
|
-
function isInstanceOnVisibleScreen(inst: AutoAnchorInstance): boolean {
|
|
84
|
-
const fiber = fiberFromInstance(inst);
|
|
85
|
-
if (!fiber) return true;
|
|
86
|
-
return isFiberOnVisibleScreen(fiber);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
77
|
/** Authoritative id that the existing fiber / manual resolver can look up. */
|
|
90
78
|
function exactIdFromFingerprint(fp: MobileFingerprint): string | null {
|
|
91
79
|
if (fp.userflowId) return fp.userflowId;
|
|
@@ -129,7 +117,7 @@ function mapMatch(match: MatchResult): AutoAnchorResolution {
|
|
|
129
117
|
* screen — `absent`, matching MANUAL covered-screen semantics.
|
|
130
118
|
*/
|
|
131
119
|
function mapScored(fp: MobileFingerprint): AutoAnchorResolution {
|
|
132
|
-
const visible = matchFingerprint(fp, { instanceFilter:
|
|
120
|
+
const visible = matchFingerprint(fp, { instanceFilter: createVisibleInstanceFilter() });
|
|
133
121
|
if (visible.instance) return mapMatch(visible);
|
|
134
122
|
|
|
135
123
|
if (visible.reason === 'no-candidates') {
|
|
@@ -160,6 +148,20 @@ export function resolveAutoAnchorHost(
|
|
|
160
148
|
const fp = decoded?.fingerprint;
|
|
161
149
|
if (!fp) return { status: 'unknown' };
|
|
162
150
|
|
|
151
|
+
if (decoded.resolver === 'fiber' && decoded.fiberPath) {
|
|
152
|
+
const fiberHit = resolveFiberPath(decoded.fiberPath);
|
|
153
|
+
if (fiberHit.status === 'found') {
|
|
154
|
+
return {
|
|
155
|
+
status: 'found',
|
|
156
|
+
host: { measureInWindow: createFiberMeasureInWindow(fiberHit.fiber) },
|
|
157
|
+
fiber: fiberHit.fiber,
|
|
158
|
+
fiberCacheId: fiberHit.cacheId,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
if (fiberHit.status === 'ambiguous') return { status: 'ambiguous' };
|
|
162
|
+
return { status: 'unknown' };
|
|
163
|
+
}
|
|
164
|
+
|
|
163
165
|
const exactId = exactIdFromFingerprint(fp);
|
|
164
166
|
if (exactId) {
|
|
165
167
|
const exact = resolveAnchorHost(exactId);
|
|
@@ -160,7 +160,7 @@ function normalizeText(value: string): string {
|
|
|
160
160
|
return value.trim().replace(/\d+/g, '#').replace(/\s+/g, ' ');
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
function textsAgree(a: string | undefined, b: string | undefined): boolean {
|
|
163
|
+
export function textsAgree(a: string | undefined, b: string | undefined): boolean {
|
|
164
164
|
if (!a || !b) return false;
|
|
165
165
|
return a === b || normalizeText(a) === normalizeText(b);
|
|
166
166
|
}
|
|
@@ -190,7 +190,11 @@ function intrinsicNonTextAgrees(fp: MobileFingerprint, inst: AutoAnchorInstance)
|
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
function scoreInstance(
|
|
193
|
+
function scoreInstance(
|
|
194
|
+
fp: MobileFingerprint,
|
|
195
|
+
inst: AutoAnchorInstance,
|
|
196
|
+
ambiguous: boolean,
|
|
197
|
+
): number {
|
|
194
198
|
if (contradictsStrong(fp, inst)) return -Infinity;
|
|
195
199
|
|
|
196
200
|
// A childText disagreement is disqualifying unless a text-independent identity
|
|
@@ -233,13 +237,29 @@ function scoreInstance(fp: MobileFingerprint, inst: AutoAnchorInstance): number
|
|
|
233
237
|
// which double-counted the next window.
|
|
234
238
|
score += scoreSiblingWindow(fp.nextSiblings ?? [], window.next);
|
|
235
239
|
|
|
236
|
-
if (
|
|
240
|
+
if (ambiguous && !inst.manualId) score -= 40;
|
|
237
241
|
|
|
238
242
|
return score;
|
|
239
243
|
}
|
|
240
244
|
|
|
241
245
|
type InstanceFilter = (inst: AutoAnchorInstance) => boolean;
|
|
242
246
|
|
|
247
|
+
interface MatchOptions {
|
|
248
|
+
instanceFilter?: InstanceFilter;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/** Each instance's visibility is computed once per match. */
|
|
252
|
+
function memoizeFilter(filter: InstanceFilter): InstanceFilter {
|
|
253
|
+
const memo = new Map<string, boolean>();
|
|
254
|
+
return (inst) => {
|
|
255
|
+
const cached = memo.get(inst.instanceId);
|
|
256
|
+
if (cached !== undefined) return cached;
|
|
257
|
+
const visible = filter(inst);
|
|
258
|
+
memo.set(inst.instanceId, visible);
|
|
259
|
+
return visible;
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
|
|
243
263
|
function candidatePool(
|
|
244
264
|
fp: MobileFingerprint,
|
|
245
265
|
instanceFilter?: InstanceFilter,
|
|
@@ -277,20 +297,27 @@ function matchFingerprintCore(fp: MobileFingerprint, instanceFilter?: InstanceFi
|
|
|
277
297
|
// Live text / testID must be applied *before* pooling. A shared Babel helper
|
|
278
298
|
// (`const field = () => <TextInput testID={id} />`) reuses one auto-anchor
|
|
279
299
|
// callback, so the runtime bag is last-writer-wins until we read the host.
|
|
280
|
-
|
|
281
|
-
|
|
300
|
+
// A filter's verdict is memoized so covered-screen checks run once per instance.
|
|
301
|
+
const filter = instanceFilter ? memoizeFilter(instanceFilter) : undefined;
|
|
302
|
+
const broad = filter
|
|
303
|
+
? autoAnchorRegistry.allInstances().filter(filter)
|
|
282
304
|
: autoAnchorRegistry.allInstances();
|
|
283
305
|
if (broad.length > 0) {
|
|
284
306
|
autoAnchorRegistry.refreshLiveContent(broad);
|
|
285
307
|
}
|
|
286
308
|
|
|
287
|
-
const pool = candidatePool(fp,
|
|
309
|
+
const pool = candidatePool(fp, filter);
|
|
288
310
|
if (pool.length === 0) {
|
|
289
311
|
return miss('no-candidates');
|
|
290
312
|
}
|
|
291
313
|
|
|
314
|
+
// Visibility can clear a registry-wide ambiguous flag (a covered twin) but
|
|
315
|
+
// never add one. Unfiltered matches keep the stored flag.
|
|
316
|
+
const ambiguous = (inst: AutoAnchorInstance) =>
|
|
317
|
+
filter ? autoAnchorRegistry.isAmbiguousAmong(inst, filter) : inst.ambiguous;
|
|
318
|
+
|
|
292
319
|
const scored = pool
|
|
293
|
-
.map((inst) => ({ inst, score: scoreInstance(fp, inst) }))
|
|
320
|
+
.map((inst) => ({ inst, score: scoreInstance(fp, inst, ambiguous(inst)) }))
|
|
294
321
|
.filter((s) => s.score > -Infinity)
|
|
295
322
|
.sort((a, b) => b.score - a.score);
|
|
296
323
|
|
|
@@ -307,7 +334,7 @@ function matchFingerprintCore(fp: MobileFingerprint, instanceFilter?: InstanceFi
|
|
|
307
334
|
best.score >= 90 &&
|
|
308
335
|
(!second || best.score - secondScore >= MATCH_UNIQUENESS_MARGIN)
|
|
309
336
|
) {
|
|
310
|
-
if (best.inst
|
|
337
|
+
if (ambiguous(best.inst)) {
|
|
311
338
|
return miss('ambiguous-explicit-id', best.score, secondScore);
|
|
312
339
|
}
|
|
313
340
|
return {
|
|
@@ -339,10 +366,7 @@ function matchFingerprintCore(fp: MobileFingerprint, instanceFilter?: InstanceFi
|
|
|
339
366
|
* Surfaces the recorded `identityStrength` on every result so callers/telemetry
|
|
340
367
|
* can flag weak (`structural`) targets.
|
|
341
368
|
*/
|
|
342
|
-
export function matchFingerprint(
|
|
343
|
-
fp: MobileFingerprint,
|
|
344
|
-
opts?: { instanceFilter?: InstanceFilter },
|
|
345
|
-
): MatchResult {
|
|
369
|
+
export function matchFingerprint(fp: MobileFingerprint, opts?: MatchOptions): MatchResult {
|
|
346
370
|
const result = matchFingerprintCore(fp, opts?.instanceFilter);
|
|
347
371
|
if (fp.identityStrength) result.identityStrength = fp.identityStrength;
|
|
348
372
|
return result;
|
|
@@ -352,10 +376,10 @@ export function matchFingerprint(
|
|
|
352
376
|
* Decode an `autoData` envelope (or accept an already-decoded one) and score
|
|
353
377
|
* its fingerprint. Missing / malformed envelopes fail closed.
|
|
354
378
|
*/
|
|
355
|
-
export function matchAutoData(input: MobileAutoData | string): MatchResult {
|
|
379
|
+
export function matchAutoData(input: MobileAutoData | string, opts?: MatchOptions): MatchResult {
|
|
356
380
|
const decoded = typeof input === 'string' ? decodeMobileAutoData(input) : input;
|
|
357
381
|
if (!decoded?.fingerprint) {
|
|
358
382
|
return miss('no-fingerprint');
|
|
359
383
|
}
|
|
360
|
-
return matchFingerprint(decoded.fingerprint);
|
|
384
|
+
return matchFingerprint(decoded.fingerprint, opts);
|
|
361
385
|
}
|
package/src/anonymousId.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { UserflowAuthError } from '@userflow-tech/core';
|
|
|
4
4
|
/** Matches the web SDK's `userflow:anonymousId` localStorage key. */
|
|
5
5
|
export const ANONYMOUS_ID_STORAGE_KEY = 'userflow:anonymousId';
|
|
6
6
|
|
|
7
|
-
function uuid(): string {
|
|
7
|
+
export function uuid(): string {
|
|
8
8
|
const webcrypto = globalThis.crypto;
|
|
9
9
|
if (webcrypto?.randomUUID) return webcrypto.randomUUID();
|
|
10
10
|
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {
|
|
@@ -25,6 +25,7 @@ export async function getOrCreateAnonymousId(): Promise<string> {
|
|
|
25
25
|
} catch {
|
|
26
26
|
throw new UserflowAuthError(
|
|
27
27
|
'Userflow.identifyAnonymous() is not supported when persistent storage is unavailable.',
|
|
28
|
+
{ isHostContract: true },
|
|
28
29
|
);
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -13,32 +13,49 @@ import { capturePickerScreenshot } from './capturePickerScreenshot';
|
|
|
13
13
|
import { ChromeBarTransition, useChromeBarMounted } from './chrome/ChromeBarTransition';
|
|
14
14
|
import { ChromeBottomSheet } from './chrome/ChromeBottomSheet';
|
|
15
15
|
import { ChromeButton } from './chrome/ChromeButton';
|
|
16
|
+
import { ChromeDialog } from './chrome/ChromeDialog';
|
|
16
17
|
import { ChromeTooltip } from './chrome/ChromeTooltip';
|
|
17
18
|
import { ChromeTopBar } from './chrome/ChromeTopBar';
|
|
19
|
+
import { doubleTapMonitor } from './chrome/doubleTapMonitor';
|
|
18
20
|
import { chromeColors, chromeOverlay, chromeRadius } from './chrome/tokens';
|
|
19
21
|
import { DOUBLE_TAP_WINDOW_MS, isDoubleTap, type TapSample } from './doubleTap';
|
|
20
22
|
import { elementPickerController, type ElementPickerState } from './elementPickerController';
|
|
23
|
+
import { assessPickerTarget, type PickerSelectionAssessment } from './fingerprintFromInstance';
|
|
21
24
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
defaultCandidateIndex,
|
|
26
|
+
hitTestAt,
|
|
27
|
+
nextContainingIndex,
|
|
28
|
+
type HitCandidate,
|
|
29
|
+
type HitRect,
|
|
30
|
+
type PickTarget,
|
|
31
|
+
} from './hitTest';
|
|
32
|
+
|
|
33
|
+
function targetText(target: PickTarget): string | null {
|
|
34
|
+
if (target.source === 'registry') {
|
|
35
|
+
return target.instance.childText ?? target.instance.accessibilityLabel ?? null;
|
|
30
36
|
}
|
|
31
|
-
|
|
32
|
-
return 'That fingerprint matches a different element — pick again or add a testID.';
|
|
33
|
-
}
|
|
34
|
-
return 'Could not uniquely match that element at play time.';
|
|
37
|
+
return target.descriptor.childText ?? target.descriptor.accessibilityLabel ?? null;
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
type PickerMode = 'navigate' | 'select';
|
|
38
|
-
type PickerPhase = 'selecting' | 'navigating' | 'selected';
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
type PickerPhase = 'selecting' | 'navigating' | 'selected' | 'blocked';
|
|
42
|
+
type SelectionState = 'idle' | 'ok' | 'warning' | 'error-no-element' | 'error-unresolvable';
|
|
43
|
+
|
|
44
|
+
const CONFIRM_HELPER = 'Return to the Userflow app after confirming';
|
|
45
|
+
const WARNING_HELPER =
|
|
46
|
+
'Element may have an unreliable ID. This element may be selected but could break later on.';
|
|
47
|
+
const ERROR_LABEL = 'Can’t select this element';
|
|
48
|
+
const ERROR_HELPER = 'Element ID not found — select a different element';
|
|
41
49
|
const ONBOARDING_COPY = 'Double tap anywhere to access the menu';
|
|
50
|
+
const RETURN_NUDGE_TITLE = 'Return to the Userflow app';
|
|
51
|
+
const RETURN_NUDGE_BODY =
|
|
52
|
+
'The element was selected successfully. You may now return to the Userflow app to continue editing your flow.';
|
|
53
|
+
|
|
54
|
+
function selectionFromAssessment(assessment: PickerSelectionAssessment): SelectionState {
|
|
55
|
+
if (assessment.kind === 'error') return 'error-unresolvable';
|
|
56
|
+
if (assessment.kind === 'warning') return 'warning';
|
|
57
|
+
return 'ok';
|
|
58
|
+
}
|
|
42
59
|
|
|
43
60
|
/** Yield until chrome has left the native tree so captureScreen cannot include it. */
|
|
44
61
|
function waitForCapturePaint(): Promise<void> {
|
|
@@ -68,6 +85,7 @@ function ringStyle(rect: HitRect, inset: number): ViewStyle {
|
|
|
68
85
|
/**
|
|
69
86
|
* Overlay chrome for in-app element picking. Mounted by UserflowProvider;
|
|
70
87
|
* renders nothing until {@link elementPickerController.beginSelection}.
|
|
88
|
+
* Every pick shows the menu and onboarding tooltip.
|
|
71
89
|
*/
|
|
72
90
|
export function ElementPickerOverlay(): React.ReactElement | null {
|
|
73
91
|
const [state, setState] = React.useState<ElementPickerState>(() =>
|
|
@@ -78,9 +96,11 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
78
96
|
const [index, setIndex] = React.useState(0);
|
|
79
97
|
const [busy, setBusy] = React.useState(false);
|
|
80
98
|
const [status, setStatus] = React.useState<string | null>(null);
|
|
99
|
+
const [selection, setSelection] = React.useState<SelectionState>('idle');
|
|
81
100
|
const [chromeVisible, setChromeVisible] = React.useState(true);
|
|
82
101
|
const [hidingForCapture, setHidingForCapture] = React.useState(false);
|
|
83
102
|
const [showOnboarding, setShowOnboarding] = React.useState(false);
|
|
103
|
+
const [returnNudge, setReturnNudge] = React.useState(false);
|
|
84
104
|
const [barHeight, setBarHeight] = React.useState(0);
|
|
85
105
|
const [sheetHeight, setSheetHeight] = React.useState(0);
|
|
86
106
|
const tapStartRef = React.useRef<{ pageX: number; pageY: number } | null>(null);
|
|
@@ -114,6 +134,7 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
114
134
|
setIndex(0);
|
|
115
135
|
setBusy(false);
|
|
116
136
|
setStatus(null);
|
|
137
|
+
setSelection('idle');
|
|
117
138
|
setChromeVisible(true);
|
|
118
139
|
setBarHeight(0);
|
|
119
140
|
setSheetHeight(0);
|
|
@@ -135,10 +156,13 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
135
156
|
return;
|
|
136
157
|
}
|
|
137
158
|
// Successful confirm leaves hidingForCapture true so chrome does not
|
|
138
|
-
// flash back during teardown. Clear it with the new
|
|
139
|
-
//
|
|
140
|
-
if (armedRequestIdRef.current !== next.requestId) {
|
|
159
|
+
// flash back during teardown. Clear it with the new pick's setState so
|
|
160
|
+
// the first paint of this pick has its bars.
|
|
161
|
+
if (armedRequestIdRef.current !== next.requestId && next.requestId != null) {
|
|
141
162
|
setHidingForCapture(false);
|
|
163
|
+
setReturnNudge(false);
|
|
164
|
+
setChromeVisible(true);
|
|
165
|
+
setShowOnboarding(true);
|
|
142
166
|
}
|
|
143
167
|
});
|
|
144
168
|
}, [resetTransient]);
|
|
@@ -149,6 +173,7 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
149
173
|
armedRequestIdRef.current = state.requestId;
|
|
150
174
|
resetTransient();
|
|
151
175
|
setShowOnboarding(true);
|
|
176
|
+
setReturnNudge(false);
|
|
152
177
|
}, [resetTransient, state.active, state.requestId]);
|
|
153
178
|
|
|
154
179
|
React.useEffect(() => {
|
|
@@ -200,7 +225,14 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
200
225
|
}, []);
|
|
201
226
|
|
|
202
227
|
const selected = candidates[index] ?? null;
|
|
203
|
-
const phase: PickerPhase =
|
|
228
|
+
const phase: PickerPhase =
|
|
229
|
+
selection === 'error-no-element'
|
|
230
|
+
? 'blocked'
|
|
231
|
+
: selected
|
|
232
|
+
? 'selected'
|
|
233
|
+
: mode === 'select'
|
|
234
|
+
? 'selecting'
|
|
235
|
+
: 'navigating';
|
|
204
236
|
modeRef.current = mode;
|
|
205
237
|
|
|
206
238
|
// Bars slide/fade in with the picker, out on double-tap hide, and out again
|
|
@@ -216,21 +248,31 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
216
248
|
}
|
|
217
249
|
}, [phase]);
|
|
218
250
|
|
|
219
|
-
const
|
|
220
|
-
if (modeRef.current !== 'select') return;
|
|
221
|
-
lastTapRef.current = null;
|
|
222
|
-
setChromeVisible(true);
|
|
251
|
+
const applySelection = React.useCallback((hits: HitCandidate[]) => {
|
|
223
252
|
if (hits.length === 0) {
|
|
224
253
|
setCandidates([]);
|
|
225
254
|
setIndex(0);
|
|
226
|
-
|
|
255
|
+
setSelection('error-no-element');
|
|
256
|
+
setStatus(null);
|
|
227
257
|
return;
|
|
228
258
|
}
|
|
259
|
+
const nextIndex = defaultCandidateIndex(hits);
|
|
229
260
|
setCandidates(hits);
|
|
230
|
-
setIndex(
|
|
261
|
+
setIndex(nextIndex);
|
|
262
|
+
setSelection(selectionFromAssessment(assessPickerTarget(hits[nextIndex]!.target)));
|
|
231
263
|
setStatus(null);
|
|
232
264
|
}, []);
|
|
233
265
|
|
|
266
|
+
const applyHits = React.useCallback(
|
|
267
|
+
(hits: HitCandidate[]) => {
|
|
268
|
+
if (modeRef.current !== 'select') return;
|
|
269
|
+
lastTapRef.current = null;
|
|
270
|
+
setChromeVisible(true);
|
|
271
|
+
applySelection(hits);
|
|
272
|
+
},
|
|
273
|
+
[applySelection],
|
|
274
|
+
);
|
|
275
|
+
|
|
234
276
|
const scheduleSelection = React.useCallback(
|
|
235
277
|
(pageX: number, pageY: number) => {
|
|
236
278
|
cancelPendingSelection();
|
|
@@ -262,7 +304,12 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
262
304
|
const onTap = React.useCallback(
|
|
263
305
|
async (pageX: number, pageY: number) => {
|
|
264
306
|
if (selected && candidates.length > 1 && pointInRect(pageX, pageY, selected.rect)) {
|
|
265
|
-
|
|
307
|
+
const next = nextContainingIndex(candidates, index);
|
|
308
|
+
setIndex(next);
|
|
309
|
+
const nextHit = candidates[next];
|
|
310
|
+
if (nextHit) {
|
|
311
|
+
setSelection(selectionFromAssessment(assessPickerTarget(nextHit.target)));
|
|
312
|
+
}
|
|
266
313
|
setStatus(null);
|
|
267
314
|
return;
|
|
268
315
|
}
|
|
@@ -270,21 +317,34 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
270
317
|
setStatus(null);
|
|
271
318
|
try {
|
|
272
319
|
const hits = await hitTestAt(pageX, pageY);
|
|
273
|
-
|
|
274
|
-
setCandidates([]);
|
|
275
|
-
setIndex(0);
|
|
276
|
-
setStatus('No stamped element under that tap.');
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
|
-
setCandidates(hits);
|
|
280
|
-
setIndex(0);
|
|
320
|
+
applySelection(hits);
|
|
281
321
|
} finally {
|
|
282
322
|
setBusy(false);
|
|
283
323
|
}
|
|
284
324
|
},
|
|
285
|
-
[candidates, selected],
|
|
325
|
+
[applySelection, candidates, index, selected],
|
|
286
326
|
);
|
|
287
327
|
|
|
328
|
+
const hideOrShowChrome = React.useCallback(() => {
|
|
329
|
+
cancelPendingSelection();
|
|
330
|
+
lastTapRef.current = null;
|
|
331
|
+
setShowOnboarding(false);
|
|
332
|
+
setChromeVisible((visible) => !visible);
|
|
333
|
+
}, [cancelPendingSelection]);
|
|
334
|
+
|
|
335
|
+
// Navigate mode unmounts the capture layer so the host app can receive
|
|
336
|
+
// touches. Double-tap still has to reach the bars, via the screen-wide
|
|
337
|
+
// monitor the preview bar uses. Select mode keeps its own capture handler
|
|
338
|
+
// and must not also subscribe, or one double tap would toggle twice.
|
|
339
|
+
React.useEffect(() => {
|
|
340
|
+
if (!state.active || mode !== 'navigate') return;
|
|
341
|
+
const subscription = { onDoubleTap: hideOrShowChrome };
|
|
342
|
+
doubleTapMonitor.set(subscription);
|
|
343
|
+
return () => {
|
|
344
|
+
doubleTapMonitor.clearIfCurrent(subscription);
|
|
345
|
+
};
|
|
346
|
+
}, [hideOrShowChrome, mode, state.active]);
|
|
347
|
+
|
|
288
348
|
const onGrant = React.useCallback((event: GestureResponderEvent) => {
|
|
289
349
|
const { pageX, pageY } = event.nativeEvent;
|
|
290
350
|
tapStartRef.current = { pageX, pageY };
|
|
@@ -301,41 +361,41 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
301
361
|
if (dx * dx + dy * dy > TARGET_PRESS_TAP_SLOP * TARGET_PRESS_TAP_SLOP) return;
|
|
302
362
|
|
|
303
363
|
const sample: TapSample = { pageX, pageY, timestamp: Date.now() };
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
setShowOnboarding(false);
|
|
308
|
-
setChromeVisible((visible) => !visible);
|
|
364
|
+
const engaged = selected != null || selection === 'error-no-element';
|
|
365
|
+
if (!engaged && isDoubleTap(lastTapRef.current, sample)) {
|
|
366
|
+
hideOrShowChrome();
|
|
309
367
|
return;
|
|
310
368
|
}
|
|
311
369
|
lastTapRef.current = sample;
|
|
312
370
|
|
|
313
|
-
if (
|
|
371
|
+
if (engaged) {
|
|
314
372
|
void onTap(pageX, pageY);
|
|
315
373
|
return;
|
|
316
374
|
}
|
|
317
375
|
scheduleSelection(pageX, pageY);
|
|
318
376
|
},
|
|
319
|
-
[
|
|
377
|
+
[hideOrShowChrome, onTap, scheduleSelection, selected, selection],
|
|
320
378
|
);
|
|
321
379
|
|
|
322
380
|
const deselect = React.useCallback(() => {
|
|
323
381
|
setCandidates([]);
|
|
324
382
|
setIndex(0);
|
|
383
|
+
setSelection('idle');
|
|
325
384
|
setStatus(null);
|
|
326
385
|
setChromeVisible(true);
|
|
327
386
|
}, []);
|
|
328
387
|
|
|
329
388
|
const confirm = React.useCallback(async () => {
|
|
330
389
|
if (!selected) return;
|
|
390
|
+
if (selection === 'error-unresolvable' || selection === 'error-no-element') return;
|
|
331
391
|
const requestId = elementPickerController.getState().requestId;
|
|
332
392
|
if (!requestId) return;
|
|
333
393
|
setBusy(true);
|
|
334
394
|
setStatus(null);
|
|
335
395
|
try {
|
|
336
|
-
const
|
|
337
|
-
if (
|
|
338
|
-
|
|
396
|
+
const assessed = assessPickerTarget(selected.target);
|
|
397
|
+
if (assessed.kind === 'error') {
|
|
398
|
+
setSelection('error-unresolvable');
|
|
339
399
|
return;
|
|
340
400
|
}
|
|
341
401
|
setHidingForCapture(true);
|
|
@@ -343,15 +403,17 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
343
403
|
const screenshot = await capturePickerScreenshot(selected.rect);
|
|
344
404
|
const delivered = await elementPickerController.commit(
|
|
345
405
|
{
|
|
346
|
-
|
|
347
|
-
autoData:
|
|
348
|
-
text: selected.
|
|
406
|
+
target: selected.target,
|
|
407
|
+
autoData: assessed.autoData,
|
|
408
|
+
text: targetText(selected.target),
|
|
349
409
|
rect: selected.rect,
|
|
350
410
|
...(screenshot ? { screenshot } : {}),
|
|
351
411
|
},
|
|
352
412
|
requestId,
|
|
353
413
|
);
|
|
354
|
-
if (
|
|
414
|
+
if (delivered && !elementPickerController.getState().active) {
|
|
415
|
+
setReturnNudge(true);
|
|
416
|
+
} else if (!delivered && elementPickerController.getState().requestId === requestId) {
|
|
355
417
|
setHidingForCapture(false);
|
|
356
418
|
setStatus("Couldn't send to Builder");
|
|
357
419
|
}
|
|
@@ -361,23 +423,59 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
361
423
|
} finally {
|
|
362
424
|
setBusy(false);
|
|
363
425
|
}
|
|
364
|
-
}, [selected]);
|
|
426
|
+
}, [selected, selection]);
|
|
365
427
|
|
|
366
|
-
|
|
428
|
+
const dismissReturnNudge = () => {
|
|
429
|
+
setReturnNudge(false);
|
|
430
|
+
};
|
|
367
431
|
|
|
368
|
-
|
|
369
|
-
|
|
432
|
+
if (!state.active && !chromeBarsMounted && !returnNudge) return null;
|
|
433
|
+
|
|
434
|
+
const isError = selection === 'error-no-element' || selection === 'error-unresolvable';
|
|
435
|
+
const toneIcon = isError
|
|
436
|
+
? { name: 'triangle-exclamation' as const, tintColor: chromeColors.dangerAccent }
|
|
437
|
+
: selection === 'warning'
|
|
438
|
+
? { name: 'circle-exclamation' as const, tintColor: chromeColors.warningAccent }
|
|
439
|
+
: undefined;
|
|
440
|
+
|
|
441
|
+
const barLabel = isError
|
|
442
|
+
? ERROR_LABEL
|
|
443
|
+
: phase === 'selected' || selection === 'warning'
|
|
370
444
|
? 'Confirm selected element'
|
|
371
445
|
: phase === 'selecting'
|
|
372
446
|
? 'Tap an element to select it'
|
|
373
447
|
: 'Navigate screens';
|
|
374
448
|
|
|
375
|
-
const helperText =
|
|
449
|
+
const helperText =
|
|
450
|
+
status ??
|
|
451
|
+
(isError
|
|
452
|
+
? ERROR_HELPER
|
|
453
|
+
: selection === 'warning'
|
|
454
|
+
? WARNING_HELPER
|
|
455
|
+
: phase === 'selected'
|
|
456
|
+
? CONFIRM_HELPER
|
|
457
|
+
: undefined);
|
|
458
|
+
const helperIcon = status ? undefined : toneIcon;
|
|
376
459
|
const tooltipVisible = state.active && showOnboarding && chromeVisible && phase === 'selecting';
|
|
377
460
|
|
|
378
461
|
return (
|
|
379
462
|
<View pointerEvents="box-none" style={styles.root} testID="userflow-element-picker">
|
|
380
|
-
{state.active
|
|
463
|
+
{returnNudge && !state.active ? (
|
|
464
|
+
<ChromeDialog
|
|
465
|
+
body={RETURN_NUDGE_BODY}
|
|
466
|
+
onClose={dismissReturnNudge}
|
|
467
|
+
title={RETURN_NUDGE_TITLE}
|
|
468
|
+
>
|
|
469
|
+
<ChromeButton
|
|
470
|
+
accessibilityLabel="Okay"
|
|
471
|
+
flex
|
|
472
|
+
label="Okay"
|
|
473
|
+
onPress={dismissReturnNudge}
|
|
474
|
+
testID="userflow-element-picker-return-okay"
|
|
475
|
+
/>
|
|
476
|
+
</ChromeDialog>
|
|
477
|
+
) : null}
|
|
478
|
+
{state.active && (phase === 'selecting' || phase === 'blocked') ? (
|
|
381
479
|
<View pointerEvents="none" style={styles.dim} testID="userflow-element-picker-dim" />
|
|
382
480
|
) : null}
|
|
383
481
|
|
|
@@ -435,7 +533,12 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
435
533
|
style={styles.top}
|
|
436
534
|
visible={chromeBarsVisible}
|
|
437
535
|
>
|
|
438
|
-
<ChromeTopBar
|
|
536
|
+
<ChromeTopBar
|
|
537
|
+
label={barLabel}
|
|
538
|
+
onMeasureHeight={onMeasureHeight}
|
|
539
|
+
tone={isError ? 'error' : 'default'}
|
|
540
|
+
{...(toneIcon ? { icon: toneIcon } : {})}
|
|
541
|
+
/>
|
|
439
542
|
</ChromeBarTransition>
|
|
440
543
|
) : null}
|
|
441
544
|
|
|
@@ -444,6 +547,7 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
444
547
|
<ChromeTooltip
|
|
445
548
|
onDismiss={() => {
|
|
446
549
|
setShowOnboarding(false);
|
|
550
|
+
setChromeVisible(false);
|
|
447
551
|
}}
|
|
448
552
|
>
|
|
449
553
|
{ONBOARDING_COPY}
|
|
@@ -458,8 +562,13 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
458
562
|
style={styles.bottom}
|
|
459
563
|
visible={chromeBarsVisible}
|
|
460
564
|
>
|
|
461
|
-
<ChromeBottomSheet
|
|
462
|
-
{
|
|
565
|
+
<ChromeBottomSheet
|
|
566
|
+
helperText={helperText}
|
|
567
|
+
onMeasureHeight={onMeasureSheetHeight}
|
|
568
|
+
tone={isError ? 'error' : 'default'}
|
|
569
|
+
{...(helperIcon ? { helperIcon } : {})}
|
|
570
|
+
>
|
|
571
|
+
{phase === 'selected' || phase === 'blocked' ? (
|
|
463
572
|
<>
|
|
464
573
|
<ChromeButton
|
|
465
574
|
accessibilityLabel="Deselect"
|
|
@@ -470,7 +579,7 @@ export function ElementPickerOverlay(): React.ReactElement | null {
|
|
|
470
579
|
/>
|
|
471
580
|
<ChromeButton
|
|
472
581
|
accessibilityLabel="Confirm element"
|
|
473
|
-
disabled={busy}
|
|
582
|
+
disabled={busy || isError}
|
|
474
583
|
label="Confirm element"
|
|
475
584
|
onPress={() => {
|
|
476
585
|
void confirm();
|