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