@userflow-tech/react-native 0.4.5 → 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 +7 -2
- package/docs/anchoring.md +6 -1
- package/docs/troubleshooting.md +26 -0
- 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/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/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/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/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/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":["React","_interopRequireWildcard","require","_reactNative","_FiberScanRoot","_DoubleTapBridge","_elementPickerController","_absoluteFill","_safeArea","_surfaceLayoutInsets","_BannerHost","_SdkErrorBoundary","_TargetPressBridge","_UserflowOverlay","_bannerEngine","_bannerEngineContext","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_FiberScanRoot","_DoubleTapBridge","_elementPickerController","_absoluteFill","_safeArea","_surfaceLayoutInsets","_BannerHost","_bannerFlowSpacer","_SdkErrorBoundary","_TargetPressBridge","_UserflowOverlay","_bannerEngine","_bannerEngineContext","_flowEngine","_pushBannerLayoutContext","_isolateCall","_userflowCore","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","UserflowContext","createContext","overlayResetKeyFromEngine","engine","session","getFlowSession","id","getCurrentStep","useOverlayErrorBoundaryResetKey","resetKey","setResetKey","useState","useEffect","apply","next","isolateSync","on","UserflowProvider","children","engineProp","bannerEngine","bannerEngineProp","getFlowSessionEngine","getUserflowCore","getBannerSessionEngine","contextValue","useMemo","overlayResetKey","trapHostAccessibility","setTrapHostAccessibility","onTrapChange","useCallback","trap","onOverlayError","safeInsets","useUserflowSafeAreaInsets","pushBannerLayoutEdge","setPushBannerLayoutEdge","pickerActive","setPickerActive","elementPickerController","getState","active","subscribe","hostInsets","top","bottom","appContent","jsx","View","style","styles","testID","importantForAccessibility","undefined","accessibilityElementsHidden","TargetPressBridge","FiberScanRoot","BannerEngineContext","Provider","value","SurfaceLayoutInsetsProvider","PushBannerLayoutProvider","onActiveEdgeChange","DoubleTapBridge","jsxs","root","collapsable","flowBannerTop","BannerHost","placement","edge","hidden","BannerWebViewFlowSpacer","HostSafeArea","insets","flowBannerBottom","overlay","pointerEvents","SdkErrorBoundary","scope","onError","UserflowOverlay","Context","getSafeAreaInsetsContext","parent","useParentSafeAreaInsets","Fragment","useUserflow","ctx","useContext","Error","StyleSheet","create","flex","zIndex","elevation","ABSOLUTE_FILL"],"sourceRoot":"../../../src","sources":["runtime/UserflowProvider.tsx"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAA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AE;IAClD,oBAAO,IAAAzG,WAAA,CAAAoE,GAAA,EAAApE,WAAA,CAAA2G,QAAA;MAAArE,QAAA,EAAGA;IAAQ,CAAG,CAAC;EACxB;EACA,oBAAO,IAAAtC,WAAA,CAAAoE,GAAA,EAACmC,OAAO,CAACxB,QAAQ;IAACC,KAAK,EAAEe,MAAM,IAAIU,MAAO;IAAAnE,QAAA,EAAEA;EAAQ,CAAmB,CAAC;AACjF;;AAEA;AACO,SAASsE,WAAWA,CAAA,EAAyB;EAClD,MAAMC,GAAG,GAAGlI,KAAK,CAACmI,UAAU,CAAC1F,eAAe,CAAC;EAC7C,IAAI,CAACyF,GAAG,EAAE;IACR,MAAM,IAAIE,KAAK,CAAC,wDAAwD,CAAC;EAC3E;EACA,OAAOF,GAAG;AACZ;AAEA,MAAMtC,MAAM,GAAGyC,uBAAU,CAACC,MAAM,CAAC;EAC/B3B,IAAI,EAAE;IACJ4B,IAAI,EAAE;EACR,CAAC;EACD/C,UAAU,EAAE;IACV+C,IAAI,EAAE;EACR,CAAC;EACD1B,aAAa,EAAE;IACb2B,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE,CAAC;IACZlB,aAAa,EAAE;EACjB,CAAC;EACDF,gBAAgB,EAAE;IAChBmB,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE,CAAC;IACZlB,aAAa,EAAE;EACjB,CAAC;EACDD,OAAO,EAAE;IACP,GAAGoB,2BAAa;IAChB;IACAF,MAAM,EAAE,CAAC;IACTC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.__resetBannerSessionEngineForTests = __resetBannerSessionEngineForTests;
|
|
7
7
|
exports.attachBannerSessionEngine = attachBannerSessionEngine;
|
|
8
8
|
exports.clearBannerSessionEngineLocalSession = clearBannerSessionEngineLocalSession;
|
|
9
|
+
exports.endDraftBannerSession = endDraftBannerSession;
|
|
9
10
|
exports.getBannerSessionEngine = getBannerSessionEngine;
|
|
10
11
|
exports.resetBannerSessionEngine = resetBannerSessionEngine;
|
|
11
12
|
var _core = require("@userflow-tech/core");
|
|
@@ -51,8 +52,13 @@ function resetBannerSessionEngine() {
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
/** Drop the local banner without detaching (preview exit, user switch). */
|
|
54
|
-
function clearBannerSessionEngineLocalSession() {
|
|
55
|
-
bannerEngine?.clearLocalSession();
|
|
55
|
+
function clearBannerSessionEngineLocalSession(options) {
|
|
56
|
+
bannerEngine?.clearLocalSession(options);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Best-effort end of a Builder preview banner draft (including after local clear). */
|
|
60
|
+
async function endDraftBannerSession() {
|
|
61
|
+
await bannerEngine?.endDraftBannerSession('USER_CLOSED');
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
/** Test helper: drop the singleton so the next get recreates it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_evalJsController","_openFlowNavigateUrl","_flowEngine","_isolateCall","bannerEngine","getBannerSessionEngine","core","BannerSessionEngine","transport","send","message","onServerMessage","handler","setBannerSessionId","id","flowActions","getFlowSessionEngine","onOpenExternalUrl","url","isolateAsync","openFlowNavigateUrl","rethrowHostContract","onEvalJs","request","evalJsController","enqueue","attachBannerSessionEngine","engine","attach","resetBannerSessionEngine","reset","clearBannerSessionEngineLocalSession","clearLocalSession","__resetBannerSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/bannerEngine.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_core","require","_evalJsController","_openFlowNavigateUrl","_flowEngine","_isolateCall","bannerEngine","getBannerSessionEngine","core","BannerSessionEngine","transport","send","message","onServerMessage","handler","setBannerSessionId","id","flowActions","getFlowSessionEngine","onOpenExternalUrl","url","isolateAsync","openFlowNavigateUrl","rethrowHostContract","onEvalJs","request","evalJsController","enqueue","attachBannerSessionEngine","engine","attach","resetBannerSessionEngine","reset","clearBannerSessionEngineLocalSession","options","clearLocalSession","endDraftBannerSession","__resetBannerSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/bannerEngine.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAIK,YAAwC,GAAG,IAAI;;AAEnD;AACO,SAASC,sBAAsBA,CAACC,IAAkB,EAAuB;EAC9E,IAAI,CAACF,YAAY,EAAE;IACjBA,YAAY,GAAG,IAAIG,yBAAmB,CAAC;MACrCC,SAAS,EAAE;QACTC,IAAI,EAAGC,OAAO,IAAKJ,IAAI,CAACG,IAAI,CAACC,OAAO,CAAC;QACrCC,eAAe,EAAGC,OAAO,IAAKN,IAAI,CAACK,eAAe,CAACC,OAAO,CAAC;QAC3DC,kBAAkB,EAAGC,EAAE,IAAKR,IAAI,CAACO,kBAAkB,CAACC,EAAE;MACxD,CAAC;MACDC,WAAW,EAAEA,CAAA,KAAM,IAAAC,gCAAoB,EAACV,IAAI,CAAC;MAC7CW,iBAAiB,EAAGC,GAAG,IAAK;QAC1B,KAAK,IAAAC,yBAAY,EAAC,UAAU,EAAE,MAAM,IAAAC,wCAAmB,EAACF,GAAG,CAAC,EAAE;UAC5DG,mBAAmB,EAAE;QACvB,CAAC,CAAC;MACJ,CAAC;MACDC,QAAQ,EAAGC,OAAO,IAAK;QACrBC,kCAAgB,CAACC,OAAO,CAACF,OAAO,CAAC;MACnC;IACF,CAAC,CAAC;EACJ;EACA,OAAOnB,YAAY;AACrB;;AAEA;AACO,SAASsB,yBAAyBA,CAACpB,IAAkB,EAAuB;EACjF,MAAMqB,MAAM,GAAGtB,sBAAsB,CAACC,IAAI,CAAC;EAC3CqB,MAAM,CAACC,MAAM,CAAC,CAAC;EACf,OAAOD,MAAM;AACf;;AAEA;AACO,SAASE,wBAAwBA,CAAA,EAAS;EAC/CzB,YAAY,EAAE0B,KAAK,CAAC,CAAC;AACvB;;AAEA;AACO,SAASC,oCAAoCA,CAACC,OAEpD,EAAQ;EACP5B,YAAY,EAAE6B,iBAAiB,CAACD,OAAO,CAAC;AAC1C;;AAEA;AACO,eAAeE,qBAAqBA,CAAA,EAAkB;EAC3D,MAAM9B,YAAY,EAAE8B,qBAAqB,CAAC,aAAmC,CAAC;AAChF;;AAEA;AACO,SAASC,kCAAkCA,CAAA,EAAS;EACzD/B,YAAY,EAAE0B,KAAK,CAAC,CAAC;EACrB1B,YAAY,GAAG,IAAI;AACrB","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BannerWebViewFlowSpacer = BannerWebViewFlowSpacer;
|
|
7
|
+
exports.setBannerFlowSpacerHeight = setBannerFlowSpacerHeight;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _reactNative = require("react-native");
|
|
10
|
+
var _bannerPlacement = require("./bannerPlacement.js");
|
|
11
|
+
var _useBannerSession = require("./useBannerSession.js");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
const heights = {
|
|
15
|
+
top: 0,
|
|
16
|
+
bottom: 0
|
|
17
|
+
};
|
|
18
|
+
const listeners = new Set();
|
|
19
|
+
function emit() {
|
|
20
|
+
for (const listener of listeners) {
|
|
21
|
+
listener();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
function setBannerFlowSpacerHeight(edge, height) {
|
|
27
|
+
const next = Math.max(0, Math.ceil(height));
|
|
28
|
+
if (heights[edge] === next) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
heights[edge] = next;
|
|
32
|
+
emit();
|
|
33
|
+
}
|
|
34
|
+
function subscribe(listener) {
|
|
35
|
+
listeners.add(listener);
|
|
36
|
+
return () => {
|
|
37
|
+
listeners.delete(listener);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function getHeight(edge) {
|
|
41
|
+
return heights[edge];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Reserves layout space when a custom-css WebView banner is painted in the
|
|
46
|
+
* overlay host but the builder marked it `overlay: false` (push layout).
|
|
47
|
+
*/
|
|
48
|
+
function BannerWebViewFlowSpacer({
|
|
49
|
+
engine,
|
|
50
|
+
edge
|
|
51
|
+
}) {
|
|
52
|
+
const session = (0, _useBannerSession.useBannerSession)(engine);
|
|
53
|
+
const height = React.useSyncExternalStore(subscribe, () => getHeight(edge), () => getHeight(edge));
|
|
54
|
+
if (!session?.version.banner || height <= 0) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
const pinnedEdge = (0, _bannerPlacement.bannerEdge)(session.version.banner.embedMode);
|
|
58
|
+
if (pinnedEdge !== edge) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Layout-only: the painted banner lives in the overlay host (lower z-index).
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
64
|
+
pointerEvents: "none",
|
|
65
|
+
testID: `userflow-banner-flow-spacer-${edge}`,
|
|
66
|
+
style: {
|
|
67
|
+
height
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=bannerFlowSpacer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_bannerPlacement","_useBannerSession","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","heights","top","bottom","listeners","Set","emit","listener","setBannerFlowSpacerHeight","edge","height","next","Math","max","ceil","subscribe","add","delete","getHeight","BannerWebViewFlowSpacer","engine","session","useBannerSession","useSyncExternalStore","version","banner","pinnedEdge","bannerEdge","embedMode","jsx","View","pointerEvents","testID","style"],"sourceRoot":"../../../src","sources":["runtime/bannerFlowSpacer.tsx"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAAsD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAA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3C,OAAOR,OAAO,CAACQ,IAAI,CAAC;AACtB;;AAEA;AACA;AACA;AACA;AACO,SAASU,uBAAuBA,CAAC;EACtCC,MAAM;EACNX;AAIF,CAAC,EAA6B;EAC5B,MAAMY,OAAO,GAAG,IAAAC,kCAAgB,EAACF,MAAM,CAAC;EACxC,MAAMV,MAAM,GAAGnC,KAAK,CAACgD,oBAAoB,CACvCR,SAAS,EACT,MAAMG,SAAS,CAACT,IAAI,CAAC,EACrB,MAAMS,SAAS,CAACT,IAAI,CACtB,CAAC;EAED,IAAI,CAACY,OAAO,EAAEG,OAAO,CAACC,MAAM,IAAIf,MAAM,IAAI,CAAC,EAAE;IAC3C,OAAO,IAAI;EACb;EACA,MAAMgB,UAAU,GAAG,IAAAC,2BAAU,EAACN,OAAO,CAACG,OAAO,CAACC,MAAM,CAACG,SAAS,CAAC;EAC/D,IAAIF,UAAU,KAAKjB,IAAI,EAAE;IACvB,OAAO,IAAI;EACb;;EAEA;EACA,oBACE,IAAA5B,WAAA,CAAAgD,GAAA,EAACnD,YAAA,CAAAoD,IAAI;IAACC,aAAa,EAAC,MAAM;IAACC,MAAM,EAAE,+BAA+BvB,IAAI,EAAG;IAACwB,KAAK,EAAE;MAAEvB;IAAO;EAAE,CAAE,CAAC;AAEnG","ignoreList":[]}
|
|
@@ -41,6 +41,17 @@ function getFlowSessionEngine(core) {
|
|
|
41
41
|
updateUser: attributes => core.updateUser(attributes),
|
|
42
42
|
updateGroup: (attributes, options) => core.updateGroup(attributes, options)
|
|
43
43
|
});
|
|
44
|
+
flowEngine.on(event => {
|
|
45
|
+
if (event.type !== 'sessionChange' || event.session !== null) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
// Drop a flow's eval page when the tour ends. A banner WebView reuses the
|
|
49
|
+
// same controller and must keep its page alive until the banner dismisses.
|
|
50
|
+
if (_evalJsController.evalJsController.getSnapshot().bannerOwnsWebView) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
_evalJsController.evalJsController.reset();
|
|
54
|
+
});
|
|
44
55
|
if (endDraftOnArrival) watchForRestoredDraft();
|
|
45
56
|
}
|
|
46
57
|
return flowEngine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_evalJsController","_openFlowNavigateUrl","_isolateCall","flowEngine","endDraftOnArrival","unsubscribeDraftArrival","getFlowSessionEngine","core","FlowSessionEngine","transport","send","message","onServerMessage","handler","setFlowSessionId","id","onOpenExternalUrl","url","isolateAsync","openFlowNavigateUrl","rethrowHostContract","onEvalJs","request","evalJsController","enqueue","updateUser","attributes","updateGroup","options","
|
|
1
|
+
{"version":3,"names":["_core","require","_evalJsController","_openFlowNavigateUrl","_isolateCall","flowEngine","endDraftOnArrival","unsubscribeDraftArrival","getFlowSessionEngine","core","FlowSessionEngine","transport","send","message","onServerMessage","handler","setFlowSessionId","id","onOpenExternalUrl","url","isolateAsync","openFlowNavigateUrl","rethrowHostContract","onEvalJs","request","evalJsController","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,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAEA,IAAII,UAAoC,GAAG,IAAI;AAC/C;AACA,IAAIC,iBAAiB,GAAG,KAAK;AAC7B,IAAIC,uBAA4C,GAAG,IAAI;;AAEvD;AACO,SAASC,oBAAoBA,CAACC,IAAkB,EAAqB;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AEe,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;AACO,eAAeC,oBAAoBA,CAACC,UAA+B,EAAiB;EACzF,MAAMpB,OAAO,GAAG7B,UAAU,EAAEkD,cAAc,CAAC,CAAC;EAC5C,IAAI,CAAClD,UAAU,IAAI,CAAC6B,OAAO,IAAI,CAACoB,UAAU,CAACE,GAAG,CAACtB,OAAO,CAACjB,EAAE,CAAC,EAAE;EAC5D,MAAMZ,UAAU,CAAC8C,OAAO,CAAC,YAAkC,CAAC;AAC9D;;AAEA;AACO,SAASM,gCAAgCA,CAAA,EAAS;EACvDP,qBAAqB,CAAC,CAAC;EACvB7C,UAAU,EAAEgC,KAAK,CAAC,CAAC;EACnBhC,UAAU,GAAG,IAAI;AACnB","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.endDraftPreviewSessions = endDraftPreviewSessions;
|
|
7
|
+
exports.prepareForBuilderPreviewStart = prepareForBuilderPreviewStart;
|
|
8
|
+
var _evalJsController = require("../evalJs/evalJsController.js");
|
|
9
|
+
var _bannerEngine = require("./bannerEngine.js");
|
|
10
|
+
var _flowEngine = require("./flowEngine.js");
|
|
11
|
+
/**
|
|
12
|
+
* Drop local tour state and reset eval before a Builder `startFlowWithToken`.
|
|
13
|
+
*
|
|
14
|
+
* When a draft banner is still active, end it on the server first. The channel
|
|
15
|
+
* dedupes an unchanged `SetBannerSession`, so clearing the banner locally
|
|
16
|
+
* without ending the draft leaves nothing visible on a second preview of the
|
|
17
|
+
* same banner.
|
|
18
|
+
*/
|
|
19
|
+
async function prepareForBuilderPreviewStart(core) {
|
|
20
|
+
(0, _flowEngine.cancelPendingDraftEnd)();
|
|
21
|
+
(0, _flowEngine.clearFlowSessionEngineLocalSession)();
|
|
22
|
+
core.setFlowSessionId(null);
|
|
23
|
+
const bannerEngine = (0, _bannerEngine.getBannerSessionEngine)(core);
|
|
24
|
+
const hasDraftBanner = bannerEngine.getBannerSession()?.draftMode === true || bannerEngine.getDeferredDraftBannerSessionId() !== null;
|
|
25
|
+
if (hasDraftBanner) {
|
|
26
|
+
await bannerEngine.endDraftBannerForPreview('USER_CLOSED');
|
|
27
|
+
} else {
|
|
28
|
+
(0, _bannerEngine.clearBannerSessionEngineLocalSession)();
|
|
29
|
+
core.setBannerSessionId(null);
|
|
30
|
+
}
|
|
31
|
+
_evalJsController.evalJsController.reset();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** End tour and banner Builder drafts on the server (preview exit). */
|
|
35
|
+
async function endDraftPreviewSessions() {
|
|
36
|
+
await (0, _flowEngine.endDraftFlowSession)();
|
|
37
|
+
await (0, _bannerEngine.endDraftBannerSession)();
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=previewStart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_evalJsController","require","_bannerEngine","_flowEngine","prepareForBuilderPreviewStart","core","cancelPendingDraftEnd","clearFlowSessionEngineLocalSession","setFlowSessionId","bannerEngine","getBannerSessionEngine","hasDraftBanner","getBannerSession","draftMode","getDeferredDraftBannerSessionId","endDraftBannerForPreview","clearBannerSessionEngineLocalSession","setBannerSessionId","evalJsController","reset","endDraftPreviewSessions","endDraftFlowSession","endDraftBannerSession"],"sourceRoot":"../../../src","sources":["runtime/previewStart.ts"],"mappings":";;;;;;;AAGA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAKA,IAAAE,WAAA,GAAAF,OAAA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeG,6BAA6BA,CAACC,IAAkB,EAAiB;EACrF,IAAAC,iCAAqB,EAAC,CAAC;EACvB,IAAAC,8CAAkC,EAAC,CAAC;EACpCF,IAAI,CAACG,gBAAgB,CAAC,IAAI,CAAC;EAE3B,MAAMC,YAAY,GAAG,IAAAC,oCAAsB,EAACL,IAAI,CAAC;EACjD,MAAMM,cAAc,GAClBF,YAAY,CAACG,gBAAgB,CAAC,CAAC,EAAEC,SAAS,KAAK,IAAI,IACnDJ,YAAY,CAACK,+BAA+B,CAAC,CAAC,KAAK,IAAI;EAEzD,IAAIH,cAAc,EAAE;IAClB,MAAMF,YAAY,CAACM,wBAAwB,CAAC,aAAmC,CAAC;EAClF,CAAC,MAAM;IACL,IAAAC,kDAAoC,EAAC,CAAC;IACtCX,IAAI,CAACY,kBAAkB,CAAC,IAAI,CAAC;EAC/B;EAEAC,kCAAgB,CAACC,KAAK,CAAC,CAAC;AAC1B;;AAEA;AACO,eAAeC,uBAAuBA,CAAA,EAAkB;EAC7D,MAAM,IAAAC,+BAAmB,EAAC,CAAC;EAC3B,MAAM,IAAAC,mCAAqB,EAAC,CAAC;AAC/B","ignoreList":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PushBannerLayoutProvider = PushBannerLayoutProvider;
|
|
7
|
+
exports.usePushBannerHostInsetRegistration = usePushBannerHostInsetRegistration;
|
|
8
|
+
exports.usePushBannerLayoutRegistration = usePushBannerLayoutRegistration;
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
const PushBannerLayoutContext = /*#__PURE__*/React.createContext(null);
|
|
13
|
+
function pickEdge(registrations) {
|
|
14
|
+
let top = false;
|
|
15
|
+
let bottom = false;
|
|
16
|
+
for (const edge of registrations.values()) {
|
|
17
|
+
if (edge === 'top') {
|
|
18
|
+
top = true;
|
|
19
|
+
}
|
|
20
|
+
if (edge === 'bottom') {
|
|
21
|
+
bottom = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
if (top) {
|
|
25
|
+
return 'top';
|
|
26
|
+
}
|
|
27
|
+
if (bottom) {
|
|
28
|
+
return 'bottom';
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
function PushBannerLayoutProvider({
|
|
33
|
+
children,
|
|
34
|
+
onActiveEdgeChange
|
|
35
|
+
}) {
|
|
36
|
+
const registrations = React.useRef(new Map());
|
|
37
|
+
const onActiveEdgeChangeRef = React.useRef(onActiveEdgeChange);
|
|
38
|
+
onActiveEdgeChangeRef.current = onActiveEdgeChange;
|
|
39
|
+
const sync = React.useCallback(() => {
|
|
40
|
+
onActiveEdgeChangeRef.current(pickEdge(registrations.current));
|
|
41
|
+
}, []);
|
|
42
|
+
const value = React.useMemo(() => ({
|
|
43
|
+
register: (edge, token) => {
|
|
44
|
+
registrations.current.set(token, edge);
|
|
45
|
+
sync();
|
|
46
|
+
},
|
|
47
|
+
unregister: token => {
|
|
48
|
+
if (registrations.current.delete(token)) {
|
|
49
|
+
sync();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}), [sync]);
|
|
53
|
+
React.useLayoutEffect(() => {
|
|
54
|
+
sync();
|
|
55
|
+
}, [sync]);
|
|
56
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(PushBannerLayoutContext.Provider, {
|
|
57
|
+
value: value,
|
|
58
|
+
children: children
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
function usePushBannerLayoutRegistration(edge, sessionId) {
|
|
64
|
+
const ctx = React.useContext(PushBannerLayoutContext);
|
|
65
|
+
React.useLayoutEffect(() => {
|
|
66
|
+
if (!ctx || !edge || !sessionId) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const token = `${sessionId}:${edge}`;
|
|
70
|
+
ctx.register(edge, token);
|
|
71
|
+
return () => {
|
|
72
|
+
ctx.unregister(token);
|
|
73
|
+
};
|
|
74
|
+
}, [ctx, edge, sessionId]);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Clears the host top/bottom safe-area override only after push-layout chrome
|
|
79
|
+
* has laid out, so a session without visible chrome cannot leave a white strip.
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
function usePushBannerHostInsetRegistration(edge, sessionId, enabled) {
|
|
84
|
+
const [laidOut, setLaidOut] = React.useState(false);
|
|
85
|
+
React.useEffect(() => {
|
|
86
|
+
setLaidOut(false);
|
|
87
|
+
}, [edge, enabled]);
|
|
88
|
+
usePushBannerLayoutRegistration(enabled && laidOut && edge ? edge : null, sessionId);
|
|
89
|
+
return React.useCallback(event => {
|
|
90
|
+
if (!enabled || !edge) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (event.nativeEvent.layout.height > 0) {
|
|
94
|
+
setLaidOut(true);
|
|
95
|
+
}
|
|
96
|
+
}, [edge, enabled]);
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=pushBannerLayoutContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PushBannerLayoutContext","createContext","pickEdge","registrations","top","bottom","edge","values","PushBannerLayoutProvider","children","onActiveEdgeChange","useRef","Map","onActiveEdgeChangeRef","current","sync","useCallback","value","useMemo","register","token","unregister","delete","useLayoutEffect","jsx","Provider","usePushBannerLayoutRegistration","sessionId","ctx","useContext","usePushBannerHostInsetRegistration","enabled","laidOut","setLaidOut","useState","useEffect","event","nativeEvent","layout","height"],"sourceRoot":"../../../src","sources":["runtime/pushBannerLayoutContext.tsx"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAA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K,CAACyD,QAAQ,CAAC,KAAK,CAAC;EAEnDzD,KAAK,CAAC0D,SAAS,CAAC,MAAM;IACpBF,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC,EAAE,CAAC3B,IAAI,EAAEyB,OAAO,CAAC,CAAC;EAEnBL,+BAA+B,CAACK,OAAO,IAAIC,OAAO,IAAI1B,IAAI,GAAGA,IAAI,GAAG,IAAI,EAAEqB,SAAS,CAAC;EAEpF,OAAOlD,KAAK,CAACuC,WAAW,CACrBoB,KAAwB,IAAK;IAC5B,IAAI,CAACL,OAAO,IAAI,CAACzB,IAAI,EAAE;MACrB;IACF;IACA,IAAI8B,KAAK,CAACC,WAAW,CAACC,MAAM,CAACC,MAAM,GAAG,CAAC,EAAE;MACvCN,UAAU,CAAC,IAAI,CAAC;IAClB;EACF,CAAC,EACD,CAAC3B,IAAI,EAAEyB,OAAO,CAChB,CAAC;AACH","ignoreList":[]}
|
|
@@ -10,6 +10,7 @@ exports.getCurrentScreenLocation = getCurrentScreenLocation;
|
|
|
10
10
|
exports.handleScreenChange = handleScreenChange;
|
|
11
11
|
exports.reportCurrentScreen = reportCurrentScreen;
|
|
12
12
|
exports.resetScreenTrackerForTests = resetScreenTrackerForTests;
|
|
13
|
+
exports.screenIdFromLocation = screenIdFromLocation;
|
|
13
14
|
exports.screenViewedAttributes = screenViewedAttributes;
|
|
14
15
|
exports.setScreenChangeReporter = setScreenChangeReporter;
|
|
15
16
|
exports.subscribeScreenLocation = subscribeScreenLocation;
|
|
@@ -30,6 +31,17 @@ function locationKey(location) {
|
|
|
30
31
|
return 'path' in location ? `path:${location.path}` : `screen:${location.screen}`;
|
|
31
32
|
}
|
|
32
33
|
|
|
34
|
+
/**
|
|
35
|
+
* The screen id stored on an AUTO envelope (`path` for Expo Router, `screen`
|
|
36
|
+
* otherwise). Missing or blank locations are `'unknown'`, the same sentinel
|
|
37
|
+
* the element picker writes when it has not seen a screen yet.
|
|
38
|
+
*/
|
|
39
|
+
function screenIdFromLocation(location) {
|
|
40
|
+
if (!location) return 'unknown';
|
|
41
|
+
const id = 'path' in location ? location.path : location.screen;
|
|
42
|
+
return id || 'unknown';
|
|
43
|
+
}
|
|
44
|
+
|
|
33
45
|
/** Event attributes for `screen_viewed`, or `null` when the location has no identity. */
|
|
34
46
|
function screenViewedAttributes(location) {
|
|
35
47
|
const screenName = 'path' in location ? location.path : location.screen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SCREEN_VIEWED_EVENT","exports","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":"
|
|
1
|
+
{"version":3,"names":["SCREEN_VIEWED_EVENT","exports","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;AACO,MAAMA,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,eAAe;;AAElD;;AAQA,IAAIE,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,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AAC;EAC3C,IAAI,CAACd,QAAQ,EAAE;EACfmB,kBAAkB,CAACnB,QAAQ,EAAE;IAAEqB,KAAK,EAAE;EAAK,CAAC,CAAC;AAC/C;;AAEA;AACO,SAASE,0BAA0BA,CAAA,EAAS;EACjD/B,OAAO,GAAG,KAAK;EACfE,eAAe,GAAG,IAAI;EACtBD,UAAU,GAAG,IAAI;EACjBE,eAAe,GAAG,IAAI;EACtBE,eAAe,CAAC2B,KAAK,CAAC,CAAC;AACzB","ignoreList":[]}
|
|
@@ -11,7 +11,9 @@ var _reactNative = require("react-native");
|
|
|
11
11
|
var _BannerStepButton = require("../content/BannerStepButton.js");
|
|
12
12
|
var _RichContentRenderer = require("../content/RichContentRenderer.js");
|
|
13
13
|
var _themeColor = require("../content/themeColor.js");
|
|
14
|
+
var _pushBannerLayoutContext = require("../runtime/pushBannerLayoutContext.js");
|
|
14
15
|
var _bannerBarLayout = require("./bannerBarLayout.js");
|
|
16
|
+
var _safeArea = require("./safeArea.js");
|
|
15
17
|
var _bannerBarTokens = require("./bannerBarTokens.js");
|
|
16
18
|
var _resolveBannerTheme = require("./resolveBannerTheme.js");
|
|
17
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -22,6 +24,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
22
24
|
*/
|
|
23
25
|
function BannerBar({
|
|
24
26
|
session,
|
|
27
|
+
pushLayoutEdge = null,
|
|
28
|
+
overlaySafeEdge = null,
|
|
25
29
|
onActions,
|
|
26
30
|
onDismiss
|
|
27
31
|
}) {
|
|
@@ -35,9 +39,15 @@ function BannerBar({
|
|
|
35
39
|
fontColor: foregroundColor
|
|
36
40
|
}), [theme, backgroundColor, foregroundColor]);
|
|
37
41
|
const lookupAttribute = React.useMemo(() => (0, _core.genSessionDataLookup)(session.data), [session.data]);
|
|
38
|
-
const
|
|
42
|
+
const insets = (0, _safeArea.useUserflowSafeAreaInsets)();
|
|
43
|
+
const overlay = banner?.overlay !== false;
|
|
44
|
+
const hostInsetEdge = !overlay && pushLayoutEdge ? pushLayoutEdge : null;
|
|
45
|
+
const safeAreaEdge = hostInsetEdge ?? overlaySafeEdge ?? null;
|
|
46
|
+
const onPushChromeLayout = (0, _pushBannerLayoutContext.usePushBannerHostInsetRegistration)(hostInsetEdge, session.id, hostInsetEdge != null);
|
|
47
|
+
const fadeIn = banner?.animate === true && hostInsetEdge == null;
|
|
48
|
+
const opacity = React.useRef(new _reactNative.Animated.Value(fadeIn ? 0 : 1)).current;
|
|
39
49
|
React.useEffect(() => {
|
|
40
|
-
if (!
|
|
50
|
+
if (!fadeIn) {
|
|
41
51
|
opacity.setValue(1);
|
|
42
52
|
return;
|
|
43
53
|
}
|
|
@@ -51,74 +61,82 @@ function BannerBar({
|
|
|
51
61
|
return () => {
|
|
52
62
|
animation.stop();
|
|
53
63
|
};
|
|
54
|
-
}, [
|
|
64
|
+
}, [fadeIn, opacity, session.id]);
|
|
55
65
|
if (!banner) return null;
|
|
56
|
-
const overlay = banner.overlay !== false;
|
|
57
66
|
const frameStyle = (0, _bannerBarLayout.bannerFrameStyle)(banner);
|
|
67
|
+
const rootStyle = (0, _bannerBarLayout.bannerBarRootStyle)(banner);
|
|
58
68
|
const innerStyle = (0, _bannerBarLayout.bannerInnerStyle)(banner);
|
|
59
69
|
const closePressedBackground = (0, _themeColor.mixThemeColors)(backgroundColor, foregroundColor, 0.12);
|
|
60
70
|
const overlayEdge = banner.embedMode === _protocol.BannerEmbedMode.BODY_LAST ? 'bottom' : 'top';
|
|
61
71
|
const barRadius = (0, _bannerBarLayout.resolveBannerBarBorderRadius)(banner);
|
|
72
|
+
const insetChrome = safeAreaEdge ? (0, _bannerBarLayout.bannerPushLayoutChrome)(safeAreaEdge, insets, backgroundColor) : null;
|
|
73
|
+
const insetChromeOutsideFade = insetChrome != null && fadeIn;
|
|
74
|
+
const bar = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
75
|
+
testID: "userflow-banner",
|
|
76
|
+
style: [styles.root, rootStyle, {
|
|
77
|
+
backgroundColor
|
|
78
|
+
}, barRadius != null ? {
|
|
79
|
+
borderRadius: barRadius,
|
|
80
|
+
overflow: 'hidden'
|
|
81
|
+
} : null],
|
|
82
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
83
|
+
style: styles.startSpacer
|
|
84
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
85
|
+
style: innerStyle,
|
|
86
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
87
|
+
style: styles.content,
|
|
88
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RichContentRenderer.RichContentRenderer, {
|
|
89
|
+
content: banner.content,
|
|
90
|
+
buttons: [],
|
|
91
|
+
theme: bannerTheme,
|
|
92
|
+
sessionData: session.data,
|
|
93
|
+
lookupAttribute: lookupAttribute,
|
|
94
|
+
onActions: onActions
|
|
95
|
+
})
|
|
96
|
+
}), banner.buttons.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
97
|
+
style: styles.buttons,
|
|
98
|
+
children: banner.buttons.map(button => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BannerStepButton.BannerStepButton, {
|
|
99
|
+
button: button,
|
|
100
|
+
theme: bannerTheme,
|
|
101
|
+
sessionData: session.data,
|
|
102
|
+
onActions: onActions
|
|
103
|
+
}, button.id))
|
|
104
|
+
}) : null]
|
|
105
|
+
}), session.version.closeDisabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
106
|
+
style: styles.startSpacer
|
|
107
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
108
|
+
testID: "userflow-banner-dismiss",
|
|
109
|
+
accessibilityRole: "button",
|
|
110
|
+
accessibilityLabel: "Dismiss",
|
|
111
|
+
hitSlop: 8,
|
|
112
|
+
onPress: () => onDismiss(_protocol.EndFlowReasonInput.USER_CLOSED),
|
|
113
|
+
style: ({
|
|
114
|
+
pressed
|
|
115
|
+
}) => [styles.close, pressed ? {
|
|
116
|
+
backgroundColor: closePressedBackground
|
|
117
|
+
} : null],
|
|
118
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
119
|
+
style: [styles.dismissIcon, {
|
|
120
|
+
color: foregroundColor
|
|
121
|
+
}],
|
|
122
|
+
children: "\xD7"
|
|
123
|
+
})
|
|
124
|
+
})]
|
|
125
|
+
});
|
|
126
|
+
const animatedBar = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
|
|
127
|
+
onLayout: hostInsetEdge ? onPushChromeLayout : undefined,
|
|
128
|
+
style: [{
|
|
129
|
+
opacity
|
|
130
|
+
}, overlay ? (0, _bannerBarTokens.bannerOverlayShadowStyle)(overlayEdge) : null, insetChromeOutsideFade ? null : insetChrome],
|
|
131
|
+
children: bar
|
|
132
|
+
});
|
|
62
133
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
63
134
|
testID: "userflow-banner-frame",
|
|
64
135
|
style: frameStyle,
|
|
65
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.
|
|
66
|
-
style:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
70
|
-
testID: "userflow-banner",
|
|
71
|
-
style: [styles.root, {
|
|
72
|
-
backgroundColor
|
|
73
|
-
}, barRadius != null ? {
|
|
74
|
-
borderRadius: barRadius,
|
|
75
|
-
overflow: 'hidden'
|
|
76
|
-
} : null],
|
|
77
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
78
|
-
style: styles.startSpacer
|
|
79
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
80
|
-
style: innerStyle,
|
|
81
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
82
|
-
style: styles.content,
|
|
83
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RichContentRenderer.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__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
92
|
-
style: styles.buttons,
|
|
93
|
-
children: banner.buttons.map(button => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BannerStepButton.BannerStepButton, {
|
|
94
|
-
button: button,
|
|
95
|
-
theme: bannerTheme,
|
|
96
|
-
sessionData: session.data,
|
|
97
|
-
onActions: onActions
|
|
98
|
-
}, button.id))
|
|
99
|
-
}) : null]
|
|
100
|
-
}), session.version.closeDisabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
101
|
-
style: styles.startSpacer
|
|
102
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
103
|
-
testID: "userflow-banner-dismiss",
|
|
104
|
-
accessibilityRole: "button",
|
|
105
|
-
accessibilityLabel: "Dismiss",
|
|
106
|
-
hitSlop: 8,
|
|
107
|
-
onPress: () => onDismiss(_protocol.EndFlowReasonInput.USER_CLOSED),
|
|
108
|
-
style: ({
|
|
109
|
-
pressed
|
|
110
|
-
}) => [styles.close, pressed ? {
|
|
111
|
-
backgroundColor: closePressedBackground
|
|
112
|
-
} : null],
|
|
113
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
114
|
-
style: [styles.dismissIcon, {
|
|
115
|
-
color: foregroundColor
|
|
116
|
-
}],
|
|
117
|
-
children: "\xD7"
|
|
118
|
-
})
|
|
119
|
-
})]
|
|
120
|
-
})
|
|
121
|
-
})
|
|
136
|
+
children: insetChromeOutsideFade ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
137
|
+
style: insetChrome,
|
|
138
|
+
children: animatedBar
|
|
139
|
+
}) : animatedBar
|
|
122
140
|
});
|
|
123
141
|
}
|
|
124
142
|
const styles = _reactNative.StyleSheet.create({
|