@userflow-tech/react-native 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +435 -134
- package/app.plugin.js +11 -3
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +53 -6
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +11 -3
- package/docs/anchoring.md +58 -42
- package/docs/deep-linking.md +70 -33
- package/docs/isolation.md +75 -0
- package/docs/troubleshooting.md +103 -44
- package/docs/webview-custom-banner-poc.md +64 -0
- package/expo-plugin/hostDependencyWarnings.d.ts +18 -0
- package/expo-plugin/hostDependencyWarnings.d.ts.map +1 -0
- package/expo-plugin/hostDependencyWarnings.js +91 -0
- package/expo-plugin/hostDependencyWarnings.js.map +1 -0
- package/expo-plugin/withUserflow.d.ts +3 -2
- package/expo-plugin/withUserflow.d.ts.map +1 -1
- package/expo-plugin/withUserflow.js +30 -8
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AnchorRegistry.js +7 -0
- package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +189 -55
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/elementTapMonitor.js +92 -0
- package/lib/commonjs/anchors/elementTapMonitor.js.map +1 -0
- package/lib/commonjs/anchors/elementTargetMatch.js +85 -0
- package/lib/commonjs/anchors/elementTargetMatch.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
- package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +122 -87
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.js +105 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
- package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
- package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
- package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +2 -1
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +26 -17
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveElementTargets.js +158 -0
- package/lib/commonjs/anchors/resolveElementTargets.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +26 -8
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
- package/lib/commonjs/anchors/targetPressMonitor.js +9 -3
- package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -1
- package/lib/commonjs/anchors/useUserflowAnchor.js +1 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/commonjs/anonymousId.js +19 -7
- package/lib/commonjs/anonymousId.js.map +1 -1
- package/lib/commonjs/authoring/ElementPickerOverlay.js +126 -50
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeButton.js +8 -3
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +7 -6
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -1
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -1
- package/lib/commonjs/authoring/fingerprintFromInstance.js +204 -4
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/commonjs/authoring/hitTest.js +264 -16
- package/lib/commonjs/authoring/hitTest.js.map +1 -1
- package/lib/commonjs/authoring/hostAtPoint.js +204 -0
- package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
- package/lib/commonjs/content/BannerStepButton.js +68 -0
- package/lib/commonjs/content/BannerStepButton.js.map +1 -0
- package/lib/commonjs/content/buttonAppearance.js +16 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -1
- package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
- package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/commonjs/content/themeColor.js +15 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deepLinking.js +4 -4
- package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
- package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
- package/lib/commonjs/evalJs/bootstrap.js +84 -0
- package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
- package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
- package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
- package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
- package/lib/commonjs/evalJs/evalJsController.js +124 -0
- package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
- package/lib/commonjs/evalJs/getWebView.js +81 -0
- package/lib/commonjs/evalJs/getWebView.js.map +1 -0
- package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
- package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
- package/lib/commonjs/evalJs/types.js +2 -0
- package/lib/commonjs/evalJs/types.js.map +1 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
- package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +19 -0
- package/lib/commonjs/expo-router/index.js.map +1 -1
- package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
- package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/commonjs/index.js +123 -43
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/installCheck.js +151 -0
- package/lib/commonjs/installCheck.js.map +1 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js +245 -27
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +55 -16
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/deepLink.js +22 -5
- package/lib/commonjs/pairing/deepLink.js.map +1 -1
- package/lib/commonjs/pairing/deviceId.js +50 -0
- package/lib/commonjs/pairing/deviceId.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +5 -4
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/tokenStorage.js +47 -7
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
- package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/commonjs/runtime/BannerHost.js +96 -0
- package/lib/commonjs/runtime/BannerHost.js.map +1 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
- package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
- package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +31 -13
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
- package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +138 -65
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/bannerEngine.js +63 -0
- package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
- package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
- package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
- package/lib/commonjs/runtime/bannerPlacement.js +37 -0
- package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
- package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +75 -3
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/isolateCall.js +48 -0
- package/lib/commonjs/runtime/isolateCall.js.map +1 -0
- package/lib/commonjs/runtime/reportSdkError.js +19 -0
- package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
- package/lib/commonjs/runtime/useBannerSession.js +37 -0
- package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
- package/lib/commonjs/screenTracker.js +34 -9
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/storage/asyncStorage.js +67 -0
- package/lib/commonjs/storage/asyncStorage.js.map +1 -0
- package/lib/commonjs/surfaces/BannerBar.js +160 -0
- package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
- package/lib/commonjs/surfaces/BannerSurface.js +78 -0
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +17 -1
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
- package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
- package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
- package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
- package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
- package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/commonjs/surfaces/safeArea.js +76 -13
- package/lib/commonjs/surfaces/safeArea.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AnchorRegistry.js +7 -0
- package/lib/module/anchors/AnchorRegistry.js.map +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +189 -55
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/elementTapMonitor.js +87 -0
- package/lib/module/anchors/elementTapMonitor.js.map +1 -0
- package/lib/module/anchors/elementTargetMatch.js +78 -0
- package/lib/module/anchors/elementTargetMatch.js.map +1 -0
- package/lib/module/anchors/fiber/fiberPath.js +118 -0
- package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +120 -87
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
- package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
- package/lib/module/anchors/fiber/touchTargetFiber.js +100 -0
- package/lib/module/anchors/fiber/touchTargetFiber.js.map +1 -0
- package/lib/module/anchors/fiber/visibleRect.js +139 -0
- package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +73 -37
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
- package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
- package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +2 -1
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +25 -18
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveElementTargets.js +152 -0
- package/lib/module/anchors/resolveElementTargets.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +26 -9
- package/lib/module/anchors/semanticMatcher.js.map +1 -1
- package/lib/module/anchors/targetPressMonitor.js +8 -3
- package/lib/module/anchors/targetPressMonitor.js.map +1 -1
- package/lib/module/anchors/useUserflowAnchor.js +1 -0
- package/lib/module/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/module/anonymousId.js +18 -6
- package/lib/module/anonymousId.js.map +1 -1
- package/lib/module/authoring/ElementPickerOverlay.js +128 -52
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +32 -10
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeButton.js +8 -3
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeIcon.js +4 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -1
- package/lib/module/authoring/chrome/ChromeTopBar.js +23 -10
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -1
- package/lib/module/authoring/chrome/DoubleTapBridge.js +19 -12
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -1
- package/lib/module/authoring/chrome/doubleTapMonitor.js +10 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -1
- package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +7 -6
- package/lib/module/authoring/chrome/tokens.js.map +1 -1
- package/lib/module/authoring/elementPickerController.js.map +1 -1
- package/lib/module/authoring/fingerprintFromInstance.js +198 -4
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/module/authoring/hitTest.js +264 -18
- package/lib/module/authoring/hitTest.js.map +1 -1
- package/lib/module/authoring/hostAtPoint.js +199 -0
- package/lib/module/authoring/hostAtPoint.js.map +1 -0
- package/lib/module/content/BannerStepButton.js +63 -0
- package/lib/module/content/BannerStepButton.js.map +1 -0
- package/lib/module/content/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -1
- package/lib/module/content/resolveBannerButtonChrome.js +41 -0
- package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
- package/lib/module/content/themeColor.js +14 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deepLinking.js +4 -4
- package/lib/module/evalJs/EvalJsHost.js +239 -0
- package/lib/module/evalJs/EvalJsHost.js.map +1 -0
- package/lib/module/evalJs/bootstrap.js +76 -0
- package/lib/module/evalJs/bootstrap.js.map +1 -0
- package/lib/module/evalJs/bridgeMessages.js +139 -0
- package/lib/module/evalJs/bridgeMessages.js.map +1 -0
- package/lib/module/evalJs/evalJsBridge.js +25 -0
- package/lib/module/evalJs/evalJsBridge.js.map +1 -0
- package/lib/module/evalJs/evalJsController.js +119 -0
- package/lib/module/evalJs/evalJsController.js.map +1 -0
- package/lib/module/evalJs/getWebView.js +76 -0
- package/lib/module/evalJs/getWebView.js.map +1 -0
- package/lib/module/evalJs/injectEvalPending.js +15 -0
- package/lib/module/evalJs/injectEvalPending.js.map +1 -0
- package/lib/module/evalJs/types.js +2 -0
- package/lib/module/evalJs/types.js.map +1 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
- package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
- package/lib/module/expo-router/index.js +1 -0
- package/lib/module/expo-router/index.js.map +1 -1
- package/lib/module/expo-router/redirectSystemPath.js +70 -0
- package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +2 -2
- package/lib/module/index.js +119 -45
- package/lib/module/index.js.map +1 -1
- package/lib/module/installCheck.js +139 -0
- package/lib/module/installCheck.js.map +1 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +14 -11
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/module/pairing/PairingController.js +245 -27
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +54 -16
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/deepLink.js +21 -5
- package/lib/module/pairing/deepLink.js.map +1 -1
- package/lib/module/pairing/deviceId.js +45 -0
- package/lib/module/pairing/deviceId.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +5 -4
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/tokenStorage.js +47 -7
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/pairing/usePreviewBarHold.js +134 -0
- package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
- package/lib/module/runtime/BannerHost.js +92 -0
- package/lib/module/runtime/BannerHost.js.map +1 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
- package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
- package/lib/module/runtime/SdkErrorBoundary.js +55 -0
- package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +31 -13
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowOverlay.js +92 -0
- package/lib/module/runtime/UserflowOverlay.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +139 -66
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/bannerEngine.js +55 -0
- package/lib/module/runtime/bannerEngine.js.map +1 -0
- package/lib/module/runtime/bannerEngineContext.js +7 -0
- package/lib/module/runtime/bannerEngineContext.js.map +1 -0
- package/lib/module/runtime/bannerPlacement.js +30 -0
- package/lib/module/runtime/bannerPlacement.js.map +1 -0
- package/lib/module/runtime/embedBannerRegistry.js +24 -0
- package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +72 -3
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/isolateCall.js +43 -0
- package/lib/module/runtime/isolateCall.js.map +1 -0
- package/lib/module/runtime/reportSdkError.js +15 -0
- package/lib/module/runtime/reportSdkError.js.map +1 -0
- package/lib/module/runtime/useBannerSession.js +33 -0
- package/lib/module/runtime/useBannerSession.js.map +1 -0
- package/lib/module/screenTracker.js +33 -9
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/storage/asyncStorage.js +61 -0
- package/lib/module/storage/asyncStorage.js.map +1 -0
- package/lib/module/surfaces/BannerBar.js +155 -0
- package/lib/module/surfaces/BannerBar.js.map +1 -0
- package/lib/module/surfaces/BannerSurface.js +72 -0
- package/lib/module/surfaces/BannerSurface.js.map +1 -0
- package/lib/module/surfaces/MadeWithUserflow.js +11 -7
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +1 -1
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +17 -1
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/bannerBarLayout.js +69 -0
- package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
- package/lib/module/surfaces/bannerBarTokens.js +37 -0
- package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
- package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
- package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
- package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
- package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
- package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
- package/lib/module/surfaces/resolveBannerTheme.js +16 -0
- package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
- package/lib/module/surfaces/safeArea.js +72 -13
- package/lib/module/surfaces/safeArea.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +12 -16
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts +36 -0
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +21 -8
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/touchTargetFiber.d.ts +24 -0
- package/lib/typescript/commonjs/src/anchors/fiber/touchTargetFiber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +2 -1
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts +39 -0
- package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anonymousId.d.ts +3 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/commonjs/src/index.d.ts +16 -1
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts +33 -0
- package/lib/typescript/commonjs/src/installCheck.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts +4 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +2 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts +7 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts +15 -0
- package/lib/typescript/commonjs/src/storage/asyncStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +9 -1
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +14 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +12 -16
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts +36 -0
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts +20 -0
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
- package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +21 -8
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/touchTargetFiber.d.ts +24 -0
- package/lib/typescript/module/src/anchors/fiber/touchTargetFiber.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
- package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +2 -1
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +10 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts +39 -0
- package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +6 -4
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +2 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/module/src/anonymousId.d.ts +3 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +7 -6
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +2 -3
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +57 -2
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hitTest.d.ts +47 -3
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
- package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
- package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/themeColor.d.ts +2 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/content/types.d.ts +1 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -1
- package/lib/typescript/module/src/deepLinking.d.ts +4 -4
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
- package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
- package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
- package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
- package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
- package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
- package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
- package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
- package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
- package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
- package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
- package/lib/typescript/module/src/index.d.ts +16 -1
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/installCheck.d.ts +33 -0
- package/lib/typescript/module/src/installCheck.d.ts.map +1 -0
- package/lib/typescript/module/src/lifecycle.d.ts +4 -1
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +71 -4
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +9 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
- package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +3 -2
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +14 -2
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
- package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
- package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
- package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
- package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +2 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +9 -3
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
- package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
- package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
- package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
- package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
- package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
- package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
- package/lib/typescript/module/src/screenTracker.d.ts +7 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/storage/asyncStorage.d.ts +15 -0
- package/lib/typescript/module/src/storage/asyncStorage.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
- package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +9 -1
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +16 -3
- package/src/anchors/AnchorRegistry.ts +12 -0
- package/src/anchors/AutoAnchorRegistry.ts +41 -11
- package/src/anchors/elementConditionEvaluator.ts +235 -70
- package/src/anchors/elementTapMonitor.ts +95 -0
- package/src/anchors/elementTargetMatch.ts +90 -0
- package/src/anchors/fiber/fiberPath.ts +117 -0
- package/src/anchors/fiber/findAnchorFiber.ts +121 -80
- package/src/anchors/fiber/resolveFiberPath.ts +215 -0
- package/src/anchors/fiber/touchTargetFiber.ts +125 -0
- package/src/anchors/fiber/visibleRect.ts +153 -0
- package/src/anchors/fiber/visibleScreens.ts +74 -36
- package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
- package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
- package/src/anchors/resolveAnchorHost.ts +2 -1
- package/src/anchors/resolveAutoAnchorHost.ts +20 -18
- package/src/anchors/resolveElementTargets.ts +165 -0
- package/src/anchors/semanticMatcher.ts +38 -14
- package/src/anchors/targetPressMonitor.ts +12 -3
- package/src/anchors/useUserflowAnchor.ts +1 -0
- package/src/anonymousId.ts +20 -8
- package/src/authoring/ElementPickerOverlay.tsx +168 -59
- package/src/authoring/chrome/ChromeBottomSheet.tsx +49 -8
- package/src/authoring/chrome/ChromeButton.tsx +9 -4
- package/src/authoring/chrome/ChromeIcon.tsx +10 -1
- package/src/authoring/chrome/ChromeTopBar.tsx +39 -15
- package/src/authoring/chrome/DoubleTapBridge.tsx +19 -12
- package/src/authoring/chrome/doubleTapMonitor.ts +10 -0
- package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
- package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +7 -2
- package/src/authoring/elementPickerController.ts +2 -4
- package/src/authoring/fingerprintFromInstance.ts +170 -4
- package/src/authoring/hitTest.ts +324 -16
- package/src/authoring/hostAtPoint.ts +247 -0
- package/src/content/BannerStepButton.tsx +91 -0
- package/src/content/buttonAppearance.ts +16 -0
- package/src/content/resolveBannerButtonChrome.ts +49 -0
- package/src/content/themeColor.ts +15 -0
- package/src/content/types.ts +1 -0
- package/src/deepLinking.ts +4 -4
- package/src/evalJs/EvalJsHost.tsx +255 -0
- package/src/evalJs/bootstrap.ts +83 -0
- package/src/evalJs/bridgeMessages.ts +134 -0
- package/src/evalJs/evalJsBridge.ts +42 -0
- package/src/evalJs/evalJsController.ts +127 -0
- package/src/evalJs/getWebView.ts +124 -0
- package/src/evalJs/injectEvalPending.ts +14 -0
- package/src/evalJs/types.ts +56 -0
- package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
- package/src/expo-router/index.ts +8 -0
- package/src/expo-router/redirectSystemPath.ts +86 -0
- package/src/expo-router/useUserflowExpoRouter.ts +2 -2
- package/src/index.ts +139 -45
- package/src/installCheck.ts +191 -0
- package/src/lifecycle.ts +4 -1
- package/src/navigation/WithUserflowReactNavigation.tsx +13 -10
- package/src/navigation/openFlowNavigateUrl.ts +12 -5
- package/src/pairing/PairingController.ts +283 -29
- package/src/pairing/PreviewModeBanner.tsx +71 -14
- package/src/pairing/deepLink.ts +23 -5
- package/src/pairing/deviceId.ts +46 -0
- package/src/pairing/diagnostics.ts +6 -4
- package/src/pairing/tokenStorage.ts +60 -7
- package/src/pairing/usePairingState.ts +2 -0
- package/src/pairing/usePreviewBarHold.ts +160 -0
- package/src/runtime/BannerHost.tsx +102 -0
- package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
- package/src/runtime/SdkErrorBoundary.tsx +77 -0
- package/src/runtime/TargetPressBridge.tsx +36 -13
- package/src/runtime/UserflowOverlay.tsx +118 -0
- package/src/runtime/UserflowProvider.tsx +146 -64
- package/src/runtime/bannerEngine.ts +55 -0
- package/src/runtime/bannerEngineContext.ts +5 -0
- package/src/runtime/bannerPlacement.ts +36 -0
- package/src/runtime/embedBannerRegistry.ts +28 -0
- package/src/runtime/flowEngine.ts +76 -3
- package/src/runtime/isolateCall.ts +53 -0
- package/src/runtime/reportSdkError.ts +12 -0
- package/src/runtime/useBannerSession.ts +35 -0
- package/src/screenTracker.ts +34 -8
- package/src/storage/asyncStorage.ts +88 -0
- package/src/surfaces/BannerBar.tsx +176 -0
- package/src/surfaces/BannerSurface.tsx +82 -0
- package/src/surfaces/MadeWithUserflow.tsx +15 -10
- package/src/surfaces/ModalSurface.tsx +1 -1
- package/src/surfaces/TooltipSurface.tsx +17 -1
- package/src/surfaces/bannerBarLayout.ts +74 -0
- package/src/surfaces/bannerBarTokens.ts +34 -0
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
- package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
- package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
- package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
- package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
- package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
- package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
- package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
- package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
- package/src/surfaces/resolveBannerTheme.ts +18 -0
- package/src/surfaces/safeArea.ts +88 -19
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js +4 -4
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/constants.d.ts +2 -0
- package/vendor/core/dist/constants.d.ts.map +1 -1
- package/vendor/core/dist/constants.js +2 -0
- package/vendor/core/dist/constants.js.map +1 -1
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
- package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts +20 -1
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/ClientConditionEngine.js +13 -10
- package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +41 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +167 -28
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +38 -2
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +19 -2
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +10 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +68 -29
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/handleActions.d.ts +17 -3
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +17 -14
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/trackCondition.d.ts +2 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackCondition.js +4 -2
- package/vendor/core/dist/engine/trackCondition.js.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +11 -1
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -1
- package/vendor/core/dist/engine/trackStepTriggers.js +42 -16
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -1
- package/vendor/core/dist/errors.d.ts +11 -1
- package/vendor/core/dist/errors.d.ts.map +1 -1
- package/vendor/core/dist/errors.js +2 -1
- package/vendor/core/dist/errors.js.map +1 -1
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
- package/vendor/core/dist/eventAttributes.js +4 -2
- package/vendor/core/dist/eventAttributes.js.map +1 -1
- package/vendor/core/dist/index.d.ts +5 -2
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +1 -0
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.js +9 -7
- package/vendor/core/dist/normalizeAttributes.js.map +1 -1
- package/vendor/core/dist/transport/pairing.d.ts +5 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
- package/vendor/core/dist/transport/pairing.js +69 -2
- package/vendor/core/dist/transport/pairing.js.map +1 -1
- package/vendor/core/dist/transport/phoenix.d.ts +8 -0
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +16 -2
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/autoData.d.ts +8 -15
- package/vendor/protocol/dist/autoData.d.ts.map +1 -1
- package/vendor/protocol/dist/autoData.js.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +58 -2
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +20 -2
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +22 -12
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +5 -2
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -11,13 +11,14 @@ export interface MadeWithUserflowProps {
|
|
|
11
11
|
/** Theme main foreground (`fontColor`) — matches web `--userflow-main-foreground-color`. */
|
|
12
12
|
color: string;
|
|
13
13
|
/**
|
|
14
|
-
* Bubble content inset (modal 24 / tooltip 24).
|
|
15
|
-
*
|
|
14
|
+
* Bubble content inset (modal 24 / tooltip 24). Only used when `embedded`,
|
|
15
|
+
* to pull the legend back out to the card edge.
|
|
16
16
|
*/
|
|
17
17
|
contentPadding: number;
|
|
18
18
|
/**
|
|
19
|
-
* When true,
|
|
20
|
-
*
|
|
19
|
+
* When true, the footer sits inside a ScrollView whose start padding is
|
|
20
|
+
* `contentPadding` and owns the gap above itself (modal body). Otherwise the
|
|
21
|
+
* parent supplies {@link MADE_WITH_USERFLOW_GAP} and the footer spans the card.
|
|
21
22
|
*/
|
|
22
23
|
embedded?: boolean;
|
|
23
24
|
}
|
|
@@ -26,8 +27,9 @@ export interface MadeWithUserflowProps {
|
|
|
26
27
|
* Web "Made with Userflow" attribution (FlowChrome). Shown when the company
|
|
27
28
|
* has `flowBranding` enabled; opens the Userflow homepage with UTM params.
|
|
28
29
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
30
|
+
* Sits in the card corner (Figma: 8pt from the start and bottom edges) rather
|
|
31
|
+
* than on the content inset. Rendered in flow instead of absolutely so a
|
|
32
|
+
* scaled-up label pushes the card taller instead of overlapping the body.
|
|
31
33
|
*/
|
|
32
34
|
export function MadeWithUserflow({
|
|
33
35
|
company,
|
|
@@ -48,11 +50,10 @@ export function MadeWithUserflow({
|
|
|
48
50
|
embedded
|
|
49
51
|
? {
|
|
50
52
|
marginTop: MADE_WITH_USERFLOW_GAP,
|
|
51
|
-
|
|
53
|
+
marginStart: MADE_WITH_USERFLOW_INSET - contentPadding,
|
|
52
54
|
}
|
|
53
55
|
: {
|
|
54
|
-
|
|
55
|
-
paddingBottom: contentPadding,
|
|
56
|
+
paddingStart: MADE_WITH_USERFLOW_INSET,
|
|
56
57
|
},
|
|
57
58
|
]}
|
|
58
59
|
pointerEvents="box-none"
|
|
@@ -81,9 +82,13 @@ export function MadeWithUserflow({
|
|
|
81
82
|
/** Gap between step content/buttons and the branding footer (web spacer height). */
|
|
82
83
|
export const MADE_WITH_USERFLOW_GAP = 16;
|
|
83
84
|
|
|
85
|
+
/** Legend offset from the card's start and bottom edges. */
|
|
86
|
+
export const MADE_WITH_USERFLOW_INSET = 8;
|
|
87
|
+
|
|
84
88
|
const styles = StyleSheet.create({
|
|
85
89
|
footer: {
|
|
86
90
|
flexShrink: 0,
|
|
91
|
+
paddingBottom: MADE_WITH_USERFLOW_INSET,
|
|
87
92
|
},
|
|
88
93
|
link: {
|
|
89
94
|
flexDirection: 'row',
|
|
@@ -98,6 +103,6 @@ const styles = StyleSheet.create({
|
|
|
98
103
|
label: {
|
|
99
104
|
fontSize: 12,
|
|
100
105
|
fontWeight: '500',
|
|
101
|
-
lineHeight:
|
|
106
|
+
lineHeight: 16,
|
|
102
107
|
},
|
|
103
108
|
});
|
|
@@ -13,12 +13,12 @@ import type { LookupAttribute } from '../content/types';
|
|
|
13
13
|
|
|
14
14
|
import { CardFade } from './CardFade';
|
|
15
15
|
import { CLOSE_BUTTON_INSET, CLOSE_BUTTON_SIZE, CloseButton } from './CloseButton';
|
|
16
|
-
import { resolveCloseButtonColor } from './resolveCloseButtonColor';
|
|
17
16
|
import { MadeWithUserflow } from './MadeWithUserflow';
|
|
18
17
|
import { ProgressBar } from './ProgressBar';
|
|
19
18
|
import { ABSOLUTE_FILL } from './absoluteFill';
|
|
20
19
|
import { parseBackdropOpacity } from './parseBackdropOpacity';
|
|
21
20
|
import { resolveStepProgress } from './progress';
|
|
21
|
+
import { resolveCloseButtonColor } from './resolveCloseButtonColor';
|
|
22
22
|
import {
|
|
23
23
|
resolveModalButtonsAlign,
|
|
24
24
|
resolveModalCardMaxHeight,
|
|
@@ -22,6 +22,7 @@ import { autoAnchorRegistry } from '../anchors/AutoAnchorRegistry';
|
|
|
22
22
|
import { addAnimationFrameCallback, removeAnimationFrameCallback } from '../anchors/animationFrame';
|
|
23
23
|
import { fiberScanRoot } from '../anchors/fiber/FiberScanRoot';
|
|
24
24
|
import type { AnyFiber } from '../anchors/fiber/fiberInternals';
|
|
25
|
+
import { clipToScrollViewports } from '../anchors/fiber/visibleRect';
|
|
25
26
|
import {
|
|
26
27
|
clearFiberAnchorCache,
|
|
27
28
|
invalidateFiberAnchor,
|
|
@@ -230,6 +231,9 @@ export function TooltipSurface({
|
|
|
230
231
|
const resolveEpochRef = React.useRef(0);
|
|
231
232
|
/** Latest resolved host fiber (for scroll-ancestor walk + rAF remeasure). */
|
|
232
233
|
const hostFiberRef = React.useRef<AnyFiber | null>(null);
|
|
234
|
+
/** Target rect clipped to scroll viewports, for tap detection only. */
|
|
235
|
+
const clippedPressRef = React.useRef<Rect | null>(null);
|
|
236
|
+
const clipGenRef = React.useRef(0);
|
|
233
237
|
const hostMeasureRef = React.useRef<
|
|
234
238
|
((callback: (x: number, y: number, width: number, height: number) => void) => void) | null
|
|
235
239
|
>(null);
|
|
@@ -333,6 +337,18 @@ export function TooltipSurface({
|
|
|
333
337
|
}
|
|
334
338
|
targetRef.current = next;
|
|
335
339
|
setTarget(next);
|
|
340
|
+
if (next == null) {
|
|
341
|
+
clippedPressRef.current = null;
|
|
342
|
+
return;
|
|
343
|
+
}
|
|
344
|
+
clippedPressRef.current = next;
|
|
345
|
+
const fiber = hostFiberRef.current;
|
|
346
|
+
const gen = (clipGenRef.current += 1);
|
|
347
|
+
if (!fiber) return;
|
|
348
|
+
void clipToScrollViewports(fiber, next).then((clipped) => {
|
|
349
|
+
if (clipGenRef.current !== gen) return;
|
|
350
|
+
clippedPressRef.current = clipped;
|
|
351
|
+
});
|
|
336
352
|
}, []);
|
|
337
353
|
|
|
338
354
|
const markMeasureAttempted = React.useCallback(() => {
|
|
@@ -815,7 +831,7 @@ export function TooltipSurface({
|
|
|
815
831
|
}
|
|
816
832
|
|
|
817
833
|
targetPressMonitor.set({
|
|
818
|
-
getRect: () =>
|
|
834
|
+
getRect: () => clippedPressRef.current,
|
|
819
835
|
onPress: () => {
|
|
820
836
|
// Native touches are async relative to commits, so re-check the phase.
|
|
821
837
|
if (exitingRef.current) return;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { BannerFragment } from '@userflow-tech/protocol';
|
|
2
|
+
import { BannerContentLayout } from '@userflow-tech/protocol';
|
|
3
|
+
import type { ViewStyle } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
BANNER_INNER_COLUMN_GAP,
|
|
7
|
+
BANNER_INNER_MARGIN_HORIZONTAL,
|
|
8
|
+
BANNER_INNER_ROW_GAP,
|
|
9
|
+
BANNER_OVERLAY_SCREEN_INSET_HORIZONTAL,
|
|
10
|
+
} from './bannerBarTokens';
|
|
11
|
+
import type { EdgeInsets } from './safeArea';
|
|
12
|
+
|
|
13
|
+
export { BANNER_CLOSE_SLOT_SIZE, BANNER_ROOT_PADDING } from './bannerBarTokens';
|
|
14
|
+
|
|
15
|
+
function optionalMargin(value: number | null | undefined): number | undefined {
|
|
16
|
+
return value == null ? undefined : value;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Outer frame: max embed width and builder outer margin (web `userflowjs-banner-frame`). */
|
|
20
|
+
export function bannerFrameStyle(banner: BannerFragment): ViewStyle {
|
|
21
|
+
const hasMaxWidth = banner.maxWidth != null;
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
alignSelf: hasMaxWidth ? 'center' : 'stretch',
|
|
25
|
+
...(hasMaxWidth ? { maxWidth: banner.maxWidth! } : null),
|
|
26
|
+
marginTop: optionalMargin(banner.marginTop),
|
|
27
|
+
marginRight: optionalMargin(banner.marginRight),
|
|
28
|
+
marginBottom: optionalMargin(banner.marginBottom),
|
|
29
|
+
marginLeft: optionalMargin(banner.marginLeft),
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Corner radius on the painted bar when configured in the builder. */
|
|
34
|
+
export function resolveBannerBarBorderRadius(banner: BannerFragment): number | undefined {
|
|
35
|
+
return banner.borderRadius ?? undefined;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Horizontal inset for overlay hosts — at least Figma inset, or safe area when larger. */
|
|
39
|
+
export function bannerOverlayHostPadding(insets: EdgeInsets): ViewStyle {
|
|
40
|
+
const horizontal = Math.max(BANNER_OVERLAY_SCREEN_INSET_HORIZONTAL, insets.left, insets.right);
|
|
41
|
+
return { paddingHorizontal: horizontal };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Flex justification for the inner row (web content-layout modifiers). */
|
|
45
|
+
export function bannerInnerJustifyContent(
|
|
46
|
+
layout: BannerContentLayout,
|
|
47
|
+
): ViewStyle['justifyContent'] {
|
|
48
|
+
switch (layout) {
|
|
49
|
+
case BannerContentLayout.CENTER:
|
|
50
|
+
return 'center';
|
|
51
|
+
case BannerContentLayout.SPACE_BETWEEN:
|
|
52
|
+
return 'space-between';
|
|
53
|
+
case BannerContentLayout.START:
|
|
54
|
+
default:
|
|
55
|
+
return 'flex-start';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function bannerInnerStyle(banner: BannerFragment): ViewStyle {
|
|
60
|
+
const hasMaxContentWidth = banner.maxContentWidth != null;
|
|
61
|
+
return {
|
|
62
|
+
flexGrow: 1,
|
|
63
|
+
flexShrink: 1,
|
|
64
|
+
flexBasis: 0,
|
|
65
|
+
flexDirection: 'row',
|
|
66
|
+
flexWrap: 'wrap',
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
columnGap: BANNER_INNER_COLUMN_GAP,
|
|
69
|
+
rowGap: BANNER_INNER_ROW_GAP,
|
|
70
|
+
marginHorizontal: BANNER_INNER_MARGIN_HORIZONTAL,
|
|
71
|
+
justifyContent: bannerInnerJustifyContent(banner.contentLayout),
|
|
72
|
+
...(hasMaxContentWidth ? { maxWidth: banner.maxContentWidth!, width: '100%' } : null),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* End-user banner chrome from Figma `Userflow - React native`
|
|
5
|
+
* (`BojC6qdlFUytdD1bRsNLV8`, node `1551-1208` — SDK Embed Banner) and web
|
|
6
|
+
* `userflowjs-banner-*` in bubble-frame.styl. Layout numbers match web
|
|
7
|
+
* `$padding-*` at 1rem = 16px.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const BANNER_ROOT_PADDING = 8;
|
|
11
|
+
export const BANNER_INNER_MARGIN_HORIZONTAL = 8;
|
|
12
|
+
export const BANNER_INNER_COLUMN_GAP = 16;
|
|
13
|
+
export const BANNER_INNER_ROW_GAP = 8;
|
|
14
|
+
export const BANNER_BUTTON_GAP = 8;
|
|
15
|
+
export const BANNER_BUTTON_PADDING_HORIZONTAL = 12;
|
|
16
|
+
/** Web `--userflow-button-height` default (36). Close control is square at this size. */
|
|
17
|
+
export const BANNER_CLOSE_SLOT_SIZE = 36;
|
|
18
|
+
export const BANNER_CLOSE_BORDER_RADIUS = 4;
|
|
19
|
+
|
|
20
|
+
/** Overlay embed: horizontal inset from screen edges (Figma; excludes builder outer margin). */
|
|
21
|
+
export const BANNER_OVERLAY_SCREEN_INSET_HORIZONTAL = 16;
|
|
22
|
+
/** Figma Shadow/Card — separates a full-bleed overlay bar from app content. */
|
|
23
|
+
const BANNER_SHADOW_COLOR = '#132b39';
|
|
24
|
+
|
|
25
|
+
export function bannerOverlayShadowStyle(edge: 'top' | 'bottom'): ViewStyle {
|
|
26
|
+
const offsetY = edge === 'top' ? 4 : -4;
|
|
27
|
+
return {
|
|
28
|
+
shadowColor: BANNER_SHADOW_COLOR,
|
|
29
|
+
shadowOffset: { width: 0, height: offsetY },
|
|
30
|
+
shadowOpacity: 0.1,
|
|
31
|
+
shadowRadius: 12,
|
|
32
|
+
elevation: 8,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { DEFAULT_SERVER_ENDPOINT, genSessionDataLookup } from '@userflow-tech/core';
|
|
2
|
+
import type { FlowActionFragment } from '@userflow-tech/protocol';
|
|
3
|
+
import {
|
|
4
|
+
BannerEmbedMode,
|
|
5
|
+
EndFlowReasonInput,
|
|
6
|
+
type BannerSessionFragment,
|
|
7
|
+
} from '@userflow-tech/protocol';
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import {
|
|
10
|
+
Animated,
|
|
11
|
+
Platform,
|
|
12
|
+
useColorScheme,
|
|
13
|
+
useWindowDimensions,
|
|
14
|
+
View,
|
|
15
|
+
type ViewStyle,
|
|
16
|
+
} from 'react-native';
|
|
17
|
+
|
|
18
|
+
import { buildBootstrapHtml, EVAL_JS_BASE_URL, isBootstrapUrl } from '../../evalJs/bootstrap';
|
|
19
|
+
import { parseBridgeMessage } from '../../evalJs/bridgeMessages';
|
|
20
|
+
import { formatEvalJsError, getEvalJsBridgeHandlers } from '../../evalJs/evalJsBridge';
|
|
21
|
+
import { evalJsController } from '../../evalJs/evalJsController';
|
|
22
|
+
import { getEvalJsWebView, type EvalJsWebViewHandle } from '../../evalJs/getWebView';
|
|
23
|
+
import { injectEvalPendingIntoWebView } from '../../evalJs/injectEvalPending';
|
|
24
|
+
import type { EvalJsContext } from '../../evalJs/types';
|
|
25
|
+
import { useEvalJsWebViewInjection } from '../../evalJs/useEvalJsWebViewInjection';
|
|
26
|
+
import { getUserflowCore } from '../../runtime/userflowCore';
|
|
27
|
+
import { getCurrentScreenLocation, subscribeScreenLocation } from '../../screenTracker';
|
|
28
|
+
import {
|
|
29
|
+
bannerFrameStyle,
|
|
30
|
+
bannerInnerStyle,
|
|
31
|
+
resolveBannerBarBorderRadius,
|
|
32
|
+
} from '../bannerBarLayout';
|
|
33
|
+
import { bannerOverlayShadowStyle } from '../bannerBarTokens';
|
|
34
|
+
import { useUserflowSafeAreaInsets } from '../safeArea';
|
|
35
|
+
|
|
36
|
+
import { collectBannerAutoRunEvalCodes } from './bannerAutoRunEvalJs';
|
|
37
|
+
import { markBannerAutoRunEvalComplete, shouldSkipBannerAutoRunEval } from './bannerAutoRunSession';
|
|
38
|
+
import { buildCustomBannerBodyHtml } from './buildCustomBannerHtml';
|
|
39
|
+
|
|
40
|
+
export interface BannerWebViewBarProps {
|
|
41
|
+
session: BannerSessionFragment;
|
|
42
|
+
onActions: (actions: FlowActionFragment[]) => void | Promise<void>;
|
|
43
|
+
onDismiss: (endReason: EndFlowReasonInput) => void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function screenFromLocation(location: { path: string } | { screen: string } | null): {
|
|
47
|
+
name?: string;
|
|
48
|
+
path?: string;
|
|
49
|
+
} {
|
|
50
|
+
if (!location) {
|
|
51
|
+
return {};
|
|
52
|
+
}
|
|
53
|
+
if ('path' in location) {
|
|
54
|
+
return location.path ? { path: location.path } : {};
|
|
55
|
+
}
|
|
56
|
+
return location.screen ? { name: location.screen } : {};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function useEvalJsScreen(): { name?: string; path?: string } {
|
|
60
|
+
const [screen, setScreen] = React.useState(() => screenFromLocation(getCurrentScreenLocation()));
|
|
61
|
+
React.useEffect(() => {
|
|
62
|
+
return subscribeScreenLocation((location) => {
|
|
63
|
+
setScreen(screenFromLocation(location));
|
|
64
|
+
});
|
|
65
|
+
}, []);
|
|
66
|
+
return screen;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function BannerWebViewBar({
|
|
70
|
+
session,
|
|
71
|
+
onActions,
|
|
72
|
+
onDismiss,
|
|
73
|
+
}: BannerWebViewBarProps): React.ReactElement | null {
|
|
74
|
+
const banner = session.version.banner;
|
|
75
|
+
const WebView = getEvalJsWebView();
|
|
76
|
+
const webRef = React.useRef<EvalJsWebViewHandle>(null);
|
|
77
|
+
const [pageReady, setPageReady] = React.useState(false);
|
|
78
|
+
const [contentHeight, setContentHeight] = React.useState(56);
|
|
79
|
+
const colorScheme = useColorScheme();
|
|
80
|
+
const viewport = useWindowDimensions();
|
|
81
|
+
const insets = useUserflowSafeAreaInsets();
|
|
82
|
+
const screen = useEvalJsScreen();
|
|
83
|
+
const lookupAttribute = React.useMemo(() => genSessionDataLookup(session.data), [session.data]);
|
|
84
|
+
|
|
85
|
+
const evalSnapshot = React.useSyncExternalStore(
|
|
86
|
+
evalJsController.subscribe,
|
|
87
|
+
evalJsController.getSnapshot,
|
|
88
|
+
evalJsController.getSnapshot,
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
const host = evalSnapshot.host;
|
|
92
|
+
const context = React.useMemo<EvalJsContext>(
|
|
93
|
+
() => ({
|
|
94
|
+
platform: Platform.OS,
|
|
95
|
+
colorScheme: colorScheme === 'dark' ? 'dark' : 'light',
|
|
96
|
+
safeAreaInsets: insets,
|
|
97
|
+
viewport: { width: viewport.width, height: viewport.height },
|
|
98
|
+
screen,
|
|
99
|
+
host,
|
|
100
|
+
}),
|
|
101
|
+
[colorScheme, host, insets, screen, viewport.height, viewport.width],
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const serverEndpoint = getUserflowCore().getServerEndpoint() ?? DEFAULT_SERVER_ENDPOINT;
|
|
105
|
+
|
|
106
|
+
const skipAutoRunEval = shouldSkipBannerAutoRunEval(session.id);
|
|
107
|
+
const initialContext = React.useRef(context);
|
|
108
|
+
const html = React.useMemo(() => {
|
|
109
|
+
const body = buildCustomBannerBodyHtml(session, lookupAttribute, serverEndpoint, {
|
|
110
|
+
skipAutoRunEval,
|
|
111
|
+
});
|
|
112
|
+
return buildBootstrapHtml(initialContext.current, body);
|
|
113
|
+
}, [lookupAttribute, serverEndpoint, session, skipAutoRunEval]);
|
|
114
|
+
|
|
115
|
+
const opacity = React.useRef(new Animated.Value(banner?.animate ? 0 : 1)).current;
|
|
116
|
+
|
|
117
|
+
React.useEffect(() => {
|
|
118
|
+
if (!banner?.animate) {
|
|
119
|
+
opacity.setValue(1);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
opacity.setValue(0);
|
|
123
|
+
const animation = Animated.timing(opacity, {
|
|
124
|
+
toValue: 1,
|
|
125
|
+
duration: 200,
|
|
126
|
+
useNativeDriver: true,
|
|
127
|
+
});
|
|
128
|
+
animation.start();
|
|
129
|
+
return () => {
|
|
130
|
+
animation.stop();
|
|
131
|
+
};
|
|
132
|
+
}, [banner?.animate, opacity, session.id]);
|
|
133
|
+
|
|
134
|
+
React.useEffect(() => {
|
|
135
|
+
setPageReady(false);
|
|
136
|
+
setContentHeight(56);
|
|
137
|
+
}, [session.id, html]);
|
|
138
|
+
|
|
139
|
+
React.useEffect(() => {
|
|
140
|
+
if (!pageReady || skipAutoRunEval || !banner) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (collectBannerAutoRunEvalCodes(banner, lookupAttribute).length === 0) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
markBannerAutoRunEvalComplete(session.id);
|
|
147
|
+
}, [banner, lookupAttribute, pageReady, session.id, skipAutoRunEval]);
|
|
148
|
+
|
|
149
|
+
useEvalJsWebViewInjection(webRef, {
|
|
150
|
+
pageReady,
|
|
151
|
+
context,
|
|
152
|
+
pendingCount: evalSnapshot.pendingCount,
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
const openExternal = React.useCallback((url: string) => {
|
|
156
|
+
if (!url || isBootstrapUrl(url)) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
getEvalJsBridgeHandlers().openUrl(url);
|
|
160
|
+
}, []);
|
|
161
|
+
|
|
162
|
+
const onMessage = React.useCallback(
|
|
163
|
+
(event: { nativeEvent: { data?: string } }) => {
|
|
164
|
+
let parsed: unknown = event.nativeEvent.data;
|
|
165
|
+
if (typeof parsed === 'string') {
|
|
166
|
+
try {
|
|
167
|
+
parsed = JSON.parse(parsed) as unknown;
|
|
168
|
+
} catch {
|
|
169
|
+
parsed = null;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (parsed != null && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
173
|
+
const record = parsed as Record<string, unknown>;
|
|
174
|
+
if (record.__userflow === 1 && record.type === 'bannerLayout') {
|
|
175
|
+
const height = record.height;
|
|
176
|
+
if (typeof height === 'number' && height > 0) {
|
|
177
|
+
const maxHeight = Math.floor(viewport.height * 0.92);
|
|
178
|
+
const next = Math.min(Math.ceil(height), maxHeight);
|
|
179
|
+
setContentHeight((prev) => (Math.abs(next - prev) <= 1 ? prev : next));
|
|
180
|
+
}
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
if (record.__userflow === 1 && record.type === 'bannerButton') {
|
|
184
|
+
const buttonId = record.buttonId;
|
|
185
|
+
if (typeof buttonId === 'string' && banner) {
|
|
186
|
+
const button = banner.buttons.find((entry) => entry.id === buttonId);
|
|
187
|
+
if (button) {
|
|
188
|
+
void Promise.resolve(onActions(button.actions)).then(() => {
|
|
189
|
+
injectEvalPendingIntoWebView(webRef.current);
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (record.__userflow === 1 && record.type === 'bannerDismiss') {
|
|
196
|
+
webRef.current?.injectJavaScript('window.__userflowBannerEvalDismissed=true;true;');
|
|
197
|
+
onDismiss(EndFlowReasonInput.USER_CLOSED);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const message = parseBridgeMessage(event.nativeEvent.data);
|
|
203
|
+
if (!message) {
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
const bridge = getEvalJsBridgeHandlers();
|
|
207
|
+
switch (message.type) {
|
|
208
|
+
case 'ready':
|
|
209
|
+
setPageReady(true);
|
|
210
|
+
webRef.current?.injectJavaScript(
|
|
211
|
+
'window.__userflowBannerLayout&&window.__userflowBannerLayout();true;',
|
|
212
|
+
);
|
|
213
|
+
return;
|
|
214
|
+
case 'close':
|
|
215
|
+
webRef.current?.injectJavaScript('window.__userflowBannerEvalDismissed=true;true;');
|
|
216
|
+
onDismiss(EndFlowReasonInput.USER_CLOSED);
|
|
217
|
+
return;
|
|
218
|
+
case 'endFlow':
|
|
219
|
+
webRef.current?.injectJavaScript('window.__userflowBannerEvalDismissed=true;true;');
|
|
220
|
+
onDismiss(EndFlowReasonInput.USER_CLOSED);
|
|
221
|
+
return;
|
|
222
|
+
case 'setLayout':
|
|
223
|
+
evalJsController.setLayout(message.layout);
|
|
224
|
+
return;
|
|
225
|
+
case 'track':
|
|
226
|
+
bridge.track(message.name, message.attributes);
|
|
227
|
+
return;
|
|
228
|
+
case 'updateUser':
|
|
229
|
+
bridge.updateUser(message.attributes);
|
|
230
|
+
return;
|
|
231
|
+
case 'updateGroup':
|
|
232
|
+
bridge.updateGroup(message.attributes, message.options);
|
|
233
|
+
return;
|
|
234
|
+
case 'openUrl':
|
|
235
|
+
bridge.openUrl(message.url);
|
|
236
|
+
return;
|
|
237
|
+
case 'error':
|
|
238
|
+
bridge.warn(formatEvalJsError(message.message, message.code));
|
|
239
|
+
return;
|
|
240
|
+
default:
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
[banner, onActions, onDismiss, viewport.height],
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
if (!banner || !WebView) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
const overlay = banner.overlay !== false;
|
|
252
|
+
const frameStyle = bannerFrameStyle(banner);
|
|
253
|
+
const innerStyle = bannerInnerStyle(banner);
|
|
254
|
+
const overlayEdge = banner.embedMode === BannerEmbedMode.BODY_LAST ? 'bottom' : 'top';
|
|
255
|
+
const barRadius = resolveBannerBarBorderRadius(banner);
|
|
256
|
+
const webStyle: ViewStyle = {
|
|
257
|
+
width: '100%',
|
|
258
|
+
height: contentHeight,
|
|
259
|
+
backgroundColor: 'transparent',
|
|
260
|
+
};
|
|
261
|
+
const debugging = typeof __DEV__ !== 'undefined' && __DEV__ ? true : undefined;
|
|
262
|
+
|
|
263
|
+
return (
|
|
264
|
+
<View testID="userflow-banner-frame" style={frameStyle}>
|
|
265
|
+
<Animated.View style={[{ opacity }, overlay ? bannerOverlayShadowStyle(overlayEdge) : null]}>
|
|
266
|
+
<View
|
|
267
|
+
testID="userflow-banner-webview"
|
|
268
|
+
style={[
|
|
269
|
+
{ borderRadius: barRadius ?? 0, overflow: 'hidden' as const },
|
|
270
|
+
innerStyle.maxWidth != null ? { maxWidth: innerStyle.maxWidth } : null,
|
|
271
|
+
]}
|
|
272
|
+
>
|
|
273
|
+
<WebView
|
|
274
|
+
ref={webRef}
|
|
275
|
+
source={{ html, baseUrl: EVAL_JS_BASE_URL }}
|
|
276
|
+
style={webStyle}
|
|
277
|
+
javaScriptEnabled
|
|
278
|
+
domStorageEnabled
|
|
279
|
+
scrollEnabled={false}
|
|
280
|
+
bounces={false}
|
|
281
|
+
showsHorizontalScrollIndicator={false}
|
|
282
|
+
showsVerticalScrollIndicator={false}
|
|
283
|
+
originWhitelist={['*']}
|
|
284
|
+
setSupportMultipleWindows={false}
|
|
285
|
+
androidLayerType="hardware"
|
|
286
|
+
{...(debugging !== undefined ? { webviewDebuggingEnabled: debugging } : {})}
|
|
287
|
+
onMessage={onMessage}
|
|
288
|
+
onLoadEnd={() => {
|
|
289
|
+
setPageReady(true);
|
|
290
|
+
webRef.current?.injectJavaScript(
|
|
291
|
+
'window.__userflowBannerLayout&&window.__userflowBannerLayout();true;',
|
|
292
|
+
);
|
|
293
|
+
}}
|
|
294
|
+
onShouldStartLoadWithRequest={(request) => {
|
|
295
|
+
if (isBootstrapUrl(request.url)) {
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
openExternal(request.url);
|
|
299
|
+
return false;
|
|
300
|
+
}}
|
|
301
|
+
onOpenWindow={(event) => {
|
|
302
|
+
const url = event.nativeEvent.targetUrl;
|
|
303
|
+
if (url) {
|
|
304
|
+
openExternal(url);
|
|
305
|
+
}
|
|
306
|
+
}}
|
|
307
|
+
/>
|
|
308
|
+
</View>
|
|
309
|
+
</Animated.View>
|
|
310
|
+
</View>
|
|
311
|
+
);
|
|
312
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { interpolateVariables } from '@userflow-tech/core';
|
|
2
|
+
import type { BannerFragment } from '@userflow-tech/protocol';
|
|
3
|
+
import { FlowActionType } from '@userflow-tech/protocol';
|
|
4
|
+
|
|
5
|
+
function buttonIsEvalJsOnly(button: BannerFragment['buttons'][number]): boolean {
|
|
6
|
+
const actions = button.actions.filter((action) => action.type != null);
|
|
7
|
+
if (actions.length === 0) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
return actions.every((action) => action.type === FlowActionType.EVAL_JS);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Evaluate JavaScript bodies from buttons whose **only** actions are EVAL_JS.
|
|
15
|
+
* Auto-run once when the WebView loads; click still runs the button action list.
|
|
16
|
+
*/
|
|
17
|
+
export function collectBannerAutoRunEvalCodes(
|
|
18
|
+
banner: BannerFragment,
|
|
19
|
+
lookupAttribute: (fqn: string) => string | null,
|
|
20
|
+
): string[] {
|
|
21
|
+
const codes: string[] = [];
|
|
22
|
+
const seen = new Set<string>();
|
|
23
|
+
for (const button of banner.buttons) {
|
|
24
|
+
if (!buttonIsEvalJsOnly(button)) {
|
|
25
|
+
continue;
|
|
26
|
+
}
|
|
27
|
+
for (const action of button.actions) {
|
|
28
|
+
if (action.type !== FlowActionType.EVAL_JS) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const raw = action.code ?? '';
|
|
32
|
+
if (!raw.trim()) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
const code = interpolateVariables(raw, lookupAttribute);
|
|
36
|
+
if (seen.has(code)) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
seen.add(code);
|
|
40
|
+
codes.push(code);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return codes;
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Banner session ids whose eval-only auto-run already ran (survives temporary WebView unmount). */
|
|
2
|
+
const autoRunCompletedSessionIds = new Set<string>();
|
|
3
|
+
|
|
4
|
+
export function shouldSkipBannerAutoRunEval(sessionId: string): boolean {
|
|
5
|
+
return autoRunCompletedSessionIds.has(sessionId);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function markBannerAutoRunEvalComplete(sessionId: string): void {
|
|
9
|
+
autoRunCompletedSessionIds.add(sessionId);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function clearBannerAutoRunEvalSession(sessionId: string): void {
|
|
13
|
+
autoRunCompletedSessionIds.delete(sessionId);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export function resetBannerAutoRunSessionsForTests(): void {
|
|
18
|
+
autoRunCompletedSessionIds.clear();
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { BannerFragment, ThemeFragment } from '@userflow-tech/protocol';
|
|
2
|
+
import { FlowActionType } from '@userflow-tech/protocol';
|
|
3
|
+
|
|
4
|
+
import { themeHasPublishedCustomCss } from './resolveCdnHost';
|
|
5
|
+
|
|
6
|
+
let debugForceWebViewBanner = false;
|
|
7
|
+
|
|
8
|
+
/** POC / local testing when the builder flag is not on the wire yet. */
|
|
9
|
+
export function setDebugForceWebViewBanner(enabled: boolean): void {
|
|
10
|
+
debugForceWebViewBanner = enabled;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** @internal */
|
|
14
|
+
export function resetDebugForceWebViewBannerForTests(): void {
|
|
15
|
+
debugForceWebViewBanner = false;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function bannerHasEvalJsAction(banner: BannerFragment): boolean {
|
|
19
|
+
return banner.buttons.some((button) =>
|
|
20
|
+
button.actions.some((action) => action.type === FlowActionType.EVAL_JS),
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Use the WebView banner renderer when any button runs Evaluate JavaScript
|
|
26
|
+
* (needs the shared eval page), when the theme has published custom CSS
|
|
27
|
+
* (`.userflow-custom-container-*` / `.userflow-custom-button-*` via CDN),
|
|
28
|
+
* or when {@link setDebugForceWebViewBanner} is true.
|
|
29
|
+
*/
|
|
30
|
+
export function bannerNeedsWebView(banner: BannerFragment, theme?: ThemeFragment | null): boolean {
|
|
31
|
+
if (debugForceWebViewBanner) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
if (theme != null && themeHasPublishedCustomCss(theme)) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
return bannerHasEvalJsAction(banner);
|
|
38
|
+
}
|