@userflow-tech/react-native 0.4.5 → 0.6.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 +31 -2
- package/docs/anchoring.md +6 -1
- package/docs/custom-fonts.md +36 -0
- package/docs/troubleshooting.md +33 -6
- 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/FiberScanRootStore.js +8 -0
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -1
- package/lib/commonjs/anchors/fiber/detectAppFontFamily.js +341 -0
- package/lib/commonjs/anchors/fiber/detectAppFontFamily.js.map +1 -0
- 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/fiber/visibleScreens.js +6 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.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/BannerStepButton.js +2 -1
- package/lib/commonjs/content/BannerStepButton.js.map +1 -1
- package/lib/commonjs/content/RichContentRenderer.js +20 -14
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
- package/lib/commonjs/content/StepButton.js +2 -1
- package/lib/commonjs/content/StepButton.js.map +1 -1
- package/lib/commonjs/content/openSafeUrl.js +3 -1
- package/lib/commonjs/content/openSafeUrl.js.map +1 -1
- package/lib/commonjs/content/resolveContentFontFamily.js +96 -0
- package/lib/commonjs/content/resolveContentFontFamily.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +6 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/commonjs/index.js +21 -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 +101 -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 +28 -6
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -1
- package/lib/commonjs/surfaces/ProgressBar.js +2 -1
- package/lib/commonjs/surfaces/ProgressBar.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +48 -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 +114 -63
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +3 -33
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +2 -1
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/bannerWebViewHeight.js +33 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebViewHeight.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +104 -23
- 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/FiberScanRootStore.js +8 -0
- package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -1
- package/lib/module/anchors/fiber/detectAppFontFamily.js +330 -0
- package/lib/module/anchors/fiber/detectAppFontFamily.js.map +1 -0
- 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/fiber/visibleScreens.js +5 -0
- package/lib/module/anchors/fiber/visibleScreens.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/BannerStepButton.js +2 -1
- package/lib/module/content/BannerStepButton.js.map +1 -1
- package/lib/module/content/RichContentRenderer.js +20 -14
- package/lib/module/content/RichContentRenderer.js.map +1 -1
- package/lib/module/content/StepButton.js +2 -1
- package/lib/module/content/StepButton.js.map +1 -1
- package/lib/module/content/openSafeUrl.js +3 -1
- package/lib/module/content/openSafeUrl.js.map +1 -1
- package/lib/module/content/resolveContentFontFamily.js +89 -0
- package/lib/module/content/resolveContentFontFamily.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +7 -1
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/module/index.js +24 -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 +94 -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 +28 -6
- package/lib/module/surfaces/BannerSurface.js.map +1 -1
- package/lib/module/surfaces/ProgressBar.js +2 -1
- package/lib/module/surfaces/ProgressBar.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +49 -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 +115 -64
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +3 -31
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +2 -1
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/bannerWebViewHeight.js +29 -0
- package/lib/module/surfaces/bannerWebView/bannerWebViewHeight.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +104 -23
- 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/FiberScanRootStore.d.ts +5 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/detectAppFontFamily.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/fiber/detectAppFontFamily.d.ts.map +1 -0
- 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/fiber/visibleScreens.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.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/BannerStepButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveContentFontFamily.d.ts +35 -0
- package/lib/typescript/commonjs/src/content/resolveContentFontFamily.d.ts.map +1 -0
- 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 +22 -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 +6 -5
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/ProgressBar.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/bannerNeedsWebView.d.ts +3 -12
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebViewHeight.d.ts +13 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebViewHeight.d.ts.map +1 -0
- 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/FiberScanRootStore.d.ts +5 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/detectAppFontFamily.d.ts +30 -0
- package/lib/typescript/module/src/anchors/fiber/detectAppFontFamily.d.ts.map +1 -0
- 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/fiber/visibleScreens.d.ts +2 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.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/BannerStepButton.d.ts.map +1 -1
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/module/src/content/openSafeUrl.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveContentFontFamily.d.ts +35 -0
- package/lib/typescript/module/src/content/resolveContentFontFamily.d.ts.map +1 -0
- 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 +22 -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 +6 -5
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/ProgressBar.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/bannerNeedsWebView.d.ts +3 -12
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebViewHeight.d.ts +13 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebViewHeight.d.ts.map +1 -0
- 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/FiberScanRootStore.ts +8 -0
- package/src/anchors/fiber/detectAppFontFamily.ts +400 -0
- 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/fiber/visibleScreens.ts +5 -0
- 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/BannerStepButton.tsx +2 -1
- package/src/content/RichContentRenderer.tsx +19 -13
- package/src/content/StepButton.tsx +2 -1
- package/src/content/openSafeUrl.ts +3 -1
- package/src/content/resolveContentFontFamily.ts +119 -0
- package/src/expo-router/useUserflowExpoRouter.ts +10 -1
- package/src/index.ts +22 -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 +126 -0
- package/src/screenTracker.ts +11 -0
- package/src/surfaces/BannerBar.tsx +93 -55
- package/src/surfaces/BannerSurface.tsx +61 -9
- package/src/surfaces/ProgressBar.tsx +2 -1
- package/src/surfaces/TooltipSurface.tsx +78 -53
- package/src/surfaces/bannerBarLayout.ts +80 -7
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +151 -57
- package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +4 -36
- package/src/surfaces/bannerWebView/bannerThemeStyles.ts +2 -1
- package/src/surfaces/bannerWebView/bannerWebViewHeight.ts +32 -0
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +111 -23
- 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/dist/flows.d.ts +2 -0
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BannerSessionEngine, type UserflowCore } from '@userflow-tech/core';
|
|
2
|
+
import type { EndFlowReasonInput } from '@userflow-tech/protocol';
|
|
2
3
|
|
|
3
4
|
import { evalJsController } from '../evalJs/evalJsController';
|
|
4
5
|
import { openFlowNavigateUrl } from '../navigation/openFlowNavigateUrl';
|
|
@@ -44,8 +45,15 @@ export function resetBannerSessionEngine(): void {
|
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
/** Drop the local banner without detaching (preview exit, user switch). */
|
|
47
|
-
export function clearBannerSessionEngineLocalSession(
|
|
48
|
-
|
|
48
|
+
export function clearBannerSessionEngineLocalSession(options?: {
|
|
49
|
+
rememberDraftForPreviewEnd?: boolean;
|
|
50
|
+
}): void {
|
|
51
|
+
bannerEngine?.clearLocalSession(options);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Best-effort end of a Builder preview banner draft (including after local clear). */
|
|
55
|
+
export async function endDraftBannerSession(): Promise<void> {
|
|
56
|
+
await bannerEngine?.endDraftBannerSession('USER_CLOSED' as EndFlowReasonInput);
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
/** Test helper: drop the singleton so the next get recreates it. */
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { BannerSessionEngine } from '@userflow-tech/core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { bannerEdge } from './bannerPlacement';
|
|
6
|
+
import { useBannerSession } from './useBannerSession';
|
|
7
|
+
|
|
8
|
+
type SpacerEdge = 'top' | 'bottom';
|
|
9
|
+
|
|
10
|
+
const heights: Record<SpacerEdge, number> = { top: 0, bottom: 0 };
|
|
11
|
+
const listeners = new Set<() => void>();
|
|
12
|
+
|
|
13
|
+
function emit(): void {
|
|
14
|
+
for (const listener of listeners) {
|
|
15
|
+
listener();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export function setBannerFlowSpacerHeight(edge: SpacerEdge, height: number): void {
|
|
21
|
+
const next = Math.max(0, Math.ceil(height));
|
|
22
|
+
if (heights[edge] === next) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
heights[edge] = next;
|
|
26
|
+
emit();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function subscribe(listener: () => void): () => void {
|
|
30
|
+
listeners.add(listener);
|
|
31
|
+
return () => {
|
|
32
|
+
listeners.delete(listener);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function getHeight(edge: SpacerEdge): number {
|
|
37
|
+
return heights[edge];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Reserves layout space when a custom-css WebView banner is painted in the
|
|
42
|
+
* overlay host but the builder marked it `overlay: false` (push layout).
|
|
43
|
+
*/
|
|
44
|
+
export function BannerWebViewFlowSpacer({
|
|
45
|
+
engine,
|
|
46
|
+
edge,
|
|
47
|
+
}: {
|
|
48
|
+
engine: BannerSessionEngine;
|
|
49
|
+
edge: SpacerEdge;
|
|
50
|
+
}): React.ReactElement | null {
|
|
51
|
+
const session = useBannerSession(engine);
|
|
52
|
+
const height = React.useSyncExternalStore(
|
|
53
|
+
subscribe,
|
|
54
|
+
() => getHeight(edge),
|
|
55
|
+
() => getHeight(edge),
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
if (!session?.version.banner || height <= 0) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
const pinnedEdge = bannerEdge(session.version.banner.embedMode);
|
|
62
|
+
if (pinnedEdge !== edge) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Layout-only: the painted banner lives in the overlay host (lower z-index).
|
|
67
|
+
return (
|
|
68
|
+
<View pointerEvents="none" testID={`userflow-banner-flow-spacer-${edge}`} style={{ height }} />
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -31,6 +31,17 @@ export function getFlowSessionEngine(core: UserflowCore): FlowSessionEngine {
|
|
|
31
31
|
updateUser: (attributes) => core.updateUser(attributes),
|
|
32
32
|
updateGroup: (attributes, options) => core.updateGroup(attributes, options),
|
|
33
33
|
});
|
|
34
|
+
flowEngine.on((event) => {
|
|
35
|
+
if (event.type !== 'sessionChange' || event.session !== null) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
// Drop a flow's eval page when the tour ends. A banner WebView reuses the
|
|
39
|
+
// same controller and must keep its page alive until the banner dismisses.
|
|
40
|
+
if (evalJsController.getSnapshot().bannerOwnsWebView) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
evalJsController.reset();
|
|
44
|
+
});
|
|
34
45
|
if (endDraftOnArrival) watchForRestoredDraft();
|
|
35
46
|
}
|
|
36
47
|
return flowEngine;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { UserflowCore } from '@userflow-tech/core';
|
|
2
|
+
import type { EndFlowReasonInput } from '@userflow-tech/protocol';
|
|
3
|
+
|
|
4
|
+
import { evalJsController } from '../evalJs/evalJsController';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
clearBannerSessionEngineLocalSession,
|
|
8
|
+
endDraftBannerSession,
|
|
9
|
+
getBannerSessionEngine,
|
|
10
|
+
} from './bannerEngine';
|
|
11
|
+
import {
|
|
12
|
+
cancelPendingDraftEnd,
|
|
13
|
+
clearFlowSessionEngineLocalSession,
|
|
14
|
+
endDraftFlowSession,
|
|
15
|
+
} from './flowEngine';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Drop local tour state and reset eval before a Builder `startFlowWithToken`.
|
|
19
|
+
*
|
|
20
|
+
* When a draft banner is still active, end it on the server first. The channel
|
|
21
|
+
* dedupes an unchanged `SetBannerSession`, so clearing the banner locally
|
|
22
|
+
* without ending the draft leaves nothing visible on a second preview of the
|
|
23
|
+
* same banner.
|
|
24
|
+
*/
|
|
25
|
+
export async function prepareForBuilderPreviewStart(core: UserflowCore): Promise<void> {
|
|
26
|
+
cancelPendingDraftEnd();
|
|
27
|
+
clearFlowSessionEngineLocalSession();
|
|
28
|
+
core.setFlowSessionId(null);
|
|
29
|
+
|
|
30
|
+
const bannerEngine = getBannerSessionEngine(core);
|
|
31
|
+
const hasDraftBanner =
|
|
32
|
+
bannerEngine.getBannerSession()?.draftMode === true ||
|
|
33
|
+
bannerEngine.getDeferredDraftBannerSessionId() !== null;
|
|
34
|
+
|
|
35
|
+
if (hasDraftBanner) {
|
|
36
|
+
await bannerEngine.endDraftBannerForPreview('USER_CLOSED' as EndFlowReasonInput);
|
|
37
|
+
} else {
|
|
38
|
+
clearBannerSessionEngineLocalSession();
|
|
39
|
+
core.setBannerSessionId(null);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
evalJsController.reset();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** End tour and banner Builder drafts on the server (preview exit). */
|
|
46
|
+
export async function endDraftPreviewSessions(): Promise<void> {
|
|
47
|
+
await endDraftFlowSession();
|
|
48
|
+
await endDraftBannerSession();
|
|
49
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { LayoutChangeEvent } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export type PushBannerLayoutEdge = 'top' | 'bottom';
|
|
5
|
+
|
|
6
|
+
interface PushBannerLayoutContextValue {
|
|
7
|
+
/** Push-layout banner chrome mounted; host safe-area may follow this edge. */
|
|
8
|
+
register: (edge: PushBannerLayoutEdge, token: string) => void;
|
|
9
|
+
unregister: (token: string) => void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const PushBannerLayoutContext = React.createContext<PushBannerLayoutContextValue | null>(null);
|
|
13
|
+
|
|
14
|
+
function pickEdge(registrations: Map<string, PushBannerLayoutEdge>): PushBannerLayoutEdge | null {
|
|
15
|
+
let top = false;
|
|
16
|
+
let bottom = false;
|
|
17
|
+
for (const edge of registrations.values()) {
|
|
18
|
+
if (edge === 'top') {
|
|
19
|
+
top = true;
|
|
20
|
+
}
|
|
21
|
+
if (edge === 'bottom') {
|
|
22
|
+
bottom = true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (top) {
|
|
26
|
+
return 'top';
|
|
27
|
+
}
|
|
28
|
+
if (bottom) {
|
|
29
|
+
return 'bottom';
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function PushBannerLayoutProvider({
|
|
35
|
+
children,
|
|
36
|
+
onActiveEdgeChange,
|
|
37
|
+
}: {
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
onActiveEdgeChange: (edge: PushBannerLayoutEdge | null) => void;
|
|
40
|
+
}): React.ReactElement {
|
|
41
|
+
const registrations = React.useRef(new Map<string, PushBannerLayoutEdge>());
|
|
42
|
+
const onActiveEdgeChangeRef = React.useRef(onActiveEdgeChange);
|
|
43
|
+
onActiveEdgeChangeRef.current = onActiveEdgeChange;
|
|
44
|
+
|
|
45
|
+
const sync = React.useCallback(() => {
|
|
46
|
+
onActiveEdgeChangeRef.current(pickEdge(registrations.current));
|
|
47
|
+
}, []);
|
|
48
|
+
|
|
49
|
+
const value = React.useMemo<PushBannerLayoutContextValue>(
|
|
50
|
+
() => ({
|
|
51
|
+
register: (edge, token) => {
|
|
52
|
+
registrations.current.set(token, edge);
|
|
53
|
+
sync();
|
|
54
|
+
},
|
|
55
|
+
unregister: (token) => {
|
|
56
|
+
if (registrations.current.delete(token)) {
|
|
57
|
+
sync();
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
[sync],
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
React.useLayoutEffect(() => {
|
|
65
|
+
sync();
|
|
66
|
+
}, [sync]);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<PushBannerLayoutContext.Provider value={value}>{children}</PushBannerLayoutContext.Provider>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export function usePushBannerLayoutRegistration(
|
|
75
|
+
edge: PushBannerLayoutEdge | null | undefined,
|
|
76
|
+
sessionId: string | undefined,
|
|
77
|
+
): void {
|
|
78
|
+
const ctx = React.useContext(PushBannerLayoutContext);
|
|
79
|
+
React.useLayoutEffect(() => {
|
|
80
|
+
if (!ctx || !edge || !sessionId) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const token = `${sessionId}:${edge}`;
|
|
84
|
+
ctx.register(edge, token);
|
|
85
|
+
return () => {
|
|
86
|
+
ctx.unregister(token);
|
|
87
|
+
};
|
|
88
|
+
}, [ctx, edge, sessionId]);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Clears the host top/bottom safe-area override only after push-layout chrome
|
|
93
|
+
* has laid out, so a session without visible chrome cannot leave a white strip.
|
|
94
|
+
*
|
|
95
|
+
* Remembers which edge laid out instead of resetting a flag in an effect: on
|
|
96
|
+
* Fabric the chrome's first onLayout can run before the mount's passive effects
|
|
97
|
+
* flush, and a reset there would discard it until the banner happened to
|
|
98
|
+
* re-layout, leaving already-mounted host screens on the old inset.
|
|
99
|
+
*
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
export function usePushBannerHostInsetRegistration(
|
|
103
|
+
edge: PushBannerLayoutEdge | null | undefined,
|
|
104
|
+
sessionId: string,
|
|
105
|
+
enabled: boolean,
|
|
106
|
+
): (event: LayoutChangeEvent) => void {
|
|
107
|
+
const activeEdge = enabled && edge ? edge : null;
|
|
108
|
+
const [laidOutEdge, setLaidOutEdge] = React.useState<PushBannerLayoutEdge | null>(null);
|
|
109
|
+
|
|
110
|
+
usePushBannerLayoutRegistration(
|
|
111
|
+
activeEdge && laidOutEdge === activeEdge ? activeEdge : null,
|
|
112
|
+
sessionId,
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
return React.useCallback(
|
|
116
|
+
(event: LayoutChangeEvent) => {
|
|
117
|
+
if (!activeEdge) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (event.nativeEvent.layout.height > 0) {
|
|
121
|
+
setLaidOutEdge(activeEdge);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
[activeEdge],
|
|
125
|
+
);
|
|
126
|
+
}
|
package/src/screenTracker.ts
CHANGED
|
@@ -24,6 +24,17 @@ function locationKey(location: ClientLocationUpdate): string {
|
|
|
24
24
|
return 'path' in location ? `path:${location.path}` : `screen:${location.screen}`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* The screen id stored on an AUTO envelope (`path` for Expo Router, `screen`
|
|
29
|
+
* otherwise). Missing or blank locations are `'unknown'`, the same sentinel
|
|
30
|
+
* the element picker writes when it has not seen a screen yet.
|
|
31
|
+
*/
|
|
32
|
+
export function screenIdFromLocation(location: ClientLocationUpdate | null | undefined): string {
|
|
33
|
+
if (!location) return 'unknown';
|
|
34
|
+
const id = 'path' in location ? location.path : location.screen;
|
|
35
|
+
return id || 'unknown';
|
|
36
|
+
}
|
|
37
|
+
|
|
27
38
|
/** Event attributes for `screen_viewed`, or `null` when the location has no identity. */
|
|
28
39
|
export function screenViewedAttributes(
|
|
29
40
|
location: ClientLocationUpdate,
|
|
@@ -11,14 +11,18 @@ import { Animated, Pressable, StyleSheet, Text, View } from 'react-native';
|
|
|
11
11
|
import { BannerStepButton } from '../content/BannerStepButton';
|
|
12
12
|
import { RichContentRenderer } from '../content/RichContentRenderer';
|
|
13
13
|
import { mixThemeColors } from '../content/themeColor';
|
|
14
|
+
import { usePushBannerHostInsetRegistration } from '../runtime/pushBannerLayoutContext';
|
|
14
15
|
|
|
15
16
|
import {
|
|
16
17
|
BANNER_CLOSE_SLOT_SIZE,
|
|
17
18
|
BANNER_ROOT_PADDING,
|
|
19
|
+
bannerBarRootStyle,
|
|
18
20
|
bannerFrameStyle,
|
|
19
21
|
bannerInnerStyle,
|
|
22
|
+
bannerPushLayoutChrome,
|
|
20
23
|
resolveBannerBarBorderRadius,
|
|
21
24
|
} from './bannerBarLayout';
|
|
25
|
+
import { useUserflowSafeAreaInsets } from './safeArea';
|
|
22
26
|
import {
|
|
23
27
|
BANNER_BUTTON_GAP,
|
|
24
28
|
BANNER_CLOSE_BORDER_RADIUS,
|
|
@@ -28,6 +32,8 @@ import { resolveBannerBackgroundColor, resolveBannerForegroundColor } from './re
|
|
|
28
32
|
|
|
29
33
|
export interface BannerBarProps {
|
|
30
34
|
session: BannerSessionFragment;
|
|
35
|
+
pushLayoutEdge?: 'top' | 'bottom' | null;
|
|
36
|
+
overlaySafeEdge?: 'top' | 'bottom' | null;
|
|
31
37
|
onActions: (actions: FlowActionFragment[]) => void;
|
|
32
38
|
onDismiss: (endReason: EndFlowReasonInput) => void;
|
|
33
39
|
}
|
|
@@ -38,6 +44,8 @@ export interface BannerBarProps {
|
|
|
38
44
|
*/
|
|
39
45
|
export function BannerBar({
|
|
40
46
|
session,
|
|
47
|
+
pushLayoutEdge = null,
|
|
48
|
+
overlaySafeEdge = null,
|
|
41
49
|
onActions,
|
|
42
50
|
onDismiss,
|
|
43
51
|
}: BannerBarProps): React.ReactElement | null {
|
|
@@ -50,10 +58,20 @@ export function BannerBar({
|
|
|
50
58
|
[theme, backgroundColor, foregroundColor],
|
|
51
59
|
);
|
|
52
60
|
const lookupAttribute = React.useMemo(() => genSessionDataLookup(session.data), [session.data]);
|
|
53
|
-
const
|
|
61
|
+
const insets = useUserflowSafeAreaInsets();
|
|
62
|
+
const overlay = banner?.overlay !== false;
|
|
63
|
+
const hostInsetEdge = !overlay && pushLayoutEdge ? pushLayoutEdge : null;
|
|
64
|
+
const safeAreaEdge = hostInsetEdge ?? overlaySafeEdge ?? null;
|
|
65
|
+
const onPushChromeLayout = usePushBannerHostInsetRegistration(
|
|
66
|
+
hostInsetEdge,
|
|
67
|
+
session.id,
|
|
68
|
+
hostInsetEdge != null,
|
|
69
|
+
);
|
|
70
|
+
const fadeIn = banner?.animate === true && hostInsetEdge == null;
|
|
71
|
+
const opacity = React.useRef(new Animated.Value(fadeIn ? 0 : 1)).current;
|
|
54
72
|
|
|
55
73
|
React.useEffect(() => {
|
|
56
|
-
if (!
|
|
74
|
+
if (!fadeIn) {
|
|
57
75
|
opacity.setValue(1);
|
|
58
76
|
return;
|
|
59
77
|
}
|
|
@@ -67,73 +85,93 @@ export function BannerBar({
|
|
|
67
85
|
return () => {
|
|
68
86
|
animation.stop();
|
|
69
87
|
};
|
|
70
|
-
}, [
|
|
88
|
+
}, [fadeIn, opacity, session.id]);
|
|
71
89
|
|
|
72
90
|
if (!banner) return null;
|
|
73
91
|
|
|
74
|
-
const overlay = banner.overlay !== false;
|
|
75
92
|
const frameStyle = bannerFrameStyle(banner);
|
|
93
|
+
const rootStyle = bannerBarRootStyle(banner);
|
|
76
94
|
const innerStyle = bannerInnerStyle(banner);
|
|
77
95
|
const closePressedBackground = mixThemeColors(backgroundColor, foregroundColor, 0.12);
|
|
78
96
|
const overlayEdge = banner.embedMode === BannerEmbedMode.BODY_LAST ? 'bottom' : 'top';
|
|
79
97
|
const barRadius = resolveBannerBarBorderRadius(banner);
|
|
98
|
+
const insetChrome = safeAreaEdge
|
|
99
|
+
? bannerPushLayoutChrome(safeAreaEdge, insets, backgroundColor)
|
|
100
|
+
: null;
|
|
101
|
+
const insetChromeOutsideFade = insetChrome != null && fadeIn;
|
|
80
102
|
|
|
81
|
-
|
|
82
|
-
<View
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
103
|
+
const bar = (
|
|
104
|
+
<View
|
|
105
|
+
testID="userflow-banner"
|
|
106
|
+
style={[
|
|
107
|
+
styles.root,
|
|
108
|
+
rootStyle,
|
|
109
|
+
{ backgroundColor },
|
|
110
|
+
barRadius != null ? { borderRadius: barRadius, overflow: 'hidden' as const } : null,
|
|
111
|
+
]}
|
|
112
|
+
>
|
|
113
|
+
<View style={styles.startSpacer} />
|
|
114
|
+
<View style={innerStyle}>
|
|
115
|
+
<View style={styles.content}>
|
|
116
|
+
<RichContentRenderer
|
|
117
|
+
content={banner.content}
|
|
118
|
+
buttons={[]}
|
|
119
|
+
theme={bannerTheme}
|
|
120
|
+
sessionData={session.data}
|
|
121
|
+
lookupAttribute={lookupAttribute}
|
|
122
|
+
onActions={onActions}
|
|
123
|
+
/>
|
|
124
|
+
</View>
|
|
125
|
+
{banner.buttons.length > 0 ? (
|
|
126
|
+
<View style={styles.buttons}>
|
|
127
|
+
{banner.buttons.map((button) => (
|
|
128
|
+
<BannerStepButton
|
|
129
|
+
key={button.id}
|
|
130
|
+
button={button}
|
|
98
131
|
theme={bannerTheme}
|
|
99
132
|
sessionData={session.data}
|
|
100
|
-
lookupAttribute={lookupAttribute}
|
|
101
133
|
onActions={onActions}
|
|
102
134
|
/>
|
|
103
|
-
|
|
104
|
-
{banner.buttons.length > 0 ? (
|
|
105
|
-
<View style={styles.buttons}>
|
|
106
|
-
{banner.buttons.map((button) => (
|
|
107
|
-
<BannerStepButton
|
|
108
|
-
key={button.id}
|
|
109
|
-
button={button}
|
|
110
|
-
theme={bannerTheme}
|
|
111
|
-
sessionData={session.data}
|
|
112
|
-
onActions={onActions}
|
|
113
|
-
/>
|
|
114
|
-
))}
|
|
115
|
-
</View>
|
|
116
|
-
) : null}
|
|
135
|
+
))}
|
|
117
136
|
</View>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
</
|
|
136
|
-
|
|
137
|
+
) : null}
|
|
138
|
+
</View>
|
|
139
|
+
{session.version.closeDisabled ? (
|
|
140
|
+
<View style={styles.startSpacer} />
|
|
141
|
+
) : (
|
|
142
|
+
<Pressable
|
|
143
|
+
testID="userflow-banner-dismiss"
|
|
144
|
+
accessibilityRole="button"
|
|
145
|
+
accessibilityLabel="Dismiss"
|
|
146
|
+
hitSlop={8}
|
|
147
|
+
onPress={() => onDismiss(EndFlowReasonInput.USER_CLOSED)}
|
|
148
|
+
style={({ pressed }) => [
|
|
149
|
+
styles.close,
|
|
150
|
+
pressed ? { backgroundColor: closePressedBackground } : null,
|
|
151
|
+
]}
|
|
152
|
+
>
|
|
153
|
+
<Text style={[styles.dismissIcon, { color: foregroundColor }]}>×</Text>
|
|
154
|
+
</Pressable>
|
|
155
|
+
)}
|
|
156
|
+
</View>
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
const animatedBar = (
|
|
160
|
+
<Animated.View
|
|
161
|
+
onLayout={hostInsetEdge ? onPushChromeLayout : undefined}
|
|
162
|
+
style={[
|
|
163
|
+
{ opacity },
|
|
164
|
+
overlay ? bannerOverlayShadowStyle(overlayEdge) : null,
|
|
165
|
+
insetChromeOutsideFade ? null : insetChrome,
|
|
166
|
+
]}
|
|
167
|
+
>
|
|
168
|
+
{bar}
|
|
169
|
+
</Animated.View>
|
|
170
|
+
);
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<View testID="userflow-banner-frame" style={frameStyle}>
|
|
174
|
+
{insetChromeOutsideFade ? <View style={insetChrome}>{animatedBar}</View> : animatedBar}
|
|
137
175
|
</View>
|
|
138
176
|
);
|
|
139
177
|
}
|
|
@@ -15,26 +15,56 @@ import { bannerNeedsWebView } from './bannerWebView/bannerNeedsWebView';
|
|
|
15
15
|
|
|
16
16
|
export interface BannerSurfaceProps {
|
|
17
17
|
session: BannerSessionFragment;
|
|
18
|
+
/** When set, the banner pushes host layout and fills the safe-area inset on this edge. */
|
|
19
|
+
pushLayoutEdge?: 'top' | 'bottom' | null;
|
|
20
|
+
/** Overlay host edge — paints safe-area padding without pushing layout. */
|
|
21
|
+
overlaySafeEdge?: 'top' | 'bottom' | null;
|
|
18
22
|
onActions: (actions: FlowActionFragment[]) => void | Promise<void>;
|
|
19
23
|
onDismiss: (endReason: EndFlowReasonInput) => void;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
let warnedMissingWebView = false;
|
|
23
27
|
|
|
24
|
-
/**
|
|
25
|
-
* Native banner bar, or a WebView when a button runs Evaluate JavaScript or the
|
|
26
|
-
* theme has published custom CSS (same CDN stylesheet as userflow.js iframes).
|
|
27
|
-
*/
|
|
28
|
+
/** Native banner bar, or a WebView when `customBannerEnabled` is set on the banner. */
|
|
28
29
|
export function BannerSurface({
|
|
29
30
|
session,
|
|
31
|
+
pushLayoutEdge = null,
|
|
32
|
+
overlaySafeEdge = null,
|
|
30
33
|
onActions,
|
|
31
34
|
onDismiss,
|
|
32
35
|
}: BannerSurfaceProps): React.ReactElement | null {
|
|
33
36
|
const banner = session.version.banner;
|
|
34
|
-
const
|
|
35
|
-
const needsWebView = banner != null && bannerNeedsWebView(banner, theme);
|
|
37
|
+
const needsWebView = banner != null && bannerNeedsWebView(banner);
|
|
36
38
|
const webView = needsWebView ? getEvalJsWebView() : null;
|
|
37
39
|
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
if (!banner || !__DEV__) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
45
|
+
console.log('[Userflow] banner shown', {
|
|
46
|
+
flowId: session.flow.id,
|
|
47
|
+
flowName: session.flow.name,
|
|
48
|
+
bannerSessionId: session.id,
|
|
49
|
+
versionId: session.version.id,
|
|
50
|
+
embedMode: banner.embedMode,
|
|
51
|
+
overlay: banner.overlay !== false,
|
|
52
|
+
webView: needsWebView,
|
|
53
|
+
pushLayoutEdge: pushLayoutEdge ?? null,
|
|
54
|
+
overlaySafeEdge: overlaySafeEdge ?? null,
|
|
55
|
+
hostAsOverlay: banner.overlay !== false || needsWebView,
|
|
56
|
+
});
|
|
57
|
+
}, [
|
|
58
|
+
banner,
|
|
59
|
+
needsWebView,
|
|
60
|
+
overlaySafeEdge,
|
|
61
|
+
pushLayoutEdge,
|
|
62
|
+
session.flow.id,
|
|
63
|
+
session.flow.name,
|
|
64
|
+
session.id,
|
|
65
|
+
session.version.id,
|
|
66
|
+
]);
|
|
67
|
+
|
|
38
68
|
React.useLayoutEffect(() => {
|
|
39
69
|
if (!needsWebView || !webView) {
|
|
40
70
|
return;
|
|
@@ -69,13 +99,35 @@ export function BannerSurface({
|
|
|
69
99
|
);
|
|
70
100
|
}
|
|
71
101
|
}
|
|
72
|
-
return
|
|
102
|
+
return (
|
|
103
|
+
<BannerBar
|
|
104
|
+
session={session}
|
|
105
|
+
pushLayoutEdge={pushLayoutEdge}
|
|
106
|
+
overlaySafeEdge={overlaySafeEdge}
|
|
107
|
+
onActions={onActions}
|
|
108
|
+
onDismiss={onDismiss}
|
|
109
|
+
/>
|
|
110
|
+
);
|
|
73
111
|
}
|
|
74
112
|
return (
|
|
75
|
-
<BannerWebViewBar
|
|
113
|
+
<BannerWebViewBar
|
|
114
|
+
session={session}
|
|
115
|
+
pushLayoutEdge={pushLayoutEdge}
|
|
116
|
+
overlaySafeEdge={overlaySafeEdge}
|
|
117
|
+
onActions={onActions}
|
|
118
|
+
onDismiss={dismissWebViewBanner}
|
|
119
|
+
/>
|
|
76
120
|
);
|
|
77
121
|
}
|
|
78
|
-
return
|
|
122
|
+
return (
|
|
123
|
+
<BannerBar
|
|
124
|
+
session={session}
|
|
125
|
+
pushLayoutEdge={pushLayoutEdge}
|
|
126
|
+
overlaySafeEdge={overlaySafeEdge}
|
|
127
|
+
onActions={onActions}
|
|
128
|
+
onDismiss={onDismiss}
|
|
129
|
+
/>
|
|
130
|
+
);
|
|
79
131
|
}
|
|
80
132
|
|
|
81
133
|
/** @internal */
|
|
@@ -2,6 +2,7 @@ import type { ThemeFragment } from '@userflow-tech/protocol';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { StyleSheet, Text, View } from 'react-native';
|
|
4
4
|
|
|
5
|
+
import { resolveContentFontFamily } from '../content/resolveContentFontFamily';
|
|
5
6
|
import { foregroundAlpha } from '../content/themeColor';
|
|
6
7
|
|
|
7
8
|
export type ProgressBarPlacement = 'TOP' | 'BOTTOM';
|
|
@@ -72,7 +73,7 @@ export function ProgressBar({
|
|
|
72
73
|
styles.numberedLabel,
|
|
73
74
|
{
|
|
74
75
|
color: foregroundAlpha(theme.fontColor, 0.55),
|
|
75
|
-
fontFamily: theme
|
|
76
|
+
fontFamily: resolveContentFontFamily(theme),
|
|
76
77
|
fontSize: Math.max(12, Math.round(theme.fontSize * 0.875)),
|
|
77
78
|
},
|
|
78
79
|
]}
|