@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,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { reportSdkError } from "./reportSdkError.js";
|
|
5
|
+
/**
|
|
6
|
+
* Contains React render/lifecycle errors in SDK UI so they cannot unmount the
|
|
7
|
+
* host app tree. Event handlers and async work are not covered — those use
|
|
8
|
+
* {@link isolateSync} / {@link isolateAsync}.
|
|
9
|
+
*/
|
|
10
|
+
export class SdkErrorBoundary extends React.Component {
|
|
11
|
+
state = {
|
|
12
|
+
hasError: false,
|
|
13
|
+
resetKey: this.props.resetKey,
|
|
14
|
+
failedKeys: []
|
|
15
|
+
};
|
|
16
|
+
static getDerivedStateFromError() {
|
|
17
|
+
return {
|
|
18
|
+
hasError: true
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
static getDerivedStateFromProps(props, state) {
|
|
22
|
+
if (props.resetKey === state.resetKey) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
const nextKey = props.resetKey ?? '';
|
|
26
|
+
if (nextKey !== '' && state.failedKeys.includes(nextKey)) {
|
|
27
|
+
return {
|
|
28
|
+
hasError: true,
|
|
29
|
+
resetKey: props.resetKey
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
hasError: false,
|
|
34
|
+
resetKey: props.resetKey
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
componentDidCatch(error, info) {
|
|
38
|
+
reportSdkError(this.props.scope, error, info.componentStack);
|
|
39
|
+
this.props.onError?.(error);
|
|
40
|
+
const key = this.props.resetKey;
|
|
41
|
+
if (!key) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.setState(prev => prev.failedKeys.includes(key) ? null : {
|
|
45
|
+
failedKeys: [...prev.failedKeys, key]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
render() {
|
|
49
|
+
if (this.state.hasError) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return this.props.children;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=SdkErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","reportSdkError","SdkErrorBoundary","Component","state","hasError","resetKey","props","failedKeys","getDerivedStateFromError","getDerivedStateFromProps","nextKey","includes","componentDidCatch","error","info","scope","componentStack","onError","key","setState","prev","render","children"],"sourceRoot":"../../../src","sources":["runtime/SdkErrorBoundary.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,cAAc,QAAQ,qBAAkB;AAuBjD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,SAASF,KAAK,CAACG,SAAS,CAGnD;EACSC,KAAK,GAA0B;IACtCC,QAAQ,EAAE,KAAK;IACfC,QAAQ,EAAE,IAAI,CAACC,KAAK,CAACD,QAAQ;IAC7BE,UAAU,EAAE;EACd,CAAC;EAED,OAAOC,wBAAwBA,CAAA,EAAmC;IAChE,OAAO;MAAEJ,QAAQ,EAAE;IAAK,CAAC;EAC3B;EAEA,OAAOK,wBAAwBA,CAC7BH,KAA4B,EAC5BH,KAA4B,EACW;IACvC,IAAIG,KAAK,CAACD,QAAQ,KAAKF,KAAK,CAACE,QAAQ,EAAE;MACrC,OAAO,IAAI;IACb;IACA,MAAMK,OAAO,GAAGJ,KAAK,CAACD,QAAQ,IAAI,EAAE;IACpC,IAAIK,OAAO,KAAK,EAAE,IAAIP,KAAK,CAACI,UAAU,CAACI,QAAQ,CAACD,OAAO,CAAC,EAAE;MACxD,OAAO;QAAEN,QAAQ,EAAE,IAAI;QAAEC,QAAQ,EAAEC,KAAK,CAACD;MAAS,CAAC;IACrD;IACA,OAAO;MAAED,QAAQ,EAAE,KAAK;MAAEC,QAAQ,EAAEC,KAAK,CAACD;IAAS,CAAC;EACtD;EAESO,iBAAiBA,CAACC,KAAY,EAAEC,IAAqB,EAAQ;IACpEd,cAAc,CAAC,IAAI,CAACM,KAAK,CAACS,KAAK,EAAEF,KAAK,EAAEC,IAAI,CAACE,cAAc,CAAC;IAC5D,IAAI,CAACV,KAAK,CAACW,OAAO,GAAGJ,KAAK,CAAC;IAC3B,MAAMK,GAAG,GAAG,IAAI,CAACZ,KAAK,CAACD,QAAQ;IAC/B,IAAI,CAACa,GAAG,EAAE;MACR;IACF;IACA,IAAI,CAACC,QAAQ,CAAEC,IAAI,IACjBA,IAAI,CAACb,UAAU,CAACI,QAAQ,CAACO,GAAG,CAAC,GAAG,IAAI,GAAG;MAAEX,UAAU,EAAE,CAAC,GAAGa,IAAI,CAACb,UAAU,EAAEW,GAAG;IAAE,CACjF,CAAC;EACH;EAESG,MAAMA,CAAA,EAAoB;IACjC,IAAI,IAAI,CAAClB,KAAK,CAACC,QAAQ,EAAE;MACvB,OAAO,IAAI;IACb;IACA,OAAO,IAAI,CAACE,KAAK,CAACgB,QAAQ;EAC5B;AACF","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { targetPressMonitor } from "../anchors/targetPressMonitor.js";
|
|
6
6
|
import { changedTouchPoints, forEachChangedTouch } from "./changedTouchPoints.js";
|
|
7
|
+
import { isolateSync } from "./isolateCall.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
/**
|
|
9
10
|
* Wraps app content so tooltip target taps can be observed without stealing
|
|
@@ -23,24 +24,30 @@ export function TargetPressBridge({
|
|
|
23
24
|
children
|
|
24
25
|
}) {
|
|
25
26
|
const onTouchStart = React.useCallback(event => {
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
isolateSync('target-press', () => {
|
|
28
|
+
forEachChangedTouch(event, (identifier, pageX, pageY) => {
|
|
29
|
+
targetPressMonitor.handleTouchStart(identifier, pageX, pageY);
|
|
30
|
+
});
|
|
28
31
|
});
|
|
29
32
|
}, []);
|
|
30
33
|
const onTouchEnd = React.useCallback(event => {
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
isolateSync('target-press', () => {
|
|
35
|
+
forEachChangedTouch(event, (identifier, pageX, pageY) => {
|
|
36
|
+
targetPressMonitor.handleTouchEnd(identifier, pageX, pageY);
|
|
37
|
+
});
|
|
33
38
|
});
|
|
34
39
|
}, []);
|
|
35
40
|
const onTouchCancel = React.useCallback(event => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
isolateSync('target-press', () => {
|
|
42
|
+
const points = changedTouchPoints(event);
|
|
43
|
+
if (points.length === 0) {
|
|
44
|
+
targetPressMonitor.cancelTouch();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
for (const touch of points) {
|
|
48
|
+
targetPressMonitor.cancelTouch(touch.identifier);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
44
51
|
}, []);
|
|
45
52
|
return /*#__PURE__*/_jsx(View, {
|
|
46
53
|
style: styles.root,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","targetPressMonitor","changedTouchPoints","forEachChangedTouch","jsx","_jsx","TargetPressBridge","children","onTouchStart","useCallback","event","identifier","pageX","pageY","handleTouchStart","onTouchEnd","handleTouchEnd","onTouchCancel","points","length","cancelTouch","touch","style","styles","root","collapsable","testID","create","flex"],"sourceRoot":"../../../src","sources":["runtime/TargetPressBridge.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAoC,cAAc;AAE3E,SAASC,kBAAkB,QAAQ,kCAA+B;AAElE,SAASC,kBAAkB,EAAEC,mBAAmB,QAAQ,yBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","targetPressMonitor","changedTouchPoints","forEachChangedTouch","isolateSync","jsx","_jsx","TargetPressBridge","children","onTouchStart","useCallback","event","identifier","pageX","pageY","handleTouchStart","onTouchEnd","handleTouchEnd","onTouchCancel","points","length","cancelTouch","touch","style","styles","root","collapsable","testID","create","flex"],"sourceRoot":"../../../src","sources":["runtime/TargetPressBridge.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAoC,cAAc;AAE3E,SAASC,kBAAkB,QAAQ,kCAA+B;AAElE,SAASC,kBAAkB,EAAEC,mBAAmB,QAAQ,yBAAsB;AAC9E,SAASC,WAAW,QAAQ,kBAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAC;EAAEC;AAAiC,CAAC,EAAsB;EAC1F,MAAMC,YAAY,GAAGX,KAAK,CAACY,WAAW,CAAEC,KAA4B,IAAK;IACvEP,WAAW,CAAC,cAAc,EAAE,MAAM;MAChCD,mBAAmB,CAACQ,KAAK,EAAE,CAACC,UAAU,EAAEC,KAAK,EAAEC,KAAK,KAAK;QACvDb,kBAAkB,CAACc,gBAAgB,CAACH,UAAU,EAAEC,KAAK,EAAEC,KAAK,CAAC;MAC/D,CAAC,CAAC;IACJ,CAA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as React from 'react';
|
|
4
|
+
import { ElementPickerOverlay } from "../authoring/ElementPickerOverlay.js";
|
|
5
|
+
import { elementPickerController } from "../authoring/elementPickerController.js";
|
|
6
|
+
import { EvalJsHost } from "../evalJs/EvalJsHost.js";
|
|
7
|
+
import { PreviewModeBanner } from "../pairing/PreviewModeBanner.js";
|
|
8
|
+
import { getPairingController } from "../pairing/pairingRuntime.js";
|
|
9
|
+
import { usePairingState } from "../pairing/usePairingState.js";
|
|
10
|
+
import { usePreviewBarHold } from "../pairing/usePreviewBarHold.js";
|
|
11
|
+
import { BannerHost } from "./BannerHost.js";
|
|
12
|
+
import { FlowRenderer } from "./FlowRenderer.js";
|
|
13
|
+
import { useFlowSessionState } from "./useFlowSessionState.js";
|
|
14
|
+
import { getUserflowCore } from "./userflowCore.js";
|
|
15
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
/**
|
|
17
|
+
* SDK overlay chrome: preview banner, active flow surface, element picker.
|
|
18
|
+
* Mounted inside {@link SdkErrorBoundary} so a render throw here cannot
|
|
19
|
+
* unmount host children of {@link UserflowProvider}.
|
|
20
|
+
*/
|
|
21
|
+
export function UserflowOverlay({
|
|
22
|
+
engine,
|
|
23
|
+
bannerEngine,
|
|
24
|
+
onTrapChange
|
|
25
|
+
}) {
|
|
26
|
+
const pairingState = usePairingState();
|
|
27
|
+
const {
|
|
28
|
+
session,
|
|
29
|
+
currentStep
|
|
30
|
+
} = useFlowSessionState(engine);
|
|
31
|
+
const [previewConfirming, setPreviewConfirming] = React.useState(false);
|
|
32
|
+
const [pickerActive, setPickerActive] = React.useState(() => elementPickerController.getState().active);
|
|
33
|
+
React.useEffect(() => {
|
|
34
|
+
return elementPickerController.subscribe(next => {
|
|
35
|
+
setPickerActive(next.active);
|
|
36
|
+
});
|
|
37
|
+
}, []);
|
|
38
|
+
const previewHeld = usePreviewBarHold(pairingState, pickerActive);
|
|
39
|
+
const trapHostAccessibility = React.useMemo(() => {
|
|
40
|
+
// Picking hides flow chrome, so the host must stay in the accessibility tree.
|
|
41
|
+
if (pickerActive) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
if (previewConfirming) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
if (!session || !currentStep) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
const appearance = String(currentStep.appearance).toUpperCase();
|
|
51
|
+
if (appearance === 'HIDDEN') {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
if (appearance !== 'TOOLTIP') {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
return currentStep.tooltipTargetBlocked;
|
|
58
|
+
}, [pickerActive, previewConfirming, session, currentStep]);
|
|
59
|
+
React.useLayoutEffect(() => {
|
|
60
|
+
onTrapChange(trapHostAccessibility);
|
|
61
|
+
return () => {
|
|
62
|
+
// Release whenever this overlay unmounts — including when
|
|
63
|
+
// SdkErrorBoundary replaces it with null and onError never runs.
|
|
64
|
+
onTrapChange(false);
|
|
65
|
+
};
|
|
66
|
+
}, [onTrapChange, trapHostAccessibility]);
|
|
67
|
+
const onExitPreview = React.useCallback(() => {
|
|
68
|
+
void getPairingController(getUserflowCore()).exitPreview();
|
|
69
|
+
}, []);
|
|
70
|
+
const onRestartPreview = React.useCallback(() => {
|
|
71
|
+
void getPairingController(getUserflowCore()).restartPreview();
|
|
72
|
+
}, []);
|
|
73
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
74
|
+
children: [/*#__PURE__*/_jsx(EvalJsHost, {
|
|
75
|
+
suppressed: pickerActive
|
|
76
|
+
}), /*#__PURE__*/_jsx(PreviewModeBanner, {
|
|
77
|
+
onConfirmingChange: setPreviewConfirming,
|
|
78
|
+
onExit: onExitPreview,
|
|
79
|
+
held: previewHeld,
|
|
80
|
+
onRestart: onRestartPreview,
|
|
81
|
+
state: pairingState,
|
|
82
|
+
suppressed: pickerActive
|
|
83
|
+
}), /*#__PURE__*/_jsx(BannerHost, {
|
|
84
|
+
engine: bannerEngine,
|
|
85
|
+
hidden: pickerActive
|
|
86
|
+
}), pickerActive ? null : /*#__PURE__*/_jsx(FlowRenderer, {
|
|
87
|
+
engine: engine,
|
|
88
|
+
previewRestartGeneration: pairingState.previewRestartGeneration
|
|
89
|
+
}), /*#__PURE__*/_jsx(ElementPickerOverlay, {})]
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=UserflowOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ElementPickerOverlay","elementPickerController","EvalJsHost","PreviewModeBanner","getPairingController","usePairingState","usePreviewBarHold","BannerHost","FlowRenderer","useFlowSessionState","getUserflowCore","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","UserflowOverlay","engine","bannerEngine","onTrapChange","pairingState","session","currentStep","previewConfirming","setPreviewConfirming","useState","pickerActive","setPickerActive","getState","active","useEffect","subscribe","next","previewHeld","trapHostAccessibility","useMemo","appearance","String","toUpperCase","tooltipTargetBlocked","useLayoutEffect","onExitPreview","useCallback","exitPreview","onRestartPreview","restartPreview","children","suppressed","onConfirmingChange","onExit","held","onRestart","state","hidden","previewRestartGeneration"],"sourceRoot":"../../../src","sources":["runtime/UserflowOverlay.tsx"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,oBAAoB,QAAQ,sCAAmC;AACxE,SAASC,uBAAuB,QAAQ,yCAAsC;AAC9E,SAASC,UAAU,QAAQ,yBAAsB;AACjD,SAASC,iBAAiB,QAAQ,iCAA8B;AAChE,SAASC,oBAAoB,QAAQ,8BAA2B;AAChE,SAASC,eAAe,QAAQ,+BAA4B;AAC5D,SAASC,iBAAiB,QAAQ,iCAA8B;AAEhE,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,eAAe,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C,YAAY,CAACkC;IAAyB,CACjE,CACF,eACD3C,IAAA,CAACZ,oBAAoB,IAAE,CAAC;EAAA,CACxB,CAAC;AAEP","ignoreList":[]}
|
|
@@ -3,21 +3,62 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { FiberScanRoot } from "../anchors/fiber/FiberScanRoot.js";
|
|
6
|
-
import { ElementPickerOverlay } from "../authoring/ElementPickerOverlay.js";
|
|
7
6
|
import { DoubleTapBridge } from "../authoring/chrome/DoubleTapBridge.js";
|
|
8
7
|
import { elementPickerController } from "../authoring/elementPickerController.js";
|
|
9
|
-
import { PreviewModeBanner } from "../pairing/PreviewModeBanner.js";
|
|
10
|
-
import { getPairingController } from "../pairing/pairingRuntime.js";
|
|
11
|
-
import { usePairingState } from "../pairing/usePairingState.js";
|
|
12
8
|
import { ABSOLUTE_FILL } from "../surfaces/absoluteFill.js";
|
|
9
|
+
import { getSafeAreaInsetsContext, useUserflowSafeAreaInsets } from "../surfaces/safeArea.js";
|
|
13
10
|
import { SurfaceLayoutInsetsProvider } from "../surfaces/surfaceLayoutInsets.js";
|
|
14
|
-
import {
|
|
11
|
+
import { BannerHost } from "./BannerHost.js";
|
|
12
|
+
import { SdkErrorBoundary } from "./SdkErrorBoundary.js";
|
|
15
13
|
import { TargetPressBridge } from "./TargetPressBridge.js";
|
|
14
|
+
import { UserflowOverlay } from "./UserflowOverlay.js";
|
|
15
|
+
import { getBannerSessionEngine } from "./bannerEngine.js";
|
|
16
|
+
import { BannerEngineContext } from "./bannerEngineContext.js";
|
|
17
|
+
import { bannerEdge } from "./bannerPlacement.js";
|
|
16
18
|
import { getFlowSessionEngine } from "./flowEngine.js";
|
|
17
|
-
import {
|
|
19
|
+
import { isolateSync } from "./isolateCall.js";
|
|
20
|
+
import { useBannerSession } from "./useBannerSession.js";
|
|
18
21
|
import { getUserflowCore } from "./userflowCore.js";
|
|
19
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
23
|
const UserflowContext = /*#__PURE__*/React.createContext(null);
|
|
24
|
+
function overlayResetKeyFromEngine(engine) {
|
|
25
|
+
const session = engine.getFlowSession();
|
|
26
|
+
if (!session) {
|
|
27
|
+
return '';
|
|
28
|
+
}
|
|
29
|
+
// `ForceGoToStep` updates displayedStepId without rewriting session.currentStep.
|
|
30
|
+
return `${session.id}:${engine.getCurrentStep()?.id ?? ''}`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Session/step identity for retrying a crashed overlay. Lives in an effect so a
|
|
35
|
+
* throw cannot unmount host children (session hooks run inside the overlay
|
|
36
|
+
* boundary instead).
|
|
37
|
+
*/
|
|
38
|
+
function useOverlayErrorBoundaryResetKey(engine) {
|
|
39
|
+
const [resetKey, setResetKey] = React.useState(() => {
|
|
40
|
+
try {
|
|
41
|
+
return overlayResetKeyFromEngine(engine);
|
|
42
|
+
} catch {
|
|
43
|
+
return '';
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
const apply = next => {
|
|
48
|
+
setResetKey(next);
|
|
49
|
+
};
|
|
50
|
+
isolateSync('overlay-reset-key', () => {
|
|
51
|
+
apply(overlayResetKeyFromEngine(engine));
|
|
52
|
+
});
|
|
53
|
+
return engine.on(() => {
|
|
54
|
+
isolateSync('overlay-reset-key', () => {
|
|
55
|
+
apply(overlayResetKeyFromEngine(engine));
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}, [engine]);
|
|
59
|
+
return resetKey;
|
|
60
|
+
}
|
|
61
|
+
|
|
21
62
|
/**
|
|
22
63
|
* Mount once at the application root, above the navigation container
|
|
23
64
|
* (for example the root `_layout.tsx` or `App` component), after
|
|
@@ -29,6 +70,10 @@ const UserflowContext = /*#__PURE__*/React.createContext(null);
|
|
|
29
70
|
* We deliberately do not use RN `<Modal>` — it is the wrong primitive for
|
|
30
71
|
* non-modal tooltips (WS6).
|
|
31
72
|
*
|
|
73
|
+
* Overlay render errors are contained by {@link SdkErrorBoundary}; host
|
|
74
|
+
* children are never inside that boundary. See
|
|
75
|
+
* `packages/react-native/docs/isolation.md`.
|
|
76
|
+
*
|
|
32
77
|
* **Expo Router:** also mount `UserflowExpoRouterScreenTracker` from
|
|
33
78
|
* `@userflow-tech/react-native/expo-router` under this provider so pathname and
|
|
34
79
|
* navigation-state changes and path-like NAVIGATE actions are wired. The tracker
|
|
@@ -40,82 +85,107 @@ const UserflowContext = /*#__PURE__*/React.createContext(null);
|
|
|
40
85
|
*/
|
|
41
86
|
export function UserflowProvider({
|
|
42
87
|
children,
|
|
43
|
-
engine: engineProp
|
|
88
|
+
engine: engineProp,
|
|
89
|
+
bannerEngine: bannerEngineProp
|
|
44
90
|
}) {
|
|
45
91
|
const engine = engineProp ?? getFlowSessionEngine(getUserflowCore());
|
|
92
|
+
const bannerEngine = bannerEngineProp ?? getBannerSessionEngine(getUserflowCore());
|
|
46
93
|
const contextValue = React.useMemo(() => ({
|
|
47
94
|
engine
|
|
48
95
|
}), [engine]);
|
|
49
|
-
const
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
const
|
|
96
|
+
const overlayResetKey = useOverlayErrorBoundaryResetKey(engine);
|
|
97
|
+
const [trapHostAccessibility, setTrapHostAccessibility] = React.useState(false);
|
|
98
|
+
const onTrapChange = React.useCallback(trap => {
|
|
99
|
+
setTrapHostAccessibility(trap);
|
|
100
|
+
}, []);
|
|
101
|
+
const onOverlayError = React.useCallback(() => {
|
|
102
|
+
setTrapHostAccessibility(false);
|
|
103
|
+
}, []);
|
|
104
|
+
const bannerSession = useBannerSession(bannerEngine);
|
|
105
|
+
const safeInsets = useUserflowSafeAreaInsets();
|
|
55
106
|
const [pickerActive, setPickerActive] = React.useState(() => elementPickerController.getState().active);
|
|
56
107
|
React.useEffect(() => {
|
|
57
108
|
return elementPickerController.subscribe(next => {
|
|
58
109
|
setPickerActive(next.active);
|
|
59
110
|
});
|
|
60
111
|
}, []);
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
children:
|
|
97
|
-
|
|
112
|
+
const banner = bannerSession?.version.banner ?? null;
|
|
113
|
+
const flowEdge = banner && banner.overlay === false && !pickerActive ? bannerEdge(banner.embedMode) : null;
|
|
114
|
+
const hostInsets = flowEdge === 'top' || flowEdge === 'bottom' ? {
|
|
115
|
+
...safeInsets,
|
|
116
|
+
top: flowEdge === 'top' ? 0 : safeInsets.top,
|
|
117
|
+
bottom: flowEdge === 'bottom' ? 0 : safeInsets.bottom
|
|
118
|
+
} : null;
|
|
119
|
+
const appContent = /*#__PURE__*/_jsx(View, {
|
|
120
|
+
style: styles.appContent,
|
|
121
|
+
testID: "userflow-app-content",
|
|
122
|
+
importantForAccessibility: trapHostAccessibility ? 'no-hide-descendants' : undefined,
|
|
123
|
+
accessibilityElementsHidden: trapHostAccessibility ? true : undefined,
|
|
124
|
+
children: /*#__PURE__*/_jsx(TargetPressBridge, {
|
|
125
|
+
children: /*#__PURE__*/_jsx(FiberScanRoot, {
|
|
126
|
+
children: children
|
|
127
|
+
})
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
return /*#__PURE__*/_jsx(BannerEngineContext.Provider, {
|
|
131
|
+
value: bannerEngine,
|
|
132
|
+
children: /*#__PURE__*/_jsx(UserflowContext.Provider, {
|
|
133
|
+
value: contextValue,
|
|
134
|
+
children: /*#__PURE__*/_jsx(SurfaceLayoutInsetsProvider, {
|
|
135
|
+
children: /*#__PURE__*/_jsx(DoubleTapBridge, {
|
|
136
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
137
|
+
style: styles.root,
|
|
138
|
+
collapsable: false,
|
|
139
|
+
testID: "userflow-root",
|
|
140
|
+
children: [/*#__PURE__*/_jsx(BannerHost, {
|
|
141
|
+
engine: bannerEngine,
|
|
142
|
+
placement: "flow",
|
|
143
|
+
edge: "top",
|
|
144
|
+
hidden: pickerActive
|
|
145
|
+
}), /*#__PURE__*/_jsx(HostSafeArea, {
|
|
146
|
+
insets: hostInsets,
|
|
147
|
+
children: appContent
|
|
148
|
+
}), /*#__PURE__*/_jsx(BannerHost, {
|
|
149
|
+
engine: bannerEngine,
|
|
150
|
+
placement: "flow",
|
|
151
|
+
edge: "bottom",
|
|
152
|
+
hidden: pickerActive
|
|
153
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
154
|
+
style: styles.overlay,
|
|
155
|
+
pointerEvents: "box-none",
|
|
156
|
+
children: /*#__PURE__*/_jsx(SdkErrorBoundary, {
|
|
157
|
+
scope: "overlay",
|
|
158
|
+
resetKey: overlayResetKey,
|
|
159
|
+
onError: onOverlayError,
|
|
160
|
+
children: /*#__PURE__*/_jsx(UserflowOverlay, {
|
|
161
|
+
engine: engine,
|
|
162
|
+
bannerEngine: bannerEngine,
|
|
163
|
+
onTrapChange: onTrapChange
|
|
164
|
+
})
|
|
98
165
|
})
|
|
99
|
-
})
|
|
100
|
-
})
|
|
101
|
-
style: styles.overlay,
|
|
102
|
-
pointerEvents: "box-none",
|
|
103
|
-
children: [/*#__PURE__*/_jsx(PreviewModeBanner, {
|
|
104
|
-
onConfirmingChange: setPreviewConfirming,
|
|
105
|
-
onExit: onExitPreview,
|
|
106
|
-
onRestart: onRestartPreview,
|
|
107
|
-
state: pairingState,
|
|
108
|
-
suppressed: pickerActive
|
|
109
|
-
}), /*#__PURE__*/_jsx(FlowRenderer, {
|
|
110
|
-
engine: engine,
|
|
111
|
-
previewRestartGeneration: pairingState.previewRestartGeneration
|
|
112
|
-
}), /*#__PURE__*/_jsx(ElementPickerOverlay, {})]
|
|
113
|
-
})]
|
|
166
|
+
})]
|
|
167
|
+
})
|
|
114
168
|
})
|
|
115
169
|
})
|
|
116
170
|
})
|
|
117
171
|
});
|
|
118
172
|
}
|
|
173
|
+
function HostSafeArea({
|
|
174
|
+
insets,
|
|
175
|
+
children
|
|
176
|
+
}) {
|
|
177
|
+
const Context = getSafeAreaInsetsContext();
|
|
178
|
+
const defaultInsets = useUserflowSafeAreaInsets();
|
|
179
|
+
if (!Context) {
|
|
180
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
|
181
|
+
children: children
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
return /*#__PURE__*/_jsx(Context.Provider, {
|
|
185
|
+
value: insets ?? defaultInsets,
|
|
186
|
+
children: children
|
|
187
|
+
});
|
|
188
|
+
}
|
|
119
189
|
|
|
120
190
|
/** Access the flow session engine from inside {@link UserflowProvider}. */
|
|
121
191
|
export function useUserflow() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","FiberScanRoot","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","FiberScanRoot","DoubleTapBridge","elementPickerController","ABSOLUTE_FILL","getSafeAreaInsetsContext","useUserflowSafeAreaInsets","SurfaceLayoutInsetsProvider","BannerHost","SdkErrorBoundary","TargetPressBridge","UserflowOverlay","getBannerSessionEngine","BannerEngineContext","bannerEdge","getFlowSessionEngine","isolateSync","useBannerSession","getUserflowCore","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","UserflowContext","createContext","overlayResetKeyFromEngine","engine","session","getFlowSession","id","getCurrentStep","useOverlayErrorBoundaryResetKey","resetKey","setResetKey","useState","useEffect","apply","next","on","UserflowProvider","children","engineProp","bannerEngine","bannerEngineProp","contextValue","useMemo","overlayResetKey","trapHostAccessibility","setTrapHostAccessibility","onTrapChange","useCallback","trap","onOverlayError","bannerSession","safeInsets","pickerActive","setPickerActive","getState","active","subscribe","banner","version","flowEdge","overlay","embedMode","hostInsets","top","bottom","appContent","style","styles","testID","importantForAccessibility","undefined","accessibilityElementsHidden","Provider","value","root","collapsable","placement","edge","hidden","HostSafeArea","insets","pointerEvents","scope","onError","Context","defaultInsets","useUserflow","ctx","useContext","Error","create","flex"],"sourceRoot":"../../../src","sources":["runtime/UserflowProvider.tsx"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,aAAa,QAAQ,mCAAgC;AAC9D,SAASC,eAAe,QAAQ,wCAAqC;AACrE,SAASC,uBAAuB,QAAQ,yCAAsC;AAC9E,SAASC,aAAa,QAAQ,6BAA0B;AACxD,SAASC,wBAAwB,EAAEC,yBAAyB,QAAQ,yBAAsB;AAE1F,SAASC,2BAA2B,QAAQ,oCAAiC;AAE7E,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,sBAAsB,QAAQ,mBAAgB;AACvD,SAASC,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,UAAU,QAAQ,sBAAmB;AAC9C,SAASC,oBAAoB,QAAQ,iBAAc;AACnD,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,eAAe,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAMjD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mB,CAAC;AACxF;;AAEA;AACA,OAAO,SAASiD,WAAWA,CAAA,EAAyB;EAClD,MAAMC,GAAG,GAAG9F,KAAK,CAAC+F,UAAU,CAACpE,eAAe,CAAC;EAC7C,IAAI,CAACmE,GAAG,EAAE;IACR,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC;EAC3E;EACA,OAAOF,GAAG;AACZ;AAEA,MAAMpB,MAAM,GAAGzE,UAAU,CAACgG,MAAM,CAAC;EAC/BhB,IAAI,EAAE;IACJiB,IAAI,EAAE;EACR,CAAC;EACD1B,UAAU,EAAE;IACV0B,IAAI,EAAE;EACR,CAAC;EACD/B,OAAO,EAAE;IACP,GAAG7D;EACL;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { BannerSessionEngine } from '@userflow-tech/core';
|
|
4
|
+
import { evalJsController } from "../evalJs/evalJsController.js";
|
|
5
|
+
import { openFlowNavigateUrl } from "../navigation/openFlowNavigateUrl.js";
|
|
6
|
+
import { getFlowSessionEngine } from "./flowEngine.js";
|
|
7
|
+
import { isolateAsync } from "./isolateCall.js";
|
|
8
|
+
let bannerEngine = null;
|
|
9
|
+
|
|
10
|
+
/** Build (once) the module-level banner session engine over a {@link UserflowCore} transport. */
|
|
11
|
+
export function getBannerSessionEngine(core) {
|
|
12
|
+
if (!bannerEngine) {
|
|
13
|
+
bannerEngine = new BannerSessionEngine({
|
|
14
|
+
transport: {
|
|
15
|
+
send: message => core.send(message),
|
|
16
|
+
onServerMessage: handler => core.onServerMessage(handler),
|
|
17
|
+
setBannerSessionId: id => core.setBannerSessionId(id)
|
|
18
|
+
},
|
|
19
|
+
flowActions: () => getFlowSessionEngine(core),
|
|
20
|
+
onOpenExternalUrl: url => {
|
|
21
|
+
void isolateAsync('navigate', () => openFlowNavigateUrl(url), {
|
|
22
|
+
rethrowHostContract: false
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
onEvalJs: request => {
|
|
26
|
+
evalJsController.enqueue(request);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return bannerEngine;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Subscribe the engine to inbound server messages. Call after identify. */
|
|
34
|
+
export function attachBannerSessionEngine(core) {
|
|
35
|
+
const engine = getBannerSessionEngine(core);
|
|
36
|
+
engine.attach();
|
|
37
|
+
return engine;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Clear the banner session and detach. Call from {@link Userflow.reset}. */
|
|
41
|
+
export function resetBannerSessionEngine() {
|
|
42
|
+
bannerEngine?.reset();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Drop the local banner without detaching (preview exit, user switch). */
|
|
46
|
+
export function clearBannerSessionEngineLocalSession() {
|
|
47
|
+
bannerEngine?.clearLocalSession();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Test helper: drop the singleton so the next get recreates it. */
|
|
51
|
+
export function __resetBannerSessionEngineForTests() {
|
|
52
|
+
bannerEngine?.reset();
|
|
53
|
+
bannerEngine = null;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=bannerEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BannerSessionEngine","evalJsController","openFlowNavigateUrl","getFlowSessionEngine","isolateAsync","bannerEngine","getBannerSessionEngine","core","transport","send","message","onServerMessage","handler","setBannerSessionId","id","flowActions","onOpenExternalUrl","url","rethrowHostContract","onEvalJs","request","enqueue","attachBannerSessionEngine","engine","attach","resetBannerSessionEngine","reset","clearBannerSessionEngineLocalSession","clearLocalSession","__resetBannerSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/bannerEngine.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAA2B,qBAAqB;AAE5E,SAASC,gBAAgB,QAAQ,+BAA4B;AAC7D,SAASC,mBAAmB,QAAQ,sCAAmC;AAE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AAS;EACzDxB,YAAY,EAAEqB,KAAK,CAAC,CAAC;EACrBrB,YAAY,GAAG,IAAI;AACrB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","BannerEngineContext","createContext"],"sourceRoot":"../../../src","sources":["runtime/bannerEngineContext.ts"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;;AAE9B;AACA,OAAO,MAAMC,mBAAmB,gBAAGD,KAAK,CAACE,aAAa,CAA6B,IAAI,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { resolveManualAnchorId } from "../anchors/resolveManualAnchorId.js";
|
|
4
|
+
const warned = new Set();
|
|
5
|
+
|
|
6
|
+
/** Body-first is the top edge; body-last is the bottom. Element modes use a placeholder. */
|
|
7
|
+
export function bannerEdge(mode) {
|
|
8
|
+
if (mode === 'BODY_FIRST') return 'top';
|
|
9
|
+
if (mode === 'BODY_LAST') return 'bottom';
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Id of the {@link EmbedBannerPlaceholder} an element-mode banner fills.
|
|
15
|
+
* Manual selectors use `#welcome-banner` or `welcome-banner`. Body modes
|
|
16
|
+
* return null so a top/bottom bar never occupies a host slot.
|
|
17
|
+
*/
|
|
18
|
+
export function embedBannerPlaceholderId(banner) {
|
|
19
|
+
if (bannerEdge(banner.embedMode)) return null;
|
|
20
|
+
return resolveManualAnchorId(banner.embedSelector?.css);
|
|
21
|
+
}
|
|
22
|
+
export function warnBannerOnce(key, message, warn = console.warn) {
|
|
23
|
+
if (warned.has(key)) return;
|
|
24
|
+
warned.add(key);
|
|
25
|
+
warn(message);
|
|
26
|
+
}
|
|
27
|
+
export function resetBannerWarningsForTests() {
|
|
28
|
+
warned.clear();
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=bannerPlacement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolveManualAnchorId","warned","Set","bannerEdge","mode","embedBannerPlaceholderId","banner","embedMode","embedSelector","css","warnBannerOnce","key","message","warn","console","has","add","resetBannerWarningsForTests","clear"],"sourceRoot":"../../../src","sources":["runtime/bannerPlacement.ts"],"mappings":";;AAEA,SAASA,qBAAqB,QAAQ,qCAAkC;AAExE,MAAMC,MAAM,GAAG,IAAIC,GAAG,CAAS,CAAC;;AAEhC;AACA,OAAO,SAASC,UAAUA,CAACC,IAA8B,EAA2B;EAClF,IAAIA,IAAI,KAAK,YAAY,EAAE,OAAO,KAAK;EACvC,IAAIA,IAAI,KAAK,WAAW,EAAE,OAAO,QAAQ;EACzC,OAAO,IAAI;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,wBAAwBA,CAACC,MAAsB,EAAiB;EAC9E,IAAIH,UAAU,CAACG,MAAM,CAACC,SAAS,CAAC,EAAE,OAAO,IAAI;EAC7C,OAAOP,qBAAqB,CAACM,MAAM,CAACE,aAAa,EAAEC,GAAG,CAAC;AACzD;AAEA,OAAO,SAASC,cAAcA,CAC5BC,GAAW,EACXC,OAAe,EACfC,IAA+B,GAAGC,OAAO,CAACD,IAAI,EACxC;EACN,IAAIZ,MAAM,CAACc,GAAG,CAACJ,GAAG,CAAC,EAAE;EACrBV,MAAM,CAACe,GAAG,CAACL,GAAG,CAAC;EACfE,IAAI,CAACD,OAAO,CAAC;AACf;AAEA,OAAO,SAASK,2BAA2BA,CAAA,EAAS;EAClDhB,MAAM,CAACiB,KAAK,CAAC,CAAC;AAChB","ignoreList":[]}
|