@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
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { decodeMobileAutoData } from '@userflow-tech/protocol';
|
|
4
|
+
import { fiberFromPublicInstance } from "./fiber/fiberInternals.js";
|
|
5
|
+
import { createFiberMeasureInWindow } from "./fiber/measureHostFiber.js";
|
|
6
|
+
import { isFiberOnVisibleScreen } from "./fiber/visibleScreens.js";
|
|
7
|
+
import { resolveAnchorHost } from "./resolveAnchorHost.js";
|
|
8
|
+
import { matchFingerprint } from "./semanticMatcher.js";
|
|
9
|
+
function isMeasurableNode(value) {
|
|
10
|
+
return typeof value === 'object' && value !== null && typeof value.measureInWindow === 'function';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Wrap a live auto-anchor instance into an {@link AnchorHost}. Returns null when
|
|
15
|
+
* the instance is unmounted or its node cannot be measured.
|
|
16
|
+
*/
|
|
17
|
+
function hostFromInstance(inst) {
|
|
18
|
+
const node = inst.ref.current;
|
|
19
|
+
if (isMeasurableNode(node)) {
|
|
20
|
+
return {
|
|
21
|
+
measureInWindow: callback => {
|
|
22
|
+
node.measureInWindow(callback);
|
|
23
|
+
},
|
|
24
|
+
...(typeof node.scrollIntoView === 'function' ? {
|
|
25
|
+
scrollIntoView: () => {
|
|
26
|
+
node.scrollIntoView?.();
|
|
27
|
+
}
|
|
28
|
+
} : {})
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const fiber = fiberFromInstance(inst);
|
|
32
|
+
if (!fiber) return null;
|
|
33
|
+
return {
|
|
34
|
+
measureInWindow: createFiberMeasureInWindow(fiber)
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function fiberFromInstance(inst) {
|
|
38
|
+
return fiberFromPublicInstance(inst.ref.current);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Whether a scored instance is on a screen the user can see.
|
|
43
|
+
*
|
|
44
|
+
* No fiber pointer means we cannot prove the host is covered (tests, and hosts
|
|
45
|
+
* whose public instance has no internals link) — same fail-open as apps without
|
|
46
|
+
* react-native-screens.
|
|
47
|
+
*/
|
|
48
|
+
function isInstanceOnVisibleScreen(inst) {
|
|
49
|
+
const fiber = fiberFromInstance(inst);
|
|
50
|
+
if (!fiber) return true;
|
|
51
|
+
return isFiberOnVisibleScreen(fiber);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Authoritative id that the existing fiber / manual resolver can look up. */
|
|
55
|
+
function exactIdFromFingerprint(fp) {
|
|
56
|
+
if (fp.userflowId) return fp.userflowId;
|
|
57
|
+
if (fp.testID) return fp.testID;
|
|
58
|
+
if (fp.nativeID && !fp.nativeID.startsWith('uf_')) return fp.nativeID;
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
function decodeInput(autoData) {
|
|
62
|
+
if (autoData == null) return null;
|
|
63
|
+
if (typeof autoData === 'string') {
|
|
64
|
+
if (!autoData.trim()) return null;
|
|
65
|
+
return decodeMobileAutoData(autoData);
|
|
66
|
+
}
|
|
67
|
+
return autoData;
|
|
68
|
+
}
|
|
69
|
+
function mapMatch(match) {
|
|
70
|
+
if (match.instance) {
|
|
71
|
+
const host = hostFromInstance(match.instance);
|
|
72
|
+
if (!host) return {
|
|
73
|
+
status: 'unknown',
|
|
74
|
+
match
|
|
75
|
+
};
|
|
76
|
+
const fiber = fiberFromInstance(match.instance);
|
|
77
|
+
return {
|
|
78
|
+
status: 'found',
|
|
79
|
+
host,
|
|
80
|
+
match,
|
|
81
|
+
...(fiber ? {
|
|
82
|
+
fiber
|
|
83
|
+
} : {})
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
switch (match.reason) {
|
|
87
|
+
case 'ambiguous-explicit-id':
|
|
88
|
+
return {
|
|
89
|
+
status: 'ambiguous',
|
|
90
|
+
match
|
|
91
|
+
};
|
|
92
|
+
case 'all-contradicted':
|
|
93
|
+
return {
|
|
94
|
+
status: 'absent',
|
|
95
|
+
match
|
|
96
|
+
};
|
|
97
|
+
default:
|
|
98
|
+
// no-candidates / no-fingerprint / below-threshold / not-unique / unset
|
|
99
|
+
return {
|
|
100
|
+
status: 'unknown',
|
|
101
|
+
match
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Score visible-screen instances first so a covered look-alike cannot steal
|
|
108
|
+
* uniqueness or win over a host the user can actually see. If nothing visible
|
|
109
|
+
* scored and the unfiltered pool still has a hit, that hit is on a covered
|
|
110
|
+
* screen — `absent`, matching MANUAL covered-screen semantics.
|
|
111
|
+
*/
|
|
112
|
+
function mapScored(fp) {
|
|
113
|
+
const visible = matchFingerprint(fp, {
|
|
114
|
+
instanceFilter: isInstanceOnVisibleScreen
|
|
115
|
+
});
|
|
116
|
+
if (visible.instance) return mapMatch(visible);
|
|
117
|
+
if (visible.reason === 'no-candidates') {
|
|
118
|
+
const any = matchFingerprint(fp);
|
|
119
|
+
if (any.instance) return {
|
|
120
|
+
status: 'absent',
|
|
121
|
+
match: any
|
|
122
|
+
};
|
|
123
|
+
if (any.reason === 'all-contradicted') return mapMatch(any);
|
|
124
|
+
}
|
|
125
|
+
return mapMatch(visible);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Resolve an AUTO (codeless) selector against the live UI.
|
|
130
|
+
*
|
|
131
|
+
* Exact-id fast path reuses {@link resolveAnchorHost} so a fingerprint that
|
|
132
|
+
* carries a real `testID` / `userflowId` / non-`uf_` `nativeID` still resolves
|
|
133
|
+
* under Babel `stampOnly: true` (no auto-registry population).
|
|
134
|
+
*
|
|
135
|
+
* Scored matches run over `autoAnchorRegistry` and fail closed: weak or
|
|
136
|
+
* non-unique evidence is `unknown`, not `absent`, so ELEMENT gates stay blocked
|
|
137
|
+
* rather than inventing a truth value. Hosts on a covered navigator screen
|
|
138
|
+
* are skipped the same way the fiber scan skips them.
|
|
139
|
+
*/
|
|
140
|
+
export function resolveAutoAnchorHost(autoData) {
|
|
141
|
+
const decoded = decodeInput(autoData);
|
|
142
|
+
const fp = decoded?.fingerprint;
|
|
143
|
+
if (!fp) return {
|
|
144
|
+
status: 'unknown'
|
|
145
|
+
};
|
|
146
|
+
const exactId = exactIdFromFingerprint(fp);
|
|
147
|
+
if (exactId) {
|
|
148
|
+
const exact = resolveAnchorHost(exactId);
|
|
149
|
+
if (exact.status === 'found') {
|
|
150
|
+
return {
|
|
151
|
+
status: 'found',
|
|
152
|
+
host: exact.host,
|
|
153
|
+
fiberCacheId: exactId,
|
|
154
|
+
...(exact.fiber ? {
|
|
155
|
+
fiber: exact.fiber
|
|
156
|
+
} : {})
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
if (exact.status === 'ambiguous') {
|
|
160
|
+
return {
|
|
161
|
+
status: 'ambiguous'
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return mapScored(fp);
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=resolveAutoAnchorHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["decodeMobileAutoData","fiberFromPublicInstance","createFiberMeasureInWindow","isFiberOnVisibleScreen","resolveAnchorHost","matchFingerprint","isMeasurableNode","value","measureInWindow","hostFromInstance","inst","node","ref","current","callback","scrollIntoView","fiber","fiberFromInstance","isInstanceOnVisibleScreen","exactIdFromFingerprint","fp","userflowId","testID","nativeID","startsWith","decodeInput","autoData","trim","mapMatch","match","instance","host","status","reason","mapScored","visible","instanceFilter","any","resolveAutoAnchorHost","decoded","fingerprint","exactId","exact","fiberCacheId"],"sourceRoot":"../../../src","sources":["anchors/resolveAutoAnchorHost.ts"],"mappings":";;AAAA,SACEA,oBAAoB,QAGf,yBAAyB;AAKhC,SAASC,uBAAuB,QAAQ,2BAAwB;AAChE,SAASC,0BAA0B,QAAQ,6BAA0B;AACrE,SAASC,sBAAsB,QAAQ,2BAAwB;AAC/D,SAASC,iBAAiB,QAAQ,wBAAqB;AACvD,SAASC,gBAAgB,QAA0B,sBAAmB;AAyBtE,SAASC,gBAAgBA,CAACC,KAAc,EAA2B;EACjE,OACE,OAAOA,KAAK,KAAK,QAAQ,IACzBA,KAAK,KAAK,IAAI,IACd,OAAQA,KA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ACtB","ignoreList":[]}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { decodeMobileAutoData } from '@userflow-tech/protocol';
|
|
4
|
+
import { autoAnchorRegistry } from "./AutoAnchorRegistry.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Scored semantic matcher (rn-v3).
|
|
8
|
+
*
|
|
9
|
+
* Ranks live {@link autoAnchorRegistry} instances against a recorded
|
|
10
|
+
* fingerprint. Explicit IDs are authoritative. Absolute ordinals are not
|
|
11
|
+
* scored. Accepts only when the best score clears a threshold and beats the
|
|
12
|
+
* runner-up by a margin.
|
|
13
|
+
*
|
|
14
|
+
* Play-time AUTO resolution goes through `resolveAutoAnchorHost`, which
|
|
15
|
+
* maps a hit into a measurable host.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export const MATCH_MIN_SCORE = 40;
|
|
19
|
+
export const MATCH_UNIQUENESS_MARGIN = 12;
|
|
20
|
+
/** Max contribution of structural-path similarity — matches the previous flat weight. */
|
|
21
|
+
const STRUCTURAL_PATH_MAX = 35;
|
|
22
|
+
function pathSegments(path) {
|
|
23
|
+
return path.split(' > ');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/** Kind (name) prefix of a canonical segment, before any `{…}` / `#ordinal`. */
|
|
27
|
+
function segmentKind(seg) {
|
|
28
|
+
const m = /^([A-Za-z_][\w.]*)/.exec(seg);
|
|
29
|
+
return m ? m[1] : seg;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** The `{k=v}` identity token of a segment (id or text), or null for ordinal-only. */
|
|
33
|
+
function segmentLabel(seg) {
|
|
34
|
+
const i = seg.indexOf('{');
|
|
35
|
+
return i >= 0 && seg.endsWith('}') ? seg.slice(i) : null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Graded structural-path similarity (replaces all-or-nothing exact match).
|
|
40
|
+
*
|
|
41
|
+
* Scores by aligned segments from the root: matching id/text-bearing segments
|
|
42
|
+
* count strongly, matching kinds lightly, and a *pure ordinal* difference in an
|
|
43
|
+
* otherwise same-kind segment is tolerated (no penalty) instead of zeroing the
|
|
44
|
+
* whole signal. A kind divergence stops deeper credit.
|
|
45
|
+
*/
|
|
46
|
+
function scoreStructuralPath(fpPath, instPath, max = STRUCTURAL_PATH_MAX) {
|
|
47
|
+
if (!fpPath || !instPath) return 0;
|
|
48
|
+
if (fpPath === instPath) return max;
|
|
49
|
+
const a = pathSegments(fpPath);
|
|
50
|
+
const b = pathSegments(instPath);
|
|
51
|
+
const n = Math.min(a.length, b.length);
|
|
52
|
+
let matchedLabeled = 0;
|
|
53
|
+
let kindAligned = 0;
|
|
54
|
+
for (let i = 0; i < n; i += 1) {
|
|
55
|
+
const sa = a[i];
|
|
56
|
+
const sb = b[i];
|
|
57
|
+
if (segmentKind(sa) !== segmentKind(sb)) break;
|
|
58
|
+
kindAligned += 1;
|
|
59
|
+
const la = segmentLabel(sa);
|
|
60
|
+
const lb = segmentLabel(sb);
|
|
61
|
+
if (la !== null && la === lb) matchedLabeled += 1;
|
|
62
|
+
}
|
|
63
|
+
const score = matchedLabeled * 12 + kindAligned * 2 + (a.length === b.length ? 3 : 0);
|
|
64
|
+
return Math.min(max, Math.round(score * (max / STRUCTURAL_PATH_MAX)));
|
|
65
|
+
}
|
|
66
|
+
function scoreSiblingWindow(expected, actual) {
|
|
67
|
+
if (expected.length === 0) return 0;
|
|
68
|
+
let score = 0;
|
|
69
|
+
const len = Math.min(expected.length, actual.length);
|
|
70
|
+
for (let i = 0; i < len; i += 1) {
|
|
71
|
+
const e = expected[expected.length - 1 - i];
|
|
72
|
+
const a = actual[actual.length - 1 - i];
|
|
73
|
+
if (e.kind === a.kind) score += 4;
|
|
74
|
+
if (e.role && a.role && e.role === a.role) score += 2;
|
|
75
|
+
if (e.userflowId && a.userflowId && e.userflowId === a.userflowId) score += 10;
|
|
76
|
+
if (e.testID && a.testID && e.testID === a.testID) score += 8;
|
|
77
|
+
if (e.text && a.text && textsAgree(e.text, a.text)) score += 6;
|
|
78
|
+
}
|
|
79
|
+
score -= Math.abs(expected.length - actual.length) * 2;
|
|
80
|
+
return Math.max(0, score);
|
|
81
|
+
}
|
|
82
|
+
function scoreAncestors(expected, actual) {
|
|
83
|
+
if (expected.length === 0) return 0;
|
|
84
|
+
let score = 0;
|
|
85
|
+
const eTail = expected.slice(-4);
|
|
86
|
+
const aTail = actual.slice(-4);
|
|
87
|
+
const len = Math.min(eTail.length, aTail.length);
|
|
88
|
+
for (let i = 0; i < len; i += 1) {
|
|
89
|
+
const e = eTail[eTail.length - 1 - i];
|
|
90
|
+
const a = aTail[aTail.length - 1 - i];
|
|
91
|
+
if (e.kind === a.kind) score += 5;
|
|
92
|
+
if (e.role && a.role && e.role === a.role) score += 3;
|
|
93
|
+
if (e.userflowId && a.userflowId && e.userflowId === a.userflowId) score += 15;
|
|
94
|
+
if (e.testID && a.testID && e.testID === a.testID) score += 12;
|
|
95
|
+
}
|
|
96
|
+
return score;
|
|
97
|
+
}
|
|
98
|
+
function contradictsStrong(fp, inst) {
|
|
99
|
+
if (fp.userflowId && inst.userflowId && fp.userflowId !== inst.userflowId) return true;
|
|
100
|
+
if (fp.testID && inst.testID && fp.testID !== inst.testID) return true;
|
|
101
|
+
if (fp.manualId && inst.manualId && fp.manualId !== inst.manualId) return true;
|
|
102
|
+
if (fp.kind && inst.kind && fp.kind !== inst.kind) return true;
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** True when an authoritative id in the fingerprint matches the live instance. */
|
|
107
|
+
function idAgrees(fp, inst) {
|
|
108
|
+
return !!fp.manualId && inst.manualId === fp.manualId || !!fp.userflowId && inst.userflowId === fp.userflowId || !!fp.testID && inst.testID === fp.testID || !!fp.nativeID && inst.nativeID === fp.nativeID && !fp.nativeID.startsWith('uf_');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Collapse digit runs so `Count: 0` and `Count: 1` compare as the same template. */
|
|
112
|
+
function normalizeText(value) {
|
|
113
|
+
return value.trim().replace(/\d+/g, '#').replace(/\s+/g, ' ');
|
|
114
|
+
}
|
|
115
|
+
function textsAgree(a, b) {
|
|
116
|
+
if (!a || !b) return false;
|
|
117
|
+
return a === b || normalizeText(a) === normalizeText(b);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** Recorded and live raw text both present but disagree (a rename / translation). */
|
|
121
|
+
function childTextRawDiffers(fp, inst) {
|
|
122
|
+
return !!fp.childText && !!inst.childText && fp.childText !== inst.childText;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Fatal text mismatch: raw strings differ *and* the digit-normalized forms
|
|
127
|
+
* differ. `Count: 0` vs `Count: 1` is not fatal; `Save` vs `Cancelar` is.
|
|
128
|
+
*/
|
|
129
|
+
function childTextDisagrees(fp, inst) {
|
|
130
|
+
return childTextRawDiffers(fp, inst) && !textsAgree(fp.childText, inst.childText);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* A text-independent intrinsic signal agrees: a matching icon or image. These
|
|
135
|
+
* survive translation/relabeling. (accessibilityLabel is excluded — it is
|
|
136
|
+
* typically localized too.)
|
|
137
|
+
*/
|
|
138
|
+
function intrinsicNonTextAgrees(fp, inst) {
|
|
139
|
+
return !!fp.iconName && inst.iconName === fp.iconName || !!fp.imageSrc && inst.imageSrc === fp.imageSrc;
|
|
140
|
+
}
|
|
141
|
+
function scoreInstance(fp, inst) {
|
|
142
|
+
if (contradictsStrong(fp, inst)) return -Infinity;
|
|
143
|
+
|
|
144
|
+
// A childText disagreement is disqualifying unless a text-independent identity
|
|
145
|
+
// vouches for the element (authoritative id, or matching icon/image).
|
|
146
|
+
if (childTextDisagrees(fp, inst) && !idAgrees(fp, inst) && !intrinsicNonTextAgrees(fp, inst)) {
|
|
147
|
+
return -Infinity;
|
|
148
|
+
}
|
|
149
|
+
let score = 0;
|
|
150
|
+
if (fp.manualId && inst.manualId === fp.manualId) score += 100;
|
|
151
|
+
if (fp.userflowId && inst.userflowId === fp.userflowId) score += 100;
|
|
152
|
+
if (fp.testID && inst.testID === fp.testID) score += 90;
|
|
153
|
+
if (fp.nativeID && inst.nativeID === fp.nativeID && !fp.nativeID.startsWith('uf_')) {
|
|
154
|
+
score += 80;
|
|
155
|
+
}
|
|
156
|
+
if (fp.kind === inst.kind) score += 20;
|
|
157
|
+
if (fp.role === inst.role) score += 10;
|
|
158
|
+
if (fp.isPressable === true && inst.isPressable) score += 5;
|
|
159
|
+
score += scoreStructuralPath(fp.structuralPath, inst.structuralPath, STRUCTURAL_PATH_MAX);
|
|
160
|
+
score += scoreStructuralPath(fp.templatePath, inst.templatePath, 15);
|
|
161
|
+
if (fp.instanceScope && inst.instanceScope === fp.instanceScope) score += 30;
|
|
162
|
+
if (fp.childText && inst.childText === fp.childText) score += 40;else if (fp.childText && inst.childText && textsAgree(fp.childText, inst.childText)) score += 18;
|
|
163
|
+
if (fp.accessibilityLabel && inst.accessibilityLabel === fp.accessibilityLabel) {
|
|
164
|
+
score += 25;
|
|
165
|
+
}
|
|
166
|
+
if (fp.iconName && inst.iconName) score += fp.iconName === inst.iconName ? 45 : -30;
|
|
167
|
+
if (fp.imageSrc && inst.imageSrc) score += fp.imageSrc === inst.imageSrc ? 45 : -30;
|
|
168
|
+
if (fp.childShape && inst.childShape === fp.childShape) score += 15;
|
|
169
|
+
score += scoreAncestors(fp.ancestors ?? [], inst.ancestors ?? []);
|
|
170
|
+
const window = autoAnchorRegistry.siblingWindow(inst.instanceId, 2);
|
|
171
|
+
score += scoreSiblingWindow(fp.previousSiblings ?? [], window.previous);
|
|
172
|
+
// Score next siblings once. The POC added a reversed pass *and* a direct pass,
|
|
173
|
+
// which double-counted the next window.
|
|
174
|
+
score += scoreSiblingWindow(fp.nextSiblings ?? [], window.next);
|
|
175
|
+
if (inst.ambiguous && !inst.manualId) score -= 40;
|
|
176
|
+
return score;
|
|
177
|
+
}
|
|
178
|
+
function candidatePool(fp, instanceFilter) {
|
|
179
|
+
// Explicit ids are authoritative: a miss is no-candidates, not a full-registry search.
|
|
180
|
+
let pool;
|
|
181
|
+
if (fp.manualId) {
|
|
182
|
+
pool = autoAnchorRegistry.getInstancesByManualId(fp.manualId);
|
|
183
|
+
} else if (fp.userflowId) {
|
|
184
|
+
pool = autoAnchorRegistry.getInstancesByManualId(fp.userflowId);
|
|
185
|
+
} else if (fp.testID) {
|
|
186
|
+
pool = autoAnchorRegistry.getInstancesByManualId(fp.testID);
|
|
187
|
+
} else {
|
|
188
|
+
pool = autoAnchorRegistry.allInstances();
|
|
189
|
+
if (fp.role) {
|
|
190
|
+
const filtered = pool.filter(i => i.role === fp.role);
|
|
191
|
+
if (filtered.length > 0) pool = filtered;
|
|
192
|
+
} else if (fp.kind) {
|
|
193
|
+
const filtered = pool.filter(i => i.kind === fp.kind);
|
|
194
|
+
if (filtered.length > 0) pool = filtered;
|
|
195
|
+
}
|
|
196
|
+
if (fp.isPressable) {
|
|
197
|
+
const filtered = pool.filter(i => i.isPressable);
|
|
198
|
+
if (filtered.length > 0) pool = filtered;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return instanceFilter ? pool.filter(instanceFilter) : pool;
|
|
202
|
+
}
|
|
203
|
+
function miss(reason, score = 0, secondScore = 0) {
|
|
204
|
+
return {
|
|
205
|
+
instance: null,
|
|
206
|
+
score,
|
|
207
|
+
secondScore,
|
|
208
|
+
reason
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
function matchFingerprintCore(fp, instanceFilter) {
|
|
212
|
+
// Live text / testID must be applied *before* pooling. A shared Babel helper
|
|
213
|
+
// (`const field = () => <TextInput testID={id} />`) reuses one auto-anchor
|
|
214
|
+
// callback, so the runtime bag is last-writer-wins until we read the host.
|
|
215
|
+
const broad = instanceFilter ? autoAnchorRegistry.allInstances().filter(instanceFilter) : autoAnchorRegistry.allInstances();
|
|
216
|
+
if (broad.length > 0) {
|
|
217
|
+
autoAnchorRegistry.refreshLiveContent(broad);
|
|
218
|
+
}
|
|
219
|
+
const pool = candidatePool(fp, instanceFilter);
|
|
220
|
+
if (pool.length === 0) {
|
|
221
|
+
return miss('no-candidates');
|
|
222
|
+
}
|
|
223
|
+
const scored = pool.map(inst => ({
|
|
224
|
+
inst,
|
|
225
|
+
score: scoreInstance(fp, inst)
|
|
226
|
+
})).filter(s => s.score > -Infinity).sort((a, b) => b.score - a.score);
|
|
227
|
+
if (scored.length === 0) {
|
|
228
|
+
return miss('all-contradicted');
|
|
229
|
+
}
|
|
230
|
+
const best = scored[0];
|
|
231
|
+
const second = scored[1];
|
|
232
|
+
const secondScore = second?.score ?? 0;
|
|
233
|
+
if ((fp.manualId || fp.userflowId || fp.testID) && best.score >= 90 && (!second || best.score - secondScore >= MATCH_UNIQUENESS_MARGIN)) {
|
|
234
|
+
if (best.inst.ambiguous) {
|
|
235
|
+
return miss('ambiguous-explicit-id', best.score, secondScore);
|
|
236
|
+
}
|
|
237
|
+
return {
|
|
238
|
+
instance: best.inst,
|
|
239
|
+
score: best.score,
|
|
240
|
+
secondScore,
|
|
241
|
+
textDisagreed: childTextRawDiffers(fp, best.inst)
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
if (best.score < MATCH_MIN_SCORE) {
|
|
245
|
+
return miss('below-threshold', best.score, secondScore);
|
|
246
|
+
}
|
|
247
|
+
if (best.score - secondScore < MATCH_UNIQUENESS_MARGIN) {
|
|
248
|
+
return miss('not-unique', best.score, secondScore);
|
|
249
|
+
}
|
|
250
|
+
return {
|
|
251
|
+
instance: best.inst,
|
|
252
|
+
score: best.score,
|
|
253
|
+
secondScore,
|
|
254
|
+
textDisagreed: childTextRawDiffers(fp, best.inst)
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Resolve a recorded fingerprint against the live auto-anchor registry.
|
|
260
|
+
* Surfaces the recorded `identityStrength` on every result so callers/telemetry
|
|
261
|
+
* can flag weak (`structural`) targets.
|
|
262
|
+
*/
|
|
263
|
+
export function matchFingerprint(fp, opts) {
|
|
264
|
+
const result = matchFingerprintCore(fp, opts?.instanceFilter);
|
|
265
|
+
if (fp.identityStrength) result.identityStrength = fp.identityStrength;
|
|
266
|
+
return result;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Decode an `autoData` envelope (or accept an already-decoded one) and score
|
|
271
|
+
* its fingerprint. Missing / malformed envelopes fail closed.
|
|
272
|
+
*/
|
|
273
|
+
export function matchAutoData(input) {
|
|
274
|
+
const decoded = typeof input === 'string' ? decodeMobileAutoData(input) : input;
|
|
275
|
+
if (!decoded?.fingerprint) {
|
|
276
|
+
return miss('no-fingerprint');
|
|
277
|
+
}
|
|
278
|
+
return matchFingerprint(decoded.fingerprint);
|
|
279
|
+
}
|
|
280
|
+
//# sourceMappingURL=semanticMatcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["decodeMobileAutoData","autoAnchorRegistry","MATCH_MIN_SCORE","MATCH_UNIQUENESS_MARGIN","STRUCTURAL_PATH_MAX","pathSegments","path","split","segmentKind","seg","m","exec","segmentLabel","i","indexOf","endsWith","slice","scoreStructuralPath","fpPath","instPath","max","a","b","n","Math","min","length","matchedLabeled","kindAligned","sa","sb","la","lb","score","round","scoreSiblingWindow","expected","actual","len","e","kind","role","userflowId","testID","text","textsAgree","abs","scoreAncestors","eTail","aTail","contradictsStrong","fp","inst","manualId","idAgrees","nativeID","startsWith","normalizeText","value","trim","replace","childTextRawDiffers","childText","childTextDisagrees","intrinsicNonTextAgrees","iconName","imageSrc","scoreInstance","Infinity","isPressable","structuralPath","templatePath","instanceScope","accessibilityLabel","childShape","ancestors","window","siblingWindow","instanceId","previousSiblings","previous","nextSiblings","next","ambiguous","candidatePool","instanceFilter","pool","getInstancesByManualId","allInstances","filtered","filter","miss","reason","secondScore","instance","matchFingerprintCore","broad","refreshLiveContent","scored","map","s","sort","best","second","textDisagreed","matchFingerprint","opts","result","identityStrength","matchAutoData","input","decoded","fingerprint"],"sourceRoot":"../../../src","sources":["anchors/semanticMatcher.ts"],"mappings":";;AAAA,SACEA,oBAAoB,QAMf,yBAAyB;AAEhC,SAASC,kBAAkB,QAAiC,yBAAsB;;AAElF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA2BA,OAAO,MAAMC,eAAe,GAAG,EAAE;AACjC,OAAO,MAAMC,uBAAuB,GAAG,EAAE;AACzC;AACA,MAAMC,mBAAmB,GAAG,EAAE;AAE9B,SAASC,YAAYA,CAACC,IAAY,EAAY;EAC5C,OAAOA,IAAI,CAACC,KAAK,CAAC,KAAK,CAAC;AAC1B;;AAEA;AACA,SAASC,WAAWA,CAACC,GAAW,EAAU;EACxC,MAAMC,CAAC,GAAG,oBAAoB,CAACC,IAAI,CAACF,GAAG,CAAC;EACxC,OAAOC,CAAC,GAAGA,CAAC,CAAC,CAAC,CAAC,GAAID,GAAG;AACxB;;AAEA;AACA,SAASG,YAAYA,CAACH,GAAW,EAAiB;EAChD,MAAMI,CAAC,GAAGJ,GAAG,CAACK,OAAO,CAAC,GAAG,CAAC;EAC1B,OAAOD,CAAC,IAAI,CAAC,IAAIJ,GAAG,CAACM,QAAQ,CAAC,GAAG,CAAC,GAAGN,GAAG,CAACO,KAAK,CAACH,CAAC,CAAC,GAAG,IAAI;AAC1D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASI,mBAAmBA,CAC1BC,MAA0B,EAC1BC,QAA4B,EAC5BC,GAAG,GAAGhB,mBAAmB,EACjB;EACR,IAAI,CAACc,MAAM,IAAI,CAACC,QAAQ,EAAE,OAAO,CAAC;EAClC,IAAID,MAAM,KAAKC,QAAQ,EAAE,OAAOC,GAAG;EAEnC,MAAMC,CAAC,GAAGhB,YAAY,CAACa,MAAM,CAAC;EAC9B,MAAMI,CAAC,GAAGjB,YAAY,CAACc,QAA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