@userflow-tech/react-native 0.4.4 → 0.5.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 +124 -34
- package/docs/anchoring.md +6 -1
- package/docs/deep-linking.md +26 -0
- package/docs/troubleshooting.md +50 -23
- package/expo-plugin/hostDependencyWarnings.d.ts +6 -4
- package/expo-plugin/hostDependencyWarnings.d.ts.map +1 -1
- package/expo-plugin/hostDependencyWarnings.js +8 -6
- package/expo-plugin/hostDependencyWarnings.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +144 -34
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/animationFrame.js +29 -1
- package/lib/commonjs/anchors/animationFrame.js.map +1 -1
- package/lib/commonjs/anchors/appActive.js +61 -0
- package/lib/commonjs/anchors/appActive.js.map +1 -0
- package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -8
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/elementTapMonitor.js +67 -12
- package/lib/commonjs/anchors/elementTapMonitor.js.map +1 -1
- package/lib/commonjs/anchors/elementTargetMatch.js +33 -7
- package/lib/commonjs/anchors/elementTargetMatch.js.map +1 -1
- package/lib/commonjs/anchors/fiber/fiberInternals.js +66 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/commonjs/anchors/fiber/indexHostFibers.js +4 -3
- package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -1
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js +30 -15
- package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -1
- package/lib/commonjs/anchors/fiberAnchorCache.js +20 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -1
- package/lib/commonjs/anchors/gestureHandlerHandoff.js +304 -0
- package/lib/commonjs/anchors/gestureHandlerHandoff.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +6 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +11 -6
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveElementTargets.js +63 -8
- package/lib/commonjs/anchors/resolveElementTargets.js.map +1 -1
- package/lib/commonjs/anchors/semanticMatcher.js +43 -21
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
- package/lib/commonjs/anchors/tapSlop.js +16 -0
- package/lib/commonjs/anchors/tapSlop.js.map +1 -0
- package/lib/commonjs/anchors/targetPressMonitor.js +66 -12
- package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -1
- package/lib/commonjs/authoring/fingerprintFromInstance.js +5 -9
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/commonjs/content/RichContentRenderer.js +3 -3
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
- package/lib/commonjs/content/openSafeUrl.js +3 -1
- package/lib/commonjs/content/openSafeUrl.js.map +1 -1
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +6 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/commonjs/index.js +19 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/installCheck.js +2 -2
- package/lib/commonjs/installCheck.js.map +1 -1
- package/lib/commonjs/navigation/navigateUrlUtils.js +105 -0
- package/lib/commonjs/navigation/navigateUrlUtils.js.map +1 -0
- package/lib/commonjs/navigation/openExternalNavigateUrl.js +14 -0
- package/lib/commonjs/navigation/openExternalNavigateUrl.js.map +1 -0
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +47 -41
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js +3 -1
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/runtime/BannerHost.js +38 -29
- package/lib/commonjs/runtime/BannerHost.js.map +1 -1
- package/lib/commonjs/runtime/TargetPressBridge.js +55 -7
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowOverlay.js +5 -11
- package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -1
- package/lib/commonjs/runtime/UserflowProvider.js +66 -40
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/bannerEngine.js +8 -2
- package/lib/commonjs/runtime/bannerEngine.js.map +1 -1
- package/lib/commonjs/runtime/bannerFlowSpacer.js +71 -0
- package/lib/commonjs/runtime/bannerFlowSpacer.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +11 -0
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/previewStart.js +39 -0
- package/lib/commonjs/runtime/previewStart.js.map +1 -0
- package/lib/commonjs/runtime/pushBannerLayoutContext.js +98 -0
- package/lib/commonjs/runtime/pushBannerLayoutContext.js.map +1 -0
- package/lib/commonjs/screenTracker.js +12 -0
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/surfaces/BannerBar.js +79 -61
- package/lib/commonjs/surfaces/BannerBar.js.map +1 -1
- package/lib/commonjs/surfaces/BannerSurface.js +26 -0
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +43 -41
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/bannerBarLayout.js +77 -10
- package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +112 -63
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +59 -11
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -1
- package/lib/commonjs/surfaces/hostAccessibilityTrap.js +28 -0
- package/lib/commonjs/surfaces/hostAccessibilityTrap.js.map +1 -0
- package/lib/commonjs/surfaces/resolveBannerTheme.js +6 -3
- package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +3 -2
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/targetSearchSchedule.js +134 -0
- package/lib/commonjs/surfaces/tooltip/targetSearchSchedule.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +145 -35
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/animationFrame.js +29 -2
- package/lib/module/anchors/animationFrame.js.map +1 -1
- package/lib/module/anchors/appActive.js +57 -0
- package/lib/module/anchors/appActive.js.map +1 -0
- package/lib/module/anchors/elementConditionEvaluator.js +26 -9
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/elementTapMonitor.js +67 -12
- package/lib/module/anchors/elementTapMonitor.js.map +1 -1
- package/lib/module/anchors/elementTargetMatch.js +32 -7
- package/lib/module/anchors/elementTargetMatch.js.map +1 -1
- package/lib/module/anchors/fiber/fiberInternals.js +65 -0
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/module/anchors/fiber/indexHostFibers.js +4 -3
- package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -1
- package/lib/module/anchors/fiber/resolveFiberPath.js +30 -15
- package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -1
- package/lib/module/anchors/fiberAnchorCache.js +19 -0
- package/lib/module/anchors/fiberAnchorCache.js.map +1 -1
- package/lib/module/anchors/gestureHandlerHandoff.js +298 -0
- package/lib/module/anchors/gestureHandlerHandoff.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +1 -0
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +11 -6
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveElementTargets.js +63 -8
- package/lib/module/anchors/resolveElementTargets.js.map +1 -1
- package/lib/module/anchors/semanticMatcher.js +43 -21
- package/lib/module/anchors/semanticMatcher.js.map +1 -1
- package/lib/module/anchors/tapSlop.js +11 -0
- package/lib/module/anchors/tapSlop.js.map +1 -0
- package/lib/module/anchors/targetPressMonitor.js +53 -8
- package/lib/module/anchors/targetPressMonitor.js.map +1 -1
- package/lib/module/authoring/fingerprintFromInstance.js +6 -10
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
- package/lib/module/content/RichContentRenderer.js +3 -3
- package/lib/module/content/RichContentRenderer.js.map +1 -1
- package/lib/module/content/openSafeUrl.js +3 -1
- package/lib/module/content/openSafeUrl.js.map +1 -1
- package/lib/module/expo-router/useUserflowExpoRouter.js +7 -1
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/module/index.js +22 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/installCheck.js +2 -2
- package/lib/module/installCheck.js.map +1 -1
- package/lib/module/navigation/navigateUrlUtils.js +94 -0
- package/lib/module/navigation/navigateUrlUtils.js.map +1 -0
- package/lib/module/navigation/openExternalNavigateUrl.js +11 -0
- package/lib/module/navigation/openExternalNavigateUrl.js.map +1 -0
- package/lib/module/navigation/openFlowNavigateUrl.js +22 -36
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
- package/lib/module/pairing/PairingController.js +3 -1
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/runtime/BannerHost.js +38 -29
- package/lib/module/runtime/BannerHost.js.map +1 -1
- package/lib/module/runtime/TargetPressBridge.js +56 -8
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowOverlay.js +5 -11
- package/lib/module/runtime/UserflowOverlay.js.map +1 -1
- package/lib/module/runtime/UserflowProvider.js +66 -40
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/bannerEngine.js +7 -2
- package/lib/module/runtime/bannerEngine.js.map +1 -1
- package/lib/module/runtime/bannerFlowSpacer.js +65 -0
- package/lib/module/runtime/bannerFlowSpacer.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +11 -0
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/previewStart.js +35 -0
- package/lib/module/runtime/previewStart.js.map +1 -0
- package/lib/module/runtime/pushBannerLayoutContext.js +91 -0
- package/lib/module/runtime/pushBannerLayoutContext.js.map +1 -0
- package/lib/module/screenTracker.js +11 -0
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/surfaces/BannerBar.js +80 -62
- package/lib/module/surfaces/BannerBar.js.map +1 -1
- package/lib/module/surfaces/BannerSurface.js +26 -0
- package/lib/module/surfaces/BannerSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +44 -42
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/bannerBarLayout.js +72 -11
- package/lib/module/surfaces/bannerBarLayout.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +113 -64
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +59 -11
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -1
- package/lib/module/surfaces/hostAccessibilityTrap.js +24 -0
- package/lib/module/surfaces/hostAccessibilityTrap.js.map +1 -0
- package/lib/module/surfaces/resolveBannerTheme.js +6 -3
- package/lib/module/surfaces/resolveBannerTheme.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipBubble.js +3 -2
- package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/module/surfaces/tooltip/targetSearchSchedule.js +128 -0
- package/lib/module/surfaces/tooltip/targetSearchSchedule.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +36 -2
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts +0 -4
- package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/appActive.d.ts +8 -0
- package/lib/typescript/commonjs/src/anchors/appActive.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts +17 -0
- package/lib/typescript/commonjs/src/anchors/elementTapMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts +7 -0
- package/lib/typescript/commonjs/src/anchors/elementTargetMatch.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +7 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +3 -2
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +3 -0
- package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +5 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/gestureHandlerHandoff.d.ts +70 -0
- package/lib/typescript/commonjs/src/anchors/gestureHandlerHandoff.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +11 -4
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveElementTargets.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/tapSlop.d.ts +9 -0
- package/lib/typescript/commonjs/src/anchors/tapSlop.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +13 -8
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +6 -5
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/navigateUrlUtils.d.ts +15 -0
- package/lib/typescript/commonjs/src/navigation/navigateUrlUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/openExternalNavigateUrl.d.ts +3 -0
- package/lib/typescript/commonjs/src/navigation/openExternalNavigateUrl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts +2 -5
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +6 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +3 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +5 -1
- package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/bannerFlowSpacer.d.ts +15 -0
- package/lib/typescript/commonjs/src/runtime/bannerFlowSpacer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/previewStart.d.ts +13 -0
- package/lib/typescript/commonjs/src/runtime/previewStart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/pushBannerLayoutContext.d.ts +17 -0
- package/lib/typescript/commonjs/src/runtime/pushBannerLayoutContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts +6 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +3 -1
- package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +5 -1
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +17 -0
- package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +3 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/hostAccessibilityTrap.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/hostAccessibilityTrap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +4 -1
- package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +7 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/targetSearchSchedule.d.ts +60 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/targetSearchSchedule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +36 -2
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/animationFrame.d.ts +0 -4
- package/lib/typescript/module/src/anchors/animationFrame.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/appActive.d.ts +8 -0
- package/lib/typescript/module/src/anchors/appActive.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts +17 -0
- package/lib/typescript/module/src/anchors/elementTapMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts +7 -0
- package/lib/typescript/module/src/anchors/elementTargetMatch.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +7 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +3 -2
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +3 -0
- package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +5 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/gestureHandlerHandoff.d.ts +70 -0
- package/lib/typescript/module/src/anchors/gestureHandlerHandoff.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +11 -4
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveElementTargets.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +2 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/tapSlop.d.ts +9 -0
- package/lib/typescript/module/src/anchors/tapSlop.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +13 -8
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/content/openSafeUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +6 -5
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/installCheck.d.ts +1 -1
- package/lib/typescript/module/src/installCheck.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/navigateUrlUtils.d.ts +15 -0
- package/lib/typescript/module/src/navigation/navigateUrlUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/openExternalNavigateUrl.d.ts +3 -0
- package/lib/typescript/module/src/navigation/openExternalNavigateUrl.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts +2 -5
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +6 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +3 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts +5 -1
- package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/bannerFlowSpacer.d.ts +15 -0
- package/lib/typescript/module/src/runtime/bannerFlowSpacer.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/previewStart.d.ts +13 -0
- package/lib/typescript/module/src/runtime/previewStart.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/pushBannerLayoutContext.d.ts +17 -0
- package/lib/typescript/module/src/runtime/pushBannerLayoutContext.d.ts.map +1 -0
- package/lib/typescript/module/src/screenTracker.d.ts +6 -0
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts +3 -1
- package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +5 -1
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +17 -0
- package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +3 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/hostAccessibilityTrap.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/hostAccessibilityTrap.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +4 -1
- package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +7 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/targetSearchSchedule.d.ts +60 -0
- package/lib/typescript/module/src/surfaces/tooltip/targetSearchSchedule.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/anchors/AutoAnchorRegistry.ts +166 -35
- package/src/anchors/animationFrame.ts +31 -1
- package/src/anchors/appActive.ts +63 -0
- package/src/anchors/elementConditionEvaluator.ts +29 -12
- package/src/anchors/elementTapMonitor.ts +68 -10
- package/src/anchors/elementTargetMatch.ts +34 -7
- package/src/anchors/fiber/fiberInternals.ts +68 -0
- package/src/anchors/fiber/indexHostFibers.ts +8 -3
- package/src/anchors/fiber/resolveFiberPath.ts +25 -16
- package/src/anchors/fiberAnchorCache.ts +19 -0
- package/src/anchors/gestureHandlerHandoff.ts +356 -0
- package/src/anchors/resolveAnchorHost.ts +2 -0
- package/src/anchors/resolveAutoAnchorHost.ts +18 -8
- package/src/anchors/resolveElementTargets.ts +64 -7
- package/src/anchors/semanticMatcher.ts +48 -27
- package/src/anchors/tapSlop.ts +18 -0
- package/src/anchors/targetPressMonitor.ts +56 -19
- package/src/authoring/fingerprintFromInstance.ts +4 -5
- package/src/content/RichContentRenderer.tsx +4 -3
- package/src/content/openSafeUrl.ts +3 -1
- package/src/expo-router/useUserflowExpoRouter.ts +10 -1
- package/src/index.ts +20 -9
- package/src/installCheck.ts +4 -4
- package/src/navigation/navigateUrlUtils.ts +100 -0
- package/src/navigation/openExternalNavigateUrl.ts +9 -0
- package/src/navigation/openFlowNavigateUrl.ts +36 -36
- package/src/pairing/PairingController.ts +9 -1
- package/src/runtime/BannerHost.tsx +41 -23
- package/src/runtime/TargetPressBridge.tsx +66 -9
- package/src/runtime/UserflowOverlay.tsx +7 -9
- package/src/runtime/UserflowProvider.tsx +56 -32
- package/src/runtime/bannerEngine.ts +10 -2
- package/src/runtime/bannerFlowSpacer.tsx +70 -0
- package/src/runtime/flowEngine.ts +11 -0
- package/src/runtime/previewStart.ts +49 -0
- package/src/runtime/pushBannerLayoutContext.tsx +121 -0
- package/src/screenTracker.ts +11 -0
- package/src/surfaces/BannerBar.tsx +93 -55
- package/src/surfaces/BannerSurface.tsx +59 -3
- package/src/surfaces/TooltipSurface.tsx +63 -51
- package/src/surfaces/bannerBarLayout.ts +80 -7
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +149 -57
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +63 -11
- package/src/surfaces/hostAccessibilityTrap.ts +25 -0
- package/src/surfaces/resolveBannerTheme.ts +14 -3
- package/src/surfaces/tooltip/TooltipBubble.tsx +8 -1
- package/src/surfaces/tooltip/targetSearchSchedule.ts +140 -0
- package/src/version.ts +1 -1
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts +29 -2
- package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/BannerSessionEngine.js +87 -6
- package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/ClientConditionEngine.js +30 -7
- package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +6 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +23 -3
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +67 -2
- package/vendor/core/dist/engine/handleActions.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/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FlowSessionEngine","evalJsController","openFlowNavigateUrl","isolateAsync","flowEngine","endDraftOnArrival","unsubscribeDraftArrival","getFlowSessionEngine","core","transport","send","message","onServerMessage","handler","setFlowSessionId","id","onOpenExternalUrl","url","rethrowHostContract","onEvalJs","request","enqueue","updateUser","attributes","updateGroup","options","
|
|
1
|
+
{"version":3,"names":["FlowSessionEngine","evalJsController","openFlowNavigateUrl","isolateAsync","flowEngine","endDraftOnArrival","unsubscribeDraftArrival","getFlowSessionEngine","core","transport","send","message","onServerMessage","handler","setFlowSessionId","id","onOpenExternalUrl","url","rethrowHostContract","onEvalJs","request","enqueue","updateUser","attributes","updateGroup","options","on","event","type","session","getSnapshot","bannerOwnsWebView","reset","watchForRestoredDraft","attachFlowSessionEngine","engine","attach","resetFlowSessionEngine","clearFlowSessionEngineLocalSession","clearLocalSession","hasActiveFlowSession","hasHeldFlowSession","endDraftFlowSession","getHeldFlowSession","draftMode","cancelPendingDraftEnd","endFlow","catch","endEvalJsFlowSession","sessionIds","getFlowSession","has","__resetFlowSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/flowEngine.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAA2B,qBAAqB;AAG1E,SAASC,gBAAgB,QAAQ,+BAA4B;AAC7D,SAASC,mBAAmB,QAAQ,sCAAmC;AAEvE,SAASC,YAAY,QAAQ,kBAAe;AAE5C,IAAIC,UAAoC,GAAG,IAAI;AAC/C;AACA,IAAIC,iBAAiB,GAAG,KAAK;AAC7B,IAAIC,uBAA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AiB,EAAE;IAC1D,MAAMwB,OAAO,GAAGM,MAAM,CAACQ,kBAAkB,CAAC,CAAC;IAC3C,IAAI,CAACd,OAAO,EAAEe,SAAS,EAAE;IACzBC,qBAAqB,CAAC,CAAC;IACvB,KAAKV,MAAM,CAACW,OAAO,CAAC,aAAmC,CAAC,CAACC,KAAK,CAAC,MAAM;MACnE;IAAA,CACD,CAAC;EACJ,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,oBAAoBA,CAACC,UAA+B,EAAiB;EACzF,MAAMpB,OAAO,GAAGzB,UAAU,EAAE8C,cAAc,CAAC,CAAC;EAC5C,IAAI,CAAC9C,UAAU,IAAI,CAACyB,OAAO,IAAI,CAACoB,UAAU,CAACE,GAAG,CAACtB,OAAO,CAACd,EAAE,CAAC,EAAE;EAC5D,MAAMX,UAAU,CAAC0C,OAAO,CAAC,YAAkC,CAAC;AAC9D;;AAEA;AACA,OAAO,SAASM,gCAAgCA,CAAA,EAAS;EACvDP,qBAAqB,CAAC,CAAC;EACvBzC,UAAU,EAAE4B,KAAK,CAAC,CAAC;EACnB5B,UAAU,GAAG,IAAI;AACnB","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { evalJsController } from "../evalJs/evalJsController.js";
|
|
4
|
+
import { clearBannerSessionEngineLocalSession, endDraftBannerSession, getBannerSessionEngine } from "./bannerEngine.js";
|
|
5
|
+
import { cancelPendingDraftEnd, clearFlowSessionEngineLocalSession, endDraftFlowSession } from "./flowEngine.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Drop local tour state and reset eval before a Builder `startFlowWithToken`.
|
|
9
|
+
*
|
|
10
|
+
* When a draft banner is still active, end it on the server first. The channel
|
|
11
|
+
* dedupes an unchanged `SetBannerSession`, so clearing the banner locally
|
|
12
|
+
* without ending the draft leaves nothing visible on a second preview of the
|
|
13
|
+
* same banner.
|
|
14
|
+
*/
|
|
15
|
+
export async function prepareForBuilderPreviewStart(core) {
|
|
16
|
+
cancelPendingDraftEnd();
|
|
17
|
+
clearFlowSessionEngineLocalSession();
|
|
18
|
+
core.setFlowSessionId(null);
|
|
19
|
+
const bannerEngine = getBannerSessionEngine(core);
|
|
20
|
+
const hasDraftBanner = bannerEngine.getBannerSession()?.draftMode === true || bannerEngine.getDeferredDraftBannerSessionId() !== null;
|
|
21
|
+
if (hasDraftBanner) {
|
|
22
|
+
await bannerEngine.endDraftBannerForPreview('USER_CLOSED');
|
|
23
|
+
} else {
|
|
24
|
+
clearBannerSessionEngineLocalSession();
|
|
25
|
+
core.setBannerSessionId(null);
|
|
26
|
+
}
|
|
27
|
+
evalJsController.reset();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** End tour and banner Builder drafts on the server (preview exit). */
|
|
31
|
+
export async function endDraftPreviewSessions() {
|
|
32
|
+
await endDraftFlowSession();
|
|
33
|
+
await endDraftBannerSession();
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=previewStart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["evalJsController","clearBannerSessionEngineLocalSession","endDraftBannerSession","getBannerSessionEngine","cancelPendingDraftEnd","clearFlowSessionEngineLocalSession","endDraftFlowSession","prepareForBuilderPreviewStart","core","setFlowSessionId","bannerEngine","hasDraftBanner","getBannerSession","draftMode","getDeferredDraftBannerSessionId","endDraftBannerForPreview","setBannerSessionId","reset","endDraftPreviewSessions"],"sourceRoot":"../../../src","sources":["runtime/previewStart.ts"],"mappings":";;AAGA,SAASA,gBAAgB,QAAQ,+BAA4B;AAE7D,SACEC,oCAAoC,EACpCC,qBAAqB,EACrBC,sBAAsB,QACjB,mBAAgB;AACvB,SACEC,qBAAqB,EACrBC,kCAAkC,EAClCC,mBAAmB,QACd,iBAAc;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,6BAA6BA,CAACC,IAAkB,EAAiB;EACrFJ,qBAAqB,CAAC,CAAC;EACvBC,kCAAkC,CAAC,CAAC;EACpCG,IAAI,CAACC,gBAAgB,CAAC,IAAI,CAAC;EAE3B,MAAMC,YAAY,GAAGP,sBAAsB,CAACK,IAAI,CAAC;EACjD,MAAMG,cAAc,GAClBD,YAAY,CAACE,gBAAgB,CAAC,CAAC,EAAEC,SAAS,KAAK,IAAI,IACnDH,YAAY,CAACI,+BAA+B,CAAC,CAAC,KAAK,IAAI;EAEzD,IAAIH,cAAc,EAAE;IAClB,MAAMD,YAAY,CAACK,wBAAwB,CAAC,aAAmC,CAAC;EAClF,CAAC,MAAM;IACLd,oCAAoC,CAAC,CAAC;IACtCO,IAAI,CAACQ,kBAAkB,CAAC,IAAI,CAAC;EAC/B;EAEAhB,gBAAgB,CAACiB,KAAK,CAAC,CAAC;AAC1B;;AAEA;AACA,OAAO,eAAeC,uBAAuBA,CAAA,EAAkB;EAC7D,MAAMZ,mBAAmB,CAAC,CAAC;EAC3B,MAAMJ,qBAAqB,CAAC,CAAC;AAC/B","ignoreList":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const PushBannerLayoutContext = /*#__PURE__*/React.createContext(null);
|
|
6
|
+
function pickEdge(registrations) {
|
|
7
|
+
let top = false;
|
|
8
|
+
let bottom = false;
|
|
9
|
+
for (const edge of registrations.values()) {
|
|
10
|
+
if (edge === 'top') {
|
|
11
|
+
top = true;
|
|
12
|
+
}
|
|
13
|
+
if (edge === 'bottom') {
|
|
14
|
+
bottom = true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (top) {
|
|
18
|
+
return 'top';
|
|
19
|
+
}
|
|
20
|
+
if (bottom) {
|
|
21
|
+
return 'bottom';
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
export function PushBannerLayoutProvider({
|
|
26
|
+
children,
|
|
27
|
+
onActiveEdgeChange
|
|
28
|
+
}) {
|
|
29
|
+
const registrations = React.useRef(new Map());
|
|
30
|
+
const onActiveEdgeChangeRef = React.useRef(onActiveEdgeChange);
|
|
31
|
+
onActiveEdgeChangeRef.current = onActiveEdgeChange;
|
|
32
|
+
const sync = React.useCallback(() => {
|
|
33
|
+
onActiveEdgeChangeRef.current(pickEdge(registrations.current));
|
|
34
|
+
}, []);
|
|
35
|
+
const value = React.useMemo(() => ({
|
|
36
|
+
register: (edge, token) => {
|
|
37
|
+
registrations.current.set(token, edge);
|
|
38
|
+
sync();
|
|
39
|
+
},
|
|
40
|
+
unregister: token => {
|
|
41
|
+
if (registrations.current.delete(token)) {
|
|
42
|
+
sync();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}), [sync]);
|
|
46
|
+
React.useLayoutEffect(() => {
|
|
47
|
+
sync();
|
|
48
|
+
}, [sync]);
|
|
49
|
+
return /*#__PURE__*/_jsx(PushBannerLayoutContext.Provider, {
|
|
50
|
+
value: value,
|
|
51
|
+
children: children
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export function usePushBannerLayoutRegistration(edge, sessionId) {
|
|
57
|
+
const ctx = React.useContext(PushBannerLayoutContext);
|
|
58
|
+
React.useLayoutEffect(() => {
|
|
59
|
+
if (!ctx || !edge || !sessionId) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const token = `${sessionId}:${edge}`;
|
|
63
|
+
ctx.register(edge, token);
|
|
64
|
+
return () => {
|
|
65
|
+
ctx.unregister(token);
|
|
66
|
+
};
|
|
67
|
+
}, [ctx, edge, sessionId]);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Clears the host top/bottom safe-area override only after push-layout chrome
|
|
72
|
+
* has laid out, so a session without visible chrome cannot leave a white strip.
|
|
73
|
+
*
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
export function usePushBannerHostInsetRegistration(edge, sessionId, enabled) {
|
|
77
|
+
const [laidOut, setLaidOut] = React.useState(false);
|
|
78
|
+
React.useEffect(() => {
|
|
79
|
+
setLaidOut(false);
|
|
80
|
+
}, [edge, enabled]);
|
|
81
|
+
usePushBannerLayoutRegistration(enabled && laidOut && edge ? edge : null, sessionId);
|
|
82
|
+
return React.useCallback(event => {
|
|
83
|
+
if (!enabled || !edge) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (event.nativeEvent.layout.height > 0) {
|
|
87
|
+
setLaidOut(true);
|
|
88
|
+
}
|
|
89
|
+
}, [edge, enabled]);
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=pushBannerLayoutContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","jsx","_jsx","PushBannerLayoutContext","createContext","pickEdge","registrations","top","bottom","edge","values","PushBannerLayoutProvider","children","onActiveEdgeChange","useRef","Map","onActiveEdgeChangeRef","current","sync","useCallback","value","useMemo","register","token","set","unregister","delete","useLayoutEffect","Provider","usePushBannerLayoutRegistration","sessionId","ctx","useContext","usePushBannerHostInsetRegistration","enabled","laidOut","setLaidOut","useState","useEffect","event","nativeEvent","layout","height"],"sourceRoot":"../../../src","sources":["runtime/pushBannerLayoutContext.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAW/B,MAAMC,uBAAuB,gBAAGH,KAAK,CAACI,aAAa,CAAsC,IAAI,CAAC;AAE9F,SAASC,QAAQA,CAACC,aAAgD,EAA+B;EAC/F,IAAIC,GAAG,GAAG,KAAK;EACf,IAAIC,MAAM,GAAG,KAAK;EAClB,KAAK,MAAMC,IAAI,IAAIH,aAAa,CAACI,MAAM,CAAC,CAAC,EAAE;IACzC,IAAID,IAAI,KAAK,KAAK,EAAE;MAClBF,GAAG,GAA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ACF,CAAC,EACD,CAAC3B,IAAI,EAAEyB,OAAO,CAChB,CAAC;AACH","ignoreList":[]}
|
|
@@ -17,6 +17,17 @@ function locationKey(location) {
|
|
|
17
17
|
return 'path' in location ? `path:${location.path}` : `screen:${location.screen}`;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* The screen id stored on an AUTO envelope (`path` for Expo Router, `screen`
|
|
22
|
+
* otherwise). Missing or blank locations are `'unknown'`, the same sentinel
|
|
23
|
+
* the element picker writes when it has not seen a screen yet.
|
|
24
|
+
*/
|
|
25
|
+
export function screenIdFromLocation(location) {
|
|
26
|
+
if (!location) return 'unknown';
|
|
27
|
+
const id = 'path' in location ? location.path : location.screen;
|
|
28
|
+
return id || 'unknown';
|
|
29
|
+
}
|
|
30
|
+
|
|
20
31
|
/** Event attributes for `screen_viewed`, or `null` when the location has no identity. */
|
|
21
32
|
export function screenViewedAttributes(location) {
|
|
22
33
|
const screenName = 'path' in location ? location.path : location.screen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SCREEN_VIEWED_EVENT","enabled","currentKey","currentLocation","pendingLocation","reporter","screenListeners","Set","locationKey","location","path","screen","screenViewedAttributes","screenName","screen_name","setScreenChangeReporter","next","subscribeScreenLocation","listener","add","current","getCurrentScreenLocation","delete","report","enableScreenTracking","disableScreenTracking","handleScreenChange","options","force","reportCurrentScreen","resetScreenTrackerForTests","clear"],"sourceRoot":"../../src","sources":["screenTracker.ts"],"mappings":";;AAEA;AACA,OAAO,MAAMA,mBAAmB,GAAG,eAAe;;AAElD;;AAQA,IAAIC,OAAO,GAAG,KAAK;AACnB,IAAIC,UAAyB,GAAG,IAAI;AACpC;AACA,IAAIC,eAA4C,GAAG,IAAI;AACvD;AACA,IAAIC,eAA4C,GAAG,IAAI;AACvD,IAAIC,QAAqC,GAAG,IAAI;AAChD,MAAMC,eAAe,GAAG,IAAIC,GAAG,CAAuB,CAAC;AAEvD,SAASC,WAAWA,CAACC,QAA8B,EAAU;EAC3D,OAAO,MAAM,IAAIA,QAAQ,GAAG,QAAQA,QAAQ,CAACC,IAAI,EAAE,GAAG,UAAUD,QAAQ,CAACE,MAAM,EAAE;AACnF;;AAEA;AACA,OAAO,SAASC,sBAAsBA,
|
|
1
|
+
{"version":3,"names":["SCREEN_VIEWED_EVENT","enabled","currentKey","currentLocation","pendingLocation","reporter","screenListeners","Set","locationKey","location","path","screen","screenIdFromLocation","id","screenViewedAttributes","screenName","screen_name","setScreenChangeReporter","next","subscribeScreenLocation","listener","add","current","getCurrentScreenLocation","delete","report","enableScreenTracking","disableScreenTracking","handleScreenChange","options","force","reportCurrentScreen","resetScreenTrackerForTests","clear"],"sourceRoot":"../../src","sources":["screenTracker.ts"],"mappings":";;AAEA;AACA,OAAO,MAAMA,mBAAmB,GAAG,eAAe;;AAElD;;AAQA,IAAIC,OAAO,GAAG,KAAK;AACnB,IAAIC,UAAyB,GAAG,IAAI;AACpC;AACA,IAAIC,eAA4C,GAAG,IAAI;AACvD;AACA,IAAIC,eAA4C,GAAG,IAAI;AACvD,IAAIC,QAAqC,GAAG,IAAI;AAChD,MAAMC,eAAe,GAAG,IAAIC,GAAG,CAAuB,CAAC;AAEvD,SAASC,WAAWA,CAACC,QAA8B,EAAU;EAC3D,OAAO,MAAM,IAAIA,QAAQ,GAAG,QAAQA,QAAQ,CAACC,IAAI,EAAE,GAAG,UAAUD,QAAQ,CAACE,MAAM,EAAE;AACnF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAACH,QAAiD,EAAU;EAC9F,IAAI,CAACA,QAAQ,EAAE,OAAO,SAAS;EAC/B,MAAMI,EAAE,GAAG,MAAM,IAAIJ,QAAQ,GAAGA,QAAQ,CAACC,IAAI,GAAGD,QAAQ,CAACE,MAAM;EAC/D,OAAOE,EAAE,IAAI,SAAS;AACxB;;AAEA;AACA,OAAO,SAASC,sBAAsBA,CACpCL,QAA8B,EACE;EAChC,MAAMM,UAA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from 'react-native';
|
|
|
7
7
|
import { BannerStepButton } from "../content/BannerStepButton.js";
|
|
8
8
|
import { RichContentRenderer } from "../content/RichContentRenderer.js";
|
|
9
9
|
import { mixThemeColors } from "../content/themeColor.js";
|
|
10
|
-
import {
|
|
10
|
+
import { usePushBannerHostInsetRegistration } from "../runtime/pushBannerLayoutContext.js";
|
|
11
|
+
import { BANNER_CLOSE_SLOT_SIZE, BANNER_ROOT_PADDING, bannerBarRootStyle, bannerFrameStyle, bannerInnerStyle, bannerPushLayoutChrome, resolveBannerBarBorderRadius } from "./bannerBarLayout.js";
|
|
12
|
+
import { useUserflowSafeAreaInsets } from "./safeArea.js";
|
|
11
13
|
import { BANNER_BUTTON_GAP, BANNER_CLOSE_BORDER_RADIUS, bannerOverlayShadowStyle } from "./bannerBarTokens.js";
|
|
12
14
|
import { resolveBannerBackgroundColor, resolveBannerForegroundColor } from "./resolveBannerTheme.js";
|
|
13
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -17,6 +19,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
17
19
|
*/
|
|
18
20
|
export function BannerBar({
|
|
19
21
|
session,
|
|
22
|
+
pushLayoutEdge = null,
|
|
23
|
+
overlaySafeEdge = null,
|
|
20
24
|
onActions,
|
|
21
25
|
onDismiss
|
|
22
26
|
}) {
|
|
@@ -30,9 +34,15 @@ export function BannerBar({
|
|
|
30
34
|
fontColor: foregroundColor
|
|
31
35
|
}), [theme, backgroundColor, foregroundColor]);
|
|
32
36
|
const lookupAttribute = React.useMemo(() => genSessionDataLookup(session.data), [session.data]);
|
|
33
|
-
const
|
|
37
|
+
const insets = useUserflowSafeAreaInsets();
|
|
38
|
+
const overlay = banner?.overlay !== false;
|
|
39
|
+
const hostInsetEdge = !overlay && pushLayoutEdge ? pushLayoutEdge : null;
|
|
40
|
+
const safeAreaEdge = hostInsetEdge ?? overlaySafeEdge ?? null;
|
|
41
|
+
const onPushChromeLayout = usePushBannerHostInsetRegistration(hostInsetEdge, session.id, hostInsetEdge != null);
|
|
42
|
+
const fadeIn = banner?.animate === true && hostInsetEdge == null;
|
|
43
|
+
const opacity = React.useRef(new Animated.Value(fadeIn ? 0 : 1)).current;
|
|
34
44
|
React.useEffect(() => {
|
|
35
|
-
if (!
|
|
45
|
+
if (!fadeIn) {
|
|
36
46
|
opacity.setValue(1);
|
|
37
47
|
return;
|
|
38
48
|
}
|
|
@@ -46,74 +56,82 @@ export function BannerBar({
|
|
|
46
56
|
return () => {
|
|
47
57
|
animation.stop();
|
|
48
58
|
};
|
|
49
|
-
}, [
|
|
59
|
+
}, [fadeIn, opacity, session.id]);
|
|
50
60
|
if (!banner) return null;
|
|
51
|
-
const overlay = banner.overlay !== false;
|
|
52
61
|
const frameStyle = bannerFrameStyle(banner);
|
|
62
|
+
const rootStyle = bannerBarRootStyle(banner);
|
|
53
63
|
const innerStyle = bannerInnerStyle(banner);
|
|
54
64
|
const closePressedBackground = mixThemeColors(backgroundColor, foregroundColor, 0.12);
|
|
55
65
|
const overlayEdge = banner.embedMode === BannerEmbedMode.BODY_LAST ? 'bottom' : 'top';
|
|
56
66
|
const barRadius = resolveBannerBarBorderRadius(banner);
|
|
67
|
+
const insetChrome = safeAreaEdge ? bannerPushLayoutChrome(safeAreaEdge, insets, backgroundColor) : null;
|
|
68
|
+
const insetChromeOutsideFade = insetChrome != null && fadeIn;
|
|
69
|
+
const bar = /*#__PURE__*/_jsxs(View, {
|
|
70
|
+
testID: "userflow-banner",
|
|
71
|
+
style: [styles.root, rootStyle, {
|
|
72
|
+
backgroundColor
|
|
73
|
+
}, barRadius != null ? {
|
|
74
|
+
borderRadius: barRadius,
|
|
75
|
+
overflow: 'hidden'
|
|
76
|
+
} : null],
|
|
77
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
78
|
+
style: styles.startSpacer
|
|
79
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
80
|
+
style: innerStyle,
|
|
81
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
82
|
+
style: styles.content,
|
|
83
|
+
children: /*#__PURE__*/_jsx(RichContentRenderer, {
|
|
84
|
+
content: banner.content,
|
|
85
|
+
buttons: [],
|
|
86
|
+
theme: bannerTheme,
|
|
87
|
+
sessionData: session.data,
|
|
88
|
+
lookupAttribute: lookupAttribute,
|
|
89
|
+
onActions: onActions
|
|
90
|
+
})
|
|
91
|
+
}), banner.buttons.length > 0 ? /*#__PURE__*/_jsx(View, {
|
|
92
|
+
style: styles.buttons,
|
|
93
|
+
children: banner.buttons.map(button => /*#__PURE__*/_jsx(BannerStepButton, {
|
|
94
|
+
button: button,
|
|
95
|
+
theme: bannerTheme,
|
|
96
|
+
sessionData: session.data,
|
|
97
|
+
onActions: onActions
|
|
98
|
+
}, button.id))
|
|
99
|
+
}) : null]
|
|
100
|
+
}), session.version.closeDisabled ? /*#__PURE__*/_jsx(View, {
|
|
101
|
+
style: styles.startSpacer
|
|
102
|
+
}) : /*#__PURE__*/_jsx(Pressable, {
|
|
103
|
+
testID: "userflow-banner-dismiss",
|
|
104
|
+
accessibilityRole: "button",
|
|
105
|
+
accessibilityLabel: "Dismiss",
|
|
106
|
+
hitSlop: 8,
|
|
107
|
+
onPress: () => onDismiss(EndFlowReasonInput.USER_CLOSED),
|
|
108
|
+
style: ({
|
|
109
|
+
pressed
|
|
110
|
+
}) => [styles.close, pressed ? {
|
|
111
|
+
backgroundColor: closePressedBackground
|
|
112
|
+
} : null],
|
|
113
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
114
|
+
style: [styles.dismissIcon, {
|
|
115
|
+
color: foregroundColor
|
|
116
|
+
}],
|
|
117
|
+
children: "\xD7"
|
|
118
|
+
})
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
121
|
+
const animatedBar = /*#__PURE__*/_jsx(Animated.View, {
|
|
122
|
+
onLayout: hostInsetEdge ? onPushChromeLayout : undefined,
|
|
123
|
+
style: [{
|
|
124
|
+
opacity
|
|
125
|
+
}, overlay ? bannerOverlayShadowStyle(overlayEdge) : null, insetChromeOutsideFade ? null : insetChrome],
|
|
126
|
+
children: bar
|
|
127
|
+
});
|
|
57
128
|
return /*#__PURE__*/_jsx(View, {
|
|
58
129
|
testID: "userflow-banner-frame",
|
|
59
130
|
style: frameStyle,
|
|
60
|
-
children: /*#__PURE__*/_jsx(
|
|
61
|
-
style:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
65
|
-
testID: "userflow-banner",
|
|
66
|
-
style: [styles.root, {
|
|
67
|
-
backgroundColor
|
|
68
|
-
}, barRadius != null ? {
|
|
69
|
-
borderRadius: barRadius,
|
|
70
|
-
overflow: 'hidden'
|
|
71
|
-
} : null],
|
|
72
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
73
|
-
style: styles.startSpacer
|
|
74
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
75
|
-
style: innerStyle,
|
|
76
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
77
|
-
style: styles.content,
|
|
78
|
-
children: /*#__PURE__*/_jsx(RichContentRenderer, {
|
|
79
|
-
content: banner.content,
|
|
80
|
-
buttons: [],
|
|
81
|
-
theme: bannerTheme,
|
|
82
|
-
sessionData: session.data,
|
|
83
|
-
lookupAttribute: lookupAttribute,
|
|
84
|
-
onActions: onActions
|
|
85
|
-
})
|
|
86
|
-
}), banner.buttons.length > 0 ? /*#__PURE__*/_jsx(View, {
|
|
87
|
-
style: styles.buttons,
|
|
88
|
-
children: banner.buttons.map(button => /*#__PURE__*/_jsx(BannerStepButton, {
|
|
89
|
-
button: button,
|
|
90
|
-
theme: bannerTheme,
|
|
91
|
-
sessionData: session.data,
|
|
92
|
-
onActions: onActions
|
|
93
|
-
}, button.id))
|
|
94
|
-
}) : null]
|
|
95
|
-
}), session.version.closeDisabled ? /*#__PURE__*/_jsx(View, {
|
|
96
|
-
style: styles.startSpacer
|
|
97
|
-
}) : /*#__PURE__*/_jsx(Pressable, {
|
|
98
|
-
testID: "userflow-banner-dismiss",
|
|
99
|
-
accessibilityRole: "button",
|
|
100
|
-
accessibilityLabel: "Dismiss",
|
|
101
|
-
hitSlop: 8,
|
|
102
|
-
onPress: () => onDismiss(EndFlowReasonInput.USER_CLOSED),
|
|
103
|
-
style: ({
|
|
104
|
-
pressed
|
|
105
|
-
}) => [styles.close, pressed ? {
|
|
106
|
-
backgroundColor: closePressedBackground
|
|
107
|
-
} : null],
|
|
108
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
109
|
-
style: [styles.dismissIcon, {
|
|
110
|
-
color: foregroundColor
|
|
111
|
-
}],
|
|
112
|
-
children: "\xD7"
|
|
113
|
-
})
|
|
114
|
-
})]
|
|
115
|
-
})
|
|
116
|
-
})
|
|
131
|
+
children: insetChromeOutsideFade ? /*#__PURE__*/_jsx(View, {
|
|
132
|
+
style: insetChrome,
|
|
133
|
+
children: animatedBar
|
|
134
|
+
}) : animatedBar
|
|
117
135
|
});
|
|
118
136
|
}
|
|
119
137
|
const styles = StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["genSessionDataLookup","BannerEmbedMode","EndFlowReasonInput","React","Animated","Pressable","StyleSheet","Text","View","BannerStepButton","RichContentRenderer","mixThemeColors","BANNER_CLOSE_SLOT_SIZE","BANNER_ROOT_PADDING","bannerFrameStyle","bannerInnerStyle","resolveBannerBarBorderRadius","BANNER_BUTTON_GAP","BANNER_CLOSE_BORDER_RADIUS","bannerOverlayShadowStyle","resolveBannerBackgroundColor","resolveBannerForegroundColor","jsx","_jsx","jsxs","_jsxs","BannerBar","session","onActions","onDismiss","banner","version","theme","backgroundColor","foregroundColor","bannerTheme","useMemo","fontColor","lookupAttribute","data","
|
|
1
|
+
{"version":3,"names":["genSessionDataLookup","BannerEmbedMode","EndFlowReasonInput","React","Animated","Pressable","StyleSheet","Text","View","BannerStepButton","RichContentRenderer","mixThemeColors","usePushBannerHostInsetRegistration","BANNER_CLOSE_SLOT_SIZE","BANNER_ROOT_PADDING","bannerBarRootStyle","bannerFrameStyle","bannerInnerStyle","bannerPushLayoutChrome","resolveBannerBarBorderRadius","useUserflowSafeAreaInsets","BANNER_BUTTON_GAP","BANNER_CLOSE_BORDER_RADIUS","bannerOverlayShadowStyle","resolveBannerBackgroundColor","resolveBannerForegroundColor","jsx","_jsx","jsxs","_jsxs","BannerBar","session","pushLayoutEdge","overlaySafeEdge","onActions","onDismiss","banner","version","theme","backgroundColor","foregroundColor","bannerTheme","useMemo","fontColor","lookupAttribute","data","insets","overlay","hostInsetEdge","safeAreaEdge","onPushChromeLayout","id","fadeIn","animate","opacity","useRef","Value","current","useEffect","setValue","animation","timing","toValue","duration","useNativeDriver","start","stop","frameStyle","rootStyle","innerStyle","closePressedBackground","overlayEdge","embedMode","BODY_LAST","barRadius","insetChrome","insetChromeOutsideFade","bar","testID","style","styles","root","borderRadius","overflow","children","startSpacer","content","buttons","sessionData","length","map","button","closeDisabled","accessibilityRole","accessibilityLabel","hitSlop","onPress","USER_CLOSED","pressed","close","dismissIcon","color","animatedBar","onLayout","undefined","create","flexDirection","alignItems","padding","flexGrow","flexShrink","maxWidth","height","minWidth","flexWrap","gap","width","justifyContent","fontSize","lineHeight","fontWeight"],"sourceRoot":"../../../src","sources":["surfaces/BannerBar.tsx"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,qBAAqB;AAE1D,SACEC,eAAe,EACfC,kBAAkB,QAEb,yBAAyB;AAChC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAE1E,SAASC,gBAAgB,QAAQ,gCAA6B;AAC9D,SAASC,mBAAmB,QAAQ,mCAAgC;AACpE,SAASC,cAAc,QAAQ,0BAAuB;AACtD,SAASC,kCAAkC,QAAQ,uCAAoC;AAEvF,SACEC,sBAAsB,EACtBC,mBAAmB,EACnBC,kBA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;IAACsE,MAAM,EAAC,uBAAuB;IAACC,KAAK,EAAEZ,UAAW;IAAAiB,QAAA,EACpDR,sBAAsB,gBAAGjD,IAAA,CAACnB,IAAI;MAACuE,KAAK,EAAEJ,WAAY;MAAAS,QAAA,EAAEkB;IAAW,CAAO,CAAC,GAAGA;EAAW,CAClF,CAAC;AAEX;AAEA,MAAMtB,MAAM,GAAG1E,UAAU,CAACmG,MAAM,CAAC;EAC/BxB,IAAI,EAAE;IACJyB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE9F;EACX,CAAC;EACDuE,WAAW,EAAE;IACXwB,QAAQ,EAAE,CAAC;IACXC,UAAU,EAAE,CAAC;IACbC,QAAQ,EAAElG,sBAAsB;IAChCmG,MAAM,EAAEnG;EACV,CAAC;EACDyE,OAAO,EAAE;IACPwB,UAAU,EAAE,CAAC;IACbG,QAAQ,EAAE;EACZ,CAAC;EACD1B,OAAO,EAAE;IACPmB,aAAa,EAAE,KAAK;IACpBQ,QAAQ,EAAE,QAAQ;IAClBP,UAAU,EAAE,QAAQ;IACpBQ,GAAG,EAAE9F;EACP,CAAC;EACD8E,KAAK,EAAE;IACLiB,KAAK,EAAEvG,sBAAsB;IAC7BmG,MAAM,EAAEnG,sBAAsB;IAC9B8F,UAAU,EAAE,QAAQ;IACpBU,cAAc,EAAE,QAAQ;IACxBP,UAAU,EAAE,CAAC;IACb5B,YAAY,EAAE5D;EAChB,CAAC;EACD8E,WAAW,EAAE;IACXkB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -16,6 +16,8 @@ let warnedMissingWebView = false;
|
|
|
16
16
|
*/
|
|
17
17
|
export function BannerSurface({
|
|
18
18
|
session,
|
|
19
|
+
pushLayoutEdge = null,
|
|
20
|
+
overlaySafeEdge = null,
|
|
19
21
|
onActions,
|
|
20
22
|
onDismiss
|
|
21
23
|
}) {
|
|
@@ -23,6 +25,24 @@ export function BannerSurface({
|
|
|
23
25
|
const theme = session.version.theme;
|
|
24
26
|
const needsWebView = banner != null && bannerNeedsWebView(banner, theme);
|
|
25
27
|
const webView = needsWebView ? getEvalJsWebView() : null;
|
|
28
|
+
React.useEffect(() => {
|
|
29
|
+
if (!banner || !__DEV__) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
33
|
+
console.log('[Userflow] banner shown', {
|
|
34
|
+
flowId: session.flow.id,
|
|
35
|
+
flowName: session.flow.name,
|
|
36
|
+
bannerSessionId: session.id,
|
|
37
|
+
versionId: session.version.id,
|
|
38
|
+
embedMode: banner.embedMode,
|
|
39
|
+
overlay: banner.overlay !== false,
|
|
40
|
+
webView: needsWebView,
|
|
41
|
+
pushLayoutEdge: pushLayoutEdge ?? null,
|
|
42
|
+
overlaySafeEdge: overlaySafeEdge ?? null,
|
|
43
|
+
hostAsOverlay: banner.overlay !== false || needsWebView
|
|
44
|
+
});
|
|
45
|
+
}, [banner, needsWebView, overlaySafeEdge, pushLayoutEdge, session.flow.id, session.flow.name, session.id, session.version.id]);
|
|
26
46
|
React.useLayoutEffect(() => {
|
|
27
47
|
if (!needsWebView || !webView) {
|
|
28
48
|
return;
|
|
@@ -50,18 +70,24 @@ export function BannerSurface({
|
|
|
50
70
|
}
|
|
51
71
|
return /*#__PURE__*/_jsx(BannerBar, {
|
|
52
72
|
session: session,
|
|
73
|
+
pushLayoutEdge: pushLayoutEdge,
|
|
74
|
+
overlaySafeEdge: overlaySafeEdge,
|
|
53
75
|
onActions: onActions,
|
|
54
76
|
onDismiss: onDismiss
|
|
55
77
|
});
|
|
56
78
|
}
|
|
57
79
|
return /*#__PURE__*/_jsx(BannerWebViewBar, {
|
|
58
80
|
session: session,
|
|
81
|
+
pushLayoutEdge: pushLayoutEdge,
|
|
82
|
+
overlaySafeEdge: overlaySafeEdge,
|
|
59
83
|
onActions: onActions,
|
|
60
84
|
onDismiss: dismissWebViewBanner
|
|
61
85
|
});
|
|
62
86
|
}
|
|
63
87
|
return /*#__PURE__*/_jsx(BannerBar, {
|
|
64
88
|
session: session,
|
|
89
|
+
pushLayoutEdge: pushLayoutEdge,
|
|
90
|
+
overlaySafeEdge: overlaySafeEdge,
|
|
65
91
|
onActions: onActions,
|
|
66
92
|
onDismiss: onDismiss
|
|
67
93
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","evalJsController","getEvalJsWebView","BannerBar","BannerWebViewBar","clearBannerAutoRunEvalSession","bannerNeedsWebView","jsx","_jsx","warnedMissingWebView","BannerSurface","session","onActions","onDismiss","banner","version","theme","needsWebView","webView","
|
|
1
|
+
{"version":3,"names":["React","evalJsController","getEvalJsWebView","BannerBar","BannerWebViewBar","clearBannerAutoRunEvalSession","bannerNeedsWebView","jsx","_jsx","warnedMissingWebView","BannerSurface","session","pushLayoutEdge","overlaySafeEdge","onActions","onDismiss","banner","version","theme","needsWebView","webView","useEffect","__DEV__","console","log","flowId","flow","id","flowName","name","bannerSessionId","versionId","embedMode","overlay","hostAsOverlay","useLayoutEffect","setBannerOwnsWebView","dismissWebViewBanner","useCallback","endReason","reset","warn","resetBannerSurfaceWarningsForTests"],"sourceRoot":"../../../src","sources":["surfaces/BannerSurface.tsx"],"mappings":";;AAKA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,gBAAgB,QAAQ,+BAA4B;AAC7D,SAASC,gBAAgB,QAAQ,yBAAsB;AAEvD,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,gBAAgB,QAAQ,qCAAkC;AACnE,SAASC,6BAA6B,QAAQ,yCAAsC;AACpF,SAASC,kBAAkB,QAAQ,uCAAoC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAYxE,IAAIC,oBAAoB,GAAG,KAAK;;AAEhC;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAC;EAC5BC,OAAO;EAC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