@userflow-tech/react-native 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -77
- package/app.plugin.js +11 -3
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +53 -6
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +11 -3
- package/docs/deep-linking.md +70 -33
- package/docs/isolation.md +75 -0
- package/docs/troubleshooting.md +40 -17
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +14 -8
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +22 -15
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/semanticMatcher.js +26 -8
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
- package/lib/commonjs/anonymousId.js +4 -1
- package/lib/commonjs/anonymousId.js.map +1 -1
- package/lib/commonjs/authoring/ElementPickerOverlay.js +126 -50
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeButton.js +8 -3
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +7 -6
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -1
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -1
- package/lib/commonjs/authoring/fingerprintFromInstance.js +204 -4
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/commonjs/authoring/hitTest.js +264 -16
- package/lib/commonjs/authoring/hitTest.js.map +1 -1
- package/lib/commonjs/authoring/hostAtPoint.js +204 -0
- package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
- package/lib/commonjs/content/BannerStepButton.js +68 -0
- package/lib/commonjs/content/BannerStepButton.js.map +1 -0
- package/lib/commonjs/content/buttonAppearance.js +16 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -1
- package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
- package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/commonjs/content/themeColor.js +15 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deepLinking.js +4 -4
- package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
- package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
- package/lib/commonjs/evalJs/bootstrap.js +84 -0
- package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
- package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
- package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
- package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsController.js +124 -0
- package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
- package/lib/commonjs/evalJs/getWebView.js +81 -0
- package/lib/commonjs/evalJs/getWebView.js.map +1 -0
- package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
- package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
- package/lib/commonjs/evalJs/types.js +2 -0
- package/lib/commonjs/evalJs/types.js.map +1 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +19 -0
- package/lib/commonjs/expo-router/index.js.map +1 -1
- package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
- package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/commonjs/index.js +118 -43
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js +245 -27
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +55 -16
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/deepLink.js +22 -5
- package/lib/commonjs/pairing/deepLink.js.map +1 -1
- package/lib/commonjs/pairing/deviceId.js +47 -0
- package/lib/commonjs/pairing/deviceId.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +5 -4
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/tokenStorage.js +47 -7
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
- package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/commonjs/runtime/BannerHost.js +96 -0
- package/lib/commonjs/runtime/BannerHost.js.map +1 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +19 -12
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
- package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +135 -65
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/bannerEngine.js +63 -0
- package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
- package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
- package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
- package/lib/commonjs/runtime/bannerPlacement.js +37 -0
- package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +75 -3
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/isolateCall.js +48 -0
- package/lib/commonjs/runtime/isolateCall.js.map +1 -0
- package/lib/commonjs/runtime/reportSdkError.js +19 -0
- package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
- package/lib/commonjs/runtime/useBannerSession.js +37 -0
- package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
- package/lib/commonjs/screenTracker.js +34 -9
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/surfaces/BannerBar.js +160 -0
- package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
- package/lib/commonjs/surfaces/BannerSurface.js +78 -0
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +17 -1
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
- package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/commonjs/surfaces/safeArea.js +23 -0
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/fiber/fiberPath.js +118 -0
- package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +60 -50
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/visibleRect.js +139 -0
- package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +73 -37
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
- package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js +22 -15
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/module/anchors/semanticMatcher.js +26 -9
- package/lib/module/anchors/semanticMatcher.js.map +1 -1
- package/lib/module/anonymousId.js +4 -2
- package/lib/module/anonymousId.js.map +1 -1
- package/lib/module/authoring/ElementPickerOverlay.js +128 -52
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeButton.js +8 -3
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/module/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/module/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +7 -6
- package/lib/module/authoring/chrome/tokens.js.map +1 -1
- package/lib/module/authoring/elementPickerController.js.map +1 -1
- package/lib/module/authoring/fingerprintFromInstance.js +198 -4
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/module/authoring/hitTest.js +264 -18
- package/lib/module/authoring/hitTest.js.map +1 -1
- package/lib/module/authoring/hostAtPoint.js +199 -0
- package/lib/module/authoring/hostAtPoint.js.map +1 -0
- package/lib/module/content/BannerStepButton.js +63 -0
- package/lib/module/content/BannerStepButton.js.map +1 -0
- package/lib/module/content/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -1
- package/lib/module/content/resolveBannerButtonChrome.js +41 -0
- package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/module/content/themeColor.js +14 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deepLinking.js +4 -4
- package/lib/module/evalJs/EvalJsHost.js +239 -0
- package/lib/module/evalJs/EvalJsHost.js.map +1 -0
- package/lib/module/evalJs/bootstrap.js +76 -0
- package/lib/module/evalJs/bootstrap.js.map +1 -0
- package/lib/module/evalJs/bridgeMessages.js +139 -0
- package/lib/module/evalJs/bridgeMessages.js.map +1 -0
- package/lib/module/evalJs/evalJsBridge.js +25 -0
- package/lib/module/evalJs/evalJsBridge.js.map +1 -0
- package/lib/module/evalJs/evalJsController.js +119 -0
- package/lib/module/evalJs/evalJsController.js.map +1 -0
- package/lib/module/evalJs/getWebView.js +76 -0
- package/lib/module/evalJs/getWebView.js.map +1 -0
- package/lib/module/evalJs/injectEvalPending.js +15 -0
- package/lib/module/evalJs/injectEvalPending.js.map +1 -0
- package/lib/module/evalJs/types.js +2 -0
- package/lib/module/evalJs/types.js.map +1 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/module/expo-router/index.js +1 -0
- package/lib/module/expo-router/index.js.map +1 -1
- package/lib/module/expo-router/redirectSystemPath.js +70 -0
- package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/module/index.js +114 -45
- package/lib/module/index.js.map +1 -1
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/module/pairing/PairingController.js +245 -27
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +54 -16
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/deepLink.js +21 -5
- package/lib/module/pairing/deepLink.js.map +1 -1
- package/lib/module/pairing/deviceId.js +41 -0
- package/lib/module/pairing/deviceId.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +5 -4
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/tokenStorage.js +47 -7
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/pairing/usePreviewBarHold.js +134 -0
- package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/module/runtime/BannerHost.js +92 -0
- package/lib/module/runtime/BannerHost.js.map +1 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/module/runtime/SdkErrorBoundary.js +55 -0
- package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +19 -12
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowOverlay.js +92 -0
- package/lib/module/runtime/UserflowOverlay.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +136 -66
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/bannerEngine.js +55 -0
- package/lib/module/runtime/bannerEngine.js.map +1 -0
- package/lib/module/runtime/bannerEngineContext.js +7 -0
- package/lib/module/runtime/bannerEngineContext.js.map +1 -0
- package/lib/module/runtime/bannerPlacement.js +30 -0
- package/lib/module/runtime/bannerPlacement.js.map +1 -0
- package/lib/module/runtime/embedBannerRegistry.js +24 -0
- package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +72 -3
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/isolateCall.js +43 -0
- package/lib/module/runtime/isolateCall.js.map +1 -0
- package/lib/module/runtime/reportSdkError.js +15 -0
- package/lib/module/runtime/reportSdkError.js.map +1 -0
- package/lib/module/runtime/useBannerSession.js +33 -0
- package/lib/module/runtime/useBannerSession.js.map +1 -0
- package/lib/module/screenTracker.js +33 -9
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/surfaces/BannerBar.js +155 -0
- package/lib/module/surfaces/BannerBar.js.map +1 -0
- package/lib/module/surfaces/BannerSurface.js +72 -0
- package/lib/module/surfaces/BannerSurface.js.map +1 -0
- package/lib/module/surfaces/MadeWithUserflow.js +11 -7
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +1 -1
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +17 -1
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/bannerBarLayout.js +69 -0
- package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/module/surfaces/bannerBarTokens.js +37 -0
- package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/module/surfaces/resolveBannerTheme.js +16 -0
- package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/module/surfaces/safeArea.js +22 -0
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anonymousId.d.ts +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/commonjs/src/index.d.ts +16 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +4 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts +7 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/module/src/anonymousId.d.ts +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/content/types.d.ts +1 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -1
- package/lib/typescript/module/src/deepLinking.d.ts +4 -4
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/module/src/index.d.ts +16 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +4 -1
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/module/src/screenTracker.d.ts +7 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +4 -3
- package/src/anchors/AutoAnchorRegistry.ts +41 -11
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +57 -47
- package/src/anchors/fiber/resolveFiberPath.ts +215 -0
- package/src/anchors/fiber/visibleRect.ts +153 -0
- package/src/anchors/fiber/visibleScreens.ts +74 -36
- package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
- package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
- package/src/anchors/resolveAutoAnchorHost.ts +17 -15
- package/src/anchors/semanticMatcher.ts +38 -14
- package/src/anonymousId.ts +2 -1
- package/src/authoring/ElementPickerOverlay.tsx +168 -59
- package/src/authoring/chrome/ChromeBottomSheet.tsx +49 -8
- package/src/authoring/chrome/ChromeButton.tsx +9 -4
- package/src/authoring/chrome/ChromeIcon.tsx +10 -1
- package/src/authoring/chrome/ChromeTopBar.tsx +39 -15
- package/src/authoring/chrome/DoubleTapBridge.tsx +19 -12
- package/src/authoring/chrome/doubleTapMonitor.ts +10 -0
- package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +7 -2
- package/src/authoring/elementPickerController.ts +2 -4
- package/src/authoring/fingerprintFromInstance.ts +170 -4
- package/src/authoring/hitTest.ts +324 -16
- package/src/authoring/hostAtPoint.ts +247 -0
- package/src/content/BannerStepButton.tsx +91 -0
- package/src/content/buttonAppearance.ts +16 -0
- package/src/content/resolveBannerButtonChrome.ts +49 -0
- package/src/content/themeColor.ts +15 -0
- package/src/content/types.ts +1 -0
- package/src/deepLinking.ts +4 -4
- package/src/evalJs/EvalJsHost.tsx +255 -0
- package/src/evalJs/bootstrap.ts +83 -0
- package/src/evalJs/bridgeMessages.ts +134 -0
- package/src/evalJs/evalJsBridge.ts +42 -0
- package/src/evalJs/evalJsController.ts +127 -0
- package/src/evalJs/getWebView.ts +124 -0
- package/src/evalJs/injectEvalPending.ts +14 -0
- package/src/evalJs/types.ts +56 -0
- package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
- package/src/expo-router/index.ts +8 -0
- package/src/expo-router/redirectSystemPath.ts +86 -0
- package/src/expo-router/useUserflowExpoRouter.ts +2 -2
- package/src/index.ts +129 -45
- package/src/lifecycle.ts +4 -1
- package/src/navigation/WithUserflowReactNavigation.tsx +13 -10
- package/src/navigation/openFlowNavigateUrl.ts +12 -5
- package/src/pairing/PairingController.ts +283 -29
- package/src/pairing/PreviewModeBanner.tsx +71 -14
- package/src/pairing/deepLink.ts +23 -5
- package/src/pairing/deviceId.ts +43 -0
- package/src/pairing/diagnostics.ts +6 -4
- package/src/pairing/tokenStorage.ts +60 -7
- package/src/pairing/usePairingState.ts +2 -0
- package/src/pairing/usePreviewBarHold.ts +160 -0
- package/src/runtime/BannerHost.tsx +102 -0
- package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
- package/src/runtime/SdkErrorBoundary.tsx +77 -0
- package/src/runtime/TargetPressBridge.tsx +19 -12
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +139 -64
- package/src/runtime/bannerEngine.ts +55 -0
- package/src/runtime/bannerEngineContext.ts +5 -0
- package/src/runtime/bannerPlacement.ts +36 -0
- package/src/runtime/embedBannerRegistry.ts +28 -0
- package/src/runtime/flowEngine.ts +76 -3
- package/src/runtime/isolateCall.ts +53 -0
- package/src/runtime/reportSdkError.ts +12 -0
- package/src/runtime/useBannerSession.ts +35 -0
- package/src/screenTracker.ts +34 -8
- package/src/surfaces/BannerBar.tsx +176 -0
- package/src/surfaces/BannerSurface.tsx +82 -0
- package/src/surfaces/MadeWithUserflow.tsx +15 -10
- package/src/surfaces/ModalSurface.tsx +1 -1
- package/src/surfaces/TooltipSurface.tsx +17 -1
- package/src/surfaces/bannerBarLayout.ts +74 -0
- package/src/surfaces/bannerBarTokens.ts +34 -0
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
- package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
- package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
- package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
- package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
- package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
- package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
- package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
- package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
- package/src/surfaces/resolveBannerTheme.ts +18 -0
- package/src/surfaces/safeArea.ts +29 -0
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js +4 -4
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +41 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +167 -28
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +38 -2
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +19 -2
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +10 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +47 -27
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/handleActions.d.ts +17 -3
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +17 -14
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/trackCondition.d.ts +2 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackCondition.js +4 -2
- package/vendor/core/dist/engine/trackCondition.js.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +11 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.js +42 -16
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -1
- package/vendor/core/dist/errors.d.ts +11 -1
- package/vendor/core/dist/errors.d.ts.map +1 -1
- package/vendor/core/dist/errors.js +2 -1
- package/vendor/core/dist/errors.js.map +1 -1
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
- package/vendor/core/dist/eventAttributes.js +4 -2
- package/vendor/core/dist/eventAttributes.js.map +1 -1
- package/vendor/core/dist/index.d.ts +4 -1
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +1 -0
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.js +9 -7
- package/vendor/core/dist/normalizeAttributes.js.map +1 -1
- package/vendor/core/dist/transport/pairing.d.ts +5 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
- package/vendor/core/dist/transport/pairing.js +69 -2
- package/vendor/core/dist/transport/pairing.js.map +1 -1
- package/vendor/core/dist/transport/phoenix.d.ts +8 -0
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +16 -2
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/autoData.d.ts +8 -15
- package/vendor/protocol/dist/autoData.d.ts.map +1 -1
- package/vendor/protocol/dist/autoData.js.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +58 -2
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +20 -2
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +22 -12
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +5 -2
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getEvalJsWebView = getEvalJsWebView;
|
|
7
|
+
exports.isEvalJsWebViewNativeLinked = isEvalJsWebViewNativeLinked;
|
|
8
|
+
exports.resetEvalJsWebViewCacheForTests = resetEvalJsWebViewCacheForTests;
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
/**
|
|
11
|
+
* Minimal surface of `react-native-webview` this spike uses.
|
|
12
|
+
* Defined locally so the package root never statically imports the optional peer.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
let cached;
|
|
16
|
+
let warnedMissing = false;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* True when the native `react-native-webview` binary is linked. Do not
|
|
20
|
+
* `require('react-native-webview')` before this passes — the JS entry calls
|
|
21
|
+
* `TurboModuleRegistry.getEnforcing('RNCWebViewModule')` and can red-screen.
|
|
22
|
+
*/
|
|
23
|
+
function isEvalJsWebViewNativeLinked() {
|
|
24
|
+
try {
|
|
25
|
+
if (typeof _reactNative.TurboModuleRegistry?.get === 'function') {
|
|
26
|
+
if (_reactNative.TurboModuleRegistry.get('RNCWebViewModule') != null) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
const legacy = _reactNative.NativeModules.RNCWebViewModule;
|
|
31
|
+
return legacy != null;
|
|
32
|
+
} catch {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Lazy `require('react-native-webview')`, cached. Returns null when the package
|
|
39
|
+
* or native module is missing so Evaluate JavaScript can no-op instead of crashing.
|
|
40
|
+
*/
|
|
41
|
+
function getEvalJsWebView() {
|
|
42
|
+
if (cached !== undefined) return cached;
|
|
43
|
+
if (typeof require !== 'function') {
|
|
44
|
+
cached = null;
|
|
45
|
+
warnMissing('unavailable');
|
|
46
|
+
return cached;
|
|
47
|
+
}
|
|
48
|
+
if (!isEvalJsWebViewNativeLinked()) {
|
|
49
|
+
cached = null;
|
|
50
|
+
warnMissing('native');
|
|
51
|
+
return cached;
|
|
52
|
+
}
|
|
53
|
+
try {
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- peer probe
|
|
55
|
+
const mod = require('react-native-webview');
|
|
56
|
+
const component = mod?.WebView ?? mod?.default;
|
|
57
|
+
cached = component != null ? component : null;
|
|
58
|
+
} catch {
|
|
59
|
+
cached = null;
|
|
60
|
+
}
|
|
61
|
+
if (cached == null) {
|
|
62
|
+
warnMissing('js');
|
|
63
|
+
}
|
|
64
|
+
return cached;
|
|
65
|
+
}
|
|
66
|
+
function warnMissing(reason) {
|
|
67
|
+
if (warnedMissing) return;
|
|
68
|
+
warnedMissing = true;
|
|
69
|
+
if (reason === 'native') {
|
|
70
|
+
console.warn('Userflow: react-native-webview is listed in package.json but RNCWebViewModule is not in ' + 'this native build. Run npx expo install react-native-webview (or npm install), then ' + 'rebuild the dev client (expo prebuild + run:ios / run:android — not Expo Go). ' + 'Evaluate JavaScript and WebView banners will not run until then.');
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
console.warn('Userflow: Evaluate JavaScript requires react-native-webview. Install it in your app ' + '(e.g. npx expo install react-native-webview), rebuild the native app, then retry. ' + 'The action was skipped.');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
function resetEvalJsWebViewCacheForTests() {
|
|
78
|
+
cached = undefined;
|
|
79
|
+
warnedMissing = false;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=getWebView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","cached","warnedMissing","isEvalJsWebViewNativeLinked","TurboModuleRegistry","get","legacy","NativeModules","RNCWebViewModule","getEvalJsWebView","undefined","warnMissing","mod","component","WebView","default","reason","console","warn","resetEvalJsWebViewCacheForTests"],"sourceRoot":"../../../src","sources":["evalJs/getWebView.ts"],"mappings":";;;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;;AAmCA,IAAIC,MAAiD;AACrD,IAAIC,aAAa,GAAG,KAAK;;AAEzB;AACA;AACA;AACA;AACA;AACO,SAASC,2BAA2BA,CAAA,EAAY;EACrD,IAAI;IACF,IAAI,OAAOC,gCAAmB,EAAEC,GAAG,KAAK,UAAU,EAAE;MAClD,IAAID,gCAAmB,CAACC,GAAG,CAAC,kBAAkB,CAAC,IAAI,IAAI,EAAE;QACvD,OAAO,IAAI;MACb;IACF;IACA,MAAMC,MAAM,GAAGC,0BAAa,CAACC,gBAA2B;IACxD,OAAOF,MAAM,IAAI,IAAI;EACvB,CAAC,CAAC,MAAM;IACN,OAAO,KAAK;EACd;AACF;;AAEA;AACA;AACA;AACA;AACO,SAASG,gBAAgBA,CAAA,EAAkC;EAChE,IAAIR,MAAM,KAAKS,SAAS,EAAE,OAAOT,MAAM;EAEvC,IAAI,OAAOD,OAAO,KAAK,UAAU,EAAE;IACjCC,MAAM,GAAG,IAAI;IACbU,WAAW,CAAC,aAAa,CAAC;IAC1B,OAAOV,MAAM;EACf;EAEA,IAAI,CAACE,2BAA2B,CAAC,CAAC,EAAE;IAClCF,MAAM,GAAG,IAAI;IACbU,WAAW,CAAC,QAAQ,CAAC;IACrB,OAAOV,MAAM;EACf;EAEA,IAAI;IACF;IACA,MAAMW,GAAG,GAAGZ,OAAO,CAAC,sBAAsB,CAGzC;IACD,MAAMa,SAAS,GAAGD,GAAG,EAAEE,OAAO,IAAIF,GAAG,EAAEG,OAAO;IAC9Cd,MAAM,GAAGY,SAAS,IAAI,IAAI,GAAGA,SAAS,GAAG,IAAI;EAC/C,CAAC,CAAC,MAAM;IACNZ,MAAM,GAAG,IAAI;EACf;EAEA,IAAIA,MAAM,IAAI,IAAI,EAAE;IAClBU,WAAW,CAAC,IAAI,CAAC;EACnB;EACA,OAAOV,MAAM;AACf;AAEA,SAASU,WAAWA,CAACK,MAAuC,EAAQ;EAClE,IAAId,aAAa,EAAE;EACnBA,aAAa,GAAG,IAAI;EACpB,IAAIc,MAAM,KAAK,QAAQ,EAAE;IACvBC,OAAO,CAACC,IAAI,CACV,0FAA0F,GACxF,sFAAsF,GACtF,gFAAgF,GAChF,kEACJ,CAAC;IACD;EACF;EACAD,OAAO,CAACC,IAAI,CACV,sFAAsF,GACpF,oFAAoF,GACpF,yBACJ,CAAC;AACH;;AAEA;AACO,SAASC,+BAA+BA,CAAA,EAAS;EACtDlB,MAAM,GAAGS,SAAS;EAClBR,aAAa,GAAG,KAAK;AACvB","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.injectEvalPendingIntoWebView = injectEvalPendingIntoWebView;
|
|
7
|
+
var _bootstrap = require("./bootstrap.js");
|
|
8
|
+
var _evalJsController = require("./evalJsController.js");
|
|
9
|
+
/** Inject queued Evaluate JavaScript into a WebView (same document as the banner). */
|
|
10
|
+
function injectEvalPendingIntoWebView(view) {
|
|
11
|
+
if (!view) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const codes = _evalJsController.evalJsController.consumePending();
|
|
15
|
+
for (const code of codes) {
|
|
16
|
+
view.injectJavaScript((0, _bootstrap.wrapCode)(code));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=injectEvalPending.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_bootstrap","require","_evalJsController","injectEvalPendingIntoWebView","view","codes","evalJsController","consumePending","code","injectJavaScript","wrapCode"],"sourceRoot":"../../../src","sources":["evalJs/injectEvalPending.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAGA;AACO,SAASE,4BAA4BA,CAACC,IAA4C,EAAQ;EAC/F,IAAI,CAACA,IAAI,EAAE;IACT;EACF;EACA,MAAMC,KAAK,GAAGC,kCAAgB,CAACC,cAAc,CAAC,CAAC;EAC/C,KAAK,MAAMC,IAAI,IAAIH,KAAK,EAAE;IACxBD,IAAI,CAACK,gBAAgB,CAAC,IAAAC,mBAAQ,EAACF,IAAI,CAAC,CAAC;EACvC;AACF","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["evalJs/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useEvalJsWebViewInjection = useEvalJsWebViewInjection;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _bootstrap = require("./bootstrap.js");
|
|
9
|
+
var _evalJsController = require("./evalJsController.js");
|
|
10
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
|
+
/**
|
|
12
|
+
* Keeps `userflowContext` fresh and drains the eval-js queue into one WebView.
|
|
13
|
+
*/
|
|
14
|
+
function useEvalJsWebViewInjection(webRef, options) {
|
|
15
|
+
const {
|
|
16
|
+
pageReady,
|
|
17
|
+
context,
|
|
18
|
+
pendingCount
|
|
19
|
+
} = options;
|
|
20
|
+
React.useEffect(() => {
|
|
21
|
+
if (!pageReady) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
webRef.current?.injectJavaScript((0, _bootstrap.contextUpdateScript)(context));
|
|
25
|
+
}, [context, pageReady, webRef]);
|
|
26
|
+
React.useEffect(() => {
|
|
27
|
+
if (!pageReady) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const view = webRef.current;
|
|
31
|
+
if (!view) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const codes = _evalJsController.evalJsController.consumePending();
|
|
35
|
+
for (const code of codes) {
|
|
36
|
+
view.injectJavaScript((0, _bootstrap.wrapCode)(code));
|
|
37
|
+
}
|
|
38
|
+
}, [pageReady, pendingCount, webRef]);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=useEvalJsWebViewInjection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_bootstrap","_evalJsController","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useEvalJsWebViewInjection","webRef","options","pageReady","context","pendingCount","useEffect","current","injectJavaScript","contextUpdateScript","view","codes","evalJsController","consumePending","code","wrapCode"],"sourceRoot":"../../../src","sources":["evalJs/useEvalJsWebViewInjection.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AAAsD,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAItD;AACA;AACA;AACO,SAASkB,yBAAyBA,CACvCC,MAAmD,EACnDC,OAA6E,EACvE;EACN,MAAM;IAAEC,SAAS;IAAEC,OAAO;IAAEC;EAAa,CAAC,GAAGH,OAAO;EAEpD1B,KAAK,CAAC8B,SAAS,CAAC,MAAM;IACpB,IAAI,CAACH,SAAS,EAAE;MACd;IACF;IACAF,MAAM,CAACM,OAAO,EAAEC,gBAAgB,CAAC,IAAAC,8BAAmB,EAACL,OAAO,CAAC,CAAC;EAChE,CAAC,EAAE,CAACA,OAAO,EAAED,SAAS,EAAEF,MAAM,CAAC,CAAC;EAEhCzB,KAAK,CAAC8B,SAAS,CAAC,MAAM;IACpB,IAAI,CAACH,SAAS,EAAE;MACd;IACF;IACA,MAAMO,IAAI,GAAGT,MAAM,CAACM,OAAO;IAC3B,IAAI,CAACG,IAAI,EAAE;MACT;IACF;IACA,MAAMC,KAAK,GAAGC,kCAAgB,CAACC,cAAc,CAAC,CAAC;IAC/C,KAAK,MAAMC,IAAI,IAAIH,KAAK,EAAE;MACxBD,IAAI,CAACF,gBAAgB,CAAC,IAAAO,mBAAQ,EAACD,IAAI,CAAC,CAAC;IACvC;EACF,CAAC,EAAE,CAACX,SAAS,EAAEE,YAAY,EAAEJ,MAAM,CAAC,CAAC;AACvC","ignoreList":[]}
|
|
@@ -9,6 +9,24 @@ Object.defineProperty(exports, "UserflowExpoRouterScreenTracker", {
|
|
|
9
9
|
return _UserflowExpoRouterScreenTracker.UserflowExpoRouterScreenTracker;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "createRedirectSystemPath", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _redirectSystemPath.createRedirectSystemPath;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "isUserflowLinkPath", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _redirectSystemPath.isUserflowLinkPath;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "redirectSystemPath", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _redirectSystemPath.redirectSystemPath;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
12
30
|
Object.defineProperty(exports, "useUserflowExpoRouter", {
|
|
13
31
|
enumerable: true,
|
|
14
32
|
get: function () {
|
|
@@ -17,4 +35,5 @@ Object.defineProperty(exports, "useUserflowExpoRouter", {
|
|
|
17
35
|
});
|
|
18
36
|
var _useUserflowExpoRouter = require("./useUserflowExpoRouter.js");
|
|
19
37
|
var _UserflowExpoRouterScreenTracker = require("./UserflowExpoRouterScreenTracker.js");
|
|
38
|
+
var _redirectSystemPath = require("./redirectSystemPath.js");
|
|
20
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_useUserflowExpoRouter","require","_UserflowExpoRouterScreenTracker"],"sourceRoot":"../../../src","sources":["expo-router/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_useUserflowExpoRouter","require","_UserflowExpoRouterScreenTracker","_redirectSystemPath"],"sourceRoot":"../../../src","sources":["expo-router/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,gCAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createRedirectSystemPath = createRedirectSystemPath;
|
|
7
|
+
exports.isUserflowLinkPath = isUserflowLinkPath;
|
|
8
|
+
exports.redirectSystemPath = void 0;
|
|
9
|
+
var _deepLinking = require("../deepLinking.js");
|
|
10
|
+
var _deepLink = require("../pairing/deepLink.js");
|
|
11
|
+
/**
|
|
12
|
+
* Arguments Expo Router passes to `redirectSystemPath` from `+native-intent`.
|
|
13
|
+
* @see https://docs.expo.dev/router/advanced/native-intent/
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* True when `path` is a full Userflow pairing or preview URL that Expo Router
|
|
18
|
+
* should not navigate to.
|
|
19
|
+
*
|
|
20
|
+
* Only full URLs are claimed. Expo Router passes the raw URL to
|
|
21
|
+
* `redirectSystemPath` for both the initial URL and later URL events, so a
|
|
22
|
+
* bare `?token=` or `?pairing_token=` must be left alone — it may belong to
|
|
23
|
+
* the host.
|
|
24
|
+
*/
|
|
25
|
+
function isUserflowLinkPath(path) {
|
|
26
|
+
if (typeof path !== 'string' || path.length === 0) return false;
|
|
27
|
+
if (!/^[a-z][a-z0-9+.-]*:/i.test(path)) return false;
|
|
28
|
+
const pairing = (0, _deepLink.inspectPairingDeepLink)(path);
|
|
29
|
+
if (pairing.ok || (0, _deepLink.isPairingAttempt)(pairing.reason)) return true;
|
|
30
|
+
return (0, _deepLinking.parsePreviewDeepLink)(path) != null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Build a `redirectSystemPath` that yields Userflow links and otherwise
|
|
35
|
+
* forwards to `next` (or returns the path unchanged).
|
|
36
|
+
*/
|
|
37
|
+
function createRedirectSystemPath(options = {}) {
|
|
38
|
+
const {
|
|
39
|
+
next
|
|
40
|
+
} = options;
|
|
41
|
+
return event => {
|
|
42
|
+
try {
|
|
43
|
+
if (isUserflowLinkPath(event.path)) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
} catch {
|
|
47
|
+
// Expo warns that throwing here can crash the app. Fall through and let
|
|
48
|
+
// the router handle the original path.
|
|
49
|
+
}
|
|
50
|
+
if (next) {
|
|
51
|
+
return next(event);
|
|
52
|
+
}
|
|
53
|
+
return event.path;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Expo Router `redirectSystemPath` that swallows Userflow deep links.
|
|
59
|
+
*
|
|
60
|
+
* Returning `null` tells Expo Router to stay on the current path. The original
|
|
61
|
+
* URL remains available to React Native `Linking`, which the SDK already
|
|
62
|
+
* listens on.
|
|
63
|
+
*
|
|
64
|
+
* Mount from the host app:
|
|
65
|
+
*
|
|
66
|
+
* ```ts
|
|
67
|
+
* // app/+native-intent.ts
|
|
68
|
+
* export { redirectSystemPath } from '@userflow-tech/react-native/expo-router';
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* Hosts that already export `redirectSystemPath` should wrap it with
|
|
72
|
+
* {@link createRedirectSystemPath}.
|
|
73
|
+
*/
|
|
74
|
+
const redirectSystemPath = exports.redirectSystemPath = createRedirectSystemPath();
|
|
75
|
+
//# sourceMappingURL=redirectSystemPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_deepLinking","require","_deepLink","isUserflowLinkPath","path","length","test","pairing","inspectPairingDeepLink","ok","isPairingAttempt","reason","parsePreviewDeepLink","createRedirectSystemPath","options","next","event","redirectSystemPath","exports"],"sourceRoot":"../../../src","sources":["expo-router/redirectSystemPath.ts"],"mappings":";;;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;;AAkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE,kBAAkBA,CAACC,IAAY,EAAW;EACxD,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,CAACC,MAAM,KAAK,CAAC,EAAE,OAAO,KAAK;EAC/D,IAAI,CAAC,sBAAsB,CAACC,IAAI,CAACF,IAAI,CAAC,EAAE,OAAO,KAAK;EAEpD,MAAMG,OAAO,GAAG,IAAAC,gCAAsB,EAACJ,IAAI,CAAC;EAC5C,IAAIG,OAAO,CAACE,EAAE,IAAI,IAAAC,0BAAgB,EAACH,OAAO,CAACI,MAAM,CAAC,EAAE,OAAO,IAAI;EAC/D,OAAO,IAAAC,iCAAoB,EAACR,IAAI,CAAC,IAAI,IAAI;AAC3C;;AAEA;AACA;AACA;AACA;AACO,SAASS,wBAAwBA,CACtCC,OAAwC,GAAG,CAAC,CAAC,EACzB;EACpB,MAAM;IAAEC;EAAK,CAAC,GAAGD,OAAO;EAExB,OAAQE,KAAK,IAAK;IAChB,IAAI;MACF,IAAIb,kBAAkB,CAACa,KAAK,CAACZ,IAAI,CAAC,EAAE;QAClC,OAAO,IAAI;MACb;IACF,CAAC,CAAC,MAAM;MACN;MACA;IAAA;IAGF,IAAIW,IAAI,EAAE;MACR,OAAOA,IAAI,CAACC,KAAK,CAAC;IACpB;IACA,OAAOA,KAAK,CAACZ,IAAI;EACnB,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMa,kBAAsC,GAAAC,OAAA,CAAAD,kBAAA,GAAGJ,wBAAwB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -18,8 +18,8 @@ var _screenTracker = require("../screenTracker.js");
|
|
|
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.
|
package/lib/commonjs/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
Object.defineProperty(exports, "EmbedBannerPlaceholder", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _EmbedBannerPlaceholder.EmbedBannerPlaceholder;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
6
12
|
Object.defineProperty(exports, "INACTIVITY_TIMEOUT_MS", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function () {
|
|
@@ -104,20 +110,25 @@ var _autoAnchor = require("./anchors/autoAnchor.js");
|
|
|
104
110
|
var _anchorChangeTicker = require("./anchors/anchorChangeTicker.js");
|
|
105
111
|
var _resolveAnchorHost = require("./anchors/resolveAnchorHost.js");
|
|
106
112
|
var _scrollConfig = require("./anchors/scrollConfig.js");
|
|
107
|
-
var _surfaceInteractionConfig = require("./surfaces/surfaceInteractionConfig.js");
|
|
108
113
|
var _anonymousId = require("./anonymousId.js");
|
|
109
114
|
var _deepLinking = require("./deepLinking.js");
|
|
110
115
|
var _deviceContext = require("./deviceContext.js");
|
|
116
|
+
var _evalJsBridge = require("./evalJs/evalJsBridge.js");
|
|
117
|
+
var _evalJsController = require("./evalJs/evalJsController.js");
|
|
111
118
|
var _hostAppVersion = require("./hostAppVersion.js");
|
|
112
119
|
var _lifecycle = require("./lifecycle.js");
|
|
113
120
|
var _openFlowNavigateUrl = require("./navigation/openFlowNavigateUrl.js");
|
|
114
121
|
var _network = require("./network.js");
|
|
115
122
|
var _pairingRuntime = require("./pairing/pairingRuntime.js");
|
|
123
|
+
var _bannerEngine = require("./runtime/bannerEngine.js");
|
|
116
124
|
var _clientConditions = require("./runtime/clientConditions.js");
|
|
117
125
|
var _flowEngine = require("./runtime/flowEngine.js");
|
|
126
|
+
var _isolateCall = require("./runtime/isolateCall.js");
|
|
118
127
|
var _userflowCore = require("./runtime/userflowCore.js");
|
|
119
128
|
var _screenTracker = require("./screenTracker.js");
|
|
129
|
+
var _surfaceInteractionConfig = require("./surfaces/surfaceInteractionConfig.js");
|
|
120
130
|
var _version = require("./version.js");
|
|
131
|
+
var _EmbedBannerPlaceholder = require("./runtime/EmbedBannerPlaceholder.js");
|
|
121
132
|
var _UserflowProvider = require("./runtime/UserflowProvider.js");
|
|
122
133
|
var _useFlowSessionState = require("./runtime/useFlowSessionState.js");
|
|
123
134
|
var _useUserflowScreen = require("./useUserflowScreen.js");
|
|
@@ -143,11 +154,14 @@ const lifecycle = new _lifecycle.LifecycleController({
|
|
|
143
154
|
core.resume();
|
|
144
155
|
// After reconnect, flush mid-flow client messages that failed while offline.
|
|
145
156
|
void (0, _flowEngine.getFlowSessionEngine)(core).flushPendingSends();
|
|
157
|
+
void (0, _bannerEngine.getBannerSessionEngine)(core).flushPendingSends();
|
|
146
158
|
},
|
|
147
159
|
clearLocalSession: () => {
|
|
148
160
|
(0, _flowEngine.clearFlowSessionEngineLocalSession)();
|
|
161
|
+
(0, _bannerEngine.clearBannerSessionEngineLocalSession)();
|
|
149
162
|
// Engine may not exist yet; still clear any transport join resume id.
|
|
150
163
|
core.setFlowSessionId(null);
|
|
164
|
+
core.setBannerSessionId(null);
|
|
151
165
|
},
|
|
152
166
|
ensureAlive: () => core.ensureAlive(),
|
|
153
167
|
hasActiveSession: () => (0, _flowEngine.hasActiveFlowSession)(),
|
|
@@ -169,44 +183,38 @@ function armScreenViewedForNextIdentify() {
|
|
|
169
183
|
}
|
|
170
184
|
function wireScreenChangeReporter() {
|
|
171
185
|
(0, _screenTracker.setScreenChangeReporter)(location => {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
179
|
-
console.log('[Userflow] updateScreen', location, identified ? '(push UpdateClientContext)' : '(buffered until identify)');
|
|
180
|
-
}
|
|
181
|
-
// Mirrors web: only pushes UpdateClientContext after identify; before that the
|
|
182
|
-
// location is remembered and included on the next end-user channel join.
|
|
183
|
-
void core.updateScreen(location).catch(error => {
|
|
184
|
-
// Screen updates are best-effort; connection drops / rate limits should not
|
|
185
|
-
// surface to the host app's navigation path.
|
|
186
|
+
(0, _isolateCall.isolateSync)('updateScreen', () => {
|
|
187
|
+
lifecycle.reportActivity();
|
|
188
|
+
const screenKey = 'path' in location ? `path:${location.path}` : `screen:${location.screen}`;
|
|
189
|
+
(0, _resolveAnchorHost.notifyAnchorScreenChange)(screenKey);
|
|
190
|
+
_anchorChangeTicker.anchorChangeTicker.notify();
|
|
191
|
+
const identified = core.getUserId() != null;
|
|
186
192
|
if (__DEV__) {
|
|
187
193
|
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
188
|
-
console.
|
|
194
|
+
console.log('[Userflow] updateScreen', location, identified ? '(push UpdateClientContext)' : '(buffered until identify)');
|
|
189
195
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
void core.track(_screenTracker.SCREEN_VIEWED_EVENT, attrs).catch(error => {
|
|
203
|
-
// Screen views are best-effort; connection drops / rate limits should not
|
|
204
|
-
// surface to the host app's navigation path. Each accepted screen sends
|
|
205
|
-
// UpdateClientContext + TrackEvent (two slots of the 100/min cap).
|
|
196
|
+
// Mirrors web: only pushes UpdateClientContext after identify; before that the
|
|
197
|
+
// location is remembered and included on the next end-user channel join.
|
|
198
|
+
void (0, _isolateCall.isolateAsync)('updateScreen', () => core.updateScreen(location), {
|
|
199
|
+
rethrowHostContract: false
|
|
200
|
+
});
|
|
201
|
+
const attrs = (0, _screenTracker.screenViewedAttributes)(location);
|
|
202
|
+
if (!attrs) return;
|
|
203
|
+
if (!identified) {
|
|
204
|
+
screenViewedAwaitingIdentify = true;
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
screenViewedAwaitingIdentify = false;
|
|
206
208
|
if (__DEV__) {
|
|
207
209
|
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
208
|
-
console.
|
|
210
|
+
console.log('[Userflow] track', _screenTracker.SCREEN_VIEWED_EVENT, attrs);
|
|
209
211
|
}
|
|
212
|
+
// Screen views are best-effort; connection drops / rate limits should not
|
|
213
|
+
// surface to the host app's navigation path. Each accepted screen sends
|
|
214
|
+
// UpdateClientContext + TrackEvent (two slots of the 100/min cap).
|
|
215
|
+
void (0, _isolateCall.isolateAsync)('track', () => core.track(_screenTracker.SCREEN_VIEWED_EVENT, attrs), {
|
|
216
|
+
rethrowHostContract: false
|
|
217
|
+
});
|
|
210
218
|
});
|
|
211
219
|
});
|
|
212
220
|
}
|
|
@@ -222,6 +230,7 @@ function mergeSystemUserAttributes(attributes) {
|
|
|
222
230
|
}
|
|
223
231
|
async function afterIdentify() {
|
|
224
232
|
(0, _flowEngine.attachFlowSessionEngine)(core);
|
|
233
|
+
(0, _bannerEngine.attachBannerSessionEngine)(core);
|
|
225
234
|
(0, _clientConditions.attachClientConditionEngine)(core);
|
|
226
235
|
(0, _pairingRuntime.getPairingController)(core).notifyIdentified();
|
|
227
236
|
lifecycle.reportActivity();
|
|
@@ -269,13 +278,21 @@ const Userflow = exports.Userflow = {
|
|
|
269
278
|
clearLocalSession: () => {
|
|
270
279
|
(0, _flowEngine.clearFlowSessionEngineLocalSession)();
|
|
271
280
|
core.setFlowSessionId(null);
|
|
272
|
-
|
|
281
|
+
(0, _bannerEngine.clearBannerSessionEngineLocalSession)();
|
|
282
|
+
core.setBannerSessionId(null);
|
|
283
|
+
_evalJsController.evalJsController.reset();
|
|
284
|
+
},
|
|
285
|
+
endDraftSession: _flowEngine.endDraftFlowSession,
|
|
286
|
+
cancelPendingDraftEnd: _flowEngine.cancelPendingDraftEnd
|
|
273
287
|
});
|
|
274
288
|
pairing.notifyInitStarted();
|
|
275
289
|
void pairing.start();
|
|
276
|
-
return core.init(config).then(
|
|
290
|
+
return core.init(config).then(resolved => {
|
|
277
291
|
(0, _screenTracker.enableScreenTracking)();
|
|
278
|
-
|
|
292
|
+
// Pairing connect can take the full socket timeout. Identify, and the
|
|
293
|
+
// end-user socket that delivers the preview, must not wait on it.
|
|
294
|
+
// notifyInitialized never rejects; the relay queue covers either order.
|
|
295
|
+
void pairing.notifyInitialized();
|
|
279
296
|
return resolved;
|
|
280
297
|
}, error => {
|
|
281
298
|
pairing.notifyInitFailed(error);
|
|
@@ -309,6 +326,9 @@ const Userflow = exports.Userflow = {
|
|
|
309
326
|
if (previousId != null && previousId !== userId) {
|
|
310
327
|
(0, _clientConditions.resetClientConditionEngine)();
|
|
311
328
|
core.setClientConditions([]);
|
|
329
|
+
(0, _bannerEngine.clearBannerSessionEngineLocalSession)();
|
|
330
|
+
core.setBannerSessionId(null);
|
|
331
|
+
_evalJsController.evalJsController.reset();
|
|
312
332
|
await (0, _anonymousId.clearAnonymousId)();
|
|
313
333
|
armScreenViewedForNextIdentify();
|
|
314
334
|
}
|
|
@@ -322,6 +342,9 @@ const Userflow = exports.Userflow = {
|
|
|
322
342
|
if (previousId != null && previousId !== anonymousId) {
|
|
323
343
|
(0, _clientConditions.resetClientConditionEngine)();
|
|
324
344
|
core.setClientConditions([]);
|
|
345
|
+
(0, _bannerEngine.clearBannerSessionEngineLocalSession)();
|
|
346
|
+
core.setBannerSessionId(null);
|
|
347
|
+
_evalJsController.evalJsController.reset();
|
|
325
348
|
armScreenViewedForNextIdentify();
|
|
326
349
|
}
|
|
327
350
|
await core.identify(anonymousId, mergeSystemUserAttributes(attributes), options);
|
|
@@ -358,10 +381,17 @@ const Userflow = exports.Userflow = {
|
|
|
358
381
|
lifecycle.reportActivity();
|
|
359
382
|
return core.updateGroup(attributes, options);
|
|
360
383
|
},
|
|
361
|
-
/**
|
|
384
|
+
/**
|
|
385
|
+
* Record a custom analytics event for the current user (and group, unless `userOnly`).
|
|
386
|
+
* Operational failures (network, rate limit, unexpected SDK bugs) are isolated and
|
|
387
|
+
* logged; the promise still resolves. `UserflowAuthError` for missing
|
|
388
|
+
* `init` / `identify` or an invalid event name still rejects.
|
|
389
|
+
*/
|
|
362
390
|
track(name, attributes, options) {
|
|
363
|
-
|
|
364
|
-
|
|
391
|
+
return (0, _isolateCall.isolateAsync)('track', async () => {
|
|
392
|
+
lifecycle.reportActivity();
|
|
393
|
+
await core.track(name, attributes, options);
|
|
394
|
+
}).then(() => undefined);
|
|
365
395
|
},
|
|
366
396
|
/** The currently identified user id, or `null` before identify. */
|
|
367
397
|
getUserId() {
|
|
@@ -389,10 +419,16 @@ const Userflow = exports.Userflow = {
|
|
|
389
419
|
getFlowSessionEngine() {
|
|
390
420
|
return (0, _flowEngine.getFlowSessionEngine)(core);
|
|
391
421
|
},
|
|
422
|
+
/** The banner session engine (created lazily; attach runs after identify). */
|
|
423
|
+
getBannerSessionEngine() {
|
|
424
|
+
return (0, _bannerEngine.getBannerSessionEngine)(core);
|
|
425
|
+
},
|
|
392
426
|
/** Clears the current user identity and disconnects from Userflow. */
|
|
393
427
|
async reset() {
|
|
394
428
|
(0, _clientConditions.resetClientConditionEngine)();
|
|
395
429
|
(0, _flowEngine.resetFlowSessionEngine)();
|
|
430
|
+
(0, _bannerEngine.resetBannerSessionEngine)();
|
|
431
|
+
_evalJsController.evalJsController.reset();
|
|
396
432
|
core.reset();
|
|
397
433
|
armScreenViewedForNextIdentify();
|
|
398
434
|
await (0, _anonymousId.clearAnonymousId)();
|
|
@@ -402,6 +438,7 @@ const Userflow = exports.Userflow = {
|
|
|
402
438
|
(0, _pairingRuntime.getPairingController)(core).stop();
|
|
403
439
|
lifecycle.stop();
|
|
404
440
|
network.stop();
|
|
441
|
+
_evalJsController.evalJsController.reset();
|
|
405
442
|
(0, _screenTracker.disableScreenTracking)();
|
|
406
443
|
screenViewedAwaitingIdentify = false;
|
|
407
444
|
(0, _deepLinking.stopDeepLinking)();
|
|
@@ -413,7 +450,9 @@ const Userflow = exports.Userflow = {
|
|
|
413
450
|
* host-app activity the SDK does not observe.
|
|
414
451
|
*/
|
|
415
452
|
reportActivity() {
|
|
416
|
-
|
|
453
|
+
(0, _isolateCall.isolateSync)('reportActivity', () => {
|
|
454
|
+
lifecycle.reportActivity();
|
|
455
|
+
});
|
|
417
456
|
},
|
|
418
457
|
/**
|
|
419
458
|
* Report the active React Navigation (or manual) screen name. Prefer
|
|
@@ -422,9 +461,11 @@ const Userflow = exports.Userflow = {
|
|
|
422
461
|
* with `screen` set (Expo Router pathnames use `path` via the Expo helper).
|
|
423
462
|
*/
|
|
424
463
|
updateScreen(screenName) {
|
|
425
|
-
(0,
|
|
426
|
-
|
|
427
|
-
|
|
464
|
+
(0, _isolateCall.isolateSync)('updateScreen', () => {
|
|
465
|
+
(0, _screenTracker.handleScreenChange)(screenName ? {
|
|
466
|
+
screen: screenName
|
|
467
|
+
} : undefined);
|
|
468
|
+
});
|
|
428
469
|
},
|
|
429
470
|
/**
|
|
430
471
|
* Sticky header/footer insets applied when scrolling tooltip targets into
|
|
@@ -449,6 +490,14 @@ const Userflow = exports.Userflow = {
|
|
|
449
490
|
setSurfaceInteractionBlocking(enabled) {
|
|
450
491
|
(0, _surfaceInteractionConfig.setSurfaceInteractionBlocking)(enabled);
|
|
451
492
|
},
|
|
493
|
+
/**
|
|
494
|
+
* Values exposed to Evaluate JavaScript as `window.userflowContext.host`
|
|
495
|
+
* (language, theme, tab bar height, and anything else the page used to read
|
|
496
|
+
* from the DOM). Replaces the previous host bag.
|
|
497
|
+
*/
|
|
498
|
+
setEvalJsContext(values) {
|
|
499
|
+
_evalJsController.evalJsController.setHostContext(values ?? {});
|
|
500
|
+
},
|
|
452
501
|
/**
|
|
453
502
|
* Log the host app's native marketing version (store version), not
|
|
454
503
|
* {@link SDK_VERSION}, and the platform OS (`ios` / `android` / …).
|
|
@@ -466,4 +515,30 @@ const Userflow = exports.Userflow = {
|
|
|
466
515
|
(0, _deviceContext.logDeviceContext)();
|
|
467
516
|
}
|
|
468
517
|
};
|
|
518
|
+
(0, _evalJsBridge.setEvalJsBridgeHandlers)({
|
|
519
|
+
track: (name, attributes) => {
|
|
520
|
+
void Userflow.track(name, attributes);
|
|
521
|
+
},
|
|
522
|
+
updateUser: attributes => {
|
|
523
|
+
void Userflow.updateUser(attributes);
|
|
524
|
+
},
|
|
525
|
+
updateGroup: (attributes, options) => {
|
|
526
|
+
void Userflow.updateGroup(attributes, options?.membership ? {
|
|
527
|
+
membership: options.membership
|
|
528
|
+
} : undefined);
|
|
529
|
+
},
|
|
530
|
+
openUrl: url => {
|
|
531
|
+
void (0, _isolateCall.isolateAsync)('eval-js-open-url', () => (0, _openFlowNavigateUrl.openFlowNavigateUrl)(url), {
|
|
532
|
+
rethrowHostContract: false
|
|
533
|
+
});
|
|
534
|
+
},
|
|
535
|
+
endFlow: sessionIds => {
|
|
536
|
+
void (0, _isolateCall.isolateAsync)('eval-js-end-flow', () => (0, _flowEngine.endEvalJsFlowSession)(sessionIds), {
|
|
537
|
+
rethrowHostContract: false
|
|
538
|
+
});
|
|
539
|
+
},
|
|
540
|
+
warn: message => {
|
|
541
|
+
console.warn(message);
|
|
542
|
+
}
|
|
543
|
+
});
|
|
469
544
|
//# sourceMappingURL=index.js.map
|