@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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Calls into the public SDK without importing the facade (that would cycle). */
|
|
2
|
+
export interface EvalJsBridgeHandlers {
|
|
3
|
+
track(name: string, attributes?: Record<string, unknown>): void;
|
|
4
|
+
updateUser(attributes: Record<string, unknown>): void;
|
|
5
|
+
updateGroup(
|
|
6
|
+
attributes: Record<string, unknown>,
|
|
7
|
+
options?: { membership?: Record<string, unknown> },
|
|
8
|
+
): void;
|
|
9
|
+
openUrl(url: string): void;
|
|
10
|
+
/** End the current flow session if it is one of `sessionIds` (the scripts in this WebView). */
|
|
11
|
+
endFlow(sessionIds: ReadonlySet<string>): void;
|
|
12
|
+
warn(message: string): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const noopHandlers: EvalJsBridgeHandlers = {
|
|
16
|
+
track: () => undefined,
|
|
17
|
+
updateUser: () => undefined,
|
|
18
|
+
updateGroup: () => undefined,
|
|
19
|
+
openUrl: () => undefined,
|
|
20
|
+
endFlow: () => undefined,
|
|
21
|
+
warn: (message) => {
|
|
22
|
+
console.warn(message);
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
let handlers: EvalJsBridgeHandlers = noopHandlers;
|
|
27
|
+
|
|
28
|
+
export function setEvalJsBridgeHandlers(next: EvalJsBridgeHandlers | null): void {
|
|
29
|
+
handlers = next ?? noopHandlers;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function getEvalJsBridgeHandlers(): EvalJsBridgeHandlers {
|
|
33
|
+
return handlers;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function formatEvalJsError(message: string, code?: string): string {
|
|
37
|
+
return (
|
|
38
|
+
`Userflow: Evaluate JavaScript action failed.\n\n` +
|
|
39
|
+
`Error:\n${message}\n\n` +
|
|
40
|
+
`Code:\n${code ?? ''}`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import type { EvalJsEnqueueRequest, EvalJsLayout, EvalJsSnapshot } from './types';
|
|
2
|
+
|
|
3
|
+
const HIDDEN: EvalJsLayout = { mode: 'hidden' };
|
|
4
|
+
|
|
5
|
+
type Listener = () => void;
|
|
6
|
+
|
|
7
|
+
let generation = 0;
|
|
8
|
+
let active = false;
|
|
9
|
+
let pending: string[] = [];
|
|
10
|
+
/** Sessions whose scripts ran in the current WebView; `endFlow` may only end one of these. */
|
|
11
|
+
let sessionIds = new Set<string>();
|
|
12
|
+
let layout: EvalJsLayout = HIDDEN;
|
|
13
|
+
let host: Record<string, unknown> = {};
|
|
14
|
+
let bannerOwnsWebView = false;
|
|
15
|
+
const listeners = new Set<Listener>();
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Cached for `useSyncExternalStore`: React re-renders forever if getSnapshot
|
|
19
|
+
* returns a new object while nothing changed.
|
|
20
|
+
*/
|
|
21
|
+
let currentSnapshot: EvalJsSnapshot = {
|
|
22
|
+
active,
|
|
23
|
+
generation,
|
|
24
|
+
pendingCount: 0,
|
|
25
|
+
layout,
|
|
26
|
+
host,
|
|
27
|
+
bannerOwnsWebView,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function emit(): void {
|
|
31
|
+
currentSnapshot = {
|
|
32
|
+
active,
|
|
33
|
+
generation,
|
|
34
|
+
pendingCount: pending.length,
|
|
35
|
+
layout,
|
|
36
|
+
host,
|
|
37
|
+
bannerOwnsWebView,
|
|
38
|
+
};
|
|
39
|
+
for (const listener of listeners) {
|
|
40
|
+
listener();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const evalJsController = {
|
|
45
|
+
subscribe(listener: Listener): () => void {
|
|
46
|
+
listeners.add(listener);
|
|
47
|
+
return () => {
|
|
48
|
+
listeners.delete(listener);
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
getSnapshot(): EvalJsSnapshot {
|
|
53
|
+
return currentSnapshot;
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
enqueue(request: EvalJsEnqueueRequest): void {
|
|
57
|
+
if (!request.code) return;
|
|
58
|
+
pending = [...pending, request.code];
|
|
59
|
+
sessionIds.add(request.sessionId);
|
|
60
|
+
active = true;
|
|
61
|
+
emit();
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
sessionIds(): ReadonlySet<string> {
|
|
65
|
+
return new Set(sessionIds);
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
/** Codes waiting to be injected. Clears the queue. */
|
|
69
|
+
consumePending(): string[] {
|
|
70
|
+
if (pending.length === 0) return [];
|
|
71
|
+
const codes = pending;
|
|
72
|
+
pending = [];
|
|
73
|
+
emit();
|
|
74
|
+
return codes;
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
setLayout(next: EvalJsLayout): void {
|
|
78
|
+
layout = next;
|
|
79
|
+
emit();
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
/** App-supplied values exposed as `userflowContext.host`. Survives reset. */
|
|
83
|
+
setHostContext(values: Record<string, unknown>): void {
|
|
84
|
+
host = { ...values };
|
|
85
|
+
emit();
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
/** Custom banner WebView is the sole eval page (no overlay EvalJsHost). */
|
|
89
|
+
setBannerOwnsWebView(owns: boolean): void {
|
|
90
|
+
bannerOwnsWebView = owns;
|
|
91
|
+
emit();
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Destroy the shared WebView and drop queued code. Host context stays so the
|
|
96
|
+
* next script still sees language / tab-bar height the app provided.
|
|
97
|
+
*/
|
|
98
|
+
reset(): void {
|
|
99
|
+
generation += 1;
|
|
100
|
+
active = false;
|
|
101
|
+
pending = [];
|
|
102
|
+
sessionIds = new Set();
|
|
103
|
+
layout = HIDDEN;
|
|
104
|
+
bannerOwnsWebView = false;
|
|
105
|
+
emit();
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export function resetEvalJsControllerForTests(): void {
|
|
111
|
+
generation = 0;
|
|
112
|
+
active = false;
|
|
113
|
+
pending = [];
|
|
114
|
+
sessionIds = new Set();
|
|
115
|
+
layout = HIDDEN;
|
|
116
|
+
host = {};
|
|
117
|
+
bannerOwnsWebView = false;
|
|
118
|
+
listeners.clear();
|
|
119
|
+
currentSnapshot = {
|
|
120
|
+
active,
|
|
121
|
+
generation,
|
|
122
|
+
pendingCount: 0,
|
|
123
|
+
layout,
|
|
124
|
+
host,
|
|
125
|
+
bannerOwnsWebView,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type { ComponentType, Ref } from 'react';
|
|
2
|
+
import { NativeModules, TurboModuleRegistry } from 'react-native';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Minimal surface of `react-native-webview` this spike uses.
|
|
6
|
+
* Defined locally so the package root never statically imports the optional peer.
|
|
7
|
+
*/
|
|
8
|
+
export interface EvalJsWebViewHandle {
|
|
9
|
+
injectJavaScript(script: string): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface EvalJsShouldStartRequest {
|
|
13
|
+
url: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface EvalJsWebViewProps {
|
|
17
|
+
source: { html: string; baseUrl?: string };
|
|
18
|
+
style?: object;
|
|
19
|
+
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only';
|
|
20
|
+
originWhitelist?: string[];
|
|
21
|
+
javaScriptEnabled?: boolean;
|
|
22
|
+
domStorageEnabled?: boolean;
|
|
23
|
+
scrollEnabled?: boolean;
|
|
24
|
+
bounces?: boolean;
|
|
25
|
+
showsHorizontalScrollIndicator?: boolean;
|
|
26
|
+
showsVerticalScrollIndicator?: boolean;
|
|
27
|
+
mediaPlaybackRequiresUserAction?: boolean;
|
|
28
|
+
allowsInlineMediaPlayback?: boolean;
|
|
29
|
+
setSupportMultipleWindows?: boolean;
|
|
30
|
+
webviewDebuggingEnabled?: boolean;
|
|
31
|
+
androidLayerType?: 'none' | 'software' | 'hardware';
|
|
32
|
+
onMessage?: (event: { nativeEvent: { data?: string } }) => void;
|
|
33
|
+
onLoadEnd?: () => void;
|
|
34
|
+
onShouldStartLoadWithRequest?: (request: EvalJsShouldStartRequest) => boolean;
|
|
35
|
+
onOpenWindow?: (event: { nativeEvent: { targetUrl?: string } }) => void;
|
|
36
|
+
onError?: (event: { nativeEvent: { description?: string } }) => void;
|
|
37
|
+
ref?: Ref<EvalJsWebViewHandle>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type EvalJsWebViewComponent = ComponentType<EvalJsWebViewProps>;
|
|
41
|
+
|
|
42
|
+
let cached: EvalJsWebViewComponent | null | undefined;
|
|
43
|
+
let warnedMissing = false;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* True when the native `react-native-webview` binary is linked. Do not
|
|
47
|
+
* `require('react-native-webview')` before this passes — the JS entry calls
|
|
48
|
+
* `TurboModuleRegistry.getEnforcing('RNCWebViewModule')` and can red-screen.
|
|
49
|
+
*/
|
|
50
|
+
export function isEvalJsWebViewNativeLinked(): boolean {
|
|
51
|
+
try {
|
|
52
|
+
if (typeof TurboModuleRegistry?.get === 'function') {
|
|
53
|
+
if (TurboModuleRegistry.get('RNCWebViewModule') != null) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const legacy = NativeModules.RNCWebViewModule as unknown;
|
|
58
|
+
return legacy != null;
|
|
59
|
+
} catch {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Lazy `require('react-native-webview')`, cached. Returns null when the package
|
|
66
|
+
* or native module is missing so Evaluate JavaScript can no-op instead of crashing.
|
|
67
|
+
*/
|
|
68
|
+
export function getEvalJsWebView(): EvalJsWebViewComponent | null {
|
|
69
|
+
if (cached !== undefined) return cached;
|
|
70
|
+
|
|
71
|
+
if (typeof require !== 'function') {
|
|
72
|
+
cached = null;
|
|
73
|
+
warnMissing('unavailable');
|
|
74
|
+
return cached;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (!isEvalJsWebViewNativeLinked()) {
|
|
78
|
+
cached = null;
|
|
79
|
+
warnMissing('native');
|
|
80
|
+
return cached;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- peer probe
|
|
85
|
+
const mod = require('react-native-webview') as {
|
|
86
|
+
WebView?: EvalJsWebViewComponent;
|
|
87
|
+
default?: EvalJsWebViewComponent;
|
|
88
|
+
};
|
|
89
|
+
const component = mod?.WebView ?? mod?.default;
|
|
90
|
+
cached = component != null ? component : null;
|
|
91
|
+
} catch {
|
|
92
|
+
cached = null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (cached == null) {
|
|
96
|
+
warnMissing('js');
|
|
97
|
+
}
|
|
98
|
+
return cached;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function warnMissing(reason: 'native' | 'js' | 'unavailable'): void {
|
|
102
|
+
if (warnedMissing) return;
|
|
103
|
+
warnedMissing = true;
|
|
104
|
+
if (reason === 'native') {
|
|
105
|
+
console.warn(
|
|
106
|
+
'Userflow: react-native-webview is listed in package.json but RNCWebViewModule is not in ' +
|
|
107
|
+
'this native build. Run npx expo install react-native-webview (or npm install), then ' +
|
|
108
|
+
'rebuild the dev client (expo prebuild + run:ios / run:android — not Expo Go). ' +
|
|
109
|
+
'Evaluate JavaScript and WebView banners will not run until then.',
|
|
110
|
+
);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
console.warn(
|
|
114
|
+
'Userflow: Evaluate JavaScript requires react-native-webview. Install it in your app ' +
|
|
115
|
+
'(e.g. npx expo install react-native-webview), rebuild the native app, then retry. ' +
|
|
116
|
+
'The action was skipped.',
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** @internal */
|
|
121
|
+
export function resetEvalJsWebViewCacheForTests(): void {
|
|
122
|
+
cached = undefined;
|
|
123
|
+
warnedMissing = false;
|
|
124
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { wrapCode } from './bootstrap';
|
|
2
|
+
import { evalJsController } from './evalJsController';
|
|
3
|
+
import type { EvalJsWebViewHandle } from './getWebView';
|
|
4
|
+
|
|
5
|
+
/** Inject queued Evaluate JavaScript into a WebView (same document as the banner). */
|
|
6
|
+
export function injectEvalPendingIntoWebView(view: EvalJsWebViewHandle | null | undefined): void {
|
|
7
|
+
if (!view) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const codes = evalJsController.consumePending();
|
|
11
|
+
for (const code of codes) {
|
|
12
|
+
view.injectJavaScript(wrapCode(code));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/** Layout the customer script asks the SDK overlay to use. */
|
|
2
|
+
export type EvalJsLayoutMode = 'hidden' | 'fullscreen' | 'fitted';
|
|
3
|
+
|
|
4
|
+
export interface EvalJsRect {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface EvalJsLayout {
|
|
12
|
+
mode: EvalJsLayoutMode;
|
|
13
|
+
rect?: EvalJsRect;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Mirrors the core `onEvalJs` request. Kept local so this package does not import engine internals. */
|
|
17
|
+
export interface EvalJsEnqueueRequest {
|
|
18
|
+
code: string;
|
|
19
|
+
sessionId: string;
|
|
20
|
+
flowId: string;
|
|
21
|
+
draftMode: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface EvalJsScreen {
|
|
25
|
+
name?: string;
|
|
26
|
+
path?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface EvalJsSafeAreaInsets {
|
|
30
|
+
top: number;
|
|
31
|
+
right: number;
|
|
32
|
+
bottom: number;
|
|
33
|
+
left: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Snapshot injected as `window.userflowContext`. */
|
|
37
|
+
export interface EvalJsContext {
|
|
38
|
+
platform: string;
|
|
39
|
+
colorScheme: 'light' | 'dark';
|
|
40
|
+
safeAreaInsets: EvalJsSafeAreaInsets;
|
|
41
|
+
viewport: { width: number; height: number };
|
|
42
|
+
screen: EvalJsScreen;
|
|
43
|
+
host: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface EvalJsSnapshot {
|
|
47
|
+
/** When false the WebView is unmounted. */
|
|
48
|
+
active: boolean;
|
|
49
|
+
/** Bumped on reset so a late message from a torn-down page is ignored. */
|
|
50
|
+
generation: number;
|
|
51
|
+
pendingCount: number;
|
|
52
|
+
layout: EvalJsLayout;
|
|
53
|
+
host: Record<string, unknown>;
|
|
54
|
+
/** Custom banner WebView owns eval injection; overlay EvalJsHost stays unmounted. */
|
|
55
|
+
bannerOwnsWebView: boolean;
|
|
56
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import { contextUpdateScript, wrapCode } from './bootstrap';
|
|
4
|
+
import { evalJsController } from './evalJsController';
|
|
5
|
+
import type { EvalJsWebViewHandle } from './getWebView';
|
|
6
|
+
import type { EvalJsContext } from './types';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Keeps `userflowContext` fresh and drains the eval-js queue into one WebView.
|
|
10
|
+
*/
|
|
11
|
+
export function useEvalJsWebViewInjection(
|
|
12
|
+
webRef: React.RefObject<EvalJsWebViewHandle | null>,
|
|
13
|
+
options: { pageReady: boolean; context: EvalJsContext; pendingCount: number },
|
|
14
|
+
): void {
|
|
15
|
+
const { pageReady, context, pendingCount } = options;
|
|
16
|
+
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
if (!pageReady) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
webRef.current?.injectJavaScript(contextUpdateScript(context));
|
|
22
|
+
}, [context, pageReady, webRef]);
|
|
23
|
+
|
|
24
|
+
React.useEffect(() => {
|
|
25
|
+
if (!pageReady) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const view = webRef.current;
|
|
29
|
+
if (!view) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const codes = evalJsController.consumePending();
|
|
33
|
+
for (const code of codes) {
|
|
34
|
+
view.injectJavaScript(wrapCode(code));
|
|
35
|
+
}
|
|
36
|
+
}, [pageReady, pendingCount, webRef]);
|
|
37
|
+
}
|
package/src/expo-router/index.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
export { useUserflowExpoRouter } from './useUserflowExpoRouter';
|
|
2
2
|
export { UserflowExpoRouterScreenTracker } from './UserflowExpoRouterScreenTracker';
|
|
3
|
+
export {
|
|
4
|
+
createRedirectSystemPath,
|
|
5
|
+
isUserflowLinkPath,
|
|
6
|
+
redirectSystemPath,
|
|
7
|
+
type CreateRedirectSystemPathOptions,
|
|
8
|
+
type RedirectSystemPath,
|
|
9
|
+
type RedirectSystemPathOptions,
|
|
10
|
+
} from './redirectSystemPath';
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { parsePreviewDeepLink } from '../deepLinking';
|
|
2
|
+
import { inspectPairingDeepLink, isPairingAttempt } from '../pairing/deepLink';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Arguments Expo Router passes to `redirectSystemPath` from `+native-intent`.
|
|
6
|
+
* @see https://docs.expo.dev/router/advanced/native-intent/
|
|
7
|
+
*/
|
|
8
|
+
export interface RedirectSystemPathOptions {
|
|
9
|
+
path: string;
|
|
10
|
+
initial: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type RedirectSystemPath = (
|
|
14
|
+
event: RedirectSystemPathOptions,
|
|
15
|
+
) => Promise<string | null> | string | null;
|
|
16
|
+
|
|
17
|
+
export interface CreateRedirectSystemPathOptions {
|
|
18
|
+
/**
|
|
19
|
+
* Optional host handler invoked when the path is not a Userflow deep link.
|
|
20
|
+
* Receives the same event Expo passed in; its return value is forwarded.
|
|
21
|
+
*/
|
|
22
|
+
next?: RedirectSystemPath;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* True when `path` is a full Userflow pairing or preview URL that Expo Router
|
|
27
|
+
* should not navigate to.
|
|
28
|
+
*
|
|
29
|
+
* Only full URLs are claimed. Expo Router passes the raw URL to
|
|
30
|
+
* `redirectSystemPath` for both the initial URL and later URL events, so a
|
|
31
|
+
* bare `?token=` or `?pairing_token=` must be left alone — it may belong to
|
|
32
|
+
* the host.
|
|
33
|
+
*/
|
|
34
|
+
export function isUserflowLinkPath(path: string): boolean {
|
|
35
|
+
if (typeof path !== 'string' || path.length === 0) return false;
|
|
36
|
+
if (!/^[a-z][a-z0-9+.-]*:/i.test(path)) return false;
|
|
37
|
+
|
|
38
|
+
const pairing = inspectPairingDeepLink(path);
|
|
39
|
+
if (pairing.ok || isPairingAttempt(pairing.reason)) return true;
|
|
40
|
+
return parsePreviewDeepLink(path) != null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Build a `redirectSystemPath` that yields Userflow links and otherwise
|
|
45
|
+
* forwards to `next` (or returns the path unchanged).
|
|
46
|
+
*/
|
|
47
|
+
export function createRedirectSystemPath(
|
|
48
|
+
options: CreateRedirectSystemPathOptions = {},
|
|
49
|
+
): RedirectSystemPath {
|
|
50
|
+
const { next } = options;
|
|
51
|
+
|
|
52
|
+
return (event) => {
|
|
53
|
+
try {
|
|
54
|
+
if (isUserflowLinkPath(event.path)) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
} catch {
|
|
58
|
+
// Expo warns that throwing here can crash the app. Fall through and let
|
|
59
|
+
// the router handle the original path.
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (next) {
|
|
63
|
+
return next(event);
|
|
64
|
+
}
|
|
65
|
+
return event.path;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Expo Router `redirectSystemPath` that swallows Userflow deep links.
|
|
71
|
+
*
|
|
72
|
+
* Returning `null` tells Expo Router to stay on the current path. The original
|
|
73
|
+
* URL remains available to React Native `Linking`, which the SDK already
|
|
74
|
+
* listens on.
|
|
75
|
+
*
|
|
76
|
+
* Mount from the host app:
|
|
77
|
+
*
|
|
78
|
+
* ```ts
|
|
79
|
+
* // app/+native-intent.ts
|
|
80
|
+
* export { redirectSystemPath } from '@userflow-tech/react-native/expo-router';
|
|
81
|
+
* ```
|
|
82
|
+
*
|
|
83
|
+
* Hosts that already export `redirectSystemPath` should wrap it with
|
|
84
|
+
* {@link createRedirectSystemPath}.
|
|
85
|
+
*/
|
|
86
|
+
export const redirectSystemPath: RedirectSystemPath = createRedirectSystemPath();
|
|
@@ -18,8 +18,8 @@ import { handleScreenChange } from '../screenTracker';
|
|
|
18
18
|
* import this hook from the package root — that would force every host app to
|
|
19
19
|
* install the `expo-router` peer.
|
|
20
20
|
*
|
|
21
|
-
* Pathnames are reported as `{ path }` and
|
|
22
|
-
*
|
|
21
|
+
* Pathnames are reported as `{ path }` and sent as wire `screenName` (the
|
|
22
|
+
* backend has no separate path field).
|
|
23
23
|
*
|
|
24
24
|
* Screen tracking ≠ action routing: NAVIGATE for in-app paths uses the router
|
|
25
25
|
* handle registered here; http(s)/mailto/tel still go through Linking.
|