@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
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getSibling,
|
|
8
8
|
isHostFiber,
|
|
9
9
|
} from './fiberInternals';
|
|
10
|
-
import {
|
|
10
|
+
import { walkVisibleFibers } from './walkVisibleFibers';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Soft cap so a dense screen cannot stall the JS thread. One modest Expo Router
|
|
@@ -19,60 +19,78 @@ const MAX_NODES = 60_000;
|
|
|
19
19
|
/** One production warning per process — truncation must not look like "missing". */
|
|
20
20
|
let maxNodesWarned = false;
|
|
21
21
|
|
|
22
|
-
export type AnchorPropTier = 'testID' | 'nativeID' | 'accessibilityLabel';
|
|
22
|
+
export type AnchorPropTier = 'userflowId' | 'testID' | 'nativeID' | 'accessibilityLabel';
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
/** Props an anchor id can sit on, strongest first. */
|
|
25
|
+
export const ANCHOR_PROP_TIERS: readonly AnchorPropTier[] = [
|
|
26
|
+
'userflowId',
|
|
27
|
+
'testID',
|
|
28
|
+
'nativeID',
|
|
29
|
+
'accessibilityLabel',
|
|
30
|
+
];
|
|
25
31
|
|
|
26
32
|
export type FindAnchorFiberResult =
|
|
27
33
|
| { status: 'found'; fiber: AnyFiber; tier: AnchorPropTier }
|
|
28
34
|
| { status: 'ambiguous'; tier: AnchorPropTier }
|
|
29
35
|
| { status: 'missing' };
|
|
30
36
|
|
|
37
|
+
/** Every collapsed host of the winning tier. Duplicates stay in the list. */
|
|
38
|
+
export type FindAnchorFibersResult =
|
|
39
|
+
| { status: 'found'; fibers: AnyFiber[]; tier: AnchorPropTier }
|
|
40
|
+
| { status: 'missing' };
|
|
41
|
+
|
|
31
42
|
/**
|
|
32
43
|
* Bounded DFS under `rootFiber` looking for fibers whose memoizedProps match
|
|
33
|
-
* `id` on testID, then nativeID, then accessibilityLabel.
|
|
34
|
-
* tier that has any match so a testID hit is never made
|
|
35
|
-
* unrelated accessibilityLabel.
|
|
44
|
+
* `id` on userflowId, then testID, then nativeID, then accessibilityLabel.
|
|
45
|
+
* Uses the highest tier that has any match so a testID hit is never made
|
|
46
|
+
* ambiguous by an unrelated accessibilityLabel.
|
|
36
47
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
48
|
+
* A composite match resolves to the host beneath it that carries the same id
|
|
49
|
+
* (e.g. a tab item that wraps its button in a View and forwards testID to the
|
|
50
|
+
* button), else to its shallowest host descendant. Multiple matches on a single
|
|
51
|
+
* root-to-leaf chain (e.g. Pressable forwarding testID to its inner View)
|
|
52
|
+
* collapse to the outermost host. Disjoint matches stay in the list returned by
|
|
53
|
+
* {@link findAnchorFibers}; {@link findAnchorFiber} fails closed on those.
|
|
41
54
|
*
|
|
42
55
|
* The walk never follows `rootFiber.sibling` so the Userflow overlay (a sibling
|
|
43
56
|
* of {@link FiberScanRoot} in UserflowProvider) cannot self-match SDK testIDs.
|
|
44
57
|
*/
|
|
45
|
-
export function
|
|
58
|
+
export function findAnchorFibers(rootFiber: AnyFiber, id: string): FindAnchorFibersResult {
|
|
46
59
|
if (!rootFiber || !id) return { status: 'missing' };
|
|
60
|
+
const won = winningTier(rootFiber, id);
|
|
61
|
+
if (!won) return { status: 'missing' };
|
|
62
|
+
return { status: 'found', fibers: won.hosts, tier: won.tier };
|
|
63
|
+
}
|
|
47
64
|
|
|
65
|
+
export function findAnchorFiber(rootFiber: AnyFiber, id: string): FindAnchorFiberResult {
|
|
66
|
+
const many = findAnchorFibers(rootFiber, id);
|
|
67
|
+
if (many.status === 'missing') return { status: 'missing' };
|
|
68
|
+
if (many.fibers.length === 1) {
|
|
69
|
+
return { status: 'found', fiber: many.fibers[0]!, tier: many.tier };
|
|
70
|
+
}
|
|
71
|
+
return { status: 'ambiguous', tier: many.tier };
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function winningTier(
|
|
75
|
+
rootFiber: AnyFiber,
|
|
76
|
+
id: string,
|
|
77
|
+
): { tier: AnchorPropTier; hosts: AnyFiber[] } | null {
|
|
48
78
|
try {
|
|
49
79
|
const byTier: Record<AnchorPropTier, AnyFiber[]> = {
|
|
80
|
+
userflowId: [],
|
|
50
81
|
testID: [],
|
|
51
82
|
nativeID: [],
|
|
52
83
|
accessibilityLabel: [],
|
|
53
84
|
};
|
|
54
85
|
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (!fiber) continue;
|
|
63
|
-
visited += 1;
|
|
64
|
-
|
|
65
|
-
if (covered.has(fiber)) {
|
|
66
|
-
// Keep following the chain, but do not match or descend here.
|
|
67
|
-
if (fiber !== rootFiber) {
|
|
68
|
-
const sibling = getSibling(fiber);
|
|
69
|
-
if (sibling) stack.push(sibling);
|
|
86
|
+
const { visited, truncated } = walkVisibleFibers(
|
|
87
|
+
rootFiber,
|
|
88
|
+
(fiber) => {
|
|
89
|
+
const props = getMemoizedProps(fiber);
|
|
90
|
+
if (!props) return;
|
|
91
|
+
if (typeof props.userflowId === 'string' && props.userflowId === id) {
|
|
92
|
+
byTier.userflowId.push(fiber);
|
|
70
93
|
}
|
|
71
|
-
continue;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
const props = getMemoizedProps(fiber);
|
|
75
|
-
if (props) {
|
|
76
94
|
if (typeof props.testID === 'string' && props.testID === id) {
|
|
77
95
|
byTier.testID.push(fiber);
|
|
78
96
|
}
|
|
@@ -82,75 +100,60 @@ export function findAnchorFiber(rootFiber: AnyFiber, id: string): FindAnchorFibe
|
|
|
82
100
|
if (typeof props.accessibilityLabel === 'string' && props.accessibilityLabel === id) {
|
|
83
101
|
byTier.accessibilityLabel.push(fiber);
|
|
84
102
|
}
|
|
85
|
-
}
|
|
103
|
+
},
|
|
104
|
+
MAX_NODES,
|
|
105
|
+
);
|
|
86
106
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
// FiberScanRoot and must stay outside the scan.
|
|
90
|
-
if (fiber !== rootFiber) {
|
|
91
|
-
const sibling = getSibling(fiber);
|
|
92
|
-
if (sibling) stack.push(sibling);
|
|
93
|
-
}
|
|
94
|
-
if (isScreenContainerFiber(fiber)) {
|
|
95
|
-
for (const branch of coveredScreenBranches(fiber)) {
|
|
96
|
-
covered.add(branch);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
const child = getChild(fiber);
|
|
100
|
-
if (child) stack.push(child);
|
|
107
|
+
if (truncated || visited >= MAX_NODES) {
|
|
108
|
+
warnScanTruncated(id);
|
|
101
109
|
}
|
|
102
110
|
|
|
103
|
-
|
|
104
|
-
// Truncation would otherwise look exactly like "the anchor isn't there".
|
|
105
|
-
// eslint-disable-next-line no-console -- actionable: the anchor may exist but was not reached
|
|
106
|
-
const warn = (message: string): void => console.warn(message);
|
|
107
|
-
if (__DEV__) {
|
|
108
|
-
warn(
|
|
109
|
-
`[Userflow] Anchor scan for "${id}" stopped after ${MAX_NODES} nodes. ` +
|
|
110
|
-
`The element may exist but was not reached. Register it explicitly with ` +
|
|
111
|
-
`useUserflowAnchor("${id}") to skip the scan.`,
|
|
112
|
-
);
|
|
113
|
-
} else if (!maxNodesWarned) {
|
|
114
|
-
maxNodesWarned = true;
|
|
115
|
-
warn(
|
|
116
|
-
`[Userflow] Anchor scan stopped after ${MAX_NODES} nodes; some anchors may ` +
|
|
117
|
-
`be missed. Prefer useUserflowAnchor for deep or dense trees.`,
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
for (const tier of TIER_ORDER) {
|
|
111
|
+
for (const tier of ANCHOR_PROP_TIERS) {
|
|
123
112
|
const matches = byTier[tier];
|
|
124
113
|
if (matches.length === 0) continue;
|
|
125
114
|
|
|
126
115
|
const hosts = uniqueHosts(matches);
|
|
127
116
|
if (hosts.length === 0) continue;
|
|
128
|
-
|
|
129
|
-
return { status: 'found', fiber: hosts[0]!, tier };
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
const collapsed = collapseToChains(hosts);
|
|
133
|
-
if (collapsed.length === 1) {
|
|
134
|
-
return { status: 'found', fiber: collapsed[0]!, tier };
|
|
135
|
-
}
|
|
136
|
-
return { status: 'ambiguous', tier };
|
|
117
|
+
return { tier, hosts: collapseToChains(hosts) };
|
|
137
118
|
}
|
|
138
119
|
|
|
139
|
-
return
|
|
120
|
+
return null;
|
|
140
121
|
} catch {
|
|
141
|
-
return
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function warnScanTruncated(id: string): void {
|
|
127
|
+
// Truncation would otherwise look exactly like "the anchor isn't there".
|
|
128
|
+
// eslint-disable-next-line no-console -- actionable: the anchor may exist but was not reached
|
|
129
|
+
const warn = (message: string): void => console.warn(message);
|
|
130
|
+
if (__DEV__) {
|
|
131
|
+
warn(
|
|
132
|
+
`[Userflow] Anchor scan for "${id}" stopped after ${MAX_NODES} nodes. ` +
|
|
133
|
+
`The element may exist but was not reached. Register it explicitly with ` +
|
|
134
|
+
`useUserflowAnchor("${id}") to skip the scan.`,
|
|
135
|
+
);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (!maxNodesWarned) {
|
|
139
|
+
maxNodesWarned = true;
|
|
140
|
+
warn(
|
|
141
|
+
`[Userflow] Anchor scan stopped after ${MAX_NODES} nodes; some anchors may ` +
|
|
142
|
+
`be missed. Prefer useUserflowAnchor for deep or dense trees.`,
|
|
143
|
+
);
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
/**
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
+
* Resolve each matched fiber to the host that represents it. Deduplicate by
|
|
149
|
+
* identity / alternate.
|
|
148
150
|
*/
|
|
149
151
|
function uniqueHosts(matches: AnyFiber[]): AnyFiber[] {
|
|
152
|
+
const forwarded = forwardedHostMatches(matches);
|
|
150
153
|
const seen = new Set<AnyFiber>();
|
|
151
154
|
const out: AnyFiber[] = [];
|
|
152
155
|
for (const match of matches) {
|
|
153
|
-
const host =
|
|
156
|
+
const host = isHostFiber(match) ? match : compositeHost(match, forwarded.get(match));
|
|
154
157
|
if (!host) continue;
|
|
155
158
|
const identity = host.alternate ?? host;
|
|
156
159
|
if (seen.has(host) || seen.has(identity)) continue;
|
|
@@ -162,6 +165,44 @@ function uniqueHosts(matches: AnyFiber[]): AnyFiber[] {
|
|
|
162
165
|
return out;
|
|
163
166
|
}
|
|
164
167
|
|
|
168
|
+
/**
|
|
169
|
+
* The host carrying a composite's id when the composite forwards it down one
|
|
170
|
+
* chain, else the composite's shallowest host. Carriers on disjoint chains keep
|
|
171
|
+
* the shallowest host, so a component repeating its id on two children still
|
|
172
|
+
* resolves to the component.
|
|
173
|
+
*/
|
|
174
|
+
function compositeHost(composite: AnyFiber, carriers: AnyFiber[] | undefined): AnyFiber | null {
|
|
175
|
+
const chains = carriers ? collapseToChains(carriers) : [];
|
|
176
|
+
if (chains.length === 1) return chains[0]!;
|
|
177
|
+
return nearestHostDescendant(composite);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** Host matches grouped under each composite match they descend from. */
|
|
181
|
+
function forwardedHostMatches(matches: AnyFiber[]): Map<AnyFiber, AnyFiber[]> {
|
|
182
|
+
const composites = new Map<AnyFiber, AnyFiber>();
|
|
183
|
+
for (const match of matches) {
|
|
184
|
+
if (isHostFiber(match)) continue;
|
|
185
|
+
composites.set(match, match);
|
|
186
|
+
if (match.alternate) composites.set(match.alternate, match);
|
|
187
|
+
}
|
|
188
|
+
const out = new Map<AnyFiber, AnyFiber[]>();
|
|
189
|
+
if (composites.size === 0) return out;
|
|
190
|
+
for (const host of matches) {
|
|
191
|
+
if (!isHostFiber(host)) continue;
|
|
192
|
+
let cur = getReturn(host);
|
|
193
|
+
for (let depth = 0; cur && depth < MAX_ANCESTOR_WALK; depth += 1) {
|
|
194
|
+
const composite = composites.get(cur);
|
|
195
|
+
if (composite) {
|
|
196
|
+
const carriers = out.get(composite);
|
|
197
|
+
if (carriers) carriers.push(host);
|
|
198
|
+
else out.set(composite, [host]);
|
|
199
|
+
}
|
|
200
|
+
cur = getReturn(cur);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return out;
|
|
204
|
+
}
|
|
205
|
+
|
|
165
206
|
/**
|
|
166
207
|
* BFS under `fiber` for the shallowest host descendant. Returns `fiber` itself
|
|
167
208
|
* when it is already a host.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-resolve a fiber path captured from library UI the Babel plugin never
|
|
3
|
+
* stamped. Explicit leaf ids win. Otherwise score host kind, label, role, and
|
|
4
|
+
* path alignment, and fail closed when the best hit is weak or tied.
|
|
5
|
+
*/
|
|
6
|
+
import type { MobileFiberPath, MobileFiberSegment } from '@userflow-tech/protocol';
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
getCachedFiberAnchor,
|
|
10
|
+
getFiberAnchorScreenKey,
|
|
11
|
+
setCachedFiberAnchor,
|
|
12
|
+
} from '../fiberAnchorCache';
|
|
13
|
+
import { resolveAnchorHost } from '../resolveAnchorHost';
|
|
14
|
+
import { textsAgree } from '../semanticMatcher';
|
|
15
|
+
|
|
16
|
+
import { fiberScanRoot } from './FiberScanRoot';
|
|
17
|
+
import {
|
|
18
|
+
type AnyFiber,
|
|
19
|
+
MAX_ANCESTOR_WALK,
|
|
20
|
+
getAlternate,
|
|
21
|
+
getHostTypeName,
|
|
22
|
+
getLiveHostProps,
|
|
23
|
+
getReturn,
|
|
24
|
+
isFiberMounted,
|
|
25
|
+
isHostFiber,
|
|
26
|
+
} from './fiberInternals';
|
|
27
|
+
import { readHostText } from './readHostContent';
|
|
28
|
+
import { isFiberOnVisibleScreen } from './visibleScreens';
|
|
29
|
+
import { walkVisibleFibers } from './walkVisibleFibers';
|
|
30
|
+
|
|
31
|
+
const MIN_SCORE = 40;
|
|
32
|
+
const UNIQUENESS_MARGIN = 12;
|
|
33
|
+
|
|
34
|
+
export type FiberPathResolution =
|
|
35
|
+
| { status: 'found'; fiber: AnyFiber; cacheId: string; textDisagreed?: boolean }
|
|
36
|
+
| { status: 'ambiguous' }
|
|
37
|
+
| { status: 'unknown' };
|
|
38
|
+
|
|
39
|
+
function stringProp(value: unknown): string | undefined {
|
|
40
|
+
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function cacheKey(path: MobileFiberPath): string {
|
|
44
|
+
return `fiber:${JSON.stringify(path)}`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function sameFiber(a: AnyFiber, b: AnyFiber): boolean {
|
|
48
|
+
if (a === b) return true;
|
|
49
|
+
const alt = getAlternate(a);
|
|
50
|
+
return alt != null && alt === b;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function liveSegment(fiber: AnyFiber): MobileFiberSegment {
|
|
54
|
+
const props = getLiveHostProps(fiber);
|
|
55
|
+
const role = stringProp(props?.accessibilityRole) ?? stringProp(props?.role);
|
|
56
|
+
const testID = stringProp(props?.testID);
|
|
57
|
+
const accessibilityLabel =
|
|
58
|
+
stringProp(props?.accessibilityLabel) ?? stringProp(props?.['aria-label']);
|
|
59
|
+
let text: string | undefined;
|
|
60
|
+
try {
|
|
61
|
+
text = readHostText(fiber, 1);
|
|
62
|
+
} catch {
|
|
63
|
+
text = undefined;
|
|
64
|
+
}
|
|
65
|
+
const hostKind = getHostTypeName(fiber);
|
|
66
|
+
return {
|
|
67
|
+
displayName: typeof fiber?.type === 'string' ? fiber.type : '',
|
|
68
|
+
...(hostKind ? { hostKind } : {}),
|
|
69
|
+
...(role ? { role } : {}),
|
|
70
|
+
...(testID ? { testID } : {}),
|
|
71
|
+
...(accessibilityLabel ? { accessibilityLabel } : {}),
|
|
72
|
+
...(text ? { text } : {}),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function ancestorsOf(fiber: AnyFiber): AnyFiber[] {
|
|
77
|
+
const chain: AnyFiber[] = [];
|
|
78
|
+
let current: AnyFiber | null = fiber;
|
|
79
|
+
for (let depth = 0; current && depth < MAX_ANCESTOR_WALK; depth += 1) {
|
|
80
|
+
if (isHostFiber(current)) chain.push(current);
|
|
81
|
+
current = getReturn(current);
|
|
82
|
+
}
|
|
83
|
+
chain.reverse();
|
|
84
|
+
return chain;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function scoreAlignment(expected: MobileFiberSegment[], actual: AnyFiber[]): number {
|
|
88
|
+
const n = Math.min(expected.length, actual.length);
|
|
89
|
+
let score = 0;
|
|
90
|
+
let kindAligned = 0;
|
|
91
|
+
for (let i = 0; i < n; i += 1) {
|
|
92
|
+
const exp = expected[expected.length - 1 - i]!;
|
|
93
|
+
const live = liveSegment(actual[actual.length - 1 - i]!);
|
|
94
|
+
const expKind = exp.hostKind ?? exp.displayName;
|
|
95
|
+
const liveKind = live.hostKind ?? live.displayName;
|
|
96
|
+
if (expKind && liveKind && expKind !== liveKind) break;
|
|
97
|
+
kindAligned += 1;
|
|
98
|
+
if (exp.testID && live.testID === exp.testID) score += 20;
|
|
99
|
+
if (exp.role && live.role && exp.role === live.role) score += 8;
|
|
100
|
+
if (exp.siblingIndex !== undefined && exp.siblingIndex === live.siblingIndex) score += 2;
|
|
101
|
+
if (exp.displayName && live.displayName && exp.displayName === live.displayName) score += 1;
|
|
102
|
+
}
|
|
103
|
+
return score + kindAligned * 6;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function scoreHost(
|
|
107
|
+
path: MobileFiberPath,
|
|
108
|
+
fiber: AnyFiber,
|
|
109
|
+
): { score: number; textDisagreed: boolean } {
|
|
110
|
+
const live = liveSegment(fiber);
|
|
111
|
+
const leaf = path.segments[path.segments.length - 1];
|
|
112
|
+
const leafKind = leaf?.hostKind ?? path.leafKind;
|
|
113
|
+
const liveKind = live.hostKind ?? '';
|
|
114
|
+
if (leafKind && liveKind && leafKind !== liveKind) {
|
|
115
|
+
return { score: -Infinity, textDisagreed: false };
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
let score = 20;
|
|
119
|
+
if (leaf?.role && live.role === leaf.role) score += 15;
|
|
120
|
+
if (leaf?.testID && live.testID === leaf.testID) score += 90;
|
|
121
|
+
|
|
122
|
+
const expectedText = leaf?.text ?? path.leafText;
|
|
123
|
+
const expectedLabel = leaf?.accessibilityLabel;
|
|
124
|
+
const textDisagreed = !!expectedText && !!live.text && expectedText !== live.text;
|
|
125
|
+
const labelDisagreed =
|
|
126
|
+
!!expectedLabel && !!live.accessibilityLabel && expectedLabel !== live.accessibilityLabel;
|
|
127
|
+
|
|
128
|
+
if (expectedText && textsAgree(expectedText, live.text)) score += 40;
|
|
129
|
+
if (expectedLabel && textsAgree(expectedLabel, live.accessibilityLabel)) score += 35;
|
|
130
|
+
|
|
131
|
+
const ancestors = ancestorsOf(fiber);
|
|
132
|
+
score += scoreAlignment(path.segments, ancestors);
|
|
133
|
+
|
|
134
|
+
const fatalText = textDisagreed && !textsAgree(expectedText, live.text);
|
|
135
|
+
const fatalLabel = labelDisagreed && !textsAgree(expectedLabel, live.accessibilityLabel);
|
|
136
|
+
// A full host-kind alignment vouches for a renamed or translated label the
|
|
137
|
+
// way an icon vouches in the registry matcher. Twins still fail uniqueness.
|
|
138
|
+
const offset = ancestors.length - path.segments.length;
|
|
139
|
+
const kindsAlign =
|
|
140
|
+
offset >= 0 &&
|
|
141
|
+
path.segments.every((segment, index) => {
|
|
142
|
+
const actualKind = getHostTypeName(ancestors[offset + index]!);
|
|
143
|
+
return !segment.hostKind || actualKind === segment.hostKind;
|
|
144
|
+
});
|
|
145
|
+
if ((fatalText || fatalLabel) && !leaf?.testID && !kindsAlign) {
|
|
146
|
+
return { score: -Infinity, textDisagreed: true };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return { score, textDisagreed: textDisagreed || labelDisagreed };
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function resolveScored(path: MobileFiberPath, root: AnyFiber): FiberPathResolution {
|
|
153
|
+
const scored: Array<{ fiber: AnyFiber; score: number; textDisagreed: boolean }> = [];
|
|
154
|
+
walkVisibleFibers(root, (fiber) => {
|
|
155
|
+
if (!isHostFiber(fiber)) return;
|
|
156
|
+
if (!isFiberOnVisibleScreen(fiber)) return;
|
|
157
|
+
const { score, textDisagreed } = scoreHost(path, fiber);
|
|
158
|
+
if (score > -Infinity) scored.push({ fiber, score, textDisagreed });
|
|
159
|
+
});
|
|
160
|
+
scored.sort((a, b) => b.score - a.score);
|
|
161
|
+
const best = scored[0];
|
|
162
|
+
if (!best || best.score < MIN_SCORE) return { status: 'unknown' };
|
|
163
|
+
const second = scored[1];
|
|
164
|
+
if (second && best.score - second.score < UNIQUENESS_MARGIN) return { status: 'ambiguous' };
|
|
165
|
+
return {
|
|
166
|
+
status: 'found',
|
|
167
|
+
fiber: best.fiber,
|
|
168
|
+
cacheId: '',
|
|
169
|
+
...(best.textDisagreed ? { textDisagreed: true } : {}),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Resolve `path` to the live host it describes. A leaf `testID` is authoritative
|
|
175
|
+
* and reuses the manual fiber scan.
|
|
176
|
+
*/
|
|
177
|
+
export function resolveFiberPath(path: MobileFiberPath | null | undefined): FiberPathResolution {
|
|
178
|
+
if (!path || path.segments.length === 0) return { status: 'unknown' };
|
|
179
|
+
|
|
180
|
+
const leaf = path.segments[path.segments.length - 1];
|
|
181
|
+
const exactId = leaf?.testID;
|
|
182
|
+
if (exactId) {
|
|
183
|
+
const exact = resolveAnchorHost(exactId);
|
|
184
|
+
if (exact.status === 'found' && exact.fiber) {
|
|
185
|
+
return { status: 'found', fiber: exact.fiber, cacheId: exactId };
|
|
186
|
+
}
|
|
187
|
+
if (exact.status === 'ambiguous') return { status: 'ambiguous' };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const key = cacheKey(path);
|
|
191
|
+
const cached = getCachedFiberAnchor(key);
|
|
192
|
+
const screenKey = getFiberAnchorScreenKey();
|
|
193
|
+
if (
|
|
194
|
+
cached &&
|
|
195
|
+
cached.screenKey === screenKey &&
|
|
196
|
+
isFiberMounted(cached.fiber) &&
|
|
197
|
+
isFiberOnVisibleScreen(cached.fiber)
|
|
198
|
+
) {
|
|
199
|
+
return { status: 'found', fiber: cached.fiber, cacheId: key };
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const root = fiberScanRoot.getFiber();
|
|
203
|
+
if (!root) return { status: 'unknown' };
|
|
204
|
+
|
|
205
|
+
const resolved = resolveScored(path, root);
|
|
206
|
+
if (resolved.status === 'found') {
|
|
207
|
+
setCachedFiberAnchor(key, resolved.fiber);
|
|
208
|
+
return { ...resolved, cacheId: key };
|
|
209
|
+
}
|
|
210
|
+
return resolved;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export function fibersMatch(a: AnyFiber, b: AnyFiber): boolean {
|
|
214
|
+
return sameFiber(a, b) || sameFiber(b, a);
|
|
215
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host fiber under a touch, resolved synchronously from the responder event.
|
|
3
|
+
*
|
|
4
|
+
* Feature-detected and never throws. A renderer that does not expose any of
|
|
5
|
+
* these pointers degrades to "no target", so a click condition simply does not
|
|
6
|
+
* latch.
|
|
7
|
+
*
|
|
8
|
+
* Order:
|
|
9
|
+
* 1. `event._targetInst` (React's fiber for the touched component)
|
|
10
|
+
* 2. `event.target` public instance via {@link lookupHostFiber}
|
|
11
|
+
* 3. The touch's native tag (`changedTouches[].target`, else `nativeEvent.target`)
|
|
12
|
+
* via the scan-root host index
|
|
13
|
+
*/
|
|
14
|
+
import type { GestureResponderEvent } from 'react-native';
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
type AnyFiber,
|
|
18
|
+
isHostFiber,
|
|
19
|
+
isReactFiber,
|
|
20
|
+
nativeTagFromHostFiber,
|
|
21
|
+
resolveCurrentFiber,
|
|
22
|
+
} from './fiberInternals';
|
|
23
|
+
import { nearestHostDescendant } from './findAnchorFiber';
|
|
24
|
+
import { createLazyHostFiberIndex, lookupHostFiber } from './indexHostFibers';
|
|
25
|
+
|
|
26
|
+
export function touchTargetFiber(
|
|
27
|
+
event: GestureResponderEvent,
|
|
28
|
+
identifier?: number | string,
|
|
29
|
+
): AnyFiber | null {
|
|
30
|
+
try {
|
|
31
|
+
const tag = nativeTagForTouch(event, identifier);
|
|
32
|
+
|
|
33
|
+
const fromInst = hostFromFiber(readTargetInst(event));
|
|
34
|
+
if (fromInst && tagMatches(fromInst, tag)) return fromInst;
|
|
35
|
+
|
|
36
|
+
const fromInstance = hostFromInstance(event.target);
|
|
37
|
+
if (fromInstance && tagMatches(fromInstance, tag)) return fromInstance;
|
|
38
|
+
|
|
39
|
+
if (tag === undefined) return null;
|
|
40
|
+
// The event-level fibers belong to another finger's view, so only the
|
|
41
|
+
// index can name this one. A miss must not fall back to theirs.
|
|
42
|
+
return createLazyHostFiberIndex()().byNativeTag.get(tag) ?? null;
|
|
43
|
+
} catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Fabric sends one touch event per touched view, and each lists every finger
|
|
50
|
+
* that changed. True when `identifier`'s finger is on this event's own view,
|
|
51
|
+
* so a caller can record each finger once, from its own event, instead of
|
|
52
|
+
* overwriting it from another finger's. Unreadable tags count as this event's.
|
|
53
|
+
*/
|
|
54
|
+
export function touchBelongsToEvent(
|
|
55
|
+
event: GestureResponderEvent,
|
|
56
|
+
identifier: number | string,
|
|
57
|
+
): boolean {
|
|
58
|
+
try {
|
|
59
|
+
const tag = nativeTagForTouch(event, identifier);
|
|
60
|
+
if (tag === undefined) return true;
|
|
61
|
+
const own = hostFromFiber(readTargetInst(event)) ?? hostFromInstance(event.target);
|
|
62
|
+
return own == null || tagMatches(own, tag);
|
|
63
|
+
} catch {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function readTargetInst(event: GestureResponderEvent): unknown {
|
|
69
|
+
return (event as { _targetInst?: unknown })._targetInst;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function nativeTagForTouch(
|
|
73
|
+
event: GestureResponderEvent,
|
|
74
|
+
identifier: number | string | undefined,
|
|
75
|
+
): number | undefined {
|
|
76
|
+
const native = event.nativeEvent as {
|
|
77
|
+
target?: unknown;
|
|
78
|
+
changedTouches?: Array<{ identifier?: number | string; target?: unknown }>;
|
|
79
|
+
};
|
|
80
|
+
if (identifier != null && native.changedTouches) {
|
|
81
|
+
const touch = native.changedTouches.find((entry) => entry.identifier === identifier);
|
|
82
|
+
const touchTag = asTag(touch?.target);
|
|
83
|
+
if (touchTag !== undefined) return touchTag;
|
|
84
|
+
}
|
|
85
|
+
return asTag(native.target);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function asTag(value: unknown): number | undefined {
|
|
89
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Accept a host whose tag we cannot read (test renderer, older Paper). Reject
|
|
94
|
+
* only when both sides have a tag and they differ — that event-level fiber
|
|
95
|
+
* belongs to a different finger.
|
|
96
|
+
*/
|
|
97
|
+
function tagMatches(fiber: AnyFiber, tag: number | undefined): boolean {
|
|
98
|
+
if (tag === undefined) return true;
|
|
99
|
+
const fiberTag = nativeTagFromHostFiber(fiber);
|
|
100
|
+
if (fiberTag === undefined) return true;
|
|
101
|
+
return fiberTag === tag;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function hostFromFiber(value: unknown): AnyFiber | null {
|
|
105
|
+
if (!isReactFiber(value)) return null;
|
|
106
|
+
try {
|
|
107
|
+
const current = resolveCurrentFiber(value);
|
|
108
|
+
if (isHostFiber(current)) return current;
|
|
109
|
+
return nearestHostDescendant(current);
|
|
110
|
+
} catch {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function hostFromInstance(value: unknown): AnyFiber | null {
|
|
116
|
+
if (!value || typeof value !== 'object') return null;
|
|
117
|
+
try {
|
|
118
|
+
const fiber = lookupHostFiber(createLazyHostFiberIndex(), value);
|
|
119
|
+
if (!fiber) return null;
|
|
120
|
+
if (isHostFiber(fiber)) return fiber;
|
|
121
|
+
return nearestHostDescendant(fiber);
|
|
122
|
+
} catch {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
}
|