@userflow-tech/react-native 0.1.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/LICENSE +76 -0
- package/README.md +337 -0
- package/docs/anchoring.md +264 -0
- package/docs/deep-linking.md +271 -0
- package/docs/identity-verification.md +95 -0
- package/docs/theme-mapping.md +101 -0
- package/docs/troubleshooting.md +107 -0
- package/lib/commonjs/anchors/AnchorRegistry.js +72 -0
- package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -0
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +315 -0
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -0
- package/lib/commonjs/anchors/ScrollContainerRegistry.js +93 -0
- package/lib/commonjs/anchors/ScrollContainerRegistry.js.map +1 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js +83 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -0
- package/lib/commonjs/anchors/animationFrame.js +90 -0
- package/lib/commonjs/anchors/animationFrame.js.map +1 -0
- package/lib/commonjs/anchors/autoAnchor.js +253 -0
- package/lib/commonjs/anchors/autoAnchor.js.map +1 -0
- package/lib/commonjs/anchors/elementConditionEvaluator.js +82 -0
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -0
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js +90 -0
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js +180 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +214 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findScrollAncestors.js +176 -0
- package/lib/commonjs/anchors/fiber/findScrollAncestors.js.map +1 -0
- package/lib/commonjs/anchors/fiber/measureHostFiber.js +75 -0
- package/lib/commonjs/anchors/fiber/measureHostFiber.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +165 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -0
- package/lib/commonjs/anchors/hintsCodec.js +120 -0
- package/lib/commonjs/anchors/hintsCodec.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +112 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/resolveManualAnchorId.js +17 -0
- package/lib/commonjs/anchors/resolveManualAnchorId.js.map +1 -0
- package/lib/commonjs/anchors/scrollAnchorIntoView.js +227 -0
- package/lib/commonjs/anchors/scrollAnchorIntoView.js.map +1 -0
- package/lib/commonjs/anchors/scrollConfig.js +48 -0
- package/lib/commonjs/anchors/scrollConfig.js.map +1 -0
- package/lib/commonjs/anchors/targetPressMonitor.js +113 -0
- package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js +91 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -0
- package/lib/commonjs/anchors/useUserflowScrollContainer.js +76 -0
- package/lib/commonjs/anchors/useUserflowScrollContainer.js.map +1 -0
- package/lib/commonjs/anonymousId.js +42 -0
- package/lib/commonjs/anonymousId.js.map +1 -0
- package/lib/commonjs/content/RichContentRenderer.js +675 -0
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -0
- package/lib/commonjs/content/StepButton.js +57 -0
- package/lib/commonjs/content/StepButton.js.map +1 -0
- package/lib/commonjs/content/buttonAppearance.js +18 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -0
- package/lib/commonjs/content/deserialize.js +129 -0
- package/lib/commonjs/content/deserialize.js.map +1 -0
- package/lib/commonjs/content/imageLayout.js +24 -0
- package/lib/commonjs/content/imageLayout.js.map +1 -0
- package/lib/commonjs/content/migrateFlowBlocks.js +39 -0
- package/lib/commonjs/content/migrateFlowBlocks.js.map +1 -0
- package/lib/commonjs/content/openSafeUrl.js +37 -0
- package/lib/commonjs/content/openSafeUrl.js.map +1 -0
- package/lib/commonjs/content/resolveStepButtonChrome.js +95 -0
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -0
- package/lib/commonjs/content/themeColor.js +106 -0
- package/lib/commonjs/content/themeColor.js.map +1 -0
- package/lib/commonjs/content/types.js +2 -0
- package/lib/commonjs/content/types.js.map +1 -0
- package/lib/commonjs/deepLinking.js +162 -0
- package/lib/commonjs/deepLinking.js.map +1 -0
- package/lib/commonjs/expo-router/UserflowExpoRouterScreenTracker.js +13 -0
- package/lib/commonjs/expo-router/UserflowExpoRouterScreenTracker.js.map +1 -0
- package/lib/commonjs/expo-router/getExpoRouterScreenTracker.js +44 -0
- package/lib/commonjs/expo-router/getExpoRouterScreenTracker.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +20 -0
- package/lib/commonjs/expo-router/index.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +45 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -0
- package/lib/commonjs/index.js +356 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lifecycle.js +200 -0
- package/lib/commonjs/lifecycle.js.map +1 -0
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +69 -0
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -0
- package/lib/commonjs/navigation/chainCallbacks.js +16 -0
- package/lib/commonjs/navigation/chainCallbacks.js.map +1 -0
- package/lib/commonjs/navigation/getActiveRouteName.js +18 -0
- package/lib/commonjs/navigation/getActiveRouteName.js.map +1 -0
- package/lib/commonjs/navigation/index.js +50 -0
- package/lib/commonjs/navigation/index.js.map +1 -0
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +110 -0
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -0
- package/lib/commonjs/network.js +90 -0
- package/lib/commonjs/network.js.map +1 -0
- package/lib/commonjs/pairing/PairingController.js +290 -0
- package/lib/commonjs/pairing/PairingController.js.map +1 -0
- package/lib/commonjs/pairing/PreviewModeBanner.js +118 -0
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -0
- package/lib/commonjs/pairing/deepLink.js +141 -0
- package/lib/commonjs/pairing/deepLink.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +115 -0
- package/lib/commonjs/pairing/diagnostics.js.map +1 -0
- package/lib/commonjs/pairing/index.js +58 -0
- package/lib/commonjs/pairing/index.js.map +1 -0
- package/lib/commonjs/pairing/pairingRuntime.js +85 -0
- package/lib/commonjs/pairing/pairingRuntime.js.map +1 -0
- package/lib/commonjs/pairing/tokenStorage.js +70 -0
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -0
- package/lib/commonjs/pairing/usePairingState.js +40 -0
- package/lib/commonjs/pairing/usePairingState.js.map +1 -0
- package/lib/commonjs/runtime/FlowRenderer.js +57 -0
- package/lib/commonjs/runtime/FlowRenderer.js.map +1 -0
- package/lib/commonjs/runtime/FlowSurfaceFade.js +53 -0
- package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +96 -0
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +91 -0
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -0
- package/lib/commonjs/runtime/clientConditions.js +50 -0
- package/lib/commonjs/runtime/clientConditions.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +63 -0
- package/lib/commonjs/runtime/flowEngine.js.map +1 -0
- package/lib/commonjs/runtime/flowSessionViewState.js +48 -0
- package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -0
- package/lib/commonjs/runtime/useFlowSessionState.js +25 -0
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -0
- package/lib/commonjs/runtime/userflowCore.js +13 -0
- package/lib/commonjs/runtime/userflowCore.js.map +1 -0
- package/lib/commonjs/screenTracker.js +87 -0
- package/lib/commonjs/screenTracker.js.map +1 -0
- package/lib/commonjs/surfaces/CloseButton.js +52 -0
- package/lib/commonjs/surfaces/CloseButton.js.map +1 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js +90 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -0
- package/lib/commonjs/surfaces/ModalSurface.js +170 -0
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -0
- package/lib/commonjs/surfaces/ProgressBar.js +116 -0
- package/lib/commonjs/surfaces/ProgressBar.js.map +1 -0
- package/lib/commonjs/surfaces/TooltipSurface.js +638 -0
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -0
- package/lib/commonjs/surfaces/absoluteFill.js +29 -0
- package/lib/commonjs/surfaces/absoluteFill.js.map +1 -0
- package/lib/commonjs/surfaces/assets/png.d.js +2 -0
- package/lib/commonjs/surfaces/assets/png.d.js.map +1 -0
- package/lib/commonjs/surfaces/assets/userflow-logomark.png +0 -0
- package/lib/commonjs/surfaces/parseBackdropOpacity.js +20 -0
- package/lib/commonjs/surfaces/parseBackdropOpacity.js.map +1 -0
- package/lib/commonjs/surfaces/progress.js +35 -0
- package/lib/commonjs/surfaces/progress.js.map +1 -0
- package/lib/commonjs/surfaces/resolveCloseButtonColor.js +24 -0
- package/lib/commonjs/surfaces/resolveCloseButtonColor.js.map +1 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js +67 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -0
- package/lib/commonjs/surfaces/resolveTooltipLayout.js +64 -0
- package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -0
- package/lib/commonjs/surfaces/safeArea.js +46 -0
- package/lib/commonjs/surfaces/safeArea.js.map +1 -0
- package/lib/commonjs/surfaces/themeChrome.js +90 -0
- package/lib/commonjs/surfaces/themeChrome.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +108 -0
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +103 -0
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/TooltipNotch.js +64 -0
- package/lib/commonjs/surfaces/tooltip/TooltipNotch.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +102 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +100 -0
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/parseBackdropPadding.js +15 -0
- package/lib/commonjs/surfaces/tooltip/parseBackdropPadding.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/rect.js +51 -0
- package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -0
- package/lib/commonjs/useUserflowScreen.js +24 -0
- package/lib/commonjs/useUserflowScreen.js.map +1 -0
- package/lib/commonjs/version.js +9 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/anchors/AnchorRegistry.js +67 -0
- package/lib/module/anchors/AnchorRegistry.js.map +1 -0
- package/lib/module/anchors/AutoAnchorRegistry.js +309 -0
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -0
- package/lib/module/anchors/ScrollContainerRegistry.js +86 -0
- package/lib/module/anchors/ScrollContainerRegistry.js.map +1 -0
- package/lib/module/anchors/anchorChangeTicker.js +79 -0
- package/lib/module/anchors/anchorChangeTicker.js.map +1 -0
- package/lib/module/anchors/animationFrame.js +83 -0
- package/lib/module/anchors/animationFrame.js.map +1 -0
- package/lib/module/anchors/autoAnchor.js +248 -0
- package/lib/module/anchors/autoAnchor.js.map +1 -0
- package/lib/module/anchors/elementConditionEvaluator.js +79 -0
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -0
- package/lib/module/anchors/fiber/FiberScanRoot.js +84 -0
- package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -0
- package/lib/module/anchors/fiber/fiberInternals.js +164 -0
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +210 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -0
- package/lib/module/anchors/fiber/findScrollAncestors.js +172 -0
- package/lib/module/anchors/fiber/findScrollAncestors.js.map +1 -0
- package/lib/module/anchors/fiber/measureHostFiber.js +70 -0
- package/lib/module/anchors/fiber/measureHostFiber.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +159 -0
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -0
- package/lib/module/anchors/hintsCodec.js +111 -0
- package/lib/module/anchors/hintsCodec.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +105 -0
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -0
- package/lib/module/anchors/resolveManualAnchorId.js +13 -0
- package/lib/module/anchors/resolveManualAnchorId.js.map +1 -0
- package/lib/module/anchors/scrollAnchorIntoView.js +222 -0
- package/lib/module/anchors/scrollAnchorIntoView.js.map +1 -0
- package/lib/module/anchors/scrollConfig.js +40 -0
- package/lib/module/anchors/scrollConfig.js.map +1 -0
- package/lib/module/anchors/targetPressMonitor.js +105 -0
- package/lib/module/anchors/targetPressMonitor.js.map +1 -0
- package/lib/module/anchors/useUserflowAnchor.js +87 -0
- package/lib/module/anchors/useUserflowAnchor.js.map +1 -0
- package/lib/module/anchors/useUserflowScrollContainer.js +71 -0
- package/lib/module/anchors/useUserflowScrollContainer.js.map +1 -0
- package/lib/module/anonymousId.js +36 -0
- package/lib/module/anonymousId.js.map +1 -0
- package/lib/module/content/RichContentRenderer.js +670 -0
- package/lib/module/content/RichContentRenderer.js.map +1 -0
- package/lib/module/content/StepButton.js +52 -0
- package/lib/module/content/StepButton.js.map +1 -0
- package/lib/module/content/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -0
- package/lib/module/content/deserialize.js +116 -0
- package/lib/module/content/deserialize.js.map +1 -0
- package/lib/module/content/imageLayout.js +20 -0
- package/lib/module/content/imageLayout.js.map +1 -0
- package/lib/module/content/migrateFlowBlocks.js +35 -0
- package/lib/module/content/migrateFlowBlocks.js.map +1 -0
- package/lib/module/content/openSafeUrl.js +32 -0
- package/lib/module/content/openSafeUrl.js.map +1 -0
- package/lib/module/content/resolveStepButtonChrome.js +90 -0
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -0
- package/lib/module/content/themeColor.js +99 -0
- package/lib/module/content/themeColor.js.map +1 -0
- package/lib/module/content/types.js +2 -0
- package/lib/module/content/types.js.map +1 -0
- package/lib/module/deepLinking.js +152 -0
- package/lib/module/deepLinking.js.map +1 -0
- package/lib/module/expo-router/UserflowExpoRouterScreenTracker.js +10 -0
- package/lib/module/expo-router/UserflowExpoRouterScreenTracker.js.map +1 -0
- package/lib/module/expo-router/getExpoRouterScreenTracker.js +39 -0
- package/lib/module/expo-router/getExpoRouterScreenTracker.js.map +1 -0
- package/lib/module/expo-router/index.js +5 -0
- package/lib/module/expo-router/index.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +42 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -0
- package/lib/module/index.js +259 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/lifecycle.js +195 -0
- package/lib/module/lifecycle.js.map +1 -0
- package/lib/module/navigation/WithUserflowReactNavigation.js +65 -0
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -0
- package/lib/module/navigation/chainCallbacks.js +12 -0
- package/lib/module/navigation/chainCallbacks.js.map +1 -0
- package/lib/module/navigation/getActiveRouteName.js +14 -0
- package/lib/module/navigation/getActiveRouteName.js.map +1 -0
- package/lib/module/navigation/index.js +5 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/openFlowNavigateUrl.js +100 -0
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -0
- package/lib/module/network.js +85 -0
- package/lib/module/network.js.map +1 -0
- package/lib/module/pairing/PairingController.js +286 -0
- package/lib/module/pairing/PairingController.js.map +1 -0
- package/lib/module/pairing/PreviewModeBanner.js +113 -0
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -0
- package/lib/module/pairing/deepLink.js +134 -0
- package/lib/module/pairing/deepLink.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +101 -0
- package/lib/module/pairing/diagnostics.js.map +1 -0
- package/lib/module/pairing/index.js +7 -0
- package/lib/module/pairing/index.js.map +1 -0
- package/lib/module/pairing/pairingRuntime.js +77 -0
- package/lib/module/pairing/pairingRuntime.js.map +1 -0
- package/lib/module/pairing/tokenStorage.js +65 -0
- package/lib/module/pairing/tokenStorage.js.map +1 -0
- package/lib/module/pairing/usePairingState.js +35 -0
- package/lib/module/pairing/usePairingState.js.map +1 -0
- package/lib/module/runtime/FlowRenderer.js +52 -0
- package/lib/module/runtime/FlowRenderer.js.map +1 -0
- package/lib/module/runtime/FlowSurfaceFade.js +48 -0
- package/lib/module/runtime/FlowSurfaceFade.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +91 -0
- package/lib/module/runtime/TargetPressBridge.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +85 -0
- package/lib/module/runtime/UserflowProvider.js.map +1 -0
- package/lib/module/runtime/clientConditions.js +43 -0
- package/lib/module/runtime/clientConditions.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +54 -0
- package/lib/module/runtime/flowEngine.js.map +1 -0
- package/lib/module/runtime/flowSessionViewState.js +42 -0
- package/lib/module/runtime/flowSessionViewState.js.map +1 -0
- package/lib/module/runtime/useFlowSessionState.js +21 -0
- package/lib/module/runtime/useFlowSessionState.js.map +1 -0
- package/lib/module/runtime/userflowCore.js +10 -0
- package/lib/module/runtime/userflowCore.js.map +1 -0
- package/lib/module/screenTracker.js +79 -0
- package/lib/module/screenTracker.js.map +1 -0
- package/lib/module/surfaces/CloseButton.js +47 -0
- package/lib/module/surfaces/CloseButton.js.map +1 -0
- package/lib/module/surfaces/MadeWithUserflow.js +83 -0
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -0
- package/lib/module/surfaces/ModalSurface.js +165 -0
- package/lib/module/surfaces/ModalSurface.js.map +1 -0
- package/lib/module/surfaces/ProgressBar.js +111 -0
- package/lib/module/surfaces/ProgressBar.js.map +1 -0
- package/lib/module/surfaces/TooltipSurface.js +633 -0
- package/lib/module/surfaces/TooltipSurface.js.map +1 -0
- package/lib/module/surfaces/absoluteFill.js +25 -0
- package/lib/module/surfaces/absoluteFill.js.map +1 -0
- package/lib/module/surfaces/assets/png.d.js +2 -0
- package/lib/module/surfaces/assets/png.d.js.map +1 -0
- package/lib/module/surfaces/assets/userflow-logomark.png +0 -0
- package/lib/module/surfaces/parseBackdropOpacity.js +16 -0
- package/lib/module/surfaces/parseBackdropOpacity.js.map +1 -0
- package/lib/module/surfaces/progress.js +31 -0
- package/lib/module/surfaces/progress.js.map +1 -0
- package/lib/module/surfaces/resolveCloseButtonColor.js +20 -0
- package/lib/module/surfaces/resolveCloseButtonColor.js.map +1 -0
- package/lib/module/surfaces/resolveModalLayout.js +59 -0
- package/lib/module/surfaces/resolveModalLayout.js.map +1 -0
- package/lib/module/surfaces/resolveTooltipLayout.js +57 -0
- package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -0
- package/lib/module/surfaces/safeArea.js +41 -0
- package/lib/module/surfaces/safeArea.js.map +1 -0
- package/lib/module/surfaces/themeChrome.js +86 -0
- package/lib/module/surfaces/themeChrome.js.map +1 -0
- package/lib/module/surfaces/tooltip/TooltipBubble.js +103 -0
- package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -0
- package/lib/module/surfaces/tooltip/TooltipCutout.js +98 -0
- package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -0
- package/lib/module/surfaces/tooltip/TooltipNotch.js +55 -0
- package/lib/module/surfaces/tooltip/TooltipNotch.js.map +1 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js +97 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -0
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +95 -0
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -0
- package/lib/module/surfaces/tooltip/parseBackdropPadding.js +11 -0
- package/lib/module/surfaces/tooltip/parseBackdropPadding.js.map +1 -0
- package/lib/module/surfaces/tooltip/rect.js +44 -0
- package/lib/module/surfaces/tooltip/rect.js.map +1 -0
- package/lib/module/useUserflowScreen.js +21 -0
- package/lib/module/useUserflowScreen.js.map +1 -0
- package/lib/module/version.js +5 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +113 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts +46 -0
- package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts +31 -0
- package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +41 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +48 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +33 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findScrollAncestors.d.ts +47 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findScrollAncestors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/measureHostFiber.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/measureHostFiber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +42 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts +40 -0
- package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveManualAnchorId.d.ts +6 -0
- package/lib/typescript/commonjs/src/anchors/resolveManualAnchorId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/scrollAnchorIntoView.d.ts +59 -0
- package/lib/typescript/commonjs/src/anchors/scrollAnchorIntoView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/scrollConfig.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/scrollConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +64 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts +34 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts +5 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +21 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/StepButton.d.ts +13 -0
- package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/deserialize.d.ts +27 -0
- package/lib/typescript/commonjs/src/content/deserialize.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/imageLayout.d.ts +13 -0
- package/lib/typescript/commonjs/src/content/imageLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/migrateFlowBlocks.d.ts +12 -0
- package/lib/typescript/commonjs/src/content/migrateFlowBlocks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts +12 -0
- package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts +24 -0
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +43 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts +144 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/deepLinking.d.ts +54 -0
- package/lib/typescript/commonjs/src/deepLinking.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/UserflowExpoRouterScreenTracker.d.ts +3 -0
- package/lib/typescript/commonjs/src/expo-router/UserflowExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/getExpoRouterScreenTracker.d.ts +13 -0
- package/lib/typescript/commonjs/src/expo-router/getExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +17 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +112 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts +96 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts +21 -0
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/chainCallbacks.d.ts +3 -0
- package/lib/typescript/commonjs/src/navigation/chainCallbacks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/getActiveRouteName.d.ts +6 -0
- package/lib/typescript/commonjs/src/navigation/getActiveRouteName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/navigation/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts +33 -0
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/network.d.ts +42 -0
- package/lib/typescript/commonjs/src/network.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +104 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +11 -0
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +53 -0
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +52 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/pairing/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/pairingRuntime.d.ts +24 -0
- package/lib/typescript/commonjs/src/pairing/pairingRuntime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +16 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts +4 -0
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +13 -0
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +13 -0
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +32 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/clientConditions.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/clientConditions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +17 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/userflowCore.d.ts +3 -0
- package/lib/typescript/commonjs/src/runtime/userflowCore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts +28 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +28 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/ProgressBar.d.ts +19 -0
- package/lib/typescript/commonjs/src/surfaces/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +17 -0
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/absoluteFill.d.ts +18 -0
- package/lib/typescript/commonjs/src/surfaces/absoluteFill.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/parseBackdropOpacity.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/parseBackdropOpacity.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/progress.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/progress.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveCloseButtonColor.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/resolveCloseButtonColor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +36 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +24 -0
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +11 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +36 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +31 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipNotch.d.ts +29 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipNotch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +43 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +34 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/parseBackdropPadding.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/parseBackdropPadding.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +29 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useUserflowScreen.d.ts +10 -0
- package/lib/typescript/commonjs/src/useUserflowScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +3 -0
- package/lib/typescript/commonjs/src/version.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +32 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +113 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts +46 -0
- package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +30 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/animationFrame.d.ts +21 -0
- package/lib/typescript/module/src/anchors/animationFrame.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/autoAnchor.d.ts +31 -0
- package/lib/typescript/module/src/anchors/autoAnchor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +21 -0
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +41 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +48 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +33 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findScrollAncestors.d.ts +47 -0
- package/lib/typescript/module/src/anchors/fiber/findScrollAncestors.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/measureHostFiber.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/measureHostFiber.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +42 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/hintsCodec.d.ts +40 -0
- package/lib/typescript/module/src/anchors/hintsCodec.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +32 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveManualAnchorId.d.ts +6 -0
- package/lib/typescript/module/src/anchors/resolveManualAnchorId.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/scrollAnchorIntoView.d.ts +59 -0
- package/lib/typescript/module/src/anchors/scrollAnchorIntoView.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/scrollConfig.d.ts +30 -0
- package/lib/typescript/module/src/anchors/scrollConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +64 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts +30 -0
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts +34 -0
- package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts.map +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts +5 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts +21 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -0
- package/lib/typescript/module/src/content/StepButton.d.ts +13 -0
- package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts +8 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -0
- package/lib/typescript/module/src/content/deserialize.d.ts +27 -0
- package/lib/typescript/module/src/content/deserialize.d.ts.map +1 -0
- package/lib/typescript/module/src/content/imageLayout.d.ts +13 -0
- package/lib/typescript/module/src/content/imageLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/content/migrateFlowBlocks.d.ts +12 -0
- package/lib/typescript/module/src/content/migrateFlowBlocks.d.ts.map +1 -0
- package/lib/typescript/module/src/content/openSafeUrl.d.ts +12 -0
- package/lib/typescript/module/src/content/openSafeUrl.d.ts.map +1 -0
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts +24 -0
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/themeColor.d.ts +43 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -0
- package/lib/typescript/module/src/content/types.d.ts +144 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -0
- package/lib/typescript/module/src/deepLinking.d.ts +54 -0
- package/lib/typescript/module/src/deepLinking.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/UserflowExpoRouterScreenTracker.d.ts +3 -0
- package/lib/typescript/module/src/expo-router/UserflowExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/getExpoRouterScreenTracker.d.ts +13 -0
- package/lib/typescript/module/src/expo-router/getExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +3 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +17 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +112 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/lifecycle.d.ts +96 -0
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts +21 -0
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/chainCallbacks.d.ts +3 -0
- package/lib/typescript/module/src/navigation/chainCallbacks.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/getActiveRouteName.d.ts +6 -0
- package/lib/typescript/module/src/navigation/getActiveRouteName.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/index.d.ts +5 -0
- package/lib/typescript/module/src/navigation/index.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts +33 -0
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -0
- package/lib/typescript/module/src/network.d.ts +42 -0
- package/lib/typescript/module/src/network.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts +104 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +11 -0
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/deepLink.d.ts +53 -0
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +52 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/index.d.ts +10 -0
- package/lib/typescript/module/src/pairing/index.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/pairingRuntime.d.ts +24 -0
- package/lib/typescript/module/src/pairing/pairingRuntime.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +16 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/usePairingState.d.ts +4 -0
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +13 -0
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +13 -0
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +16 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +32 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/clientConditions.d.ts +10 -0
- package/lib/typescript/module/src/runtime/clientConditions.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +17 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +18 -0
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +10 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/userflowCore.d.ts +3 -0
- package/lib/typescript/module/src/runtime/userflowCore.d.ts.map +1 -0
- package/lib/typescript/module/src/screenTracker.d.ts +28 -0
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +28 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/ProgressBar.d.ts +19 -0
- package/lib/typescript/module/src/surfaces/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +17 -0
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/absoluteFill.d.ts +18 -0
- package/lib/typescript/module/src/surfaces/absoluteFill.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/parseBackdropOpacity.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/parseBackdropOpacity.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/progress.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/progress.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveCloseButtonColor.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/resolveCloseButtonColor.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +36 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +24 -0
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +11 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts +36 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +31 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipNotch.d.ts +29 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipNotch.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +43 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +34 -0
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/parseBackdropPadding.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/tooltip/parseBackdropPadding.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +29 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -0
- package/lib/typescript/module/src/useUserflowScreen.d.ts +10 -0
- package/lib/typescript/module/src/useUserflowScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +3 -0
- package/lib/typescript/module/src/version.d.ts.map +1 -0
- package/package.json +144 -0
- package/src/anchors/AnchorRegistry.ts +81 -0
- package/src/anchors/AutoAnchorRegistry.ts +439 -0
- package/src/anchors/ScrollContainerRegistry.ts +108 -0
- package/src/anchors/anchorChangeTicker.ts +84 -0
- package/src/anchors/animationFrame.ts +88 -0
- package/src/anchors/autoAnchor.ts +310 -0
- package/src/anchors/elementConditionEvaluator.ts +108 -0
- package/src/anchors/fiber/FiberScanRoot.tsx +98 -0
- package/src/anchors/fiber/fiberInternals.ts +181 -0
- package/src/anchors/fiber/findAnchorFiber.ts +225 -0
- package/src/anchors/fiber/findScrollAncestors.ts +229 -0
- package/src/anchors/fiber/measureHostFiber.ts +85 -0
- package/src/anchors/fiber/visibleScreens.ts +173 -0
- package/src/anchors/hintsCodec.ts +125 -0
- package/src/anchors/resolveAnchorHost.ts +102 -0
- package/src/anchors/resolveManualAnchorId.ts +10 -0
- package/src/anchors/scrollAnchorIntoView.ts +251 -0
- package/src/anchors/scrollConfig.ts +61 -0
- package/src/anchors/targetPressMonitor.ts +127 -0
- package/src/anchors/useUserflowAnchor.ts +88 -0
- package/src/anchors/useUserflowScrollContainer.ts +86 -0
- package/src/anonymousId.ts +38 -0
- package/src/content/RichContentRenderer.tsx +721 -0
- package/src/content/StepButton.tsx +70 -0
- package/src/content/buttonAppearance.ts +11 -0
- package/src/content/deserialize.ts +147 -0
- package/src/content/imageLayout.ts +29 -0
- package/src/content/migrateFlowBlocks.ts +39 -0
- package/src/content/openSafeUrl.ts +30 -0
- package/src/content/resolveStepButtonChrome.ts +122 -0
- package/src/content/themeColor.ts +98 -0
- package/src/content/types.ts +189 -0
- package/src/deepLinking.ts +182 -0
- package/src/expo-router/UserflowExpoRouterScreenTracker.tsx +7 -0
- package/src/expo-router/getExpoRouterScreenTracker.ts +49 -0
- package/src/expo-router/index.ts +2 -0
- package/src/expo-router/useUserflowExpoRouter.ts +40 -0
- package/src/index.ts +362 -0
- package/src/lifecycle.ts +253 -0
- package/src/navigation/WithUserflowReactNavigation.tsx +87 -0
- package/src/navigation/chainCallbacks.ts +12 -0
- package/src/navigation/getActiveRouteName.ts +18 -0
- package/src/navigation/index.ts +11 -0
- package/src/navigation/openFlowNavigateUrl.ts +113 -0
- package/src/network.ts +113 -0
- package/src/pairing/PairingController.ts +356 -0
- package/src/pairing/PreviewModeBanner.tsx +130 -0
- package/src/pairing/deepLink.ts +128 -0
- package/src/pairing/diagnostics.ts +135 -0
- package/src/pairing/index.ts +19 -0
- package/src/pairing/pairingRuntime.ts +76 -0
- package/src/pairing/tokenStorage.ts +76 -0
- package/src/pairing/usePairingState.ts +43 -0
- package/src/runtime/FlowRenderer.tsx +60 -0
- package/src/runtime/FlowSurfaceFade.tsx +55 -0
- package/src/runtime/TargetPressBridge.tsx +86 -0
- package/src/runtime/UserflowProvider.tsx +89 -0
- package/src/runtime/clientConditions.ts +42 -0
- package/src/runtime/flowEngine.ts +53 -0
- package/src/runtime/flowSessionViewState.ts +55 -0
- package/src/runtime/useFlowSessionState.ts +36 -0
- package/src/runtime/userflowCore.ts +8 -0
- package/src/screenTracker.ts +83 -0
- package/src/surfaces/CloseButton.tsx +41 -0
- package/src/surfaces/MadeWithUserflow.tsx +103 -0
- package/src/surfaces/ModalSurface.tsx +215 -0
- package/src/surfaces/ProgressBar.tsx +142 -0
- package/src/surfaces/TooltipSurface.tsx +743 -0
- package/src/surfaces/absoluteFill.ts +24 -0
- package/src/surfaces/assets/png.d.ts +4 -0
- package/src/surfaces/assets/userflow-logomark.png +0 -0
- package/src/surfaces/parseBackdropOpacity.ts +13 -0
- package/src/surfaces/progress.ts +37 -0
- package/src/surfaces/resolveCloseButtonColor.ts +23 -0
- package/src/surfaces/resolveModalLayout.ts +85 -0
- package/src/surfaces/resolveTooltipLayout.ts +73 -0
- package/src/surfaces/safeArea.ts +48 -0
- package/src/surfaces/themeChrome.ts +126 -0
- package/src/surfaces/tooltip/TooltipBubble.tsx +123 -0
- package/src/surfaces/tooltip/TooltipCutout.tsx +110 -0
- package/src/surfaces/tooltip/TooltipNotch.tsx +67 -0
- package/src/surfaces/tooltip/computeTooltipPosition.ts +125 -0
- package/src/surfaces/tooltip/inferTooltipPlacement.ts +109 -0
- package/src/surfaces/tooltip/parseBackdropPadding.ts +8 -0
- package/src/surfaces/tooltip/rect.ts +62 -0
- package/src/useUserflowScreen.ts +17 -0
- package/src/version.ts +2 -0
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TooltipSurface = TooltipSurface;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _AnchorRegistry = require("../anchors/AnchorRegistry.js");
|
|
10
|
+
var _animationFrame = require("../anchors/animationFrame.js");
|
|
11
|
+
var _FiberScanRoot = require("../anchors/fiber/FiberScanRoot.js");
|
|
12
|
+
var _resolveAnchorHost = require("../anchors/resolveAnchorHost.js");
|
|
13
|
+
var _resolveManualAnchorId = require("../anchors/resolveManualAnchorId.js");
|
|
14
|
+
var _scrollAnchorIntoView = require("../anchors/scrollAnchorIntoView.js");
|
|
15
|
+
var _scrollConfig = require("../anchors/scrollConfig.js");
|
|
16
|
+
var _targetPressMonitor = require("../anchors/targetPressMonitor.js");
|
|
17
|
+
var _RichContentRenderer = require("../content/RichContentRenderer.js");
|
|
18
|
+
var _CloseButton = require("./CloseButton.js");
|
|
19
|
+
var _resolveCloseButtonColor = require("./resolveCloseButtonColor.js");
|
|
20
|
+
var _MadeWithUserflow = require("./MadeWithUserflow.js");
|
|
21
|
+
var _ProgressBar = require("./ProgressBar.js");
|
|
22
|
+
var _absoluteFill = require("./absoluteFill.js");
|
|
23
|
+
var _parseBackdropOpacity = require("./parseBackdropOpacity.js");
|
|
24
|
+
var _progress = require("./progress.js");
|
|
25
|
+
var _safeArea = require("./safeArea.js");
|
|
26
|
+
var _themeChrome = require("./themeChrome.js");
|
|
27
|
+
var _TooltipBubble = require("./tooltip/TooltipBubble.js");
|
|
28
|
+
var _TooltipCutout = require("./tooltip/TooltipCutout.js");
|
|
29
|
+
var _computeTooltipPosition = require("./tooltip/computeTooltipPosition.js");
|
|
30
|
+
var _inferTooltipPlacement = require("./tooltip/inferTooltipPlacement.js");
|
|
31
|
+
var _parseBackdropPadding = require("./tooltip/parseBackdropPadding.js");
|
|
32
|
+
var _rect = require("./tooltip/rect.js");
|
|
33
|
+
var _resolveTooltipLayout = require("./resolveTooltipLayout.js");
|
|
34
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
35
|
+
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); }
|
|
36
|
+
/** Interval for re-resolving a missing / remounted anchor (not for live measure). */
|
|
37
|
+
const RESOLVE_MS = 250;
|
|
38
|
+
/** Slower resolve poll after FLAG/ERROR report so a late-mounting target can recover. */
|
|
39
|
+
const RESOLVE_SLOW_MS = 1000;
|
|
40
|
+
/**
|
|
41
|
+
* Max scroll-into-view attempts per step while the target stays partially
|
|
42
|
+
* clipped. Only a safety net for targets that can never become fully visible —
|
|
43
|
+
* the usual stop condition is the target coming into view.
|
|
44
|
+
*/
|
|
45
|
+
const MAX_SCROLL_ATTEMPTS = 8;
|
|
46
|
+
function normalizePlacement(value) {
|
|
47
|
+
if (value == null) return null;
|
|
48
|
+
const upper = String(value).toUpperCase();
|
|
49
|
+
if (upper === 'ABOVE' || upper === 'BELOW' || upper === 'LEFT' || upper === 'RIGHT') {
|
|
50
|
+
return upper;
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
function parseToleranceMs(raw) {
|
|
55
|
+
const seconds = typeof raw === 'number' ? raw : parseFloat(String(raw));
|
|
56
|
+
if (!Number.isFinite(seconds) || seconds < 0) return 5000;
|
|
57
|
+
return Math.max(0, seconds * 1000);
|
|
58
|
+
}
|
|
59
|
+
function missingBehavior(theme) {
|
|
60
|
+
return String(theme.tooltipMissingBehavior ?? 'FLAG').toUpperCase();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Anchored tooltip chrome: measure manual / fiber anchor, place with web flip/shift,
|
|
65
|
+
* optional cutout backdrop, missing-target report + theme fallbacks.
|
|
66
|
+
*/
|
|
67
|
+
function TooltipSurface({
|
|
68
|
+
engine,
|
|
69
|
+
session,
|
|
70
|
+
currentStep,
|
|
71
|
+
theme,
|
|
72
|
+
lookupAttribute
|
|
73
|
+
}) {
|
|
74
|
+
const version = session.version;
|
|
75
|
+
const chrome = (0, _themeChrome.resolveBubbleChrome)(theme, 'tooltip');
|
|
76
|
+
const progress = (0, _progress.resolveStepProgress)(version, currentStep.id);
|
|
77
|
+
const showClose = !version.closeDisabled;
|
|
78
|
+
const backdropOpacity = (0, _parseBackdropOpacity.parseBackdropOpacity)(theme.backdropOpacity);
|
|
79
|
+
const backdropPadding = (0, _parseBackdropPadding.parseBackdropPadding)(currentStep.backdropPadding);
|
|
80
|
+
const anchorId = (0, _resolveManualAnchorId.resolveManualAnchorId)(currentStep.selector?.css);
|
|
81
|
+
const desiredPlacement = normalizePlacement(currentStep.tooltipPlacement);
|
|
82
|
+
const behavior = missingBehavior(theme);
|
|
83
|
+
const insets = (0, _safeArea.useUserflowSafeAreaInsets)();
|
|
84
|
+
const centerPaddingStyle = (0, _resolveTooltipLayout.resolveTooltipCenterPadding)(insets);
|
|
85
|
+
const [keyboardBottomInset, setKeyboardBottomInset] = React.useState(0);
|
|
86
|
+
const [target, setTarget] = React.useState(null);
|
|
87
|
+
const [bubbleSize, setBubbleSize] = React.useState({
|
|
88
|
+
width: 280,
|
|
89
|
+
height: 160
|
|
90
|
+
});
|
|
91
|
+
const [placement, setPlacement] = React.useState(desiredPlacement ?? 'BELOW');
|
|
92
|
+
const [missingMode, setMissingMode] = React.useState('waiting');
|
|
93
|
+
const [registryTick, setRegistryTick] = React.useState(0);
|
|
94
|
+
/** True after at least one *failed* measure for the current step/anchor. */
|
|
95
|
+
const [measureAttempted, setMeasureAttempted] = React.useState(false);
|
|
96
|
+
const reportedRef = React.useRef(false);
|
|
97
|
+
const placementRef = React.useRef(placement);
|
|
98
|
+
placementRef.current = placement;
|
|
99
|
+
const mountedRef = React.useRef(true);
|
|
100
|
+
const targetRef = React.useRef(null);
|
|
101
|
+
/** Bounded scroll-into-view attempts for the current step. */
|
|
102
|
+
const scrollAttemptsRef = React.useRef(0);
|
|
103
|
+
/**
|
|
104
|
+
* True once the target has been seen fully visible for this step. From then
|
|
105
|
+
* on the user owns the scroll position — rAF keeps tracking the target, but
|
|
106
|
+
* scrolling it back would fight a deliberate scroll away from it.
|
|
107
|
+
*/
|
|
108
|
+
const scrollSettledRef = React.useRef(false);
|
|
109
|
+
/** In-flight measureInWindow guard for the rAF loop. */
|
|
110
|
+
const measureInFlightRef = React.useRef(false);
|
|
111
|
+
/** Latest resolved host fiber (for scroll-ancestor walk + rAF remeasure). */
|
|
112
|
+
const hostFiberRef = React.useRef(null);
|
|
113
|
+
const hostMeasureRef = React.useRef(null);
|
|
114
|
+
const hostScrollIntoViewRef = React.useRef(undefined);
|
|
115
|
+
const keyboardBottomInsetRef = React.useRef(keyboardBottomInset);
|
|
116
|
+
keyboardBottomInsetRef.current = keyboardBottomInset;
|
|
117
|
+
const insetsRef = React.useRef(insets);
|
|
118
|
+
insetsRef.current = insets;
|
|
119
|
+
const missingModeRef = React.useRef(missingMode);
|
|
120
|
+
missingModeRef.current = missingMode;
|
|
121
|
+
const behaviorRef = React.useRef(behavior);
|
|
122
|
+
behaviorRef.current = behavior;
|
|
123
|
+
const draftModeRef = React.useRef(session.draftMode);
|
|
124
|
+
draftModeRef.current = session.draftMode;
|
|
125
|
+
const endAsUserClosed = React.useCallback(() => {
|
|
126
|
+
void engine.endFlow('USER_CLOSED');
|
|
127
|
+
}, [engine]);
|
|
128
|
+
React.useEffect(() => {
|
|
129
|
+
mountedRef.current = true;
|
|
130
|
+
return () => {
|
|
131
|
+
mountedRef.current = false;
|
|
132
|
+
};
|
|
133
|
+
}, []);
|
|
134
|
+
React.useEffect(() => {
|
|
135
|
+
const bump = () => setRegistryTick(n => n + 1);
|
|
136
|
+
const unsubRegistry = _AnchorRegistry.anchorRegistry.subscribe(bump);
|
|
137
|
+
const unsubScan = _FiberScanRoot.fiberScanRoot.subscribe(bump);
|
|
138
|
+
return () => {
|
|
139
|
+
unsubRegistry();
|
|
140
|
+
unsubScan();
|
|
141
|
+
};
|
|
142
|
+
}, []);
|
|
143
|
+
React.useEffect(() => {
|
|
144
|
+
reportedRef.current = false;
|
|
145
|
+
scrollAttemptsRef.current = 0;
|
|
146
|
+
scrollSettledRef.current = false;
|
|
147
|
+
measureInFlightRef.current = false;
|
|
148
|
+
hostFiberRef.current = null;
|
|
149
|
+
hostMeasureRef.current = null;
|
|
150
|
+
hostScrollIntoViewRef.current = undefined;
|
|
151
|
+
targetRef.current = null;
|
|
152
|
+
setMissingMode('waiting');
|
|
153
|
+
setMeasureAttempted(false);
|
|
154
|
+
setTarget(null);
|
|
155
|
+
}, [currentStep.id, anchorId]);
|
|
156
|
+
const applyTarget = React.useCallback(next => {
|
|
157
|
+
if (!mountedRef.current) return;
|
|
158
|
+
if ((0, _rect.rectsEqual)(targetRef.current, next)) return;
|
|
159
|
+
if (next == null) {
|
|
160
|
+
// The anchor went away (unmount / navigation), so whatever scroll position
|
|
161
|
+
// the user had settled on no longer applies. Treat its next appearance as
|
|
162
|
+
// a fresh one and allow scrolling to it again.
|
|
163
|
+
scrollAttemptsRef.current = 0;
|
|
164
|
+
scrollSettledRef.current = false;
|
|
165
|
+
}
|
|
166
|
+
targetRef.current = next;
|
|
167
|
+
setTarget(next);
|
|
168
|
+
}, []);
|
|
169
|
+
const markMeasureAttempted = React.useCallback(() => {
|
|
170
|
+
if (!mountedRef.current) return;
|
|
171
|
+
setMeasureAttempted(prev => prev ? prev : true);
|
|
172
|
+
}, []);
|
|
173
|
+
const effectiveViewport = React.useCallback(() => {
|
|
174
|
+
const windowSize = _reactNative.Dimensions.get('window');
|
|
175
|
+
const scrollPadding = (0, _scrollConfig.getScrollPadding)();
|
|
176
|
+
return (0, _rect.buildEffectiveViewport)({
|
|
177
|
+
width: windowSize.width,
|
|
178
|
+
height: Math.max(0, windowSize.height - keyboardBottomInsetRef.current)
|
|
179
|
+
}, {
|
|
180
|
+
top: (insetsRef.current.top ?? 0) + (scrollPadding?.top ?? 0),
|
|
181
|
+
right: (insetsRef.current.right ?? 0) + (scrollPadding?.right ?? 0),
|
|
182
|
+
bottom: (insetsRef.current.bottom ?? 0) + (scrollPadding?.bottom ?? 0),
|
|
183
|
+
left: (insetsRef.current.left ?? 0) + (scrollPadding?.left ?? 0)
|
|
184
|
+
});
|
|
185
|
+
}, []);
|
|
186
|
+
const maybeScrollIntoView = React.useCallback(rect => {
|
|
187
|
+
if (scrollSettledRef.current) return;
|
|
188
|
+
if ((0, _rect.isRectFullyVisible)(rect, effectiveViewport())) {
|
|
189
|
+
scrollSettledRef.current = true;
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (scrollAttemptsRef.current >= MAX_SCROLL_ATTEMPTS) return;
|
|
193
|
+
scrollAttemptsRef.current += 1;
|
|
194
|
+
const measure = hostMeasureRef.current;
|
|
195
|
+
if (!measure) return;
|
|
196
|
+
try {
|
|
197
|
+
const host = {
|
|
198
|
+
measureInWindow: measure,
|
|
199
|
+
...(hostScrollIntoViewRef.current ? {
|
|
200
|
+
scrollIntoView: hostScrollIntoViewRef.current
|
|
201
|
+
} : {})
|
|
202
|
+
};
|
|
203
|
+
(0, _scrollAnchorIntoView.scrollAnchorIntoView)({
|
|
204
|
+
rect,
|
|
205
|
+
host,
|
|
206
|
+
fiber: hostFiberRef.current
|
|
207
|
+
});
|
|
208
|
+
} catch {
|
|
209
|
+
// Best-effort only — missing-target path still applies if never visible.
|
|
210
|
+
}
|
|
211
|
+
}, [effectiveViewport]);
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Resolve the anchor host (registry / fiber scan). Used by the interval and
|
|
215
|
+
* on registry ticks — intentionally NOT on every animation frame.
|
|
216
|
+
*/
|
|
217
|
+
const resolveTarget = React.useCallback(() => {
|
|
218
|
+
if (!mountedRef.current) return;
|
|
219
|
+
if (!anchorId) {
|
|
220
|
+
hostFiberRef.current = null;
|
|
221
|
+
hostMeasureRef.current = null;
|
|
222
|
+
hostScrollIntoViewRef.current = undefined;
|
|
223
|
+
markMeasureAttempted();
|
|
224
|
+
applyTarget(null);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
const resolution = (0, _resolveAnchorHost.resolveAnchorHost)(anchorId);
|
|
228
|
+
if (resolution.status !== 'found') {
|
|
229
|
+
hostFiberRef.current = null;
|
|
230
|
+
hostMeasureRef.current = null;
|
|
231
|
+
hostScrollIntoViewRef.current = undefined;
|
|
232
|
+
markMeasureAttempted();
|
|
233
|
+
applyTarget(null);
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
hostFiberRef.current = resolution.fiber ?? null;
|
|
237
|
+
hostMeasureRef.current = resolution.host.measureInWindow;
|
|
238
|
+
hostScrollIntoViewRef.current = resolution.host.scrollIntoView;
|
|
239
|
+
|
|
240
|
+
// Kick an immediate measure after resolve so the first paint isn't waiting
|
|
241
|
+
// on the next rAF (and so missing targets still mark attempted).
|
|
242
|
+
if (measureInFlightRef.current) return;
|
|
243
|
+
measureInFlightRef.current = true;
|
|
244
|
+
resolution.host.measureInWindow((x, y, width, height) => {
|
|
245
|
+
measureInFlightRef.current = false;
|
|
246
|
+
if (!mountedRef.current) return;
|
|
247
|
+
if (width <= 0 || height <= 0) {
|
|
248
|
+
(0, _resolveAnchorHost.invalidateFiberAnchor)(anchorId);
|
|
249
|
+
hostFiberRef.current = null;
|
|
250
|
+
hostMeasureRef.current = null;
|
|
251
|
+
markMeasureAttempted();
|
|
252
|
+
applyTarget(null);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const rect = {
|
|
256
|
+
x,
|
|
257
|
+
y,
|
|
258
|
+
width,
|
|
259
|
+
height
|
|
260
|
+
};
|
|
261
|
+
maybeScrollIntoView(rect);
|
|
262
|
+
applyTarget(rect);
|
|
263
|
+
});
|
|
264
|
+
}, [anchorId, applyTarget, markMeasureAttempted, maybeScrollIntoView]);
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Live re-measure of an already-resolved host. Driven by the shared rAF hub
|
|
268
|
+
* so the bubble / cutout track finger scrolls without a 250ms lag.
|
|
269
|
+
*/
|
|
270
|
+
const remeasureResolvedHost = React.useCallback(() => {
|
|
271
|
+
if (!mountedRef.current) return;
|
|
272
|
+
if (measureInFlightRef.current) return;
|
|
273
|
+
const measure = hostMeasureRef.current;
|
|
274
|
+
if (!measure) return;
|
|
275
|
+
measureInFlightRef.current = true;
|
|
276
|
+
measure((x, y, width, height) => {
|
|
277
|
+
measureInFlightRef.current = false;
|
|
278
|
+
if (!mountedRef.current) return;
|
|
279
|
+
if (width <= 0 || height <= 0) {
|
|
280
|
+
if (anchorId) (0, _resolveAnchorHost.invalidateFiberAnchor)(anchorId);
|
|
281
|
+
hostFiberRef.current = null;
|
|
282
|
+
hostMeasureRef.current = null;
|
|
283
|
+
markMeasureAttempted();
|
|
284
|
+
applyTarget(null);
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const rect = {
|
|
288
|
+
x,
|
|
289
|
+
y,
|
|
290
|
+
width,
|
|
291
|
+
height
|
|
292
|
+
};
|
|
293
|
+
maybeScrollIntoView(rect);
|
|
294
|
+
applyTarget(rect);
|
|
295
|
+
});
|
|
296
|
+
}, [anchorId, applyTarget, markMeasureAttempted, maybeScrollIntoView]);
|
|
297
|
+
React.useEffect(() => {
|
|
298
|
+
resolveTarget();
|
|
299
|
+
}, [resolveTarget, registryTick]);
|
|
300
|
+
|
|
301
|
+
// Resolve poll: recover missing / remounted anchors. Live measurement is on rAF.
|
|
302
|
+
React.useEffect(() => {
|
|
303
|
+
const allowsRecovery = behavior === 'FLAG' || behavior === 'ERROR' || behavior === 'END' && session.draftMode;
|
|
304
|
+
const pauseAfterReport = missingMode === 'reported' && !allowsRecovery;
|
|
305
|
+
if (pauseAfterReport) {
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
resolveTarget();
|
|
309
|
+
const intervalMs = missingMode === 'reported' ? RESOLVE_SLOW_MS : RESOLVE_MS;
|
|
310
|
+
const handle = setInterval(resolveTarget, intervalMs);
|
|
311
|
+
const dimSub = _reactNative.Dimensions.addEventListener('change', resolveTarget);
|
|
312
|
+
const onKeyboardShow = event => {
|
|
313
|
+
setKeyboardBottomInset(Math.max(0, event.endCoordinates?.height ?? 0));
|
|
314
|
+
resolveTarget();
|
|
315
|
+
};
|
|
316
|
+
const onKeyboardHide = () => {
|
|
317
|
+
setKeyboardBottomInset(0);
|
|
318
|
+
resolveTarget();
|
|
319
|
+
};
|
|
320
|
+
const kbShow = _reactNative.Keyboard.addListener('keyboardDidShow', onKeyboardShow);
|
|
321
|
+
const kbHide = _reactNative.Keyboard.addListener('keyboardDidHide', onKeyboardHide);
|
|
322
|
+
return () => {
|
|
323
|
+
clearInterval(handle);
|
|
324
|
+
dimSub.remove();
|
|
325
|
+
kbShow.remove();
|
|
326
|
+
kbHide.remove();
|
|
327
|
+
};
|
|
328
|
+
}, [resolveTarget, missingMode, behavior, session.draftMode]);
|
|
329
|
+
|
|
330
|
+
// rAF tracking while a host is resolved (and we are not paused after report).
|
|
331
|
+
React.useEffect(() => {
|
|
332
|
+
const allowsRecovery = behavior === 'FLAG' || behavior === 'ERROR' || behavior === 'END' && session.draftMode;
|
|
333
|
+
const pauseAfterReport = missingMode === 'reported' && !allowsRecovery;
|
|
334
|
+
if (pauseAfterReport || !target) {
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
(0, _animationFrame.addAnimationFrameCallback)(remeasureResolvedHost);
|
|
338
|
+
return () => {
|
|
339
|
+
(0, _animationFrame.removeAnimationFrameCallback)(remeasureResolvedHost);
|
|
340
|
+
};
|
|
341
|
+
}, [target, missingMode, behavior, session.draftMode, remeasureResolvedHost]);
|
|
342
|
+
|
|
343
|
+
// Missing-target tolerance → report once, then theme fallback.
|
|
344
|
+
// Only start after a failed measure so a slow measureInWindow cannot
|
|
345
|
+
// false-report while the target is still loading.
|
|
346
|
+
React.useEffect(() => {
|
|
347
|
+
if (target) {
|
|
348
|
+
// FLAG/ERROR (and draft END) may recover; BUBBLE/live END stay on their fallback.
|
|
349
|
+
const allowsRecovery = behaviorRef.current === 'FLAG' || behaviorRef.current === 'ERROR' || behaviorRef.current === 'END' && draftModeRef.current;
|
|
350
|
+
if (missingModeRef.current === 'reported' && !allowsRecovery) {
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
reportedRef.current = false;
|
|
354
|
+
setMissingMode('waiting');
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
if (!measureAttempted) {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
const ms = parseToleranceMs(theme.tooltipMissingToleranceSeconds);
|
|
361
|
+
const timer = setTimeout(() => {
|
|
362
|
+
if (!mountedRef.current || reportedRef.current) return;
|
|
363
|
+
reportedRef.current = true;
|
|
364
|
+
setMissingMode('reported');
|
|
365
|
+
void engine.reportTooltipTargetMissing(currentStep.id);
|
|
366
|
+
}, ms);
|
|
367
|
+
return () => clearTimeout(timer);
|
|
368
|
+
}, [target, measureAttempted, engine, currentStep.id, theme.tooltipMissingBehavior, theme.tooltipMissingToleranceSeconds]);
|
|
369
|
+
const onCardLayout = React.useCallback(event => {
|
|
370
|
+
const {
|
|
371
|
+
width,
|
|
372
|
+
height
|
|
373
|
+
} = event.nativeEvent.layout;
|
|
374
|
+
if (width > 0 && height > 0) {
|
|
375
|
+
setBubbleSize(prev => prev.width === width && prev.height === height ? prev : {
|
|
376
|
+
width,
|
|
377
|
+
height
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
}, []);
|
|
381
|
+
const windowDims = _reactNative.Dimensions.get('window');
|
|
382
|
+
const windowSize = React.useMemo(() => ({
|
|
383
|
+
width: windowDims.width,
|
|
384
|
+
// Treat the keyboard as covering the bottom of the window so placement /
|
|
385
|
+
// flip / clamp keep the card in the visible region above it.
|
|
386
|
+
height: Math.max(0, windowDims.height - keyboardBottomInset)
|
|
387
|
+
}), [windowDims.width, windowDims.height, keyboardBottomInset]);
|
|
388
|
+
const cardMaxWidth = (0, _resolveTooltipLayout.resolveTooltipCardMaxWidth)(theme, currentStep.width, windowSize.width);
|
|
389
|
+
const cardLayoutStyle = (0, _resolveTooltipLayout.resolveTooltipCardLayout)(cardMaxWidth, windowSize.width);
|
|
390
|
+
const buttonsAlign = (0, _resolveTooltipLayout.resolveTooltipButtonsAlign)(theme);
|
|
391
|
+
const progressBarProps = {
|
|
392
|
+
enabled: theme.progressBarEnabled,
|
|
393
|
+
fraction: progress.fraction,
|
|
394
|
+
theme,
|
|
395
|
+
totalSteps: progress.total,
|
|
396
|
+
contentPadding: chrome.contentPadding
|
|
397
|
+
};
|
|
398
|
+
const isMissing = target == null;
|
|
399
|
+
const showAsBubbleFallback = isMissing && missingMode === 'reported' && behavior === 'BUBBLE';
|
|
400
|
+
const showMissingUi = isMissing && missingMode === 'reported' && (behavior === 'FLAG' || behavior === 'ERROR' || behavior === 'END' && session.draftMode);
|
|
401
|
+
// END: engine ends the flow only when !draftMode — hide only then.
|
|
402
|
+
const hideAfterEnd = isMissing && missingMode === 'reported' && behavior === 'END' && !session.draftMode;
|
|
403
|
+
const showWaitingUi = isMissing && missingMode === 'waiting' && measureAttempted;
|
|
404
|
+
const layout = React.useMemo(() => {
|
|
405
|
+
if (!target) return null;
|
|
406
|
+
const nextPlacement = (0, _inferTooltipPlacement.inferTooltipPlacement)({
|
|
407
|
+
target,
|
|
408
|
+
bubbleSize,
|
|
409
|
+
notchSize: chrome.notchSize,
|
|
410
|
+
windowSize,
|
|
411
|
+
currentPlacement: placementRef.current,
|
|
412
|
+
desiredPlacement
|
|
413
|
+
});
|
|
414
|
+
return {
|
|
415
|
+
placement: nextPlacement,
|
|
416
|
+
...(0, _computeTooltipPosition.computeTooltipPosition)({
|
|
417
|
+
target,
|
|
418
|
+
bubbleSize,
|
|
419
|
+
placement: nextPlacement,
|
|
420
|
+
notchSize: chrome.notchSize,
|
|
421
|
+
backdropPadding,
|
|
422
|
+
windowSize,
|
|
423
|
+
bubbleBorderRadius: chrome.borderRadius,
|
|
424
|
+
bubbleBorderWidth: chrome.borderWidth
|
|
425
|
+
})
|
|
426
|
+
};
|
|
427
|
+
}, [target, bubbleSize, chrome.notchSize, chrome.borderRadius, chrome.borderWidth, windowSize, desiredPlacement, backdropPadding]);
|
|
428
|
+
React.useEffect(() => {
|
|
429
|
+
if (layout && layout.placement !== placement) {
|
|
430
|
+
setPlacement(layout.placement);
|
|
431
|
+
}
|
|
432
|
+
}, [layout, placement]);
|
|
433
|
+
|
|
434
|
+
// Web parity: "When target element is clicked" → step.actions.
|
|
435
|
+
// Observe taps via TargetPressBridge (pass-through); do not steal the press.
|
|
436
|
+
const hasTarget = target != null;
|
|
437
|
+
const targetActions = currentStep.actions;
|
|
438
|
+
React.useEffect(() => {
|
|
439
|
+
if (!hasTarget || currentStep.tooltipTargetBlocked || targetActions.length === 0) {
|
|
440
|
+
_targetPressMonitor.targetPressMonitor.clear();
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
_targetPressMonitor.targetPressMonitor.set({
|
|
444
|
+
getRect: () => targetRef.current,
|
|
445
|
+
onPress: () => {
|
|
446
|
+
void engine.handleActions(targetActions);
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
return () => {
|
|
450
|
+
_targetPressMonitor.targetPressMonitor.clear();
|
|
451
|
+
};
|
|
452
|
+
}, [hasTarget, currentStep.tooltipTargetBlocked, targetActions, engine]);
|
|
453
|
+
if (hideAfterEnd) {
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// Still pending the first measure attempt — stay invisible briefly.
|
|
458
|
+
if (isMissing && missingMode === 'waiting' && !measureAttempted) {
|
|
459
|
+
return null;
|
|
460
|
+
}
|
|
461
|
+
if (showWaitingUi) {
|
|
462
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
463
|
+
style: styles.root,
|
|
464
|
+
testID: "userflow-tooltip-surface",
|
|
465
|
+
pointerEvents: "box-none",
|
|
466
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
467
|
+
style: [styles.center, centerPaddingStyle],
|
|
468
|
+
pointerEvents: "box-none",
|
|
469
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
470
|
+
testID: "userflow-tooltip-waiting",
|
|
471
|
+
accessibilityViewIsModal: true,
|
|
472
|
+
pointerEvents: "auto",
|
|
473
|
+
style: [chrome.shadowStyle, styles.waitingCard, cardLayoutStyle, {
|
|
474
|
+
borderRadius: chrome.borderRadius,
|
|
475
|
+
backgroundColor: chrome.backgroundColor
|
|
476
|
+
}],
|
|
477
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
478
|
+
style: [chrome.fillStyle, {
|
|
479
|
+
padding: chrome.contentPadding,
|
|
480
|
+
alignItems: 'center'
|
|
481
|
+
}],
|
|
482
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
483
|
+
color: theme.fontColor
|
|
484
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
485
|
+
style: {
|
|
486
|
+
color: theme.fontColor,
|
|
487
|
+
fontSize: theme.fontSize,
|
|
488
|
+
marginTop: 12,
|
|
489
|
+
textAlign: 'center'
|
|
490
|
+
},
|
|
491
|
+
children: "Looking for target\u2026"
|
|
492
|
+
})]
|
|
493
|
+
})
|
|
494
|
+
})
|
|
495
|
+
})
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
const progressTop = theme.progressBarEnabled && theme.progressBarPosition === 'TOP';
|
|
499
|
+
const progressBottom = theme.progressBarEnabled && theme.progressBarPosition === 'BOTTOM';
|
|
500
|
+
const showBranding = session.flow.company.flowBranding;
|
|
501
|
+
const contentPadding = chrome.contentPadding;
|
|
502
|
+
const cardBody = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
503
|
+
children: [showClose ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CloseButton.CloseButton, {
|
|
504
|
+
onPress: endAsUserClosed,
|
|
505
|
+
color: (0, _resolveCloseButtonColor.resolveCloseButtonColor)(theme)
|
|
506
|
+
}) : null, progressTop ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressBar.ProgressBar, {
|
|
507
|
+
...progressBarProps,
|
|
508
|
+
position: "TOP"
|
|
509
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
510
|
+
testID: "userflow-flow-scroll",
|
|
511
|
+
style: styles.scroll,
|
|
512
|
+
contentContainerStyle: [styles.scrollContent, {
|
|
513
|
+
paddingHorizontal: contentPadding,
|
|
514
|
+
paddingTop: contentPadding,
|
|
515
|
+
paddingBottom: showBranding ? _MadeWithUserflow.MADE_WITH_USERFLOW_GAP : contentPadding
|
|
516
|
+
}],
|
|
517
|
+
keyboardShouldPersistTaps: "handled",
|
|
518
|
+
nestedScrollEnabled: true,
|
|
519
|
+
bounces: false,
|
|
520
|
+
children: showMissingUi ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
521
|
+
testID: "userflow-tooltip-missing",
|
|
522
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
523
|
+
style: [styles.missingTitle, {
|
|
524
|
+
color: theme.fontColor,
|
|
525
|
+
fontSize: theme.fontSize
|
|
526
|
+
}],
|
|
527
|
+
children: "Target not found"
|
|
528
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
529
|
+
style: {
|
|
530
|
+
color: theme.fontColor,
|
|
531
|
+
fontSize: theme.fontSize,
|
|
532
|
+
opacity: 0.8
|
|
533
|
+
},
|
|
534
|
+
children: "This step's anchor is missing. Close to continue, or wait if the screen is still loading."
|
|
535
|
+
})]
|
|
536
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_RichContentRenderer.RichContentRenderer, {
|
|
537
|
+
content: currentStep.content,
|
|
538
|
+
buttons: currentStep.buttons,
|
|
539
|
+
theme: theme,
|
|
540
|
+
sessionData: session.data,
|
|
541
|
+
lookupAttribute: lookupAttribute,
|
|
542
|
+
defaultButtonsAlign: buttonsAlign,
|
|
543
|
+
onActions: actions => {
|
|
544
|
+
void engine.handleActions(actions);
|
|
545
|
+
}
|
|
546
|
+
})
|
|
547
|
+
}), progressBottom ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressBar.ProgressBar, {
|
|
548
|
+
...progressBarProps,
|
|
549
|
+
position: "BOTTOM"
|
|
550
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_MadeWithUserflow.MadeWithUserflow, {
|
|
551
|
+
company: session.flow.company,
|
|
552
|
+
color: theme.fontColor,
|
|
553
|
+
contentPadding: contentPadding
|
|
554
|
+
})]
|
|
555
|
+
});
|
|
556
|
+
if (showAsBubbleFallback || showMissingUi) {
|
|
557
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
558
|
+
style: styles.root,
|
|
559
|
+
testID: "userflow-tooltip-surface",
|
|
560
|
+
pointerEvents: "box-none",
|
|
561
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
562
|
+
style: [styles.center, centerPaddingStyle],
|
|
563
|
+
pointerEvents: "box-none",
|
|
564
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
565
|
+
testID: "userflow-tooltip-card",
|
|
566
|
+
accessibilityViewIsModal: true,
|
|
567
|
+
pointerEvents: "auto",
|
|
568
|
+
onLayout: onCardLayout,
|
|
569
|
+
style: [chrome.shadowStyle, styles.fallbackCard, cardLayoutStyle, {
|
|
570
|
+
borderRadius: chrome.borderRadius,
|
|
571
|
+
backgroundColor: chrome.backgroundColor
|
|
572
|
+
}],
|
|
573
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
574
|
+
style: [chrome.fillStyle, styles.fallbackFill],
|
|
575
|
+
children: cardBody
|
|
576
|
+
})
|
|
577
|
+
})
|
|
578
|
+
})
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
if (!layout || !target) {
|
|
582
|
+
return null;
|
|
583
|
+
}
|
|
584
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
585
|
+
style: styles.root,
|
|
586
|
+
testID: "userflow-tooltip-surface",
|
|
587
|
+
pointerEvents: "box-none",
|
|
588
|
+
children: [currentStep.backdrop ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipCutout.TooltipCutout, {
|
|
589
|
+
targetRect: layout.targetHighlightRect,
|
|
590
|
+
backdropColor: theme.backdropColor,
|
|
591
|
+
backdropOpacity: backdropOpacity,
|
|
592
|
+
targetBlocked: currentStep.tooltipTargetBlocked
|
|
593
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_TooltipBubble.TooltipBubble, {
|
|
594
|
+
chrome: chrome,
|
|
595
|
+
notchPosition: layout.notchPosition,
|
|
596
|
+
onLayout: onCardLayout,
|
|
597
|
+
style: {
|
|
598
|
+
position: 'absolute',
|
|
599
|
+
left: layout.cardPosition.x,
|
|
600
|
+
top: layout.cardPosition.y,
|
|
601
|
+
...cardLayoutStyle
|
|
602
|
+
},
|
|
603
|
+
children: cardBody
|
|
604
|
+
})]
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
const styles = _reactNative.StyleSheet.create({
|
|
608
|
+
root: {
|
|
609
|
+
..._absoluteFill.ABSOLUTE_FILL
|
|
610
|
+
},
|
|
611
|
+
center: {
|
|
612
|
+
..._absoluteFill.ABSOLUTE_FILL,
|
|
613
|
+
justifyContent: 'center',
|
|
614
|
+
alignItems: 'center'
|
|
615
|
+
},
|
|
616
|
+
fallbackCard: {
|
|
617
|
+
maxHeight: '80%',
|
|
618
|
+
flexShrink: 1
|
|
619
|
+
},
|
|
620
|
+
fallbackFill: {
|
|
621
|
+
flexShrink: 1
|
|
622
|
+
},
|
|
623
|
+
waitingCard: {
|
|
624
|
+
width: '100%'
|
|
625
|
+
},
|
|
626
|
+
scroll: {
|
|
627
|
+
flexGrow: 0,
|
|
628
|
+
flexShrink: 1
|
|
629
|
+
},
|
|
630
|
+
scrollContent: {
|
|
631
|
+
flexGrow: 1
|
|
632
|
+
},
|
|
633
|
+
missingTitle: {
|
|
634
|
+
fontWeight: '700',
|
|
635
|
+
marginBottom: 8
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
//# sourceMappingURL=TooltipSurface.js.map
|