@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,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll a tooltip anchor into view by walking fiber scroll ancestors
|
|
3
|
+
* (or an explicit scroll-container registry override).
|
|
4
|
+
*
|
|
5
|
+
* Content offset is derived from two `measureInWindow` calls — container
|
|
6
|
+
* origin minus content origin — so the host app does not need to wire
|
|
7
|
+
* `onScroll`. Semantics match web `scrollIntoView({ block: 'nearest' })`:
|
|
8
|
+
* the minimal delta that brings the padded target fully inside the viewport.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { Rect } from '../surfaces/tooltip/inferTooltipPlacement';
|
|
12
|
+
|
|
13
|
+
import type { AnchorHost } from './AnchorRegistry';
|
|
14
|
+
import { scrollContainerRegistry } from './ScrollContainerRegistry';
|
|
15
|
+
import type { AnyFiber } from './fiber/fiberInternals';
|
|
16
|
+
import { findScrollAncestors, type ScrollAncestor } from './fiber/findScrollAncestors';
|
|
17
|
+
import { measureHostFiber } from './fiber/measureHostFiber';
|
|
18
|
+
import { getCustomScrollIntoView, getScrollPadding, type ScrollPadding } from './scrollConfig';
|
|
19
|
+
|
|
20
|
+
/** Padding applied inside a scroll container when bringing a target into view. */
|
|
21
|
+
const INTO_VIEW_PADDING = 24;
|
|
22
|
+
|
|
23
|
+
export interface ScrollAnchorIntoViewOptions {
|
|
24
|
+
/** Measured window rect of the tooltip target. */
|
|
25
|
+
rect: Rect;
|
|
26
|
+
/** Measurable host (registry or fiber-backed). */
|
|
27
|
+
host: AnchorHost;
|
|
28
|
+
/**
|
|
29
|
+
* Cached anchor host fiber — enables automatic scroll-ancestor discovery.
|
|
30
|
+
* When omitted, only the registry / custom / host.scrollIntoView paths run.
|
|
31
|
+
*/
|
|
32
|
+
fiber?: AnyFiber | null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Best-effort scroll so `opts.rect` becomes fully visible.
|
|
37
|
+
*
|
|
38
|
+
* Order:
|
|
39
|
+
* 1. `setCustomScrollIntoView` override (replaces everything)
|
|
40
|
+
* 2. Explicit `useUserflowScrollContainer` registry (opt-in override)
|
|
41
|
+
* 3. Fiber scroll-ancestor walk (automatic for testID anchors)
|
|
42
|
+
* 4. `host.scrollIntoView` (RN Web / DOM)
|
|
43
|
+
*
|
|
44
|
+
* Returns `true` when at least one scroll was attempted.
|
|
45
|
+
*/
|
|
46
|
+
export function scrollAnchorIntoView(opts: ScrollAnchorIntoViewOptions): boolean {
|
|
47
|
+
const { rect, host, fiber } = opts;
|
|
48
|
+
|
|
49
|
+
const custom = getCustomScrollIntoView();
|
|
50
|
+
if (custom) {
|
|
51
|
+
try {
|
|
52
|
+
custom({ rect, measureInWindow: host.measureInWindow.bind(host) });
|
|
53
|
+
} catch {
|
|
54
|
+
// Best-effort.
|
|
55
|
+
}
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let attempted = false;
|
|
60
|
+
|
|
61
|
+
// Explicit registry wins over the fiber walk (mirrors anchorRegistry vs scan).
|
|
62
|
+
if (scrollContainerRegistry.list().length > 0) {
|
|
63
|
+
try {
|
|
64
|
+
scrollContainerRegistry.scrollTargetIntoView(rect);
|
|
65
|
+
attempted = true;
|
|
66
|
+
} catch {
|
|
67
|
+
// Fall through.
|
|
68
|
+
}
|
|
69
|
+
} else if (fiber) {
|
|
70
|
+
attempted = scrollFiberAncestors(fiber, rect) || attempted;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (typeof host.scrollIntoView === 'function') {
|
|
74
|
+
try {
|
|
75
|
+
host.scrollIntoView();
|
|
76
|
+
attempted = true;
|
|
77
|
+
} catch {
|
|
78
|
+
// Best-effort.
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return attempted;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Drive every scroll ancestor of `fiber`, innermost first, so nested
|
|
87
|
+
* scrollers compose correctly.
|
|
88
|
+
*/
|
|
89
|
+
export function scrollFiberAncestors(fiber: AnyFiber, target: Rect): boolean {
|
|
90
|
+
const ancestors = findScrollAncestors(fiber);
|
|
91
|
+
if (ancestors.length === 0) return false;
|
|
92
|
+
|
|
93
|
+
const padding = mergePadding(getScrollPadding());
|
|
94
|
+
let attempted = false;
|
|
95
|
+
for (const ancestor of ancestors) {
|
|
96
|
+
if (scrollOneAncestor(ancestor, target, padding)) {
|
|
97
|
+
attempted = true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return attempted;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function mergePadding(configured: ScrollPadding | null): Required<ScrollPadding> {
|
|
104
|
+
return {
|
|
105
|
+
top: (configured?.top ?? 0) + INTO_VIEW_PADDING,
|
|
106
|
+
right: (configured?.right ?? 0) + INTO_VIEW_PADDING,
|
|
107
|
+
bottom: (configured?.bottom ?? 0) + INTO_VIEW_PADDING,
|
|
108
|
+
left: (configured?.left ?? 0) + INTO_VIEW_PADDING,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function scrollOneAncestor(
|
|
113
|
+
ancestor: ScrollAncestor,
|
|
114
|
+
target: Rect,
|
|
115
|
+
padding: Required<ScrollPadding>,
|
|
116
|
+
): boolean {
|
|
117
|
+
const { instance, containerFiber, contentFiber, horizontal } = ancestor;
|
|
118
|
+
|
|
119
|
+
// Need both fibers to derive offset from measure. Without them, try a
|
|
120
|
+
// best-effort scrollTo that assumes offset 0 (first paint / unmounted content).
|
|
121
|
+
if (!containerFiber) {
|
|
122
|
+
return scrollWithAssumedOffset(instance, target, padding, horizontal, { x: 0, y: 0 }, null);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// measureInWindow is async on Paper — fire-and-forget; callers treat a
|
|
126
|
+
// kicked-off measure as an attempted scroll.
|
|
127
|
+
measureHostFiber(containerFiber, (cx, cy, cw, ch) => {
|
|
128
|
+
if (cw <= 0 || ch <= 0) return;
|
|
129
|
+
|
|
130
|
+
const finish = (offsetX: number, offsetY: number): void => {
|
|
131
|
+
scrollWithAssumedOffset(
|
|
132
|
+
instance,
|
|
133
|
+
target,
|
|
134
|
+
padding,
|
|
135
|
+
horizontal,
|
|
136
|
+
{ x: Math.max(0, offsetX), y: Math.max(0, offsetY) },
|
|
137
|
+
{ x: cx, y: cy, width: cw, height: ch },
|
|
138
|
+
);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
if (!contentFiber) {
|
|
142
|
+
finish(0, 0);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
measureHostFiber(contentFiber, (contentX, contentY) => {
|
|
147
|
+
// Content is translated up/left by the scroll offset.
|
|
148
|
+
const offsetY = cy - contentY;
|
|
149
|
+
const offsetX = cx - contentX;
|
|
150
|
+
finish(offsetX, offsetY);
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function scrollWithAssumedOffset(
|
|
158
|
+
instance: ScrollAncestor['instance'],
|
|
159
|
+
target: Rect,
|
|
160
|
+
padding: Required<ScrollPadding>,
|
|
161
|
+
horizontal: boolean,
|
|
162
|
+
offset: { x: number; y: number },
|
|
163
|
+
container: Rect | null,
|
|
164
|
+
): boolean {
|
|
165
|
+
// Without a measured container, we can only nudge based on window-space
|
|
166
|
+
// heuristics via scrollToOffset-style APIs when the target is clearly
|
|
167
|
+
// off-screen relative to a zero origin — skip rather than guess badly.
|
|
168
|
+
if (!container) {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const targetContentY = offset.y + (target.y - container.y);
|
|
173
|
+
const targetContentX = offset.x + (target.x - container.x);
|
|
174
|
+
|
|
175
|
+
let nextY: number | null = null;
|
|
176
|
+
let nextX: number | null = null;
|
|
177
|
+
|
|
178
|
+
if (target.y < container.y + padding.top) {
|
|
179
|
+
nextY = Math.max(0, targetContentY - padding.top);
|
|
180
|
+
} else if (target.y + target.height > container.y + container.height - padding.bottom) {
|
|
181
|
+
nextY = Math.max(0, targetContentY + target.height - container.height + padding.bottom);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
if (target.x < container.x + padding.left) {
|
|
185
|
+
nextX = Math.max(0, targetContentX - padding.left);
|
|
186
|
+
} else if (target.x + target.width > container.x + container.width - padding.right) {
|
|
187
|
+
nextX = Math.max(0, targetContentX + target.width - container.width + padding.right);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const yChanged = nextY != null && Math.abs(nextY - offset.y) >= 1;
|
|
191
|
+
const xChanged = nextX != null && Math.abs(nextX - offset.x) >= 1;
|
|
192
|
+
if (!yChanged && !xChanged) return false;
|
|
193
|
+
|
|
194
|
+
const y = yChanged ? nextY! : offset.y;
|
|
195
|
+
const x = xChanged ? nextX! : offset.x;
|
|
196
|
+
|
|
197
|
+
try {
|
|
198
|
+
if (typeof instance.scrollTo === 'function') {
|
|
199
|
+
instance.scrollTo({ x, y, animated: true });
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
if (typeof instance.scrollToOffset === 'function') {
|
|
203
|
+
instance.scrollToOffset({
|
|
204
|
+
offset: horizontal ? x : y,
|
|
205
|
+
animated: true,
|
|
206
|
+
});
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
// SectionList without a numeric offset path — cannot target by testID index.
|
|
210
|
+
} catch {
|
|
211
|
+
// Best-effort.
|
|
212
|
+
}
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Pure helper exported for unit tests: compute the next content offset that
|
|
218
|
+
* brings `target` fully inside `container` with `block: 'nearest'` semantics.
|
|
219
|
+
*/
|
|
220
|
+
export function computeNearestScrollOffset(opts: {
|
|
221
|
+
target: Rect;
|
|
222
|
+
container: Rect;
|
|
223
|
+
contentOffset: { x: number; y: number };
|
|
224
|
+
padding?: Partial<ScrollPadding>;
|
|
225
|
+
}): { x: number; y: number; changed: boolean } {
|
|
226
|
+
const padding = mergePadding(opts.padding ?? null);
|
|
227
|
+
const { target, container, contentOffset } = opts;
|
|
228
|
+
const targetContentY = contentOffset.y + (target.y - container.y);
|
|
229
|
+
const targetContentX = contentOffset.x + (target.x - container.x);
|
|
230
|
+
|
|
231
|
+
let nextY = contentOffset.y;
|
|
232
|
+
let nextX = contentOffset.x;
|
|
233
|
+
|
|
234
|
+
if (target.y < container.y + padding.top) {
|
|
235
|
+
nextY = Math.max(0, targetContentY - padding.top);
|
|
236
|
+
} else if (target.y + target.height > container.y + container.height - padding.bottom) {
|
|
237
|
+
nextY = Math.max(0, targetContentY + target.height - container.height + padding.bottom);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
if (target.x < container.x + padding.left) {
|
|
241
|
+
nextX = Math.max(0, targetContentX - padding.left);
|
|
242
|
+
} else if (target.x + target.width > container.x + container.width - padding.right) {
|
|
243
|
+
nextX = Math.max(0, targetContentX + target.width - container.width + padding.right);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
return {
|
|
247
|
+
x: nextX,
|
|
248
|
+
y: nextY,
|
|
249
|
+
changed: Math.abs(nextX - contentOffset.x) >= 1 || Math.abs(nextY - contentOffset.y) >= 1,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integrator-level scroll configuration, mirroring web userflow.js
|
|
3
|
+
* `setScrollPadding` / `setCustomScrollIntoView`.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { Rect } from '../surfaces/tooltip/inferTooltipPlacement';
|
|
7
|
+
|
|
8
|
+
export interface ScrollPadding {
|
|
9
|
+
top?: number;
|
|
10
|
+
right?: number;
|
|
11
|
+
bottom?: number;
|
|
12
|
+
left?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Target passed to a custom scroll-into-view override. */
|
|
16
|
+
export interface ScrollIntoViewTarget {
|
|
17
|
+
rect: Rect;
|
|
18
|
+
measureInWindow: (
|
|
19
|
+
callback: (x: number, y: number, width: number, height: number) => void,
|
|
20
|
+
) => void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type CustomScrollIntoView = (target: ScrollIntoViewTarget) => void;
|
|
24
|
+
|
|
25
|
+
interface ScrollConfig {
|
|
26
|
+
scrollPadding: ScrollPadding | null;
|
|
27
|
+
customScrollIntoView: CustomScrollIntoView | null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const config: ScrollConfig = {
|
|
31
|
+
scrollPadding: null,
|
|
32
|
+
customScrollIntoView: null,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Sticky header/footer insets applied when deciding whether / how far to scroll. */
|
|
36
|
+
export function setScrollPadding(padding: ScrollPadding | null | undefined): void {
|
|
37
|
+
config.scrollPadding = padding ?? null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function getScrollPadding(): ScrollPadding | null {
|
|
41
|
+
return config.scrollPadding;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Replace the SDK's scroll-into-view behavior entirely. Useful for scroll
|
|
46
|
+
* libraries the fiber walk cannot drive (some FlashList / Reanimated setups).
|
|
47
|
+
* Pass `null` to restore the default.
|
|
48
|
+
*/
|
|
49
|
+
export function setCustomScrollIntoView(fn: CustomScrollIntoView | null | undefined): void {
|
|
50
|
+
config.customScrollIntoView = fn ?? null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function getCustomScrollIntoView(): CustomScrollIntoView | null {
|
|
54
|
+
return config.customScrollIntoView;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Test helper — reset to defaults. */
|
|
58
|
+
export function resetScrollConfig(): void {
|
|
59
|
+
config.scrollPadding = null;
|
|
60
|
+
config.customScrollIntoView = null;
|
|
61
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Active tooltip target-press subscription.
|
|
3
|
+
*
|
|
4
|
+
* {@link TooltipSurface} registers while a TOOLTIP step has a measured target,
|
|
5
|
+
* non-empty `actions`, and `tooltipTargetBlocked === false`. The bridge reads
|
|
6
|
+
* this at touch time so rAF measure updates do not re-render the provider.
|
|
7
|
+
*/
|
|
8
|
+
export interface TargetPressRect {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface TargetPressSubscription {
|
|
16
|
+
/** Latest measured target bounds (window coordinates). */
|
|
17
|
+
getRect: () => TargetPressRect | null;
|
|
18
|
+
/** Runs step.actions — same role as web `onTooltipTargetClick`. */
|
|
19
|
+
onPress: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Max finger travel (px) between start and end to count as a tap, not a scroll. */
|
|
23
|
+
export const TARGET_PRESS_TAP_SLOP = 10;
|
|
24
|
+
|
|
25
|
+
export function pointInRect(x: number, y: number, rect: TargetPressRect): boolean {
|
|
26
|
+
return x >= rect.x && x <= rect.x + rect.width && y >= rect.y && y <= rect.y + rect.height;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface TouchPoint {
|
|
30
|
+
pageX: number;
|
|
31
|
+
pageY: number;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* True when start and end both land in `rect` and movement stays within tap
|
|
36
|
+
* slop — mirrors a DOM click on the target without claiming the responder.
|
|
37
|
+
*/
|
|
38
|
+
export function isTargetTap(
|
|
39
|
+
start: TouchPoint,
|
|
40
|
+
end: TouchPoint,
|
|
41
|
+
rect: TargetPressRect,
|
|
42
|
+
slop: number = TARGET_PRESS_TAP_SLOP,
|
|
43
|
+
): boolean {
|
|
44
|
+
if (!pointInRect(start.pageX, start.pageY, rect)) return false;
|
|
45
|
+
if (!pointInRect(end.pageX, end.pageY, rect)) return false;
|
|
46
|
+
const dx = end.pageX - start.pageX;
|
|
47
|
+
const dy = end.pageY - start.pageY;
|
|
48
|
+
return dx * dx + dy * dy <= slop * slop;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Module singleton for the active tooltip target-click listener.
|
|
53
|
+
* At most one subscription (one visible tooltip step).
|
|
54
|
+
*
|
|
55
|
+
* In-progress touches are keyed by native `identifier` so multi-touch start/end
|
|
56
|
+
* pairs correctly when several fingers are down. RN types `identifier` as
|
|
57
|
+
* `string`; accept `number | string` for tests and older typings.
|
|
58
|
+
*/
|
|
59
|
+
export type TouchIdentifier = number | string;
|
|
60
|
+
|
|
61
|
+
export class TargetPressMonitor {
|
|
62
|
+
private subscription: TargetPressSubscription | null = null;
|
|
63
|
+
private touchStarts = new Map<TouchIdentifier, TouchPoint>();
|
|
64
|
+
|
|
65
|
+
set(subscription: TargetPressSubscription | null): void {
|
|
66
|
+
this.subscription = subscription;
|
|
67
|
+
if (!subscription) {
|
|
68
|
+
this.touchStarts.clear();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
clear(): void {
|
|
73
|
+
this.set(null);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
get(): TargetPressSubscription | null {
|
|
77
|
+
return this.subscription;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Record touch start for `identifier`; ignores when no active subscription. */
|
|
81
|
+
handleTouchStart(identifier: TouchIdentifier, pageX: number, pageY: number): void {
|
|
82
|
+
if (!this.subscription) {
|
|
83
|
+
this.touchStarts.clear();
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this.touchStarts.set(identifier, { pageX, pageY });
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* If the gesture for `identifier` is a tap on the registered target, invoke
|
|
91
|
+
* `onPress`. Never claims the responder — app controls still receive the press.
|
|
92
|
+
*/
|
|
93
|
+
handleTouchEnd(identifier: TouchIdentifier, pageX: number, pageY: number): void {
|
|
94
|
+
const start = this.touchStarts.get(identifier) ?? null;
|
|
95
|
+
this.touchStarts.delete(identifier);
|
|
96
|
+
const sub = this.subscription;
|
|
97
|
+
if (!start || !sub) return;
|
|
98
|
+
|
|
99
|
+
const rect = sub.getRect();
|
|
100
|
+
if (!rect || rect.width <= 0 || rect.height <= 0) return;
|
|
101
|
+
|
|
102
|
+
if (isTargetTap(start, { pageX, pageY }, rect)) {
|
|
103
|
+
sub.onPress();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Drop in-progress gesture(s). With `identifier`, cancels that finger only;
|
|
109
|
+
* otherwise clears all (e.g. blanket `onTouchCancel`).
|
|
110
|
+
*/
|
|
111
|
+
cancelTouch(identifier?: TouchIdentifier): void {
|
|
112
|
+
if (identifier == null) {
|
|
113
|
+
this.touchStarts.clear();
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
this.touchStarts.delete(identifier);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** Test helper. */
|
|
120
|
+
resetForTests(): void {
|
|
121
|
+
this.subscription = null;
|
|
122
|
+
this.touchStarts.clear();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Shared singleton used by TooltipSurface and TargetPressBridge. */
|
|
127
|
+
export const targetPressMonitor = new TargetPressMonitor();
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { anchorRegistry, type AnchorHost } from './AnchorRegistry';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Register a view as a manual Userflow tooltip / embed target.
|
|
8
|
+
*
|
|
9
|
+
* Prefer tagging with a plain `testID` (or `nativeID` / `accessibilityLabel`)
|
|
10
|
+
* on the target view — the SDK resolves those via a fiber-tree scan without a
|
|
11
|
+
* hook. Use this hook when you need an explicit override (e.g. a third-party
|
|
12
|
+
* component that does not forward `testID`, or when the same string appears on
|
|
13
|
+
* multiple views).
|
|
14
|
+
*
|
|
15
|
+
* Usage (override):
|
|
16
|
+
* ```tsx
|
|
17
|
+
* const anchorRef = useUserflowAnchor('invite-teammates');
|
|
18
|
+
* return <Pressable ref={anchorRef}>Invite</Pressable>;
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Preferred (no hook):
|
|
22
|
+
* ```tsx
|
|
23
|
+
* return <Pressable testID="invite-teammates">Invite</Pressable>;
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* When the target can sit inside a scrollable screen, also register the parent
|
|
27
|
+
* {@link ScrollView} with {@link useUserflowScrollContainer} so off-screen
|
|
28
|
+
* anchors are scrolled into view before the tooltip places.
|
|
29
|
+
*
|
|
30
|
+
* Phase 3 resolves targets via `step.selector.css` (leading `#` stripped).
|
|
31
|
+
*/
|
|
32
|
+
export function useUserflowAnchor(id: string): React.RefCallback<View> {
|
|
33
|
+
const hostRef = React.useRef<AnchorHost | null>(null);
|
|
34
|
+
const idRef = React.useRef(id);
|
|
35
|
+
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
const previousId = idRef.current;
|
|
38
|
+
const host = hostRef.current;
|
|
39
|
+
if (previousId !== id && host) {
|
|
40
|
+
anchorRegistry.unregister(previousId, host);
|
|
41
|
+
if (id) {
|
|
42
|
+
anchorRegistry.register(id, host);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
idRef.current = id;
|
|
46
|
+
}, [id]);
|
|
47
|
+
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
return () => {
|
|
50
|
+
const host = hostRef.current;
|
|
51
|
+
if (host) {
|
|
52
|
+
anchorRegistry.unregister(idRef.current, host);
|
|
53
|
+
hostRef.current = null;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}, []);
|
|
57
|
+
|
|
58
|
+
return React.useCallback((node: View | null) => {
|
|
59
|
+
const previous = hostRef.current;
|
|
60
|
+
const currentId = idRef.current;
|
|
61
|
+
if (previous) {
|
|
62
|
+
anchorRegistry.unregister(currentId, previous);
|
|
63
|
+
}
|
|
64
|
+
if (!node) {
|
|
65
|
+
hostRef.current = null;
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Wrap the view so we can add optional best-effort scrollIntoView (e.g. RN Web).
|
|
70
|
+
const host: AnchorHost = {
|
|
71
|
+
measureInWindow: (callback) => {
|
|
72
|
+
node.measureInWindow(callback);
|
|
73
|
+
},
|
|
74
|
+
scrollIntoView: () => {
|
|
75
|
+
const scrollable = node as View & {
|
|
76
|
+
scrollIntoView?: (options?: { block?: string; inline?: string }) => void;
|
|
77
|
+
};
|
|
78
|
+
if (typeof scrollable.scrollIntoView === 'function') {
|
|
79
|
+
scrollable.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
hostRef.current = host;
|
|
84
|
+
if (currentId) {
|
|
85
|
+
anchorRegistry.register(currentId, host);
|
|
86
|
+
}
|
|
87
|
+
}, []);
|
|
88
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { NativeScrollEvent, NativeSyntheticEvent, ScrollView } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
createScrollContainerHost,
|
|
6
|
+
scrollContainerRegistry,
|
|
7
|
+
type ScrollContainerHost,
|
|
8
|
+
} from './ScrollContainerRegistry';
|
|
9
|
+
|
|
10
|
+
export interface UserflowScrollContainerProps {
|
|
11
|
+
/** Attach to the host ScrollView (or merge with an existing ref). */
|
|
12
|
+
ref: React.RefCallback<ScrollView>;
|
|
13
|
+
/** Forward to ScrollView so content offsets stay in sync for scroll-into-view. */
|
|
14
|
+
onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
15
|
+
/** Required for frequent offset updates while scrolling. */
|
|
16
|
+
scrollEventThrottle: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Register a host {@link ScrollView} so tooltip anchors can be scrolled into view
|
|
21
|
+
* when their measured window rect is not fully visible.
|
|
22
|
+
*
|
|
23
|
+
* Usually unnecessary — the SDK discovers ScrollView / FlatList ancestors via
|
|
24
|
+
* the fiber walk for `testID` anchors. Use this hook as an explicit override
|
|
25
|
+
* for scroll libraries the walk cannot drive, or when the target is only
|
|
26
|
+
* registered via {@link useUserflowAnchor} without a discoverable fiber.
|
|
27
|
+
*
|
|
28
|
+
* Usage:
|
|
29
|
+
* ```tsx
|
|
30
|
+
* const scroll = useUserflowScrollContainer();
|
|
31
|
+
* return (
|
|
32
|
+
* <ScrollView {...scroll}>
|
|
33
|
+
* <Pressable testID="invite-teammates">Invite</Pressable>
|
|
34
|
+
* </ScrollView>
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* Screen tracking ≠ scroll registration — only ScrollViews you pass through this
|
|
39
|
+
* hook participate in the registry override path.
|
|
40
|
+
*/
|
|
41
|
+
export function useUserflowScrollContainer(
|
|
42
|
+
onScrollProp?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void,
|
|
43
|
+
): UserflowScrollContainerProps {
|
|
44
|
+
const hostRef = React.useRef<ScrollContainerHost | null>(null);
|
|
45
|
+
const nodeRef = React.useRef<ScrollView | null>(null);
|
|
46
|
+
const offsetRef = React.useRef({ x: 0, y: 0 });
|
|
47
|
+
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
return () => {
|
|
50
|
+
const host = hostRef.current;
|
|
51
|
+
if (host) {
|
|
52
|
+
scrollContainerRegistry.unregister(host);
|
|
53
|
+
hostRef.current = null;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}, []);
|
|
57
|
+
|
|
58
|
+
const ref = React.useCallback((node: ScrollView | null) => {
|
|
59
|
+
const previous = hostRef.current;
|
|
60
|
+
if (previous) {
|
|
61
|
+
scrollContainerRegistry.unregister(previous);
|
|
62
|
+
hostRef.current = null;
|
|
63
|
+
}
|
|
64
|
+
nodeRef.current = node;
|
|
65
|
+
if (!node) return;
|
|
66
|
+
|
|
67
|
+
const host = createScrollContainerHost(node, () => offsetRef.current);
|
|
68
|
+
hostRef.current = host;
|
|
69
|
+
scrollContainerRegistry.register(host);
|
|
70
|
+
}, []);
|
|
71
|
+
|
|
72
|
+
const onScroll = React.useCallback(
|
|
73
|
+
(event: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
74
|
+
const { contentOffset } = event.nativeEvent;
|
|
75
|
+
offsetRef.current = { x: contentOffset.x, y: contentOffset.y };
|
|
76
|
+
onScrollProp?.(event);
|
|
77
|
+
},
|
|
78
|
+
[onScrollProp],
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
ref,
|
|
83
|
+
onScroll,
|
|
84
|
+
scrollEventThrottle: 16,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
2
|
+
import { UserflowAuthError } from '@userflow-tech/core';
|
|
3
|
+
|
|
4
|
+
/** Matches the web SDK's `userflow:anonymousId` localStorage key. */
|
|
5
|
+
export const ANONYMOUS_ID_STORAGE_KEY = 'userflow:anonymousId';
|
|
6
|
+
|
|
7
|
+
function uuid(): string {
|
|
8
|
+
const webcrypto = globalThis.crypto;
|
|
9
|
+
if (webcrypto?.randomUUID) return webcrypto.randomUUID();
|
|
10
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {
|
|
11
|
+
const rand = (Math.random() * 16) | 0;
|
|
12
|
+
const value = char === 'x' ? rand : (rand & 0x3) | 0x8;
|
|
13
|
+
return value.toString(16);
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export async function getOrCreateAnonymousId(): Promise<string> {
|
|
18
|
+
try {
|
|
19
|
+
let externalId = await AsyncStorage.getItem(ANONYMOUS_ID_STORAGE_KEY);
|
|
20
|
+
if (!externalId) {
|
|
21
|
+
externalId = `anon-${uuid()}`;
|
|
22
|
+
await AsyncStorage.setItem(ANONYMOUS_ID_STORAGE_KEY, externalId);
|
|
23
|
+
}
|
|
24
|
+
return externalId;
|
|
25
|
+
} catch {
|
|
26
|
+
throw new UserflowAuthError(
|
|
27
|
+
'Userflow.identifyAnonymous() is not supported when persistent storage is unavailable.',
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export async function clearAnonymousId(): Promise<void> {
|
|
33
|
+
try {
|
|
34
|
+
await AsyncStorage.removeItem(ANONYMOUS_ID_STORAGE_KEY);
|
|
35
|
+
} catch {
|
|
36
|
+
// Best-effort clear, mirroring the web SDK when storage access is denied.
|
|
37
|
+
}
|
|
38
|
+
}
|