@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
|
@@ -2,14 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Parse Builder pairing deep links:
|
|
5
|
-
* {scheme_id}://?pairing_token=<jwt>
|
|
5
|
+
* {scheme_id}://?pairing_token=<jwt>[&purpose=preview|select_element]
|
|
6
6
|
*
|
|
7
|
-
* `scheme_id` is
|
|
7
|
+
* `scheme_id` is `userflow-` followed by an opaque, backend-generated id.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
const PAIRING_PURPOSES = ['preview', 'select_element'];
|
|
11
|
+
export function parsePairingPurpose(value) {
|
|
12
|
+
return PAIRING_PURPOSES.find(purpose => purpose === value) ?? null;
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
/** Scheme prefix shared by preview and pairing links. */
|
|
11
16
|
const USERFLOW_SCHEME_PREFIX = 'userflow-';
|
|
12
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Environment scheme_id shape — must match Expo plugin registration
|
|
19
|
+
* (`packages/expo/plugin/withUserflow.ts`). Everything after `userflow-` is an
|
|
20
|
+
* opaque id owned by the backend (today 26 base32 chars), so only check that it
|
|
21
|
+
* is one or more alphanumeric segments joined by single hyphens. Digit-only ids
|
|
22
|
+
* used in local configs also pass.
|
|
23
|
+
*/
|
|
24
|
+
const USERFLOW_SCHEME = /^userflow-[a-z0-9]+(?:-[a-z0-9]+)*$/i;
|
|
13
25
|
|
|
14
26
|
/**
|
|
15
27
|
* Why a URL was not treated as a pairing link.
|
|
@@ -100,7 +112,7 @@ export function inspectPairingDeepLink(url) {
|
|
|
100
112
|
};
|
|
101
113
|
|
|
102
114
|
// Only once the URL is known to target pairing does the scheme shape matter.
|
|
103
|
-
// Checking it earlier would misreport preview links on
|
|
115
|
+
// Checking it earlier would misreport preview links on malformed schemes.
|
|
104
116
|
if (!USERFLOW_SCHEME.test(scheme)) return {
|
|
105
117
|
ok: false,
|
|
106
118
|
reason: 'bad-scheme-shape'
|
|
@@ -109,11 +121,15 @@ export function inspectPairingDeepLink(url) {
|
|
|
109
121
|
ok: false,
|
|
110
122
|
reason: 'missing-token'
|
|
111
123
|
};
|
|
124
|
+
const purpose = parsePairingPurpose(parsed.searchParams.get('purpose'));
|
|
112
125
|
return {
|
|
113
126
|
ok: true,
|
|
114
127
|
link: {
|
|
115
128
|
scheme,
|
|
116
|
-
pairingToken
|
|
129
|
+
pairingToken,
|
|
130
|
+
...(purpose ? {
|
|
131
|
+
purpose
|
|
132
|
+
} : {})
|
|
117
133
|
}
|
|
118
134
|
};
|
|
119
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["USERFLOW_SCHEME_PREFIX","USERFLOW_SCHEME","isPairingAttempt","reason","inspectPairingDeepLink","url","length","ok","schemeMatch","exec","scheme","isUserflowScheme","toLowerCase","startsWith","remainder","slice","replace","parsed","URL","pairingToken","searchParams","get","hasPairingTokenParam","has","isRoot","hostname","pathname","isPair","test","link","parsePairingDeepLink","result","isUserflowPairingUrl"],"sourceRoot":"../../../src","sources":["pairing/deepLink.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["PAIRING_PURPOSES","parsePairingPurpose","value","find","purpose","USERFLOW_SCHEME_PREFIX","USERFLOW_SCHEME","isPairingAttempt","reason","inspectPairingDeepLink","url","length","ok","schemeMatch","exec","scheme","isUserflowScheme","toLowerCase","startsWith","remainder","slice","replace","parsed","URL","pairingToken","searchParams","get","hasPairingTokenParam","has","isRoot","hostname","pathname","isPair","test","link","parsePairingDeepLink","result","isUserflowPairingUrl"],"sourceRoot":"../../../src","sources":["pairing/deepLink.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;;AASA,MAAMA,gBAA2C,GAAG,CAAC,SAAS,EAAE,gBAAgB,CAAC;AAEjF,OAAO,SAASC,mBAAmBA,CAACC,KAAgC,EAAyB;EAC3F,OAAOF,gBAAgB,CAACG,IAAI,CAAEC,OAAO,IAAKA,OAAO,KAAKF,KAAK,CAAC,IAAI,IAAI;AACtE;;AAEA;AACA,MAAMG,sBAAsB,GAAG,WAAW;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,sCAAsC;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC9BC,MAAgC,EACG;EACnC,OAAOA,MAAM,KAAK,gBAAgB,IAAIA,MAAM,KAAK,kBAAkB,IAAIA,MAAM,KAAK,eAAe;AACnG;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAACC,GAA8B,EAAyB;EAC5F,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAIA,GAAG,CAACC,MAAM,KAAK,CAAC,EAAE;IAC/C,OAAO;MAAEC,EAAE,EAAE,KAAK;MAAEJ,MAAM,EAAE;IAAe,CAAC;EAC9C;EAEA,MAAMK,WAAW,GAAG,wBAAwB,CAACC,IAAI,CAACJ,GAAG,CAAC;EACtD,IAAI,CAACG,WAAW,GAAG,CAAC,CAAC,EAAE,OAAO;IAAED,EAAE,EAAE,KAAK;IAAEJ,MAAM,EAAE;EAAe,CAAC;EACnE,MAAMO,MAAM,GAAGF,WAAW,CAAC,CAAC,CAAC;EAC7B,MAAMG,gBAAgB,GAAGD,MAAM,CAACE,WA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AAE,EAAE,KAAK;MAAEJ,MAAM,EAAE;IAAe,CAAC;EACjG;EAEA,IAAI,CAACwB,MAAM,EAAE,OAAO;IAAEpB,EAAE,EAAE,KAAK;IAAEJ,MAAM,EAAE;EAAgB,CAAC;;EAE1D;EACA;EACA,IAAI,CAACF,eAAe,CAAC2B,IAAI,CAAClB,MAAM,CAAC,EAAE,OAAO;IAAEH,EAAE,EAAE,KAAK;IAAEJ,MAAM,EAAE;EAAmB,CAAC;EAEnF,IAAI,CAACgB,YAAY,EAAE,OAAO;IAAEZ,EAAE,EAAE,KAAK;IAAEJ,MAAM,EAAE;EAAgB,CAAC;EAEhE,MAAMJ,OAAO,GAAGH,mBAAmB,CAACqB,MAAM,CAACG,YAAY,CAACC,GAAG,CAAC,SAAS,CAAC,CAAC;EACvE,OAAO;IAAEd,EAAE,EAAE,IAAI;IAAEsB,IAAI,EAAE;MAAEnB,MAAM;MAAES,YAAY;MAAE,IAAIpB,OAAO,GAAG;QAAEA;MAAQ,CAAC,GAAG,CAAC,CAAC;IAAE;EAAE,CAAC;AACtF;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAAS+B,oBAAoBA,CAACzB,GAA8B,EAA0B;EAC3F,MAAM0B,MAAM,GAAG3B,sBAAsB,CAACC,GAAG,CAAC;EAC1C,OAAO0B,MAAM,CAACxB,EAAE,GAAGwB,MAAM,CAACF,IAAI,GAAG,IAAI;AACvC;;AAEA;AACA,OAAO,SAASG,oBAAoBA,CAAC3B,GAA8B,EAAW;EAC5E,OAAOyB,oBAAoB,CAACzB,GAAG,CAAC,IAAI,IAAI;AAC1C","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
4
|
+
import { uuid } from "../anonymousId.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Stable id for this install on the pairing channel.
|
|
8
|
+
*
|
|
9
|
+
* The server allows one device per pairing topic and only the same id may
|
|
10
|
+
* rejoin while the previous presence lingers. The id identifies the device,
|
|
11
|
+
* not the user, so `reset()` and `exitPreview()` must not clear it.
|
|
12
|
+
*/
|
|
13
|
+
export const PAIRING_DEVICE_ID_STORAGE_KEY = 'userflow:pairingDeviceId';
|
|
14
|
+
let memoized = null;
|
|
15
|
+
export async function getOrCreatePairingDeviceId() {
|
|
16
|
+
if (memoized !== null) return memoized;
|
|
17
|
+
try {
|
|
18
|
+
const stored = await AsyncStorage.getItem(PAIRING_DEVICE_ID_STORAGE_KEY);
|
|
19
|
+
if (typeof stored === 'string' && stored.length > 0) {
|
|
20
|
+
memoized = stored;
|
|
21
|
+
return stored;
|
|
22
|
+
}
|
|
23
|
+
} catch {
|
|
24
|
+
memoized = uuid();
|
|
25
|
+
return memoized;
|
|
26
|
+
}
|
|
27
|
+
const created = uuid();
|
|
28
|
+
memoized = created;
|
|
29
|
+
try {
|
|
30
|
+
await AsyncStorage.setItem(PAIRING_DEVICE_ID_STORAGE_KEY, created);
|
|
31
|
+
} catch {
|
|
32
|
+
// Keep the in-memory id for this process. A later launch may mint another.
|
|
33
|
+
}
|
|
34
|
+
return created;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** @internal Clears the process memo so tests can simulate a new launch. */
|
|
38
|
+
export function resetPairingDeviceIdForTests() {
|
|
39
|
+
memoized = null;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=deviceId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["AsyncStorage","uuid","PAIRING_DEVICE_ID_STORAGE_KEY","memoized","getOrCreatePairingDeviceId","stored","getItem","length","created","setItem","resetPairingDeviceIdForTests"],"sourceRoot":"../../../src","sources":["pairing/deviceId.ts"],"mappings":";;AAAA,OAAOA,YAAY,MAAM,2CAA2C;AAEpE,SAASC,IAAI,QAAQ,mBAAgB;;AAErC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,6BAA6B,GAAG,0BAA0B;AAEvE,IAAIC,QAAuB,GAAG,IAAI;AAElC,OAAO,eAAeC,0BAA0BA,CAAA,EAAoB;EAClE,IAAID,QAAQ,KAAK,IAAI,EAAE,OAAOA,QAAQ;EAEtC,IAAI;IACF,MAAME,MAAM,GAAG,MAAML,YAAY,CAACM,OAAO,CAACJ,6BAA6B,CAAC;IACxE,IAAI,OAAOG,MAAM,KAAK,QAAQ,IAAIA,MAAM,CAACE,MAAM,GAAG,CAAC,EAAE;MACnDJ,QAAQ,GAAGE,MAAM;MACjB,OAAOA,MAAM;IACf;EACF,CAAC,CAAC,MAAM;IACNF,QAAQ,GAAGF,IAAI,CAAC,CAAC;IACjB,OAAOE,QAAQ;EACjB;EAEA,MAAMK,OAAO,GAAGP,IAAI,CAAC,CAAC;EACtBE,QAAQ,GAAGK,OAAO;EAClB,IAAI;IACF,MAAMR,YAAY,CAACS,OAAO,CAACP,6BAA6B,EAAEM,OAAO,CAAC;EACpE,CAAC,CAAC,MAAM;IACN;EAAA;EAEF,OAAOA,OAAO;AAChB;;AAEA;AACA,OAAO,SAASE,4BAA4BA,CAAA,EAAS;EACnDP,QAAQ,GAAG,IAAI;AACjB","ignoreList":[]}
|
|
@@ -73,7 +73,7 @@ export function pairingMissingTokenMessage(url) {
|
|
|
73
73
|
* host app's own scheme substituted for the environment's `scheme_id`.
|
|
74
74
|
*/
|
|
75
75
|
export function pairingForeignSchemeMessage(url) {
|
|
76
|
-
return `${PREFIX} Ignoring "${redactPairingToken(url)}": this is a Builder pairing ` + `link, but it was opened with a scheme Userflow does not own. Use your ` + `environment's scheme_id ("userflow-" followed by
|
|
76
|
+
return `${PREFIX} Ignoring "${redactPairingToken(url)}": this is a Builder pairing ` + `link, but it was opened with a scheme Userflow does not own. Use your ` + `environment's scheme_id ("userflow-" followed by its id) exactly as the ` + `pairing QR code provides it — do not substitute your app's own scheme. ` + `Register it via the @userflow-tech/react-native plugin ({ schemeId: 'userflow-…' }) and ` + `rebuild the native app; a Metro reload is not enough.`;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/** Message for a pairing attempt that could not be used. */
|
|
@@ -100,10 +100,11 @@ export function pairingListenerSetupFailedMessage(reason) {
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* The URL used a `userflow-` scheme that is not a valid `scheme_id`. Pairing
|
|
103
|
-
* requires `userflow-` followed by
|
|
104
|
-
* can match preview links but
|
|
103
|
+
* requires `userflow-` followed by one or more alphanumeric segments joined by
|
|
104
|
+
* single hyphens. A malformed `userflow-*` scheme can match preview links but
|
|
105
|
+
* not pairing ones.
|
|
105
106
|
*/
|
|
106
107
|
export function pairingSchemeShapeMessage(url) {
|
|
107
|
-
return `${PREFIX} Ignoring Builder pairing link "${redactPairingToken(url)}": the scheme must be your ` + `environment's scheme_id — "userflow-" followed by digits (e.g. userflow-
|
|
108
|
+
return `${PREFIX} Ignoring Builder pairing link "${redactPairingToken(url)}": the scheme must be your ` + `environment's scheme_id — "userflow-" followed by letters and digits, optionally ` + `split by single hyphens (e.g. userflow-v7twv2fw2ja2jaco7kesvowmem). ` + `Check the schemeId passed to the @userflow-tech/react-native plugin.`;
|
|
108
109
|
}
|
|
109
110
|
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PREFIX","redactPairingToken","url","replace","defaultPairingLogger","message","console","warn","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","reason","pairingConnectFailedMessage","pairingPreviewErrorMessage","pairingMissingTokenMessage","pairingForeignSchemeMessage","pairingAttemptRejectionMessage","pairingSchemeShapeMessage","pairingTokenStoreClearFailedMessage","pairingListenerSetupFailedMessage"],"sourceRoot":"../../../src","sources":["pairing/diagnostics.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,MAAM,GAAG,YAAY;;AAE3B;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAACC,GAAW,EAAU;EAC/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,GAAG,CAAC;IACzC,KAAK,kBAAkB;MACrB,OAAOc,yBAAyB,CAACd,GAAG,CAAC;IACvC,KAAK,eAAe;MAClB,OAAOW,0BAA0B,CAACX,GAAG,CAAC;EAC1C;AACF;;AAEA;AACA,OAAO,SAASe,mCAAmCA,CAACP,MAAc,EAAU;EAC1E,OACE,GAAGV,MAAM,8CAA8CU,MAAM,iBAAiB,GAC9E,6EAA6E;AAEjF;;AAEA;AACA,OAAO,SAASQ,iCAAiCA,CAACR,MAAc,EAAU;EACxE,OACE,GAAGV,MAAM,+CAA+CU,MAAM,iBAAiB,GAC/E,4EAA4E;AAEhF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,yBAAyBA,CAACd,GAAW,EAAU;EAC7D,OACE,GAAGF,MAAM,mCAAmCC,kBAAkB,CAACC,GAAG,CAAC,6BAA6B,GAChG,mFAAmF,GACnF,sEAAsE;AAE1E","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["PREFIX","redactPairingToken","url","replace","defaultPairingLogger","message","console","warn","pairingLinkDeferredMessage","pairingLinkInitFailedMessage","reason","pairingConnectFailedMessage","pairingPreviewErrorMessage","pairingMissingTokenMessage","pairingForeignSchemeMessage","pairingAttemptRejectionMessage","pairingSchemeShapeMessage","pairingTokenStoreClearFailedMessage","pairingListenerSetupFailedMessage"],"sourceRoot":"../../../src","sources":["pairing/diagnostics.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,MAAM,GAAG,YAAY;;AAE3B;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAACC,GAAW,EAAU;EAC/C,OAAOA,GAAG,CAACC,OAAO,CAAC,wBAAwB,EAAE,cAAc,CAAC;AAC9D;;AAEA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAmC,GAAIC,OAAO,IAAK;EAC9D;EACAC,OAAO,CAACC,IAAI,CAACF,OAAO,CAAC;AACvB,CA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AGV,MAAM,8CAA8CU,MAAM,iBAAiB,GAC9E,6EAA6E;AAEjF;;AAEA;AACA,OAAO,SAASQ,iCAAiCA,CAACR,MAAc,EAAU;EACxE,OACE,GAAGV,MAAM,+CAA+CU,MAAM,iBAAiB,GAC/E,4EAA4E;AAEhF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,yBAAyBA,CAACd,GAAW,EAAU;EAC7D,OACE,GAAGF,MAAM,mCAAmCC,kBAAkB,CAACC,GAAG,CAAC,6BAA6B,GAChG,mFAAmF,GACnF,sEAAsE,GACtE,sEAAsE;AAE1E","ignoreList":[]}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Persist the pairing JWT
|
|
5
|
-
*
|
|
4
|
+
* Persist the pairing JWT so a relaunch can resume Builder pairing until the
|
|
5
|
+
* token expires or preview is exited. Resume requires `expo-secure-store`;
|
|
6
|
+
* the in-memory fallback does not survive a process restart.
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
import { parsePairingPurpose } from "./deepLink.js";
|
|
10
|
+
|
|
11
|
+
// SecureStore rejects keys outside [A-Za-z0-9._-], so no `userflow:` prefix here.
|
|
12
|
+
export const PAIRING_TOKEN_STORAGE_KEY = 'userflow.pairingToken';
|
|
13
|
+
export const PAIRING_PURPOSE_STORAGE_KEY = 'userflow.pairingPurpose';
|
|
9
14
|
let cachedSecureStore;
|
|
10
15
|
|
|
11
16
|
/** Expo modules must be installed natively — not just the JS package. */
|
|
@@ -36,6 +41,7 @@ function tryLoadExpoSecureStore() {
|
|
|
36
41
|
/** In-memory store used when SecureStore is unavailable (and in tests). */
|
|
37
42
|
export function createMemoryPairingTokenStore() {
|
|
38
43
|
let value = null;
|
|
44
|
+
let purposeValue = null;
|
|
39
45
|
return {
|
|
40
46
|
async get() {
|
|
41
47
|
return value;
|
|
@@ -45,6 +51,13 @@ export function createMemoryPairingTokenStore() {
|
|
|
45
51
|
},
|
|
46
52
|
async clear() {
|
|
47
53
|
value = null;
|
|
54
|
+
purposeValue = null;
|
|
55
|
+
},
|
|
56
|
+
async getPurpose() {
|
|
57
|
+
return purposeValue;
|
|
58
|
+
},
|
|
59
|
+
async setPurpose(purpose) {
|
|
60
|
+
purposeValue = purpose;
|
|
48
61
|
}
|
|
49
62
|
};
|
|
50
63
|
}
|
|
@@ -58,24 +71,51 @@ export function createPairingTokenStore() {
|
|
|
58
71
|
return {
|
|
59
72
|
async get() {
|
|
60
73
|
try {
|
|
61
|
-
return await secure.getItemAsync(
|
|
74
|
+
return await secure.getItemAsync(PAIRING_TOKEN_STORAGE_KEY);
|
|
62
75
|
} catch {
|
|
63
76
|
return null;
|
|
64
77
|
}
|
|
65
78
|
},
|
|
66
79
|
async set(token) {
|
|
67
80
|
try {
|
|
68
|
-
await secure.setItemAsync(
|
|
69
|
-
} catch {
|
|
81
|
+
await secure.setItemAsync(PAIRING_TOKEN_STORAGE_KEY, token);
|
|
82
|
+
} catch (error) {
|
|
70
83
|
// Best-effort; reconnect still works from in-memory PairingEngine token.
|
|
84
|
+
if (__DEV__) {
|
|
85
|
+
// eslint-disable-next-line no-console -- intentional persistence diagnostic
|
|
86
|
+
console.warn('[Userflow] Could not save the pairing token, so preview will not resume after a relaunch:', error instanceof Error ? error.message : String(error));
|
|
87
|
+
}
|
|
71
88
|
}
|
|
72
89
|
},
|
|
73
90
|
async clear() {
|
|
74
91
|
try {
|
|
75
|
-
await secure.deleteItemAsync(
|
|
92
|
+
await secure.deleteItemAsync(PAIRING_TOKEN_STORAGE_KEY);
|
|
76
93
|
} catch {
|
|
77
94
|
// ignore
|
|
78
95
|
}
|
|
96
|
+
try {
|
|
97
|
+
await secure.deleteItemAsync(PAIRING_PURPOSE_STORAGE_KEY);
|
|
98
|
+
} catch {
|
|
99
|
+
// ignore
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
async getPurpose() {
|
|
103
|
+
try {
|
|
104
|
+
return parsePairingPurpose(await secure.getItemAsync(PAIRING_PURPOSE_STORAGE_KEY));
|
|
105
|
+
} catch {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
async setPurpose(purpose) {
|
|
110
|
+
try {
|
|
111
|
+
if (purpose) {
|
|
112
|
+
await secure.setItemAsync(PAIRING_PURPOSE_STORAGE_KEY, purpose);
|
|
113
|
+
} else {
|
|
114
|
+
await secure.deleteItemAsync(PAIRING_PURPOSE_STORAGE_KEY);
|
|
115
|
+
}
|
|
116
|
+
} catch {
|
|
117
|
+
// Best-effort; a resume without it falls back to the default reveal.
|
|
118
|
+
}
|
|
79
119
|
}
|
|
80
120
|
};
|
|
81
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["parsePairingPurpose","PAIRING_TOKEN_STORAGE_KEY","PAIRING_PURPOSE_STORAGE_KEY","cachedSecureStore","isExpoModulesRuntimeAvailable","expo","globalThis","EventEmitter","tryLoadExpoSecureStore","undefined","require","__DEV__","console","warn","createMemoryPairingTokenStore","value","purposeValue","get","set","token","clear","getPurpose","setPurpose","purpose","createPairingTokenStore","secure","getItemAsync","setItemAsync","error","Error","message","String","deleteItemAsync","resetPairingTokenStoreCacheForTests"],"sourceRoot":"../../../src","sources":["pairing/tokenStorage.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;;AAIA,SAASA,mBAAmB,QAAQ,eAAY;;AAEhD;AACA,OAAO,MAAMC,yBAAyB,GAAG,uBAAuB;AAChE,OAAO,MAAMC,2BAA2B,GAAG,yBAAyB;AAsBpE,IAAIC,iBAAuD;;AAE3D;AACA,SAASC,6BAA6BA,CAAA,EAAY;EAChD,MAAMC,IAAI,GAAIC,UAAU,CAA2CD,IAAI;EACvE,OAAO,OAAOA,IAAI,EAAEE,YAAY,KAAK,UAAU;AACjD;AAEA,SAASC,sBAAsBA,CAAA,EAA6B;EAC1D,IAAIL,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false,
|
|
12
12
|
awaitingStartCondition: false,
|
|
13
13
|
canRestartPreview: false,
|
|
14
|
-
previewRestartGeneration: 0
|
|
14
|
+
previewRestartGeneration: 0,
|
|
15
|
+
pairingSessionGeneration: 0,
|
|
16
|
+
previewStartGeneration: 0
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
/** Subscribe to Builder pairing / preview-mode state (dev builds only). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","onPairingController","peekPairingController","IDLE","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","usePairingState","state","setState","useState","getState","useEffect","unsubState","bind","controller","onStateChange","existing","unsubInstall"],"sourceRoot":"../../../src","sources":["pairing/usePairingState.ts"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ,qBAAkB;AAE7E,MAAMC,IAAwB,GAAG;EAC/BC,MAAM,EAAE,MAAM;EACdC,SAAS,EAAE,IAAI;EACfC,QAAQ,EAAE,IAAI;EACdC,aAAa,EAAE,KAAK;EACpBC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE,KAAK;EAClBC,sBAAsB,EAAE,KAAK;EAC7BC,iBAAiB,EAAE,KAAK;EACxBC,wBAAwB,EAAE;
|
|
1
|
+
{"version":3,"names":["React","onPairingController","peekPairingController","IDLE","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","pairingSessionGeneration","previewStartGeneration","usePairingState","state","setState","useState","getState","useEffect","unsubState","bind","controller","onStateChange","existing","unsubInstall"],"sourceRoot":"../../../src","sources":["pairing/usePairingState.ts"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ,qBAAkB;AAE7E,MAAMC,IAAwB,GAAG;EAC/BC,MAAM,EAAE,MAAM;EACdC,SAAS,EAAE,IAAI;EACfC,QAAQ,EAAE,IAAI;EACdC,aAAa,EAAE,KAAK;EACpBC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE,KAAK;EAClBC,sBAAsB,EAAE,KAAK;EAC7BC,iBAAiB,EAAE,KAAK;EACxBC,wBAAwB,EAAE,CAAC;EAC3BC,wBAAwB,EAAE,CAAC;EAC3BC,sBAAsB,EAAE;AAC1B,CAAC;;AAED;AACA,OAAO,SAASC,eAAeA,CAAA,EAAuB;EACpD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGjB,KAAK,CAACkB,QAAQ,CACtC,MAAMhB,qBAAqB,CAAC,CAAC,EAAEiB,QAAQ,CAAC,CAAC,IAAIhB,IAC/C,CAAC;EAEDH,KAAK,CAACoB,SAAS,CAAC,MAAM;IACpB,IAAIC,UAAoC;IAExC,MAAMC,IAAI,GAAIC,UAA6B,IAAK;MAC9CF,UAAU,GAAG,CAAC;MACdJ,QAAQ,CAACM,UAAU,CAACJ,QAAQ,CAAC,CAAC,CAAC;MAC/BE,UAAU,GAAGE,UAAU,CAACC,aAAa,CAACP,QAAQ,CAAC;IACjD,CAAC;IAED,MAAMQ,QAAQ,GAAGvB,qBAAqB,CAAC,CAAC;IACxC,IAAIuB,QAAQ,EAAEH,IAAI,CAACG,QAAQ,CAAC;IAC5B,MAAMC,YAAY,GAAGzB,mBAAmB,CAACqB,IAAI,CAAC;IAE9C,OAAO,MAAM;MACXI,YAAY,CAAC,CAAC;MACdL,UAAU,GAAG,CAAC;IAChB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOL,KAAK;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { resolvePreviewChrome } from "./resolvePreviewChrome.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* How long a new pairing session with no `purpose` on its link keeps the
|
|
8
|
+
* default preview bar hidden, so a `selectElement` that arrives after the join
|
|
9
|
+
* never flashes "Preview mode". Restarts once when the socket first reaches
|
|
10
|
+
* `connected` while the hold is still up: a slow connect still shows
|
|
11
|
+
* "Connecting…" after this delay, and a pick that starts shortly after the
|
|
12
|
+
* join stays inside the window.
|
|
13
|
+
*/
|
|
14
|
+
export const INITIAL_REVEAL_DELAY_MS = 2000;
|
|
15
|
+
/**
|
|
16
|
+
* A new session (or chrome appearing) is decided by the link's purpose:
|
|
17
|
+
* `select_element` starts in the selection hold, `preview` is never held, and
|
|
18
|
+
* no purpose falls back to the intro hold. The intro hold hides the bar when
|
|
19
|
+
* preview chrome appears, and again when the session changes while a hold is
|
|
20
|
+
* already hiding it. A bar that is already showing stays up across a re-scan
|
|
21
|
+
* with no purpose. Selection hold replaces the intro once the picker is active
|
|
22
|
+
* and outlives the picker until a Builder preview, a `preview` re-scan, or a
|
|
23
|
+
* re-scan with no purpose. A `select_element` re-scan starts held, including
|
|
24
|
+
* when the bar is already up.
|
|
25
|
+
*/
|
|
26
|
+
function decideHold(prev, holds, input) {
|
|
27
|
+
let introHeld = holds.introHeld;
|
|
28
|
+
let selectionHeld = holds.selectionHeld;
|
|
29
|
+
let connectRestarted = prev.connectRestarted;
|
|
30
|
+
let restartTimer = false;
|
|
31
|
+
const armIntro = () => {
|
|
32
|
+
introHeld = true;
|
|
33
|
+
connectRestarted = false;
|
|
34
|
+
restartTimer = true;
|
|
35
|
+
};
|
|
36
|
+
if (!input.chromeVisible) {
|
|
37
|
+
return {
|
|
38
|
+
introHeld: false,
|
|
39
|
+
selectionHeld: false,
|
|
40
|
+
restartTimer: false,
|
|
41
|
+
inputs: {
|
|
42
|
+
...input,
|
|
43
|
+
connectRestarted: false
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const sessionChanged = input.session !== prev.session;
|
|
48
|
+
const previewStarted = input.previewStart > prev.previewStart;
|
|
49
|
+
if (previewStarted) {
|
|
50
|
+
introHeld = false;
|
|
51
|
+
selectionHeld = false;
|
|
52
|
+
connectRestarted = true;
|
|
53
|
+
} else if (input.pickerActive) {
|
|
54
|
+
selectionHeld = true;
|
|
55
|
+
introHeld = false;
|
|
56
|
+
} else if (sessionChanged || !prev.chromeVisible) {
|
|
57
|
+
if (input.purpose === 'select_element') {
|
|
58
|
+
selectionHeld = true;
|
|
59
|
+
introHeld = false;
|
|
60
|
+
} else if (input.purpose === 'preview') {
|
|
61
|
+
selectionHeld = false;
|
|
62
|
+
introHeld = false;
|
|
63
|
+
} else if (introHeld || selectionHeld || !prev.chromeVisible) {
|
|
64
|
+
selectionHeld = false;
|
|
65
|
+
armIntro();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (introHeld && input.status === 'connected' && !connectRestarted) {
|
|
69
|
+
connectRestarted = true;
|
|
70
|
+
restartTimer = true;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
introHeld,
|
|
74
|
+
selectionHeld,
|
|
75
|
+
restartTimer,
|
|
76
|
+
inputs: {
|
|
77
|
+
...input,
|
|
78
|
+
connectRestarted
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Whether the preview top bar should stay down.
|
|
85
|
+
*
|
|
86
|
+
* The decision is applied during render. Waiting for an effect would mount
|
|
87
|
+
* the bar for a frame and play its slide-in before the hold could hide it.
|
|
88
|
+
* The reveal timer stays in an effect.
|
|
89
|
+
*/
|
|
90
|
+
export function usePreviewBarHold(state, pickerActive) {
|
|
91
|
+
const chromeVisible = resolvePreviewChrome(state).visible;
|
|
92
|
+
const [introHeld, setIntroHeld] = React.useState(false);
|
|
93
|
+
const [selectionHeld, setSelectionHeld] = React.useState(false);
|
|
94
|
+
const [introEpoch, setIntroEpoch] = React.useState(0);
|
|
95
|
+
const purpose = state.pairingPurpose ?? null;
|
|
96
|
+
const inputsRef = React.useRef({
|
|
97
|
+
session: state.pairingSessionGeneration,
|
|
98
|
+
previewStart: state.previewStartGeneration,
|
|
99
|
+
chromeVisible: false,
|
|
100
|
+
pickerActive: false,
|
|
101
|
+
status: state.status,
|
|
102
|
+
purpose,
|
|
103
|
+
connectRestarted: false
|
|
104
|
+
});
|
|
105
|
+
const decision = decideHold(inputsRef.current, {
|
|
106
|
+
introHeld,
|
|
107
|
+
selectionHeld
|
|
108
|
+
}, {
|
|
109
|
+
session: state.pairingSessionGeneration,
|
|
110
|
+
previewStart: state.previewStartGeneration,
|
|
111
|
+
chromeVisible,
|
|
112
|
+
pickerActive,
|
|
113
|
+
status: state.status,
|
|
114
|
+
purpose,
|
|
115
|
+
connectRestarted: false
|
|
116
|
+
});
|
|
117
|
+
inputsRef.current = decision.inputs;
|
|
118
|
+
if (decision.introHeld !== introHeld) {
|
|
119
|
+
setIntroHeld(decision.introHeld);
|
|
120
|
+
}
|
|
121
|
+
if (decision.selectionHeld !== selectionHeld) {
|
|
122
|
+
setSelectionHeld(decision.selectionHeld);
|
|
123
|
+
}
|
|
124
|
+
if (decision.restartTimer) {
|
|
125
|
+
setIntroEpoch(epoch => epoch + 1);
|
|
126
|
+
}
|
|
127
|
+
React.useEffect(() => {
|
|
128
|
+
if (!introHeld) return;
|
|
129
|
+
const timer = setTimeout(() => setIntroHeld(false), INITIAL_REVEAL_DELAY_MS);
|
|
130
|
+
return () => clearTimeout(timer);
|
|
131
|
+
}, [introEpoch, introHeld]);
|
|
132
|
+
return decision.introHeld || decision.selectionHeld;
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=usePreviewBarHold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","resolvePreviewChrome","INITIAL_REVEAL_DELAY_MS","decideHold","prev","holds","input","introHeld","selectionHeld","connectRestarted","restartTimer","armIntro","chromeVisible","inputs","sessionChanged","session","previewStarted","previewStart","pickerActive","purpose","status","usePreviewBarHold","state","visible","setIntroHeld","useState","setSelectionHeld","introEpoch","setIntroEpoch","pairingPurpose","inputsRef","useRef","pairingSessionGeneration","previewStartGeneration","decision","current","epoch","useEffect","timer","setTimeout","clearTimeout"],"sourceRoot":"../../../src","sources":["pairing/usePreviewBarHold.ts"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,oBAAoB,QAAQ,2BAAwB;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAG,IAAI;AAmB3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,UAAUA,CACjBC,IAAgB,EAChBC,KAAqD,EACrDC,KAAiB,EACH;EACd,IAAIC,SAAS,GAAGF,KAAK,CAACE,SAAS;EAC/B,IAAIC,aAAa,GAAGH,KAAK,CAACG,aAAa;EACvC,IAAIC,gBAAgB,GAAGL,IAAI,CAACK,gBAAgB;EAC5C,IAAIC,YAAY,GAAG,KAAK;EAExB,MAAMC,QAAQ,GAAGA,CAAA,KAAY;IAC3BJ,SAAS,GAAG,IAAI;IAChBE,gBAAgB,GAAG,KAAK;IACxBC,YAAY,GAAG,IAAI;EACrB,CAAC;EAED,IAAI,CAACJ,KAAK,CAACM,aAAa,EAAE;IACxB,OAAO;MACLL,SAAS,EAAE,KAAK;MAChBC,aAAa,EAAE,KAAK;MACpBE,YAAY,EAAE,KAAK;MACnBG,MAAM,EAAE;QAAE,GAAGP,KAAK;QAAEG,gBAAgB,EAAE;MAAM;IAC9C,CAAC;EACH;EAEA,MAAMK,cAAc,GAAGR,KAAK,CAACS,OAAO,KAAKX,IAAI,CAACW,OAAO;EACrD,MAAMC,cAAc,GAAGV,KAAK,CAACW,YAAY,GAAGb,IAAI,CAACa,YAAY;EAE7D,IAAID,cAAc,EAAE;IAClBT,SAAS,GAAG,KAAK;IACjBC,aAAa,GAAG,KAAK;IACrBC,gBAAgB,GAAG,IAAI;EACzB,CAAC,MAAM,IAAIH,KAAK,CAACY,YAAY,EAAE;IAC7BV,aAAa,GAA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B,OAAO2B,QAAQ,CAAC3B,SAAS,IAAI2B,QAAQ,CAAC1B,aAAa;AACrD","ignoreList":[]}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { BannerSurface } from "../surfaces/BannerSurface.js";
|
|
6
|
+
import { bannerOverlayHostPadding } from "../surfaces/bannerBarLayout.js";
|
|
7
|
+
import { resolveBannerBackgroundColor } from "../surfaces/resolveBannerTheme.js";
|
|
8
|
+
import { useUserflowSafeAreaInsets } from "../surfaces/safeArea.js";
|
|
9
|
+
import { SdkErrorBoundary } from "./SdkErrorBoundary.js";
|
|
10
|
+
import { bannerEdge, embedBannerPlaceholderId, warnBannerOnce } from "./bannerPlacement.js";
|
|
11
|
+
import { hasEmbedBannerPlaceholder } from "./embedBannerRegistry.js";
|
|
12
|
+
import { useBannerSession } from "./useBannerSession.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Top or bottom banner bar. Element modes render in {@link EmbedBannerPlaceholder}.
|
|
16
|
+
*
|
|
17
|
+
* `overlay` floats over the host. `flow` sits in layout and pushes the app.
|
|
18
|
+
* The bar does not participate in the host accessibility trap.
|
|
19
|
+
*/
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
+
export function BannerHost({
|
|
22
|
+
engine,
|
|
23
|
+
hidden,
|
|
24
|
+
placement = 'overlay',
|
|
25
|
+
edge: edgeFilter
|
|
26
|
+
}) {
|
|
27
|
+
const session = useBannerSession(engine);
|
|
28
|
+
const banner = session?.version.banner ?? null;
|
|
29
|
+
const edge = banner ? bannerEdge(banner.embedMode) : null;
|
|
30
|
+
const insets = useUserflowSafeAreaInsets();
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
if (!session || !banner || edge) return;
|
|
33
|
+
const placeholderId = embedBannerPlaceholderId(banner);
|
|
34
|
+
if (placeholderId && hasEmbedBannerPlaceholder(placeholderId)) return;
|
|
35
|
+
const message = placeholderId ? `Userflow: no EmbedBannerPlaceholder with id "${placeholderId}" is mounted; the banner is not shown` : `Userflow: banner embed mode ${banner.embedMode} needs a manual embed selector and an EmbedBannerPlaceholder with that id`;
|
|
36
|
+
warnBannerOnce(`embed:${session.id}:${banner.embedMode}:${placeholderId ?? 'none'}`, message);
|
|
37
|
+
}, [banner, edge, session]);
|
|
38
|
+
if (hidden || !session || !banner || !edge) return null;
|
|
39
|
+
if (edgeFilter && edge !== edgeFilter) return null;
|
|
40
|
+
const floats = banner.overlay !== false;
|
|
41
|
+
if (placement === 'overlay' !== floats) return null;
|
|
42
|
+
const bar = /*#__PURE__*/_jsx(SdkErrorBoundary, {
|
|
43
|
+
scope: "banner",
|
|
44
|
+
resetKey: session.id,
|
|
45
|
+
children: /*#__PURE__*/_jsx(BannerSurface, {
|
|
46
|
+
session: session,
|
|
47
|
+
onActions: actions => engine.handleActions(actions),
|
|
48
|
+
onDismiss: endReason => {
|
|
49
|
+
void engine.endBanner(endReason);
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
if (placement === 'flow') {
|
|
54
|
+
const backgroundColor = bannerBackground(session);
|
|
55
|
+
const safePad = edge === 'top' ? {
|
|
56
|
+
paddingTop: insets.top
|
|
57
|
+
} : {
|
|
58
|
+
paddingBottom: insets.bottom
|
|
59
|
+
};
|
|
60
|
+
return /*#__PURE__*/_jsx(View, {
|
|
61
|
+
testID: "userflow-banner-flow",
|
|
62
|
+
style: [styles.flow, safePad, {
|
|
63
|
+
backgroundColor
|
|
64
|
+
}],
|
|
65
|
+
children: bar
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const edgeStyle = edge === 'top' ? {
|
|
69
|
+
top: insets.top
|
|
70
|
+
} : {
|
|
71
|
+
bottom: insets.bottom
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/_jsx(View, {
|
|
74
|
+
pointerEvents: "box-none",
|
|
75
|
+
style: [styles.pin, edgeStyle, bannerOverlayHostPadding(insets)],
|
|
76
|
+
children: bar
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function bannerBackground(session) {
|
|
80
|
+
return resolveBannerBackgroundColor(session.version.theme);
|
|
81
|
+
}
|
|
82
|
+
const styles = StyleSheet.create({
|
|
83
|
+
pin: {
|
|
84
|
+
position: 'absolute',
|
|
85
|
+
left: 0,
|
|
86
|
+
right: 0
|
|
87
|
+
},
|
|
88
|
+
flow: {
|
|
89
|
+
alignSelf: 'stretch'
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
//# sourceMappingURL=BannerHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","BannerSurface","bannerOverlayHostPadding","resolveBannerBackgroundColor","useUserflowSafeAreaInsets","SdkErrorBoundary","bannerEdge","embedBannerPlaceholderId","warnBannerOnce","hasEmbedBannerPlaceholder","useBannerSession","jsx","_jsx","BannerHost","engine","hidden","placement","edge","edgeFilter","session","banner","version","embedMode","insets","useEffect","placeholderId","message","id","floats","overlay","bar","scope","resetKey","children","onActions","actions","handleActions","onDismiss","endReason","endBanner","backgroundColor","bannerBackground","safePad","paddingTop","top","paddingBottom","bottom","testID","style","styles","flow","edgeStyle","pointerEvents","pin","theme","create","position","left","right","alignSelf"],"sourceRoot":"../../../src","sources":["runtime/BannerHost.tsx"],"mappings":";;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,aAAa,QAAQ,8BAA2B;AACzD,SAASC,wBAAwB,QAAQ,gCAA6B;AACtE,SAASC,4BAA4B,QAAQ,mCAAgC;AAC7E,SAASC,yBAAyB,QAAQ,yBAAsB;AAEhE,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,UAAU,EAAEC,wBAAwB,EAAEC,cAAc,QAAQ,sBAAmB;AACxF,SAAS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AAEA,SAASW,gBAAgBA,CAACtB,OAA8B,EAAU;EAChE,OAAOhB,4BAA4B,CAACgB,OAAO,CAACE,OAAO,CAACiC,KAAK,CAAC;AAC5D;AAEA,MAAML,MAAM,GAAGlD,UAAU,CAACwD,MAAM,CAAC;EAC/BF,GAAG,EAAE;IACHG,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT,CAAC;EACDR,IAAI,EAAE;IACJS,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { elementPickerController } from "../authoring/elementPickerController.js";
|
|
6
|
+
import { BannerSurface } from "../surfaces/BannerSurface.js";
|
|
7
|
+
import { bannerOverlayHostPadding } from "../surfaces/bannerBarLayout.js";
|
|
8
|
+
import { useUserflowSafeAreaInsets } from "../surfaces/safeArea.js";
|
|
9
|
+
import { SdkErrorBoundary } from "./SdkErrorBoundary.js";
|
|
10
|
+
import { BannerEngineContext } from "./bannerEngineContext.js";
|
|
11
|
+
import { embedBannerPlaceholderId, warnBannerOnce } from "./bannerPlacement.js";
|
|
12
|
+
import { registerEmbedBannerPlaceholder } from "./embedBannerRegistry.js";
|
|
13
|
+
import { useBannerSession } from "./useBannerSession.js";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
+
/**
|
|
16
|
+
* Host slot for an element-mode banner (`ELEMENT_BEFORE`, `ELEMENT_AFTER`,
|
|
17
|
+
* `ELEMENT_FIRST`, `ELEMENT_LAST`). Mount it where the bar should appear.
|
|
18
|
+
* Until a matching banner is active the slot renders nothing, so it takes no
|
|
19
|
+
* space and is not visible. Top and bottom bars ignore this slot.
|
|
20
|
+
* `overlay: false` keeps the bar in layout; `overlay: true` paints it over
|
|
21
|
+
* the content below the slot.
|
|
22
|
+
*/
|
|
23
|
+
export function EmbedBannerPlaceholder({
|
|
24
|
+
id
|
|
25
|
+
}) {
|
|
26
|
+
const engine = React.useContext(BannerEngineContext);
|
|
27
|
+
const placeholderId = id.trim();
|
|
28
|
+
const session = useBannerSession(engine);
|
|
29
|
+
const insets = useUserflowSafeAreaInsets();
|
|
30
|
+
const [pickerActive, setPickerActive] = React.useState(() => elementPickerController.getState().active);
|
|
31
|
+
React.useEffect(() => {
|
|
32
|
+
return elementPickerController.subscribe(next => {
|
|
33
|
+
setPickerActive(next.active);
|
|
34
|
+
});
|
|
35
|
+
}, []);
|
|
36
|
+
React.useLayoutEffect(() => {
|
|
37
|
+
if (!placeholderId) {
|
|
38
|
+
warnBannerOnce('embed-banner-empty-id', 'Userflow: EmbedBannerPlaceholder requires an id');
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
return registerEmbedBannerPlaceholder(placeholderId);
|
|
42
|
+
}, [placeholderId]);
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
if (engine) return;
|
|
45
|
+
warnBannerOnce('embed-banner-outside-provider', 'Userflow: EmbedBannerPlaceholder must be rendered inside UserflowProvider');
|
|
46
|
+
}, [engine]);
|
|
47
|
+
|
|
48
|
+
// No host view until a banner is actually shown. An empty slot would still
|
|
49
|
+
// participate in flex gap and stretch layout.
|
|
50
|
+
if (!engine || !placeholderId || pickerActive || !session) return null;
|
|
51
|
+
const banner = session.version.banner ?? null;
|
|
52
|
+
if (!banner || embedBannerPlaceholderId(banner) !== placeholderId) return null;
|
|
53
|
+
const bar = /*#__PURE__*/_jsx(BannerSurface, {
|
|
54
|
+
session: session,
|
|
55
|
+
onActions: actions => engine.handleActions(actions),
|
|
56
|
+
onDismiss: endReason => {
|
|
57
|
+
void engine.endBanner(endReason);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return /*#__PURE__*/_jsx(SdkErrorBoundary, {
|
|
61
|
+
scope: "banner",
|
|
62
|
+
resetKey: session.id,
|
|
63
|
+
children: banner.overlay !== false ? /*#__PURE__*/_jsx(View, {
|
|
64
|
+
pointerEvents: "box-none",
|
|
65
|
+
testID: "userflow-embed-banner",
|
|
66
|
+
style: styles.overlaySlot,
|
|
67
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
68
|
+
pointerEvents: "box-none",
|
|
69
|
+
style: [styles.overlayBar, bannerOverlayHostPadding(insets)],
|
|
70
|
+
children: bar
|
|
71
|
+
})
|
|
72
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
73
|
+
testID: "userflow-embed-banner",
|
|
74
|
+
style: styles.slot,
|
|
75
|
+
children: bar
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
const styles = StyleSheet.create({
|
|
80
|
+
slot: {
|
|
81
|
+
alignSelf: 'stretch'
|
|
82
|
+
},
|
|
83
|
+
overlaySlot: {
|
|
84
|
+
height: 0,
|
|
85
|
+
alignSelf: 'stretch'
|
|
86
|
+
},
|
|
87
|
+
overlayBar: {
|
|
88
|
+
position: 'absolute',
|
|
89
|
+
left: 0,
|
|
90
|
+
right: 0,
|
|
91
|
+
top: 0
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
//# sourceMappingURL=EmbedBannerPlaceholder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","elementPickerController","BannerSurface","bannerOverlayHostPadding","useUserflowSafeAreaInsets","SdkErrorBoundary","BannerEngineContext","embedBannerPlaceholderId","warnBannerOnce","registerEmbedBannerPlaceholder","useBannerSession","jsx","_jsx","EmbedBannerPlaceholder","id","engine","useContext","placeholderId","trim","session","insets","pickerActive","setPickerActive","useState","getState","active","useEffect","subscribe","next","useLayoutEffect","banner","version","bar","onActions","actions","handleActions","onDismiss","endReason","endBanner","scope","resetKey","children","overlay","pointerEvents","testID","style","styles","overlaySlot","overlayBar","slot","create","alignSelf","height","position","left","right","top"],"sourceRoot":"../../../src","sources":["runtime/EmbedBannerPl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