@userflow-tech/react-native 0.1.0 → 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 +114 -68
- package/app.plugin.js +13 -0
- package/babel-plugin/index.d.ts +43 -0
- package/babel-plugin/index.d.ts.map +1 -0
- package/babel-plugin/index.js +862 -0
- package/babel-plugin/index.js.map +1 -0
- package/babel-plugin.js +13 -0
- package/docs/anchoring.md +141 -13
- package/docs/deep-linking.md +20 -17
- package/docs/theme-mapping.md +44 -15
- package/docs/troubleshooting.md +37 -30
- package/expo-plugin/withUserflow.d.ts +17 -0
- package/expo-plugin/withUserflow.d.ts.map +1 -0
- package/expo-plugin/withUserflow.js +99 -0
- package/expo-plugin/withUserflow.js.map +1 -0
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +125 -3
- 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/autoAnchor.js +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/hintsCodec.js +1 -1
- 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 +11 -2
- 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 +126 -3
- 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/autoAnchor.js +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/hintsCodec.js +1 -1
- 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 +10 -2
- 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 +27 -1
- 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/autoAnchor.d.ts +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/hintsCodec.d.ts +1 -1
- 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 +27 -1
- 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/autoAnchor.d.ts +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/hintsCodec.d.ts +1 -1
- 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 +32 -18
- package/src/anchors/AutoAnchorRegistry.ts +140 -3
- package/src/anchors/anchorChangeTicker.ts +10 -0
- package/src/anchors/autoAnchor.ts +1 -1
- 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/hintsCodec.ts +1 -1
- 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 +10 -2
- 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/LICENSE +76 -0
- package/vendor/core/README.md +9 -0
- package/vendor/core/dist/attributes.d.ts +15 -0
- package/vendor/core/dist/attributes.d.ts.map +1 -0
- package/vendor/core/dist/attributes.js +55 -0
- package/vendor/core/dist/attributes.js.map +1 -0
- package/vendor/core/dist/constants.d.ts +21 -0
- package/vendor/core/dist/constants.d.ts.map +1 -0
- package/vendor/core/dist/constants.js +21 -0
- package/vendor/core/dist/constants.js.map +1 -0
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts +68 -0
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/ClientConditionEngine.js +197 -0
- package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +160 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.js +571 -0
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/PairingEngine.d.ts +135 -0
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/PairingEngine.js +396 -0
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -0
- package/vendor/core/dist/engine/UserflowCore.d.ts +145 -0
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -0
- package/vendor/core/dist/engine/UserflowCore.js +329 -0
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -0
- 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 +42 -0
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -0
- package/vendor/core/dist/engine/handleActions.js +198 -0
- package/vendor/core/dist/engine/handleActions.js.map +1 -0
- package/vendor/core/dist/engine/interpolateSessionData.d.ts +7 -0
- package/vendor/core/dist/engine/interpolateSessionData.d.ts.map +1 -0
- package/vendor/core/dist/engine/interpolateSessionData.js +29 -0
- package/vendor/core/dist/engine/interpolateSessionData.js.map +1 -0
- 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/errors.d.ts +9 -0
- package/vendor/core/dist/errors.d.ts.map +1 -0
- package/vendor/core/dist/errors.js +15 -0
- package/vendor/core/dist/errors.js.map +1 -0
- package/vendor/core/dist/eventAttributes.d.ts +7 -0
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -0
- package/vendor/core/dist/eventAttributes.js +31 -0
- package/vendor/core/dist/eventAttributes.js.map +1 -0
- package/vendor/core/dist/index.d.ts +31 -0
- package/vendor/core/dist/index.d.ts.map +1 -0
- package/vendor/core/dist/index.js +22 -0
- package/vendor/core/dist/index.js.map +1 -0
- 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/backoff.d.ts +11 -0
- package/vendor/core/dist/transport/backoff.d.ts.map +1 -0
- package/vendor/core/dist/transport/backoff.js +17 -0
- package/vendor/core/dist/transport/backoff.js.map +1 -0
- package/vendor/core/dist/transport/pairing.d.ts +121 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -0
- package/vendor/core/dist/transport/pairing.js +551 -0
- package/vendor/core/dist/transport/pairing.js.map +1 -0
- package/vendor/core/dist/transport/phoenix.d.ts +228 -0
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -0
- package/vendor/core/dist/transport/phoenix.js +811 -0
- package/vendor/core/dist/transport/phoenix.js.map +1 -0
- package/vendor/core/dist/transport/rateLimiter.d.ts +17 -0
- package/vendor/core/dist/transport/rateLimiter.d.ts.map +1 -0
- package/vendor/core/dist/transport/rateLimiter.js +30 -0
- package/vendor/core/dist/transport/rateLimiter.js.map +1 -0
- package/vendor/core/dist/transport/scheduler.d.ts +12 -0
- package/vendor/core/dist/transport/scheduler.d.ts.map +1 -0
- package/vendor/core/dist/transport/scheduler.js +11 -0
- package/vendor/core/dist/transport/scheduler.js.map +1 -0
- package/vendor/core/dist/types.d.ts +60 -0
- package/vendor/core/dist/types.d.ts.map +1 -0
- package/vendor/core/dist/types.js +2 -0
- package/vendor/core/dist/types.js.map +1 -0
- package/vendor/core/dist/version.d.ts +3 -0
- package/vendor/core/dist/version.d.ts.map +1 -0
- package/vendor/core/dist/version.js +3 -0
- package/vendor/core/dist/version.js.map +1 -0
- package/vendor/core/package.json +20 -0
- package/vendor/protocol/LICENSE +76 -0
- package/vendor/protocol/README.md +8 -0
- 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 +232 -0
- package/vendor/protocol/dist/autoData.d.ts.map +1 -0
- package/vendor/protocol/dist/autoData.js +78 -0
- package/vendor/protocol/dist/autoData.js.map +1 -0
- package/vendor/protocol/dist/events.d.ts +24 -0
- package/vendor/protocol/dist/events.d.ts.map +1 -0
- package/vendor/protocol/dist/events.js +8 -0
- package/vendor/protocol/dist/events.js.map +1 -0
- package/vendor/protocol/dist/flows.d.ts +360 -0
- package/vendor/protocol/dist/flows.d.ts.map +1 -0
- package/vendor/protocol/dist/flows.js +201 -0
- package/vendor/protocol/dist/flows.js.map +1 -0
- package/vendor/protocol/dist/index.d.ts +25 -0
- package/vendor/protocol/dist/index.d.ts.map +1 -0
- package/vendor/protocol/dist/index.js +17 -0
- package/vendor/protocol/dist/index.js.map +1 -0
- package/vendor/protocol/dist/messages.d.ts +187 -0
- package/vendor/protocol/dist/messages.d.ts.map +1 -0
- package/vendor/protocol/dist/messages.js +61 -0
- package/vendor/protocol/dist/messages.js.map +1 -0
- package/vendor/protocol/dist/pairing.d.ts +82 -0
- package/vendor/protocol/dist/pairing.d.ts.map +1 -0
- package/vendor/protocol/dist/pairing.js +146 -0
- package/vendor/protocol/dist/pairing.js.map +1 -0
- package/vendor/protocol/package.json +17 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeTooltipPosition.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/tooltip/computeTooltipPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,oBAAoB,EACpB,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,QAAQ,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B,mDAAmD;IACnD,mBAAmB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACnF;
|
|
1
|
+
{"version":3,"file":"computeTooltipPosition.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/tooltip/computeTooltipPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,oBAAoB,EACpB,UAAU,EACX,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,QAAQ,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;IAC7B;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,mDAAmD;IACnD,mBAAmB,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACnF;AAiDD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC3C,MAAM,EAAE,IAAI,CAAC;IACb,UAAU,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,oBAAoB,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CAC1C,GAAG,aAAa,CA0FhB"}
|
|
@@ -19,16 +19,62 @@ export interface WindowSize {
|
|
|
19
19
|
height: number;
|
|
20
20
|
}
|
|
21
21
|
export declare const VIEWPORT_PADDING = 24;
|
|
22
|
+
/** Per-edge screen margin; each omitted edge falls back to `viewportPadding`. */
|
|
23
|
+
export interface TooltipViewportInsets {
|
|
24
|
+
top?: number;
|
|
25
|
+
right?: number;
|
|
26
|
+
bottom?: number;
|
|
27
|
+
left?: number;
|
|
28
|
+
}
|
|
29
|
+
export interface TooltipPlacementFitsOpts {
|
|
30
|
+
target: Rect;
|
|
31
|
+
bubbleSize: Size;
|
|
32
|
+
notchSize: number;
|
|
33
|
+
windowSize: WindowSize;
|
|
34
|
+
placement: TooltipPlacementSide;
|
|
35
|
+
viewportPadding?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Per-edge screen margin. When omitted, `viewportPadding` is used on every
|
|
38
|
+
* side so this agrees with `computeTooltipPosition`'s clamp.
|
|
39
|
+
*/
|
|
40
|
+
viewportInsets?: TooltipViewportInsets;
|
|
41
|
+
/**
|
|
42
|
+
* When set, ABOVE/BELOW compare against `min(height, minHeight)` so a
|
|
43
|
+
* scrollable card that can shrink is allowed to fit. Omit to keep the
|
|
44
|
+
* historical full-height check used by {@link inferTooltipPlacement}.
|
|
45
|
+
*/
|
|
46
|
+
minHeight?: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Whether `placement` has room beside `target` for `bubbleSize`.
|
|
50
|
+
*
|
|
51
|
+
* Inclusive: a card that exactly fills the remaining gap (LEFT/RIGHT after
|
|
52
|
+
* side-narrowing) still fits. Every side reserves the matching edge margin so
|
|
53
|
+
* this agrees with the clamp in `computeTooltipPosition`; when the two
|
|
54
|
+
* disagree, a placement passes here and is then drawn somewhere else.
|
|
55
|
+
*/
|
|
56
|
+
export declare function tooltipPlacementFits({ target, bubbleSize, notchSize, windowSize, placement, viewportPadding, viewportInsets, minHeight, }: TooltipPlacementFitsOpts): boolean;
|
|
22
57
|
/**
|
|
23
58
|
* Port of web FlowChrome `inferTooltipPlacement` with distance-sorted flip
|
|
24
59
|
* (not the prototype's fixed BELOW→ABOVE→RIGHT→LEFT priority).
|
|
60
|
+
*
|
|
61
|
+
* When no side fits, returns `desiredPlacement` (or BELOW) as a last resort —
|
|
62
|
+
* callers must check {@link tooltipPlacementFits} on the result to tell a real
|
|
63
|
+
* fit from that fallback.
|
|
25
64
|
*/
|
|
26
|
-
export declare function inferTooltipPlacement({ target, bubbleSize, notchSize, windowSize, currentPlacement, desiredPlacement, }: {
|
|
65
|
+
export declare function inferTooltipPlacement({ target, bubbleSize, notchSize, windowSize, currentPlacement, desiredPlacement, viewportPadding, viewportInsets, minHeight, }: {
|
|
27
66
|
target: Rect;
|
|
28
67
|
bubbleSize: Size;
|
|
29
68
|
notchSize: number;
|
|
30
69
|
windowSize: WindowSize;
|
|
31
70
|
currentPlacement: TooltipPlacementSide | null;
|
|
32
71
|
desiredPlacement: TooltipPlacementSide | null;
|
|
72
|
+
viewportPadding?: number;
|
|
73
|
+
/**
|
|
74
|
+
* Per-edge screen margin. When omitted, `viewportPadding` is used on every
|
|
75
|
+
* side so infer agrees with `computeTooltipPosition`'s clamp.
|
|
76
|
+
*/
|
|
77
|
+
viewportInsets?: TooltipViewportInsets;
|
|
78
|
+
minHeight?: number;
|
|
33
79
|
}): TooltipPlacementSide;
|
|
34
80
|
//# sourceMappingURL=inferTooltipPlacement.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inferTooltipPlacement.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/tooltip/inferTooltipPlacement.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAExE,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,eAAO,MAAM,gBAAgB,KAA2B,CAAC;AAEzD;;;
|
|
1
|
+
{"version":3,"file":"inferTooltipPlacement.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/tooltip/inferTooltipPlacement.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAExE,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAID,eAAO,MAAM,gBAAgB,KAA2B,CAAC;AAEzD,iFAAiF;AACjF,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,IAAI,CAAC;IACb,UAAU,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,oBAAoB,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,eAAkC,EAClC,cAAc,EACd,SAAS,GACV,EAAE,wBAAwB,GAAG,OAAO,CAmCpC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,UAAU,EACV,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,eAAkC,EAClC,cAAc,EACd,SAAS,GACV,EAAE;IACD,MAAM,EAAE,IAAI,CAAC;IACb,UAAU,EAAE,IAAI,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,gBAAgB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC9C,gBAAgB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC9C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,oBAAoB,CAsDvB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { TooltipPlacementSide } from './inferTooltipPlacement';
|
|
2
|
+
/** Sink for placement diagnostics. Injected in tests. */
|
|
3
|
+
export type PlacementLogger = (message: string) => void;
|
|
4
|
+
export declare const defaultPlacementLogger: PlacementLogger;
|
|
5
|
+
/**
|
|
6
|
+
* A Builder-requested LEFT/RIGHT side could not be drawn at all: the room
|
|
7
|
+
* beside the target is smaller than the card's own chrome, so no width is left
|
|
8
|
+
* to lay content out in. Draft/preview and `__DEV__` only.
|
|
9
|
+
*
|
|
10
|
+
* The caller must not emit this when the side was honored at a reduced width —
|
|
11
|
+
* shrinking is the expected outcome now, and whether it looks good is the
|
|
12
|
+
* author's call — nor for keyboard / off-screen vertical flips, whose cause is
|
|
13
|
+
* not the room beside the target.
|
|
14
|
+
*/
|
|
15
|
+
export declare function tooltipSidePlacementDroppedMessage(opts: {
|
|
16
|
+
requested: 'LEFT' | 'RIGHT';
|
|
17
|
+
used: TooltipPlacementSide;
|
|
18
|
+
availableGap: number;
|
|
19
|
+
minWidth: number;
|
|
20
|
+
}): string;
|
|
21
|
+
export declare function warnTooltipSidePlacementDropped(opts: {
|
|
22
|
+
requested: 'LEFT' | 'RIGHT';
|
|
23
|
+
used: TooltipPlacementSide;
|
|
24
|
+
availableGap: number;
|
|
25
|
+
minWidth: number;
|
|
26
|
+
}, log?: PlacementLogger): void;
|
|
27
|
+
/**
|
|
28
|
+
* No side had room for the card — including the authored LEFT/RIGHT — so
|
|
29
|
+
* {@link inferTooltipPlacement} returned the requested side as a last resort.
|
|
30
|
+
* Draft/preview and `__DEV__` only. Distinct from
|
|
31
|
+
* {@link tooltipSidePlacementDroppedMessage}, which reports a successful flip.
|
|
32
|
+
*/
|
|
33
|
+
export declare function tooltipPlacementUnanchoredMessage(opts: {
|
|
34
|
+
requested: TooltipPlacementSide;
|
|
35
|
+
}): string;
|
|
36
|
+
export declare function warnTooltipPlacementUnanchored(opts: {
|
|
37
|
+
requested: TooltipPlacementSide;
|
|
38
|
+
}, log?: PlacementLogger): void;
|
|
39
|
+
//# sourceMappingURL=placementDiagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placementDiagnostics.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/tooltip/placementDiagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIpE,yDAAyD;AACzD,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAExD,eAAO,MAAM,sBAAsB,EAAE,eAGpC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,kCAAkC,CAAC,IAAI,EAAE;IACvD,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,CAQT;AAED,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE;IACJ,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,EACD,GAAG,GAAE,eAAwC,GAC5C,IAAI,CAEN;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,EAAE;IACtD,SAAS,EAAE,oBAAoB,CAAC;CACjC,GAAG,MAAM,CAKT;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE;IAAE,SAAS,EAAE,oBAAoB,CAAA;CAAE,EACzC,GAAG,GAAE,eAAwC,GAC5C,IAAI,CAEN"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Rect, WindowSize } from './inferTooltipPlacement';
|
|
2
|
+
/** Grow or shrink `rect` by `padding` on every side. */
|
|
3
|
+
export declare function expandRect(rect: Rect, padding: number): Rect;
|
|
2
4
|
/** True when two rects are identical (used to avoid redundant setState). */
|
|
3
5
|
export declare function rectsEqual(a: Rect | null, b: Rect | null): boolean;
|
|
4
6
|
/** Fully outside the window (no intersection). Kept for callers that need it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rect.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/tooltip/rect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEhE,4EAA4E;AAC5E,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAIlE;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAO3E;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CASnF;AAED,sEAAsE;AACtE,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACxE,iBAAiB,CAWnB"}
|
|
1
|
+
{"version":3,"file":"rect.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/tooltip/rect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAEhE,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQ5D;AAED,4EAA4E;AAC5E,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO,CAIlE;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAO3E;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CASnF;AAED,sEAAsE;AACtE,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,MAAM,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GACxE,iBAAiB,CAWnB"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { Rect } from './inferTooltipPlacement';
|
|
2
|
+
/**
|
|
3
|
+
* Narrowest a side card may get: the width it spends on its own chrome, so
|
|
4
|
+
* content padding on both edges plus the border. Below this there is nothing
|
|
5
|
+
* left to lay text out in, and React Native overflows the card instead of
|
|
6
|
+
* shrinking it — the preview would stop showing the author what ships.
|
|
7
|
+
*
|
|
8
|
+
* Deliberately structural, not a readability judgment. How narrow is *too*
|
|
9
|
+
* narrow to read is the author's call, made against the device preview.
|
|
10
|
+
*/
|
|
11
|
+
export declare function tooltipMinSideCardWidth(opts: {
|
|
12
|
+
contentPadding: number;
|
|
13
|
+
borderWidth?: number;
|
|
14
|
+
cardMaxWidth: number;
|
|
15
|
+
}): number;
|
|
16
|
+
/**
|
|
17
|
+
* Horizontal room beside an expanded target for a LEFT/RIGHT tooltip.
|
|
18
|
+
*
|
|
19
|
+
* Reserves `viewportPadding` on the screen edge the card grows toward, matching
|
|
20
|
+
* the LEFT/RIGHT clamp in `computeTooltipPosition`. Web clamps side placements
|
|
21
|
+
* to the raw edge instead; RN keeps the screen margin because an edge-to-edge
|
|
22
|
+
* card reads as broken on a phone-width viewport.
|
|
23
|
+
*/
|
|
24
|
+
export declare function tooltipSideGap(opts: {
|
|
25
|
+
placement: 'LEFT' | 'RIGHT';
|
|
26
|
+
target: Rect;
|
|
27
|
+
windowWidth: number;
|
|
28
|
+
notchSize: number;
|
|
29
|
+
viewportPadding?: number;
|
|
30
|
+
}): number;
|
|
31
|
+
/**
|
|
32
|
+
* Width a LEFT/RIGHT tooltip may use: the room beside the target, capped at the
|
|
33
|
+
* theme width. The card takes whatever is left and grows taller to compensate.
|
|
34
|
+
* Null when not even {@link tooltipMinSideCardWidth} fits, so placement falls
|
|
35
|
+
* back to the vertical flip.
|
|
36
|
+
*
|
|
37
|
+
* `target` must already be expanded by backdrop padding and outside highlight
|
|
38
|
+
* spread — the same rect passed to `inferTooltipPlacement`.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveTooltipSideCardWidth(opts: {
|
|
41
|
+
placement: 'LEFT' | 'RIGHT';
|
|
42
|
+
target: Rect;
|
|
43
|
+
windowWidth: number;
|
|
44
|
+
notchSize: number;
|
|
45
|
+
cardMaxWidth: number;
|
|
46
|
+
minWidth: number;
|
|
47
|
+
viewportPadding?: number;
|
|
48
|
+
}): number | null;
|
|
49
|
+
/**
|
|
50
|
+
* Shortest a card may get: the height it spends on its own chrome, so
|
|
51
|
+
* content padding on both edges plus the border. Mirrors
|
|
52
|
+
* {@link tooltipMinSideCardWidth} on the vertical axis.
|
|
53
|
+
*/
|
|
54
|
+
export declare function tooltipMinCardHeight(opts: {
|
|
55
|
+
contentPadding: number;
|
|
56
|
+
borderWidth?: number;
|
|
57
|
+
cardMaxHeight: number;
|
|
58
|
+
}): number;
|
|
59
|
+
/**
|
|
60
|
+
* Vertical room above or below an expanded target for an ABOVE/BELOW tooltip.
|
|
61
|
+
*
|
|
62
|
+
* Reserves the matching viewport inset on the edge the card grows toward,
|
|
63
|
+
* matching the ABOVE/BELOW clamp in `computeTooltipPosition`.
|
|
64
|
+
*/
|
|
65
|
+
export declare function tooltipVerticalGap(opts: {
|
|
66
|
+
placement: 'ABOVE' | 'BELOW';
|
|
67
|
+
target: Rect;
|
|
68
|
+
windowHeight: number;
|
|
69
|
+
notchSize: number;
|
|
70
|
+
viewportPadding?: number;
|
|
71
|
+
viewportInsets?: {
|
|
72
|
+
top?: number;
|
|
73
|
+
bottom?: number;
|
|
74
|
+
};
|
|
75
|
+
}): number;
|
|
76
|
+
//# sourceMappingURL=resolveSideCardWidth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveSideCardWidth.d.ts","sourceRoot":"","sources":["../../../../../../src/surfaces/tooltip/resolveSideCardWidth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAGpD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,MAAM,CAaT;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,MAAM,EAAE,IAAI,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,MAAM,CAMT;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,MAAM,EAAE,IAAI,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,MAAM,GAAG,IAAI,CAKhB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,CAWT;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,MAAM,EAAE,IAAI,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACpD,GAAG,MAAM,CAQT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@userflow-tech/react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Userflow SDK for React Native — onboarding flows, tooltips, and modals.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
@@ -42,25 +42,46 @@
|
|
|
42
42
|
"default": "./lib/commonjs/expo-router/index.js"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
+
"./babel-plugin": {
|
|
46
|
+
"types": "./babel-plugin/index.d.ts",
|
|
47
|
+
"default": "./babel-plugin.js"
|
|
48
|
+
},
|
|
49
|
+
"./app.plugin": "./app.plugin.js",
|
|
50
|
+
"./app.plugin.js": "./app.plugin.js",
|
|
45
51
|
"./package.json": "./package.json"
|
|
46
52
|
},
|
|
47
53
|
"files": [
|
|
48
54
|
"src",
|
|
49
55
|
"lib",
|
|
50
56
|
"docs",
|
|
57
|
+
"vendor",
|
|
58
|
+
"expo-plugin",
|
|
59
|
+
"babel-plugin",
|
|
60
|
+
"babel-plugin.js",
|
|
61
|
+
"app.plugin.js",
|
|
51
62
|
"!**/__tests__",
|
|
52
63
|
"!**/*.test.*",
|
|
53
64
|
"LICENSE"
|
|
54
65
|
],
|
|
66
|
+
"scripts": {
|
|
67
|
+
"build": "node ../../scripts/write-version.mjs SDK_VERSION && bob build",
|
|
68
|
+
"test": "jest",
|
|
69
|
+
"lint": "eslint src",
|
|
70
|
+
"typecheck": "tsc --noEmit",
|
|
71
|
+
"pretest": "node ../../scripts/write-version.mjs SDK_VERSION",
|
|
72
|
+
"prepack": "node ../../scripts/prepare-sdk-pack.mjs",
|
|
73
|
+
"postpack": "node ../../scripts/restore-sdk-pack.mjs",
|
|
74
|
+
"clean": "rimraf lib vendor expo-plugin babel-plugin"
|
|
75
|
+
},
|
|
55
76
|
"peerDependencies": {
|
|
56
|
-
"@react-native-async-storage/async-storage": ">=1.23.0",
|
|
57
77
|
"@react-native-community/netinfo": ">=11.0.0",
|
|
58
78
|
"@react-navigation/native": ">=6.0.0",
|
|
59
79
|
"expo-router": ">=3.0.0",
|
|
60
80
|
"expo-secure-store": ">=13.0.0",
|
|
61
81
|
"react": ">=18.2.0",
|
|
62
82
|
"react-native": ">=0.74.0",
|
|
63
|
-
"react-native-safe-area-context": ">=4.0.0"
|
|
83
|
+
"react-native-safe-area-context": ">=4.0.0",
|
|
84
|
+
"react-native-view-shot": ">=5.0.0"
|
|
64
85
|
},
|
|
65
86
|
"peerDependenciesMeta": {
|
|
66
87
|
"@react-native-community/netinfo": {
|
|
@@ -80,18 +101,20 @@
|
|
|
80
101
|
}
|
|
81
102
|
},
|
|
82
103
|
"dependencies": {
|
|
83
|
-
"@
|
|
84
|
-
"@userflow-tech/core": "
|
|
104
|
+
"@react-native-async-storage/async-storage": ">=1.23.0",
|
|
105
|
+
"@userflow-tech/core": "file:./vendor/core",
|
|
106
|
+
"@userflow-tech/protocol": "file:./vendor/protocol"
|
|
85
107
|
},
|
|
86
108
|
"devDependencies": {
|
|
87
109
|
"@babel/core": "^7.25.0",
|
|
88
|
-
"@react-native-async-storage/async-storage": "^2.1.2",
|
|
89
110
|
"@react-native-community/netinfo": "^11.4.1",
|
|
90
111
|
"@react-native/babel-preset": "^0.81.5",
|
|
91
112
|
"@react-navigation/native": "^7.1.6",
|
|
92
113
|
"@types/jest": "^29.5.12",
|
|
93
114
|
"@types/react": "~19.1.10",
|
|
94
115
|
"@types/react-test-renderer": "^19.1.0",
|
|
116
|
+
"@userflow-tech/eslint-config": "workspace:*",
|
|
117
|
+
"@userflow-tech/tsconfig": "workspace:*",
|
|
95
118
|
"babel-jest": "^29.7.0",
|
|
96
119
|
"expo-router": "^5.1.0",
|
|
97
120
|
"jest": "^29.7.0",
|
|
@@ -100,11 +123,10 @@
|
|
|
100
123
|
"react-native-builder-bob": "^0.30.0",
|
|
101
124
|
"react-native-safe-area-context": "~5.6.0",
|
|
102
125
|
"react-native-screens": "~4.16.0",
|
|
126
|
+
"react-native-view-shot": "^5.1.1",
|
|
103
127
|
"react-test-renderer": "19.1.0",
|
|
104
128
|
"rimraf": "^5.0.5",
|
|
105
|
-
"typescript": "^5.4.0"
|
|
106
|
-
"@userflow-tech/tsconfig": "0.0.0",
|
|
107
|
-
"@userflow-tech/eslint-config": "0.0.0"
|
|
129
|
+
"typescript": "^5.4.0"
|
|
108
130
|
},
|
|
109
131
|
"react-native-builder-bob": {
|
|
110
132
|
"source": "src",
|
|
@@ -132,13 +154,5 @@
|
|
|
132
154
|
},
|
|
133
155
|
"publishConfig": {
|
|
134
156
|
"access": "restricted"
|
|
135
|
-
},
|
|
136
|
-
"scripts": {
|
|
137
|
-
"build": "node ../../scripts/write-version.mjs SDK_VERSION && bob build",
|
|
138
|
-
"test": "jest",
|
|
139
|
-
"lint": "eslint src",
|
|
140
|
-
"typecheck": "tsc --noEmit",
|
|
141
|
-
"pretest": "node ../../scripts/write-version.mjs SDK_VERSION",
|
|
142
|
-
"clean": "rimraf lib"
|
|
143
157
|
}
|
|
144
|
-
}
|
|
158
|
+
}
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import type { SemanticRole, SemanticSegment, SiblingDescriptor } from '@userflow-tech/protocol';
|
|
2
2
|
import type { MutableRefObject, RefObject } from 'react';
|
|
3
3
|
|
|
4
|
+
import { getLiveHostProps, type AnyFiber } from './fiber/fiberInternals';
|
|
5
|
+
import {
|
|
6
|
+
createLazyHostFiberIndex,
|
|
7
|
+
lookupHostFiber,
|
|
8
|
+
type HostFiberIndex,
|
|
9
|
+
} from './fiber/indexHostFibers';
|
|
10
|
+
import { readHostPlaceholder, readHostText } from './fiber/readHostContent';
|
|
11
|
+
|
|
4
12
|
/**
|
|
5
13
|
* Multi-instance auto-anchor registry for Stage 3.
|
|
6
14
|
*
|
|
@@ -13,7 +21,7 @@ export type AutoAnchorRef = RefObject<unknown> | MutableRefObject<unknown>;
|
|
|
13
21
|
|
|
14
22
|
export type AutoAnchorListener = () => void;
|
|
15
23
|
|
|
16
|
-
/** Build-time descriptor stamped by `@userflow-tech/babel-plugin` (full or expanded compact). */
|
|
24
|
+
/** Build-time descriptor stamped by `@userflow-tech/react-native/babel-plugin` (full or expanded compact). */
|
|
17
25
|
export interface BuildTimeHints {
|
|
18
26
|
/** Canonical structural path (IDs replace ordinals when present). */
|
|
19
27
|
ufid: string;
|
|
@@ -113,11 +121,31 @@ function siblingGroupKey(inst: AutoAnchorInstance): string {
|
|
|
113
121
|
return idx === -1 ? path : path.slice(0, idx);
|
|
114
122
|
}
|
|
115
123
|
|
|
124
|
+
/**
|
|
125
|
+
* What an author can see that tells this instance apart from a lookalike.
|
|
126
|
+
* Same signals `deriveIdentityStrength` calls `content`. Undefined when the
|
|
127
|
+
* instance shows nothing of its own.
|
|
128
|
+
*/
|
|
129
|
+
function contentSignature(inst: AutoAnchorInstance): string | undefined {
|
|
130
|
+
const parts = [inst.childText, inst.accessibilityLabel, inst.iconName, inst.imageSrc].filter(
|
|
131
|
+
(part): part is string => !!part,
|
|
132
|
+
);
|
|
133
|
+
return parts.length > 0 ? parts.join('\u0000') : undefined;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
interface LiveContentCache {
|
|
137
|
+
fiber: AnyFiber;
|
|
138
|
+
/** Props object identity — React replaces it on every render. */
|
|
139
|
+
props: Record<string, unknown> | undefined;
|
|
140
|
+
childText: string;
|
|
141
|
+
}
|
|
142
|
+
|
|
116
143
|
export class AutoAnchorRegistry {
|
|
117
144
|
private readonly instances = new Map<string, AutoAnchorInstance>();
|
|
118
145
|
private readonly byRegistryKey = new Map<string, Set<string>>();
|
|
119
146
|
private readonly byManualId = new Map<string, Set<string>>();
|
|
120
147
|
private readonly byTemplatePath = new Map<string, Set<string>>();
|
|
148
|
+
private readonly liveContent = new Map<string, LiveContentCache>();
|
|
121
149
|
private readonly listeners = new Set<AutoAnchorListener>();
|
|
122
150
|
private notifyScheduled = false;
|
|
123
151
|
|
|
@@ -301,6 +329,97 @@ export class AutoAnchorRegistry {
|
|
|
301
329
|
};
|
|
302
330
|
}
|
|
303
331
|
|
|
332
|
+
/**
|
|
333
|
+
* Fill `childText` (and live `testID`) from the host fiber. Live content
|
|
334
|
+
* wins when readable; the build-time hint is the fallback.
|
|
335
|
+
*
|
|
336
|
+
* Direct fiber pointers are preferred; the scan-root index is built lazily
|
|
337
|
+
* and only if some instance cannot reach its fiber that way (Paper release
|
|
338
|
+
* builds, mainly), then reused for the rest of the pass.
|
|
339
|
+
*
|
|
340
|
+
* Silent — does not notify listeners.
|
|
341
|
+
*/
|
|
342
|
+
refreshLiveContent(instances?: AutoAnchorInstance[]): void {
|
|
343
|
+
const list = instances ?? this.allInstances();
|
|
344
|
+
const getIndex = createLazyHostFiberIndex();
|
|
345
|
+
const seen = new Set<string>();
|
|
346
|
+
for (const inst of list) {
|
|
347
|
+
if (seen.has(inst.instanceId)) continue;
|
|
348
|
+
seen.add(inst.instanceId);
|
|
349
|
+
this.refreshOneLiveContent(inst, getIndex);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
private refreshOneLiveContent(inst: AutoAnchorInstance, getIndex: () => HostFiberIndex): void {
|
|
354
|
+
let fiber: AnyFiber | null = null;
|
|
355
|
+
try {
|
|
356
|
+
fiber = lookupHostFiber(getIndex, inst.ref.current);
|
|
357
|
+
} catch {
|
|
358
|
+
fiber = null;
|
|
359
|
+
}
|
|
360
|
+
if (!fiber) return;
|
|
361
|
+
|
|
362
|
+
let props: Record<string, unknown> | undefined;
|
|
363
|
+
try {
|
|
364
|
+
props = getLiveHostProps(fiber);
|
|
365
|
+
} catch {
|
|
366
|
+
props = undefined;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const cached = this.liveContent.get(inst.instanceId);
|
|
370
|
+
// Same fiber and same props object means no re-render since the last read,
|
|
371
|
+
// so the subtree walk would return what we already have. Matters because
|
|
372
|
+
// resolution polls this for every registered instance.
|
|
373
|
+
if (cached && cached.fiber === fiber && props !== undefined && cached.props === props) {
|
|
374
|
+
inst.childText = cached.childText;
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
if (props) this.applyLiveIdentity(inst, props);
|
|
379
|
+
|
|
380
|
+
let live: string | undefined;
|
|
381
|
+
try {
|
|
382
|
+
live =
|
|
383
|
+
inst.role === 'Input'
|
|
384
|
+
? (readHostPlaceholder(fiber) ?? readHostText(fiber))
|
|
385
|
+
: readHostText(fiber);
|
|
386
|
+
} catch {
|
|
387
|
+
live = undefined;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
if (live) {
|
|
391
|
+
const changed = inst.childText !== live;
|
|
392
|
+
inst.childText = live;
|
|
393
|
+
this.liveContent.set(inst.instanceId, { fiber, props, childText: live });
|
|
394
|
+
// Text is what separates helper-rendered twins, so the group's ambiguity
|
|
395
|
+
// verdict is only trustworthy once it has been read.
|
|
396
|
+
if (changed) this.recomputeAmbiguity(inst.registryKey, inst.templatePath, inst.manualId);
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
if (cached && cached.fiber !== fiber) {
|
|
400
|
+
this.liveContent.delete(inst.instanceId);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Copy `testID` off the live host so a shared `__userflowAutoAnchor` callback
|
|
406
|
+
* (helper-rendered rows) cannot pin every instance to the last render's bag.
|
|
407
|
+
* Silent — no listener notify.
|
|
408
|
+
*/
|
|
409
|
+
private applyLiveIdentity(inst: AutoAnchorInstance, props: Record<string, unknown>): void {
|
|
410
|
+
const raw = props.testID;
|
|
411
|
+
const liveTestID = typeof raw === 'string' && raw.trim() ? raw.trim() : undefined;
|
|
412
|
+
if (!liveTestID || liveTestID === inst.testID) return;
|
|
413
|
+
|
|
414
|
+
const prev = { manualId: inst.manualId, userflowId: inst.userflowId, testID: inst.testID };
|
|
415
|
+
inst.testID = liveTestID;
|
|
416
|
+
if (!inst.userflowId && (!inst.manualId || inst.manualId === prev.testID)) {
|
|
417
|
+
inst.manualId = liveTestID;
|
|
418
|
+
}
|
|
419
|
+
this.refreshManualIndexes(inst, prev);
|
|
420
|
+
this.recomputeAmbiguity(inst.registryKey, inst.templatePath, inst.manualId);
|
|
421
|
+
}
|
|
422
|
+
|
|
304
423
|
subscribe(listener: AutoAnchorListener): () => void {
|
|
305
424
|
this.listeners.add(listener);
|
|
306
425
|
return () => {
|
|
@@ -321,6 +440,7 @@ export class AutoAnchorRegistry {
|
|
|
321
440
|
this.byRegistryKey.clear();
|
|
322
441
|
this.byManualId.clear();
|
|
323
442
|
this.byTemplatePath.clear();
|
|
443
|
+
this.liveContent.clear();
|
|
324
444
|
this.notifyScheduled = false;
|
|
325
445
|
nextInstanceSeq = 1;
|
|
326
446
|
}
|
|
@@ -341,6 +461,7 @@ export class AutoAnchorRegistry {
|
|
|
341
461
|
}
|
|
342
462
|
|
|
343
463
|
this.instances.delete(instanceId);
|
|
464
|
+
this.liveContent.delete(instanceId);
|
|
344
465
|
this.removeIndex(this.byRegistryKey, inst.registryKey, instanceId);
|
|
345
466
|
this.removeIndex(this.byTemplatePath, inst.templatePath, instanceId);
|
|
346
467
|
if (inst.manualId) this.removeIndex(this.byManualId, inst.manualId, instanceId);
|
|
@@ -373,12 +494,28 @@ export class AutoAnchorRegistry {
|
|
|
373
494
|
}
|
|
374
495
|
}
|
|
375
496
|
|
|
497
|
+
/**
|
|
498
|
+
* Instances sharing a template path are only twins while they look alike.
|
|
499
|
+
* Four rows from one `field()` helper are indistinguishable at register time
|
|
500
|
+
* and separate once their labels are read, so ambiguity is decided on
|
|
501
|
+
* content, not on the shared path alone. An instance stays ambiguous when it
|
|
502
|
+
* carries no content of its own, or when a peer carries the same content.
|
|
503
|
+
*/
|
|
376
504
|
private recomputeAmbiguity(registryKey: string, templatePath: string, manualId?: string): void {
|
|
377
505
|
const mark = (list: AutoAnchorInstance[]) => {
|
|
378
|
-
const
|
|
506
|
+
const unlabelled = list.length > 1 && list.every((i) => !i.manualId);
|
|
507
|
+
const shared = new Map<string, number>();
|
|
508
|
+
if (unlabelled) {
|
|
509
|
+
for (const i of list) {
|
|
510
|
+
const sig = contentSignature(i);
|
|
511
|
+
if (sig) shared.set(sig, (shared.get(sig) ?? 0) + 1);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
379
514
|
for (const i of list) {
|
|
515
|
+
const sig = unlabelled ? contentSignature(i) : undefined;
|
|
516
|
+
const twins = unlabelled && (!sig || (shared.get(sig) ?? 0) > 1);
|
|
380
517
|
i.ambiguous =
|
|
381
|
-
|
|
518
|
+
twins || (i.manualId ? this.getInstancesByManualId(i.manualId).length > 1 : false);
|
|
382
519
|
}
|
|
383
520
|
};
|
|
384
521
|
mark(this.getInstancesByRegistryKey(registryKey));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { anchorRegistry } from './AnchorRegistry';
|
|
2
|
+
import { autoAnchorRegistry } from './AutoAnchorRegistry';
|
|
2
3
|
import { fiberScanRoot } from './fiber/FiberScanRoot';
|
|
3
4
|
|
|
4
5
|
type Listener = () => void;
|
|
@@ -9,6 +10,7 @@ type Listener = () => void;
|
|
|
9
10
|
* Fiber-resolved anchors (testID / nativeID / accessibilityLabel) do not emit
|
|
10
11
|
* registry events, so we combine:
|
|
11
12
|
* - {@link anchorRegistry} mount/unmount
|
|
13
|
+
* - {@link autoAnchorRegistry} mount/unmount
|
|
12
14
|
* - {@link fiberScanRoot} mount/unmount
|
|
13
15
|
* - screen-change notifications
|
|
14
16
|
* - a slow interval that only runs while at least one listener is subscribed
|
|
@@ -17,6 +19,7 @@ class AnchorChangeTicker {
|
|
|
17
19
|
private readonly listeners = new Set<Listener>();
|
|
18
20
|
private intervalHandle: ReturnType<typeof setInterval> | null = null;
|
|
19
21
|
private unsubRegistry: (() => void) | null = null;
|
|
22
|
+
private unsubAuto: (() => void) | null = null;
|
|
20
23
|
private unsubScan: (() => void) | null = null;
|
|
21
24
|
|
|
22
25
|
/** Poll interval while ELEMENT conditions are tracked (ms). */
|
|
@@ -51,6 +54,9 @@ class AnchorChangeTicker {
|
|
|
51
54
|
if (!this.unsubRegistry) {
|
|
52
55
|
this.unsubRegistry = anchorRegistry.subscribe(() => this.emit());
|
|
53
56
|
}
|
|
57
|
+
if (!this.unsubAuto) {
|
|
58
|
+
this.unsubAuto = autoAnchorRegistry.subscribe(() => this.emit());
|
|
59
|
+
}
|
|
54
60
|
if (!this.unsubScan) {
|
|
55
61
|
this.unsubScan = fiberScanRoot.subscribe(() => this.emit());
|
|
56
62
|
}
|
|
@@ -68,6 +74,10 @@ class AnchorChangeTicker {
|
|
|
68
74
|
this.unsubRegistry();
|
|
69
75
|
this.unsubRegistry = null;
|
|
70
76
|
}
|
|
77
|
+
if (this.unsubAuto) {
|
|
78
|
+
this.unsubAuto();
|
|
79
|
+
this.unsubAuto = null;
|
|
80
|
+
}
|
|
71
81
|
if (this.unsubScan) {
|
|
72
82
|
this.unsubScan();
|
|
73
83
|
this.unsubScan = null;
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import { expandBuildTimeHints, isHintsInput, type HintsInput } from './hintsCodec';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* Runtime half of build-time auto-anchoring (see `@userflow-tech/babel-plugin`).
|
|
13
|
+
* Runtime half of build-time auto-anchoring (see `@userflow-tech/react-native/babel-plugin`).
|
|
14
14
|
*
|
|
15
15
|
* Each mount creates a distinct AutoAnchorRegistry instance. Shared templates
|
|
16
16
|
* (design-system / list rows) register separately and are marked ambiguous
|
|
@@ -3,24 +3,29 @@ import type { FlowConditionFragment } from '@userflow-tech/protocol';
|
|
|
3
3
|
|
|
4
4
|
import { anchorChangeTicker } from './anchorChangeTicker';
|
|
5
5
|
import { resolveAnchorHost } from './resolveAnchorHost';
|
|
6
|
+
import { resolveAutoAnchorHost } from './resolveAutoAnchorHost';
|
|
6
7
|
import { resolveManualAnchorId } from './resolveManualAnchorId';
|
|
7
8
|
|
|
8
9
|
/** ELEMENT states the mobile SDK can evaluate today. */
|
|
9
10
|
const SUPPORTED_ELEMENT_STATES = new Set(['PRESENT', 'NOT_PRESENT']);
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
|
-
* Evaluate ELEMENT client conditions against manual anchors
|
|
13
|
-
* `testID` / `nativeID` / `accessibilityLabel` targets
|
|
13
|
+
* Evaluate ELEMENT client conditions against manual anchors, fiber-resolved
|
|
14
|
+
* `testID` / `nativeID` / `accessibilityLabel` targets, and AUTO (codeless)
|
|
15
|
+
* selectors.
|
|
14
16
|
*
|
|
15
|
-
* Supports PRESENT / NOT_PRESENT for MANUAL selectors (`css` → anchor id)
|
|
16
|
-
* AUTO
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Supports PRESENT / NOT_PRESENT for MANUAL selectors (`css` → anchor id) and
|
|
18
|
+
* AUTO selectors (`autoData` → {@link resolveAutoAnchorHost}). AUTO fails
|
|
19
|
+
* closed: `unknown` / `ambiguous` stay `null` so a gated flow never starts
|
|
20
|
+
* just because the auto-anchor registry is empty. Web-interaction states
|
|
21
|
+
* (CLICK, DISABLED, …) still report unknown.
|
|
19
22
|
*
|
|
20
|
-
* "Present" means
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
23
|
+
* "Present" means a unique host on a **visible** navigator screen. MANUAL
|
|
24
|
+
* goes through `resolveAnchorHost`; AUTO through `resolveAutoAnchorHost`.
|
|
25
|
+
* Both skip screens covered by another navigator screen, so an id on a
|
|
26
|
+
* pushed-under screen counts as absent. Pixel visibility (off-screen inside a
|
|
27
|
+
* ScrollView, opacity 0, etc.) would need async `measureInWindow` and is out
|
|
28
|
+
* of scope.
|
|
24
29
|
*
|
|
25
30
|
* Note: compares string literals rather than importing protocol enums so Jest
|
|
26
31
|
* (which cannot resolve the ESM-only `@userflow-tech/protocol` package) stays
|
|
@@ -78,12 +83,20 @@ function evaluateElementCondition(
|
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
if ((selector.type as string | null) === 'AUTO') {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
const resolution = resolveAutoAnchorHost(selector.autoData);
|
|
87
|
+
if (resolution.status === 'unknown') {
|
|
88
|
+
warnOnce(
|
|
89
|
+
condition.id,
|
|
90
|
+
`[Userflow] ELEMENT condition ${condition.id} uses an AUTO (codeless) selector ` +
|
|
91
|
+
'that could not be resolved; leaving unknown',
|
|
92
|
+
);
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
if (resolution.status === 'ambiguous') {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const present = resolution.status === 'found';
|
|
99
|
+
return elementState === 'PRESENT' ? present : !present;
|
|
87
100
|
}
|
|
88
101
|
|
|
89
102
|
const anchorId = resolveManualAnchorId(selector.css);
|