@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,485 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import { pointInRect, TARGET_PRESS_TAP_SLOP } from "../anchors/targetPressMonitor.js";
|
|
6
|
+
import { ABSOLUTE_FILL } from "../surfaces/absoluteFill.js";
|
|
7
|
+
import { useReportAuthoringBottomHeight, useReportPreviewBannerHeight } from "../surfaces/surfaceLayoutInsets.js";
|
|
8
|
+
import { TooltipCutout } from "../surfaces/tooltip/TooltipCutout.js";
|
|
9
|
+
import { capturePickerScreenshot } from "./capturePickerScreenshot.js";
|
|
10
|
+
import { ChromeBarTransition, useChromeBarMounted } from "./chrome/ChromeBarTransition.js";
|
|
11
|
+
import { ChromeBottomSheet } from "./chrome/ChromeBottomSheet.js";
|
|
12
|
+
import { ChromeButton } from "./chrome/ChromeButton.js";
|
|
13
|
+
import { ChromeTooltip } from "./chrome/ChromeTooltip.js";
|
|
14
|
+
import { ChromeTopBar } from "./chrome/ChromeTopBar.js";
|
|
15
|
+
import { chromeColors, chromeOverlay, chromeRadius } from "./chrome/tokens.js";
|
|
16
|
+
import { DOUBLE_TAP_WINDOW_MS, isDoubleTap } from "./doubleTap.js";
|
|
17
|
+
import { elementPickerController } from "./elementPickerController.js";
|
|
18
|
+
import { validatePickerFingerprint } from "./fingerprintFromInstance.js";
|
|
19
|
+
import { hitTestAt, nextContainingIndex } from "./hitTest.js";
|
|
20
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
+
function statusForValidationFailure(reason) {
|
|
22
|
+
if (reason === 'not-unique' || reason === 'ambiguous-explicit-id') {
|
|
23
|
+
return 'This element is not uniquely identifiable — add a testID or userflowId, or it may match the wrong item at play time.';
|
|
24
|
+
}
|
|
25
|
+
if (reason === 'wrong-instance') {
|
|
26
|
+
return 'That fingerprint matches a different element — pick again or add a testID.';
|
|
27
|
+
}
|
|
28
|
+
return 'Could not uniquely match that element at play time.';
|
|
29
|
+
}
|
|
30
|
+
const CONFIRM_HELPER = 'Navigate back to the Userflow app after confirming';
|
|
31
|
+
const ONBOARDING_COPY = 'Double tap anywhere to access the menu';
|
|
32
|
+
|
|
33
|
+
/** Yield until chrome has left the native tree so captureScreen cannot include it. */
|
|
34
|
+
function waitForCapturePaint() {
|
|
35
|
+
return new Promise(resolve => {
|
|
36
|
+
const raf = globalThis.requestAnimationFrame;
|
|
37
|
+
if (typeof raf === 'function') {
|
|
38
|
+
raf.call(globalThis, () => {
|
|
39
|
+
raf.call(globalThis, () => resolve());
|
|
40
|
+
});
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
setTimeout(resolve, 0);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function ringStyle(rect, inset) {
|
|
47
|
+
return {
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
left: rect.x - inset,
|
|
50
|
+
top: rect.y - inset,
|
|
51
|
+
width: rect.width + inset * 2,
|
|
52
|
+
height: rect.height + inset * 2,
|
|
53
|
+
borderRadius: chromeRadius.lg
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Overlay chrome for in-app element picking. Mounted by UserflowProvider;
|
|
59
|
+
* renders nothing until {@link elementPickerController.beginSelection}.
|
|
60
|
+
*/
|
|
61
|
+
export function ElementPickerOverlay() {
|
|
62
|
+
const [state, setState] = React.useState(() => elementPickerController.getState());
|
|
63
|
+
const [mode, setMode] = React.useState('select');
|
|
64
|
+
const [candidates, setCandidates] = React.useState([]);
|
|
65
|
+
const [index, setIndex] = React.useState(0);
|
|
66
|
+
const [busy, setBusy] = React.useState(false);
|
|
67
|
+
const [status, setStatus] = React.useState(null);
|
|
68
|
+
const [chromeVisible, setChromeVisible] = React.useState(true);
|
|
69
|
+
const [hidingForCapture, setHidingForCapture] = React.useState(false);
|
|
70
|
+
const [showOnboarding, setShowOnboarding] = React.useState(false);
|
|
71
|
+
const [barHeight, setBarHeight] = React.useState(0);
|
|
72
|
+
const [sheetHeight, setSheetHeight] = React.useState(0);
|
|
73
|
+
const tapStartRef = React.useRef(null);
|
|
74
|
+
const lastTapRef = React.useRef(null);
|
|
75
|
+
const tapGenRef = React.useRef(0);
|
|
76
|
+
const applyTimerRef = React.useRef(null);
|
|
77
|
+
const applyResolveRef = React.useRef(null);
|
|
78
|
+
const modeRef = React.useRef('select');
|
|
79
|
+
const armedRequestIdRef = React.useRef(undefined);
|
|
80
|
+
const setBannerHeight = useReportPreviewBannerHeight('picker');
|
|
81
|
+
const setBottomHeight = useReportAuthoringBottomHeight('picker');
|
|
82
|
+
const cancelPendingSelection = React.useCallback(() => {
|
|
83
|
+
tapGenRef.current += 1;
|
|
84
|
+
if (applyTimerRef.current != null) {
|
|
85
|
+
clearTimeout(applyTimerRef.current);
|
|
86
|
+
applyTimerRef.current = null;
|
|
87
|
+
}
|
|
88
|
+
const resolveWait = applyResolveRef.current;
|
|
89
|
+
applyResolveRef.current = null;
|
|
90
|
+
resolveWait?.();
|
|
91
|
+
setBusy(false);
|
|
92
|
+
}, []);
|
|
93
|
+
const resetTransient = React.useCallback(options => {
|
|
94
|
+
cancelPendingSelection();
|
|
95
|
+
lastTapRef.current = null;
|
|
96
|
+
setMode('select');
|
|
97
|
+
setCandidates([]);
|
|
98
|
+
setIndex(0);
|
|
99
|
+
setBusy(false);
|
|
100
|
+
setStatus(null);
|
|
101
|
+
setChromeVisible(true);
|
|
102
|
+
setBarHeight(0);
|
|
103
|
+
setSheetHeight(0);
|
|
104
|
+
modeRef.current = 'select';
|
|
105
|
+
if (options?.resetCaptureHide !== false) {
|
|
106
|
+
setHidingForCapture(false);
|
|
107
|
+
}
|
|
108
|
+
}, [cancelPendingSelection]);
|
|
109
|
+
React.useEffect(() => {
|
|
110
|
+
return elementPickerController.subscribe(next => {
|
|
111
|
+
setState(next);
|
|
112
|
+
if (!next.active) {
|
|
113
|
+
armedRequestIdRef.current = undefined;
|
|
114
|
+
resetTransient({
|
|
115
|
+
resetCaptureHide: false
|
|
116
|
+
});
|
|
117
|
+
setShowOnboarding(false);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
// Successful confirm leaves hidingForCapture true so chrome does not
|
|
121
|
+
// flash back during teardown. Clear it with the new session's setState
|
|
122
|
+
// so the first paint of this pick has bars.
|
|
123
|
+
if (armedRequestIdRef.current !== next.requestId) {
|
|
124
|
+
setHidingForCapture(false);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}, [resetTransient]);
|
|
128
|
+
React.useEffect(() => {
|
|
129
|
+
if (!state.active || state.requestId == null) return;
|
|
130
|
+
if (armedRequestIdRef.current === state.requestId) return;
|
|
131
|
+
armedRequestIdRef.current = state.requestId;
|
|
132
|
+
resetTransient();
|
|
133
|
+
setShowOnboarding(true);
|
|
134
|
+
}, [resetTransient, state.active, state.requestId]);
|
|
135
|
+
React.useEffect(() => {
|
|
136
|
+
return () => {
|
|
137
|
+
cancelPendingSelection();
|
|
138
|
+
};
|
|
139
|
+
}, [cancelPendingSelection]);
|
|
140
|
+
React.useEffect(() => {
|
|
141
|
+
if (!state.active) {
|
|
142
|
+
setBannerHeight(0);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (hidingForCapture) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (!chromeVisible) {
|
|
149
|
+
setBannerHeight(0);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (barHeight > 0) {
|
|
153
|
+
setBannerHeight(barHeight);
|
|
154
|
+
}
|
|
155
|
+
}, [barHeight, chromeVisible, hidingForCapture, setBannerHeight, state.active]);
|
|
156
|
+
React.useEffect(() => {
|
|
157
|
+
if (!state.active) {
|
|
158
|
+
setBottomHeight(0);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
if (hidingForCapture) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (!chromeVisible) {
|
|
165
|
+
setBottomHeight(0);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
if (sheetHeight > 0) {
|
|
169
|
+
setBottomHeight(sheetHeight);
|
|
170
|
+
}
|
|
171
|
+
}, [chromeVisible, hidingForCapture, setBottomHeight, sheetHeight, state.active]);
|
|
172
|
+
const onMeasureHeight = React.useCallback(height => {
|
|
173
|
+
setBarHeight(Math.max(0, height));
|
|
174
|
+
}, []);
|
|
175
|
+
const onMeasureSheetHeight = React.useCallback(height => {
|
|
176
|
+
setSheetHeight(Math.max(0, height));
|
|
177
|
+
}, []);
|
|
178
|
+
const selected = candidates[index] ?? null;
|
|
179
|
+
const phase = selected ? 'selected' : mode === 'select' ? 'selecting' : 'navigating';
|
|
180
|
+
modeRef.current = mode;
|
|
181
|
+
|
|
182
|
+
// Bars slide/fade in with the picker, out on double-tap hide, and out again
|
|
183
|
+
// on teardown. Keep them mounted through the exit even after the picker goes
|
|
184
|
+
// inactive; the dim, capture, and spotlight below drop immediately instead.
|
|
185
|
+
const chromeBarsVisible = state.active && chromeVisible && !hidingForCapture;
|
|
186
|
+
const chromeBarsMounted = useChromeBarMounted(chromeBarsVisible);
|
|
187
|
+
const showChromeBars = hidingForCapture ? false : chromeBarsMounted;
|
|
188
|
+
React.useEffect(() => {
|
|
189
|
+
if (phase !== 'selecting') {
|
|
190
|
+
setShowOnboarding(false);
|
|
191
|
+
}
|
|
192
|
+
}, [phase]);
|
|
193
|
+
const applyHits = React.useCallback(hits => {
|
|
194
|
+
if (modeRef.current !== 'select') return;
|
|
195
|
+
lastTapRef.current = null;
|
|
196
|
+
setChromeVisible(true);
|
|
197
|
+
if (hits.length === 0) {
|
|
198
|
+
setCandidates([]);
|
|
199
|
+
setIndex(0);
|
|
200
|
+
setStatus('No stamped element under that tap.');
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
setCandidates(hits);
|
|
204
|
+
setIndex(0);
|
|
205
|
+
setStatus(null);
|
|
206
|
+
}, []);
|
|
207
|
+
const scheduleSelection = React.useCallback((pageX, pageY) => {
|
|
208
|
+
cancelPendingSelection();
|
|
209
|
+
const gen = tapGenRef.current;
|
|
210
|
+
setBusy(true);
|
|
211
|
+
setStatus(null);
|
|
212
|
+
const hitsPromise = hitTestAt(pageX, pageY);
|
|
213
|
+
const wait = new Promise(resolve => {
|
|
214
|
+
applyResolveRef.current = resolve;
|
|
215
|
+
applyTimerRef.current = setTimeout(() => {
|
|
216
|
+
applyTimerRef.current = null;
|
|
217
|
+
applyResolveRef.current = null;
|
|
218
|
+
resolve();
|
|
219
|
+
}, DOUBLE_TAP_WINDOW_MS);
|
|
220
|
+
});
|
|
221
|
+
void (async () => {
|
|
222
|
+
try {
|
|
223
|
+
const [hits] = await Promise.all([hitsPromise, wait]);
|
|
224
|
+
if (tapGenRef.current !== gen) return;
|
|
225
|
+
applyHits(hits);
|
|
226
|
+
} finally {
|
|
227
|
+
if (tapGenRef.current === gen) setBusy(false);
|
|
228
|
+
}
|
|
229
|
+
})();
|
|
230
|
+
}, [applyHits, cancelPendingSelection]);
|
|
231
|
+
const onTap = React.useCallback(async (pageX, pageY) => {
|
|
232
|
+
if (selected && candidates.length > 1 && pointInRect(pageX, pageY, selected.rect)) {
|
|
233
|
+
setIndex(current => nextContainingIndex(candidates, current));
|
|
234
|
+
setStatus(null);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
setBusy(true);
|
|
238
|
+
setStatus(null);
|
|
239
|
+
try {
|
|
240
|
+
const hits = await hitTestAt(pageX, pageY);
|
|
241
|
+
if (hits.length === 0) {
|
|
242
|
+
setCandidates([]);
|
|
243
|
+
setIndex(0);
|
|
244
|
+
setStatus('No stamped element under that tap.');
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
setCandidates(hits);
|
|
248
|
+
setIndex(0);
|
|
249
|
+
} finally {
|
|
250
|
+
setBusy(false);
|
|
251
|
+
}
|
|
252
|
+
}, [candidates, selected]);
|
|
253
|
+
const onGrant = React.useCallback(event => {
|
|
254
|
+
const {
|
|
255
|
+
pageX,
|
|
256
|
+
pageY
|
|
257
|
+
} = event.nativeEvent;
|
|
258
|
+
tapStartRef.current = {
|
|
259
|
+
pageX,
|
|
260
|
+
pageY
|
|
261
|
+
};
|
|
262
|
+
}, []);
|
|
263
|
+
const onRelease = React.useCallback(event => {
|
|
264
|
+
const start = tapStartRef.current;
|
|
265
|
+
tapStartRef.current = null;
|
|
266
|
+
if (!start) return;
|
|
267
|
+
const {
|
|
268
|
+
pageX,
|
|
269
|
+
pageY
|
|
270
|
+
} = event.nativeEvent;
|
|
271
|
+
const dx = pageX - start.pageX;
|
|
272
|
+
const dy = pageY - start.pageY;
|
|
273
|
+
if (dx * dx + dy * dy > TARGET_PRESS_TAP_SLOP * TARGET_PRESS_TAP_SLOP) return;
|
|
274
|
+
const sample = {
|
|
275
|
+
pageX,
|
|
276
|
+
pageY,
|
|
277
|
+
timestamp: Date.now()
|
|
278
|
+
};
|
|
279
|
+
if (!selected && isDoubleTap(lastTapRef.current, sample)) {
|
|
280
|
+
cancelPendingSelection();
|
|
281
|
+
lastTapRef.current = null;
|
|
282
|
+
setShowOnboarding(false);
|
|
283
|
+
setChromeVisible(visible => !visible);
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
lastTapRef.current = sample;
|
|
287
|
+
if (selected) {
|
|
288
|
+
void onTap(pageX, pageY);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
scheduleSelection(pageX, pageY);
|
|
292
|
+
}, [cancelPendingSelection, onTap, scheduleSelection, selected]);
|
|
293
|
+
const deselect = React.useCallback(() => {
|
|
294
|
+
setCandidates([]);
|
|
295
|
+
setIndex(0);
|
|
296
|
+
setStatus(null);
|
|
297
|
+
setChromeVisible(true);
|
|
298
|
+
}, []);
|
|
299
|
+
const confirm = React.useCallback(async () => {
|
|
300
|
+
if (!selected) return;
|
|
301
|
+
const requestId = elementPickerController.getState().requestId;
|
|
302
|
+
if (!requestId) return;
|
|
303
|
+
setBusy(true);
|
|
304
|
+
setStatus(null);
|
|
305
|
+
try {
|
|
306
|
+
const validated = validatePickerFingerprint(selected.instance);
|
|
307
|
+
if (!validated.ok) {
|
|
308
|
+
setStatus(statusForValidationFailure(validated.reason));
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
setHidingForCapture(true);
|
|
312
|
+
await waitForCapturePaint();
|
|
313
|
+
const screenshot = await capturePickerScreenshot(selected.rect);
|
|
314
|
+
const delivered = await elementPickerController.commit({
|
|
315
|
+
instance: selected.instance,
|
|
316
|
+
autoData: validated.autoData,
|
|
317
|
+
text: selected.instance.childText ?? selected.instance.accessibilityLabel ?? null,
|
|
318
|
+
rect: selected.rect,
|
|
319
|
+
...(screenshot ? {
|
|
320
|
+
screenshot
|
|
321
|
+
} : {})
|
|
322
|
+
}, requestId);
|
|
323
|
+
if (!delivered && elementPickerController.getState().requestId === requestId) {
|
|
324
|
+
setHidingForCapture(false);
|
|
325
|
+
setStatus("Couldn't send to Builder");
|
|
326
|
+
}
|
|
327
|
+
} catch {
|
|
328
|
+
setHidingForCapture(false);
|
|
329
|
+
setStatus('Could not serialize that element.');
|
|
330
|
+
} finally {
|
|
331
|
+
setBusy(false);
|
|
332
|
+
}
|
|
333
|
+
}, [selected]);
|
|
334
|
+
if (!state.active && !chromeBarsMounted) return null;
|
|
335
|
+
const barLabel = phase === 'selected' ? 'Confirm selected element' : phase === 'selecting' ? 'Tap an element to select it' : 'Navigate screens';
|
|
336
|
+
const helperText = status ?? (phase === 'selected' ? CONFIRM_HELPER : undefined);
|
|
337
|
+
const tooltipVisible = state.active && showOnboarding && chromeVisible && phase === 'selecting';
|
|
338
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
339
|
+
pointerEvents: "box-none",
|
|
340
|
+
style: styles.root,
|
|
341
|
+
testID: "userflow-element-picker",
|
|
342
|
+
children: [state.active && phase === 'selecting' ? /*#__PURE__*/_jsx(View, {
|
|
343
|
+
pointerEvents: "none",
|
|
344
|
+
style: styles.dim,
|
|
345
|
+
testID: "userflow-element-picker-dim"
|
|
346
|
+
}) : null, state.active && selected ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
347
|
+
children: [/*#__PURE__*/_jsx(TooltipCutout, {
|
|
348
|
+
backdropColor: chromeOverlay.color,
|
|
349
|
+
backdropOpacity: chromeOverlay.opacity,
|
|
350
|
+
targetBlocked: false,
|
|
351
|
+
targetRect: {
|
|
352
|
+
top: selected.rect.y,
|
|
353
|
+
left: selected.rect.x,
|
|
354
|
+
width: selected.rect.width,
|
|
355
|
+
height: selected.rect.height
|
|
356
|
+
}
|
|
357
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
358
|
+
pointerEvents: "none",
|
|
359
|
+
style: [ringStyle(selected.rect, 5), {
|
|
360
|
+
borderWidth: 4,
|
|
361
|
+
borderColor: chromeColors.focusRing
|
|
362
|
+
}],
|
|
363
|
+
testID: "userflow-element-picker-focus-ring"
|
|
364
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
365
|
+
pointerEvents: "none",
|
|
366
|
+
style: [ringStyle(selected.rect, 1), {
|
|
367
|
+
borderWidth: 1,
|
|
368
|
+
borderColor: chromeColors.white
|
|
369
|
+
}],
|
|
370
|
+
testID: "userflow-element-picker-focus-ring-inner"
|
|
371
|
+
})]
|
|
372
|
+
}) : null, state.active && mode === 'select' ? /*#__PURE__*/_jsx(View, {
|
|
373
|
+
testID: "userflow-element-picker-capture",
|
|
374
|
+
style: styles.capture,
|
|
375
|
+
onStartShouldSetResponder: () => true,
|
|
376
|
+
onResponderGrant: onGrant,
|
|
377
|
+
onResponderRelease: onRelease
|
|
378
|
+
}) : null, showChromeBars ? /*#__PURE__*/_jsx(ChromeBarTransition, {
|
|
379
|
+
edge: "top",
|
|
380
|
+
pointerEvents: "box-none",
|
|
381
|
+
style: styles.top,
|
|
382
|
+
visible: chromeBarsVisible,
|
|
383
|
+
children: /*#__PURE__*/_jsx(ChromeTopBar, {
|
|
384
|
+
label: barLabel,
|
|
385
|
+
onMeasureHeight: onMeasureHeight
|
|
386
|
+
})
|
|
387
|
+
}) : null, tooltipVisible ? /*#__PURE__*/_jsx(View, {
|
|
388
|
+
pointerEvents: "none",
|
|
389
|
+
style: [styles.tooltip, {
|
|
390
|
+
top: barHeight
|
|
391
|
+
}],
|
|
392
|
+
children: /*#__PURE__*/_jsx(ChromeTooltip, {
|
|
393
|
+
onDismiss: () => {
|
|
394
|
+
setShowOnboarding(false);
|
|
395
|
+
},
|
|
396
|
+
children: ONBOARDING_COPY
|
|
397
|
+
})
|
|
398
|
+
}) : null, showChromeBars ? /*#__PURE__*/_jsx(ChromeBarTransition, {
|
|
399
|
+
edge: "bottom",
|
|
400
|
+
pointerEvents: "box-none",
|
|
401
|
+
style: styles.bottom,
|
|
402
|
+
visible: chromeBarsVisible,
|
|
403
|
+
children: /*#__PURE__*/_jsx(ChromeBottomSheet, {
|
|
404
|
+
helperText: helperText,
|
|
405
|
+
onMeasureHeight: onMeasureSheetHeight,
|
|
406
|
+
children: phase === 'selected' ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
407
|
+
children: [/*#__PURE__*/_jsx(ChromeButton, {
|
|
408
|
+
accessibilityLabel: "Deselect",
|
|
409
|
+
label: "Deselect",
|
|
410
|
+
onPress: deselect,
|
|
411
|
+
testID: "userflow-element-picker-deselect",
|
|
412
|
+
variant: "secondary"
|
|
413
|
+
}), /*#__PURE__*/_jsx(ChromeButton, {
|
|
414
|
+
accessibilityLabel: "Confirm element",
|
|
415
|
+
disabled: busy,
|
|
416
|
+
label: "Confirm element",
|
|
417
|
+
onPress: () => {
|
|
418
|
+
void confirm();
|
|
419
|
+
},
|
|
420
|
+
testID: "userflow-element-picker-confirm"
|
|
421
|
+
})]
|
|
422
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
423
|
+
children: [/*#__PURE__*/_jsx(ChromeButton, {
|
|
424
|
+
accessibilityLabel: "Cancel element selection",
|
|
425
|
+
label: "Cancel",
|
|
426
|
+
onPress: () => elementPickerController.cancel(),
|
|
427
|
+
testID: "userflow-element-picker-cancel",
|
|
428
|
+
variant: "secondary"
|
|
429
|
+
}), phase === 'selecting' ? /*#__PURE__*/_jsx(ChromeButton, {
|
|
430
|
+
accessibilityLabel: "Navigate screens",
|
|
431
|
+
label: "Navigate screens",
|
|
432
|
+
onPress: () => {
|
|
433
|
+
cancelPendingSelection();
|
|
434
|
+
lastTapRef.current = null;
|
|
435
|
+
setStatus(null);
|
|
436
|
+
setMode('navigate');
|
|
437
|
+
},
|
|
438
|
+
testID: "userflow-element-picker-navigate"
|
|
439
|
+
}) : /*#__PURE__*/_jsx(ChromeButton, {
|
|
440
|
+
accessibilityLabel: "Select element here",
|
|
441
|
+
label: "Select element here",
|
|
442
|
+
onPress: () => {
|
|
443
|
+
setStatus(null);
|
|
444
|
+
setMode('select');
|
|
445
|
+
},
|
|
446
|
+
testID: "userflow-element-picker-select-here"
|
|
447
|
+
})]
|
|
448
|
+
})
|
|
449
|
+
})
|
|
450
|
+
}) : null]
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
const styles = StyleSheet.create({
|
|
454
|
+
root: {
|
|
455
|
+
...ABSOLUTE_FILL,
|
|
456
|
+
zIndex: 1100
|
|
457
|
+
},
|
|
458
|
+
dim: {
|
|
459
|
+
...ABSOLUTE_FILL,
|
|
460
|
+
backgroundColor: chromeOverlay.color,
|
|
461
|
+
opacity: chromeOverlay.opacity
|
|
462
|
+
},
|
|
463
|
+
capture: {
|
|
464
|
+
...ABSOLUTE_FILL
|
|
465
|
+
},
|
|
466
|
+
top: {
|
|
467
|
+
position: 'absolute',
|
|
468
|
+
top: 0,
|
|
469
|
+
left: 0,
|
|
470
|
+
right: 0
|
|
471
|
+
},
|
|
472
|
+
tooltip: {
|
|
473
|
+
position: 'absolute',
|
|
474
|
+
left: 0,
|
|
475
|
+
right: 0,
|
|
476
|
+
alignItems: 'center'
|
|
477
|
+
},
|
|
478
|
+
bottom: {
|
|
479
|
+
position: 'absolute',
|
|
480
|
+
bottom: 0,
|
|
481
|
+
left: 0,
|
|
482
|
+
right: 0
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
//# sourceMappingURL=ElementPickerOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","pointInRect","TARGET_PRESS_TAP_SLOP","ABSOLUTE_FILL","useReportAuthoringBottomHeight","useReportPreviewBannerHeight","TooltipCutout","capturePickerScreenshot","ChromeBarTransition","useChromeBarMounted","ChromeBottomSheet","ChromeButton","ChromeTooltip","ChromeTopBar","chromeColors","chromeOverlay","chromeRadius","DOUBLE_TAP_WINDOW_MS","isDoubleTap","elementPickerController","validatePickerFingerprint","hitTestAt","nextContainingIndex","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","statusForValidationFailure","reason","CONFIRM_HELPER","ONBOARDING_COPY","waitForCapturePaint","Promise","resolve","raf","globalThis","requestAnimationFrame","call","setTimeout","ringStyle","rect","inset","position","left","x","top","y","width","height","borderRadius","lg","ElementPickerOverlay","state","setState","useState","getState","mode","setMode","candidates","setCandidates","index","setIndex","busy","setBusy","status","setStatus","chromeVisible","setChromeVisible","hidingForCapture","setHidingForCapture","showOnboarding","setShowOnboarding","barHeight","setBarHeight","sheetHeight","setSheetHeight","tapStartRef","useRef","lastTapRef","tapGenRef","applyTimerRef","applyResolveRef","modeRef","armedRequestIdRef","undefined","setBannerHeight","setBottomHeight","cancelPendingSelection","useCallback","current","clearTimeout","resolveWait","resetTransient","options","resetCaptureHide","useEffect","subscribe","next","active","requestId","onMeasureHeight","Math","max","onMeasureSheetHeight","selected","phase","chromeBarsVisible","chromeBarsMounted","showChromeBars","applyHits","hits","length","scheduleSelection","pageX","pageY","gen","hitsPromise","wait","all","onTap","onGrant","event","nativeEvent","onRelease","start","dx","dy","sample","timestamp","Date","now","visible","deselect","confirm","validated","instance","ok","screenshot","delivered","commit","autoData","text","childText","accessibilityLabel","barLabel","helperText","tooltipVisible","pointerEvents","style","styles","root","testID","children","dim","backdropColor","color","backdropOpacity","opacity","targetBlocked","targetRect","borderWidth","borderColor","focusRing","white","capture","onStartShouldSetResponder","onResponderGrant","onResponderRelease","edge","label","tooltip","onDismiss","bottom","onPress","variant","disabled","cancel","create","zIndex","backgroundColor","right","alignItems"],"sourceRoot":"../../../src","sources":["authoring/ElementPickerOverlay.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAoD,cAAc;AAE3F,SAASC,WAAW,EAAEC,qBAAqB,QAAQ,kCAA+B;AAClF,SAASC,aAAa,QAAQ,6BAA0B;AACxD,SACEC,8BAA8B,EAC9BC,4BAA4B,QACvB,oCAAiC;AACxC,SAASC,aAAa,QAAQ,sCAAmC;AAEjE,SAASC,uBAAuB,QAAQ,8BAA2B;AACnE,SAASC,mBAAmB,EAAEC,mBAAmB,QAAQ,iCAA8B;AACvF,SAASC,iBAAiB,QAAQ,+BAA4B;AAC9D,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,aAAa,QAAQ,2BAAwB;AACtD,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,YAAY,EAAEC,aAAa,EAAEC,YAAY,QAAQ,oBAAiB;AAC3E,SAASC,oBAAoB,EAAEC,WAAW,QAAwB,gBAAa;AAC/E,SAASC,uBAAuB,QAAiC,8BAA2B;AAC5F,SACEC,yBAAyB,QAEpB,8BAA2B;AAClC,SAASC,SAAS,EAAEC,mBAAmB,QAAyC,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE5F,SAASC,0BAA0BA,CAACC,MAA0C,EAAU;EACtF,IAAIA,MAAM,KAAK,YAAY,IAAIA,MAAM,KAAK,uBAAuB,EAAE;IACjE,OAAO,sHAAsH;EAC/H;EACA,IAAIA,MAAM,KAAK,gBAAgB,EAAE;IAC/B,OAAO,4EAA4E;EACrF;EACA,OAAO,qDAAqD;AAC9D;AAKA,MAAMC,cAAc,GAAG,oDAAoD;AAC3E,MAAMC,eAAe,GAAG,wCAAwC;;AAEhE;AACA,SAASC,mBAAmBA,CAAA,EAAkB;EA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B3B,IAAI,EAAE;IACJ,GAAGrJ,aAAa;IAChBiL,MAAM,EAAE;EACV,CAAC;EACDzB,GAAG,EAAE;IACH,GAAGxJ,aAAa;IAChBkL,eAAe,EAAEtK,aAAa,CAAC8I,KAAK;IACpCE,OAAO,EAAEhJ,aAAa,CAACgJ;EACzB,CAAC;EACDO,OAAO,EAAE;IACP,GAAGnK;EACL,CAAC;EACD4C,GAAG,EAAE;IACHH,QAAQ,EAAE,UAAU;IACpBG,GAAG,EAAE,CAAC;IACNF,IAAI,EAAE,CAAC;IACPyI,KAAK,EAAE;EACT,CAAC;EACDV,OAAO,EAAE;IACPhI,QAAQ,EAAE,UAAU;IACpBC,IAAI,EAAE,CAAC;IACPyI,KAAK,EAAE,CAAC;IACRC,UAAU,EAAE;EACd,CAAC;EACDT,MAAM,EAAE;IACNlI,QAAQ,EAAE,UAAU;IACpBkI,MAAM,EAAE,CAAC;IACTjI,IAAI,EAAE,CAAC;IACPyI,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Dimensions } from 'react-native';
|
|
4
|
+
const MAX_CAPTURE_WIDTH = 480;
|
|
5
|
+
const MISSING_VIEW_SHOT_WARNING = '[Userflow] Required peer react-native-view-shot is not installed; ' + 'skipping picker screenshot. Install react-native-view-shot (>=5.0.0) and rebuild native.';
|
|
6
|
+
let didWarnMissingViewShot = false;
|
|
7
|
+
function warnMissingViewShot() {
|
|
8
|
+
if (didWarnMissingViewShot) return;
|
|
9
|
+
didWarnMissingViewShot = true;
|
|
10
|
+
if (__DEV__) {
|
|
11
|
+
// eslint-disable-next-line no-console -- intentional missing-required-peer diagnostic
|
|
12
|
+
console.warn(MISSING_VIEW_SHOT_WARNING);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function loadViewShot() {
|
|
16
|
+
try {
|
|
17
|
+
// Required peer; degrade if unlinked or the JS package is missing.
|
|
18
|
+
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
|
|
19
|
+
return require('react-native-view-shot');
|
|
20
|
+
} catch {
|
|
21
|
+
warnMissingViewShot();
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Capture a downscaled JPEG of the current screen and map `rect` (window DIP)
|
|
28
|
+
* onto the captured pixel grid. Returns null when the native module is missing
|
|
29
|
+
* or capture fails.
|
|
30
|
+
*/
|
|
31
|
+
export async function capturePickerScreenshot(rect) {
|
|
32
|
+
const viewShot = loadViewShot();
|
|
33
|
+
if (!viewShot?.captureScreen) return null;
|
|
34
|
+
try {
|
|
35
|
+
const window = Dimensions.get('window');
|
|
36
|
+
const winW = window.width || 1;
|
|
37
|
+
const winH = window.height || 1;
|
|
38
|
+
const captureWidth = Math.min(Math.round(winW), MAX_CAPTURE_WIDTH);
|
|
39
|
+
const captureHeight = Math.max(1, Math.round(winH * (captureWidth / winW)));
|
|
40
|
+
const dataUrl = await viewShot.captureScreen({
|
|
41
|
+
format: 'jpg',
|
|
42
|
+
quality: 0.55,
|
|
43
|
+
result: 'data-uri',
|
|
44
|
+
width: captureWidth,
|
|
45
|
+
height: captureHeight
|
|
46
|
+
});
|
|
47
|
+
if (typeof dataUrl !== 'string' || dataUrl.length === 0) return null;
|
|
48
|
+
const sx = captureWidth / winW;
|
|
49
|
+
const sy = captureHeight / winH;
|
|
50
|
+
return {
|
|
51
|
+
dataUrl,
|
|
52
|
+
width: captureWidth,
|
|
53
|
+
height: captureHeight,
|
|
54
|
+
targetX1: Math.round(rect.x * sx),
|
|
55
|
+
targetY1: Math.round(rect.y * sy),
|
|
56
|
+
targetX2: Math.round((rect.x + rect.width) * sx),
|
|
57
|
+
targetY2: Math.round((rect.y + rect.height) * sy)
|
|
58
|
+
};
|
|
59
|
+
} catch {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export function resetViewShotWarningForTests() {
|
|
66
|
+
didWarnMissingViewShot = false;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=capturePickerScreenshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Dimensions","MAX_CAPTURE_WIDTH","MISSING_VIEW_SHOT_WARNING","didWarnMissingViewShot","warnMissingViewShot","__DEV__","console","warn","loadViewShot","require","capturePickerScreenshot","rect","viewShot","captureScreen","window","get","winW","width","winH","height","captureWidth","Math","min","round","captureHeight","max","dataUrl","format","quality","result","length","sx","sy","targetX1","x","targetY1","y","targetX2","targetY2","resetViewShotWarningForTests"],"sourceRoot":"../../../src","sources":["authoring/capturePickerScreenshot.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAKzC,MAAMC,iBAAiB,GAAG,GAAG;AAE7B,MAAMC,yBAAyB,GAC7B,oEAAoE,GACpE,0FAA0F;AAY5F,IAAIC,sBAAsB,GAAG,KAAK;AAElC,SAASC,mBAAmBA,CAAA,EAAS;EACnC,IAAID,sBAAsB,EAAE;EAC5BA,sBAAsB,GAAG,IAAI;EAC7B,IAAIE,OAAO,EAAE;IACX;IACAC,OAAO,CAACC,IAAI,CAACL,yBAAyB,CAAC;EACzC;AACF;AAEA,SAASM,YAAYA,CAAA,EAA0B;EAC7C,IAAI;IACF;IACA;IACA,OAAOC,OAAO,CAAC,wBAAwB,CAAC;EAC1C,CAAC,CAAC,MAAM;IACNL,mBAAmB,CAAC,CAAC;IACrB,OAAO,IAAI;EACb;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeM,uBAAuBA,CAC3CC,IAAa,EAC4B;EACzC,MAAMC,QAAQ,GAAGJ,YAAY,CAAC,CAAC;EAC/B,IAAI,CAACI,QAAQ,EAAEC,aAAa,EAAE,OAAO,IAAI;EAEzC,IAAI;IACF,MAAMC,MAAM,GAAGd,UAAU,CAAC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