@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,24 @@
|
|
|
1
|
+
import type { ViewStyle } from 'react-native';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Local stand-in for `StyleSheet.absoluteFillObject`, which React Native
|
|
5
|
+
* removed in 0.86 (only `StyleSheet.absoluteFill` survives).
|
|
6
|
+
*
|
|
7
|
+
* Do not go back to either RN export:
|
|
8
|
+
*
|
|
9
|
+
* - `absoluteFillObject` is `undefined` on >=0.86, and spreading `undefined`
|
|
10
|
+
* yields `{}` with no error. Every flow surface silently dropped out of the
|
|
11
|
+
* overlay and laid out in normal flow below the host's navigator instead.
|
|
12
|
+
* - `absoluteFill` is a plain object on 0.81/0.86, but older releases in our
|
|
13
|
+
* supported range (`react-native >=0.74`) registered it as a numeric style
|
|
14
|
+
* ID, so spreading it collapses to `{}` the same way.
|
|
15
|
+
*
|
|
16
|
+
* A local literal is the only form that behaves identically across the range.
|
|
17
|
+
*/
|
|
18
|
+
export const ABSOLUTE_FILL: ViewStyle = {
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
top: 0,
|
|
21
|
+
left: 0,
|
|
22
|
+
right: 0,
|
|
23
|
+
bottom: 0,
|
|
24
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clamp theme `backdropOpacity` (wire Decimal string or number) to [0, 1].
|
|
3
|
+
*/
|
|
4
|
+
export function parseBackdropOpacity(value: string | number | undefined): number {
|
|
5
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
6
|
+
return Math.min(1, Math.max(0, value));
|
|
7
|
+
}
|
|
8
|
+
if (typeof value === 'string') {
|
|
9
|
+
const parsed = Number.parseFloat(value);
|
|
10
|
+
if (Number.isFinite(parsed)) return Math.min(1, Math.max(0, parsed));
|
|
11
|
+
}
|
|
12
|
+
return 0.4;
|
|
13
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { FlowStepFragment, FlowVersionFragment } from '@userflow-tech/protocol';
|
|
2
|
+
|
|
3
|
+
export interface StepProgress {
|
|
4
|
+
/** 0-based index among visible (non-HIDDEN) steps, or -1 if unknown. */
|
|
5
|
+
index: number;
|
|
6
|
+
total: number;
|
|
7
|
+
/** 0–1 fraction for a filled progress bar; 0 when total is 0. */
|
|
8
|
+
fraction: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Progress among visible steps (HIDDEN excluded), matching web FlowContent:
|
|
13
|
+
* fraction = (index + 1) / total when the current step is found.
|
|
14
|
+
*/
|
|
15
|
+
export function resolveStepProgress(
|
|
16
|
+
version: FlowVersionFragment,
|
|
17
|
+
currentStepId: string | null | undefined,
|
|
18
|
+
): StepProgress {
|
|
19
|
+
const visible = version.steps.filter(
|
|
20
|
+
(step: FlowStepFragment) => String(step.appearance).toUpperCase() !== 'HIDDEN',
|
|
21
|
+
);
|
|
22
|
+
const total = visible.length;
|
|
23
|
+
if (total === 0 || !currentStepId) {
|
|
24
|
+
return { index: -1, total, fraction: 0 };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const index = visible.findIndex((step) => step.id === currentStepId);
|
|
28
|
+
if (index < 0) {
|
|
29
|
+
return { index: -1, total, fraction: 0 };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
index,
|
|
34
|
+
total,
|
|
35
|
+
fraction: (index + 1) / total,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ThemeFragment } from '@userflow-tech/protocol';
|
|
2
|
+
|
|
3
|
+
import { foregroundAlpha } from '../content/themeColor';
|
|
4
|
+
|
|
5
|
+
/** Mobile modal dismiss icon — lighter than body text (design spec / web secondary chrome). */
|
|
6
|
+
export const CLOSE_BUTTON_FOREGROUND_ALPHA = 0.5;
|
|
7
|
+
|
|
8
|
+
function readString(theme: ThemeFragment, key: string): string | undefined {
|
|
9
|
+
const value = theme[key];
|
|
10
|
+
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Web close uses `toolbarForegroundColor` (defaults to `mainForegroundColor`).
|
|
15
|
+
* RN applies {@link CLOSE_BUTTON_FOREGROUND_ALPHA} so the × reads as a tertiary control.
|
|
16
|
+
*/
|
|
17
|
+
export function resolveCloseButtonColor(theme: ThemeFragment): string {
|
|
18
|
+
const base =
|
|
19
|
+
readString(theme, 'toolbarForegroundColor') ??
|
|
20
|
+
readString(theme, 'mainForegroundColor') ??
|
|
21
|
+
theme.fontColor;
|
|
22
|
+
return foregroundAlpha(base, CLOSE_BUTTON_FOREGROUND_ALPHA);
|
|
23
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { ThemeFragment } from '@userflow-tech/protocol';
|
|
2
|
+
|
|
3
|
+
import type { JustifyContent } from '../content/types';
|
|
4
|
+
|
|
5
|
+
/** Screen margin around the modal card (mobile design spec: 24–32px). */
|
|
6
|
+
export const MODAL_VIEWPORT_PADDING = 24;
|
|
7
|
+
|
|
8
|
+
/** Matches web `FlowChrome` narrow breakpoint for modal layout. */
|
|
9
|
+
export const MODAL_COMPACT_LAYOUT_MAX_WIDTH = 800;
|
|
10
|
+
|
|
11
|
+
export type ModalButtonsAlign = JustifyContent;
|
|
12
|
+
|
|
13
|
+
function readNumber(theme: ThemeFragment, key: string, fallback: number): number {
|
|
14
|
+
const value = theme[key];
|
|
15
|
+
if (typeof value === 'number' && Number.isFinite(value)) return value;
|
|
16
|
+
if (typeof value === 'string') {
|
|
17
|
+
const parsed = parseFloat(value);
|
|
18
|
+
if (Number.isFinite(parsed)) return parsed;
|
|
19
|
+
}
|
|
20
|
+
return fallback;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function readString(theme: ThemeFragment, key: string, fallback: string): string {
|
|
24
|
+
const value = theme[key];
|
|
25
|
+
return typeof value === 'string' && value.length > 0 ? value : fallback;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Web: step `width` overrides `theme.modalWidth`; card is clamped to the viewport
|
|
30
|
+
* (`FlowChrome`, `VIEWPORT_PADDING`). RN uses {@link MODAL_VIEWPORT_PADDING}.
|
|
31
|
+
*/
|
|
32
|
+
export function resolveModalCardMaxWidth(
|
|
33
|
+
theme: ThemeFragment,
|
|
34
|
+
stepWidth: number | null | undefined,
|
|
35
|
+
windowWidth: number,
|
|
36
|
+
): number {
|
|
37
|
+
const themeModalWidth = readNumber(theme, 'modalWidth', 520);
|
|
38
|
+
const desiredWidth = stepWidth ?? themeModalWidth;
|
|
39
|
+
const maxInViewport = Math.max(0, windowWidth - 2 * MODAL_VIEWPORT_PADDING);
|
|
40
|
+
return Math.min(desiredWidth, maxInViewport);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function resolveModalCenterPadding(insets: {
|
|
44
|
+
top: number;
|
|
45
|
+
bottom: number;
|
|
46
|
+
left: number;
|
|
47
|
+
right: number;
|
|
48
|
+
}): {
|
|
49
|
+
paddingTop: number;
|
|
50
|
+
paddingBottom: number;
|
|
51
|
+
paddingLeft: number;
|
|
52
|
+
paddingRight: number;
|
|
53
|
+
} {
|
|
54
|
+
return {
|
|
55
|
+
paddingTop: Math.max(MODAL_VIEWPORT_PADDING, insets.top + 8),
|
|
56
|
+
paddingBottom: Math.max(MODAL_VIEWPORT_PADDING, insets.bottom + 8),
|
|
57
|
+
paddingLeft: Math.max(MODAL_VIEWPORT_PADDING, insets.left + 8),
|
|
58
|
+
paddingRight: Math.max(MODAL_VIEWPORT_PADDING, insets.right + 8),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Max card height so landscape modals stay inside the viewport (scroll inside the card).
|
|
64
|
+
*/
|
|
65
|
+
export function resolveModalCardMaxHeight(
|
|
66
|
+
windowHeight: number,
|
|
67
|
+
centerPadding: { paddingTop: number; paddingBottom: number },
|
|
68
|
+
): number {
|
|
69
|
+
return Math.max(0, windowHeight - centerPadding.paddingTop - centerPadding.paddingBottom);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Mobile spec: centered buttons on narrow viewports; end-aligned on tablet/desktop.
|
|
74
|
+
* Explicit theme `buttonHorizontalAlign` wins (same keys as web `getThemeRootStyles`).
|
|
75
|
+
*/
|
|
76
|
+
export function resolveModalButtonsAlign(
|
|
77
|
+
theme: ThemeFragment,
|
|
78
|
+
windowWidth: number,
|
|
79
|
+
): ModalButtonsAlign {
|
|
80
|
+
const align = readString(theme, 'buttonHorizontalAlign', 'default');
|
|
81
|
+
if (align === 'left') return 'start';
|
|
82
|
+
if (align === 'right') return 'end';
|
|
83
|
+
if (align === 'center') return 'center';
|
|
84
|
+
return windowWidth < MODAL_COMPACT_LAYOUT_MAX_WIDTH ? 'center' : 'end';
|
|
85
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ThemeFragment } from '@userflow-tech/protocol';
|
|
2
|
+
import type { ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import type { JustifyContent } from '../content/types';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
MODAL_COMPACT_LAYOUT_MAX_WIDTH,
|
|
8
|
+
MODAL_VIEWPORT_PADDING,
|
|
9
|
+
resolveModalCenterPadding,
|
|
10
|
+
} from './resolveModalLayout';
|
|
11
|
+
|
|
12
|
+
/** Screen margin for anchored tooltips (mobile design spec: 24px). */
|
|
13
|
+
export const TOOLTIP_VIEWPORT_PADDING = MODAL_VIEWPORT_PADDING;
|
|
14
|
+
|
|
15
|
+
function readString(theme: ThemeFragment, key: string, fallback: string): string {
|
|
16
|
+
const value = theme[key];
|
|
17
|
+
return typeof value === 'string' && value.length > 0 ? value : fallback;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function readNumber(theme: ThemeFragment, key: string, fallback: number): number {
|
|
21
|
+
const value = theme[key];
|
|
22
|
+
if (typeof value === 'number' && Number.isFinite(value)) return value;
|
|
23
|
+
if (typeof value === 'string') {
|
|
24
|
+
const parsed = parseFloat(value);
|
|
25
|
+
if (Number.isFinite(parsed)) return parsed;
|
|
26
|
+
}
|
|
27
|
+
return fallback;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Web: step `width` overrides `theme.tooltipWidth`; card is clamped to the viewport
|
|
32
|
+
* (`FlowChrome`, `VIEWPORT_PADDING`).
|
|
33
|
+
*/
|
|
34
|
+
export function resolveTooltipCardMaxWidth(
|
|
35
|
+
theme: ThemeFragment,
|
|
36
|
+
stepWidth: number | null | undefined,
|
|
37
|
+
windowWidth: number,
|
|
38
|
+
): number {
|
|
39
|
+
const themeTooltipWidth = readNumber(theme, 'tooltipWidth', 350);
|
|
40
|
+
const desiredWidth = stepWidth ?? themeTooltipWidth;
|
|
41
|
+
const maxInViewport = Math.max(0, windowWidth - 2 * TOOLTIP_VIEWPORT_PADDING);
|
|
42
|
+
return Math.min(desiredWidth, maxInViewport);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Mobile spec: nearly full-width card with screen margins on narrow viewports. */
|
|
46
|
+
export function resolveTooltipCardLayout(
|
|
47
|
+
cardMaxWidth: number,
|
|
48
|
+
windowWidth: number,
|
|
49
|
+
): Pick<ViewStyle, 'maxWidth' | 'width'> {
|
|
50
|
+
if (windowWidth < MODAL_COMPACT_LAYOUT_MAX_WIDTH) {
|
|
51
|
+
return { maxWidth: cardMaxWidth, width: cardMaxWidth };
|
|
52
|
+
}
|
|
53
|
+
return { maxWidth: cardMaxWidth };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function resolveTooltipCenterPadding(insets: {
|
|
57
|
+
top: number;
|
|
58
|
+
bottom: number;
|
|
59
|
+
left: number;
|
|
60
|
+
right: number;
|
|
61
|
+
}): ReturnType<typeof resolveModalCenterPadding> {
|
|
62
|
+
return resolveModalCenterPadding(insets);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Web `--userflow-buttons-bubble-justify-content` (bubble + tooltip): default is end.
|
|
67
|
+
*/
|
|
68
|
+
export function resolveTooltipButtonsAlign(theme: ThemeFragment): JustifyContent {
|
|
69
|
+
const align = readString(theme, 'buttonHorizontalAlign', 'default');
|
|
70
|
+
if (align === 'left') return 'start';
|
|
71
|
+
if (align === 'center') return 'center';
|
|
72
|
+
return 'end';
|
|
73
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export interface EdgeInsets {
|
|
2
|
+
top: number;
|
|
3
|
+
right: number;
|
|
4
|
+
bottom: number;
|
|
5
|
+
left: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const ZERO_INSETS: EdgeInsets = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
9
|
+
|
|
10
|
+
type UseSafeAreaInsetsFn = () => EdgeInsets;
|
|
11
|
+
|
|
12
|
+
let cachedHook: UseSafeAreaInsetsFn | null | undefined;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Resolve `useSafeAreaInsets` from the optional peer `react-native-safe-area-context`.
|
|
16
|
+
* Returns a zero-inset hook when the peer is not installed.
|
|
17
|
+
*/
|
|
18
|
+
function resolveUseSafeAreaInsets(): UseSafeAreaInsetsFn {
|
|
19
|
+
if (cachedHook !== undefined) return cachedHook ?? (() => ZERO_INSETS);
|
|
20
|
+
|
|
21
|
+
if (typeof require !== 'function') {
|
|
22
|
+
cachedHook = null;
|
|
23
|
+
return () => ZERO_INSETS;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
// Optional peer — Expo / React Navigation apps usually have it.
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
29
|
+
const mod = require('react-native-safe-area-context') as {
|
|
30
|
+
useSafeAreaInsets?: UseSafeAreaInsetsFn;
|
|
31
|
+
};
|
|
32
|
+
cachedHook = typeof mod.useSafeAreaInsets === 'function' ? mod.useSafeAreaInsets : null;
|
|
33
|
+
} catch {
|
|
34
|
+
cachedHook = null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return cachedHook ?? (() => ZERO_INSETS);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Safe-area insets with a zero fallback when the optional peer is missing. */
|
|
41
|
+
export function useUserflowSafeAreaInsets(): EdgeInsets {
|
|
42
|
+
return resolveUseSafeAreaInsets()();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export function resetSafeAreaInsetsCacheForTests(): void {
|
|
47
|
+
cachedHook = undefined;
|
|
48
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { ThemeFragment } from '@userflow-tech/protocol';
|
|
2
|
+
import type { ViewStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export type BubbleChromeKind = 'modal' | 'tooltip';
|
|
5
|
+
|
|
6
|
+
export interface BubbleChrome {
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
borderRadius: number;
|
|
9
|
+
borderWidth: number;
|
|
10
|
+
borderColor: string;
|
|
11
|
+
notchSize: number;
|
|
12
|
+
/** Inner content padding (modal: theme `modalPadding` or 32; tooltip/bubble 24). */
|
|
13
|
+
contentPadding: number;
|
|
14
|
+
/**
|
|
15
|
+
* Outer shell — shadow + overflow. Tooltips keep overflow visible so the
|
|
16
|
+
* notch can sit outside the card bounds.
|
|
17
|
+
*/
|
|
18
|
+
cardStyle: ViewStyle;
|
|
19
|
+
/**
|
|
20
|
+
* Opaque fill layer (bg + radius + optional border). Tooltip surfaces render
|
|
21
|
+
* the notch behind this so the diamond joins the card without a seam.
|
|
22
|
+
*/
|
|
23
|
+
fillStyle: ViewStyle;
|
|
24
|
+
/**
|
|
25
|
+
* Web `filter: drop-shadow(…)` as RN shadow props. Only paints on a layer
|
|
26
|
+
* without `overflow: 'hidden'` — iOS clips the shadow along with the content.
|
|
27
|
+
*/
|
|
28
|
+
shadowStyle: ViewStyle;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function readNumber(theme: ThemeFragment, key: string, fallback: number): number {
|
|
32
|
+
const value = theme[key];
|
|
33
|
+
if (typeof value === 'number' && Number.isFinite(value)) return value;
|
|
34
|
+
if (typeof value === 'string') {
|
|
35
|
+
const parsed = parseFloat(value);
|
|
36
|
+
if (Number.isFinite(parsed)) return parsed;
|
|
37
|
+
}
|
|
38
|
+
return fallback;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function readString(theme: ThemeFragment, key: string, fallback: string): string {
|
|
42
|
+
const value = theme[key];
|
|
43
|
+
return typeof value === 'string' && value.length > 0 ? value : fallback;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Web theme-driven card chrome (FlowChrome / flow-host / bubble-frame) as the
|
|
48
|
+
* interim RN visual baseline until mobile design specs land.
|
|
49
|
+
*
|
|
50
|
+
* Optional fields (`bubbleBorderRadius`, `tooltipNotchSize`, …) are read from
|
|
51
|
+
* the theme index signature so curated ThemeFragment stays small.
|
|
52
|
+
*/
|
|
53
|
+
export function resolveBubbleChrome(
|
|
54
|
+
theme: ThemeFragment,
|
|
55
|
+
kind: BubbleChromeKind = 'modal',
|
|
56
|
+
): BubbleChrome {
|
|
57
|
+
const borderRadius = readNumber(theme, 'bubbleBorderRadius', 10);
|
|
58
|
+
const borderWidth = Math.max(0, readNumber(theme, 'bubbleBorderWidth', 0));
|
|
59
|
+
const borderColor = readString(theme, 'bubbleBorderColor', 'transparent');
|
|
60
|
+
// Web default tooltipNotchSize is 10.
|
|
61
|
+
const notchSize = Math.max(0, readNumber(theme, 'tooltipNotchSize', 10));
|
|
62
|
+
const contentPadding =
|
|
63
|
+
kind === 'tooltip' ? 24 : Math.max(0, readNumber(theme, 'modalPadding', 32));
|
|
64
|
+
|
|
65
|
+
// Web often leaves `backgroundColor` empty and paints via `mainBackgroundColor`.
|
|
66
|
+
// An empty string makes RN cards fully transparent (missing-target UI looks broken).
|
|
67
|
+
const backgroundColor =
|
|
68
|
+
readString(theme, 'backgroundColor', '') ||
|
|
69
|
+
readString(theme, 'mainBackgroundColor', '') ||
|
|
70
|
+
'#ffffff';
|
|
71
|
+
|
|
72
|
+
// Skip zero-width borders — RN can still paint a hairline when width is 0.
|
|
73
|
+
const borderStyle: ViewStyle =
|
|
74
|
+
borderWidth > 0
|
|
75
|
+
? {
|
|
76
|
+
borderWidth,
|
|
77
|
+
borderColor,
|
|
78
|
+
}
|
|
79
|
+
: {};
|
|
80
|
+
|
|
81
|
+
// Approximate web `bubble-drop-shadow()` / Safari fallback in flow-host.styl:
|
|
82
|
+
// drop-shadow(0 2px 9px rgba(0,0,0,0.18)).
|
|
83
|
+
const shadowStyle: ViewStyle = {
|
|
84
|
+
shadowColor: '#000000',
|
|
85
|
+
shadowOffset: { width: 0, height: 2 },
|
|
86
|
+
shadowOpacity: 0.18,
|
|
87
|
+
shadowRadius: 9,
|
|
88
|
+
elevation: 8,
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const fillStyle: ViewStyle = {
|
|
92
|
+
backgroundColor,
|
|
93
|
+
borderRadius,
|
|
94
|
+
...borderStyle,
|
|
95
|
+
overflow: 'hidden',
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const cardStyle: ViewStyle = {
|
|
99
|
+
// Modal: shadow shell only — ModalSurface wraps content in `fillStyle` so
|
|
100
|
+
// iOS does not clip the shadow (same idea as web drop-shadow on outline).
|
|
101
|
+
// Tooltip: transparent shell; TooltipBubble owns the shared shadow.
|
|
102
|
+
...(kind === 'modal'
|
|
103
|
+
? {
|
|
104
|
+
...shadowStyle,
|
|
105
|
+
borderRadius,
|
|
106
|
+
backgroundColor: 'transparent',
|
|
107
|
+
overflow: 'visible',
|
|
108
|
+
}
|
|
109
|
+
: {
|
|
110
|
+
backgroundColor: 'transparent',
|
|
111
|
+
overflow: 'visible',
|
|
112
|
+
}),
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
backgroundColor,
|
|
117
|
+
borderRadius,
|
|
118
|
+
borderWidth,
|
|
119
|
+
borderColor,
|
|
120
|
+
notchSize,
|
|
121
|
+
contentPadding,
|
|
122
|
+
cardStyle,
|
|
123
|
+
fillStyle,
|
|
124
|
+
shadowStyle,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
StyleSheet,
|
|
4
|
+
View,
|
|
5
|
+
type LayoutChangeEvent,
|
|
6
|
+
type StyleProp,
|
|
7
|
+
type ViewStyle,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
|
|
10
|
+
import { ABSOLUTE_FILL } from '../absoluteFill';
|
|
11
|
+
import type { BubbleChrome } from '../themeChrome';
|
|
12
|
+
|
|
13
|
+
import { TooltipNotch } from './TooltipNotch';
|
|
14
|
+
import type { NotchPosition } from './computeTooltipPosition';
|
|
15
|
+
|
|
16
|
+
export interface TooltipBubbleProps {
|
|
17
|
+
chrome: BubbleChrome;
|
|
18
|
+
notchPosition: NotchPosition;
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Tooltip chrome shell: diamond notch + card fill sharing one shadow family.
|
|
26
|
+
*
|
|
27
|
+
* Web draws card and notch as a single silhouette under `filter: drop-shadow`.
|
|
28
|
+
* RN has no silhouette filter, so the card uses a dedicated shadow layer and
|
|
29
|
+
* `elevation` on the fill (Android). The notch itself is not shadowed — a
|
|
30
|
+
* second blurred shadow on the rotated square leaves a gray band at the pointer
|
|
31
|
+
* base when it points up into the anchor. An inset fill diamond on top erases
|
|
32
|
+
* that seam (and bordered stroke gaps) without clipping the outer tip.
|
|
33
|
+
*/
|
|
34
|
+
export function TooltipBubble({
|
|
35
|
+
chrome,
|
|
36
|
+
notchPosition,
|
|
37
|
+
style,
|
|
38
|
+
onLayout,
|
|
39
|
+
children,
|
|
40
|
+
}: TooltipBubbleProps): React.ReactElement {
|
|
41
|
+
const showNotch = chrome.notchSize > 0;
|
|
42
|
+
const bordered = chrome.borderWidth > 0;
|
|
43
|
+
// Web paints the notch with border color when bordered, otherwise the card
|
|
44
|
+
// fill. Never use literal `transparent` — that hides the pointer entirely.
|
|
45
|
+
const notchColor =
|
|
46
|
+
bordered && chrome.borderColor !== 'transparent' ? chrome.borderColor : chrome.backgroundColor;
|
|
47
|
+
// Android draws by elevation, so every layer above the card shadow has to be
|
|
48
|
+
// raised with it or the opaque shadow layer paints over the card body.
|
|
49
|
+
const elevation = chrome.shadowStyle.elevation ?? 0;
|
|
50
|
+
const notchProps = {
|
|
51
|
+
notchSize: chrome.notchSize,
|
|
52
|
+
...(notchPosition.top !== undefined ? { top: notchPosition.top } : {}),
|
|
53
|
+
...(notchPosition.bottom !== undefined ? { bottom: notchPosition.bottom } : {}),
|
|
54
|
+
...(notchPosition.left !== undefined ? { left: notchPosition.left } : {}),
|
|
55
|
+
...(notchPosition.right !== undefined ? { right: notchPosition.right } : {}),
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<View
|
|
60
|
+
testID="userflow-tooltip-card"
|
|
61
|
+
accessibilityViewIsModal
|
|
62
|
+
pointerEvents="auto"
|
|
63
|
+
onLayout={onLayout}
|
|
64
|
+
style={[styles.shell, style]}
|
|
65
|
+
>
|
|
66
|
+
{/* iOS-only: Android gets the same shadow from the fill's elevation. */}
|
|
67
|
+
<View
|
|
68
|
+
pointerEvents="none"
|
|
69
|
+
style={[
|
|
70
|
+
styles.cardShadow,
|
|
71
|
+
chrome.shadowStyle,
|
|
72
|
+
{
|
|
73
|
+
elevation: 0,
|
|
74
|
+
borderRadius: chrome.borderRadius,
|
|
75
|
+
backgroundColor: chrome.backgroundColor,
|
|
76
|
+
},
|
|
77
|
+
]}
|
|
78
|
+
/>
|
|
79
|
+
|
|
80
|
+
{showNotch ? (
|
|
81
|
+
<TooltipNotch {...notchProps} notchColor={notchColor} style={styles.notchLayer} />
|
|
82
|
+
) : null}
|
|
83
|
+
|
|
84
|
+
<View style={[chrome.fillStyle, styles.fill, { elevation }]}>{children}</View>
|
|
85
|
+
|
|
86
|
+
{/* Inset fill diamond above the card body: hides the notch shadow/base seam
|
|
87
|
+
where the pointer meets the card (especially visible on upward pointers).
|
|
88
|
+
Bordered themes use borderWidth; borderless themes still need ≥1px overlap. */}
|
|
89
|
+
{showNotch ? (
|
|
90
|
+
<TooltipNotch
|
|
91
|
+
{...notchProps}
|
|
92
|
+
notchColor={chrome.backgroundColor}
|
|
93
|
+
inset={Math.max(chrome.borderWidth, 1)}
|
|
94
|
+
style={[styles.notchSeamCover, { elevation }]}
|
|
95
|
+
testID="userflow-tooltip-notch-seam"
|
|
96
|
+
/>
|
|
97
|
+
) : null}
|
|
98
|
+
</View>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const styles = StyleSheet.create({
|
|
103
|
+
shell: {
|
|
104
|
+
position: 'relative',
|
|
105
|
+
backgroundColor: 'transparent',
|
|
106
|
+
overflow: 'visible',
|
|
107
|
+
maxHeight: '80%',
|
|
108
|
+
flexShrink: 1,
|
|
109
|
+
},
|
|
110
|
+
cardShadow: {
|
|
111
|
+
...ABSOLUTE_FILL,
|
|
112
|
+
zIndex: 0,
|
|
113
|
+
},
|
|
114
|
+
notchLayer: {
|
|
115
|
+
zIndex: 1,
|
|
116
|
+
},
|
|
117
|
+
fill: {
|
|
118
|
+
zIndex: 2,
|
|
119
|
+
},
|
|
120
|
+
notchSeamCover: {
|
|
121
|
+
zIndex: 3,
|
|
122
|
+
},
|
|
123
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dimensions, StyleSheet, View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { ABSOLUTE_FILL } from '../absoluteFill';
|
|
5
|
+
|
|
6
|
+
export interface HighlightRect {
|
|
7
|
+
top: number;
|
|
8
|
+
left: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface TooltipCutoutProps {
|
|
14
|
+
targetRect: HighlightRect;
|
|
15
|
+
backdropColor: string;
|
|
16
|
+
backdropOpacity: number;
|
|
17
|
+
/**
|
|
18
|
+
* When true, a transparent capture layer covers only the highlight hole so
|
|
19
|
+
* the tooltip target cannot be pressed. Dim bands stay visual-only either way.
|
|
20
|
+
*/
|
|
21
|
+
targetBlocked: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Four-block dimmed cutout around the padded target (web tooltip backdrop).
|
|
26
|
+
*
|
|
27
|
+
* Dim bands use `pointerEvents="none"` so touches reach the app — React Native
|
|
28
|
+
* cannot block taps while allowing scroll the way web's `mousedown`-only
|
|
29
|
+
* swallow does. When `targetBlocked`, only the hole (target) is covered with a
|
|
30
|
+
* transparent `pointerEvents="auto"` layer.
|
|
31
|
+
*
|
|
32
|
+
* MVP note: each block uses its own translucent opacity. That matches non-overlapping
|
|
33
|
+
* tiles well, but can look slightly uneven vs web’s single shadow-hole when other
|
|
34
|
+
* translucent overlays stack. Acceptable for Phase 3; a single masked layer can come later.
|
|
35
|
+
*/
|
|
36
|
+
export function TooltipCutout({
|
|
37
|
+
targetRect,
|
|
38
|
+
backdropColor,
|
|
39
|
+
backdropOpacity,
|
|
40
|
+
targetBlocked,
|
|
41
|
+
}: TooltipCutoutProps): React.ReactElement {
|
|
42
|
+
const { width: sw, height: sh } = Dimensions.get('window');
|
|
43
|
+
const { top, left, width, height } = targetRect;
|
|
44
|
+
const right = left + width;
|
|
45
|
+
const bottom = top + height;
|
|
46
|
+
const blockStyle = { backgroundColor: backdropColor, opacity: backdropOpacity };
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<View style={ABSOLUTE_FILL} pointerEvents="box-none" testID="userflow-tooltip-cutout">
|
|
50
|
+
<View
|
|
51
|
+
pointerEvents="none"
|
|
52
|
+
testID="userflow-tooltip-cutout-top"
|
|
53
|
+
style={[styles.block, blockStyle, { top: 0, left: 0, width: sw, height: Math.max(0, top) }]}
|
|
54
|
+
/>
|
|
55
|
+
<View
|
|
56
|
+
pointerEvents="none"
|
|
57
|
+
testID="userflow-tooltip-cutout-left"
|
|
58
|
+
style={[
|
|
59
|
+
styles.block,
|
|
60
|
+
blockStyle,
|
|
61
|
+
{ top: Math.max(0, top), left: 0, width: Math.max(0, left), height: Math.max(0, height) },
|
|
62
|
+
]}
|
|
63
|
+
/>
|
|
64
|
+
<View
|
|
65
|
+
pointerEvents="none"
|
|
66
|
+
testID="userflow-tooltip-cutout-right"
|
|
67
|
+
style={[
|
|
68
|
+
styles.block,
|
|
69
|
+
blockStyle,
|
|
70
|
+
{
|
|
71
|
+
top: Math.max(0, top),
|
|
72
|
+
left: Math.max(0, right),
|
|
73
|
+
width: Math.max(0, sw - right),
|
|
74
|
+
height: Math.max(0, height),
|
|
75
|
+
},
|
|
76
|
+
]}
|
|
77
|
+
/>
|
|
78
|
+
<View
|
|
79
|
+
pointerEvents="none"
|
|
80
|
+
testID="userflow-tooltip-cutout-bottom"
|
|
81
|
+
style={[
|
|
82
|
+
styles.block,
|
|
83
|
+
blockStyle,
|
|
84
|
+
{ top: Math.max(0, bottom), left: 0, width: sw, height: Math.max(0, sh - bottom) },
|
|
85
|
+
]}
|
|
86
|
+
/>
|
|
87
|
+
{targetBlocked ? (
|
|
88
|
+
<View
|
|
89
|
+
pointerEvents="auto"
|
|
90
|
+
testID="userflow-tooltip-target-block"
|
|
91
|
+
style={[
|
|
92
|
+
styles.block,
|
|
93
|
+
{
|
|
94
|
+
top,
|
|
95
|
+
left,
|
|
96
|
+
width: Math.max(0, width),
|
|
97
|
+
height: Math.max(0, height),
|
|
98
|
+
},
|
|
99
|
+
]}
|
|
100
|
+
/>
|
|
101
|
+
) : null}
|
|
102
|
+
</View>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const styles = StyleSheet.create({
|
|
107
|
+
block: {
|
|
108
|
+
position: 'absolute',
|
|
109
|
+
},
|
|
110
|
+
});
|