@userflow-tech/react-native 0.1.1 → 0.2.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/README.md +97 -61
- package/app.plugin.js +11 -1
- package/babel-plugin/index.d.ts +8 -8
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +17 -9
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +13 -0
- package/docs/anchoring.md +141 -13
- package/docs/deep-linking.md +18 -15
- package/docs/theme-mapping.md +44 -15
- package/docs/troubleshooting.md +36 -29
- package/expo-plugin/withUserflow.js +1 -1
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +124 -2
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
- package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +171 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +285 -0
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +64 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +39 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +110 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +150 -0
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
- package/lib/commonjs/authoring/doubleTap.js +23 -0
- package/lib/commonjs/authoring/doubleTap.js.map +1 -0
- package/lib/commonjs/authoring/elementPickerController.js +102 -0
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js +195 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/commonjs/authoring/hitTest.js +106 -0
- package/lib/commonjs/authoring/hitTest.js.map +1 -0
- package/lib/commonjs/content/RichContentRenderer.js +12 -2
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
- package/lib/commonjs/content/StepButton.js +19 -4
- package/lib/commonjs/content/StepButton.js.map +1 -1
- package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/commonjs/content/themeColor.js +11 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deviceContext.js +158 -0
- package/lib/commonjs/deviceContext.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/commonjs/hostAppVersion.js +242 -0
- package/lib/commonjs/hostAppVersion.js.map +1 -0
- package/lib/commonjs/index.js +118 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lifecycle.js +2 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +17 -8
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
- package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/commonjs/pairing/PairingController.js +29 -2
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/diagnostics.js +9 -0
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
- package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/commonjs/pairing/tokenStorage.js +25 -2
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/runtime/FlowRenderer.js +45 -21
- package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
- package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
- package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/commonjs/runtime/TargetPressBridge.js +13 -44
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowProvider.js +74 -20
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
- package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +3 -1
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
- package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
- package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
- package/lib/commonjs/screenTracker.js +46 -4
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/surfaces/CardFade.js +31 -0
- package/lib/commonjs/surfaces/CardFade.js.map +1 -0
- package/lib/commonjs/surfaces/CloseButton.js +11 -6
- package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +50 -34
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/cardTransition.js +70 -0
- package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
- package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
- package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/commonjs/surfaces/themeChrome.js +4 -1
- package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
- package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +125 -2
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/anchorChangeTicker.js +10 -0
- package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +25 -12
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
- package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
- package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/module/anchors/fiber/fiberInternals.js +139 -3
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
- package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/module/anchors/fiber/readHostContent.js +127 -0
- package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/module/anchors/fiberAnchorCache.js +40 -0
- package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +15 -21
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +167 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +280 -0
- package/lib/module/anchors/semanticMatcher.js.map +1 -0
- package/lib/module/authoring/ElementPickerOverlay.js +485 -0
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/module/authoring/capturePickerScreenshot.js +68 -0
- package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +59 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeButton.js +89 -0
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
- package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeIcon.js +33 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js +104 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +146 -0
- package/lib/module/authoring/chrome/tokens.js.map +1 -0
- package/lib/module/authoring/doubleTap.js +18 -0
- package/lib/module/authoring/doubleTap.js.map +1 -0
- package/lib/module/authoring/elementPickerController.js +97 -0
- package/lib/module/authoring/elementPickerController.js.map +1 -0
- package/lib/module/authoring/fingerprintFromInstance.js +187 -0
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/module/authoring/hitTest.js +100 -0
- package/lib/module/authoring/hitTest.js.map +1 -0
- package/lib/module/content/RichContentRenderer.js +12 -2
- package/lib/module/content/RichContentRenderer.js.map +1 -1
- package/lib/module/content/StepButton.js +19 -4
- package/lib/module/content/StepButton.js.map +1 -1
- package/lib/module/content/resolveStepButtonChrome.js +8 -6
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/module/content/themeColor.js +10 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deviceContext.js +142 -0
- package/lib/module/deviceContext.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/module/hostAppVersion.js +225 -0
- package/lib/module/hostAppVersion.js.map +1 -0
- package/lib/module/index.js +119 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/lifecycle.js +2 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +18 -9
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/isOverlayPresentation.js +58 -0
- package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/module/pairing/PairingController.js +30 -3
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +212 -85
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/diagnostics.js +8 -0
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/elementPickerRelay.js +87 -0
- package/lib/module/pairing/elementPickerRelay.js.map +1 -0
- package/lib/module/pairing/resolvePreviewChrome.js +48 -0
- package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/module/pairing/tokenStorage.js +24 -2
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/runtime/FlowRenderer.js +45 -21
- package/lib/module/runtime/FlowRenderer.js.map +1 -1
- package/lib/module/runtime/FlowSurfaceFade.js +49 -26
- package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/module/runtime/TargetPressBridge.js +12 -43
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowProvider.js +74 -20
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/changedTouchPoints.js +43 -0
- package/lib/module/runtime/changedTouchPoints.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +3 -1
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/flowSessionViewState.js +32 -7
- package/lib/module/runtime/flowSessionViewState.js.map +1 -1
- package/lib/module/runtime/useFlowSessionState.js +2 -1
- package/lib/module/runtime/useFlowSessionState.js.map +1 -1
- package/lib/module/screenTracker.js +42 -4
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/surfaces/CardFade.js +26 -0
- package/lib/module/surfaces/CardFade.js.map +1 -0
- package/lib/module/surfaces/CloseButton.js +10 -6
- package/lib/module/surfaces/CloseButton.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +52 -36
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +368 -90
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/cardTransition.js +64 -0
- package/lib/module/surfaces/cardTransition.js.map +1 -0
- package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
- package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/module/surfaces/resolveModalLayout.js +7 -3
- package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
- package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
- package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/module/surfaces/themeChrome.js +3 -1
- package/lib/module/surfaces/themeChrome.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
- package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
- package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
- package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/module/surfaces/tooltip/rect.js +11 -0
- package/lib/module/surfaces/tooltip/rect.js.map +1 -1
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +26 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +48 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +59 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
- package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +53 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +2 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/screenTracker.d.ts +21 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +26 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +48 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +59 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/deviceContext.d.ts +66 -0
- package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +53 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +6 -0
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +2 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/module/src/screenTracker.d.ts +21 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +22 -16
- package/src/anchors/AutoAnchorRegistry.ts +139 -2
- package/src/anchors/anchorChangeTicker.ts +10 -0
- package/src/anchors/elementConditionEvaluator.ts +29 -16
- package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
- package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
- package/src/anchors/fiber/fiberInternals.ts +166 -3
- package/src/anchors/fiber/indexHostFibers.ts +136 -0
- package/src/anchors/fiber/readHostContent.ts +146 -0
- package/src/anchors/fiberAnchorCache.ts +45 -0
- package/src/anchors/resolveAnchorHost.ts +23 -23
- package/src/anchors/resolveAutoAnchorHost.ts +180 -0
- package/src/anchors/semanticMatcher.ts +361 -0
- package/src/authoring/ElementPickerOverlay.tsx +553 -0
- package/src/authoring/capturePickerScreenshot.ts +90 -0
- package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
- package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
- package/src/authoring/chrome/ChromeButton.tsx +103 -0
- package/src/authoring/chrome/ChromeDialog.tsx +121 -0
- package/src/authoring/chrome/ChromeIcon.tsx +40 -0
- package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
- package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
- package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
- package/src/authoring/chrome/doubleTapMonitor.ts +80 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/src/authoring/chrome/icons/xmark.png +0 -0
- package/src/authoring/chrome/icons/xmark@2x.png +0 -0
- package/src/authoring/chrome/icons/xmark@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +106 -0
- package/src/authoring/doubleTap.ts +27 -0
- package/src/authoring/elementPickerController.ts +135 -0
- package/src/authoring/fingerprintFromInstance.ts +152 -0
- package/src/authoring/hitTest.ts +133 -0
- package/src/content/RichContentRenderer.tsx +22 -1
- package/src/content/StepButton.tsx +17 -2
- package/src/content/resolveStepButtonChrome.ts +12 -6
- package/src/content/themeColor.ts +10 -0
- package/src/deviceContext.ts +168 -0
- package/src/expo-router/useUserflowExpoRouter.ts +47 -4
- package/src/hostAppVersion.ts +258 -0
- package/src/index.ts +148 -4
- package/src/lifecycle.ts +8 -0
- package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
- package/src/navigation/isOverlayPresentation.ts +76 -0
- package/src/pairing/PairingController.ts +32 -3
- package/src/pairing/PreviewModeBanner.tsx +250 -94
- package/src/pairing/diagnostics.ts +8 -0
- package/src/pairing/elementPickerRelay.ts +100 -0
- package/src/pairing/resolvePreviewChrome.ts +57 -0
- package/src/pairing/tokenStorage.ts +31 -2
- package/src/pairing/usePairingState.ts +2 -0
- package/src/runtime/FlowRenderer.tsx +55 -27
- package/src/runtime/FlowSurfaceFade.tsx +51 -30
- package/src/runtime/TargetPressBridge.tsx +14 -32
- package/src/runtime/UserflowProvider.tsx +76 -13
- package/src/runtime/changedTouchPoints.ts +34 -0
- package/src/runtime/flowEngine.ts +2 -0
- package/src/runtime/flowSessionViewState.ts +42 -4
- package/src/runtime/useFlowSessionState.ts +2 -0
- package/src/screenTracker.ts +46 -4
- package/src/surfaces/CardFade.tsx +18 -0
- package/src/surfaces/CloseButton.tsx +17 -7
- package/src/surfaces/MadeWithUserflow.tsx +1 -1
- package/src/surfaces/ModalSurface.tsx +48 -35
- package/src/surfaces/TooltipSurface.tsx +406 -86
- package/src/surfaces/cardTransition.ts +67 -0
- package/src/surfaces/resolveHighlightChrome.ts +139 -0
- package/src/surfaces/resolveModalLayout.ts +16 -8
- package/src/surfaces/resolveTooltipLayout.ts +1 -14
- package/src/surfaces/surfaceInteractionConfig.ts +25 -0
- package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
- package/src/surfaces/themeChrome.ts +5 -3
- package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
- package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
- package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
- package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
- package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
- package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
- package/src/surfaces/tooltip/rect.ts +11 -0
- package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts +1 -2
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +69 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +268 -7
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +44 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +103 -9
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +23 -4
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +64 -1
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
- package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
- package/vendor/core/dist/engine/conditionOperators.js +168 -0
- package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
- package/vendor/core/dist/engine/handleActions.d.ts +27 -4
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +140 -13
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
- package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
- package/vendor/core/dist/engine/simpleObservable.js +29 -0
- package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
- package/vendor/core/dist/engine/trackCondition.d.ts +25 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackCondition.js +177 -0
- package/vendor/core/dist/engine/trackCondition.js.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
- package/vendor/core/dist/index.d.ts +4 -3
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +2 -1
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
- package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
- package/vendor/core/dist/normalizeAttributes.js +127 -0
- package/vendor/core/dist/normalizeAttributes.js.map +1 -0
- package/vendor/core/dist/transport/phoenix.d.ts +11 -6
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +59 -5
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/types.d.ts +26 -1
- package/vendor/core/dist/types.d.ts.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/attributes.d.ts +43 -0
- package/vendor/protocol/dist/attributes.d.ts.map +1 -0
- package/vendor/protocol/dist/attributes.js +15 -0
- package/vendor/protocol/dist/attributes.js.map +1 -0
- package/vendor/protocol/dist/autoData.d.ts +2 -2
- package/vendor/protocol/dist/autoData.js +2 -2
- package/vendor/protocol/dist/events.d.ts +8 -0
- package/vendor/protocol/dist/events.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +66 -4
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +50 -3
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/index.d.ts +1 -0
- package/vendor/protocol/dist/index.d.ts.map +1 -1
- package/vendor/protocol/dist/index.js +1 -0
- package/vendor/protocol/dist/index.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +25 -4
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +4 -0
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/dist/pairing.d.ts +26 -0
- package/vendor/protocol/dist/pairing.d.ts.map +1 -1
- package/vendor/protocol/dist/pairing.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -18,10 +18,16 @@ import {
|
|
|
18
18
|
} from 'react-native';
|
|
19
19
|
|
|
20
20
|
import { anchorRegistry } from '../anchors/AnchorRegistry';
|
|
21
|
+
import { autoAnchorRegistry } from '../anchors/AutoAnchorRegistry';
|
|
21
22
|
import { addAnimationFrameCallback, removeAnimationFrameCallback } from '../anchors/animationFrame';
|
|
22
23
|
import { fiberScanRoot } from '../anchors/fiber/FiberScanRoot';
|
|
23
24
|
import type { AnyFiber } from '../anchors/fiber/fiberInternals';
|
|
24
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
clearFiberAnchorCache,
|
|
27
|
+
invalidateFiberAnchor,
|
|
28
|
+
resolveAnchorHost,
|
|
29
|
+
} from '../anchors/resolveAnchorHost';
|
|
30
|
+
import { resolveAutoAnchorHost } from '../anchors/resolveAutoAnchorHost';
|
|
25
31
|
import { resolveManualAnchorId } from '../anchors/resolveManualAnchorId';
|
|
26
32
|
import { scrollAnchorIntoView } from '../anchors/scrollAnchorIntoView';
|
|
27
33
|
import { getScrollPadding } from '../anchors/scrollConfig';
|
|
@@ -29,31 +35,47 @@ import { targetPressMonitor } from '../anchors/targetPressMonitor';
|
|
|
29
35
|
import { RichContentRenderer } from '../content/RichContentRenderer';
|
|
30
36
|
import type { LookupAttribute } from '../content/types';
|
|
31
37
|
|
|
38
|
+
import { CardFade } from './CardFade';
|
|
32
39
|
import { CloseButton } from './CloseButton';
|
|
33
|
-
import { resolveCloseButtonColor } from './resolveCloseButtonColor';
|
|
34
40
|
import { MADE_WITH_USERFLOW_GAP, MadeWithUserflow } from './MadeWithUserflow';
|
|
35
41
|
import { ProgressBar } from './ProgressBar';
|
|
36
42
|
import { ABSOLUTE_FILL } from './absoluteFill';
|
|
43
|
+
import { useCardTransitionPhase } from './cardTransition';
|
|
37
44
|
import { parseBackdropOpacity } from './parseBackdropOpacity';
|
|
38
45
|
import { resolveStepProgress } from './progress';
|
|
39
|
-
import {
|
|
46
|
+
import { resolveCloseButtonColor } from './resolveCloseButtonColor';
|
|
47
|
+
import { outsideHighlightOutset, resolveHighlightChrome } from './resolveHighlightChrome';
|
|
48
|
+
import { resolveModalCardMaxHeight } from './resolveModalLayout';
|
|
49
|
+
import {
|
|
50
|
+
resolveTooltipButtonsAlign,
|
|
51
|
+
resolveTooltipCardLayout,
|
|
52
|
+
resolveTooltipCardMaxWidth,
|
|
53
|
+
} from './resolveTooltipLayout';
|
|
54
|
+
import { paddingAsEdgeInsets, useSurfaceLayoutInsets } from './surfaceLayoutInsets';
|
|
40
55
|
import { resolveBubbleChrome } from './themeChrome';
|
|
41
56
|
import { TooltipBubble } from './tooltip/TooltipBubble';
|
|
42
57
|
import { TooltipCutout } from './tooltip/TooltipCutout';
|
|
58
|
+
import { TooltipHighlight } from './tooltip/TooltipHighlight';
|
|
43
59
|
import { computeTooltipPosition } from './tooltip/computeTooltipPosition';
|
|
44
60
|
import {
|
|
45
61
|
inferTooltipPlacement,
|
|
62
|
+
tooltipPlacementFits,
|
|
46
63
|
type Rect,
|
|
47
64
|
type TooltipPlacementSide,
|
|
48
65
|
} from './tooltip/inferTooltipPlacement';
|
|
49
66
|
import { parseBackdropPadding } from './tooltip/parseBackdropPadding';
|
|
50
|
-
import { buildEffectiveViewport, isRectFullyVisible, rectsEqual } from './tooltip/rect';
|
|
51
67
|
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
warnTooltipPlacementUnanchored,
|
|
69
|
+
warnTooltipSidePlacementDropped,
|
|
70
|
+
} from './tooltip/placementDiagnostics';
|
|
71
|
+
import { buildEffectiveViewport, expandRect, isRectFullyVisible, rectsEqual } from './tooltip/rect';
|
|
72
|
+
import {
|
|
73
|
+
resolveTooltipSideCardWidth,
|
|
74
|
+
tooltipMinCardHeight,
|
|
75
|
+
tooltipMinSideCardWidth,
|
|
76
|
+
tooltipSideGap,
|
|
77
|
+
tooltipVerticalGap,
|
|
78
|
+
} from './tooltip/resolveSideCardWidth';
|
|
57
79
|
|
|
58
80
|
export interface TooltipSurfaceProps {
|
|
59
81
|
engine: FlowSessionEngine;
|
|
@@ -61,6 +83,12 @@ export interface TooltipSurfaceProps {
|
|
|
61
83
|
currentStep: FlowStepFragment;
|
|
62
84
|
theme: ThemeFragment;
|
|
63
85
|
lookupAttribute: LookupAttribute;
|
|
86
|
+
/**
|
|
87
|
+
* Bumped on preview restart and every goToStep, including a ForceGoToStep
|
|
88
|
+
* back to the current step, so targeting re-bootstraps when session/step
|
|
89
|
+
* identity is unchanged.
|
|
90
|
+
*/
|
|
91
|
+
resetNonce?: number;
|
|
64
92
|
}
|
|
65
93
|
|
|
66
94
|
type MissingMode = 'waiting' | 'reported';
|
|
@@ -69,6 +97,11 @@ type MissingMode = 'waiting' | 'reported';
|
|
|
69
97
|
const RESOLVE_MS = 250;
|
|
70
98
|
/** Slower resolve poll after FLAG/ERROR report so a late-mounting target can recover. */
|
|
71
99
|
const RESOLVE_SLOW_MS = 1000;
|
|
100
|
+
/**
|
|
101
|
+
* One-frame delay before the first resolve after a step/reset so dialog
|
|
102
|
+
* teardown cannot arm the missing-target timer with a 0-size measure.
|
|
103
|
+
*/
|
|
104
|
+
export const FIRST_RESOLVE_DELAY_MS = 16;
|
|
72
105
|
/**
|
|
73
106
|
* Max scroll-into-view attempts per step while the target stays partially
|
|
74
107
|
* clipped. Only a safety net for targets that can never become fully visible —
|
|
@@ -95,6 +128,18 @@ function missingBehavior(theme: ThemeFragment): string {
|
|
|
95
128
|
return String(theme.tooltipMissingBehavior ?? 'FLAG').toUpperCase();
|
|
96
129
|
}
|
|
97
130
|
|
|
131
|
+
/** Dim with no card yet, for the frames between mount and the first measure. */
|
|
132
|
+
function backdropOnly(blocker: React.ReactNode): React.ReactElement | null {
|
|
133
|
+
if (blocker == null) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
return (
|
|
137
|
+
<View style={styles.root} testID="userflow-tooltip-surface" pointerEvents="box-none">
|
|
138
|
+
{blocker}
|
|
139
|
+
</View>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
98
143
|
/**
|
|
99
144
|
* Anchored tooltip chrome: measure manual / fiber anchor, place with web flip/shift,
|
|
100
145
|
* optional cutout backdrop, missing-target report + theme fallbacks.
|
|
@@ -105,6 +150,7 @@ export function TooltipSurface({
|
|
|
105
150
|
currentStep,
|
|
106
151
|
theme,
|
|
107
152
|
lookupAttribute,
|
|
153
|
+
resetNonce = 0,
|
|
108
154
|
}: TooltipSurfaceProps): React.ReactElement | null {
|
|
109
155
|
const version = session.version;
|
|
110
156
|
const chrome = resolveBubbleChrome(theme, 'tooltip');
|
|
@@ -112,14 +158,33 @@ export function TooltipSurface({
|
|
|
112
158
|
const showClose = !version.closeDisabled;
|
|
113
159
|
const backdropOpacity = parseBackdropOpacity(theme.backdropOpacity);
|
|
114
160
|
const backdropPadding = parseBackdropPadding(currentStep.backdropPadding);
|
|
115
|
-
const
|
|
161
|
+
const selector = currentStep.selector;
|
|
162
|
+
const isAuto = (selector?.type as string | null) === 'AUTO';
|
|
163
|
+
const autoData = selector?.autoData ?? null;
|
|
164
|
+
const anchorId = isAuto ? null : resolveManualAnchorId(selector?.css);
|
|
165
|
+
const targetKey = isAuto ? `auto:${autoData ?? ''}` : (anchorId ?? '');
|
|
166
|
+
const highlight = currentStep.backdrop ? resolveHighlightChrome(theme, backdropPadding) : null;
|
|
167
|
+
const outsideHighlightSpread = highlight ? outsideHighlightOutset(highlight) : 0;
|
|
116
168
|
const desiredPlacement = normalizePlacement(currentStep.tooltipPlacement);
|
|
117
169
|
const behavior = missingBehavior(theme);
|
|
118
|
-
|
|
119
|
-
|
|
170
|
+
/**
|
|
171
|
+
* An exiting card stays mounted for the fade, so anything it fires belongs to
|
|
172
|
+
* a step the user already left. Mirrored into a ref for the callbacks that run
|
|
173
|
+
* outside render (native touches, measure callbacks, timers).
|
|
174
|
+
*/
|
|
175
|
+
const isExiting = useCardTransitionPhase() === 'exiting';
|
|
176
|
+
const exitingRef = React.useRef(isExiting);
|
|
177
|
+
exitingRef.current = isExiting;
|
|
178
|
+
const layoutInsets = useSurfaceLayoutInsets();
|
|
179
|
+
const centerPaddingStyle = layoutInsets;
|
|
120
180
|
|
|
121
181
|
const [keyboardBottomInset, setKeyboardBottomInset] = React.useState(0);
|
|
122
182
|
const [target, setTarget] = React.useState<Rect | null>(null);
|
|
183
|
+
/**
|
|
184
|
+
* Placeholder until the card's first `onLayout`. A narrowed LEFT/RIGHT can
|
|
185
|
+
* leave a 2–3× smaller/taller measurement here; that must not leak into the
|
|
186
|
+
* next step's `fits()` (see the reset on `currentStep.id`).
|
|
187
|
+
*/
|
|
123
188
|
const [bubbleSize, setBubbleSize] = React.useState({ width: 280, height: 160 });
|
|
124
189
|
const [placement, setPlacement] = React.useState<TooltipPlacementSide>(
|
|
125
190
|
desiredPlacement ?? 'BELOW',
|
|
@@ -128,10 +193,22 @@ export function TooltipSurface({
|
|
|
128
193
|
const [registryTick, setRegistryTick] = React.useState(0);
|
|
129
194
|
/** True after at least one *failed* measure for the current step/anchor. */
|
|
130
195
|
const [measureAttempted, setMeasureAttempted] = React.useState(false);
|
|
196
|
+
/**
|
|
197
|
+
* False only after a same-step `resetNonce` bump (preview restart) until one
|
|
198
|
+
* frame has passed, so dialog teardown cannot 0-size FLAG.
|
|
199
|
+
*/
|
|
200
|
+
const [resolveArmed, setResolveArmed] = React.useState(true);
|
|
201
|
+
const targetingIdentityRef = React.useRef({
|
|
202
|
+
stepId: currentStep.id,
|
|
203
|
+
targetKey,
|
|
204
|
+
resetNonce,
|
|
205
|
+
});
|
|
131
206
|
|
|
132
207
|
const reportedRef = React.useRef(false);
|
|
133
208
|
const placementRef = React.useRef(placement);
|
|
134
209
|
placementRef.current = placement;
|
|
210
|
+
const desiredPlacementRef = React.useRef(desiredPlacement);
|
|
211
|
+
desiredPlacementRef.current = desiredPlacement;
|
|
135
212
|
const mountedRef = React.useRef(true);
|
|
136
213
|
const targetRef = React.useRef<Rect | null>(null);
|
|
137
214
|
/** Bounded scroll-into-view attempts for the current step. */
|
|
@@ -144,16 +221,35 @@ export function TooltipSurface({
|
|
|
144
221
|
const scrollSettledRef = React.useRef(false);
|
|
145
222
|
/** In-flight measureInWindow guard for the rAF loop. */
|
|
146
223
|
const measureInFlightRef = React.useRef(false);
|
|
224
|
+
/**
|
|
225
|
+
* Bumped whenever the resolved host is dropped. `measureInWindow` is async, so
|
|
226
|
+
* a measurement dispatched before the drop can still land after it — without
|
|
227
|
+
* this guard it re-anchors a target the resolver has already rejected, and the
|
|
228
|
+
* tooltip flip-flops between anchored and "looking for target".
|
|
229
|
+
*/
|
|
230
|
+
const resolveEpochRef = React.useRef(0);
|
|
147
231
|
/** Latest resolved host fiber (for scroll-ancestor walk + rAF remeasure). */
|
|
148
232
|
const hostFiberRef = React.useRef<AnyFiber | null>(null);
|
|
149
233
|
const hostMeasureRef = React.useRef<
|
|
150
234
|
((callback: (x: number, y: number, width: number, height: number) => void) => void) | null
|
|
151
235
|
>(null);
|
|
152
236
|
const hostScrollIntoViewRef = React.useRef<(() => void) | undefined>(undefined);
|
|
237
|
+
/** Fiber-cache key for the current host; AUTO exact-id path sets this even when `anchorId` is null. */
|
|
238
|
+
const fiberCacheIdRef = React.useRef<string | null>(null);
|
|
239
|
+
/** Step id we already warned about for a dropped LEFT/RIGHT placement. */
|
|
240
|
+
const warnedSidePlacementStepRef = React.useRef<string | null>(null);
|
|
241
|
+
const currentStepIdRef = React.useRef(currentStep.id);
|
|
242
|
+
currentStepIdRef.current = currentStep.id;
|
|
243
|
+
/**
|
|
244
|
+
* Step the current `target` rect was measured for. A step advance re-renders
|
|
245
|
+
* with the new step before the reset effect clears `target`, so for one commit
|
|
246
|
+
* the new step's placement is evaluated against the previous target.
|
|
247
|
+
*/
|
|
248
|
+
const targetStepIdRef = React.useRef<string | null>(null);
|
|
153
249
|
const keyboardBottomInsetRef = React.useRef(keyboardBottomInset);
|
|
154
250
|
keyboardBottomInsetRef.current = keyboardBottomInset;
|
|
155
|
-
const insetsRef = React.useRef(
|
|
156
|
-
insetsRef.current =
|
|
251
|
+
const insetsRef = React.useRef(layoutInsets);
|
|
252
|
+
insetsRef.current = layoutInsets;
|
|
157
253
|
const missingModeRef = React.useRef(missingMode);
|
|
158
254
|
missingModeRef.current = missingMode;
|
|
159
255
|
const behaviorRef = React.useRef(behavior);
|
|
@@ -175,9 +271,11 @@ export function TooltipSurface({
|
|
|
175
271
|
React.useEffect(() => {
|
|
176
272
|
const bump = () => setRegistryTick((n) => n + 1);
|
|
177
273
|
const unsubRegistry = anchorRegistry.subscribe(bump);
|
|
274
|
+
const unsubAuto = autoAnchorRegistry.subscribe(bump);
|
|
178
275
|
const unsubScan = fiberScanRoot.subscribe(bump);
|
|
179
276
|
return () => {
|
|
180
277
|
unsubRegistry();
|
|
278
|
+
unsubAuto();
|
|
181
279
|
unsubScan();
|
|
182
280
|
};
|
|
183
281
|
}, []);
|
|
@@ -187,17 +285,44 @@ export function TooltipSurface({
|
|
|
187
285
|
scrollAttemptsRef.current = 0;
|
|
188
286
|
scrollSettledRef.current = false;
|
|
189
287
|
measureInFlightRef.current = false;
|
|
288
|
+
resolveEpochRef.current += 1;
|
|
190
289
|
hostFiberRef.current = null;
|
|
191
290
|
hostMeasureRef.current = null;
|
|
192
291
|
hostScrollIntoViewRef.current = undefined;
|
|
292
|
+
fiberCacheIdRef.current = null;
|
|
293
|
+
warnedSidePlacementStepRef.current = null;
|
|
294
|
+
targetStepIdRef.current = null;
|
|
193
295
|
targetRef.current = null;
|
|
296
|
+
// Drop the previous card's measured size and side so the next step does not
|
|
297
|
+
// inherit a wrapped 115×400 LEFT into `fits(currentPlacement)`.
|
|
298
|
+
const nextPlacement = desiredPlacementRef.current ?? 'BELOW';
|
|
299
|
+
placementRef.current = nextPlacement;
|
|
300
|
+
setPlacement(nextPlacement);
|
|
301
|
+
setBubbleSize({ width: 280, height: 160 });
|
|
194
302
|
setMissingMode('waiting');
|
|
195
303
|
setMeasureAttempted(false);
|
|
196
304
|
setTarget(null);
|
|
197
|
-
|
|
305
|
+
const prev = targetingIdentityRef.current;
|
|
306
|
+
const sameIdentity = prev.stepId === currentStep.id && prev.targetKey === targetKey;
|
|
307
|
+
const nonceBumped = prev.resetNonce !== resetNonce;
|
|
308
|
+
targetingIdentityRef.current = { stepId: currentStep.id, targetKey, resetNonce };
|
|
309
|
+
// Defer only a same-step restart bootstrap. A real step/target change
|
|
310
|
+
// should resolve on the first paint.
|
|
311
|
+
setResolveArmed(!(sameIdentity && nonceBumped));
|
|
312
|
+
clearFiberAnchorCache();
|
|
313
|
+
}, [currentStep.id, targetKey, resetNonce]);
|
|
314
|
+
|
|
315
|
+
React.useEffect(() => {
|
|
316
|
+
if (resolveArmed) return;
|
|
317
|
+
const handle = setTimeout(() => {
|
|
318
|
+
if (mountedRef.current) setResolveArmed(true);
|
|
319
|
+
}, FIRST_RESOLVE_DELAY_MS);
|
|
320
|
+
return () => clearTimeout(handle);
|
|
321
|
+
}, [resolveArmed]);
|
|
198
322
|
|
|
199
323
|
const applyTarget = React.useCallback((next: Rect | null) => {
|
|
200
324
|
if (!mountedRef.current) return;
|
|
325
|
+
targetStepIdRef.current = next == null ? null : currentStepIdRef.current;
|
|
201
326
|
if (rectsEqual(targetRef.current, next)) return;
|
|
202
327
|
if (next == null) {
|
|
203
328
|
// The anchor went away (unmount / navigation), so whatever scroll position
|
|
@@ -215,25 +340,45 @@ export function TooltipSurface({
|
|
|
215
340
|
setMeasureAttempted((prev) => (prev ? prev : true));
|
|
216
341
|
}, []);
|
|
217
342
|
|
|
343
|
+
/**
|
|
344
|
+
* Forget the resolved host and report the target as gone. Bumping the epoch
|
|
345
|
+
* voids any measurement still in flight for it, and releasing the in-flight
|
|
346
|
+
* guard lets the next resolve measure immediately instead of waiting on a
|
|
347
|
+
* callback that no longer means anything.
|
|
348
|
+
*/
|
|
349
|
+
const dropHost = React.useCallback(() => {
|
|
350
|
+
resolveEpochRef.current += 1;
|
|
351
|
+
measureInFlightRef.current = false;
|
|
352
|
+
hostFiberRef.current = null;
|
|
353
|
+
hostMeasureRef.current = null;
|
|
354
|
+
hostScrollIntoViewRef.current = undefined;
|
|
355
|
+
fiberCacheIdRef.current = null;
|
|
356
|
+
markMeasureAttempted();
|
|
357
|
+
applyTarget(null);
|
|
358
|
+
}, [applyTarget, markMeasureAttempted]);
|
|
359
|
+
|
|
218
360
|
const effectiveViewport = React.useCallback(() => {
|
|
219
361
|
const windowSize = Dimensions.get('window');
|
|
220
362
|
const scrollPadding = getScrollPadding();
|
|
363
|
+
const layoutPad = paddingAsEdgeInsets(insetsRef.current);
|
|
221
364
|
return buildEffectiveViewport(
|
|
222
365
|
{
|
|
223
366
|
width: windowSize.width,
|
|
224
367
|
height: Math.max(0, windowSize.height - keyboardBottomInsetRef.current),
|
|
225
368
|
},
|
|
226
369
|
{
|
|
227
|
-
top:
|
|
228
|
-
right:
|
|
229
|
-
bottom:
|
|
230
|
-
left:
|
|
370
|
+
top: layoutPad.top + (scrollPadding?.top ?? 0),
|
|
371
|
+
right: layoutPad.right + (scrollPadding?.right ?? 0),
|
|
372
|
+
bottom: layoutPad.bottom + (scrollPadding?.bottom ?? 0),
|
|
373
|
+
left: layoutPad.left + (scrollPadding?.left ?? 0),
|
|
231
374
|
},
|
|
232
375
|
);
|
|
233
376
|
}, []);
|
|
234
377
|
|
|
235
378
|
const maybeScrollIntoView = React.useCallback(
|
|
236
379
|
(rect: Rect) => {
|
|
380
|
+
// Scrolling the app to reveal a target we are fading away from is visible.
|
|
381
|
+
if (exitingRef.current) return;
|
|
237
382
|
if (scrollSettledRef.current) return;
|
|
238
383
|
if (isRectFullyVisible(rect, effectiveViewport())) {
|
|
239
384
|
scrollSettledRef.current = true;
|
|
@@ -271,43 +416,41 @@ export function TooltipSurface({
|
|
|
271
416
|
const resolveTarget = React.useCallback(() => {
|
|
272
417
|
if (!mountedRef.current) return;
|
|
273
418
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
const resolution = resolveAnchorHost(anchorId);
|
|
284
|
-
if (resolution.status !== 'found') {
|
|
285
|
-
hostFiberRef.current = null;
|
|
286
|
-
hostMeasureRef.current = null;
|
|
287
|
-
hostScrollIntoViewRef.current = undefined;
|
|
288
|
-
markMeasureAttempted();
|
|
289
|
-
applyTarget(null);
|
|
419
|
+
const resolution = isAuto
|
|
420
|
+
? resolveAutoAnchorHost(autoData)
|
|
421
|
+
: anchorId
|
|
422
|
+
? resolveAnchorHost(anchorId)
|
|
423
|
+
: null;
|
|
424
|
+
if (!resolution || resolution.status !== 'found') {
|
|
425
|
+
dropHost();
|
|
290
426
|
return;
|
|
291
427
|
}
|
|
292
428
|
|
|
293
429
|
hostFiberRef.current = resolution.fiber ?? null;
|
|
294
430
|
hostMeasureRef.current = resolution.host.measureInWindow;
|
|
295
431
|
hostScrollIntoViewRef.current = resolution.host.scrollIntoView;
|
|
432
|
+
fiberCacheIdRef.current =
|
|
433
|
+
'fiberCacheId' in resolution && typeof resolution.fiberCacheId === 'string'
|
|
434
|
+
? resolution.fiberCacheId
|
|
435
|
+
: (anchorId ?? null);
|
|
296
436
|
|
|
297
437
|
// Kick an immediate measure after resolve so the first paint isn't waiting
|
|
298
438
|
// on the next rAF (and so missing targets still mark attempted).
|
|
299
439
|
if (measureInFlightRef.current) return;
|
|
440
|
+
const epoch = resolveEpochRef.current;
|
|
300
441
|
measureInFlightRef.current = true;
|
|
301
442
|
resolution.host.measureInWindow((x, y, width, height) => {
|
|
443
|
+
if (resolveEpochRef.current !== epoch) {
|
|
444
|
+
measureInFlightRef.current = false;
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
302
447
|
measureInFlightRef.current = false;
|
|
303
448
|
if (!mountedRef.current) return;
|
|
304
449
|
|
|
305
450
|
if (width <= 0 || height <= 0) {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
markMeasureAttempted();
|
|
310
|
-
applyTarget(null);
|
|
451
|
+
const cacheId = fiberCacheIdRef.current;
|
|
452
|
+
if (cacheId) invalidateFiberAnchor(cacheId);
|
|
453
|
+
dropHost();
|
|
311
454
|
return;
|
|
312
455
|
}
|
|
313
456
|
|
|
@@ -315,7 +458,7 @@ export function TooltipSurface({
|
|
|
315
458
|
maybeScrollIntoView(rect);
|
|
316
459
|
applyTarget(rect);
|
|
317
460
|
});
|
|
318
|
-
}, [anchorId, applyTarget,
|
|
461
|
+
}, [anchorId, applyTarget, autoData, dropHost, isAuto, maybeScrollIntoView]);
|
|
319
462
|
|
|
320
463
|
/**
|
|
321
464
|
* Live re-measure of an already-resolved host. Driven by the shared rAF hub
|
|
@@ -327,17 +470,20 @@ export function TooltipSurface({
|
|
|
327
470
|
const measure = hostMeasureRef.current;
|
|
328
471
|
if (!measure) return;
|
|
329
472
|
|
|
473
|
+
const epoch = resolveEpochRef.current;
|
|
330
474
|
measureInFlightRef.current = true;
|
|
331
475
|
measure((x, y, width, height) => {
|
|
476
|
+
if (resolveEpochRef.current !== epoch) {
|
|
477
|
+
measureInFlightRef.current = false;
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
332
480
|
measureInFlightRef.current = false;
|
|
333
481
|
if (!mountedRef.current) return;
|
|
334
482
|
|
|
335
483
|
if (width <= 0 || height <= 0) {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
markMeasureAttempted();
|
|
340
|
-
applyTarget(null);
|
|
484
|
+
const cacheId = fiberCacheIdRef.current;
|
|
485
|
+
if (cacheId) invalidateFiberAnchor(cacheId);
|
|
486
|
+
dropHost();
|
|
341
487
|
return;
|
|
342
488
|
}
|
|
343
489
|
|
|
@@ -345,14 +491,18 @@ export function TooltipSurface({
|
|
|
345
491
|
maybeScrollIntoView(rect);
|
|
346
492
|
applyTarget(rect);
|
|
347
493
|
});
|
|
348
|
-
}, [
|
|
494
|
+
}, [applyTarget, dropHost, maybeScrollIntoView]);
|
|
349
495
|
|
|
350
496
|
React.useEffect(() => {
|
|
497
|
+
if (!resolveArmed) return;
|
|
351
498
|
resolveTarget();
|
|
352
|
-
}, [resolveTarget, registryTick]);
|
|
499
|
+
}, [resolveTarget, registryTick, resolveArmed]);
|
|
353
500
|
|
|
354
501
|
// Resolve poll: recover missing / remounted anchors. Live measurement is on rAF.
|
|
355
502
|
React.useEffect(() => {
|
|
503
|
+
if (!resolveArmed) {
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
356
506
|
const allowsRecovery =
|
|
357
507
|
behavior === 'FLAG' || behavior === 'ERROR' || (behavior === 'END' && session.draftMode);
|
|
358
508
|
const pauseAfterReport = missingMode === 'reported' && !allowsRecovery;
|
|
@@ -381,7 +531,7 @@ export function TooltipSurface({
|
|
|
381
531
|
kbShow.remove();
|
|
382
532
|
kbHide.remove();
|
|
383
533
|
};
|
|
384
|
-
}, [resolveTarget, missingMode, behavior, session.draftMode]);
|
|
534
|
+
}, [resolveTarget, missingMode, behavior, session.draftMode, resolveArmed]);
|
|
385
535
|
|
|
386
536
|
// rAF tracking while a host is resolved (and we are not paused after report).
|
|
387
537
|
React.useEffect(() => {
|
|
@@ -422,7 +572,7 @@ export function TooltipSurface({
|
|
|
422
572
|
|
|
423
573
|
const ms = parseToleranceMs(theme.tooltipMissingToleranceSeconds);
|
|
424
574
|
const timer = setTimeout(() => {
|
|
425
|
-
if (!mountedRef.current || reportedRef.current) return;
|
|
575
|
+
if (!mountedRef.current || exitingRef.current || reportedRef.current) return;
|
|
426
576
|
reportedRef.current = true;
|
|
427
577
|
setMissingMode('reported');
|
|
428
578
|
void engine.reportTooltipTargetMissing(currentStep.id);
|
|
@@ -458,7 +608,40 @@ export function TooltipSurface({
|
|
|
458
608
|
[windowDims.width, windowDims.height, keyboardBottomInset],
|
|
459
609
|
);
|
|
460
610
|
const cardMaxWidth = resolveTooltipCardMaxWidth(theme, currentStep.width, windowSize.width);
|
|
461
|
-
const
|
|
611
|
+
const viewportMaxHeight = resolveModalCardMaxHeight(windowSize.height, layoutInsets);
|
|
612
|
+
const minCardHeight = tooltipMinCardHeight({
|
|
613
|
+
contentPadding: chrome.contentPadding,
|
|
614
|
+
borderWidth: chrome.borderWidth,
|
|
615
|
+
cardMaxHeight: viewportMaxHeight,
|
|
616
|
+
});
|
|
617
|
+
const minSideCardWidth = tooltipMinSideCardWidth({
|
|
618
|
+
contentPadding: chrome.contentPadding,
|
|
619
|
+
borderWidth: chrome.borderWidth,
|
|
620
|
+
cardMaxWidth,
|
|
621
|
+
});
|
|
622
|
+
const sideCardWidth = React.useMemo(() => {
|
|
623
|
+
if (!target) return null;
|
|
624
|
+
if (desiredPlacement !== 'LEFT' && desiredPlacement !== 'RIGHT') return null;
|
|
625
|
+
const placementTarget = expandRect(target, backdropPadding + outsideHighlightSpread);
|
|
626
|
+
return resolveTooltipSideCardWidth({
|
|
627
|
+
placement: desiredPlacement,
|
|
628
|
+
target: placementTarget,
|
|
629
|
+
windowWidth: windowSize.width,
|
|
630
|
+
notchSize: chrome.notchSize,
|
|
631
|
+
cardMaxWidth,
|
|
632
|
+
minWidth: minSideCardWidth,
|
|
633
|
+
});
|
|
634
|
+
}, [
|
|
635
|
+
target,
|
|
636
|
+
desiredPlacement,
|
|
637
|
+
backdropPadding,
|
|
638
|
+
outsideHighlightSpread,
|
|
639
|
+
windowSize.width,
|
|
640
|
+
chrome.notchSize,
|
|
641
|
+
cardMaxWidth,
|
|
642
|
+
minSideCardWidth,
|
|
643
|
+
]);
|
|
644
|
+
const defaultCardLayoutStyle = resolveTooltipCardLayout(cardMaxWidth, windowSize.width);
|
|
462
645
|
const buttonsAlign = resolveTooltipButtonsAlign(theme);
|
|
463
646
|
const progressBarProps = {
|
|
464
647
|
enabled: theme.progressBarEnabled,
|
|
@@ -480,37 +663,94 @@ export function TooltipSurface({
|
|
|
480
663
|
|
|
481
664
|
const layout = React.useMemo(() => {
|
|
482
665
|
if (!target) return null;
|
|
666
|
+
// A target left over from the previous step belongs to that step's
|
|
667
|
+
// measurement; placing against it would also reuse that step's card size.
|
|
668
|
+
if (targetStepIdRef.current !== currentStep.id) return null;
|
|
669
|
+
const placementTarget = expandRect(target, backdropPadding + outsideHighlightSpread);
|
|
670
|
+
const viewportInsets = paddingAsEdgeInsets(layoutInsets);
|
|
671
|
+
const height = Math.min(bubbleSize.height, viewportMaxHeight);
|
|
672
|
+
const inferSize =
|
|
673
|
+
sideCardWidth != null ? { width: sideCardWidth, height } : { width: cardMaxWidth, height };
|
|
483
674
|
const nextPlacement = inferTooltipPlacement({
|
|
484
|
-
target,
|
|
485
|
-
bubbleSize,
|
|
675
|
+
target: placementTarget,
|
|
676
|
+
bubbleSize: inferSize,
|
|
486
677
|
notchSize: chrome.notchSize,
|
|
487
678
|
windowSize,
|
|
488
679
|
currentPlacement: placementRef.current,
|
|
489
680
|
desiredPlacement,
|
|
681
|
+
viewportInsets,
|
|
682
|
+
minHeight: minCardHeight,
|
|
490
683
|
});
|
|
684
|
+
const honorSide =
|
|
685
|
+
sideCardWidth != null &&
|
|
686
|
+
nextPlacement === desiredPlacement &&
|
|
687
|
+
(nextPlacement === 'LEFT' || nextPlacement === 'RIGHT');
|
|
688
|
+
const fitted = tooltipPlacementFits({
|
|
689
|
+
target: placementTarget,
|
|
690
|
+
bubbleSize: inferSize,
|
|
691
|
+
notchSize: chrome.notchSize,
|
|
692
|
+
windowSize,
|
|
693
|
+
placement: nextPlacement,
|
|
694
|
+
viewportInsets,
|
|
695
|
+
minHeight: minCardHeight,
|
|
696
|
+
});
|
|
697
|
+
let maxCardHeight = viewportMaxHeight;
|
|
698
|
+
if (nextPlacement === 'ABOVE' || nextPlacement === 'BELOW') {
|
|
699
|
+
const gap = tooltipVerticalGap({
|
|
700
|
+
placement: nextPlacement,
|
|
701
|
+
target: placementTarget,
|
|
702
|
+
windowHeight: windowSize.height,
|
|
703
|
+
notchSize: chrome.notchSize,
|
|
704
|
+
viewportInsets,
|
|
705
|
+
});
|
|
706
|
+
const budget = Math.floor(gap);
|
|
707
|
+
if (Number.isFinite(budget) && budget > 0) {
|
|
708
|
+
maxCardHeight = Math.max(minCardHeight, Math.min(viewportMaxHeight, budget));
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
const positionHeight = Math.min(height, maxCardHeight);
|
|
712
|
+
const positionSize = honorSide
|
|
713
|
+
? { width: sideCardWidth, height: positionHeight }
|
|
714
|
+
: { width: cardMaxWidth, height: positionHeight };
|
|
491
715
|
return {
|
|
492
716
|
placement: nextPlacement,
|
|
717
|
+
honorSide,
|
|
718
|
+
fitted,
|
|
719
|
+
maxCardHeight,
|
|
493
720
|
...computeTooltipPosition({
|
|
494
721
|
target,
|
|
495
|
-
bubbleSize,
|
|
722
|
+
bubbleSize: positionSize,
|
|
496
723
|
placement: nextPlacement,
|
|
497
724
|
notchSize: chrome.notchSize,
|
|
498
725
|
backdropPadding,
|
|
726
|
+
outsideHighlightSpread,
|
|
499
727
|
windowSize,
|
|
500
728
|
bubbleBorderRadius: chrome.borderRadius,
|
|
501
729
|
bubbleBorderWidth: chrome.borderWidth,
|
|
730
|
+
viewportInsets,
|
|
502
731
|
}),
|
|
503
732
|
};
|
|
504
733
|
}, [
|
|
505
734
|
target,
|
|
506
735
|
bubbleSize,
|
|
736
|
+
sideCardWidth,
|
|
737
|
+
cardMaxWidth,
|
|
738
|
+
viewportMaxHeight,
|
|
739
|
+
minCardHeight,
|
|
740
|
+
currentStep.id,
|
|
507
741
|
chrome.notchSize,
|
|
508
742
|
chrome.borderRadius,
|
|
509
743
|
chrome.borderWidth,
|
|
510
744
|
windowSize,
|
|
511
745
|
desiredPlacement,
|
|
512
746
|
backdropPadding,
|
|
747
|
+
outsideHighlightSpread,
|
|
748
|
+
layoutInsets,
|
|
513
749
|
]);
|
|
750
|
+
const cardLayoutStyle =
|
|
751
|
+
layout?.honorSide && sideCardWidth != null
|
|
752
|
+
? { width: sideCardWidth, maxWidth: sideCardWidth }
|
|
753
|
+
: defaultCardLayoutStyle;
|
|
514
754
|
|
|
515
755
|
React.useEffect(() => {
|
|
516
756
|
if (layout && layout.placement !== placement) {
|
|
@@ -518,12 +758,58 @@ export function TooltipSurface({
|
|
|
518
758
|
}
|
|
519
759
|
}, [layout, placement]);
|
|
520
760
|
|
|
761
|
+
React.useEffect(() => {
|
|
762
|
+
if (!layout || !target) return;
|
|
763
|
+
if (desiredPlacement !== 'LEFT' && desiredPlacement !== 'RIGHT') return;
|
|
764
|
+
// A target left over from the previous step says nothing about this one.
|
|
765
|
+
if (targetStepIdRef.current !== currentStep.id) return;
|
|
766
|
+
if (!(session.draftMode || __DEV__)) return;
|
|
767
|
+
if (warnedSidePlacementStepRef.current === currentStep.id) return;
|
|
768
|
+
if (layout.placement === desiredPlacement) {
|
|
769
|
+
// Last-resort return of the authored side: nothing actually fit.
|
|
770
|
+
if (layout.fitted) return;
|
|
771
|
+
warnedSidePlacementStepRef.current = currentStep.id;
|
|
772
|
+
warnTooltipPlacementUnanchored({ requested: desiredPlacement });
|
|
773
|
+
return;
|
|
774
|
+
}
|
|
775
|
+
// Only the structural floor — not keyboard / off-screen flips. A resolved
|
|
776
|
+
// width means the room was there and something else moved the card.
|
|
777
|
+
if (sideCardWidth != null) return;
|
|
778
|
+
warnedSidePlacementStepRef.current = currentStep.id;
|
|
779
|
+
const placementTarget = expandRect(target, backdropPadding + outsideHighlightSpread);
|
|
780
|
+
warnTooltipSidePlacementDropped({
|
|
781
|
+
requested: desiredPlacement,
|
|
782
|
+
used: layout.placement,
|
|
783
|
+
availableGap: tooltipSideGap({
|
|
784
|
+
placement: desiredPlacement,
|
|
785
|
+
target: placementTarget,
|
|
786
|
+
windowWidth: windowSize.width,
|
|
787
|
+
notchSize: chrome.notchSize,
|
|
788
|
+
}),
|
|
789
|
+
minWidth: minSideCardWidth,
|
|
790
|
+
});
|
|
791
|
+
}, [
|
|
792
|
+
layout,
|
|
793
|
+
target,
|
|
794
|
+
desiredPlacement,
|
|
795
|
+
sideCardWidth,
|
|
796
|
+
session.draftMode,
|
|
797
|
+
currentStep.id,
|
|
798
|
+
backdropPadding,
|
|
799
|
+
outsideHighlightSpread,
|
|
800
|
+
windowSize.width,
|
|
801
|
+
chrome.notchSize,
|
|
802
|
+
minSideCardWidth,
|
|
803
|
+
]);
|
|
804
|
+
|
|
521
805
|
// Web parity: "When target element is clicked" → step.actions.
|
|
522
806
|
// Observe taps via TargetPressBridge (pass-through); do not steal the press.
|
|
523
807
|
const hasTarget = target != null;
|
|
524
808
|
const targetActions = currentStep.actions;
|
|
525
809
|
React.useEffect(() => {
|
|
526
|
-
|
|
810
|
+
// Release the monitor while exiting: it is a singleton, and a tap landing on
|
|
811
|
+
// the old target would run the departing step's actions.
|
|
812
|
+
if (isExiting || !hasTarget || currentStep.tooltipTargetBlocked || targetActions.length === 0) {
|
|
527
813
|
targetPressMonitor.clear();
|
|
528
814
|
return;
|
|
529
815
|
}
|
|
@@ -531,6 +817,8 @@ export function TooltipSurface({
|
|
|
531
817
|
targetPressMonitor.set({
|
|
532
818
|
getRect: () => targetRef.current,
|
|
533
819
|
onPress: () => {
|
|
820
|
+
// Native touches are async relative to commits, so re-check the phase.
|
|
821
|
+
if (exitingRef.current) return;
|
|
534
822
|
void engine.handleActions(targetActions);
|
|
535
823
|
},
|
|
536
824
|
});
|
|
@@ -538,22 +826,40 @@ export function TooltipSurface({
|
|
|
538
826
|
return () => {
|
|
539
827
|
targetPressMonitor.clear();
|
|
540
828
|
};
|
|
541
|
-
}, [hasTarget, currentStep.tooltipTargetBlocked, targetActions, engine]);
|
|
829
|
+
}, [hasTarget, currentStep.tooltipTargetBlocked, targetActions, engine, isExiting]);
|
|
830
|
+
|
|
831
|
+
// Painted from mount rather than once the target lands, so a modal → tooltip
|
|
832
|
+
// swap keeps the dim continuous instead of blinking it off for the frames the
|
|
833
|
+
// anchor takes to measure. The hole opens when `layout` arrives.
|
|
834
|
+
// Always mount the cutout: when `backdrop` is off the dim opacity is 0 but
|
|
835
|
+
// the bands still block host taps (unless interaction blocking is disabled).
|
|
836
|
+
const interactionBlocker = (
|
|
837
|
+
<TooltipCutout
|
|
838
|
+
targetRect={layout?.targetHighlightRect ?? null}
|
|
839
|
+
backdropColor={theme.backdropColor}
|
|
840
|
+
backdropOpacity={currentStep.backdrop ? backdropOpacity : 0}
|
|
841
|
+
targetBlocked={currentStep.tooltipTargetBlocked}
|
|
842
|
+
/>
|
|
843
|
+
);
|
|
542
844
|
|
|
543
845
|
if (hideAfterEnd) {
|
|
544
846
|
return null;
|
|
545
847
|
}
|
|
546
848
|
|
|
547
|
-
|
|
849
|
+
const showBranding = session.flow.company.flowBranding;
|
|
850
|
+
const contentPadding = chrome.contentPadding;
|
|
851
|
+
|
|
852
|
+
// Still pending the first measure attempt — only the blocker shows.
|
|
548
853
|
if (isMissing && missingMode === 'waiting' && !measureAttempted) {
|
|
549
|
-
return
|
|
854
|
+
return backdropOnly(interactionBlocker);
|
|
550
855
|
}
|
|
551
856
|
|
|
552
857
|
if (showWaitingUi) {
|
|
553
858
|
return (
|
|
554
859
|
<View style={styles.root} testID="userflow-tooltip-surface" pointerEvents="box-none">
|
|
860
|
+
{interactionBlocker}
|
|
555
861
|
<View style={[styles.center, centerPaddingStyle]} pointerEvents="box-none">
|
|
556
|
-
<
|
|
862
|
+
<CardFade
|
|
557
863
|
testID="userflow-tooltip-waiting"
|
|
558
864
|
accessibilityViewIsModal
|
|
559
865
|
pointerEvents="auto"
|
|
@@ -564,26 +870,39 @@ export function TooltipSurface({
|
|
|
564
870
|
{
|
|
565
871
|
borderRadius: chrome.borderRadius,
|
|
566
872
|
backgroundColor: chrome.backgroundColor,
|
|
873
|
+
maxHeight: viewportMaxHeight,
|
|
567
874
|
},
|
|
568
875
|
]}
|
|
569
876
|
>
|
|
570
877
|
{/* Shadow on the outer shell — fill clips and iOS would clip the shadow. */}
|
|
571
|
-
<View
|
|
572
|
-
|
|
573
|
-
>
|
|
574
|
-
<ActivityIndicator color={theme.fontColor} />
|
|
575
|
-
<Text
|
|
878
|
+
<View style={[chrome.fillStyle, { maxHeight: viewportMaxHeight, minHeight: 0 }]}>
|
|
879
|
+
<View
|
|
576
880
|
style={{
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
881
|
+
paddingHorizontal: contentPadding,
|
|
882
|
+
paddingTop: contentPadding,
|
|
883
|
+
paddingBottom: showBranding ? MADE_WITH_USERFLOW_GAP : contentPadding,
|
|
884
|
+
alignItems: 'center',
|
|
581
885
|
}}
|
|
582
886
|
>
|
|
583
|
-
|
|
584
|
-
|
|
887
|
+
<ActivityIndicator color={theme.fontColor} />
|
|
888
|
+
<Text
|
|
889
|
+
style={{
|
|
890
|
+
color: theme.fontColor,
|
|
891
|
+
fontSize: theme.fontSize,
|
|
892
|
+
marginTop: 12,
|
|
893
|
+
textAlign: 'center',
|
|
894
|
+
}}
|
|
895
|
+
>
|
|
896
|
+
Looking for target…
|
|
897
|
+
</Text>
|
|
898
|
+
</View>
|
|
899
|
+
<MadeWithUserflow
|
|
900
|
+
company={session.flow.company}
|
|
901
|
+
color={theme.fontColor}
|
|
902
|
+
contentPadding={contentPadding}
|
|
903
|
+
/>
|
|
585
904
|
</View>
|
|
586
|
-
</
|
|
905
|
+
</CardFade>
|
|
587
906
|
</View>
|
|
588
907
|
</View>
|
|
589
908
|
);
|
|
@@ -591,8 +910,6 @@ export function TooltipSurface({
|
|
|
591
910
|
|
|
592
911
|
const progressTop = theme.progressBarEnabled && theme.progressBarPosition === 'TOP';
|
|
593
912
|
const progressBottom = theme.progressBarEnabled && theme.progressBarPosition === 'BOTTOM';
|
|
594
|
-
const showBranding = session.flow.company.flowBranding;
|
|
595
|
-
const contentPadding = chrome.contentPadding;
|
|
596
913
|
|
|
597
914
|
const cardBody = (
|
|
598
915
|
<>
|
|
@@ -653,8 +970,9 @@ export function TooltipSurface({
|
|
|
653
970
|
if (showAsBubbleFallback || showMissingUi) {
|
|
654
971
|
return (
|
|
655
972
|
<View style={styles.root} testID="userflow-tooltip-surface" pointerEvents="box-none">
|
|
973
|
+
{interactionBlocker}
|
|
656
974
|
<View style={[styles.center, centerPaddingStyle]} pointerEvents="box-none">
|
|
657
|
-
<
|
|
975
|
+
<CardFade
|
|
658
976
|
testID="userflow-tooltip-card"
|
|
659
977
|
accessibilityViewIsModal
|
|
660
978
|
pointerEvents="auto"
|
|
@@ -666,37 +984,38 @@ export function TooltipSurface({
|
|
|
666
984
|
{
|
|
667
985
|
borderRadius: chrome.borderRadius,
|
|
668
986
|
backgroundColor: chrome.backgroundColor,
|
|
987
|
+
maxHeight: viewportMaxHeight,
|
|
669
988
|
},
|
|
670
989
|
]}
|
|
671
990
|
>
|
|
672
991
|
{/* Shadow lives on the outer layer: the fill clips its content and
|
|
673
992
|
iOS clips the shadow with it. */}
|
|
674
|
-
<View style={[chrome.fillStyle, styles.fallbackFill]}>
|
|
675
|
-
|
|
993
|
+
<View style={[chrome.fillStyle, styles.fallbackFill, { maxHeight: viewportMaxHeight }]}>
|
|
994
|
+
{cardBody}
|
|
995
|
+
</View>
|
|
996
|
+
</CardFade>
|
|
676
997
|
</View>
|
|
677
998
|
</View>
|
|
678
999
|
);
|
|
679
1000
|
}
|
|
680
1001
|
|
|
681
1002
|
if (!layout || !target) {
|
|
682
|
-
return
|
|
1003
|
+
return backdropOnly(interactionBlocker);
|
|
683
1004
|
}
|
|
684
1005
|
|
|
685
1006
|
return (
|
|
686
1007
|
<View style={styles.root} testID="userflow-tooltip-surface" pointerEvents="box-none">
|
|
687
|
-
{
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
backdropColor={theme.backdropColor}
|
|
691
|
-
backdropOpacity={backdropOpacity}
|
|
692
|
-
targetBlocked={currentStep.tooltipTargetBlocked}
|
|
693
|
-
/>
|
|
1008
|
+
{interactionBlocker}
|
|
1009
|
+
{highlight ? (
|
|
1010
|
+
<TooltipHighlight targetRect={layout.targetHighlightRect} chrome={highlight} />
|
|
694
1011
|
) : null}
|
|
695
1012
|
|
|
696
1013
|
<TooltipBubble
|
|
697
1014
|
chrome={chrome}
|
|
698
1015
|
notchPosition={layout.notchPosition}
|
|
699
1016
|
onLayout={onCardLayout}
|
|
1017
|
+
maxHeight={layout.maxCardHeight}
|
|
1018
|
+
showNotch={layout.showNotch}
|
|
700
1019
|
style={{
|
|
701
1020
|
position: 'absolute',
|
|
702
1021
|
left: layout.cardPosition.x,
|
|
@@ -720,18 +1039,19 @@ const styles = StyleSheet.create({
|
|
|
720
1039
|
alignItems: 'center',
|
|
721
1040
|
},
|
|
722
1041
|
fallbackCard: {
|
|
723
|
-
maxHeight: '80%',
|
|
724
1042
|
flexShrink: 1,
|
|
725
1043
|
},
|
|
726
1044
|
fallbackFill: {
|
|
727
1045
|
flexShrink: 1,
|
|
1046
|
+
minHeight: 0,
|
|
728
1047
|
},
|
|
729
1048
|
waitingCard: {
|
|
730
1049
|
width: '100%',
|
|
731
1050
|
},
|
|
732
1051
|
scroll: {
|
|
733
|
-
flexGrow:
|
|
1052
|
+
flexGrow: 1,
|
|
734
1053
|
flexShrink: 1,
|
|
1054
|
+
minHeight: 0,
|
|
735
1055
|
},
|
|
736
1056
|
scrollContent: {
|
|
737
1057
|
flexGrow: 1,
|