@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,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Dimensions, StyleSheet, View } from 'react-native';
|
|
5
|
+
import { ABSOLUTE_FILL } from "../absoluteFill.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Four-block dimmed cutout around the padded target (web tooltip backdrop).
|
|
9
|
+
*
|
|
10
|
+
* Dim bands use `pointerEvents="none"` so touches reach the app — React Native
|
|
11
|
+
* cannot block taps while allowing scroll the way web's `mousedown`-only
|
|
12
|
+
* swallow does. When `targetBlocked`, only the hole (target) is covered with a
|
|
13
|
+
* transparent `pointerEvents="auto"` layer.
|
|
14
|
+
*
|
|
15
|
+
* MVP note: each block uses its own translucent opacity. That matches non-overlapping
|
|
16
|
+
* tiles well, but can look slightly uneven vs web’s single shadow-hole when other
|
|
17
|
+
* translucent overlays stack. Acceptable for Phase 3; a single masked layer can come later.
|
|
18
|
+
*/
|
|
19
|
+
export function TooltipCutout({
|
|
20
|
+
targetRect,
|
|
21
|
+
backdropColor,
|
|
22
|
+
backdropOpacity,
|
|
23
|
+
targetBlocked
|
|
24
|
+
}) {
|
|
25
|
+
const {
|
|
26
|
+
width: sw,
|
|
27
|
+
height: sh
|
|
28
|
+
} = Dimensions.get('window');
|
|
29
|
+
const {
|
|
30
|
+
top,
|
|
31
|
+
left,
|
|
32
|
+
width,
|
|
33
|
+
height
|
|
34
|
+
} = targetRect;
|
|
35
|
+
const right = left + width;
|
|
36
|
+
const bottom = top + height;
|
|
37
|
+
const blockStyle = {
|
|
38
|
+
backgroundColor: backdropColor,
|
|
39
|
+
opacity: backdropOpacity
|
|
40
|
+
};
|
|
41
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
42
|
+
style: ABSOLUTE_FILL,
|
|
43
|
+
pointerEvents: "box-none",
|
|
44
|
+
testID: "userflow-tooltip-cutout",
|
|
45
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
46
|
+
pointerEvents: "none",
|
|
47
|
+
testID: "userflow-tooltip-cutout-top",
|
|
48
|
+
style: [styles.block, blockStyle, {
|
|
49
|
+
top: 0,
|
|
50
|
+
left: 0,
|
|
51
|
+
width: sw,
|
|
52
|
+
height: Math.max(0, top)
|
|
53
|
+
}]
|
|
54
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
55
|
+
pointerEvents: "none",
|
|
56
|
+
testID: "userflow-tooltip-cutout-left",
|
|
57
|
+
style: [styles.block, blockStyle, {
|
|
58
|
+
top: Math.max(0, top),
|
|
59
|
+
left: 0,
|
|
60
|
+
width: Math.max(0, left),
|
|
61
|
+
height: Math.max(0, height)
|
|
62
|
+
}]
|
|
63
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
64
|
+
pointerEvents: "none",
|
|
65
|
+
testID: "userflow-tooltip-cutout-right",
|
|
66
|
+
style: [styles.block, blockStyle, {
|
|
67
|
+
top: Math.max(0, top),
|
|
68
|
+
left: Math.max(0, right),
|
|
69
|
+
width: Math.max(0, sw - right),
|
|
70
|
+
height: Math.max(0, height)
|
|
71
|
+
}]
|
|
72
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
73
|
+
pointerEvents: "none",
|
|
74
|
+
testID: "userflow-tooltip-cutout-bottom",
|
|
75
|
+
style: [styles.block, blockStyle, {
|
|
76
|
+
top: Math.max(0, bottom),
|
|
77
|
+
left: 0,
|
|
78
|
+
width: sw,
|
|
79
|
+
height: Math.max(0, sh - bottom)
|
|
80
|
+
}]
|
|
81
|
+
}), targetBlocked ? /*#__PURE__*/_jsx(View, {
|
|
82
|
+
pointerEvents: "auto",
|
|
83
|
+
testID: "userflow-tooltip-target-block",
|
|
84
|
+
style: [styles.block, {
|
|
85
|
+
top,
|
|
86
|
+
left,
|
|
87
|
+
width: Math.max(0, width),
|
|
88
|
+
height: Math.max(0, height)
|
|
89
|
+
}]
|
|
90
|
+
}) : null]
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const styles = StyleSheet.create({
|
|
94
|
+
block: {
|
|
95
|
+
position: 'absolute'
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=TooltipCutout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Dimensions","StyleSheet","View","ABSOLUTE_FILL","jsx","_jsx","jsxs","_jsxs","TooltipCutout","targetRect","backdropColor","backdropOpacity","targetBlocked","width","sw","height","sh","get","top","left","right","bottom","blockStyle","backgroundColor","opacity","style","pointerEvents","testID","children","styles","block","Math","max","create","position"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/TooltipCutout.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE3D,SAASC,aAAa,QAAQ,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAoBhD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAC;EAC5BC,UAAU;EACVC,aAAa;EACbC,eAAe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M,GAAG5B,UAAU,CAACgC,MAAM,CAAC;EAC/BH,KAAK,EAAE;IACLI,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { tooltipNotchDiamondSide } from "./computeTooltipPosition.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export { tooltipNotchDiamondSide };
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Tooltip arrow as a rotated square half-hidden under the opaque card fill.
|
|
11
|
+
*
|
|
12
|
+
* Web uses a CSS border-triangle under `filter: drop-shadow`, so the notch and
|
|
13
|
+
* card share one silhouette. RN box-shadow can't follow alpha, and border
|
|
14
|
+
* triangles render poorly — a diamond behind the card reads as a real tooltip
|
|
15
|
+
* pointer and joins the fill without a seam.
|
|
16
|
+
*/
|
|
17
|
+
export function TooltipNotch({
|
|
18
|
+
notchSize,
|
|
19
|
+
notchColor,
|
|
20
|
+
inset = 0,
|
|
21
|
+
style,
|
|
22
|
+
top,
|
|
23
|
+
bottom,
|
|
24
|
+
left,
|
|
25
|
+
right,
|
|
26
|
+
testID = 'userflow-tooltip-notch'
|
|
27
|
+
}) {
|
|
28
|
+
const side = Math.max(0, tooltipNotchDiamondSide(notchSize) - inset * 2);
|
|
29
|
+
return /*#__PURE__*/_jsx(View, {
|
|
30
|
+
pointerEvents: "none",
|
|
31
|
+
testID: testID,
|
|
32
|
+
style: [styles.notch, {
|
|
33
|
+
width: side,
|
|
34
|
+
height: side,
|
|
35
|
+
backgroundColor: notchColor
|
|
36
|
+
}, top !== undefined ? {
|
|
37
|
+
top: top + inset
|
|
38
|
+
} : null, bottom !== undefined ? {
|
|
39
|
+
bottom: bottom + inset
|
|
40
|
+
} : null, left !== undefined ? {
|
|
41
|
+
left: left + inset
|
|
42
|
+
} : null, right !== undefined ? {
|
|
43
|
+
right: right + inset
|
|
44
|
+
} : null, style]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
notch: {
|
|
49
|
+
position: 'absolute',
|
|
50
|
+
transform: [{
|
|
51
|
+
rotate: '45deg'
|
|
52
|
+
}]
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=TooltipNotch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","tooltipNotchDiamondSide","jsx","_jsx","TooltipNotch","notchSize","notchColor","inset","style","top","bottom","left","right","testID","side","Math","max","pointerEvents","styles","notch","width","height","backgroundColor","undefined","create","position","transform","rotate"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/TooltipNotch.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAwC,cAAc;AAE/E,SAASC,uBAAuB,QAAQ,6BAA0B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAkBnE,SAASF,uBAAuB;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,YAAYA,CAAC;EAC3BC,SAAS;EACTC,UAAU;EACVC,KAAK,GAAG,CAAC;EACTC,KAAK;EACLC,GAAG;EACHC,MAAM;EACNC,IAAI;EACJC,KAAK;EACLC,MAAM,GAAG;AACQ,CAAC,EAAsB;EACxC,MAAMC,IAAI,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEf,uBAAuB,CAACI,SAAS,CAAC,GAAGE,KAAK,GAAG,CAAC,CAAC;EAExE,oBACEJ,IAAA,CAACH,IAAI;IACHiB,aAAa,EAAC,MAAM;IACpBJ,MAAM,EAAEA,MAAO;IACfL,KAAK,EAAE,CACLU,MAAM,CAACC,KAAK,EACZ;MAAEC,KAAK,EAAEN,IAAI;MAAEO,MAAM,EAAEP,IAAI;MAAEQ,eAAe,EAAEhB;IAAW,CAAC,EAC1DG,GAAG,KAAKc,SAAS,GAAG;MAAEd,GAAG,EAAEA,GAAG,GAAGF;IAAM,CAAC,GAAG,IAAI,EAC/CG,MAAM,KAAKa,SAAS,GAAG;MAAEb,MAAM,EAAEA,MAAM,GAAGH;IAAM,CAAC,GAAG,IAAI,EACxDI,IAAI,KAAKY,SAAS,GAAG;MAAEZ,IAAI,EAAEA,IAAI,GAAGJ;IAAM,CAAC,GAAG,IAAI,EAClDK,KAAK,KAAKW,SAAS,GAAG;MAAEX,KAAK,EAAEA,KAAK,GAAGL;IAAM,CAAC,GAAG,IAAI,EACrDC,KAAK;EACL,CACH,CAAC;AAEN;AAEA,MAAMU,MAAM,GAAGnB,UAAU,CAACyB,MAAM,CAAC;EAC/BL,KAAK,EAAE;IACLM,QAAQ,EAAE,UAAU;IACpBC,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAQ,CAAC;EACjC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { VIEWPORT_PADDING } from "./inferTooltipPlacement.js";
|
|
4
|
+
/**
|
|
5
|
+
* Side length of the axis-aligned square that, when rotated 45°, yields a
|
|
6
|
+
* tip that protrudes `notchSize` beyond the card edge (half-diagonal = N).
|
|
7
|
+
*/
|
|
8
|
+
export function tooltipNotchDiamondSide(notchSize) {
|
|
9
|
+
return notchSize * Math.SQRT2;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* TOOLTIP card + notch layout. Port of FlowChrome.tsx placement/clamp.
|
|
14
|
+
*
|
|
15
|
+
* The notch is a square of side `N√2` rotated 45° whose center sits on the card
|
|
16
|
+
* edge, so a tip of length `N` points at the target. When the card has a border,
|
|
17
|
+
* pull the diamond toward the card by `borderWidth` so the tip still clears the
|
|
18
|
+
* stroke without leaving a seam.
|
|
19
|
+
*/
|
|
20
|
+
export function computeTooltipPosition(opts) {
|
|
21
|
+
const {
|
|
22
|
+
target,
|
|
23
|
+
bubbleSize,
|
|
24
|
+
placement,
|
|
25
|
+
notchSize,
|
|
26
|
+
backdropPadding = 0,
|
|
27
|
+
windowSize,
|
|
28
|
+
bubbleBorderRadius,
|
|
29
|
+
bubbleBorderWidth = 0,
|
|
30
|
+
viewportPadding = VIEWPORT_PADDING
|
|
31
|
+
} = opts;
|
|
32
|
+
const {
|
|
33
|
+
width: cw,
|
|
34
|
+
height: ch
|
|
35
|
+
} = windowSize;
|
|
36
|
+
const {
|
|
37
|
+
width: bw,
|
|
38
|
+
height: bh
|
|
39
|
+
} = bubbleSize;
|
|
40
|
+
const targetRect = {
|
|
41
|
+
top: target.y - backdropPadding,
|
|
42
|
+
right: target.x + target.width + backdropPadding,
|
|
43
|
+
bottom: target.y + target.height + backdropPadding,
|
|
44
|
+
left: target.x - backdropPadding,
|
|
45
|
+
width: target.width + backdropPadding * 2,
|
|
46
|
+
height: target.height + backdropPadding * 2
|
|
47
|
+
};
|
|
48
|
+
let cx = 0;
|
|
49
|
+
let cy = 0;
|
|
50
|
+
const notch = {};
|
|
51
|
+
const side = tooltipNotchDiamondSide(notchSize);
|
|
52
|
+
const half = side / 2;
|
|
53
|
+
const edgeOffset = -half + Math.max(0, bubbleBorderWidth) + 1;
|
|
54
|
+
if (placement === 'BELOW' || placement === 'ABOVE') {
|
|
55
|
+
cx = targetRect.left + targetRect.width / 2 - bw / 2;
|
|
56
|
+
cx = Math.max(viewportPadding, Math.min(cw - bw - viewportPadding, cx));
|
|
57
|
+
const rawLeft = targetRect.left + targetRect.width / 2 - half - cx;
|
|
58
|
+
notch.left = Math.max(bubbleBorderRadius, Math.min(bw - bubbleBorderRadius - side, rawLeft));
|
|
59
|
+
if (placement === 'BELOW') {
|
|
60
|
+
cy = targetRect.bottom + notchSize;
|
|
61
|
+
cy = Math.max(notchSize, Math.min(ch - bh, cy));
|
|
62
|
+
notch.top = edgeOffset;
|
|
63
|
+
} else {
|
|
64
|
+
cy = targetRect.top - notchSize - bh;
|
|
65
|
+
cy = Math.max(0, Math.min(ch - bh - notchSize, cy));
|
|
66
|
+
notch.bottom = edgeOffset;
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
cy = targetRect.top + targetRect.height / 2 - bh / 2;
|
|
70
|
+
cy = Math.max(viewportPadding, Math.min(ch - bh - viewportPadding, cy));
|
|
71
|
+
const rawTop = targetRect.top + targetRect.height / 2 - half - cy;
|
|
72
|
+
notch.top = Math.max(bubbleBorderRadius, Math.min(bh - bubbleBorderRadius - side, rawTop));
|
|
73
|
+
if (placement === 'RIGHT') {
|
|
74
|
+
cx = targetRect.right + notchSize;
|
|
75
|
+
cx = Math.max(notchSize, Math.min(cw - bw, cx));
|
|
76
|
+
notch.left = edgeOffset;
|
|
77
|
+
} else {
|
|
78
|
+
cx = targetRect.left - notchSize - bw;
|
|
79
|
+
cx = Math.max(0, Math.min(cw - bw - notchSize, cx));
|
|
80
|
+
notch.right = edgeOffset;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
cardPosition: {
|
|
85
|
+
x: cx,
|
|
86
|
+
y: cy
|
|
87
|
+
},
|
|
88
|
+
notchPosition: notch,
|
|
89
|
+
targetHighlightRect: {
|
|
90
|
+
top: target.y - backdropPadding,
|
|
91
|
+
left: target.x - backdropPadding,
|
|
92
|
+
width: target.width + backdropPadding * 2,
|
|
93
|
+
height: target.height + backdropPadding * 2
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=computeTooltipPosition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["VIEWPORT_PADDING","tooltipNotchDiamondSide","notchSize","Math","SQRT2","computeTooltipPosition","opts","target","bubbleSize","placement","backdropPadding","windowSize","bubbleBorderRadius","bubbleBorderWidth","viewportPadding","width","cw","height","ch","bw","bh","targetRect","top","y","right","x","bottom","left","cx","cy","notch","side","half","edgeOffset","max","min","rawLeft","rawTop","cardPosition","notchPosition","targetHighlightRect"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/computeTooltipPosition.ts"],"mappings":";;AAOA,SAASA,gBAAgB,QAAQ,4BAAyB;AAgB1D;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAACC,SAAiB,EAAU;EACjE,OAAOA,SAAS,GAAGC,IAAI,CAACC,KAAK;AAC/B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAACC,IAUtC,EAAiB;EAChB,MAAM;IACJC,MAAM;IACNC,UAAU;IACVC,SAAS;IACTP,SAAS;IACTQ,eAAe,GAAG,CAAC;IACnBC,UAAU;IACVC,kBAAkB;IAClBC,iBAAiB,GAAG,CAAC;IACrBC,eAAe,GAAGd;EACpB,CAAC,GAAGM,IAAI;EACR,MAAM;IAAES,KAAK,EAAEC,EAAE;IAAEC,MAAM,EAAEC;EAAG,CAAC,GAAGP,UAAU;EAC5C,MAAM;IAAEI,KAAK,EAAEI,EAAE;IAAEF,MAAM,EAAEG;EAAG,CAAC,GAAGZ,UAAU;EAE5C,MAAMa,UAAU,GAAG;IACjBC,GAAG,EAAEf,MAAM,CAACgB,CAAC,GAAGb,eAAe;IAC/Bc,KAAK,EAAEjB,MAAM,CAACkB,CAAC,GAAGlB,MAAM,CAACQ,KAAK,GAAGL,eAAe;IAChDgB,MAAM,EAAEnB,MAAM,CAACgB,CAAC,GAAGhB,MAAM,CAACU,MAAM,GAAGP,eAAe;IAClDiB,IAAI,EAAEpB,MAAM,CAACkB,CAAC,GAAGf,eAAe;IAChCK,KAAK,EAAER,MAAM,CAACQ,KAAK,GAAGL,eAAe,GAAG,CAAC;IACzCO,MAAM,EAAEV,MAAM,CAACU,MAAM,GAAGP,eAAe,GAAG;EAC5C,CAAC;EAED,IAAIkB,EAAE,GAAG,CAAC;EACV,IAAIC,EAAE,GAAG,CAA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S,UAAU;IAC1B;EACF;EAEA,OAAO;IACLK,YAAY,EAAE;MAAEb,CAAC,EAAEG,EAAE;MAAEL,CAAC,EAAEM;IAAG,CAAC;IAC9BU,aAAa,EAAET,KAAK;IACpBU,mBAAmB,EAAE;MACnBlB,GAAG,EAAEf,MAAM,CAACgB,CAAC,GAAGb,eAAe;MAC/BiB,IAAI,EAAEpB,MAAM,CAACkB,CAAC,GAAGf,eAAe;MAChCK,KAAK,EAAER,MAAM,CAACQ,KAAK,GAAGL,eAAe,GAAG,CAAC;MACzCO,MAAM,EAAEV,MAAM,CAACU,MAAM,GAAGP,eAAe,GAAG;IAC5C;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Placement sides — string union so Jest protocol mocks stay empty. */
|
|
4
|
+
|
|
5
|
+
import { TOOLTIP_VIEWPORT_PADDING } from "../resolveTooltipLayout.js";
|
|
6
|
+
export const VIEWPORT_PADDING = TOOLTIP_VIEWPORT_PADDING;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Port of web FlowChrome `inferTooltipPlacement` with distance-sorted flip
|
|
10
|
+
* (not the prototype's fixed BELOW→ABOVE→RIGHT→LEFT priority).
|
|
11
|
+
*/
|
|
12
|
+
export function inferTooltipPlacement({
|
|
13
|
+
target,
|
|
14
|
+
bubbleSize,
|
|
15
|
+
notchSize,
|
|
16
|
+
windowSize,
|
|
17
|
+
currentPlacement,
|
|
18
|
+
desiredPlacement
|
|
19
|
+
}) {
|
|
20
|
+
const {
|
|
21
|
+
width: cw,
|
|
22
|
+
height: ch
|
|
23
|
+
} = windowSize;
|
|
24
|
+
const {
|
|
25
|
+
width: bw,
|
|
26
|
+
height: bh
|
|
27
|
+
} = bubbleSize;
|
|
28
|
+
const clip = {
|
|
29
|
+
top: 0,
|
|
30
|
+
right: cw,
|
|
31
|
+
bottom: ch,
|
|
32
|
+
left: 0
|
|
33
|
+
};
|
|
34
|
+
const targetRect = {
|
|
35
|
+
top: target.y,
|
|
36
|
+
right: target.x + target.width,
|
|
37
|
+
bottom: target.y + target.height,
|
|
38
|
+
left: target.x,
|
|
39
|
+
width: target.width,
|
|
40
|
+
height: target.height
|
|
41
|
+
};
|
|
42
|
+
if (targetRect.bottom <= clip.top) {
|
|
43
|
+
return ch - clip.top > bh + notchSize ? 'BELOW' : 'ABOVE';
|
|
44
|
+
}
|
|
45
|
+
if (targetRect.top >= clip.bottom) {
|
|
46
|
+
return clip.bottom > bh + notchSize ? 'ABOVE' : 'BELOW';
|
|
47
|
+
}
|
|
48
|
+
if (targetRect.right <= clip.left) {
|
|
49
|
+
return cw - clip.left > bw + notchSize ? 'RIGHT' : 'LEFT';
|
|
50
|
+
}
|
|
51
|
+
if (targetRect.left >= clip.right) {
|
|
52
|
+
return clip.right > bw + notchSize ? 'LEFT' : 'RIGHT';
|
|
53
|
+
}
|
|
54
|
+
const fits = p => {
|
|
55
|
+
const midX = targetRect.left + targetRect.width / 2;
|
|
56
|
+
const midY = targetRect.top + targetRect.height / 2;
|
|
57
|
+
const midXIn = midX >= clip.left && midX <= clip.right;
|
|
58
|
+
const midYIn = midY >= clip.top && midY <= clip.bottom;
|
|
59
|
+
switch (p) {
|
|
60
|
+
case 'BELOW':
|
|
61
|
+
return ch - targetRect.bottom > bh + notchSize && midXIn;
|
|
62
|
+
case 'ABOVE':
|
|
63
|
+
return targetRect.top > bh + notchSize && midXIn;
|
|
64
|
+
case 'RIGHT':
|
|
65
|
+
return cw - targetRect.right > bw + notchSize && midYIn;
|
|
66
|
+
case 'LEFT':
|
|
67
|
+
return targetRect.left > bw + notchSize && midYIn;
|
|
68
|
+
default:
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
if (desiredPlacement && fits(desiredPlacement)) return desiredPlacement;
|
|
73
|
+
if (currentPlacement && fits(currentPlacement)) return currentPlacement;
|
|
74
|
+
const options = [{
|
|
75
|
+
placement: 'BELOW',
|
|
76
|
+
dist: targetRect.top
|
|
77
|
+
}, {
|
|
78
|
+
placement: 'ABOVE',
|
|
79
|
+
dist: ch - targetRect.bottom
|
|
80
|
+
}, {
|
|
81
|
+
placement: 'RIGHT',
|
|
82
|
+
dist: targetRect.left
|
|
83
|
+
}, {
|
|
84
|
+
placement: 'LEFT',
|
|
85
|
+
dist: cw - targetRect.right
|
|
86
|
+
}];
|
|
87
|
+
options.sort((a, b) => a.dist - b.dist);
|
|
88
|
+
for (const {
|
|
89
|
+
placement
|
|
90
|
+
} of options) {
|
|
91
|
+
if (fits(placement)) return placement;
|
|
92
|
+
}
|
|
93
|
+
return desiredPlacement ?? 'BELOW';
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=inferTooltipPlacement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TOOLTIP_VIEWPORT_PADDING","VIEWPORT_PADDING","inferTooltipPlacement","target","bubbleSize","notchSize","windowSize","currentPlacement","desiredPlacement","width","cw","height","ch","bw","bh","clip","top","right","bottom","left","targetRect","y","x","fits","p","midX","midY","midXIn","midYIn","options","placement","dist","sort","a","b"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/inferTooltipPlacement.ts"],"mappings":";;AAAA;;AAyBA,SAASA,wBAAwB,QAAQ,4BAAyB;AAElE,OAAO,MAAMC,gBAAgB,GAAGD,wBAAwB;;AAExD;AACA;AACA;AACA;AACA,OAAO,SAASE,qBAAqBA,CAAC;EACpCC,MAAM;EACNC,UAAU;EACVC,SAAS;EACTC,UAAU;EACVC,gBAAgB;EAChBC;AAQF,CAAC,EAAwB;EACvB,MAAM;IAAEC,KAAK,EAAEC,EAAE;IAAEC,MAAM,EAAEC;EAAG,CAAC,GAAGN,UAAU;EAC5C,MAAM;IAAEG,KAAK,EAAEI,EAAE;IAAEF,MAAM,EAAEG;EAAG,CAAC,GAAGV,UAAU;EAC5C,MAAMW,IAAI,GAAG;IAAEC,GAAG,EAAE,CA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AAEC,CAAC,KAAKD,CAAC,CAACF,IAAI,GAAGG,CAAC,CAACH,IAAI,CAAC;EACvC,KAAK,MAAM;IAAED;EAAU,CAAC,IAAID,OAAO,EAAE;IACnC,IAAIN,IAAI,CAACO,SAAS,CAAC,EAAE,OAAOA,SAAS;EACvC;EAEA,OAAOtB,gBAAgB,IAAI,OAAO;AACpC","ignoreList":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** Parse step `backdropPadding` (px). Web accepts CSS shorthand; MVP: first number. */
|
|
4
|
+
export function parseBackdropPadding(value) {
|
|
5
|
+
if (value == null || value === '') return 0;
|
|
6
|
+
const match = String(value).match(/-?\d+(\.\d+)?/);
|
|
7
|
+
if (!match) return 0;
|
|
8
|
+
const n = parseFloat(match[0]);
|
|
9
|
+
return Number.isFinite(n) ? Math.max(0, n) : 0;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=parseBackdropPadding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["parseBackdropPadding","value","match","String","n","parseFloat","Number","isFinite","Math","max"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/parseBackdropPadding.ts"],"mappings":";;AAAA;AACA,OAAO,SAASA,oBAAoBA,CAACC,KAAgC,EAAU;EAC7E,IAAIA,KAAK,IAAI,IAAI,IAAIA,KAAK,KAAK,EAAE,EAAE,OAAO,CAAC;EAC3C,MAAMC,KAAK,GAAGC,MAAM,CAACF,KAAK,CAAC,CAACC,KAAK,CAAC,eAAe,CAAC;EAClD,IAAI,CAACA,KAAK,EAAE,OAAO,CAAC;EACpB,MAAME,CAAC,GAAGC,UAAU,CAACH,KAAK,CAAC,CAAC,CAAC,CAAC;EAC9B,OAAOI,MAAM,CAACC,QAAQ,CAACH,CAAC,CAAC,GAAGI,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEL,CAAC,CAAC,GAAG,CAAC;AAChD","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/** True when two rects are identical (used to avoid redundant setState). */
|
|
4
|
+
export function rectsEqual(a, b) {
|
|
5
|
+
if (a === b) return true;
|
|
6
|
+
if (a == null || b == null) return false;
|
|
7
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Fully outside the window (no intersection). Kept for callers that need it. */
|
|
11
|
+
export function isRectOffScreen(rect, windowSize) {
|
|
12
|
+
return rect.y + rect.height <= 0 || rect.y >= windowSize.height || rect.x + rect.width <= 0 || rect.x >= windowSize.width;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Viewport used for scroll-into-view / visibility checks. May be smaller than
|
|
17
|
+
* the raw window (keyboard, safe-area, sticky chrome via scroll padding).
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* True when every edge of `rect` lies inside `viewport` (inclusive).
|
|
22
|
+
* Partially clipped targets return false — matching web `block: 'nearest'`
|
|
23
|
+
* scroll-into-view gating.
|
|
24
|
+
*/
|
|
25
|
+
export function isRectFullyVisible(rect, viewport) {
|
|
26
|
+
if (rect.width <= 0 || rect.height <= 0) return false;
|
|
27
|
+
if (viewport.width <= 0 || viewport.height <= 0) return false;
|
|
28
|
+
return rect.x >= viewport.x && rect.y >= viewport.y && rect.x + rect.width <= viewport.x + viewport.width && rect.y + rect.height <= viewport.y + viewport.height;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Build an effective viewport from window size + optional insets. */
|
|
32
|
+
export function buildEffectiveViewport(windowSize, insets) {
|
|
33
|
+
const top = Math.max(0, insets?.top ?? 0);
|
|
34
|
+
const right = Math.max(0, insets?.right ?? 0);
|
|
35
|
+
const bottom = Math.max(0, insets?.bottom ?? 0);
|
|
36
|
+
const left = Math.max(0, insets?.left ?? 0);
|
|
37
|
+
return {
|
|
38
|
+
x: left,
|
|
39
|
+
y: top,
|
|
40
|
+
width: Math.max(0, windowSize.width - left - right),
|
|
41
|
+
height: Math.max(0, windowSize.height - top - bottom)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=rect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["rectsEqual","a","b","x","y","width","height","isRectOffScreen","rect","windowSize","isRectFullyVisible","viewport","buildEffectiveViewport","insets","top","Math","max","right","bottom","left"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/rect.ts"],"mappings":";;AAEA;AACA,OAAO,SAASA,UAAUA,CAACC,CAAc,EAAEC,CAAc,EAAW;EAClE,IAAID,CAAC,KAAKC,CAAC,EAAE,OAAO,IAAI;EACxB,IAAID,CAAC,IAAI,IAAI,IAAIC,CAAC,IAAI,IAAI,EAAE,OAAO,KAAK;EACxC,OAAOD,CAAC,CAACE,CAAC,KAAKD,CAAC,CAACC,CAAC,IAAIF,CAAC,CAACG,CAAC,KAAKF,CAAC,CAACE,CAAC,IAAIH,CAAC,CAACI,KAAK,KAAKH,CAAC,CAACG,KAAK,IAAIJ,CAAC,CAACK,MAAM,KAAKJ,CAAC,CAACI,MAAM;AACnF;;AAEA;AACA,OAAO,SAASC,eAAeA,CAACC,IAAU,EAAEC,UAAsB,EAAW;EAC3E,OACED,IAAI,CAACJ,CAAC,GAAGI,IAAI,CAACF,MAAM,IAAI,CAAC,IACzBE,IAAI,CAACJ,CAAC,IAAIK,UAAU,CAACH,MAAM,IAC3BE,IAAI,CAACL,CAAC,GAAGK,IAAI,CAACH,KAAK,IAAI,CAAC,IACxBG,IAAI,CAACL,CAAC,IAAIM,UAAU,CAACJ,KAAK;AAE9B;;AAEA;AACA;AACA;AACA;;AAQA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,kBAAkBA,CAACF,IAAU,EAAEG,QAA2B,EAAW;EACnF,IAAIH,IAAI,CAACH,KAAK,IAAI,CAAC,IAAIG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ACtD,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { handleScreenChange } from "./screenTracker.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Reports the active React Navigation (or manual) screen name to Userflow when
|
|
8
|
+
* it changes. Sent to the backend as `clientContext.screen`.
|
|
9
|
+
*
|
|
10
|
+
* Prefer {@link UserflowProvider} + {@link WithUserflowReactNavigation} when
|
|
11
|
+
* using React Navigation. For Expo Router pathnames, prefer
|
|
12
|
+
* {@link UserflowProvider} (it wires pathname tracking automatically).
|
|
13
|
+
*/
|
|
14
|
+
export function useUserflowScreen(screenName) {
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
handleScreenChange(screenName ? {
|
|
17
|
+
screen: screenName
|
|
18
|
+
} : undefined);
|
|
19
|
+
}, [screenName]);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=useUserflowScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","handleScreenChange","useUserflowScreen","screenName","screen","undefined"],"sourceRoot":"../../src","sources":["useUserflowScreen.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AAEjC,SAASC,kBAAkB,QAAQ,oBAAiB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACC,UAA8B,EAAQ;EACtEH,SAAS,CAAC,MAAM;IACdC,kBAAkB,CAACE,UAAU,GAAG;MAAEC,MAAM,EAAED;IAAW,CAAC,GAAGE,SAAS,CAAC;EACrE,CAAC,EAAE,CAACF,UAAU,CAAC,CAAC;AAClB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SDK_VERSION"],"sourceRoot":"../../src","sources":["version.ts"],"mappings":";;AAAA;AACA,OAAO,MAAMA,WAAW,GAAG,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Host view that can be measured in window coordinates. */
|
|
2
|
+
export interface AnchorHost {
|
|
3
|
+
measureInWindow: (callback: (x: number, y: number, width: number, height: number) => void) => void;
|
|
4
|
+
/**
|
|
5
|
+
* Optional best-effort: scroll ancestors so this host enters the viewport.
|
|
6
|
+
* Called when the measured rect is not fully visible (bounded retries per step).
|
|
7
|
+
*/
|
|
8
|
+
scrollIntoView?: () => void;
|
|
9
|
+
}
|
|
10
|
+
type Listener = () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Manual-anchor registry for Phase 3 (WS6). Codeless resolution is Phase 4.
|
|
13
|
+
* Multiple mounts of the same id keep a set; {@link get} returns the most
|
|
14
|
+
* recently registered host.
|
|
15
|
+
*/
|
|
16
|
+
export declare class AnchorRegistry {
|
|
17
|
+
private readonly anchors;
|
|
18
|
+
private readonly listeners;
|
|
19
|
+
register(id: string, host: AnchorHost): void;
|
|
20
|
+
unregister(id: string, host: AnchorHost): void;
|
|
21
|
+
get(id: string): AnchorHost | null;
|
|
22
|
+
/** True when more than one host is registered for the same id. */
|
|
23
|
+
isAmbiguous(id: string): boolean;
|
|
24
|
+
subscribe(listener: Listener): () => void;
|
|
25
|
+
/** Test helper — clear all anchors. */
|
|
26
|
+
clear(): void;
|
|
27
|
+
private emit;
|
|
28
|
+
}
|
|
29
|
+
/** Module singleton used by {@link useUserflowAnchor} and TooltipSurface. */
|
|
30
|
+
export declare const anchorRegistry: AnchorRegistry;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=AnchorRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnchorRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/anchors/AnchorRegistry.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IACzB,eAAe,EAAE,CACf,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,KACpE,IAAI,CAAC;IACV;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B;;;;GAIG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsC;IAC9D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuB;IAEjD,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI;IAW5C,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI;IAU9C,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAUlC,kEAAkE;IAClE,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIhC,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI;IAOzC,uCAAuC;IACvC,KAAK,IAAI,IAAI;IAKb,OAAO,CAAC,IAAI;CAKb;AAED,6EAA6E;AAC7E,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { SemanticRole, SemanticSegment, SiblingDescriptor } from '@userflow-tech/protocol';
|
|
2
|
+
import type { MutableRefObject, RefObject } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Multi-instance auto-anchor registry for Stage 3.
|
|
5
|
+
*
|
|
6
|
+
* Separate from {@link AnchorRegistry} (manual `useUserflowAnchor` / Tier 0).
|
|
7
|
+
* Each mounted host is a distinct instance indexed by registry key, template
|
|
8
|
+
* path, and developer ids so a later scored matcher can rank candidates.
|
|
9
|
+
*/
|
|
10
|
+
export type AutoAnchorRef = RefObject<unknown> | MutableRefObject<unknown>;
|
|
11
|
+
export type AutoAnchorListener = () => void;
|
|
12
|
+
/** Build-time descriptor stamped by `@userflow-tech/babel-plugin` (full or expanded compact). */
|
|
13
|
+
export interface BuildTimeHints {
|
|
14
|
+
/** Canonical structural path (IDs replace ordinals when present). */
|
|
15
|
+
ufid: string;
|
|
16
|
+
/** Build-local alias key (`uf_<hash>` of templatePath). */
|
|
17
|
+
nativeId: string;
|
|
18
|
+
structuralPath?: string;
|
|
19
|
+
templatePath?: string;
|
|
20
|
+
childText?: string;
|
|
21
|
+
childShape?: string;
|
|
22
|
+
iconName?: string;
|
|
23
|
+
imageSrc?: string;
|
|
24
|
+
literalTestId?: string;
|
|
25
|
+
literalLabel?: string;
|
|
26
|
+
literalUserflowId?: string;
|
|
27
|
+
ordinal?: number;
|
|
28
|
+
siblingIndex?: number;
|
|
29
|
+
role?: SemanticRole;
|
|
30
|
+
ancestors?: SemanticSegment[];
|
|
31
|
+
}
|
|
32
|
+
export interface AutoAnchorInstance {
|
|
33
|
+
instanceId: string;
|
|
34
|
+
registryKey: string;
|
|
35
|
+
ref: AutoAnchorRef;
|
|
36
|
+
kind: string;
|
|
37
|
+
role: SemanticRole;
|
|
38
|
+
isPressable: boolean;
|
|
39
|
+
templatePath: string;
|
|
40
|
+
structuralPath: string;
|
|
41
|
+
instanceScope?: string;
|
|
42
|
+
manualId?: string;
|
|
43
|
+
userflowId?: string;
|
|
44
|
+
testID?: string;
|
|
45
|
+
nativeID?: string;
|
|
46
|
+
childText?: string;
|
|
47
|
+
accessibilityLabel?: string;
|
|
48
|
+
childShape?: string;
|
|
49
|
+
iconName?: string;
|
|
50
|
+
imageSrc?: string;
|
|
51
|
+
ancestors: SemanticSegment[];
|
|
52
|
+
ordinal?: number;
|
|
53
|
+
siblingIndex?: number;
|
|
54
|
+
parentInstanceId?: string;
|
|
55
|
+
childInstanceIds: string[];
|
|
56
|
+
ambiguous: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface RegisterInstanceInput {
|
|
59
|
+
registryKey: string;
|
|
60
|
+
ref: AutoAnchorRef;
|
|
61
|
+
kind: string;
|
|
62
|
+
hints?: BuildTimeHints | null;
|
|
63
|
+
instanceScope?: string | null;
|
|
64
|
+
runtime?: {
|
|
65
|
+
manualId?: string;
|
|
66
|
+
userflowId?: string;
|
|
67
|
+
testID?: string;
|
|
68
|
+
nativeID?: string;
|
|
69
|
+
childText?: string;
|
|
70
|
+
accessibilityLabel?: string;
|
|
71
|
+
iconName?: string;
|
|
72
|
+
imageSrc?: string;
|
|
73
|
+
reactKey?: string;
|
|
74
|
+
};
|
|
75
|
+
parentInstanceId?: string;
|
|
76
|
+
}
|
|
77
|
+
export declare function roleForKind(kind: string): SemanticRole;
|
|
78
|
+
export declare class AutoAnchorRegistry {
|
|
79
|
+
private readonly instances;
|
|
80
|
+
private readonly byRegistryKey;
|
|
81
|
+
private readonly byManualId;
|
|
82
|
+
private readonly byTemplatePath;
|
|
83
|
+
private readonly listeners;
|
|
84
|
+
private notifyScheduled;
|
|
85
|
+
registerInstance(input: RegisterInstanceInput): {
|
|
86
|
+
instanceId: string;
|
|
87
|
+
dispose: () => void;
|
|
88
|
+
};
|
|
89
|
+
updateInstance(instanceId: string, patch: Partial<Pick<AutoAnchorInstance, 'childText' | 'accessibilityLabel' | 'childShape' | 'manualId' | 'userflowId' | 'testID' | 'nativeID' | 'instanceScope' | 'structuralPath' | 'ancestors' | 'ordinal' | 'siblingIndex' | 'parentInstanceId'>>): void;
|
|
90
|
+
getInstance(instanceId: string): AutoAnchorInstance | undefined;
|
|
91
|
+
getInstancesByRegistryKey(key: string): AutoAnchorInstance[];
|
|
92
|
+
getInstancesByManualId(id: string): AutoAnchorInstance[];
|
|
93
|
+
getInstancesByTemplatePath(path: string): AutoAnchorInstance[];
|
|
94
|
+
allInstances(): AutoAnchorInstance[];
|
|
95
|
+
orderedSiblingsIncludingSelf(instanceId: string): AutoAnchorInstance[];
|
|
96
|
+
siblingWindow(instanceId: string, windowSize?: number): {
|
|
97
|
+
previous: SiblingDescriptor[];
|
|
98
|
+
next: SiblingDescriptor[];
|
|
99
|
+
};
|
|
100
|
+
subscribe(listener: AutoAnchorListener): () => void;
|
|
101
|
+
isAmbiguousKey(key: string): boolean;
|
|
102
|
+
/** Test helper — drop every instance and reset ids. */
|
|
103
|
+
clear(): void;
|
|
104
|
+
private unregisterInstance;
|
|
105
|
+
private refreshManualIndexes;
|
|
106
|
+
private recomputeAmbiguity;
|
|
107
|
+
private addIndex;
|
|
108
|
+
private removeIndex;
|
|
109
|
+
private idsToInstances;
|
|
110
|
+
private notify;
|
|
111
|
+
}
|
|
112
|
+
export declare const autoAnchorRegistry: AutoAnchorRegistry;
|
|
113
|
+
//# sourceMappingURL=AutoAnchorRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoAnchorRegistry.d.ts","sourceRoot":"","sources":["../../../../../src/anchors/AutoAnchorRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzD;;;;;;GAMG;AAEH,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAE3E,MAAM,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC;AAE5C,iGAAiG;AACjG,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;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