@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
|
@@ -4,34 +4,35 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createElementConditionEvaluator = createElementConditionEvaluator;
|
|
7
|
+
var _protocol = require("@userflow-tech/protocol");
|
|
7
8
|
var _anchorChangeTicker = require("./anchorChangeTicker.js");
|
|
8
|
-
var
|
|
9
|
-
var
|
|
9
|
+
var _elementTapMonitor = require("./elementTapMonitor.js");
|
|
10
|
+
var _elementTargetMatch = require("./elementTargetMatch.js");
|
|
11
|
+
var _resolveElementTargets = require("./resolveElementTargets.js");
|
|
10
12
|
var _resolveManualAnchorId = require("./resolveManualAnchorId.js");
|
|
11
|
-
/**
|
|
12
|
-
const
|
|
13
|
+
/** How many hosts to measure before giving up on a crowded duplicate id. */
|
|
14
|
+
const MAX_MEASURED_HOSTS = 8;
|
|
15
|
+
|
|
16
|
+
/** Same bound tooltip measurement uses. A host that never calls back is unknown. */
|
|
17
|
+
const MEASURE_TIMEOUT_MS = 400;
|
|
13
18
|
|
|
14
19
|
/**
|
|
15
20
|
* Evaluate ELEMENT client conditions against manual anchors, fiber-resolved
|
|
16
|
-
* `testID` / `nativeID` / `accessibilityLabel` targets, and AUTO
|
|
17
|
-
* selectors.
|
|
21
|
+
* `userflowId` / `testID` / `nativeID` / `accessibilityLabel` targets, and AUTO
|
|
22
|
+
* (codeless) selectors.
|
|
18
23
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* just because the auto-anchor registry is empty. Web-interaction states
|
|
23
|
-
* (CLICK, DISABLED, …) still report unknown.
|
|
24
|
+
* PRESENT / NOT_PRESENT: any uniquely-or-not host on a visible navigator screen
|
|
25
|
+
* counts (web parity — duplicates are present). A measured 0×0 host counts as
|
|
26
|
+
* absent. AUTO `unknown` / `ambiguous` stay `null`.
|
|
24
27
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* ScrollView, opacity 0, etc.) would need async `measureInWindow` and is out
|
|
30
|
-
* of scope.
|
|
28
|
+
* CLICK / NOT_CLICK: latch from the first matching tap, including a tap on a
|
|
29
|
+
* descendant. The latch survives re-attach via `previousIsTrue` and is cleared
|
|
30
|
+
* when the server untracks. Disabled hosts are ignored. Until it latches, an
|
|
31
|
+
* AUTO selector that does not resolve reports `null`, like presence.
|
|
31
32
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* Element states are compared as string literals rather than protocol enums so
|
|
34
|
+
* the wire values stay obvious next to the branches. They match
|
|
35
|
+
* `FlowConditionElementState`.
|
|
35
36
|
*/
|
|
36
37
|
function createElementConditionEvaluator(warn = message => {
|
|
37
38
|
if (__DEV__) {
|
|
@@ -45,51 +46,184 @@ function createElementConditionEvaluator(warn = message => {
|
|
|
45
46
|
warnedConditionIds.add(conditionId);
|
|
46
47
|
warn(message);
|
|
47
48
|
};
|
|
48
|
-
return (condition, report) => {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
report
|
|
49
|
+
return (condition, report, context) => {
|
|
50
|
+
const elementState = condition.elementState;
|
|
51
|
+
if (elementState === 'PRESENT' || elementState === 'NOT_PRESENT') {
|
|
52
|
+
return trackPresence(condition, elementState, report, warnOnce);
|
|
53
|
+
}
|
|
54
|
+
if (elementState === 'CLICK' || elementState === 'NOT_CLICK') {
|
|
55
|
+
return trackClick(condition, elementState, report, context, warnOnce);
|
|
56
|
+
}
|
|
57
|
+
warnOnce(condition.id, `[Userflow] ELEMENT condition ${condition.id} uses unsupported elementState ` + `"${elementState ?? 'null'}" (supported: PRESENT, NOT_PRESENT, CLICK, NOT_CLICK); ` + 'leaving unknown');
|
|
58
|
+
report(null);
|
|
59
|
+
return () => {};
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function trackPresence(condition, elementState, report, warnOnce) {
|
|
63
|
+
// A synchronous result supersedes any older measurement. Only one
|
|
64
|
+
// measurement runs at a time, and a change during it re-runs once it settles
|
|
65
|
+
// instead of discarding it, so steady anchor churn cannot hold the condition
|
|
66
|
+
// at unknown.
|
|
67
|
+
let generation = 0;
|
|
68
|
+
let reportedGeneration = 0;
|
|
69
|
+
let measuring = false;
|
|
70
|
+
let changedWhileMeasuring = false;
|
|
71
|
+
let disposed = false;
|
|
72
|
+
const evaluate = () => {
|
|
73
|
+
if (disposed) return;
|
|
74
|
+
const gen = ++generation;
|
|
75
|
+
const resolution = (0, _resolveElementTargets.resolveElementTargets)(condition.selector);
|
|
76
|
+
if (resolution.status === 'unknown') {
|
|
77
|
+
if (!resolution.silent) warnUnknown(condition, warnOnce);
|
|
78
|
+
reportedGeneration = gen;
|
|
79
|
+
report(null);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (resolution.status === 'absent') {
|
|
83
|
+
reportedGeneration = gen;
|
|
84
|
+
report(elementState === 'PRESENT' ? false : true);
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (measuring) {
|
|
88
|
+
changedWhileMeasuring = true;
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
measuring = true;
|
|
92
|
+
void measureVisibility(resolution.targets).catch(() => 'unknown').then(visibility => {
|
|
93
|
+
measuring = false;
|
|
94
|
+
if (disposed) return;
|
|
95
|
+
if (gen > reportedGeneration) {
|
|
96
|
+
reportedGeneration = gen;
|
|
97
|
+
if (visibility === 'unknown') {
|
|
98
|
+
report(null);
|
|
99
|
+
} else {
|
|
100
|
+
const present = visibility === 'present';
|
|
101
|
+
report(elementState === 'PRESENT' ? present : !present);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (changedWhileMeasuring) {
|
|
105
|
+
changedWhileMeasuring = false;
|
|
106
|
+
evaluate();
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
evaluate();
|
|
111
|
+
const unsubscribe = _anchorChangeTicker.anchorChangeTicker.subscribe(evaluate);
|
|
112
|
+
return () => {
|
|
113
|
+
disposed = true;
|
|
114
|
+
unsubscribe();
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function trackClick(condition, elementState, report, context, warnOnce) {
|
|
118
|
+
if (!clickSelectorUsable(condition)) {
|
|
119
|
+
warnUnknown(condition, warnOnce);
|
|
120
|
+
report(null);
|
|
121
|
+
return () => {};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// CLICK starts false and latches true. NOT_CLICK starts true and latches false.
|
|
125
|
+
const valueWhenOccurred = elementState === 'CLICK';
|
|
126
|
+
if (context?.previousIsTrue === valueWhenOccurred) {
|
|
127
|
+
report(valueWhenOccurred);
|
|
128
|
+
return () => {};
|
|
129
|
+
}
|
|
130
|
+
let latched = false;
|
|
131
|
+
let stopWatchingResolution = () => {};
|
|
132
|
+
if (condition.selector?.type === 'AUTO') {
|
|
133
|
+
// An AUTO selector can stay unresolvable (empty auto-anchor registry, a
|
|
134
|
+
// tie between look-alikes), and then no tap can latch. Report unknown
|
|
135
|
+
// until it resolves, as presence does, rather than an unclicked value
|
|
136
|
+
// nothing could clear.
|
|
137
|
+
const reportUnclickedOnceResolvable = () => {
|
|
138
|
+
if (latched) return;
|
|
139
|
+
const resolution = (0, _resolveElementTargets.resolveElementTargets)(condition.selector);
|
|
140
|
+
if (resolution.status === 'unknown') {
|
|
141
|
+
if (!resolution.silent) warnUnknown(condition, warnOnce);
|
|
142
|
+
report(null);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
report(!valueWhenOccurred);
|
|
52
146
|
};
|
|
53
|
-
|
|
54
|
-
|
|
147
|
+
reportUnclickedOnceResolvable();
|
|
148
|
+
stopWatchingResolution = _anchorChangeTicker.anchorChangeTicker.subscribe(reportUnclickedOnceResolvable);
|
|
149
|
+
} else {
|
|
150
|
+
report(!valueWhenOccurred);
|
|
151
|
+
}
|
|
152
|
+
const subscription = {
|
|
153
|
+
unsubscribe: () => {}
|
|
154
|
+
};
|
|
155
|
+
subscription.unsubscribe = _elementTapMonitor.elementTapMonitor.subscribe(tap => {
|
|
156
|
+
if (latched) return;
|
|
157
|
+
if (!(0, _resolveElementTargets.tapMayHitSelector)(condition.selector, tap)) return;
|
|
158
|
+
const resolution = (0, _resolveElementTargets.resolveElementTargets)(condition.selector);
|
|
159
|
+
if (resolution.status !== 'found') return;
|
|
160
|
+
const matched = resolution.targets.find(target => target.fiber != null && (0, _elementTargetMatch.fiberIsUnder)(tap.targetFiber, target.fiber));
|
|
161
|
+
if (!matched?.fiber) return;
|
|
162
|
+
if ((0, _elementTargetMatch.tapPathDisabled)(tap.targetFiber, matched.fiber)) return;
|
|
163
|
+
latched = true;
|
|
164
|
+
report(valueWhenOccurred, {
|
|
165
|
+
immediate: true
|
|
166
|
+
});
|
|
167
|
+
subscription.unsubscribe();
|
|
168
|
+
stopWatchingResolution();
|
|
169
|
+
});
|
|
170
|
+
return () => {
|
|
171
|
+
subscription.unsubscribe();
|
|
172
|
+
stopWatchingResolution();
|
|
55
173
|
};
|
|
56
174
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
|
|
61
|
-
|
|
175
|
+
function clickSelectorUsable(condition) {
|
|
176
|
+
const selector = condition.selector;
|
|
177
|
+
if (selector == null) return false;
|
|
178
|
+
if (selector.type === 'AUTO') {
|
|
179
|
+
// Without a fingerprint the selector can never resolve, so a definite
|
|
180
|
+
// NOT_CLICK true would start the flow on a target nobody can tap.
|
|
181
|
+
return (0, _protocol.decodeMobileAutoData)(selector.autoData)?.fingerprint != null;
|
|
62
182
|
}
|
|
183
|
+
return (0, _resolveManualAnchorId.resolveManualAnchorId)(selector.css) != null;
|
|
184
|
+
}
|
|
185
|
+
function warnUnknown(condition, warnOnce) {
|
|
63
186
|
const selector = condition.selector;
|
|
64
187
|
if (selector == null) {
|
|
65
188
|
warnOnce(condition.id, `[Userflow] ELEMENT condition ${condition.id} has no selector; leaving unknown`);
|
|
66
|
-
return
|
|
189
|
+
return;
|
|
67
190
|
}
|
|
68
191
|
if (selector.type === 'AUTO') {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
warnOnce(condition.id, `[Userflow] ELEMENT condition ${condition.id} uses an AUTO (codeless) selector ` + 'that could not be resolved; leaving unknown');
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
if (resolution.status === 'ambiguous') {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
const present = resolution.status === 'found';
|
|
78
|
-
return elementState === 'PRESENT' ? present : !present;
|
|
192
|
+
warnOnce(condition.id, `[Userflow] ELEMENT condition ${condition.id} uses an AUTO (codeless) selector ` + 'that could not be resolved; leaving unknown');
|
|
193
|
+
return;
|
|
79
194
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
// stay blocked rather than inventing a truth value.
|
|
89
|
-
if (resolution.status === 'ambiguous') {
|
|
90
|
-
return null;
|
|
195
|
+
warnOnce(condition.id, `[Userflow] ELEMENT condition ${condition.id} has no resolvable manual anchor id; ` + 'leaving unknown');
|
|
196
|
+
}
|
|
197
|
+
/** Measures hosts in parallel so duplicates cost one timeout, not one each. */
|
|
198
|
+
async function measureVisibility(targets) {
|
|
199
|
+
const slice = targets.slice(0, MAX_MEASURED_HOSTS);
|
|
200
|
+
const measured = await Promise.all(slice.map(measureHost));
|
|
201
|
+
if (measured.some(size => size !== 'timeout' && size.width > 0 && size.height > 0)) {
|
|
202
|
+
return 'present';
|
|
91
203
|
}
|
|
92
|
-
|
|
93
|
-
return
|
|
204
|
+
if (measured.includes('timeout') || targets.length > slice.length) return 'unknown';
|
|
205
|
+
return 'absent';
|
|
206
|
+
}
|
|
207
|
+
function measureHost(target) {
|
|
208
|
+
return new Promise(resolve => {
|
|
209
|
+
let settled = false;
|
|
210
|
+
const finish = value => {
|
|
211
|
+
if (settled) return;
|
|
212
|
+
settled = true;
|
|
213
|
+
clearTimeout(timer);
|
|
214
|
+
resolve(value);
|
|
215
|
+
};
|
|
216
|
+
const timer = setTimeout(() => finish('timeout'), MEASURE_TIMEOUT_MS);
|
|
217
|
+
try {
|
|
218
|
+
target.host.measureInWindow((_x, _y, width, height) => {
|
|
219
|
+
finish({
|
|
220
|
+
width,
|
|
221
|
+
height
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
} catch {
|
|
225
|
+
finish('timeout');
|
|
226
|
+
}
|
|
227
|
+
});
|
|
94
228
|
}
|
|
95
229
|
//# sourceMappingURL=elementConditionEvaluator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_protocol","require","_anchorChangeTicker","_elementTapMonitor","_elementTargetMatch","_resolveElementTargets","_resolveManualAnchorId","MAX_MEASURED_HOSTS","MEASURE_TIMEOUT_MS","createElementConditionEvaluator","warn","message","__DEV__","console","warnedConditionIds","Set","warnOnce","conditionId","has","add","condition","report","context","elementState","trackPresence","trackClick","id","generation","reportedGeneration","measuring","changedWhileMeasuring","disposed","evaluate","gen","resolution","resolveElementTargets","selector","status","silent","warnUnknown","measureVisibility","targets","catch","then","visibility","present","unsubscribe","anchorChangeTicker","subscribe","clickSelectorUsable","valueWhenOccurred","previousIsTrue","latched","stopWatchingResolution","type","reportUnclickedOnceResolvable","subscription","elementTapMonitor","tap","tapMayHitSelector","matched","find","target","fiber","fiberIsUnder","targetFiber","tapPathDisabled","immediate","decodeMobileAutoData","autoData","fingerprint","resolveManualAnchorId","css","slice","measured","Promise","all","map","measureHost","some","size","width","height","includes","length","resolve","settled","finish","value","clearTimeout","timer","setTimeout","host","measureInWindow","_x","_y"],"sourceRoot":"../../../src","sources":["anchors/elementConditionEvaluator.ts"],"mappings":";;;;;;AAKA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IA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G,MAAMC,OAAO,CAACC,GAAG,CAACH,KAAK,CAACI,GAAG,CAACC,WAAW,CAAC,CAAC;EAC1D,IAAIJ,QAAQ,CAACK,IAAI,CAAEC,IAAI,IAAKA,IAAI,KAAK,SAAS,IAAIA,IAAI,CAACC,KAAK,GAAG,CAAC,IAAID,IAAI,CAACE,MAAM,GAAG,CAAC,CAAC,EAAE;IACpF,OAAO,SAAS;EAClB;EACA,IAAIR,QAAQ,CAACS,QAAQ,CAAC,SAAS,CAAC,IAAI1C,OAAO,CAAC2C,MAAM,GAAGX,KAAK,CAACW,MAAM,EAAE,OAAO,SAAS;EACnF,OAAO,QAAQ;AACjB;AAEA,SAASN,WAAWA,CAClBhB,MAAqB,EACmC;EACxD,OAAO,IAAIa,OAAO,CAAEU,OAAO,IAAK;IAC9B,IAAIC,OAAO,GAAG,KAAK;IACnB,MAAMC,MAAM,GAAIC,KAAoD,IAAW;MAC7E,IAAIF,OAAO,EAAE;MACbA,OAAO,GAAG,IAAI;MACdG,YAAY,CAACC,KAAK,CAAC;MACnBL,OAAO,CAACG,KAAK,CAAC;IAChB,CAAC;IACD,MAAME,KAAK,GAAGC,UAAU,CAAC,MAAMJ,MAAM,CAAC,SAAS,CAAC,EAAE/E,kBAAkB,CAAC;IACrE,IAAI;MACFsD,MAAM,CAAC8B,IAAI,CAACC,eAAe,CAAC,CAACC,EAAE,EAAEC,EAAE,EAAEd,KAAK,EAAEC,MAAM,KAAK;QACrDK,MAAM,CAAC;UAAEN,KAAK;UAAEC;QAAO,CAAC,CAAC;MAC3B,CAAC,CAAC;IACJ,CAAC,CAAC,MAAM;MACNK,MAAM,CAAC,SAAS,CAAC;IACnB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.elementTapMonitor = exports.ElementTapMonitor = void 0;
|
|
7
|
+
var _targetPressMonitor = require("./targetPressMonitor.js");
|
|
8
|
+
/**
|
|
9
|
+
* Pass-through tap observation for ELEMENT CLICK / NOT_CLICK conditions.
|
|
10
|
+
*
|
|
11
|
+
* Many conditions can subscribe at once. Touch start/end are paired per finger
|
|
12
|
+
* and a tap is emitted only when movement stays within the same slop the
|
|
13
|
+
* tooltip target-press monitor uses. The host fiber is the one captured at
|
|
14
|
+
* touch start, before the press's setState commits a new tree.
|
|
15
|
+
*
|
|
16
|
+
* With no subscribers the monitor stores nothing, so the bridge can skip the
|
|
17
|
+
* fiber lookup entirely.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
class ElementTapMonitor {
|
|
21
|
+
listeners = new Set();
|
|
22
|
+
touchStarts = new Map();
|
|
23
|
+
get subscriberCount() {
|
|
24
|
+
return this.listeners.size;
|
|
25
|
+
}
|
|
26
|
+
subscribe(listener) {
|
|
27
|
+
this.listeners.add(listener);
|
|
28
|
+
return () => {
|
|
29
|
+
this.listeners.delete(listener);
|
|
30
|
+
if (this.listeners.size === 0) {
|
|
31
|
+
this.touchStarts.clear();
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
handleTouchStart(identifier, pageX, pageY, targetFiber) {
|
|
36
|
+
if (this.listeners.size === 0) {
|
|
37
|
+
this.touchStarts.clear();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
this.touchStarts.set(identifier, {
|
|
41
|
+
pageX,
|
|
42
|
+
pageY,
|
|
43
|
+
targetFiber
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Emit a tap when this finger started and ended within slop on a resolved
|
|
49
|
+
* host. Never claims the responder.
|
|
50
|
+
*/
|
|
51
|
+
handleTouchEnd(identifier, pageX, pageY) {
|
|
52
|
+
const start = this.touchStarts.get(identifier) ?? null;
|
|
53
|
+
this.touchStarts.delete(identifier);
|
|
54
|
+
if (!start || this.listeners.size === 0 || !start.targetFiber) return;
|
|
55
|
+
if (!(0, _targetPressMonitor.withinTapSlop)(start, {
|
|
56
|
+
pageX,
|
|
57
|
+
pageY
|
|
58
|
+
})) return;
|
|
59
|
+
const tap = {
|
|
60
|
+
targetFiber: start.targetFiber
|
|
61
|
+
};
|
|
62
|
+
for (const listener of this.listeners) {
|
|
63
|
+
// One condition's failure must not cost the others this tap, or abort
|
|
64
|
+
// the bridge's handling of the event's remaining touches.
|
|
65
|
+
try {
|
|
66
|
+
listener(tap);
|
|
67
|
+
} catch {
|
|
68
|
+
// The condition stays at its current value.
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** Drop in-progress gesture(s). Omit `identifier` to clear every finger. */
|
|
74
|
+
cancelTouch(identifier) {
|
|
75
|
+
if (identifier == null) {
|
|
76
|
+
this.touchStarts.clear();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
this.touchStarts.delete(identifier);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** Test helper. */
|
|
83
|
+
resetForTests() {
|
|
84
|
+
this.listeners.clear();
|
|
85
|
+
this.touchStarts.clear();
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Shared singleton used by TargetPressBridge and the element-condition evaluator. */
|
|
90
|
+
exports.ElementTapMonitor = ElementTapMonitor;
|
|
91
|
+
const elementTapMonitor = exports.elementTapMonitor = new ElementTapMonitor();
|
|
92
|
+
//# sourceMappingURL=elementTapMonitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_targetPressMonitor","require","ElementTapMonitor","listeners","Set","touchStarts","Map","subscriberCount","size","subscribe","listener","add","delete","clear","handleTouchStart","identifier","pageX","pageY","targetFiber","set","handleTouchEnd","start","get","withinTapSlop","tap","cancelTouch","resetForTests","exports","elementTapMonitor"],"sourceRoot":"../../../src","sources":["anchors/elementTapMonitor.ts"],"mappings":";;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AE;IAC/D,IAAI,CAAC,IAAAK,iCAAa,EAACF,KAAK,EAAE;MAAEL,KAAK;MAAEC;IAAM,CAAC,CAAC,EAAE;IAE7C,MAAMO,GAAe,GAAG;MAAEN,WAAW,EAAEG,KAAK,CAACH;IAAY,CAAC;IAC1D,KAAK,MAAMR,QAAQ,IAAI,IAAI,CAACP,SAAS,EAAE;MACrC;MACA;MACA,IAAI;QACFO,QAAQ,CAACc,GAAG,CAAC;MACf,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ;EACF;;EAEA;EACAC,WAAWA,CAACV,UAA4B,EAAQ;IAC9C,IAAIA,UAAU,IAAI,IAAI,EAAE;MACtB,IAAI,CAACV,WAAW,CAACQ,KAAK,CAAC,CAAC;MACxB;IACF;IACA,IAAI,CAACR,WAAW,CAACO,MAAM,CAACG,UAAU,CAAC;EACrC;;EAEA;EACAW,aAAaA,CAAA,EAAS;IACpB,IAAI,CAACvB,SAAS,CAACU,KAAK,CAAC,CAAC;IACtB,IAAI,CAACR,WAAW,CAACQ,KAAK,CAAC,CAAC;EAC1B;AACF;;AAEA;AAAAc,OAAA,CAAAzB,iBAAA,GAAAA,iBAAA;AACO,MAAM0B,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,GAAG,IAAI1B,iBAAiB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.anchorIdsAboveTap = anchorIdsAboveTap;
|
|
7
|
+
exports.fiberIsUnder = fiberIsUnder;
|
|
8
|
+
exports.sameFiber = sameFiber;
|
|
9
|
+
exports.tapPathDisabled = tapPathDisabled;
|
|
10
|
+
var _fiberInternals = require("./fiber/fiberInternals.js");
|
|
11
|
+
var _findAnchorFiber = require("./fiber/findAnchorFiber.js");
|
|
12
|
+
/**
|
|
13
|
+
* Compare a touch-start fiber with a host resolved later, tolerating the
|
|
14
|
+
* alternate swap a Pressable `pressed` re-render does mid-gesture.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const anchorIdsByTap = new WeakMap();
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Anchor ids on the tapped fiber and its ancestors, built once per tap and
|
|
21
|
+
* shared by every click condition it is delivered to.
|
|
22
|
+
*/
|
|
23
|
+
function anchorIdsAboveTap(tap) {
|
|
24
|
+
const cached = anchorIdsByTap.get(tap);
|
|
25
|
+
if (cached) return cached;
|
|
26
|
+
const ids = new Set();
|
|
27
|
+
let current = tap.targetFiber;
|
|
28
|
+
for (let depth = 0; current && depth < _fiberInternals.MAX_ANCESTOR_WALK; depth += 1) {
|
|
29
|
+
const props = (0, _fiberInternals.getMemoizedProps)(current);
|
|
30
|
+
if (props) {
|
|
31
|
+
for (const tier of _findAnchorFiber.ANCHOR_PROP_TIERS) {
|
|
32
|
+
const value = props[tier];
|
|
33
|
+
if (typeof value === 'string') ids.add(value);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
current = (0, _fiberInternals.getReturn)(current);
|
|
37
|
+
}
|
|
38
|
+
anchorIdsByTap.set(tap, ids);
|
|
39
|
+
return ids;
|
|
40
|
+
}
|
|
41
|
+
function sameFiber(a, b) {
|
|
42
|
+
if (a == null || b == null) return false;
|
|
43
|
+
if (a === b) return true;
|
|
44
|
+
const aAlt = (0, _fiberInternals.getAlternate)(a);
|
|
45
|
+
const bAlt = (0, _fiberInternals.getAlternate)(b);
|
|
46
|
+
return a === bAlt || aAlt === b || aAlt != null && aAlt === bAlt;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** True when `node` is `host` or a descendant of it. */
|
|
50
|
+
function fiberIsUnder(node, host) {
|
|
51
|
+
let current = node;
|
|
52
|
+
for (let depth = 0; current && depth < _fiberInternals.MAX_ANCESTOR_WALK; depth += 1) {
|
|
53
|
+
if (sameFiber(current, host)) return true;
|
|
54
|
+
current = (0, _fiberInternals.getReturn)(current);
|
|
55
|
+
}
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
function fiberDisabled(fiber) {
|
|
59
|
+
let props;
|
|
60
|
+
try {
|
|
61
|
+
props = (0, _fiberInternals.getLiveHostProps)(fiber);
|
|
62
|
+
} catch {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
if (!props) return false;
|
|
66
|
+
if (props.disabled === true) return true;
|
|
67
|
+
if (props['aria-disabled'] === true) return true;
|
|
68
|
+
const state = props.accessibilityState;
|
|
69
|
+
return typeof state === 'object' && state !== null && state.disabled === true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* True when the tapped fiber, the matched host, or a fiber between them is
|
|
74
|
+
* disabled. Browsers do not fire `click` on a disabled control.
|
|
75
|
+
*/
|
|
76
|
+
function tapPathDisabled(tapped, host) {
|
|
77
|
+
let current = tapped;
|
|
78
|
+
for (let depth = 0; current && depth < _fiberInternals.MAX_ANCESTOR_WALK; depth += 1) {
|
|
79
|
+
if (fiberDisabled(current)) return true;
|
|
80
|
+
if (sameFiber(current, host)) return false;
|
|
81
|
+
current = (0, _fiberInternals.getReturn)(current);
|
|
82
|
+
}
|
|
83
|
+
return fiberDisabled(host);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=elementTargetMatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_fiberInternals","require","_findAnchorFiber","anchorIdsByTap","WeakMap","anchorIdsAboveTap","tap","cached","get","ids","Set","current","targetFiber","depth","MAX_ANCESTOR_WALK","props","getMemoizedProps","tier","ANCHOR_PROP_TIERS","value","add","getReturn","set","sameFiber","a","b","aAlt","getAlternate","bAlt","fiberIsUnder","node","host","fiberDisabled","fiber","getLiveHostProps","disabled","state","accessibilityState","tapPathDisabled","tapped"],"sourceRoot":"../../../src","sources":["anchors/elementTargetMatch.ts"],"mappings":";;;;;;;;;AAKA,IAAAA,eAAA,G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SAAS,CAACZ,OAAO,EAAEoB,IAAI,CAAC,EAAE,OAAO,KAAK;IAC1CpB,OAAO,GAAG,IAAAU,yBAAS,EAACV,OAAO,CAAC;EAC9B;EACA,OAAOqB,aAAa,CAACD,IAAI,CAAC;AAC5B","ignoreList":[]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.fiberPathFromHost = fiberPathFromHost;
|
|
7
|
+
var _fiberInternals = require("./fiberInternals.js");
|
|
8
|
+
var _readHostContent = require("./readHostContent.js");
|
|
9
|
+
/**
|
|
10
|
+
* Capture a release-stable fiber path for a host the Babel plugin never
|
|
11
|
+
* registered. `hostKind` and ids survive minification; `displayName` is only
|
|
12
|
+
* a tiebreaker at resolve time.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const SCREEN_TYPES = new Set(['RNSScreen', 'RNSModalScreen']);
|
|
16
|
+
function stringProp(value) {
|
|
17
|
+
return typeof value === 'string' && value.trim() ? value.trim() : undefined;
|
|
18
|
+
}
|
|
19
|
+
function displayNameOf(fiber) {
|
|
20
|
+
const type = fiber?.type;
|
|
21
|
+
if (typeof type === 'string') return type;
|
|
22
|
+
if (type && typeof type === 'object') {
|
|
23
|
+
const named = type;
|
|
24
|
+
if (typeof named.displayName === 'string' && named.displayName) return named.displayName;
|
|
25
|
+
if (typeof named.name === 'string' && named.name) return named.name;
|
|
26
|
+
}
|
|
27
|
+
if (typeof type === 'function') {
|
|
28
|
+
const named = type;
|
|
29
|
+
return named.displayName || named.name || 'Component';
|
|
30
|
+
}
|
|
31
|
+
return 'Unknown';
|
|
32
|
+
}
|
|
33
|
+
function hostSiblingIndex(fiber) {
|
|
34
|
+
const parent = (0, _fiberInternals.getReturn)(fiber);
|
|
35
|
+
if (!parent) return 0;
|
|
36
|
+
let index = 0;
|
|
37
|
+
let child = parent.child;
|
|
38
|
+
let guard = 0;
|
|
39
|
+
while (child && guard < 500) {
|
|
40
|
+
if (child === fiber) return index;
|
|
41
|
+
if ((0, _fiberInternals.isHostFiber)(child)) index += 1;
|
|
42
|
+
child = (0, _fiberInternals.getSibling)(child);
|
|
43
|
+
guard += 1;
|
|
44
|
+
}
|
|
45
|
+
return 0;
|
|
46
|
+
}
|
|
47
|
+
function segmentFor(fiber) {
|
|
48
|
+
const hostKind = (0, _fiberInternals.getHostTypeName)(fiber);
|
|
49
|
+
const props = (0, _fiberInternals.getLiveHostProps)(fiber);
|
|
50
|
+
const testID = stringProp(props?.testID);
|
|
51
|
+
const accessibilityLabel = stringProp(props?.accessibilityLabel) ?? stringProp(props?.['aria-label']);
|
|
52
|
+
const role = stringProp(props?.accessibilityRole) ?? stringProp(props?.role);
|
|
53
|
+
const key = stringProp(fiber?.key);
|
|
54
|
+
let text;
|
|
55
|
+
try {
|
|
56
|
+
text = (0, _readHostContent.readHostText)(fiber, 1);
|
|
57
|
+
} catch {
|
|
58
|
+
text = undefined;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
displayName: displayNameOf(fiber),
|
|
62
|
+
...(hostKind ? {
|
|
63
|
+
hostKind
|
|
64
|
+
} : {}),
|
|
65
|
+
...(role ? {
|
|
66
|
+
role
|
|
67
|
+
} : {}),
|
|
68
|
+
siblingIndex: hostSiblingIndex(fiber),
|
|
69
|
+
...(key ? {
|
|
70
|
+
key
|
|
71
|
+
} : {}),
|
|
72
|
+
...(text ? {
|
|
73
|
+
text
|
|
74
|
+
} : {}),
|
|
75
|
+
...(testID ? {
|
|
76
|
+
testID
|
|
77
|
+
} : {}),
|
|
78
|
+
...(accessibilityLabel ? {
|
|
79
|
+
accessibilityLabel
|
|
80
|
+
} : {})
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Root → leaf path from the enclosing screen (or the walk root) down to `host`.
|
|
86
|
+
*/
|
|
87
|
+
function fiberPathFromHost(host) {
|
|
88
|
+
if (!host || !(0, _fiberInternals.isHostFiber)(host)) return null;
|
|
89
|
+
const hosts = [];
|
|
90
|
+
let screen = null;
|
|
91
|
+
let current = host;
|
|
92
|
+
for (let depth = 0; current && depth < _fiberInternals.MAX_ANCESTOR_WALK; depth += 1) {
|
|
93
|
+
if ((0, _fiberInternals.isHostFiber)(current)) hosts.push(current);
|
|
94
|
+
const type = (0, _fiberInternals.getHostTypeName)(current);
|
|
95
|
+
if (type && SCREEN_TYPES.has(type)) {
|
|
96
|
+
screen = current;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
current = (0, _fiberInternals.getReturn)(current);
|
|
100
|
+
}
|
|
101
|
+
hosts.reverse();
|
|
102
|
+
if (hosts.length === 0) return null;
|
|
103
|
+
const leaf = hosts[hosts.length - 1];
|
|
104
|
+
let leafText;
|
|
105
|
+
try {
|
|
106
|
+
leafText = (0, _readHostContent.readHostText)(leaf);
|
|
107
|
+
} catch {
|
|
108
|
+
leafText = undefined;
|
|
109
|
+
}
|
|
110
|
+
const root = screen ?? hosts[0];
|
|
111
|
+
return {
|
|
112
|
+
...(displayNameOf(root) ? {
|
|
113
|
+
rootDisplayName: displayNameOf(root)
|
|
114
|
+
} : {}),
|
|
115
|
+
...(leafText ? {
|
|
116
|
+
leafText
|
|
117
|
+
} : {}),
|
|
118
|
+
leafKind: (0, _fiberInternals.getHostTypeName)(leaf) ?? 'View',
|
|
119
|
+
segments: hosts.map(segmentFor)
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=fiberPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_fiberInternals","require","_readHostContent","SCREEN_TYPES","Set","stringProp","value","trim","undefined","displayNameOf","fiber","type","named","displayName","name","hostSiblingIndex","parent","getReturn","index","child","guard","isHostFiber","getSibling","segmentFor","hostKind","getHostTypeName","props","getLiveHostProps","testID","accessibilityLabel","role","accessibilityRole","key","text","readHostText","siblingIndex","fiberPathFromHost","host","hosts","screen","current","depth","MAX_ANCESTOR_WALK","push","has","reverse","length","leaf","leafText","root","rootDisplayName","leafKind","segments","map"],"sourceRoot":"../../../../src","sources":["anchors/fiber/fiberPath.ts"],"mappings":";;;;;;AAOA,IAAAA,eAAA,GAAAC,OAAA;AASA,IAAAC,gBAAA,GAAAD,OAAA;AAhBA;AACA;AACA;AACA;AACA;;AAcA,MAAME,YAAY,GAAG,IAAIC,GAAG,CAAC,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;AAE7D,SAASC,UAAUA,CAACC,KAAc,EAAsB;EACtD,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACC,IAAI,CAAC,CAAC,GAAGD,KAAK,CAACC,IAAI,CAAC,CAAC,GAAGC,SAAS;AAC7E;AAEA,SAASC,aAAaA,CAACC,KAAe,EAAU;EAC9C,MAAMC,IAAI,GAAGD,KAAK,EAAEC,IAAI;EACxB,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE,OAAOA,IAAI;EACzC,IAAIA,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IACpC,MAAMC,KAAK,GAAGD,IAAiD;IAC/D,IAAI,OAAOC,KAAK,CAACC,WAAW,KAAK,QAAQ,IAAID,KAAK,CAACC,WAAW,EAAE,OAAOD,KAAK,CAACC,WAAW;IACxF,IAAI,OAAOD,KAAK,CAACE,IAAI,KAAK,QAAQ,IAAIF,KAAK,CAACE,IAAI,EAAE,OAAOF,KAAK,CAACE,IAAI;EACrE;EACA,IAAI,OAAOH,IAAI,KAAK,UAAU,EAAE;IAC9B,MAAMC,KAAK,GAAGD,IAA+C;IAC7D,OAAOC,KAAK,CAACC,WAAW,IAAID,KAAK,CAACE,IAAI,IAAI,WAAW;EACvD;EACA,OAAO,SAAS;AAClB;AAEA,SAASC,gBAAgBA,CAACL,KAAe,EAAU;EACjD,MAAMM,MAAM,GAAG,IAAAC,yBAAS,EAACP,KAAK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