@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
|
@@ -3,35 +3,49 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ActivityIndicator, Dimensions, Keyboard, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
5
5
|
import { anchorRegistry } from "../anchors/AnchorRegistry.js";
|
|
6
|
+
import { autoAnchorRegistry } from "../anchors/AutoAnchorRegistry.js";
|
|
6
7
|
import { addAnimationFrameCallback, removeAnimationFrameCallback } from "../anchors/animationFrame.js";
|
|
7
8
|
import { fiberScanRoot } from "../anchors/fiber/FiberScanRoot.js";
|
|
8
|
-
import { invalidateFiberAnchor, resolveAnchorHost } from "../anchors/resolveAnchorHost.js";
|
|
9
|
+
import { clearFiberAnchorCache, invalidateFiberAnchor, resolveAnchorHost } from "../anchors/resolveAnchorHost.js";
|
|
10
|
+
import { resolveAutoAnchorHost } from "../anchors/resolveAutoAnchorHost.js";
|
|
9
11
|
import { resolveManualAnchorId } from "../anchors/resolveManualAnchorId.js";
|
|
10
12
|
import { scrollAnchorIntoView } from "../anchors/scrollAnchorIntoView.js";
|
|
11
13
|
import { getScrollPadding } from "../anchors/scrollConfig.js";
|
|
12
14
|
import { targetPressMonitor } from "../anchors/targetPressMonitor.js";
|
|
13
15
|
import { RichContentRenderer } from "../content/RichContentRenderer.js";
|
|
16
|
+
import { CardFade } from "./CardFade.js";
|
|
14
17
|
import { CloseButton } from "./CloseButton.js";
|
|
15
|
-
import { resolveCloseButtonColor } from "./resolveCloseButtonColor.js";
|
|
16
18
|
import { MADE_WITH_USERFLOW_GAP, MadeWithUserflow } from "./MadeWithUserflow.js";
|
|
17
19
|
import { ProgressBar } from "./ProgressBar.js";
|
|
18
20
|
import { ABSOLUTE_FILL } from "./absoluteFill.js";
|
|
21
|
+
import { useCardTransitionPhase } from "./cardTransition.js";
|
|
19
22
|
import { parseBackdropOpacity } from "./parseBackdropOpacity.js";
|
|
20
23
|
import { resolveStepProgress } from "./progress.js";
|
|
21
|
-
import {
|
|
24
|
+
import { resolveCloseButtonColor } from "./resolveCloseButtonColor.js";
|
|
25
|
+
import { outsideHighlightOutset, resolveHighlightChrome } from "./resolveHighlightChrome.js";
|
|
26
|
+
import { resolveModalCardMaxHeight } from "./resolveModalLayout.js";
|
|
27
|
+
import { resolveTooltipButtonsAlign, resolveTooltipCardLayout, resolveTooltipCardMaxWidth } from "./resolveTooltipLayout.js";
|
|
28
|
+
import { paddingAsEdgeInsets, useSurfaceLayoutInsets } from "./surfaceLayoutInsets.js";
|
|
22
29
|
import { resolveBubbleChrome } from "./themeChrome.js";
|
|
23
30
|
import { TooltipBubble } from "./tooltip/TooltipBubble.js";
|
|
24
31
|
import { TooltipCutout } from "./tooltip/TooltipCutout.js";
|
|
32
|
+
import { TooltipHighlight } from "./tooltip/TooltipHighlight.js";
|
|
25
33
|
import { computeTooltipPosition } from "./tooltip/computeTooltipPosition.js";
|
|
26
|
-
import { inferTooltipPlacement } from "./tooltip/inferTooltipPlacement.js";
|
|
34
|
+
import { inferTooltipPlacement, tooltipPlacementFits } from "./tooltip/inferTooltipPlacement.js";
|
|
27
35
|
import { parseBackdropPadding } from "./tooltip/parseBackdropPadding.js";
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
36
|
+
import { warnTooltipPlacementUnanchored, warnTooltipSidePlacementDropped } from "./tooltip/placementDiagnostics.js";
|
|
37
|
+
import { buildEffectiveViewport, expandRect, isRectFullyVisible, rectsEqual } from "./tooltip/rect.js";
|
|
38
|
+
import { resolveTooltipSideCardWidth, tooltipMinCardHeight, tooltipMinSideCardWidth, tooltipSideGap, tooltipVerticalGap } from "./tooltip/resolveSideCardWidth.js";
|
|
30
39
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
31
40
|
/** Interval for re-resolving a missing / remounted anchor (not for live measure). */
|
|
32
41
|
const RESOLVE_MS = 250;
|
|
33
42
|
/** Slower resolve poll after FLAG/ERROR report so a late-mounting target can recover. */
|
|
34
43
|
const RESOLVE_SLOW_MS = 1000;
|
|
44
|
+
/**
|
|
45
|
+
* One-frame delay before the first resolve after a step/reset so dialog
|
|
46
|
+
* teardown cannot arm the missing-target timer with a 0-size measure.
|
|
47
|
+
*/
|
|
48
|
+
export const FIRST_RESOLVE_DELAY_MS = 16;
|
|
35
49
|
/**
|
|
36
50
|
* Max scroll-into-view attempts per step while the target stays partially
|
|
37
51
|
* clipped. Only a safety net for targets that can never become fully visible —
|
|
@@ -55,6 +69,19 @@ function missingBehavior(theme) {
|
|
|
55
69
|
return String(theme.tooltipMissingBehavior ?? 'FLAG').toUpperCase();
|
|
56
70
|
}
|
|
57
71
|
|
|
72
|
+
/** Dim with no card yet, for the frames between mount and the first measure. */
|
|
73
|
+
function backdropOnly(blocker) {
|
|
74
|
+
if (blocker == null) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return /*#__PURE__*/_jsx(View, {
|
|
78
|
+
style: styles.root,
|
|
79
|
+
testID: "userflow-tooltip-surface",
|
|
80
|
+
pointerEvents: "box-none",
|
|
81
|
+
children: blocker
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
58
85
|
/**
|
|
59
86
|
* Anchored tooltip chrome: measure manual / fiber anchor, place with web flip/shift,
|
|
60
87
|
* optional cutout backdrop, missing-target report + theme fallbacks.
|
|
@@ -64,7 +91,8 @@ export function TooltipSurface({
|
|
|
64
91
|
session,
|
|
65
92
|
currentStep,
|
|
66
93
|
theme,
|
|
67
|
-
lookupAttribute
|
|
94
|
+
lookupAttribute,
|
|
95
|
+
resetNonce = 0
|
|
68
96
|
}) {
|
|
69
97
|
const version = session.version;
|
|
70
98
|
const chrome = resolveBubbleChrome(theme, 'tooltip');
|
|
@@ -72,13 +100,32 @@ export function TooltipSurface({
|
|
|
72
100
|
const showClose = !version.closeDisabled;
|
|
73
101
|
const backdropOpacity = parseBackdropOpacity(theme.backdropOpacity);
|
|
74
102
|
const backdropPadding = parseBackdropPadding(currentStep.backdropPadding);
|
|
75
|
-
const
|
|
103
|
+
const selector = currentStep.selector;
|
|
104
|
+
const isAuto = selector?.type === 'AUTO';
|
|
105
|
+
const autoData = selector?.autoData ?? null;
|
|
106
|
+
const anchorId = isAuto ? null : resolveManualAnchorId(selector?.css);
|
|
107
|
+
const targetKey = isAuto ? `auto:${autoData ?? ''}` : anchorId ?? '';
|
|
108
|
+
const highlight = currentStep.backdrop ? resolveHighlightChrome(theme, backdropPadding) : null;
|
|
109
|
+
const outsideHighlightSpread = highlight ? outsideHighlightOutset(highlight) : 0;
|
|
76
110
|
const desiredPlacement = normalizePlacement(currentStep.tooltipPlacement);
|
|
77
111
|
const behavior = missingBehavior(theme);
|
|
78
|
-
|
|
79
|
-
|
|
112
|
+
/**
|
|
113
|
+
* An exiting card stays mounted for the fade, so anything it fires belongs to
|
|
114
|
+
* a step the user already left. Mirrored into a ref for the callbacks that run
|
|
115
|
+
* outside render (native touches, measure callbacks, timers).
|
|
116
|
+
*/
|
|
117
|
+
const isExiting = useCardTransitionPhase() === 'exiting';
|
|
118
|
+
const exitingRef = React.useRef(isExiting);
|
|
119
|
+
exitingRef.current = isExiting;
|
|
120
|
+
const layoutInsets = useSurfaceLayoutInsets();
|
|
121
|
+
const centerPaddingStyle = layoutInsets;
|
|
80
122
|
const [keyboardBottomInset, setKeyboardBottomInset] = React.useState(0);
|
|
81
123
|
const [target, setTarget] = React.useState(null);
|
|
124
|
+
/**
|
|
125
|
+
* Placeholder until the card's first `onLayout`. A narrowed LEFT/RIGHT can
|
|
126
|
+
* leave a 2–3× smaller/taller measurement here; that must not leak into the
|
|
127
|
+
* next step's `fits()` (see the reset on `currentStep.id`).
|
|
128
|
+
*/
|
|
82
129
|
const [bubbleSize, setBubbleSize] = React.useState({
|
|
83
130
|
width: 280,
|
|
84
131
|
height: 160
|
|
@@ -88,9 +135,21 @@ export function TooltipSurface({
|
|
|
88
135
|
const [registryTick, setRegistryTick] = React.useState(0);
|
|
89
136
|
/** True after at least one *failed* measure for the current step/anchor. */
|
|
90
137
|
const [measureAttempted, setMeasureAttempted] = React.useState(false);
|
|
138
|
+
/**
|
|
139
|
+
* False only after a same-step `resetNonce` bump (preview restart) until one
|
|
140
|
+
* frame has passed, so dialog teardown cannot 0-size FLAG.
|
|
141
|
+
*/
|
|
142
|
+
const [resolveArmed, setResolveArmed] = React.useState(true);
|
|
143
|
+
const targetingIdentityRef = React.useRef({
|
|
144
|
+
stepId: currentStep.id,
|
|
145
|
+
targetKey,
|
|
146
|
+
resetNonce
|
|
147
|
+
});
|
|
91
148
|
const reportedRef = React.useRef(false);
|
|
92
149
|
const placementRef = React.useRef(placement);
|
|
93
150
|
placementRef.current = placement;
|
|
151
|
+
const desiredPlacementRef = React.useRef(desiredPlacement);
|
|
152
|
+
desiredPlacementRef.current = desiredPlacement;
|
|
94
153
|
const mountedRef = React.useRef(true);
|
|
95
154
|
const targetRef = React.useRef(null);
|
|
96
155
|
/** Bounded scroll-into-view attempts for the current step. */
|
|
@@ -103,14 +162,33 @@ export function TooltipSurface({
|
|
|
103
162
|
const scrollSettledRef = React.useRef(false);
|
|
104
163
|
/** In-flight measureInWindow guard for the rAF loop. */
|
|
105
164
|
const measureInFlightRef = React.useRef(false);
|
|
165
|
+
/**
|
|
166
|
+
* Bumped whenever the resolved host is dropped. `measureInWindow` is async, so
|
|
167
|
+
* a measurement dispatched before the drop can still land after it — without
|
|
168
|
+
* this guard it re-anchors a target the resolver has already rejected, and the
|
|
169
|
+
* tooltip flip-flops between anchored and "looking for target".
|
|
170
|
+
*/
|
|
171
|
+
const resolveEpochRef = React.useRef(0);
|
|
106
172
|
/** Latest resolved host fiber (for scroll-ancestor walk + rAF remeasure). */
|
|
107
173
|
const hostFiberRef = React.useRef(null);
|
|
108
174
|
const hostMeasureRef = React.useRef(null);
|
|
109
175
|
const hostScrollIntoViewRef = React.useRef(undefined);
|
|
176
|
+
/** Fiber-cache key for the current host; AUTO exact-id path sets this even when `anchorId` is null. */
|
|
177
|
+
const fiberCacheIdRef = React.useRef(null);
|
|
178
|
+
/** Step id we already warned about for a dropped LEFT/RIGHT placement. */
|
|
179
|
+
const warnedSidePlacementStepRef = React.useRef(null);
|
|
180
|
+
const currentStepIdRef = React.useRef(currentStep.id);
|
|
181
|
+
currentStepIdRef.current = currentStep.id;
|
|
182
|
+
/**
|
|
183
|
+
* Step the current `target` rect was measured for. A step advance re-renders
|
|
184
|
+
* with the new step before the reset effect clears `target`, so for one commit
|
|
185
|
+
* the new step's placement is evaluated against the previous target.
|
|
186
|
+
*/
|
|
187
|
+
const targetStepIdRef = React.useRef(null);
|
|
110
188
|
const keyboardBottomInsetRef = React.useRef(keyboardBottomInset);
|
|
111
189
|
keyboardBottomInsetRef.current = keyboardBottomInset;
|
|
112
|
-
const insetsRef = React.useRef(
|
|
113
|
-
insetsRef.current =
|
|
190
|
+
const insetsRef = React.useRef(layoutInsets);
|
|
191
|
+
insetsRef.current = layoutInsets;
|
|
114
192
|
const missingModeRef = React.useRef(missingMode);
|
|
115
193
|
missingModeRef.current = missingMode;
|
|
116
194
|
const behaviorRef = React.useRef(behavior);
|
|
@@ -129,9 +207,11 @@ export function TooltipSurface({
|
|
|
129
207
|
React.useEffect(() => {
|
|
130
208
|
const bump = () => setRegistryTick(n => n + 1);
|
|
131
209
|
const unsubRegistry = anchorRegistry.subscribe(bump);
|
|
210
|
+
const unsubAuto = autoAnchorRegistry.subscribe(bump);
|
|
132
211
|
const unsubScan = fiberScanRoot.subscribe(bump);
|
|
133
212
|
return () => {
|
|
134
213
|
unsubRegistry();
|
|
214
|
+
unsubAuto();
|
|
135
215
|
unsubScan();
|
|
136
216
|
};
|
|
137
217
|
}, []);
|
|
@@ -140,16 +220,49 @@ export function TooltipSurface({
|
|
|
140
220
|
scrollAttemptsRef.current = 0;
|
|
141
221
|
scrollSettledRef.current = false;
|
|
142
222
|
measureInFlightRef.current = false;
|
|
223
|
+
resolveEpochRef.current += 1;
|
|
143
224
|
hostFiberRef.current = null;
|
|
144
225
|
hostMeasureRef.current = null;
|
|
145
226
|
hostScrollIntoViewRef.current = undefined;
|
|
227
|
+
fiberCacheIdRef.current = null;
|
|
228
|
+
warnedSidePlacementStepRef.current = null;
|
|
229
|
+
targetStepIdRef.current = null;
|
|
146
230
|
targetRef.current = null;
|
|
231
|
+
// Drop the previous card's measured size and side so the next step does not
|
|
232
|
+
// inherit a wrapped 115×400 LEFT into `fits(currentPlacement)`.
|
|
233
|
+
const nextPlacement = desiredPlacementRef.current ?? 'BELOW';
|
|
234
|
+
placementRef.current = nextPlacement;
|
|
235
|
+
setPlacement(nextPlacement);
|
|
236
|
+
setBubbleSize({
|
|
237
|
+
width: 280,
|
|
238
|
+
height: 160
|
|
239
|
+
});
|
|
147
240
|
setMissingMode('waiting');
|
|
148
241
|
setMeasureAttempted(false);
|
|
149
242
|
setTarget(null);
|
|
150
|
-
|
|
243
|
+
const prev = targetingIdentityRef.current;
|
|
244
|
+
const sameIdentity = prev.stepId === currentStep.id && prev.targetKey === targetKey;
|
|
245
|
+
const nonceBumped = prev.resetNonce !== resetNonce;
|
|
246
|
+
targetingIdentityRef.current = {
|
|
247
|
+
stepId: currentStep.id,
|
|
248
|
+
targetKey,
|
|
249
|
+
resetNonce
|
|
250
|
+
};
|
|
251
|
+
// Defer only a same-step restart bootstrap. A real step/target change
|
|
252
|
+
// should resolve on the first paint.
|
|
253
|
+
setResolveArmed(!(sameIdentity && nonceBumped));
|
|
254
|
+
clearFiberAnchorCache();
|
|
255
|
+
}, [currentStep.id, targetKey, resetNonce]);
|
|
256
|
+
React.useEffect(() => {
|
|
257
|
+
if (resolveArmed) return;
|
|
258
|
+
const handle = setTimeout(() => {
|
|
259
|
+
if (mountedRef.current) setResolveArmed(true);
|
|
260
|
+
}, FIRST_RESOLVE_DELAY_MS);
|
|
261
|
+
return () => clearTimeout(handle);
|
|
262
|
+
}, [resolveArmed]);
|
|
151
263
|
const applyTarget = React.useCallback(next => {
|
|
152
264
|
if (!mountedRef.current) return;
|
|
265
|
+
targetStepIdRef.current = next == null ? null : currentStepIdRef.current;
|
|
153
266
|
if (rectsEqual(targetRef.current, next)) return;
|
|
154
267
|
if (next == null) {
|
|
155
268
|
// The anchor went away (unmount / navigation), so whatever scroll position
|
|
@@ -165,20 +278,40 @@ export function TooltipSurface({
|
|
|
165
278
|
if (!mountedRef.current) return;
|
|
166
279
|
setMeasureAttempted(prev => prev ? prev : true);
|
|
167
280
|
}, []);
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Forget the resolved host and report the target as gone. Bumping the epoch
|
|
284
|
+
* voids any measurement still in flight for it, and releasing the in-flight
|
|
285
|
+
* guard lets the next resolve measure immediately instead of waiting on a
|
|
286
|
+
* callback that no longer means anything.
|
|
287
|
+
*/
|
|
288
|
+
const dropHost = React.useCallback(() => {
|
|
289
|
+
resolveEpochRef.current += 1;
|
|
290
|
+
measureInFlightRef.current = false;
|
|
291
|
+
hostFiberRef.current = null;
|
|
292
|
+
hostMeasureRef.current = null;
|
|
293
|
+
hostScrollIntoViewRef.current = undefined;
|
|
294
|
+
fiberCacheIdRef.current = null;
|
|
295
|
+
markMeasureAttempted();
|
|
296
|
+
applyTarget(null);
|
|
297
|
+
}, [applyTarget, markMeasureAttempted]);
|
|
168
298
|
const effectiveViewport = React.useCallback(() => {
|
|
169
299
|
const windowSize = Dimensions.get('window');
|
|
170
300
|
const scrollPadding = getScrollPadding();
|
|
301
|
+
const layoutPad = paddingAsEdgeInsets(insetsRef.current);
|
|
171
302
|
return buildEffectiveViewport({
|
|
172
303
|
width: windowSize.width,
|
|
173
304
|
height: Math.max(0, windowSize.height - keyboardBottomInsetRef.current)
|
|
174
305
|
}, {
|
|
175
|
-
top:
|
|
176
|
-
right:
|
|
177
|
-
bottom:
|
|
178
|
-
left:
|
|
306
|
+
top: layoutPad.top + (scrollPadding?.top ?? 0),
|
|
307
|
+
right: layoutPad.right + (scrollPadding?.right ?? 0),
|
|
308
|
+
bottom: layoutPad.bottom + (scrollPadding?.bottom ?? 0),
|
|
309
|
+
left: layoutPad.left + (scrollPadding?.left ?? 0)
|
|
179
310
|
});
|
|
180
311
|
}, []);
|
|
181
312
|
const maybeScrollIntoView = React.useCallback(rect => {
|
|
313
|
+
// Scrolling the app to reveal a target we are fading away from is visible.
|
|
314
|
+
if (exitingRef.current) return;
|
|
182
315
|
if (scrollSettledRef.current) return;
|
|
183
316
|
if (isRectFullyVisible(rect, effectiveViewport())) {
|
|
184
317
|
scrollSettledRef.current = true;
|
|
@@ -211,40 +344,32 @@ export function TooltipSurface({
|
|
|
211
344
|
*/
|
|
212
345
|
const resolveTarget = React.useCallback(() => {
|
|
213
346
|
if (!mountedRef.current) return;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
hostScrollIntoViewRef.current = undefined;
|
|
218
|
-
markMeasureAttempted();
|
|
219
|
-
applyTarget(null);
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
const resolution = resolveAnchorHost(anchorId);
|
|
223
|
-
if (resolution.status !== 'found') {
|
|
224
|
-
hostFiberRef.current = null;
|
|
225
|
-
hostMeasureRef.current = null;
|
|
226
|
-
hostScrollIntoViewRef.current = undefined;
|
|
227
|
-
markMeasureAttempted();
|
|
228
|
-
applyTarget(null);
|
|
347
|
+
const resolution = isAuto ? resolveAutoAnchorHost(autoData) : anchorId ? resolveAnchorHost(anchorId) : null;
|
|
348
|
+
if (!resolution || resolution.status !== 'found') {
|
|
349
|
+
dropHost();
|
|
229
350
|
return;
|
|
230
351
|
}
|
|
231
352
|
hostFiberRef.current = resolution.fiber ?? null;
|
|
232
353
|
hostMeasureRef.current = resolution.host.measureInWindow;
|
|
233
354
|
hostScrollIntoViewRef.current = resolution.host.scrollIntoView;
|
|
355
|
+
fiberCacheIdRef.current = 'fiberCacheId' in resolution && typeof resolution.fiberCacheId === 'string' ? resolution.fiberCacheId : anchorId ?? null;
|
|
234
356
|
|
|
235
357
|
// Kick an immediate measure after resolve so the first paint isn't waiting
|
|
236
358
|
// on the next rAF (and so missing targets still mark attempted).
|
|
237
359
|
if (measureInFlightRef.current) return;
|
|
360
|
+
const epoch = resolveEpochRef.current;
|
|
238
361
|
measureInFlightRef.current = true;
|
|
239
362
|
resolution.host.measureInWindow((x, y, width, height) => {
|
|
363
|
+
if (resolveEpochRef.current !== epoch) {
|
|
364
|
+
measureInFlightRef.current = false;
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
240
367
|
measureInFlightRef.current = false;
|
|
241
368
|
if (!mountedRef.current) return;
|
|
242
369
|
if (width <= 0 || height <= 0) {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
markMeasureAttempted();
|
|
247
|
-
applyTarget(null);
|
|
370
|
+
const cacheId = fiberCacheIdRef.current;
|
|
371
|
+
if (cacheId) invalidateFiberAnchor(cacheId);
|
|
372
|
+
dropHost();
|
|
248
373
|
return;
|
|
249
374
|
}
|
|
250
375
|
const rect = {
|
|
@@ -256,7 +381,7 @@ export function TooltipSurface({
|
|
|
256
381
|
maybeScrollIntoView(rect);
|
|
257
382
|
applyTarget(rect);
|
|
258
383
|
});
|
|
259
|
-
}, [anchorId, applyTarget,
|
|
384
|
+
}, [anchorId, applyTarget, autoData, dropHost, isAuto, maybeScrollIntoView]);
|
|
260
385
|
|
|
261
386
|
/**
|
|
262
387
|
* Live re-measure of an already-resolved host. Driven by the shared rAF hub
|
|
@@ -267,16 +392,19 @@ export function TooltipSurface({
|
|
|
267
392
|
if (measureInFlightRef.current) return;
|
|
268
393
|
const measure = hostMeasureRef.current;
|
|
269
394
|
if (!measure) return;
|
|
395
|
+
const epoch = resolveEpochRef.current;
|
|
270
396
|
measureInFlightRef.current = true;
|
|
271
397
|
measure((x, y, width, height) => {
|
|
398
|
+
if (resolveEpochRef.current !== epoch) {
|
|
399
|
+
measureInFlightRef.current = false;
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
272
402
|
measureInFlightRef.current = false;
|
|
273
403
|
if (!mountedRef.current) return;
|
|
274
404
|
if (width <= 0 || height <= 0) {
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
markMeasureAttempted();
|
|
279
|
-
applyTarget(null);
|
|
405
|
+
const cacheId = fiberCacheIdRef.current;
|
|
406
|
+
if (cacheId) invalidateFiberAnchor(cacheId);
|
|
407
|
+
dropHost();
|
|
280
408
|
return;
|
|
281
409
|
}
|
|
282
410
|
const rect = {
|
|
@@ -288,13 +416,17 @@ export function TooltipSurface({
|
|
|
288
416
|
maybeScrollIntoView(rect);
|
|
289
417
|
applyTarget(rect);
|
|
290
418
|
});
|
|
291
|
-
}, [
|
|
419
|
+
}, [applyTarget, dropHost, maybeScrollIntoView]);
|
|
292
420
|
React.useEffect(() => {
|
|
421
|
+
if (!resolveArmed) return;
|
|
293
422
|
resolveTarget();
|
|
294
|
-
}, [resolveTarget, registryTick]);
|
|
423
|
+
}, [resolveTarget, registryTick, resolveArmed]);
|
|
295
424
|
|
|
296
425
|
// Resolve poll: recover missing / remounted anchors. Live measurement is on rAF.
|
|
297
426
|
React.useEffect(() => {
|
|
427
|
+
if (!resolveArmed) {
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
298
430
|
const allowsRecovery = behavior === 'FLAG' || behavior === 'ERROR' || behavior === 'END' && session.draftMode;
|
|
299
431
|
const pauseAfterReport = missingMode === 'reported' && !allowsRecovery;
|
|
300
432
|
if (pauseAfterReport) {
|
|
@@ -320,7 +452,7 @@ export function TooltipSurface({
|
|
|
320
452
|
kbShow.remove();
|
|
321
453
|
kbHide.remove();
|
|
322
454
|
};
|
|
323
|
-
}, [resolveTarget, missingMode, behavior, session.draftMode]);
|
|
455
|
+
}, [resolveTarget, missingMode, behavior, session.draftMode, resolveArmed]);
|
|
324
456
|
|
|
325
457
|
// rAF tracking while a host is resolved (and we are not paused after report).
|
|
326
458
|
React.useEffect(() => {
|
|
@@ -354,7 +486,7 @@ export function TooltipSurface({
|
|
|
354
486
|
}
|
|
355
487
|
const ms = parseToleranceMs(theme.tooltipMissingToleranceSeconds);
|
|
356
488
|
const timer = setTimeout(() => {
|
|
357
|
-
if (!mountedRef.current || reportedRef.current) return;
|
|
489
|
+
if (!mountedRef.current || exitingRef.current || reportedRef.current) return;
|
|
358
490
|
reportedRef.current = true;
|
|
359
491
|
setMissingMode('reported');
|
|
360
492
|
void engine.reportTooltipTargetMissing(currentStep.id);
|
|
@@ -381,7 +513,31 @@ export function TooltipSurface({
|
|
|
381
513
|
height: Math.max(0, windowDims.height - keyboardBottomInset)
|
|
382
514
|
}), [windowDims.width, windowDims.height, keyboardBottomInset]);
|
|
383
515
|
const cardMaxWidth = resolveTooltipCardMaxWidth(theme, currentStep.width, windowSize.width);
|
|
384
|
-
const
|
|
516
|
+
const viewportMaxHeight = resolveModalCardMaxHeight(windowSize.height, layoutInsets);
|
|
517
|
+
const minCardHeight = tooltipMinCardHeight({
|
|
518
|
+
contentPadding: chrome.contentPadding,
|
|
519
|
+
borderWidth: chrome.borderWidth,
|
|
520
|
+
cardMaxHeight: viewportMaxHeight
|
|
521
|
+
});
|
|
522
|
+
const minSideCardWidth = tooltipMinSideCardWidth({
|
|
523
|
+
contentPadding: chrome.contentPadding,
|
|
524
|
+
borderWidth: chrome.borderWidth,
|
|
525
|
+
cardMaxWidth
|
|
526
|
+
});
|
|
527
|
+
const sideCardWidth = React.useMemo(() => {
|
|
528
|
+
if (!target) return null;
|
|
529
|
+
if (desiredPlacement !== 'LEFT' && desiredPlacement !== 'RIGHT') return null;
|
|
530
|
+
const placementTarget = expandRect(target, backdropPadding + outsideHighlightSpread);
|
|
531
|
+
return resolveTooltipSideCardWidth({
|
|
532
|
+
placement: desiredPlacement,
|
|
533
|
+
target: placementTarget,
|
|
534
|
+
windowWidth: windowSize.width,
|
|
535
|
+
notchSize: chrome.notchSize,
|
|
536
|
+
cardMaxWidth,
|
|
537
|
+
minWidth: minSideCardWidth
|
|
538
|
+
});
|
|
539
|
+
}, [target, desiredPlacement, backdropPadding, outsideHighlightSpread, windowSize.width, chrome.notchSize, cardMaxWidth, minSideCardWidth]);
|
|
540
|
+
const defaultCardLayoutStyle = resolveTooltipCardLayout(cardMaxWidth, windowSize.width);
|
|
385
541
|
const buttonsAlign = resolveTooltipButtonsAlign(theme);
|
|
386
542
|
const progressBarProps = {
|
|
387
543
|
enabled: theme.progressBarEnabled,
|
|
@@ -398,102 +554,220 @@ export function TooltipSurface({
|
|
|
398
554
|
const showWaitingUi = isMissing && missingMode === 'waiting' && measureAttempted;
|
|
399
555
|
const layout = React.useMemo(() => {
|
|
400
556
|
if (!target) return null;
|
|
557
|
+
// A target left over from the previous step belongs to that step's
|
|
558
|
+
// measurement; placing against it would also reuse that step's card size.
|
|
559
|
+
if (targetStepIdRef.current !== currentStep.id) return null;
|
|
560
|
+
const placementTarget = expandRect(target, backdropPadding + outsideHighlightSpread);
|
|
561
|
+
const viewportInsets = paddingAsEdgeInsets(layoutInsets);
|
|
562
|
+
const height = Math.min(bubbleSize.height, viewportMaxHeight);
|
|
563
|
+
const inferSize = sideCardWidth != null ? {
|
|
564
|
+
width: sideCardWidth,
|
|
565
|
+
height
|
|
566
|
+
} : {
|
|
567
|
+
width: cardMaxWidth,
|
|
568
|
+
height
|
|
569
|
+
};
|
|
401
570
|
const nextPlacement = inferTooltipPlacement({
|
|
402
|
-
target,
|
|
403
|
-
bubbleSize,
|
|
571
|
+
target: placementTarget,
|
|
572
|
+
bubbleSize: inferSize,
|
|
404
573
|
notchSize: chrome.notchSize,
|
|
405
574
|
windowSize,
|
|
406
575
|
currentPlacement: placementRef.current,
|
|
407
|
-
desiredPlacement
|
|
576
|
+
desiredPlacement,
|
|
577
|
+
viewportInsets,
|
|
578
|
+
minHeight: minCardHeight
|
|
408
579
|
});
|
|
580
|
+
const honorSide = sideCardWidth != null && nextPlacement === desiredPlacement && (nextPlacement === 'LEFT' || nextPlacement === 'RIGHT');
|
|
581
|
+
const fitted = tooltipPlacementFits({
|
|
582
|
+
target: placementTarget,
|
|
583
|
+
bubbleSize: inferSize,
|
|
584
|
+
notchSize: chrome.notchSize,
|
|
585
|
+
windowSize,
|
|
586
|
+
placement: nextPlacement,
|
|
587
|
+
viewportInsets,
|
|
588
|
+
minHeight: minCardHeight
|
|
589
|
+
});
|
|
590
|
+
let maxCardHeight = viewportMaxHeight;
|
|
591
|
+
if (nextPlacement === 'ABOVE' || nextPlacement === 'BELOW') {
|
|
592
|
+
const gap = tooltipVerticalGap({
|
|
593
|
+
placement: nextPlacement,
|
|
594
|
+
target: placementTarget,
|
|
595
|
+
windowHeight: windowSize.height,
|
|
596
|
+
notchSize: chrome.notchSize,
|
|
597
|
+
viewportInsets
|
|
598
|
+
});
|
|
599
|
+
const budget = Math.floor(gap);
|
|
600
|
+
if (Number.isFinite(budget) && budget > 0) {
|
|
601
|
+
maxCardHeight = Math.max(minCardHeight, Math.min(viewportMaxHeight, budget));
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
const positionHeight = Math.min(height, maxCardHeight);
|
|
605
|
+
const positionSize = honorSide ? {
|
|
606
|
+
width: sideCardWidth,
|
|
607
|
+
height: positionHeight
|
|
608
|
+
} : {
|
|
609
|
+
width: cardMaxWidth,
|
|
610
|
+
height: positionHeight
|
|
611
|
+
};
|
|
409
612
|
return {
|
|
410
613
|
placement: nextPlacement,
|
|
614
|
+
honorSide,
|
|
615
|
+
fitted,
|
|
616
|
+
maxCardHeight,
|
|
411
617
|
...computeTooltipPosition({
|
|
412
618
|
target,
|
|
413
|
-
bubbleSize,
|
|
619
|
+
bubbleSize: positionSize,
|
|
414
620
|
placement: nextPlacement,
|
|
415
621
|
notchSize: chrome.notchSize,
|
|
416
622
|
backdropPadding,
|
|
623
|
+
outsideHighlightSpread,
|
|
417
624
|
windowSize,
|
|
418
625
|
bubbleBorderRadius: chrome.borderRadius,
|
|
419
|
-
bubbleBorderWidth: chrome.borderWidth
|
|
626
|
+
bubbleBorderWidth: chrome.borderWidth,
|
|
627
|
+
viewportInsets
|
|
420
628
|
})
|
|
421
629
|
};
|
|
422
|
-
}, [target, bubbleSize, chrome.notchSize, chrome.borderRadius, chrome.borderWidth, windowSize, desiredPlacement, backdropPadding]);
|
|
630
|
+
}, [target, bubbleSize, sideCardWidth, cardMaxWidth, viewportMaxHeight, minCardHeight, currentStep.id, chrome.notchSize, chrome.borderRadius, chrome.borderWidth, windowSize, desiredPlacement, backdropPadding, outsideHighlightSpread, layoutInsets]);
|
|
631
|
+
const cardLayoutStyle = layout?.honorSide && sideCardWidth != null ? {
|
|
632
|
+
width: sideCardWidth,
|
|
633
|
+
maxWidth: sideCardWidth
|
|
634
|
+
} : defaultCardLayoutStyle;
|
|
423
635
|
React.useEffect(() => {
|
|
424
636
|
if (layout && layout.placement !== placement) {
|
|
425
637
|
setPlacement(layout.placement);
|
|
426
638
|
}
|
|
427
639
|
}, [layout, placement]);
|
|
640
|
+
React.useEffect(() => {
|
|
641
|
+
if (!layout || !target) return;
|
|
642
|
+
if (desiredPlacement !== 'LEFT' && desiredPlacement !== 'RIGHT') return;
|
|
643
|
+
// A target left over from the previous step says nothing about this one.
|
|
644
|
+
if (targetStepIdRef.current !== currentStep.id) return;
|
|
645
|
+
if (!(session.draftMode || __DEV__)) return;
|
|
646
|
+
if (warnedSidePlacementStepRef.current === currentStep.id) return;
|
|
647
|
+
if (layout.placement === desiredPlacement) {
|
|
648
|
+
// Last-resort return of the authored side: nothing actually fit.
|
|
649
|
+
if (layout.fitted) return;
|
|
650
|
+
warnedSidePlacementStepRef.current = currentStep.id;
|
|
651
|
+
warnTooltipPlacementUnanchored({
|
|
652
|
+
requested: desiredPlacement
|
|
653
|
+
});
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
656
|
+
// Only the structural floor — not keyboard / off-screen flips. A resolved
|
|
657
|
+
// width means the room was there and something else moved the card.
|
|
658
|
+
if (sideCardWidth != null) return;
|
|
659
|
+
warnedSidePlacementStepRef.current = currentStep.id;
|
|
660
|
+
const placementTarget = expandRect(target, backdropPadding + outsideHighlightSpread);
|
|
661
|
+
warnTooltipSidePlacementDropped({
|
|
662
|
+
requested: desiredPlacement,
|
|
663
|
+
used: layout.placement,
|
|
664
|
+
availableGap: tooltipSideGap({
|
|
665
|
+
placement: desiredPlacement,
|
|
666
|
+
target: placementTarget,
|
|
667
|
+
windowWidth: windowSize.width,
|
|
668
|
+
notchSize: chrome.notchSize
|
|
669
|
+
}),
|
|
670
|
+
minWidth: minSideCardWidth
|
|
671
|
+
});
|
|
672
|
+
}, [layout, target, desiredPlacement, sideCardWidth, session.draftMode, currentStep.id, backdropPadding, outsideHighlightSpread, windowSize.width, chrome.notchSize, minSideCardWidth]);
|
|
428
673
|
|
|
429
674
|
// Web parity: "When target element is clicked" → step.actions.
|
|
430
675
|
// Observe taps via TargetPressBridge (pass-through); do not steal the press.
|
|
431
676
|
const hasTarget = target != null;
|
|
432
677
|
const targetActions = currentStep.actions;
|
|
433
678
|
React.useEffect(() => {
|
|
434
|
-
|
|
679
|
+
// Release the monitor while exiting: it is a singleton, and a tap landing on
|
|
680
|
+
// the old target would run the departing step's actions.
|
|
681
|
+
if (isExiting || !hasTarget || currentStep.tooltipTargetBlocked || targetActions.length === 0) {
|
|
435
682
|
targetPressMonitor.clear();
|
|
436
683
|
return;
|
|
437
684
|
}
|
|
438
685
|
targetPressMonitor.set({
|
|
439
686
|
getRect: () => targetRef.current,
|
|
440
687
|
onPress: () => {
|
|
688
|
+
// Native touches are async relative to commits, so re-check the phase.
|
|
689
|
+
if (exitingRef.current) return;
|
|
441
690
|
void engine.handleActions(targetActions);
|
|
442
691
|
}
|
|
443
692
|
});
|
|
444
693
|
return () => {
|
|
445
694
|
targetPressMonitor.clear();
|
|
446
695
|
};
|
|
447
|
-
}, [hasTarget, currentStep.tooltipTargetBlocked, targetActions, engine]);
|
|
696
|
+
}, [hasTarget, currentStep.tooltipTargetBlocked, targetActions, engine, isExiting]);
|
|
697
|
+
|
|
698
|
+
// Painted from mount rather than once the target lands, so a modal → tooltip
|
|
699
|
+
// swap keeps the dim continuous instead of blinking it off for the frames the
|
|
700
|
+
// anchor takes to measure. The hole opens when `layout` arrives.
|
|
701
|
+
// Always mount the cutout: when `backdrop` is off the dim opacity is 0 but
|
|
702
|
+
// the bands still block host taps (unless interaction blocking is disabled).
|
|
703
|
+
const interactionBlocker = /*#__PURE__*/_jsx(TooltipCutout, {
|
|
704
|
+
targetRect: layout?.targetHighlightRect ?? null,
|
|
705
|
+
backdropColor: theme.backdropColor,
|
|
706
|
+
backdropOpacity: currentStep.backdrop ? backdropOpacity : 0,
|
|
707
|
+
targetBlocked: currentStep.tooltipTargetBlocked
|
|
708
|
+
});
|
|
448
709
|
if (hideAfterEnd) {
|
|
449
710
|
return null;
|
|
450
711
|
}
|
|
712
|
+
const showBranding = session.flow.company.flowBranding;
|
|
713
|
+
const contentPadding = chrome.contentPadding;
|
|
451
714
|
|
|
452
|
-
// Still pending the first measure attempt —
|
|
715
|
+
// Still pending the first measure attempt — only the blocker shows.
|
|
453
716
|
if (isMissing && missingMode === 'waiting' && !measureAttempted) {
|
|
454
|
-
return
|
|
717
|
+
return backdropOnly(interactionBlocker);
|
|
455
718
|
}
|
|
456
719
|
if (showWaitingUi) {
|
|
457
|
-
return /*#__PURE__*/
|
|
720
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
458
721
|
style: styles.root,
|
|
459
722
|
testID: "userflow-tooltip-surface",
|
|
460
723
|
pointerEvents: "box-none",
|
|
461
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
724
|
+
children: [interactionBlocker, /*#__PURE__*/_jsx(View, {
|
|
462
725
|
style: [styles.center, centerPaddingStyle],
|
|
463
726
|
pointerEvents: "box-none",
|
|
464
|
-
children: /*#__PURE__*/_jsx(
|
|
727
|
+
children: /*#__PURE__*/_jsx(CardFade, {
|
|
465
728
|
testID: "userflow-tooltip-waiting",
|
|
466
729
|
accessibilityViewIsModal: true,
|
|
467
730
|
pointerEvents: "auto",
|
|
468
731
|
style: [chrome.shadowStyle, styles.waitingCard, cardLayoutStyle, {
|
|
469
732
|
borderRadius: chrome.borderRadius,
|
|
470
|
-
backgroundColor: chrome.backgroundColor
|
|
733
|
+
backgroundColor: chrome.backgroundColor,
|
|
734
|
+
maxHeight: viewportMaxHeight
|
|
471
735
|
}],
|
|
472
736
|
children: /*#__PURE__*/_jsxs(View, {
|
|
473
737
|
style: [chrome.fillStyle, {
|
|
474
|
-
|
|
475
|
-
|
|
738
|
+
maxHeight: viewportMaxHeight,
|
|
739
|
+
minHeight: 0
|
|
476
740
|
}],
|
|
477
|
-
children: [/*#__PURE__*/
|
|
478
|
-
color: theme.fontColor
|
|
479
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
741
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
480
742
|
style: {
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
743
|
+
paddingHorizontal: contentPadding,
|
|
744
|
+
paddingTop: contentPadding,
|
|
745
|
+
paddingBottom: showBranding ? MADE_WITH_USERFLOW_GAP : contentPadding,
|
|
746
|
+
alignItems: 'center'
|
|
485
747
|
},
|
|
486
|
-
children:
|
|
748
|
+
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
749
|
+
color: theme.fontColor
|
|
750
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
751
|
+
style: {
|
|
752
|
+
color: theme.fontColor,
|
|
753
|
+
fontSize: theme.fontSize,
|
|
754
|
+
marginTop: 12,
|
|
755
|
+
textAlign: 'center'
|
|
756
|
+
},
|
|
757
|
+
children: "Looking for target\u2026"
|
|
758
|
+
})]
|
|
759
|
+
}), /*#__PURE__*/_jsx(MadeWithUserflow, {
|
|
760
|
+
company: session.flow.company,
|
|
761
|
+
color: theme.fontColor,
|
|
762
|
+
contentPadding: contentPadding
|
|
487
763
|
})]
|
|
488
764
|
})
|
|
489
765
|
})
|
|
490
|
-
})
|
|
766
|
+
})]
|
|
491
767
|
});
|
|
492
768
|
}
|
|
493
769
|
const progressTop = theme.progressBarEnabled && theme.progressBarPosition === 'TOP';
|
|
494
770
|
const progressBottom = theme.progressBarEnabled && theme.progressBarPosition === 'BOTTOM';
|
|
495
|
-
const showBranding = session.flow.company.flowBranding;
|
|
496
|
-
const contentPadding = chrome.contentPadding;
|
|
497
771
|
const cardBody = /*#__PURE__*/_jsxs(_Fragment, {
|
|
498
772
|
children: [showClose ? /*#__PURE__*/_jsx(CloseButton, {
|
|
499
773
|
onPress: endAsUserClosed,
|
|
@@ -549,46 +823,49 @@ export function TooltipSurface({
|
|
|
549
823
|
})]
|
|
550
824
|
});
|
|
551
825
|
if (showAsBubbleFallback || showMissingUi) {
|
|
552
|
-
return /*#__PURE__*/
|
|
826
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
553
827
|
style: styles.root,
|
|
554
828
|
testID: "userflow-tooltip-surface",
|
|
555
829
|
pointerEvents: "box-none",
|
|
556
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
830
|
+
children: [interactionBlocker, /*#__PURE__*/_jsx(View, {
|
|
557
831
|
style: [styles.center, centerPaddingStyle],
|
|
558
832
|
pointerEvents: "box-none",
|
|
559
|
-
children: /*#__PURE__*/_jsx(
|
|
833
|
+
children: /*#__PURE__*/_jsx(CardFade, {
|
|
560
834
|
testID: "userflow-tooltip-card",
|
|
561
835
|
accessibilityViewIsModal: true,
|
|
562
836
|
pointerEvents: "auto",
|
|
563
837
|
onLayout: onCardLayout,
|
|
564
838
|
style: [chrome.shadowStyle, styles.fallbackCard, cardLayoutStyle, {
|
|
565
839
|
borderRadius: chrome.borderRadius,
|
|
566
|
-
backgroundColor: chrome.backgroundColor
|
|
840
|
+
backgroundColor: chrome.backgroundColor,
|
|
841
|
+
maxHeight: viewportMaxHeight
|
|
567
842
|
}],
|
|
568
843
|
children: /*#__PURE__*/_jsx(View, {
|
|
569
|
-
style: [chrome.fillStyle, styles.fallbackFill
|
|
844
|
+
style: [chrome.fillStyle, styles.fallbackFill, {
|
|
845
|
+
maxHeight: viewportMaxHeight
|
|
846
|
+
}],
|
|
570
847
|
children: cardBody
|
|
571
848
|
})
|
|
572
849
|
})
|
|
573
|
-
})
|
|
850
|
+
})]
|
|
574
851
|
});
|
|
575
852
|
}
|
|
576
853
|
if (!layout || !target) {
|
|
577
|
-
return
|
|
854
|
+
return backdropOnly(interactionBlocker);
|
|
578
855
|
}
|
|
579
856
|
return /*#__PURE__*/_jsxs(View, {
|
|
580
857
|
style: styles.root,
|
|
581
858
|
testID: "userflow-tooltip-surface",
|
|
582
859
|
pointerEvents: "box-none",
|
|
583
|
-
children: [
|
|
860
|
+
children: [interactionBlocker, highlight ? /*#__PURE__*/_jsx(TooltipHighlight, {
|
|
584
861
|
targetRect: layout.targetHighlightRect,
|
|
585
|
-
|
|
586
|
-
backdropOpacity: backdropOpacity,
|
|
587
|
-
targetBlocked: currentStep.tooltipTargetBlocked
|
|
862
|
+
chrome: highlight
|
|
588
863
|
}) : null, /*#__PURE__*/_jsx(TooltipBubble, {
|
|
589
864
|
chrome: chrome,
|
|
590
865
|
notchPosition: layout.notchPosition,
|
|
591
866
|
onLayout: onCardLayout,
|
|
867
|
+
maxHeight: layout.maxCardHeight,
|
|
868
|
+
showNotch: layout.showNotch,
|
|
592
869
|
style: {
|
|
593
870
|
position: 'absolute',
|
|
594
871
|
left: layout.cardPosition.x,
|
|
@@ -609,18 +886,19 @@ const styles = StyleSheet.create({
|
|
|
609
886
|
alignItems: 'center'
|
|
610
887
|
},
|
|
611
888
|
fallbackCard: {
|
|
612
|
-
maxHeight: '80%',
|
|
613
889
|
flexShrink: 1
|
|
614
890
|
},
|
|
615
891
|
fallbackFill: {
|
|
616
|
-
flexShrink: 1
|
|
892
|
+
flexShrink: 1,
|
|
893
|
+
minHeight: 0
|
|
617
894
|
},
|
|
618
895
|
waitingCard: {
|
|
619
896
|
width: '100%'
|
|
620
897
|
},
|
|
621
898
|
scroll: {
|
|
622
|
-
flexGrow:
|
|
623
|
-
flexShrink: 1
|
|
899
|
+
flexGrow: 1,
|
|
900
|
+
flexShrink: 1,
|
|
901
|
+
minHeight: 0
|
|
624
902
|
},
|
|
625
903
|
scrollContent: {
|
|
626
904
|
flexGrow: 1
|