@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,439 @@
|
|
|
1
|
+
import type { SemanticRole, SemanticSegment, SiblingDescriptor } from '@userflow-tech/protocol';
|
|
2
|
+
import type { MutableRefObject, RefObject } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Multi-instance auto-anchor registry for Stage 3.
|
|
6
|
+
*
|
|
7
|
+
* Separate from {@link AnchorRegistry} (manual `useUserflowAnchor` / Tier 0).
|
|
8
|
+
* Each mounted host is a distinct instance indexed by registry key, template
|
|
9
|
+
* path, and developer ids so a later scored matcher can rank candidates.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export type AutoAnchorRef = RefObject<unknown> | MutableRefObject<unknown>;
|
|
13
|
+
|
|
14
|
+
export type AutoAnchorListener = () => void;
|
|
15
|
+
|
|
16
|
+
/** Build-time descriptor stamped by `@userflow-tech/babel-plugin` (full or expanded compact). */
|
|
17
|
+
export interface BuildTimeHints {
|
|
18
|
+
/** Canonical structural path (IDs replace ordinals when present). */
|
|
19
|
+
ufid: string;
|
|
20
|
+
/** Build-local alias key (`uf_<hash>` of templatePath). */
|
|
21
|
+
nativeId: string;
|
|
22
|
+
structuralPath?: string;
|
|
23
|
+
templatePath?: string;
|
|
24
|
+
childText?: string;
|
|
25
|
+
childShape?: string;
|
|
26
|
+
iconName?: string;
|
|
27
|
+
imageSrc?: string;
|
|
28
|
+
literalTestId?: string;
|
|
29
|
+
literalLabel?: string;
|
|
30
|
+
literalUserflowId?: string;
|
|
31
|
+
ordinal?: number;
|
|
32
|
+
siblingIndex?: number;
|
|
33
|
+
role?: SemanticRole;
|
|
34
|
+
ancestors?: SemanticSegment[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface AutoAnchorInstance {
|
|
38
|
+
instanceId: string;
|
|
39
|
+
registryKey: string;
|
|
40
|
+
ref: AutoAnchorRef;
|
|
41
|
+
kind: string;
|
|
42
|
+
role: SemanticRole;
|
|
43
|
+
isPressable: boolean;
|
|
44
|
+
templatePath: string;
|
|
45
|
+
structuralPath: string;
|
|
46
|
+
instanceScope?: string;
|
|
47
|
+
manualId?: string;
|
|
48
|
+
userflowId?: string;
|
|
49
|
+
testID?: string;
|
|
50
|
+
nativeID?: string;
|
|
51
|
+
childText?: string;
|
|
52
|
+
accessibilityLabel?: string;
|
|
53
|
+
childShape?: string;
|
|
54
|
+
iconName?: string;
|
|
55
|
+
imageSrc?: string;
|
|
56
|
+
ancestors: SemanticSegment[];
|
|
57
|
+
ordinal?: number;
|
|
58
|
+
siblingIndex?: number;
|
|
59
|
+
parentInstanceId?: string;
|
|
60
|
+
childInstanceIds: string[];
|
|
61
|
+
ambiguous: boolean;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface RegisterInstanceInput {
|
|
65
|
+
registryKey: string;
|
|
66
|
+
ref: AutoAnchorRef;
|
|
67
|
+
kind: string;
|
|
68
|
+
hints?: BuildTimeHints | null;
|
|
69
|
+
instanceScope?: string | null;
|
|
70
|
+
runtime?: {
|
|
71
|
+
manualId?: string;
|
|
72
|
+
userflowId?: string;
|
|
73
|
+
testID?: string;
|
|
74
|
+
nativeID?: string;
|
|
75
|
+
childText?: string;
|
|
76
|
+
accessibilityLabel?: string;
|
|
77
|
+
iconName?: string;
|
|
78
|
+
imageSrc?: string;
|
|
79
|
+
reactKey?: string;
|
|
80
|
+
};
|
|
81
|
+
parentInstanceId?: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const PRESSABLE_KINDS = new Set<string>([
|
|
85
|
+
'Pressable',
|
|
86
|
+
'TouchableOpacity',
|
|
87
|
+
'TouchableHighlight',
|
|
88
|
+
'TouchableWithoutFeedback',
|
|
89
|
+
'TouchableNativeFeedback',
|
|
90
|
+
]);
|
|
91
|
+
|
|
92
|
+
export function roleForKind(kind: string): SemanticRole {
|
|
93
|
+
if (PRESSABLE_KINDS.has(kind)) return 'Action';
|
|
94
|
+
if (kind === 'Text') return 'Text';
|
|
95
|
+
if (kind === 'Image') return 'Image';
|
|
96
|
+
if (kind === 'TextInput' || kind === 'TextField') return 'Input';
|
|
97
|
+
if (kind === 'View' || kind === 'ScrollView' || kind === 'SafeAreaView') return 'Group';
|
|
98
|
+
return 'Other';
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
let nextInstanceSeq = 1;
|
|
102
|
+
|
|
103
|
+
function mintInstanceId(): string {
|
|
104
|
+
const id = `inst_${nextInstanceSeq.toString(36)}`;
|
|
105
|
+
nextInstanceSeq += 1;
|
|
106
|
+
return id;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** Parent path for sibling grouping when `parentInstanceId` is unset (Babel stamps). */
|
|
110
|
+
function siblingGroupKey(inst: AutoAnchorInstance): string {
|
|
111
|
+
const path = inst.templatePath || inst.structuralPath;
|
|
112
|
+
const idx = path.lastIndexOf(' > ');
|
|
113
|
+
return idx === -1 ? path : path.slice(0, idx);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export class AutoAnchorRegistry {
|
|
117
|
+
private readonly instances = new Map<string, AutoAnchorInstance>();
|
|
118
|
+
private readonly byRegistryKey = new Map<string, Set<string>>();
|
|
119
|
+
private readonly byManualId = new Map<string, Set<string>>();
|
|
120
|
+
private readonly byTemplatePath = new Map<string, Set<string>>();
|
|
121
|
+
private readonly listeners = new Set<AutoAnchorListener>();
|
|
122
|
+
private notifyScheduled = false;
|
|
123
|
+
|
|
124
|
+
registerInstance(input: RegisterInstanceInput): { instanceId: string; dispose: () => void } {
|
|
125
|
+
const instanceId = mintInstanceId();
|
|
126
|
+
const hints = input.hints ?? undefined;
|
|
127
|
+
const kind = input.kind;
|
|
128
|
+
const role = hints?.role ?? roleForKind(kind);
|
|
129
|
+
const templatePath = hints?.templatePath ?? hints?.ufid ?? input.registryKey;
|
|
130
|
+
const structuralPath = hints?.structuralPath ?? hints?.ufid ?? templatePath;
|
|
131
|
+
const runtime = input.runtime ?? {};
|
|
132
|
+
|
|
133
|
+
const manualId =
|
|
134
|
+
runtime.manualId ??
|
|
135
|
+
runtime.userflowId ??
|
|
136
|
+
hints?.literalUserflowId ??
|
|
137
|
+
runtime.testID ??
|
|
138
|
+
hints?.literalTestId ??
|
|
139
|
+
(runtime.nativeID && !runtime.nativeID.startsWith('uf_') ? runtime.nativeID : undefined);
|
|
140
|
+
|
|
141
|
+
const userflowId = runtime.userflowId ?? hints?.literalUserflowId;
|
|
142
|
+
const testID = runtime.testID ?? hints?.literalTestId;
|
|
143
|
+
const nativeID = runtime.nativeID ?? hints?.nativeId;
|
|
144
|
+
const childText = runtime.childText ?? hints?.childText;
|
|
145
|
+
const accessibilityLabel = runtime.accessibilityLabel ?? hints?.literalLabel;
|
|
146
|
+
const iconName = runtime.iconName ?? hints?.iconName;
|
|
147
|
+
const imageSrc = runtime.imageSrc ?? hints?.imageSrc;
|
|
148
|
+
|
|
149
|
+
const instance: AutoAnchorInstance = {
|
|
150
|
+
instanceId,
|
|
151
|
+
registryKey: input.registryKey,
|
|
152
|
+
ref: input.ref,
|
|
153
|
+
kind,
|
|
154
|
+
role,
|
|
155
|
+
isPressable: PRESSABLE_KINDS.has(kind),
|
|
156
|
+
templatePath,
|
|
157
|
+
structuralPath,
|
|
158
|
+
...(input.instanceScope ? { instanceScope: input.instanceScope } : {}),
|
|
159
|
+
...(manualId ? { manualId } : {}),
|
|
160
|
+
...(userflowId ? { userflowId } : {}),
|
|
161
|
+
...(testID ? { testID } : {}),
|
|
162
|
+
...(nativeID ? { nativeID } : {}),
|
|
163
|
+
...(childText ? { childText } : {}),
|
|
164
|
+
...(accessibilityLabel ? { accessibilityLabel } : {}),
|
|
165
|
+
...(hints?.childShape ? { childShape: hints.childShape } : {}),
|
|
166
|
+
...(iconName ? { iconName } : {}),
|
|
167
|
+
...(imageSrc ? { imageSrc } : {}),
|
|
168
|
+
ancestors: hints?.ancestors ? [...hints.ancestors] : [],
|
|
169
|
+
...(hints?.ordinal !== undefined ? { ordinal: hints.ordinal } : {}),
|
|
170
|
+
...(hints?.siblingIndex !== undefined ? { siblingIndex: hints.siblingIndex } : {}),
|
|
171
|
+
...(input.parentInstanceId ? { parentInstanceId: input.parentInstanceId } : {}),
|
|
172
|
+
childInstanceIds: [],
|
|
173
|
+
ambiguous: false,
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
this.instances.set(instanceId, instance);
|
|
177
|
+
this.addIndex(this.byRegistryKey, input.registryKey, instanceId);
|
|
178
|
+
this.addIndex(this.byTemplatePath, templatePath, instanceId);
|
|
179
|
+
if (manualId) this.addIndex(this.byManualId, manualId, instanceId);
|
|
180
|
+
if (instance.userflowId) this.addIndex(this.byManualId, instance.userflowId, instanceId);
|
|
181
|
+
if (instance.testID) this.addIndex(this.byManualId, instance.testID, instanceId);
|
|
182
|
+
|
|
183
|
+
if (input.parentInstanceId) {
|
|
184
|
+
const parent = this.instances.get(input.parentInstanceId);
|
|
185
|
+
if (parent) parent.childInstanceIds.push(instanceId);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
this.recomputeAmbiguity(input.registryKey, templatePath, manualId);
|
|
189
|
+
this.notify();
|
|
190
|
+
|
|
191
|
+
return {
|
|
192
|
+
instanceId,
|
|
193
|
+
dispose: () => {
|
|
194
|
+
this.unregisterInstance(instanceId);
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
updateInstance(
|
|
200
|
+
instanceId: string,
|
|
201
|
+
patch: Partial<
|
|
202
|
+
Pick<
|
|
203
|
+
AutoAnchorInstance,
|
|
204
|
+
| 'childText'
|
|
205
|
+
| 'accessibilityLabel'
|
|
206
|
+
| 'childShape'
|
|
207
|
+
| 'manualId'
|
|
208
|
+
| 'userflowId'
|
|
209
|
+
| 'testID'
|
|
210
|
+
| 'nativeID'
|
|
211
|
+
| 'instanceScope'
|
|
212
|
+
| 'structuralPath'
|
|
213
|
+
| 'ancestors'
|
|
214
|
+
| 'ordinal'
|
|
215
|
+
| 'siblingIndex'
|
|
216
|
+
| 'parentInstanceId'
|
|
217
|
+
>
|
|
218
|
+
>,
|
|
219
|
+
): void {
|
|
220
|
+
const inst = this.instances.get(instanceId);
|
|
221
|
+
if (!inst) return;
|
|
222
|
+
|
|
223
|
+
const prevIds = {
|
|
224
|
+
manualId: inst.manualId,
|
|
225
|
+
userflowId: inst.userflowId,
|
|
226
|
+
testID: inst.testID,
|
|
227
|
+
};
|
|
228
|
+
Object.assign(inst, patch);
|
|
229
|
+
if (
|
|
230
|
+
patch.manualId !== undefined ||
|
|
231
|
+
patch.userflowId !== undefined ||
|
|
232
|
+
patch.testID !== undefined
|
|
233
|
+
) {
|
|
234
|
+
const nextManual =
|
|
235
|
+
patch.manualId ??
|
|
236
|
+
inst.userflowId ??
|
|
237
|
+
inst.testID ??
|
|
238
|
+
(inst.nativeID && !inst.nativeID.startsWith('uf_') ? inst.nativeID : undefined);
|
|
239
|
+
if (nextManual) inst.manualId = nextManual;
|
|
240
|
+
else delete inst.manualId;
|
|
241
|
+
}
|
|
242
|
+
this.refreshManualIndexes(inst, prevIds);
|
|
243
|
+
this.recomputeAmbiguity(inst.registryKey, inst.templatePath, inst.manualId);
|
|
244
|
+
this.notify();
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
getInstance(instanceId: string): AutoAnchorInstance | undefined {
|
|
248
|
+
return this.instances.get(instanceId);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
getInstancesByRegistryKey(key: string): AutoAnchorInstance[] {
|
|
252
|
+
return this.idsToInstances(this.byRegistryKey.get(key));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
getInstancesByManualId(id: string): AutoAnchorInstance[] {
|
|
256
|
+
return this.idsToInstances(this.byManualId.get(id));
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
getInstancesByTemplatePath(path: string): AutoAnchorInstance[] {
|
|
260
|
+
return this.idsToInstances(this.byTemplatePath.get(path));
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
allInstances(): AutoAnchorInstance[] {
|
|
264
|
+
return Array.from(this.instances.values());
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
orderedSiblingsIncludingSelf(instanceId: string): AutoAnchorInstance[] {
|
|
268
|
+
const inst = this.instances.get(instanceId);
|
|
269
|
+
if (!inst) return [];
|
|
270
|
+
if (!inst.parentInstanceId) {
|
|
271
|
+
const group = siblingGroupKey(inst);
|
|
272
|
+
return this.allInstances()
|
|
273
|
+
.filter((i) => !i.parentInstanceId && siblingGroupKey(i) === group)
|
|
274
|
+
.sort((a, b) => (a.siblingIndex ?? 0) - (b.siblingIndex ?? 0));
|
|
275
|
+
}
|
|
276
|
+
const parent = this.instances.get(inst.parentInstanceId);
|
|
277
|
+
if (!parent) return [inst];
|
|
278
|
+
return parent.childInstanceIds
|
|
279
|
+
.map((id) => this.instances.get(id))
|
|
280
|
+
.filter((i): i is AutoAnchorInstance => !!i)
|
|
281
|
+
.sort((a, b) => (a.siblingIndex ?? 0) - (b.siblingIndex ?? 0));
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
siblingWindow(
|
|
285
|
+
instanceId: string,
|
|
286
|
+
windowSize = 2,
|
|
287
|
+
): { previous: SiblingDescriptor[]; next: SiblingDescriptor[] } {
|
|
288
|
+
const ordered = this.orderedSiblingsIncludingSelf(instanceId);
|
|
289
|
+
const idx = ordered.findIndex((i) => i.instanceId === instanceId);
|
|
290
|
+
if (idx < 0) return { previous: [], next: [] };
|
|
291
|
+
const toDesc = (i: AutoAnchorInstance): SiblingDescriptor => ({
|
|
292
|
+
kind: i.kind,
|
|
293
|
+
role: i.role,
|
|
294
|
+
...(i.childText ? { text: i.childText } : {}),
|
|
295
|
+
...(i.testID ? { testID: i.testID } : {}),
|
|
296
|
+
...(i.userflowId ? { userflowId: i.userflowId } : {}),
|
|
297
|
+
});
|
|
298
|
+
return {
|
|
299
|
+
previous: ordered.slice(Math.max(0, idx - windowSize), idx).map(toDesc),
|
|
300
|
+
next: ordered.slice(idx + 1, idx + 1 + windowSize).map(toDesc),
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
subscribe(listener: AutoAnchorListener): () => void {
|
|
305
|
+
this.listeners.add(listener);
|
|
306
|
+
return () => {
|
|
307
|
+
this.listeners.delete(listener);
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
isAmbiguousKey(key: string): boolean {
|
|
312
|
+
const byKey = this.getInstancesByRegistryKey(key);
|
|
313
|
+
if (byKey.length > 0) return byKey.some((i) => i.ambiguous);
|
|
314
|
+
const byManual = this.getInstancesByManualId(key);
|
|
315
|
+
return byManual.length > 1 || byManual.some((i) => i.ambiguous);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/** Test helper — drop every instance and reset ids. */
|
|
319
|
+
clear(): void {
|
|
320
|
+
this.instances.clear();
|
|
321
|
+
this.byRegistryKey.clear();
|
|
322
|
+
this.byManualId.clear();
|
|
323
|
+
this.byTemplatePath.clear();
|
|
324
|
+
this.notifyScheduled = false;
|
|
325
|
+
nextInstanceSeq = 1;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
private unregisterInstance(instanceId: string): void {
|
|
329
|
+
const inst = this.instances.get(instanceId);
|
|
330
|
+
if (!inst) return;
|
|
331
|
+
|
|
332
|
+
if (inst.parentInstanceId) {
|
|
333
|
+
const parent = this.instances.get(inst.parentInstanceId);
|
|
334
|
+
if (parent) {
|
|
335
|
+
parent.childInstanceIds = parent.childInstanceIds.filter((id) => id !== instanceId);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
for (const childId of [...inst.childInstanceIds]) {
|
|
339
|
+
const child = this.instances.get(childId);
|
|
340
|
+
if (child) delete child.parentInstanceId;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
this.instances.delete(instanceId);
|
|
344
|
+
this.removeIndex(this.byRegistryKey, inst.registryKey, instanceId);
|
|
345
|
+
this.removeIndex(this.byTemplatePath, inst.templatePath, instanceId);
|
|
346
|
+
if (inst.manualId) this.removeIndex(this.byManualId, inst.manualId, instanceId);
|
|
347
|
+
if (inst.userflowId) this.removeIndex(this.byManualId, inst.userflowId, instanceId);
|
|
348
|
+
if (inst.testID) this.removeIndex(this.byManualId, inst.testID, instanceId);
|
|
349
|
+
|
|
350
|
+
this.recomputeAmbiguity(inst.registryKey, inst.templatePath, inst.manualId);
|
|
351
|
+
this.notify();
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
private refreshManualIndexes(
|
|
355
|
+
inst: AutoAnchorInstance,
|
|
356
|
+
prev: {
|
|
357
|
+
manualId?: string | undefined;
|
|
358
|
+
userflowId?: string | undefined;
|
|
359
|
+
testID?: string | undefined;
|
|
360
|
+
},
|
|
361
|
+
): void {
|
|
362
|
+
const prevKeys = new Set(
|
|
363
|
+
[prev.manualId, prev.userflowId, prev.testID].filter((k): k is string => !!k),
|
|
364
|
+
);
|
|
365
|
+
const nextKeys = new Set(
|
|
366
|
+
[inst.manualId, inst.userflowId, inst.testID].filter((k): k is string => !!k),
|
|
367
|
+
);
|
|
368
|
+
for (const key of prevKeys) {
|
|
369
|
+
if (!nextKeys.has(key)) this.removeIndex(this.byManualId, key, inst.instanceId);
|
|
370
|
+
}
|
|
371
|
+
for (const key of nextKeys) {
|
|
372
|
+
if (!prevKeys.has(key)) this.addIndex(this.byManualId, key, inst.instanceId);
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
private recomputeAmbiguity(registryKey: string, templatePath: string, manualId?: string): void {
|
|
377
|
+
const mark = (list: AutoAnchorInstance[]) => {
|
|
378
|
+
const ambiguous = list.length > 1 && list.every((i) => !i.manualId);
|
|
379
|
+
for (const i of list) {
|
|
380
|
+
i.ambiguous =
|
|
381
|
+
ambiguous || (i.manualId ? this.getInstancesByManualId(i.manualId).length > 1 : false);
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
mark(this.getInstancesByRegistryKey(registryKey));
|
|
385
|
+
mark(this.getInstancesByTemplatePath(templatePath));
|
|
386
|
+
if (manualId) {
|
|
387
|
+
const list = this.getInstancesByManualId(manualId);
|
|
388
|
+
for (const i of list) i.ambiguous = list.length > 1;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
private addIndex(map: Map<string, Set<string>>, key: string, instanceId: string): void {
|
|
393
|
+
let set = map.get(key);
|
|
394
|
+
if (!set) {
|
|
395
|
+
set = new Set();
|
|
396
|
+
map.set(key, set);
|
|
397
|
+
}
|
|
398
|
+
set.add(instanceId);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
private removeIndex(map: Map<string, Set<string>>, key: string, instanceId: string): void {
|
|
402
|
+
const set = map.get(key);
|
|
403
|
+
if (!set) return;
|
|
404
|
+
set.delete(instanceId);
|
|
405
|
+
if (set.size === 0) map.delete(key);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
private idsToInstances(set: Set<string> | undefined): AutoAnchorInstance[] {
|
|
409
|
+
if (!set) return [];
|
|
410
|
+
const out: AutoAnchorInstance[] = [];
|
|
411
|
+
for (const id of set) {
|
|
412
|
+
const inst = this.instances.get(id);
|
|
413
|
+
if (inst) out.push(inst);
|
|
414
|
+
}
|
|
415
|
+
return out;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
private notify(): void {
|
|
419
|
+
if (this.notifyScheduled) return;
|
|
420
|
+
this.notifyScheduled = true;
|
|
421
|
+
const flush = () => {
|
|
422
|
+
this.notifyScheduled = false;
|
|
423
|
+
for (const l of this.listeners) {
|
|
424
|
+
try {
|
|
425
|
+
l();
|
|
426
|
+
} catch {
|
|
427
|
+
// listeners are infrastructure; never propagate
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
if (typeof queueMicrotask === 'function') {
|
|
432
|
+
queueMicrotask(flush);
|
|
433
|
+
} else {
|
|
434
|
+
void Promise.resolve().then(flush);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export const autoAnchorRegistry = new AutoAnchorRegistry();
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import type { NativeScrollEvent, NativeSyntheticEvent, ScrollView, View } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type { Rect } from '../surfaces/tooltip/inferTooltipPlacement';
|
|
4
|
+
|
|
5
|
+
/** Padding applied when scrolling a target into the visible region of a container. */
|
|
6
|
+
const INTO_VIEW_PADDING = 24;
|
|
7
|
+
|
|
8
|
+
export interface ScrollContainerHost {
|
|
9
|
+
measureInWindow: (
|
|
10
|
+
callback: (x: number, y: number, width: number, height: number) => void,
|
|
11
|
+
) => void;
|
|
12
|
+
getContentOffset: () => { x: number; y: number };
|
|
13
|
+
scrollTo: (options: { x?: number; y?: number; animated?: boolean }) => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type Listener = () => void;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Registry of host {@link ScrollView}s used as an explicit override when
|
|
20
|
+
* scrolling tooltip anchors into view. Prefer automatic fiber discovery for
|
|
21
|
+
* `testID` anchors; register here for scroll libraries the walk cannot drive.
|
|
22
|
+
*/
|
|
23
|
+
export class ScrollContainerRegistry {
|
|
24
|
+
private readonly containers = new Set<ScrollContainerHost>();
|
|
25
|
+
private readonly listeners = new Set<Listener>();
|
|
26
|
+
|
|
27
|
+
register(host: ScrollContainerHost): void {
|
|
28
|
+
this.containers.add(host);
|
|
29
|
+
this.emit();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
unregister(host: ScrollContainerHost): void {
|
|
33
|
+
this.containers.delete(host);
|
|
34
|
+
this.emit();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Snapshot of registered containers (most recently registered last). */
|
|
38
|
+
list(): ScrollContainerHost[] {
|
|
39
|
+
return [...this.containers];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Scroll the first registered container that can bring `target` into its
|
|
44
|
+
* visible window region. Best-effort — no-op when nothing is registered.
|
|
45
|
+
*/
|
|
46
|
+
scrollTargetIntoView(target: Rect): void {
|
|
47
|
+
for (const host of this.containers) {
|
|
48
|
+
host.measureInWindow((x, y, width, height) => {
|
|
49
|
+
if (width <= 0 || height <= 0) return;
|
|
50
|
+
|
|
51
|
+
const offset = host.getContentOffset();
|
|
52
|
+
const targetContentY = offset.y + (target.y - y);
|
|
53
|
+
let nextY: number | null = null;
|
|
54
|
+
|
|
55
|
+
if (target.y < y + INTO_VIEW_PADDING) {
|
|
56
|
+
nextY = Math.max(0, targetContentY - INTO_VIEW_PADDING);
|
|
57
|
+
} else if (target.y + target.height > y + height - INTO_VIEW_PADDING) {
|
|
58
|
+
nextY = Math.max(0, targetContentY + target.height - height + INTO_VIEW_PADDING);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (nextY == null || Math.abs(nextY - offset.y) < 1) return;
|
|
62
|
+
host.scrollTo({ y: nextY, animated: true });
|
|
63
|
+
});
|
|
64
|
+
// Prefer the first container for MVP; hosts typically have one root ScrollView.
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
subscribe(listener: Listener): () => void {
|
|
70
|
+
this.listeners.add(listener);
|
|
71
|
+
return () => {
|
|
72
|
+
this.listeners.delete(listener);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
clear(): void {
|
|
77
|
+
this.containers.clear();
|
|
78
|
+
this.emit();
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
private emit(): void {
|
|
82
|
+
for (const listener of this.listeners) {
|
|
83
|
+
listener();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Module singleton used by {@link useUserflowScrollContainer} and TooltipSurface. */
|
|
89
|
+
export const scrollContainerRegistry = new ScrollContainerRegistry();
|
|
90
|
+
|
|
91
|
+
/** Build a host from a live ScrollView + tracked content offset. */
|
|
92
|
+
export function createScrollContainerHost(
|
|
93
|
+
node: ScrollView,
|
|
94
|
+
getContentOffset: () => { x: number; y: number },
|
|
95
|
+
): ScrollContainerHost {
|
|
96
|
+
const measurable = node as ScrollView & View;
|
|
97
|
+
return {
|
|
98
|
+
measureInWindow: (callback) => {
|
|
99
|
+
measurable.measureInWindow(callback);
|
|
100
|
+
},
|
|
101
|
+
getContentOffset,
|
|
102
|
+
scrollTo: (options) => {
|
|
103
|
+
node.scrollTo(options);
|
|
104
|
+
},
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type ScrollContainerScrollHandler = (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { anchorRegistry } from './AnchorRegistry';
|
|
2
|
+
import { fiberScanRoot } from './fiber/FiberScanRoot';
|
|
3
|
+
|
|
4
|
+
type Listener = () => void;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Change signal for ELEMENT client conditions.
|
|
8
|
+
*
|
|
9
|
+
* Fiber-resolved anchors (testID / nativeID / accessibilityLabel) do not emit
|
|
10
|
+
* registry events, so we combine:
|
|
11
|
+
* - {@link anchorRegistry} mount/unmount
|
|
12
|
+
* - {@link fiberScanRoot} mount/unmount
|
|
13
|
+
* - screen-change notifications
|
|
14
|
+
* - a slow interval that only runs while at least one listener is subscribed
|
|
15
|
+
*/
|
|
16
|
+
class AnchorChangeTicker {
|
|
17
|
+
private readonly listeners = new Set<Listener>();
|
|
18
|
+
private intervalHandle: ReturnType<typeof setInterval> | null = null;
|
|
19
|
+
private unsubRegistry: (() => void) | null = null;
|
|
20
|
+
private unsubScan: (() => void) | null = null;
|
|
21
|
+
|
|
22
|
+
/** Poll interval while ELEMENT conditions are tracked (ms). */
|
|
23
|
+
static readonly INTERVAL_MS = 1000;
|
|
24
|
+
|
|
25
|
+
subscribe(listener: Listener): () => void {
|
|
26
|
+
const wasEmpty = this.listeners.size === 0;
|
|
27
|
+
this.listeners.add(listener);
|
|
28
|
+
if (wasEmpty) {
|
|
29
|
+
this.start();
|
|
30
|
+
}
|
|
31
|
+
return () => {
|
|
32
|
+
this.listeners.delete(listener);
|
|
33
|
+
if (this.listeners.size === 0) {
|
|
34
|
+
this.stop();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Push a change from outside (e.g. screen navigation). */
|
|
40
|
+
notify(): void {
|
|
41
|
+
this.emit();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** Test helper. */
|
|
45
|
+
resetForTests(): void {
|
|
46
|
+
this.stop();
|
|
47
|
+
this.listeners.clear();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
private start(): void {
|
|
51
|
+
if (!this.unsubRegistry) {
|
|
52
|
+
this.unsubRegistry = anchorRegistry.subscribe(() => this.emit());
|
|
53
|
+
}
|
|
54
|
+
if (!this.unsubScan) {
|
|
55
|
+
this.unsubScan = fiberScanRoot.subscribe(() => this.emit());
|
|
56
|
+
}
|
|
57
|
+
if (!this.intervalHandle) {
|
|
58
|
+
this.intervalHandle = setInterval(() => this.emit(), AnchorChangeTicker.INTERVAL_MS);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
private stop(): void {
|
|
63
|
+
if (this.intervalHandle) {
|
|
64
|
+
clearInterval(this.intervalHandle);
|
|
65
|
+
this.intervalHandle = null;
|
|
66
|
+
}
|
|
67
|
+
if (this.unsubRegistry) {
|
|
68
|
+
this.unsubRegistry();
|
|
69
|
+
this.unsubRegistry = null;
|
|
70
|
+
}
|
|
71
|
+
if (this.unsubScan) {
|
|
72
|
+
this.unsubScan();
|
|
73
|
+
this.unsubScan = null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private emit(): void {
|
|
78
|
+
for (const listener of this.listeners) {
|
|
79
|
+
listener();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const anchorChangeTicker = new AnchorChangeTicker();
|