@userflow-tech/react-native 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -61
- package/app.plugin.js +11 -1
- package/babel-plugin/index.d.ts +8 -8
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +17 -9
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +13 -0
- package/docs/anchoring.md +141 -13
- package/docs/deep-linking.md +18 -15
- package/docs/theme-mapping.md +44 -15
- package/docs/troubleshooting.md +36 -29
- package/expo-plugin/withUserflow.js +1 -1
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +124 -2
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
- package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +171 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +285 -0
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +64 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +39 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +110 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +150 -0
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
- package/lib/commonjs/authoring/doubleTap.js +23 -0
- package/lib/commonjs/authoring/doubleTap.js.map +1 -0
- package/lib/commonjs/authoring/elementPickerController.js +102 -0
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js +195 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/commonjs/authoring/hitTest.js +106 -0
- package/lib/commonjs/authoring/hitTest.js.map +1 -0
- package/lib/commonjs/content/RichContentRenderer.js +12 -2
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
- package/lib/commonjs/content/StepButton.js +19 -4
- package/lib/commonjs/content/StepButton.js.map +1 -1
- package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/commonjs/content/themeColor.js +11 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deviceContext.js +158 -0
- package/lib/commonjs/deviceContext.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/commonjs/hostAppVersion.js +242 -0
- package/lib/commonjs/hostAppVersion.js.map +1 -0
- package/lib/commonjs/index.js +118 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lifecycle.js +2 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +17 -8
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
- package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/commonjs/pairing/PairingController.js +29 -2
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/diagnostics.js +9 -0
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
- package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/commonjs/pairing/tokenStorage.js +25 -2
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/runtime/FlowRenderer.js +45 -21
- package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
- package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
- package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/commonjs/runtime/TargetPressBridge.js +13 -44
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowProvider.js +74 -20
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
- package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +3 -1
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
- package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
- package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
- package/lib/commonjs/screenTracker.js +46 -4
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/surfaces/CardFade.js +31 -0
- package/lib/commonjs/surfaces/CardFade.js.map +1 -0
- package/lib/commonjs/surfaces/CloseButton.js +11 -6
- package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +50 -34
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/cardTransition.js +70 -0
- package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
- package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
- package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/commonjs/surfaces/themeChrome.js +4 -1
- package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
- package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +125 -2
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/anchorChangeTicker.js +10 -0
- package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +25 -12
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
- package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
- package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/module/anchors/fiber/fiberInternals.js +139 -3
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
- package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/module/anchors/fiber/readHostContent.js +127 -0
- package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/module/anchors/fiberAnchorCache.js +40 -0
- package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +15 -21
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +167 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +280 -0
- package/lib/module/anchors/semanticMatcher.js.map +1 -0
- package/lib/module/authoring/ElementPickerOverlay.js +485 -0
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/module/authoring/capturePickerScreenshot.js +68 -0
- package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +59 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeButton.js +89 -0
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
- package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeIcon.js +33 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js +104 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +146 -0
- package/lib/module/authoring/chrome/tokens.js.map +1 -0
- package/lib/module/authoring/doubleTap.js +18 -0
- package/lib/module/authoring/doubleTap.js.map +1 -0
- package/lib/module/authoring/elementPickerController.js +97 -0
- package/lib/module/authoring/elementPickerController.js.map +1 -0
- package/lib/module/authoring/fingerprintFromInstance.js +187 -0
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/module/authoring/hitTest.js +100 -0
- package/lib/module/authoring/hitTest.js.map +1 -0
- package/lib/module/content/RichContentRenderer.js +12 -2
- package/lib/module/content/RichContentRenderer.js.map +1 -1
- package/lib/module/content/StepButton.js +19 -4
- package/lib/module/content/StepButton.js.map +1 -1
- package/lib/module/content/resolveStepButtonChrome.js +8 -6
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/module/content/themeColor.js +10 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deviceContext.js +142 -0
- package/lib/module/deviceContext.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/module/hostAppVersion.js +225 -0
- package/lib/module/hostAppVersion.js.map +1 -0
- package/lib/module/index.js +119 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/lifecycle.js +2 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +18 -9
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/isOverlayPresentation.js +58 -0
- package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/module/pairing/PairingController.js +30 -3
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +212 -85
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/diagnostics.js +8 -0
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/elementPickerRelay.js +87 -0
- package/lib/module/pairing/elementPickerRelay.js.map +1 -0
- package/lib/module/pairing/resolvePreviewChrome.js +48 -0
- package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/module/pairing/tokenStorage.js +24 -2
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/runtime/FlowRenderer.js +45 -21
- package/lib/module/runtime/FlowRenderer.js.map +1 -1
- package/lib/module/runtime/FlowSurfaceFade.js +49 -26
- package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/module/runtime/TargetPressBridge.js +12 -43
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowProvider.js +74 -20
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/changedTouchPoints.js +43 -0
- package/lib/module/runtime/changedTouchPoints.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +3 -1
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/flowSessionViewState.js +32 -7
- package/lib/module/runtime/flowSessionViewState.js.map +1 -1
- package/lib/module/runtime/useFlowSessionState.js +2 -1
- package/lib/module/runtime/useFlowSessionState.js.map +1 -1
- package/lib/module/screenTracker.js +42 -4
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/surfaces/CardFade.js +26 -0
- package/lib/module/surfaces/CardFade.js.map +1 -0
- package/lib/module/surfaces/CloseButton.js +10 -6
- package/lib/module/surfaces/CloseButton.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +52 -36
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +368 -90
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/cardTransition.js +64 -0
- package/lib/module/surfaces/cardTransition.js.map +1 -0
- package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
- package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/module/surfaces/resolveModalLayout.js +7 -3
- package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
- package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
- package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/module/surfaces/themeChrome.js +3 -1
- package/lib/module/surfaces/themeChrome.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
- package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
- package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
- package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/module/surfaces/tooltip/rect.js +11 -0
- package/lib/module/surfaces/tooltip/rect.js.map +1 -1
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +26 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +48 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +59 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
- package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +53 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +2 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/screenTracker.d.ts +21 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +26 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +48 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +59 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/deviceContext.d.ts +66 -0
- package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +53 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +6 -0
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +2 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/module/src/screenTracker.d.ts +21 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +22 -16
- package/src/anchors/AutoAnchorRegistry.ts +139 -2
- package/src/anchors/anchorChangeTicker.ts +10 -0
- package/src/anchors/elementConditionEvaluator.ts +29 -16
- package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
- package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
- package/src/anchors/fiber/fiberInternals.ts +166 -3
- package/src/anchors/fiber/indexHostFibers.ts +136 -0
- package/src/anchors/fiber/readHostContent.ts +146 -0
- package/src/anchors/fiberAnchorCache.ts +45 -0
- package/src/anchors/resolveAnchorHost.ts +23 -23
- package/src/anchors/resolveAutoAnchorHost.ts +180 -0
- package/src/anchors/semanticMatcher.ts +361 -0
- package/src/authoring/ElementPickerOverlay.tsx +553 -0
- package/src/authoring/capturePickerScreenshot.ts +90 -0
- package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
- package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
- package/src/authoring/chrome/ChromeButton.tsx +103 -0
- package/src/authoring/chrome/ChromeDialog.tsx +121 -0
- package/src/authoring/chrome/ChromeIcon.tsx +40 -0
- package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
- package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
- package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
- package/src/authoring/chrome/doubleTapMonitor.ts +80 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/src/authoring/chrome/icons/xmark.png +0 -0
- package/src/authoring/chrome/icons/xmark@2x.png +0 -0
- package/src/authoring/chrome/icons/xmark@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +106 -0
- package/src/authoring/doubleTap.ts +27 -0
- package/src/authoring/elementPickerController.ts +135 -0
- package/src/authoring/fingerprintFromInstance.ts +152 -0
- package/src/authoring/hitTest.ts +133 -0
- package/src/content/RichContentRenderer.tsx +22 -1
- package/src/content/StepButton.tsx +17 -2
- package/src/content/resolveStepButtonChrome.ts +12 -6
- package/src/content/themeColor.ts +10 -0
- package/src/deviceContext.ts +168 -0
- package/src/expo-router/useUserflowExpoRouter.ts +47 -4
- package/src/hostAppVersion.ts +258 -0
- package/src/index.ts +148 -4
- package/src/lifecycle.ts +8 -0
- package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
- package/src/navigation/isOverlayPresentation.ts +76 -0
- package/src/pairing/PairingController.ts +32 -3
- package/src/pairing/PreviewModeBanner.tsx +250 -94
- package/src/pairing/diagnostics.ts +8 -0
- package/src/pairing/elementPickerRelay.ts +100 -0
- package/src/pairing/resolvePreviewChrome.ts +57 -0
- package/src/pairing/tokenStorage.ts +31 -2
- package/src/pairing/usePairingState.ts +2 -0
- package/src/runtime/FlowRenderer.tsx +55 -27
- package/src/runtime/FlowSurfaceFade.tsx +51 -30
- package/src/runtime/TargetPressBridge.tsx +14 -32
- package/src/runtime/UserflowProvider.tsx +76 -13
- package/src/runtime/changedTouchPoints.ts +34 -0
- package/src/runtime/flowEngine.ts +2 -0
- package/src/runtime/flowSessionViewState.ts +42 -4
- package/src/runtime/useFlowSessionState.ts +2 -0
- package/src/screenTracker.ts +46 -4
- package/src/surfaces/CardFade.tsx +18 -0
- package/src/surfaces/CloseButton.tsx +17 -7
- package/src/surfaces/MadeWithUserflow.tsx +1 -1
- package/src/surfaces/ModalSurface.tsx +48 -35
- package/src/surfaces/TooltipSurface.tsx +406 -86
- package/src/surfaces/cardTransition.ts +67 -0
- package/src/surfaces/resolveHighlightChrome.ts +139 -0
- package/src/surfaces/resolveModalLayout.ts +16 -8
- package/src/surfaces/resolveTooltipLayout.ts +1 -14
- package/src/surfaces/surfaceInteractionConfig.ts +25 -0
- package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
- package/src/surfaces/themeChrome.ts +5 -3
- package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
- package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
- package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
- package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
- package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
- package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
- package/src/surfaces/tooltip/rect.ts +11 -0
- package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts +1 -2
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +69 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +268 -7
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +44 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +103 -9
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +23 -4
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +64 -1
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
- package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
- package/vendor/core/dist/engine/conditionOperators.js +168 -0
- package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
- package/vendor/core/dist/engine/handleActions.d.ts +27 -4
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +140 -13
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
- package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
- package/vendor/core/dist/engine/simpleObservable.js +29 -0
- package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
- package/vendor/core/dist/engine/trackCondition.d.ts +25 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackCondition.js +177 -0
- package/vendor/core/dist/engine/trackCondition.js.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
- package/vendor/core/dist/index.d.ts +4 -3
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +2 -1
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
- package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
- package/vendor/core/dist/normalizeAttributes.js +127 -0
- package/vendor/core/dist/normalizeAttributes.js.map +1 -0
- package/vendor/core/dist/transport/phoenix.d.ts +11 -6
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +59 -5
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/types.d.ts +26 -1
- package/vendor/core/dist/types.d.ts.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/attributes.d.ts +43 -0
- package/vendor/protocol/dist/attributes.d.ts.map +1 -0
- package/vendor/protocol/dist/attributes.js +15 -0
- package/vendor/protocol/dist/attributes.js.map +1 -0
- package/vendor/protocol/dist/autoData.d.ts +2 -2
- package/vendor/protocol/dist/autoData.js +2 -2
- package/vendor/protocol/dist/events.d.ts +8 -0
- package/vendor/protocol/dist/events.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +66 -4
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +50 -3
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/index.d.ts +1 -0
- package/vendor/protocol/dist/index.d.ts.map +1 -1
- package/vendor/protocol/dist/index.js +1 -0
- package/vendor/protocol/dist/index.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +25 -4
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +4 -0
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/dist/pairing.d.ts +26 -0
- package/vendor/protocol/dist/pairing.d.ts.map +1 -1
- package/vendor/protocol/dist/pairing.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -59,6 +59,163 @@ export function getMemoizedProps(fiber: AnyFiber): Record<string, unknown> | und
|
|
|
59
59
|
return p && typeof p === 'object' ? (p as Record<string, unknown>) : undefined;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* React fiber `tag` values are a small enum (ClassComponent = 1,
|
|
64
|
+
* HostComponent = 5, HostText = 6, …). Generous ceiling so a future React tag
|
|
65
|
+
* is not rejected; note this bound alone proves nothing, because Fabric native
|
|
66
|
+
* view tags also start small (2, 4, 6, …). The structural and negative checks
|
|
67
|
+
* below are what actually discriminate.
|
|
68
|
+
*/
|
|
69
|
+
const MAX_REACT_FIBER_TAG = 60;
|
|
70
|
+
|
|
71
|
+
/** Fields only a fiber carries. */
|
|
72
|
+
const FIBER_STRUCTURAL_KEYS = [
|
|
73
|
+
'child',
|
|
74
|
+
'return',
|
|
75
|
+
'sibling',
|
|
76
|
+
'stateNode',
|
|
77
|
+
'memoizedProps',
|
|
78
|
+
'alternate',
|
|
79
|
+
] as const;
|
|
80
|
+
|
|
81
|
+
/** Fields that mark a host node / public instance rather than a fiber. */
|
|
82
|
+
function looksLikeHostNode(value: object): boolean {
|
|
83
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
84
|
+
const v = value as any;
|
|
85
|
+
return (
|
|
86
|
+
typeof v.__nativeTag === 'number' ||
|
|
87
|
+
typeof v._nativeTag === 'number' ||
|
|
88
|
+
'__viewConfig' in value ||
|
|
89
|
+
'viewConfig' in value ||
|
|
90
|
+
('node' in value && 'canonical' in value)
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* True when `value` looks like a JS React fiber, and not a Fabric shadow node,
|
|
96
|
+
* `stateNode`, or public instance. Never throws.
|
|
97
|
+
*
|
|
98
|
+
* Fabric on current RN stores the real fiber on `__internalInstanceHandle`, so
|
|
99
|
+
* this normally passes on the first try. It exists so a renderer that stores
|
|
100
|
+
* something else there degrades to the native-tag lookup instead of silently
|
|
101
|
+
* walking a non-fiber object and reading nothing.
|
|
102
|
+
*/
|
|
103
|
+
export function isReactFiber(value: unknown): value is AnyFiber {
|
|
104
|
+
if (!value || typeof value !== 'object') return false;
|
|
105
|
+
try {
|
|
106
|
+
const tag = (value as { tag?: unknown }).tag;
|
|
107
|
+
if (typeof tag !== 'number' || !Number.isInteger(tag) || tag < 0 || tag > MAX_REACT_FIBER_TAG) {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
if (looksLikeHostNode(value)) return false;
|
|
111
|
+
return FIBER_STRUCTURAL_KEYS.some((key) => key in value);
|
|
112
|
+
} catch {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* If `value` is a fiber, return it. If it is a host `stateNode` that carries a
|
|
119
|
+
* fiber (Fabric `{ node, canonical: { internalInstanceHandle } }`, or the older
|
|
120
|
+
* `canonical._internalInstanceHandle`), unwrap to the fiber.
|
|
121
|
+
*/
|
|
122
|
+
export function coerceToFiber(value: unknown): AnyFiber | null {
|
|
123
|
+
if (isReactFiber(value)) return value;
|
|
124
|
+
if (!value || typeof value !== 'object') return null;
|
|
125
|
+
try {
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
127
|
+
const v = value as any;
|
|
128
|
+
const candidates = [
|
|
129
|
+
v.canonical?.internalInstanceHandle,
|
|
130
|
+
v.canonical?._internalInstanceHandle,
|
|
131
|
+
v.internalInstanceHandle,
|
|
132
|
+
];
|
|
133
|
+
for (const candidate of candidates) {
|
|
134
|
+
if (isReactFiber(candidate)) return candidate;
|
|
135
|
+
}
|
|
136
|
+
} catch {
|
|
137
|
+
// Feature-detection must itself never throw.
|
|
138
|
+
}
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Native view tag on a public instance or host `stateNode`, across renderers:
|
|
144
|
+
*
|
|
145
|
+
* - `__nativeTag` — Fabric `ReactNativeElement` (RN 0.74+)
|
|
146
|
+
* - `_nativeTag` — Paper `ReactNativeFiberHostComponent`, older Fabric canonical
|
|
147
|
+
* - `canonical.nativeTag` / `canonical._nativeTag` — Fabric `stateNode`
|
|
148
|
+
*/
|
|
149
|
+
export function nativeTagFromNode(value: unknown): number | undefined {
|
|
150
|
+
if (!value || typeof value !== 'object') return undefined;
|
|
151
|
+
try {
|
|
152
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
153
|
+
const v = value as any;
|
|
154
|
+
const tag =
|
|
155
|
+
v.__nativeTag ??
|
|
156
|
+
v._nativeTag ??
|
|
157
|
+
v.nativeTag ??
|
|
158
|
+
v.canonical?.nativeTag ??
|
|
159
|
+
v.canonical?._nativeTag;
|
|
160
|
+
if (typeof tag === 'number' && Number.isFinite(tag)) return tag;
|
|
161
|
+
} catch {
|
|
162
|
+
// Best-effort.
|
|
163
|
+
}
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export function nativeTagFromHostFiber(fiber: AnyFiber): number | undefined {
|
|
168
|
+
return nativeTagFromNode(getStateNode(fiber)) ?? nativeTagFromNode(fiber);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Public host instance for a host fiber, if one exists. Covers, in order:
|
|
173
|
+
* materialized Fabric `canonical.publicInstance`, the older Fabric
|
|
174
|
+
* `canonical` host component, and the Paper `stateNode` itself (which *is*
|
|
175
|
+
* the object an app `ref` receives).
|
|
176
|
+
*/
|
|
177
|
+
export function publicInstanceFromHostFiber(fiber: AnyFiber): object | null {
|
|
178
|
+
try {
|
|
179
|
+
const node = getStateNode(fiber);
|
|
180
|
+
if (!node || typeof node !== 'object') return null;
|
|
181
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
182
|
+
const n = node as any;
|
|
183
|
+
const pub = n.canonical?.publicInstance;
|
|
184
|
+
if (pub && typeof pub === 'object') return pub as object;
|
|
185
|
+
const canonical = n.canonical;
|
|
186
|
+
if (canonical && typeof canonical === 'object' && nativeTagFromNode(canonical) !== undefined) {
|
|
187
|
+
return canonical as object;
|
|
188
|
+
}
|
|
189
|
+
if (
|
|
190
|
+
typeof n.measureInWindow === 'function' ||
|
|
191
|
+
typeof n.measure === 'function' ||
|
|
192
|
+
nativeTagFromNode(n) !== undefined
|
|
193
|
+
) {
|
|
194
|
+
return n as object;
|
|
195
|
+
}
|
|
196
|
+
} catch {
|
|
197
|
+
// Best-effort.
|
|
198
|
+
}
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Host props for content reads. Prefers `memoizedProps`; Fabric also keeps the
|
|
204
|
+
* last committed props on `stateNode.canonical.currentProps`.
|
|
205
|
+
*/
|
|
206
|
+
export function getLiveHostProps(fiber: AnyFiber): Record<string, unknown> | undefined {
|
|
207
|
+
const memo = getMemoizedProps(fiber);
|
|
208
|
+
if (memo) return memo;
|
|
209
|
+
try {
|
|
210
|
+
const node = getStateNode(fiber) as { canonical?: { currentProps?: unknown } } | null;
|
|
211
|
+
const current = node?.canonical?.currentProps;
|
|
212
|
+
if (current && typeof current === 'object') return current as Record<string, unknown>;
|
|
213
|
+
} catch {
|
|
214
|
+
// Best-effort.
|
|
215
|
+
}
|
|
216
|
+
return undefined;
|
|
217
|
+
}
|
|
218
|
+
|
|
62
219
|
export function getStateNode(fiber: AnyFiber): unknown {
|
|
63
220
|
return fiber?.stateNode ?? null;
|
|
64
221
|
}
|
|
@@ -109,16 +266,22 @@ const INSTANCE_FIBER_KEYS = [
|
|
|
109
266
|
'_internalInstanceHandle', // older Fabric / Paper bridge
|
|
110
267
|
] as const;
|
|
111
268
|
|
|
112
|
-
/**
|
|
269
|
+
/**
|
|
270
|
+
* Resolve a fiber from a class or host public instance. Returns null when
|
|
271
|
+
* unavailable, and also when the stored handle is a Fabric shadow node rather
|
|
272
|
+
* than a JS fiber (callers then look up by native tag under FiberScanRoot).
|
|
273
|
+
*/
|
|
113
274
|
export function fiberFromPublicInstance(instance: unknown): AnyFiber | null {
|
|
114
275
|
if (!instance || typeof instance !== 'object') return null;
|
|
115
276
|
try {
|
|
116
277
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
117
278
|
const inst = instance as any;
|
|
118
279
|
for (const key of INSTANCE_FIBER_KEYS) {
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
280
|
+
const fiber = coerceToFiber(inst[key]);
|
|
281
|
+
if (fiber) return fiber;
|
|
121
282
|
}
|
|
283
|
+
const fromCanonical = coerceToFiber(inst.canonical?.internalInstanceHandle);
|
|
284
|
+
if (fromCanonical) return fromCanonical;
|
|
122
285
|
} catch {
|
|
123
286
|
// Feature-detection must itself never throw.
|
|
124
287
|
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reverse index: public instance / native tag → host fiber.
|
|
3
|
+
*
|
|
4
|
+
* Renderers disagree on whether a host ref can reach its fiber at all:
|
|
5
|
+
*
|
|
6
|
+
* - Fabric (RN 0.74+) stores the fiber on `__internalInstanceHandle`, and
|
|
7
|
+
* older Fabric on `_internalInstanceHandle` — the direct pointer works.
|
|
8
|
+
* - Paper **release** builds null out `_internalFiberInstanceHandleDEV`, so a
|
|
9
|
+
* host ref has no route to its fiber at all.
|
|
10
|
+
*
|
|
11
|
+
* The index closes that gap: `FiberScanRoot` is a class component, and
|
|
12
|
+
* `_reactInternals` is present on class instances in every renderer and build
|
|
13
|
+
* type, so we can always walk down from there and match on native tag or
|
|
14
|
+
* instance identity. This is the version-independent path; the direct pointer
|
|
15
|
+
* is the fast path.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { fiberScanRoot } from './FiberScanRootStore';
|
|
19
|
+
import {
|
|
20
|
+
type AnyFiber,
|
|
21
|
+
fiberFromPublicInstance,
|
|
22
|
+
getChild,
|
|
23
|
+
getSibling,
|
|
24
|
+
isHostFiber,
|
|
25
|
+
nativeTagFromHostFiber,
|
|
26
|
+
nativeTagFromNode,
|
|
27
|
+
publicInstanceFromHostFiber,
|
|
28
|
+
resolveCurrentFiber,
|
|
29
|
+
} from './fiberInternals';
|
|
30
|
+
|
|
31
|
+
/** Same bound as {@link findAnchorFiber} so a dense tree is fully indexed. */
|
|
32
|
+
const MAX_INDEX_NODES = 60_000;
|
|
33
|
+
|
|
34
|
+
export interface HostFiberIndex {
|
|
35
|
+
byNativeTag: Map<number, AnyFiber>;
|
|
36
|
+
byInstance: WeakMap<object, AnyFiber>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function emptyHostFiberIndex(): HostFiberIndex {
|
|
40
|
+
return { byNativeTag: new Map(), byInstance: new WeakMap() };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Walk `root`'s descendants (not `root.sibling`, so the Userflow overlay stays
|
|
45
|
+
* out of the index). First host fiber per native tag wins.
|
|
46
|
+
*/
|
|
47
|
+
export function createHostFiberIndex(root: AnyFiber | null | undefined): HostFiberIndex {
|
|
48
|
+
const index = emptyHostFiberIndex();
|
|
49
|
+
if (!root) return index;
|
|
50
|
+
try {
|
|
51
|
+
const stack: AnyFiber[] = [root];
|
|
52
|
+
let visited = 0;
|
|
53
|
+
while (stack.length > 0 && visited < MAX_INDEX_NODES) {
|
|
54
|
+
const fiber = stack.pop();
|
|
55
|
+
if (!fiber) continue;
|
|
56
|
+
visited += 1;
|
|
57
|
+
if (isHostFiber(fiber)) {
|
|
58
|
+
const tag = nativeTagFromHostFiber(fiber);
|
|
59
|
+
if (tag !== undefined && !index.byNativeTag.has(tag)) {
|
|
60
|
+
index.byNativeTag.set(tag, fiber);
|
|
61
|
+
}
|
|
62
|
+
const pub = publicInstanceFromHostFiber(fiber);
|
|
63
|
+
if (pub) {
|
|
64
|
+
try {
|
|
65
|
+
index.byInstance.set(pub, fiber);
|
|
66
|
+
} catch {
|
|
67
|
+
// WeakMap rejects non-objects; ignore.
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (fiber !== root) {
|
|
72
|
+
const sibling = getSibling(fiber);
|
|
73
|
+
if (sibling) stack.push(sibling);
|
|
74
|
+
}
|
|
75
|
+
const child = getChild(fiber);
|
|
76
|
+
if (child) stack.push(child);
|
|
77
|
+
}
|
|
78
|
+
} catch {
|
|
79
|
+
// Best-effort — a partial index is still useful.
|
|
80
|
+
}
|
|
81
|
+
return index;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function indexLiveHostFibers(): HostFiberIndex {
|
|
85
|
+
return createHostFiberIndex(fiberScanRoot.getFiber());
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** An index, or a thunk that builds one on first use. */
|
|
89
|
+
export type HostFiberIndexSource = HostFiberIndex | (() => HostFiberIndex);
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Defers the tree walk until something actually misses the direct pointer, and
|
|
93
|
+
* reuses the result for the rest of the pass. On renderers where refs reach
|
|
94
|
+
* their fiber (Fabric, Paper DEV) the walk never happens.
|
|
95
|
+
*/
|
|
96
|
+
export function createLazyHostFiberIndex(
|
|
97
|
+
build: () => HostFiberIndex = indexLiveHostFibers,
|
|
98
|
+
): () => HostFiberIndex {
|
|
99
|
+
let cached: HostFiberIndex | null = null;
|
|
100
|
+
return () => {
|
|
101
|
+
if (!cached) {
|
|
102
|
+
try {
|
|
103
|
+
cached = build();
|
|
104
|
+
} catch {
|
|
105
|
+
cached = emptyHostFiberIndex();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return cached;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Fiber for a public instance: direct pointer first, then the scan-root index
|
|
114
|
+
* by identity / native tag.
|
|
115
|
+
*/
|
|
116
|
+
export function lookupHostFiber(index: HostFiberIndexSource, instance: unknown): AnyFiber | null {
|
|
117
|
+
const direct = fiberFromPublicInstance(instance);
|
|
118
|
+
if (direct) {
|
|
119
|
+
try {
|
|
120
|
+
return resolveCurrentFiber(direct);
|
|
121
|
+
} catch {
|
|
122
|
+
return direct;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (!instance || typeof instance !== 'object') return null;
|
|
126
|
+
try {
|
|
127
|
+
const resolved = typeof index === 'function' ? index() : index;
|
|
128
|
+
const fromMap = resolved.byInstance.get(instance);
|
|
129
|
+
if (fromMap) return fromMap;
|
|
130
|
+
const tag = nativeTagFromNode(instance);
|
|
131
|
+
if (tag !== undefined) return resolved.byNativeTag.get(tag) ?? null;
|
|
132
|
+
} catch {
|
|
133
|
+
// Best-effort.
|
|
134
|
+
}
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live host-content reads from a public instance's fiber. Used at AUTO capture
|
|
3
|
+
* and match time so dynamic `{label}` / `{t(...)}` / `placeholder={…}` show up
|
|
4
|
+
* as `childText` even though Babel only stamps static literals.
|
|
5
|
+
*
|
|
6
|
+
* Same never-throws contract as the rest of the fiber layer.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
type AnyFiber,
|
|
11
|
+
getChild,
|
|
12
|
+
getFiberTag,
|
|
13
|
+
getLiveHostProps,
|
|
14
|
+
getMemoizedProps,
|
|
15
|
+
getSibling,
|
|
16
|
+
isHostFiber,
|
|
17
|
+
} from './fiberInternals';
|
|
18
|
+
|
|
19
|
+
/** React reconciler `HostComponent` / `HostText` fiber tags. */
|
|
20
|
+
const HOST_COMPONENT_TAG = 5;
|
|
21
|
+
const HOST_TEXT_TAG = 6;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Mirrors Babel `childTextFromJsx` depth — but counted in **host** levels, not
|
|
25
|
+
* fibers. See {@link isHostLevel}.
|
|
26
|
+
*/
|
|
27
|
+
const DEFAULT_MAX_DEPTH = 4;
|
|
28
|
+
|
|
29
|
+
/** Soft cap so a dense subtree cannot stall the JS thread. */
|
|
30
|
+
const DEFAULT_MAX_NODES = 2_000;
|
|
31
|
+
|
|
32
|
+
function coerceText(value: unknown): string | undefined {
|
|
33
|
+
if (typeof value === 'string') {
|
|
34
|
+
const trimmed = value.trim();
|
|
35
|
+
return trimmed || undefined;
|
|
36
|
+
}
|
|
37
|
+
if (typeof value === 'number' && Number.isFinite(value)) {
|
|
38
|
+
return String(value);
|
|
39
|
+
}
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Concatenate the string/number fragments of a split label, in order.
|
|
45
|
+
*
|
|
46
|
+
* `<Text>{count} items</Text>` reaches us as `[3, ' items']`. Keeping only the
|
|
47
|
+
* first fragment would record `3`, which digit-normalization then collapses to
|
|
48
|
+
* `#` — agreeing with every other numeric label and costing the fail-closed
|
|
49
|
+
* guarantee. Joining keeps `3 items`, which normalizes to `# items`. Fragments
|
|
50
|
+
* are concatenated raw so `['Hello, ', name, '!']` stays `Hello, Dan!`; only
|
|
51
|
+
* the result is trimmed. Non-text children (nested elements) are skipped.
|
|
52
|
+
*/
|
|
53
|
+
function joinTextFragments(children: unknown[]): string | undefined {
|
|
54
|
+
let joined = '';
|
|
55
|
+
for (const child of children) {
|
|
56
|
+
if (typeof child === 'string') joined += child;
|
|
57
|
+
else if (typeof child === 'number' && Number.isFinite(child)) joined += String(child);
|
|
58
|
+
}
|
|
59
|
+
return coerceText(joined);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function textFromMemoizedProps(fiber: AnyFiber): string | undefined {
|
|
63
|
+
// A HostText fiber (`tag === 6`) carries the string itself as its props.
|
|
64
|
+
const fromRaw = coerceText(fiber?.memoizedProps);
|
|
65
|
+
if (fromRaw) return fromRaw;
|
|
66
|
+
|
|
67
|
+
const props = getLiveHostProps(fiber) ?? getMemoizedProps(fiber);
|
|
68
|
+
if (!props) return undefined;
|
|
69
|
+
|
|
70
|
+
const fromChildren = coerceText(props.children);
|
|
71
|
+
if (fromChildren) return fromChildren;
|
|
72
|
+
|
|
73
|
+
if (Array.isArray(props.children)) {
|
|
74
|
+
const joined = joinTextFragments(props.children);
|
|
75
|
+
if (joined) return joined;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const fromText = coerceText(props.text);
|
|
79
|
+
if (fromText) return fromText;
|
|
80
|
+
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* First visible text under `fiber`, bounded by depth and node count. Reads a
|
|
86
|
+
* string/number `children` prop, the joined fragments of a split label, a
|
|
87
|
+
* native `text` prop, or the string a HostText fiber holds as its props.
|
|
88
|
+
*/
|
|
89
|
+
export function readHostText(fiber: AnyFiber, maxDepth = DEFAULT_MAX_DEPTH): string | undefined {
|
|
90
|
+
try {
|
|
91
|
+
const budget = { remaining: DEFAULT_MAX_NODES };
|
|
92
|
+
return walkText(fiber, 0, maxDepth, budget);
|
|
93
|
+
} catch {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Only host fibers count toward depth.
|
|
100
|
+
*
|
|
101
|
+
* The JSX `<View><Text>{label}</Text></View>` that Babel sees as two levels is
|
|
102
|
+
* many more fibers at runtime: the composite, its `forwardRef` inner, context
|
|
103
|
+
* providers, then the native host and its text child. How many wrappers sit in
|
|
104
|
+
* between is an RN implementation detail that changes between versions, so
|
|
105
|
+
* counting fibers would make the depth limit mean something different on every
|
|
106
|
+
* release — and would cut the walk short before reaching the text. Counting
|
|
107
|
+
* host levels matches what Babel counted, on any RN version. The node budget,
|
|
108
|
+
* not the depth, is what bounds cost.
|
|
109
|
+
*/
|
|
110
|
+
function isHostLevel(fiber: AnyFiber): boolean {
|
|
111
|
+
const tag = getFiberTag(fiber);
|
|
112
|
+
if (tag === HOST_COMPONENT_TAG || tag === HOST_TEXT_TAG) return true;
|
|
113
|
+
return isHostFiber(fiber);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function walkText(
|
|
117
|
+
fiber: AnyFiber,
|
|
118
|
+
depth: number,
|
|
119
|
+
maxDepth: number,
|
|
120
|
+
budget: { remaining: number },
|
|
121
|
+
): string | undefined {
|
|
122
|
+
if (!fiber || depth > maxDepth || budget.remaining <= 0) return undefined;
|
|
123
|
+
budget.remaining -= 1;
|
|
124
|
+
|
|
125
|
+
const own = textFromMemoizedProps(fiber);
|
|
126
|
+
if (own) return own;
|
|
127
|
+
|
|
128
|
+
let child = getChild(fiber);
|
|
129
|
+
while (child) {
|
|
130
|
+
const nextDepth = isHostLevel(child) ? depth + 1 : depth;
|
|
131
|
+
const found = walkText(child, nextDepth, maxDepth, budget);
|
|
132
|
+
if (found) return found;
|
|
133
|
+
child = getSibling(child);
|
|
134
|
+
}
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** `placeholder` on this fiber (TextInput). Does not walk descendants. */
|
|
139
|
+
export function readHostPlaceholder(fiber: AnyFiber): string | undefined {
|
|
140
|
+
try {
|
|
141
|
+
const props = getLiveHostProps(fiber) ?? getMemoizedProps(fiber);
|
|
142
|
+
return coerceText(props?.placeholder);
|
|
143
|
+
} catch {
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { AnyFiber } from './fiber/fiberInternals';
|
|
2
|
+
|
|
3
|
+
interface FiberCacheEntry {
|
|
4
|
+
fiber: AnyFiber;
|
|
5
|
+
screenKey: string | null;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const fiberCache = new Map<string, FiberCacheEntry>();
|
|
9
|
+
let currentScreenKey: string | null = null;
|
|
10
|
+
|
|
11
|
+
export function getFiberAnchorScreenKey(): string | null {
|
|
12
|
+
return currentScreenKey;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** Invalidate fiber-resolved anchors when the active screen changes. */
|
|
16
|
+
export function notifyAnchorScreenChange(screenKey: string | null): void {
|
|
17
|
+
if (screenKey === currentScreenKey) return;
|
|
18
|
+
currentScreenKey = screenKey;
|
|
19
|
+
fiberCache.clear();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Drop the fiber cache (preview restart / tests). */
|
|
23
|
+
export function clearFiberAnchorCache(): void {
|
|
24
|
+
fiberCache.clear();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function getCachedFiberAnchor(id: string): FiberCacheEntry | undefined {
|
|
28
|
+
return fiberCache.get(id);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function setCachedFiberAnchor(id: string, fiber: AnyFiber): void {
|
|
32
|
+
fiberCache.set(id, { fiber, screenKey: currentScreenKey });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function deleteCachedFiberAnchor(id: string): void {
|
|
36
|
+
fiberCache.delete(id);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Drop a cached fiber entry after a zero-size measure so the next resolve
|
|
41
|
+
* re-scans (the host may have remounted under a new fiber).
|
|
42
|
+
*/
|
|
43
|
+
export function invalidateFiberAnchor(id: string): void {
|
|
44
|
+
fiberCache.delete(id);
|
|
45
|
+
}
|
|
@@ -5,30 +5,37 @@ import { isFiberMounted } from './fiber/fiberInternals';
|
|
|
5
5
|
import { findAnchorFiber } from './fiber/findAnchorFiber';
|
|
6
6
|
import { createFiberMeasureInWindow } from './fiber/measureHostFiber';
|
|
7
7
|
import { isFiberOnVisibleScreen } from './fiber/visibleScreens';
|
|
8
|
+
import {
|
|
9
|
+
clearFiberAnchorCache as clearCache,
|
|
10
|
+
deleteCachedFiberAnchor,
|
|
11
|
+
getCachedFiberAnchor,
|
|
12
|
+
getFiberAnchorScreenKey,
|
|
13
|
+
invalidateFiberAnchor as dropCachedFiberAnchor,
|
|
14
|
+
notifyAnchorScreenChange as onAnchorScreenChange,
|
|
15
|
+
setCachedFiberAnchor,
|
|
16
|
+
} from './fiberAnchorCache';
|
|
8
17
|
|
|
9
18
|
export type AnchorResolution =
|
|
10
19
|
| { status: 'found'; host: AnchorHost; fiber?: AnyFiber }
|
|
11
20
|
| { status: 'ambiguous' }
|
|
12
21
|
| { status: 'missing' };
|
|
13
22
|
|
|
14
|
-
interface FiberCacheEntry {
|
|
15
|
-
fiber: AnyFiber;
|
|
16
|
-
screenKey: string | null;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const fiberCache = new Map<string, FiberCacheEntry>();
|
|
20
|
-
let currentScreenKey: string | null = null;
|
|
21
|
-
|
|
22
23
|
/** Invalidate fiber-resolved anchors when the active screen changes. */
|
|
23
24
|
export function notifyAnchorScreenChange(screenKey: string | null): void {
|
|
24
|
-
|
|
25
|
-
currentScreenKey = screenKey;
|
|
26
|
-
fiberCache.clear();
|
|
25
|
+
onAnchorScreenChange(screenKey);
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
/** Test helper — drop the fiber cache. */
|
|
30
29
|
export function clearFiberAnchorCache(): void {
|
|
31
|
-
|
|
30
|
+
clearCache();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Drop a cached fiber entry after a zero-size measure so the next resolve
|
|
35
|
+
* re-scans (the host may have remounted under a new fiber).
|
|
36
|
+
*/
|
|
37
|
+
export function invalidateFiberAnchor(id: string): void {
|
|
38
|
+
dropCachedFiberAnchor(id);
|
|
32
39
|
}
|
|
33
40
|
|
|
34
41
|
/**
|
|
@@ -55,7 +62,8 @@ export function resolveAnchorHost(id: string): AnchorResolution {
|
|
|
55
62
|
|
|
56
63
|
// Cached fiber still mounted, on the same screen, and not covered by a screen
|
|
57
64
|
// pushed on top since it was cached?
|
|
58
|
-
const cached =
|
|
65
|
+
const cached = getCachedFiberAnchor(id);
|
|
66
|
+
const currentScreenKey = getFiberAnchorScreenKey();
|
|
59
67
|
if (
|
|
60
68
|
cached &&
|
|
61
69
|
cached.screenKey === currentScreenKey &&
|
|
@@ -69,7 +77,7 @@ export function resolveAnchorHost(id: string): AnchorResolution {
|
|
|
69
77
|
};
|
|
70
78
|
}
|
|
71
79
|
if (cached) {
|
|
72
|
-
|
|
80
|
+
deleteCachedFiberAnchor(id);
|
|
73
81
|
}
|
|
74
82
|
|
|
75
83
|
const root = fiberScanRoot.getFiber();
|
|
@@ -85,18 +93,10 @@ export function resolveAnchorHost(id: string): AnchorResolution {
|
|
|
85
93
|
return { status: 'missing' };
|
|
86
94
|
}
|
|
87
95
|
|
|
88
|
-
|
|
96
|
+
setCachedFiberAnchor(id, result.fiber);
|
|
89
97
|
return {
|
|
90
98
|
status: 'found',
|
|
91
99
|
host: { measureInWindow: createFiberMeasureInWindow(result.fiber) },
|
|
92
100
|
fiber: result.fiber,
|
|
93
101
|
};
|
|
94
102
|
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Drop a cached fiber entry after a zero-size measure so the next resolve
|
|
98
|
-
* re-scans (the host may have remounted under a new fiber).
|
|
99
|
-
*/
|
|
100
|
-
export function invalidateFiberAnchor(id: string): void {
|
|
101
|
-
fiberCache.delete(id);
|
|
102
|
-
}
|