@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
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { isPairingPushAckTimeout } from '@userflow-tech/core';
|
|
4
|
+
import { elementPickerController } from "../authoring/elementPickerController.js";
|
|
5
|
+
function asRecord(payload) {
|
|
6
|
+
return payload && typeof payload === 'object' ? payload : {};
|
|
7
|
+
}
|
|
8
|
+
function idempotencyKeyOf(payload) {
|
|
9
|
+
const key = asRecord(payload)['idempotency_key'];
|
|
10
|
+
return typeof key === 'string' && key.length > 0 ? key : null;
|
|
11
|
+
}
|
|
12
|
+
function resultPayload(key, result) {
|
|
13
|
+
return {
|
|
14
|
+
idempotency_key: key,
|
|
15
|
+
ok: true,
|
|
16
|
+
autoData: result.autoData,
|
|
17
|
+
text: result.text ?? null,
|
|
18
|
+
...(result.screenshot ? {
|
|
19
|
+
screenshot: {
|
|
20
|
+
dataUrl: result.screenshot.dataUrl,
|
|
21
|
+
width: result.screenshot.width,
|
|
22
|
+
height: result.screenshot.height,
|
|
23
|
+
targetX1: result.screenshot.targetX1,
|
|
24
|
+
targetY1: result.screenshot.targetY1,
|
|
25
|
+
targetX2: result.screenshot.targetX2,
|
|
26
|
+
targetY2: result.screenshot.targetY2
|
|
27
|
+
}
|
|
28
|
+
} : {})
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Bridge pairing-channel `selectElement*` events onto {@link elementPickerController}.
|
|
34
|
+
* UI-free: the overlay (and QA harness) own the actual picking.
|
|
35
|
+
*/
|
|
36
|
+
export function bindElementPickerRelay(engine) {
|
|
37
|
+
if (typeof engine.onRelay !== 'function' || typeof engine.sendRelay !== 'function') {
|
|
38
|
+
return () => undefined;
|
|
39
|
+
}
|
|
40
|
+
let ignoreNextCancelSend = false;
|
|
41
|
+
|
|
42
|
+
/** Result delivery: ignore ack timeouts; surface connection failures. */
|
|
43
|
+
const sendResult = async (key, result) => {
|
|
44
|
+
try {
|
|
45
|
+
await engine.sendRelay('selectElementResult', resultPayload(key, result));
|
|
46
|
+
} catch (error) {
|
|
47
|
+
if (typeof isPairingPushAckTimeout === 'function' && isPairingPushAckTimeout(error)) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Cancel is best-effort: ignore timeout and disconnect. */
|
|
55
|
+
const sendCancel = key => {
|
|
56
|
+
void engine.sendRelay('selectElementCancel', {
|
|
57
|
+
idempotency_key: key
|
|
58
|
+
}).catch(() => undefined);
|
|
59
|
+
};
|
|
60
|
+
const unsub = engine.onRelay((event, payload) => {
|
|
61
|
+
if (event === 'selectElement') {
|
|
62
|
+
const key = idempotencyKeyOf(payload);
|
|
63
|
+
if (!key) return;
|
|
64
|
+
elementPickerController.beginSelection({
|
|
65
|
+
requestId: key,
|
|
66
|
+
onResult: result => sendResult(key, result),
|
|
67
|
+
onCancel: () => {
|
|
68
|
+
if (ignoreNextCancelSend) return;
|
|
69
|
+
sendCancel(key);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (event === 'selectElementCancel') {
|
|
75
|
+
ignoreNextCancelSend = true;
|
|
76
|
+
elementPickerController.cancel();
|
|
77
|
+
ignoreNextCancelSend = false;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return () => {
|
|
81
|
+
unsub();
|
|
82
|
+
ignoreNextCancelSend = true;
|
|
83
|
+
elementPickerController.cancel();
|
|
84
|
+
ignoreNextCancelSend = false;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=elementPickerRelay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isPairingPushAckTimeout","elementPickerController","asRecord","payload","idempotencyKeyOf","key","length","resultPayload","result","idempotency_key","ok","autoData","text","screenshot","dataUrl","width","height","targetX1","targetY1","targetX2","targetY2","bindElementPickerRelay","engine","onRelay","sendRelay","undefined","ignoreNextCancelSend","sendResult","error","sendCancel","catch","unsub","event","beginSelection","requestId","onResult","onCancel","cancel"],"sourceRoot":"../../../src","sources":["pairing/elementPickerRelay.ts"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,qBAAqB;AAG7D,SACEC,uBAAuB,QAElB,yCAAsC;AAO7C,SAASC,QAAQA,CAACC,OAAgB,EAA2B;EAC3D,OAAOA,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,GAAIA,OAAO,GAA+B,CAAC,CAAC;AAC3F;AAEA,SAASC,gBAAgBA,CAACD,OAAgB,EAAiB;EACzD,MAAME,GAAG,GAAGH,QAAQ,CAACC,OAAO,CAAC,CAAC,iBAAiB,CAAC;EAChD,OAAO,OAAOE,GAAG,KAAK,QAAQ,IAAIA,GAAG,CAACC,MAAM,GAAG,CAAC,GAAGD,GAAG,GAAG,IAAI;AAC/D;AAEA,SAASE,aAAaA,CAACF,GAAW,EAAEG,MAA2B,EAA2B;EACxF,OAAO;IACLC,eAAe,EAAEJ,GAAG;IACpBK,EAAE,EAAE,IAAI;IACRC,QAAQ,EAAEH,MAAM,CAACG,QAAQ;IACzBC,IAAI,EAAEJ,MAAM,CAACI,IAAI,IAAI,IAAI;IACzB,IAAIJ,MAAM,CAACK,UAAU,GACjB;MACEA,UAAU,EAAE;QACVC,OAAO,EAAEN,MAAM,CAACK,UAAU,CAACC,OAAO;QAClCC,KAAK,EAAEP,MAAM,CAACK,UAAU,CAACE,KAAK;QAC9BC,MAAM,EAAER,MAAM,CAACK,UAAU,CAACG,MAAM;QAChCC,QAAQ,EAAET,MAAM,CAACK,UAAU,CAACI,QAAQ;QACpCC,QAAQ,EAAEV,MAAM,CAACK,UAAU,CAACK,QAAQ;QACpCC,QAAQ,EAAEX,MAAM,CAACK,UAAU,CAACM,QAAQ;QACpCC,QAAQ,EAAEZ,MAAM,CAACK,UAAU,CAACO;MAC9B;IACF,CAAC,GACD,CAAC,CAAC;EACR,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAACC,MAAgC,EAAc;EACnF,IAAI,OAAOA,MAAM,CAACC,OAAO,KAAK,UAAU,IAAI,OAAOD,MAAM,CAACE,SAAS,KAAK,UAAU,EAAE;IAClF,OAAO,MAAMC,SAAS;EACxB;EACA,IAAIC,oBAAoB,GAAG,KAAK;;EAEhC;EACA,MAAMC,UAAU,GAAG,MAAAA,CAAOtB,GAAW,EAAEG,MAA2B,KAAoB;IACpF,IAAI;MACF,MAAMc,MAAM,CAACE,SAAS,CAAC,qBAAqB,EAAEjB,aAAa,CAACF,GAAG,EAAEG,MAAM,CAAC,CAAC;IAC3E,CAAC,CAAC,OAAOoB,KAAK,EAAE;MACd,IAAI,OAAO5B,uBAAuB,KAAK,UAAU,IAAIA,uBAAuB,CAAC4B,KAAK,CAAC,EAAE;QACnF;MACF;MACA,MAAMA,KAAK;IACb;EACF,CAAC;;EAED;EACA,MAAMC,UAAU,GAAIxB,GAAW,IAAW;IACxC,KAAKiB,MAAM,CAACE,SAAS,CAAC,qBAAqB,EAAE;MAAEf,eAAe,EAAEJ;IAAI,CAAC,CAAC,CAACyB,KAAK,CAAC,MAAML,SAAS,CAAC;EAC/F,CAAC;EAED,MAAMM,KAAK,GAAGT,MAAM,CAACC,OAAO,CAAC,CAACS,KAAK,EAAE7B,OAAO,KAAK;IAC/C,IAAI6B,KAAK,KAAK,eAAe,EAAE;MAC7B,MAAM3B,GAAG,GAAGD,gBAAgB,CAACD,OAAO,CAAC;MACrC,IAAI,CAACE,GAAG,EAAE;MACVJ,uBAAuB,CAACgC,cAAc,CAAC;QACrCC,SAAS,EAAE7B,GAAG;QACd8B,QAAQ,EAAG3B,MAAM,IAAKmB,UAAU,CAACtB,GAAG,EAAEG,MAAM,CAAC;QAC7C4B,QAAQ,EAAEA,CAAA,KAAM;UACd,IAAIV,oBAAoB,EAAE;UAC1BG,UAAU,CAACxB,GAAG,CAAC;QACjB;MACF,CAAC,CAAC;MACF;IACF;IAEA,IAAI2B,KAAK,KAAK,qBAAqB,EAAE;MACnCN,oBAAoB,GAAG,IAAI;MAC3BzB,uBAAuB,CAACoC,MAAM,CAAC,CAAC;MAChCX,oBAAoB,GAAG,KAAK;IAC9B;EACF,CAAC,CAAC;EAEF,OAAO,MAAM;IACXK,KAAK,CAAC,CAAC;IACPL,oBAAoB,GAAG,IAAI;IAC3BzB,uBAAuB,CAACoC,MAAM,CAAC,CAAC;IAChCX,oBAAoB,GAAG,KAAK;EAC9B,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function isBannerVisible(state) {
|
|
4
|
+
if (!state.previewActive && state.status === 'idle') return false;
|
|
5
|
+
if (!state.previewActive && state.status !== 'token_expired' && state.status !== 'device_already_paired' && state.status !== 'error') {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
function shown(tone, label, numberOfLines = 1) {
|
|
11
|
+
return {
|
|
12
|
+
visible: true,
|
|
13
|
+
tone,
|
|
14
|
+
label,
|
|
15
|
+
numberOfLines
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Maps pairing-engine state onto the preview top-bar chrome.
|
|
21
|
+
* Pure: no React, so the nine-case table can be asserted without a renderer.
|
|
22
|
+
*/
|
|
23
|
+
export function resolvePreviewChrome(state) {
|
|
24
|
+
if (!isBannerVisible(state)) return {
|
|
25
|
+
visible: false
|
|
26
|
+
};
|
|
27
|
+
switch (state.status) {
|
|
28
|
+
case 'connecting':
|
|
29
|
+
return shown('default', 'Connecting to Builder…');
|
|
30
|
+
case 'reconnecting':
|
|
31
|
+
return shown('default', 'Reconnecting…');
|
|
32
|
+
case 'token_expired':
|
|
33
|
+
return shown('error', 'Pairing ended - rescan to continue', 2);
|
|
34
|
+
case 'device_already_paired':
|
|
35
|
+
return shown('error', 'Another device is already paired', 2);
|
|
36
|
+
case 'error':
|
|
37
|
+
if (state.pairingId === null) {
|
|
38
|
+
return shown('error', 'Preview unavailable');
|
|
39
|
+
}
|
|
40
|
+
return shown('error', 'Pairing ended - rescan to continue', 2);
|
|
41
|
+
default:
|
|
42
|
+
if (state.awaitingStartCondition) {
|
|
43
|
+
return shown('default', 'Waiting for auto-start condition…');
|
|
44
|
+
}
|
|
45
|
+
return shown('default', 'Preview mode');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=resolvePreviewChrome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isBannerVisible","state","previewActive","status","shown","tone","label","numberOfLines","visible","resolvePreviewChrome","pairingId","awaitingStartCondition"],"sourceRoot":"../../../src","sources":["pairing/resolvePreviewChrome.ts"],"mappings":";;AAQA,SAASA,eAAeA,CAACC,KAAyB,EAAW;EAC3D,IAAI,CAACA,KAAK,CAACC,aAAa,IAAID,KAAK,CAACE,MAAM,KAAK,MAAM,EAAE,OAAO,KAAK;EACjE,IACE,CAACF,KAAK,CAACC,aAAa,IACpBD,KAAK,CAACE,MAAM,KAAK,eAAe,IAChCF,KAAK,CAACE,MAAM,KAAK,uBAAuB,IACxCF,KAAK,CAACE,MAAM,KAAK,OAAO,EACxB;IACA,OAAO,KAAK;EACd;EACA,OAAO,IAAI;AACb;AAEA,SAASC,KAAKA,CACZC,IAAsB,EACtBC,KAAa,EACbC,aAAa,GAAG,CAAC,EAC0B;EAC3C,OAAO;IAAEC,OAAO,EAAE,IAAI;IAAEH,IAAI;IAAEC,KAAK;IAAEC;EAAc,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASE,oBAAoBA,CAACR,KAAyB,EAAiB;EAC7E,IAAI,CAACD,eAAe,CAACC,KAAK,CAAC,EAAE,OAAO;IAAEO,OAAO,EAAE;EAAM,CAAC;EAEtD,QAAQP,KAAK,CAACE,MAAM;IAClB,KAAK,YAAY;MACf,OAAOC,KAAK,CAAC,SAAS,EAAE,wBAAwB,CAAC;IACnD,KAAK,cAAc;MACjB,OAAOA,KAAK,CAAC,SAAS,EAAE,eAAe,CAAC;IAC1C,KAAK,eAAe;MAClB,OAAOA,KAAK,CAAC,OAAO,EAAE,oCAAoC,EAAE,CAAC,CAAC;IAChE,KAAK,uBAAuB;MAC1B,OAAOA,KAAK,CAAC,OAAO,EAAE,kCAAkC,EAAE,CAAC,CAAC;IAC9D,KAAK,OAAO;MACV,IAAIH,KAAK,CAACS,SAAS,KAAK,IAAI,EAAE;QAC5B,OAAON,KAAK,CAAC,OAAO,EAAE,qBAAqB,CAAC;MAC9C;MACA,OAAOA,KAAK,CAAC,OAAO,EAAE,oCAAoC,EAAE,CAAC,CAAC;IAChE;MACE,IAAIH,KAAK,CAACU,sBAAsB,EAAE;QAChC,OAAOP,KAAK,CAAC,SAAS,EAAE,mCAAmC,CAAC;MAC9D;MACA,OAAOA,KAAK,CAAC,SAAS,EAAE,cAAc,CAAC;EAC3C;AACF","ignoreList":[]}
|
|
@@ -6,14 +6,31 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
const STORAGE_KEY = 'userflow:pairingToken';
|
|
9
|
+
let cachedSecureStore;
|
|
10
|
+
|
|
11
|
+
/** Expo modules must be installed natively — not just the JS package. */
|
|
12
|
+
function isExpoModulesRuntimeAvailable() {
|
|
13
|
+
const expo = globalThis.expo;
|
|
14
|
+
return typeof expo?.EventEmitter === 'function';
|
|
15
|
+
}
|
|
9
16
|
function tryLoadExpoSecureStore() {
|
|
17
|
+
if (cachedSecureStore !== undefined) return cachedSecureStore;
|
|
18
|
+
if (typeof require !== 'function' || !isExpoModulesRuntimeAvailable()) {
|
|
19
|
+
cachedSecureStore = null;
|
|
20
|
+
return cachedSecureStore;
|
|
21
|
+
}
|
|
10
22
|
try {
|
|
11
23
|
// Optional peer — absent in bare RN without expo-secure-store.
|
|
12
24
|
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- optional peer at import time
|
|
13
|
-
|
|
25
|
+
cachedSecureStore = require('expo-secure-store');
|
|
14
26
|
} catch {
|
|
15
|
-
|
|
27
|
+
cachedSecureStore = null;
|
|
28
|
+
if (__DEV__) {
|
|
29
|
+
// eslint-disable-next-line no-console -- intentional missing-optional-peer diagnostic
|
|
30
|
+
console.warn('[Userflow] Optional peer expo-secure-store is unavailable; ' + 'pairing JWT persistence falls back to in-memory storage.');
|
|
31
|
+
}
|
|
16
32
|
}
|
|
33
|
+
return cachedSecureStore;
|
|
17
34
|
}
|
|
18
35
|
|
|
19
36
|
/** In-memory store used when SecureStore is unavailable (and in tests). */
|
|
@@ -62,4 +79,9 @@ export function createPairingTokenStore() {
|
|
|
62
79
|
}
|
|
63
80
|
};
|
|
64
81
|
}
|
|
82
|
+
|
|
83
|
+
/** @internal Resets module cache between tests. */
|
|
84
|
+
export function resetPairingTokenStoreCacheForTests() {
|
|
85
|
+
cachedSecureStore = undefined;
|
|
86
|
+
}
|
|
65
87
|
//# sourceMappingURL=tokenStorage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["STORAGE_KEY","tryLoadExpoSecureStore","require","createMemoryPairingTokenStore","value","get","set","token","clear","createPairingTokenStore","secure","getItemAsync","setItemAsync","deleteItemAsync"],"sourceRoot":"../../../src","sources":["pairing/tokenStorage.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,MAAMA,WAAW,GAAG,uBAAuB;AAc3C,SAASC,sBAAsBA,CAAA,EAA6B;EAC1D,IAAI;IACF;IACA;
|
|
1
|
+
{"version":3,"names":["STORAGE_KEY","cachedSecureStore","isExpoModulesRuntimeAvailable","expo","globalThis","EventEmitter","tryLoadExpoSecureStore","undefined","require","__DEV__","console","warn","createMemoryPairingTokenStore","value","get","set","token","clear","createPairingTokenStore","secure","getItemAsync","setItemAsync","deleteItemAsync","resetPairingTokenStoreCacheForTests"],"sourceRoot":"../../../src","sources":["pairing/tokenStorage.ts"],"mappings":";;AAAA;AACA;AACA;AACA;;AAEA,MAAMA,WAAW,GAAG,uBAAuB;AAc3C,IAAIC,iBAAuD;;AAE3D;AACA,SAASC,6BAA6BA,CAAA,EAAY;EAChD,MAAMC,IAAI,GAAIC,UAAU,CAA2CD,IAAI;EACvE,OAAO,OAAOA,IAAI,EAAEE,YAAY,KAAK,UAAU;AACjD;AAEA,SAASC,sBAAsBA,CAAA,EAA6B;EAC1D,IAAIL,iBAAiB,KAAKM,SAAS,EAAE,OAAON,iBAAiB;EAE7D,IAAI,OAAOO,OAAO,KAAK,UAAU,IAAI,CAACN,6BAA6B,CAAC,CAAC,EAAE;IACrED,iBAAiB,GAAG,IAAI;IACxB,OAAOA,iBAAiB;EAC1B;EAEA,IAAI;IACF;IACA;IACAA,iBAAiB,GAAGO,OAAO,CAAC,mBAAmB,CAAsB;EACvE,CAAC,CAAC,MAAM;IACNP,iBAAiB,GAAG,IAAI;IACxB,IAAIQ,OAAO,EAAE;MACX;MACAC,OAAO,CAACC,IAAI,CACV,6DAA6D,GAC3D,0DACJ,CAAC;IACH;EACF;EAEA,OAAOV,iBAAiB;AAC1B;;AAEA;AACA,OAAO,SAASW,6BAA6BA,CAAA,EAAsB;EACjE,IAAIC,KAAoB,GAAG,IAAI;EAC/B,OAAO;IACL,MAAMC,GAAGA,CAAA,EAAG;MACV,OAAOD,KAAK;IACd,CAAC;IACD,MAAME,GAAGA,CAACC,KAAa,EAAE;MACvBH,KAAK,GAAGG,KAAK;IACf,CAAC;IACD,MAAMC,KAAKA,CAAA,EAAG;MACZJ,KAAK,GAAG,IAAI;IACd;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA,OAAO,SAASK,uBAAuBA,CAAA,EAAsB;EAC3D,MAAMC,MAAM,GAAGb,sBAAsB,CAAC,CAAC;EACvC,IAAI,CAACa,MAAM,EAAE,OAAOP,6BAA6B,CAAC,CAAC;EAEnD,OAAO;IACL,MAAME,GAAGA,CAAA,EAAG;MACV,IAAI;QACF,OAAO,MAAMK,MAAM,CAACC,YAAY,CAACpB,WAAW,CAAC;MAC/C,CAAC,CAAC,MAAM;QACN,OAAO,IAAI;MACb;IACF,CAAC;IACD,MAAMe,GAAGA,CAACC,KAAa,EAAE;MACvB,IAAI;QACF,MAAMG,MAAM,CAACE,YAAY,CAACrB,WAAW,EAAEgB,KAAK,CAAC;MAC/C,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ,CAAC;IACD,MAAMC,KAAKA,CAAA,EAAG;MACZ,IAAI;QACF,MAAME,MAAM,CAACG,eAAe,CAACtB,WAAW,CAAC;MAC3C,CAAC,CAAC,MAAM;QACN;MAAA;IAEJ;EACF,CAAC;AACH;;AAEA;AACA,OAAO,SAASuB,mCAAmCA,CAAA,EAAS;EAC1DtB,iBAAiB,GAAGM,SAAS;AAC/B","ignoreList":[]}
|
|
@@ -9,7 +9,9 @@ const IDLE = {
|
|
|
9
9
|
previewActive: false,
|
|
10
10
|
lastError: null,
|
|
11
11
|
needsRescan: false,
|
|
12
|
-
awaitingStartCondition: false
|
|
12
|
+
awaitingStartCondition: false,
|
|
13
|
+
canRestartPreview: false,
|
|
14
|
+
previewRestartGeneration: 0
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
/** Subscribe to Builder pairing / preview-mode state (dev builds only). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","onPairingController","peekPairingController","IDLE","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","usePairingState","state","setState","useState","getState","useEffect","unsubState","bind","controller","onStateChange","existing","unsubInstall"],"sourceRoot":"../../../src","sources":["pairing/usePairingState.ts"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ,qBAAkB;AAE7E,MAAMC,IAAwB,GAAG;EAC/BC,MAAM,EAAE,MAAM;EACdC,SAAS,EAAE,IAAI;EACfC,QAAQ,EAAE,IAAI;EACdC,aAAa,EAAE,KAAK;EACpBC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE,KAAK;EAClBC,sBAAsB,EAAE;
|
|
1
|
+
{"version":3,"names":["React","onPairingController","peekPairingController","IDLE","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","usePairingState","state","setState","useState","getState","useEffect","unsubState","bind","controller","onStateChange","existing","unsubInstall"],"sourceRoot":"../../../src","sources":["pairing/usePairingState.ts"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,mBAAmB,EAAEC,qBAAqB,QAAQ,qBAAkB;AAE7E,MAAMC,IAAwB,GAAG;EAC/BC,MAAM,EAAE,MAAM;EACdC,SAAS,EAAE,IAAI;EACfC,QAAQ,EAAE,IAAI;EACdC,aAAa,EAAE,KAAK;EACpBC,SAAS,EAAE,IAAI;EACfC,WAAW,EAAE,KAAK;EAClBC,sBAAsB,EAAE,KAAK;EAC7BC,iBAAiB,EAAE,KAAK;EACxBC,wBAAwB,EAAE;AAC5B,CAAC;;AAED;AACA,OAAO,SAASC,eAAeA,CAAA,EAAuB;EACpD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGf,KAAK,CAACgB,QAAQ,CACtC,MAAMd,qBAAqB,CAAC,CAAC,EAAEe,QAAQ,CAAC,CAAC,IAAId,IAC/C,CAAC;EAEDH,KAAK,CAACkB,SAAS,CAAC,MAAM;IACpB,IAAIC,UAAoC;IAExC,MAAMC,IAAI,GAAIC,UAA6B,IAAK;MAC9CF,UAAU,GAAG,CAAC;MACdJ,QAAQ,CAACM,UAAU,CAACJ,QAAQ,CAAC,CAAC,CAAC;MAC/BE,UAAU,GAAGE,UAAU,CAACC,aAAa,CAACP,QAAQ,CAAC;IACjD,CAAC;IAED,MAAMQ,QAAQ,GAAGrB,qBAAqB,CAAC,CAAC;IACxC,IAAIqB,QAAQ,EAAEH,IAAI,CAACG,QAAQ,CAAC;IAC5B,MAAMC,YAAY,GAAGvB,mBAAmB,CAACmB,IAAI,CAAC;IAE9C,OAAO,MAAM;MACXI,YAAY,CAAC,CAAC;MACdL,UAAU,GAAG,CAAC;IAChB,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOL,KAAK;AACd","ignoreList":[]}
|
|
@@ -6,47 +6,71 @@ import { ModalSurface } from "../surfaces/ModalSurface.js";
|
|
|
6
6
|
import { TooltipSurface } from "../surfaces/TooltipSurface.js";
|
|
7
7
|
import { FlowSurfaceFade } from "./FlowSurfaceFade.js";
|
|
8
8
|
import { useFlowSessionState } from "./useFlowSessionState.js";
|
|
9
|
+
|
|
10
|
+
/** Everything a surface needs for one step, so the fade can hold it during an exit. */
|
|
9
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
12
|
function appearanceOf(step) {
|
|
11
13
|
return String(step.appearance).toUpperCase();
|
|
12
14
|
}
|
|
15
|
+
function renderSurface(engine, {
|
|
16
|
+
appearance,
|
|
17
|
+
resetNonce,
|
|
18
|
+
...surfaceProps
|
|
19
|
+
}) {
|
|
20
|
+
return appearance === 'TOOLTIP' ? /*#__PURE__*/_jsx(TooltipSurface, {
|
|
21
|
+
engine: engine,
|
|
22
|
+
resetNonce: resetNonce,
|
|
23
|
+
...surfaceProps
|
|
24
|
+
}) : /*#__PURE__*/_jsx(ModalSurface, {
|
|
25
|
+
engine: engine,
|
|
26
|
+
...surfaceProps
|
|
27
|
+
});
|
|
28
|
+
}
|
|
13
29
|
|
|
14
30
|
/**
|
|
15
31
|
* Renders the active flow step.
|
|
16
32
|
*
|
|
17
|
-
* TOOLTIP → {@link TooltipSurface};
|
|
18
|
-
*
|
|
33
|
+
* TOOLTIP → {@link TooltipSurface}; HIDDEN → nothing (session and triggers
|
|
34
|
+
* stay active); everything else → {@link ModalSurface} (BUBBLE remains a
|
|
35
|
+
* centered-card fallback until a dedicated surface).
|
|
19
36
|
*/
|
|
20
37
|
export function FlowRenderer({
|
|
21
|
-
engine
|
|
38
|
+
engine,
|
|
39
|
+
previewRestartGeneration = 0
|
|
22
40
|
}) {
|
|
23
41
|
const {
|
|
24
42
|
session,
|
|
25
|
-
currentStep
|
|
43
|
+
currentStep,
|
|
44
|
+
stepShowNonce
|
|
26
45
|
} = useFlowSessionState(engine);
|
|
27
46
|
const lookupAttribute = React.useMemo(() => genSessionDataLookup(session?.data ?? []), [session?.data]);
|
|
28
47
|
if (!session || !currentStep) {
|
|
29
48
|
return null;
|
|
30
49
|
}
|
|
31
|
-
const theme = currentStep.theme ?? session.version.theme;
|
|
32
50
|
const appearance = appearanceOf(currentStep);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
lookupAttribute: lookupAttribute
|
|
46
|
-
});
|
|
51
|
+
// No chrome, and no FlowSurfaceFade: its exit blocker would intercept the
|
|
52
|
+
// in-app tap a hidden step is waiting for.
|
|
53
|
+
if (appearance === 'HIDDEN') {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
// Step+appearance only: session identity is the React key below so a new
|
|
57
|
+
// flow remounts the fade instead of holding the outgoing flow for CARD_EXIT_MS
|
|
58
|
+
// (that hold is what made a START_FLOW replacement look like two flows).
|
|
59
|
+
// `resetNonce` is frozen with the shown step so an exiting card does not
|
|
60
|
+
// re-resolve; it is not part of animationKey (that would fade the same step).
|
|
61
|
+
const animationKey = `${currentStep.id}:${appearance}`;
|
|
62
|
+
const resetNonce = previewRestartGeneration + stepShowNonce;
|
|
47
63
|
return /*#__PURE__*/_jsx(FlowSurfaceFade, {
|
|
48
64
|
animationKey: animationKey,
|
|
49
|
-
|
|
50
|
-
|
|
65
|
+
step: {
|
|
66
|
+
appearance,
|
|
67
|
+
session,
|
|
68
|
+
currentStep,
|
|
69
|
+
theme: currentStep.theme ?? session.version.theme,
|
|
70
|
+
lookupAttribute,
|
|
71
|
+
resetNonce
|
|
72
|
+
},
|
|
73
|
+
children: shown => renderSurface(engine, shown)
|
|
74
|
+
}, session.id);
|
|
51
75
|
}
|
|
52
76
|
//# sourceMappingURL=FlowRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["genSessionDataLookup","React","ModalSurface","TooltipSurface","FlowSurfaceFade","useFlowSessionState","jsx","_jsx","appearanceOf","step","String","appearance","toUpperCase","
|
|
1
|
+
{"version":3,"names":["genSessionDataLookup","React","ModalSurface","TooltipSurface","FlowSurfaceFade","useFlowSessionState","jsx","_jsx","appearanceOf","step","String","appearance","toUpperCase","renderSurface","engine","resetNonce","surfaceProps","FlowRenderer","previewRestartGeneration","session","currentStep","stepShowNonce","lookupAttribute","useMemo","data","animationKey","id","theme","version","children","shown"],"sourceRoot":"../../../src","sources":["runtime/FlowRenderer.tsx"],"mappings":";;AAAA,SAASA,oBAAoB,QAAQ,qBAAqB;AAE1D,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,YAAY,QAAQ,6BAA0B;AACvD,SAASC,cAAc,QAAQ,+BAA4B;AAE3D,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,mBAAmB,QAAQ,0BAAuB;;AAU3D;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAGA,SAASC,YAAYA,CAACC,IAA6B,EAAU;EAC3D,OAAOC,MAAM,CAACD,IAAI,CAACE,UAAU,CAAC,CAACC,WAAW,CAAC,CAAC;AAC9C;AAEA,SAASC,aAAaA,CACpBC,MAAyB,EACzB;EAAEH,UAAU;EAAEI,UAAU;EAAE,GAAGC;AAAyB,CAAC,EACnC;EACpB,OAAOL,UAAU,KAAK,SAAS,gBAC7BJ,IAAA,CAACJ,cAAc;IAACW,MAAM,EAAEA,MAAO;IAACC,UAAU,EAAEA,UAAW;IAAA,GAAKC;EAAY,CAAG,CAAC,gBAE5ET,IAAA,CAACL,YAAY;IAACY,MAAM,EAAEA,MAAO;IAAA,GAAKE;EAAY,CAAG,CAClD;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAC;EAC3BH,MAAM;EACNI,wBAAwB,GAAG;AACV,CAAC,EAA6B;EAC/C,MAAM;IAAEC,OAAO;IAAEC,WAAW;IAAEC;EAAc,CAAC,GAAGhB,mBAAmB,CAACS,MAAM,CAAC;EAC3E,MAAMQ,eAAe,GAAGrB,KAAK,CAACsB,OAAO,CACnC,MAAMvB,oBAAoB,CAACmB,OAAO,EAAEK,IAAI,IAAI,EAAE,CAAC,EAC/C,CAACL,OAAO,EAAEK,IAAI,CAChB,CAAC;EAED,IAAI,CAACL,OAAO,IAAI,CAACC,WAAW,EAAE;IAC5B,OAAO,IAAI;EACb;EAEA,MAAMT,UAAU,GAAGH,YAAY,CAACY,WAAW,CAAC;EAC5C;EACA;EACA,IAAIT,UAAU,KAAK,QAAQ,EAAE;IAC3B,OAAO,IAAI;EACb;EACA;EACA;EACA;EACA;EACA;EACA,MAAMc,YAAY,GAAG,GAAGL,WAAW,CAACM,EAAE,IAAIf,UAAU,EAAE;EACtD,MAAMI,UAAU,GAAGG,wBAAwB,GAAGG,aAAa;EAE3D,oBACEd,IAAA,CAACH,eAAe;IAEdqB,YAAY,EAAEA,YAAa;IAC3BhB,IAAI,EAAE;MACJE,UAAU;MACVQ,OAAO;MACPC,WAAW;MACXO,KAAK,EAAEP,WAAW,CAACO,KAAK,IAAIR,OAAO,CAACS,OAAO,CAACD,KAAK;MACjDL,eAAe;MACfP;IACF,CAAE;IAAAc,QAAA,EAEAC,KAAK,IAAKjB,aAAa,CAACC,MAAM,EAAEgB,KAAK;EAAC,GAXnCX,OAAO,CAACO,EAYE,CAAC;AAEtB","ignoreList":[]}
|
|
@@ -1,43 +1,66 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { ABSOLUTE_FILL } from "../surfaces/absoluteFill.js";
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import { CARD_EXIT_MS, CardTransitionProvider } from "../surfaces/cardTransition.js";
|
|
7
|
+
import { getSurfaceInteractionBlocking } from "../surfaces/surfaceInteractionConfig.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* Crossfades flow surfaces on step changes: the outgoing card fades out, then
|
|
11
|
+
* the incoming step mounts and fades in — no cut, no flash at full opacity.
|
|
12
|
+
* Cards animate themselves off the phase published here (see `useCardOpacity`),
|
|
13
|
+
* which keeps backdrops and cutouts steady across the swap.
|
|
14
|
+
*
|
|
15
|
+
* The outgoing step keeps rendering from `step` captured at the last swap, so
|
|
16
|
+
* the surface is not remounted mid-exit (a remount would re-resolve anchors and
|
|
17
|
+
* flash the tooltip's waiting state).
|
|
18
|
+
*
|
|
19
|
+
* A new flow remounts this component (`key={session.id}` in FlowRenderer) so
|
|
20
|
+
* the outgoing flow is not held across a START_FLOW replacement.
|
|
21
|
+
*
|
|
22
|
+
* Exit on flow end unmounts immediately: the surface is gone as soon as the
|
|
23
|
+
* session is cleared.
|
|
12
24
|
*/
|
|
13
25
|
export function FlowSurfaceFade({
|
|
14
|
-
|
|
15
|
-
|
|
26
|
+
animationKey,
|
|
27
|
+
step,
|
|
28
|
+
children
|
|
16
29
|
}) {
|
|
17
|
-
const
|
|
30
|
+
const [shownKey, setShownKey] = React.useState(animationKey);
|
|
31
|
+
const exiting = shownKey !== animationKey;
|
|
32
|
+
const shownStep = React.useRef(step);
|
|
33
|
+
if (!exiting) {
|
|
34
|
+
shownStep.current = step;
|
|
35
|
+
}
|
|
18
36
|
React.useEffect(() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
});
|
|
25
|
-
animation.start();
|
|
37
|
+
if (!exiting) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const timer = setTimeout(() => {
|
|
41
|
+
setShownKey(animationKey);
|
|
42
|
+
}, CARD_EXIT_MS);
|
|
26
43
|
return () => {
|
|
27
|
-
|
|
44
|
+
clearTimeout(timer);
|
|
28
45
|
};
|
|
29
|
-
}, [animationKey,
|
|
30
|
-
|
|
46
|
+
}, [animationKey, exiting]);
|
|
47
|
+
const blockInteraction = getSurfaceInteractionBlocking();
|
|
48
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
31
49
|
testID: "userflow-surface-fade",
|
|
32
|
-
style:
|
|
33
|
-
opacity
|
|
34
|
-
}],
|
|
50
|
+
style: styles.fill,
|
|
35
51
|
pointerEvents: "box-none",
|
|
36
|
-
children: /*#__PURE__*/_jsx(View, {
|
|
52
|
+
children: [exiting && blockInteraction ? /*#__PURE__*/_jsx(View, {
|
|
53
|
+
testID: "userflow-surface-exit-blocker",
|
|
54
|
+
style: styles.fill,
|
|
55
|
+
pointerEvents: "auto"
|
|
56
|
+
}) : null, /*#__PURE__*/_jsx(View, {
|
|
37
57
|
style: styles.fill,
|
|
38
|
-
pointerEvents:
|
|
39
|
-
children:
|
|
40
|
-
|
|
58
|
+
pointerEvents: exiting ? 'none' : 'box-none',
|
|
59
|
+
children: /*#__PURE__*/_jsx(CardTransitionProvider, {
|
|
60
|
+
value: exiting ? 'exiting' : 'entering',
|
|
61
|
+
children: children(shownStep.current)
|
|
62
|
+
})
|
|
63
|
+
})]
|
|
41
64
|
});
|
|
42
65
|
}
|
|
43
66
|
const styles = StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","ABSOLUTE_FILL","CARD_EXIT_MS","CardTransitionProvider","getSurfaceInteractionBlocking","jsx","_jsx","jsxs","_jsxs","FlowSurfaceFade","animationKey","step","children","shownKey","setShownKey","useState","exiting","shownStep","useRef","current","useEffect","timer","setTimeout","clearTimeout","blockInteraction","testID","style","styles","fill","pointerEvents","value","create"],"sourceRoot":"../../../src","sources":["runtime/FlowSurfaceFade.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,SAASC,aAAa,QAAQ,6BAA0B;AACxD,SAASC,YAAY,EAAEC,sBAAsB,QAAQ,+BAA4B;AACjF,SAASC,6BAA6B,QAAQ,yCAAsC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUrF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAQ;EACrCC,YAAY;EACZC,IAAI;EACJC;AAC2B,CAAC,EAAsB;EAClD,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAGhB,KAAK,CAACiB,QAAQ,CAACL,YAAY,CAAC;EAC5D,MAAMM,OAAO,GAAGH,QAAQ,KAAKH,YAAY;EACzC,MAAMO,SAAS,GAAGnB,KAAK,CAACoB,MAAM,CAACP,IAAI,CAAC;EACpC,IAAI,CAACK,OAAO,EAAE;IACZC,SAAS,CAACE,OAAO,GAAGR,IAAI;EAC1B;EAEAb,KAAK,CAACsB,SAAS,CAAC,MAAM;IACpB,IAAI,CAACJ,OAAO,EAAE;MACZ;IACF;IACA,MAAMK,KAAK,GAAGC,UAAU,CAAC,MAAM;MAC7BR,WAAW,CAACJ,YAAY,CAAC;IAC3B,CAAC,EAAER,YAAY,CAAC;IAChB,OAAO,MAAM;MACXqB,YAAY,CAACF,KAAK,CAAC;IACrB,CAAC;EACH,CAAC,EAAE,CAACX,YAAY,EAAEM,OAAO,CAAC,CAAC;EAE3B,MAAMQ,gBAAgB,GAAGpB,6BAA6B,CAAC,CAAC;EAExD,oBACEI,KAAA,CAACR,IAAI;IAACyB,MAAM,EAAC,uBAAuB;IAACC,KAAK,EAAEC,MAAM,CAACC,IAAK;IAACC,aAAa,EAAC,UAAU;IAAAjB,QAAA,GAC9EI,OAAO,IAAIQ,gBAAgB,gBAC1BlB,IAAA,CAACN,IAAI;MAACyB,MAAM,EAAC,+BAA+B;MAACC,KAAK,EAAEC,MAAM,CAACC,IAAK;MAACC,aAAa,EAAC;IAAM,CAAE,CAAC,GACtF,IAAI,eACRvB,IAAA,CAACN,IAAI;MAAC0B,KAAK,EAAEC,MAAM,CAACC,IAAK;MAACC,aAAa,EAAEb,OAAO,GAAG,MAAM,GAAG,UAAW;MAAAJ,QAAA,eACrEN,IAAA,CAACH,sBAAsB;QAAC2B,KAAK,EAAEd,OAAO,GAAG,SAAS,GAAG,UAAW;QAAAJ,QAAA,EAC7DA,QAAQ,CAACK,SAAS,CAACE,OAAO;MAAC,CACN;IAAC,CACrB,CAAC;EAAA,CACH,CAAC;AAEX;AAEA,MAAMQ,MAAM,GAAG5B,UAAU,CAACgC,MAAM,CAAC;EAC/BH,IAAI,EAAE;IACJ,GAAG3B;EACL;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,65 +3,34 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { targetPressMonitor } from "../anchors/targetPressMonitor.js";
|
|
6
|
+
import { changedTouchPoints, forEachChangedTouch } from "./changedTouchPoints.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
/**
|
|
8
|
-
* Touches that just started/ended/cancelled for this event. Prefer
|
|
9
|
-
* `changedTouches` so multi-touch uses the finger(s) that actually changed —
|
|
10
|
-
* `touches[0]` may be an already-active finger. Each touch carries `identifier`
|
|
11
|
-
* so the monitor can pair start/end per finger.
|
|
12
|
-
*/
|
|
13
|
-
function changedTouchPoints(event) {
|
|
14
|
-
const {
|
|
15
|
-
changedTouches,
|
|
16
|
-
touches,
|
|
17
|
-
identifier,
|
|
18
|
-
pageX,
|
|
19
|
-
pageY
|
|
20
|
-
} = event.nativeEvent;
|
|
21
|
-
if (changedTouches && changedTouches.length > 0) {
|
|
22
|
-
return changedTouches.map(touch => ({
|
|
23
|
-
identifier: touch.identifier,
|
|
24
|
-
pageX: touch.pageX,
|
|
25
|
-
pageY: touch.pageY
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
if (touches && touches.length > 0) {
|
|
29
|
-
const touch = touches[touches.length - 1];
|
|
30
|
-
return [{
|
|
31
|
-
identifier: touch.identifier,
|
|
32
|
-
pageX: touch.pageX,
|
|
33
|
-
pageY: touch.pageY
|
|
34
|
-
}];
|
|
35
|
-
}
|
|
36
|
-
return [{
|
|
37
|
-
identifier: identifier ?? 0,
|
|
38
|
-
pageX,
|
|
39
|
-
pageY
|
|
40
|
-
}];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
8
|
/**
|
|
44
9
|
* Wraps app content so tooltip target taps can be observed without stealing
|
|
45
|
-
* them from the underlying control (web parity: click listener, no
|
|
10
|
+
* them from the underlying control (web parity: click listener, no
|
|
11
|
+
* preventDefault).
|
|
46
12
|
*
|
|
47
13
|
* The Userflow overlay is a sibling above the app, so hole Pressables would
|
|
48
14
|
* intercept presses. Instead we hit-test bubbled `onTouchStart` / `onTouchEnd`
|
|
49
15
|
* against the rect registered by {@link TooltipSurface}.
|
|
50
16
|
*
|
|
17
|
+
* Preview-chrome double taps are observed by `DoubleTapBridge` around the
|
|
18
|
+
* whole provider tree — this bridge never sees overlay touches.
|
|
19
|
+
*
|
|
51
20
|
* Does not claim the gesture responder.
|
|
52
21
|
*/
|
|
53
22
|
export function TargetPressBridge({
|
|
54
23
|
children
|
|
55
24
|
}) {
|
|
56
25
|
const onTouchStart = React.useCallback(event => {
|
|
57
|
-
|
|
58
|
-
targetPressMonitor.handleTouchStart(
|
|
59
|
-
}
|
|
26
|
+
forEachChangedTouch(event, (identifier, pageX, pageY) => {
|
|
27
|
+
targetPressMonitor.handleTouchStart(identifier, pageX, pageY);
|
|
28
|
+
});
|
|
60
29
|
}, []);
|
|
61
30
|
const onTouchEnd = React.useCallback(event => {
|
|
62
|
-
|
|
63
|
-
targetPressMonitor.handleTouchEnd(
|
|
64
|
-
}
|
|
31
|
+
forEachChangedTouch(event, (identifier, pageX, pageY) => {
|
|
32
|
+
targetPressMonitor.handleTouchEnd(identifier, pageX, pageY);
|
|
33
|
+
});
|
|
65
34
|
}, []);
|
|
66
35
|
const onTouchCancel = React.useCallback(event => {
|
|
67
36
|
const points = changedTouchPoints(event);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","targetPressMonitor","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","targetPressMonitor","changedTouchPoints","forEachChangedTouch","jsx","_jsx","TargetPressBridge","children","onTouchStart","useCallback","event","identifier","pageX","pageY","handleTouchStart","onTouchEnd","handleTouchEnd","onTouchCancel","points","length","cancelTouch","touch","style","styles","root","collapsable","testID","create","flex"],"sourceRoot":"../../../src","sources":["runtime/TargetPressBridge.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,QAAoC,cAAc;AAE3E,SAASC,kBAAkB,QAAQ,kCAA+B;AAElE,SAASC,kBAAkB,EAAEC,mBAAmB,QAAQ,yBAAsB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAC;EAAEC;AAAiC,CAAC,EAAsB;EAC1F,MAAMC,YAAY,GAAGV,KAAK,CAACW,WAAW,CAAEC,KAA4B,IAAK;IACvEP,mBAAmB,CAACO,KAAK,EAAE,CAACC,UAAU,EAAEC,KAAK,EAAEC,KAAK,KAAK;MACvDZ,kBAAkB,CAACa,gBAAgB,CAACH,UAAU,EAAEC,KAAK,EAAEC,KAAK,CAAC;IAC/D,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,UAAU,GAAGjB,KAAK,CAACW,WAAW,CAAEC,KAA4B,IAAK;IACrEP,mBAAmB,CAACO,KAAK,EAAE,CAACC,UAAU,EAAEC,KAAK,EAAEC,KAAK,KAAK;MACvDZ,kBAAkB,CAACe,cAAc,CAACL,UAAU,EAAEC,KAAK,EAAEC,KAAK,CAAC;IAC7D,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMI,aAAa,GAAGnB,KAAK,CAACW,WAAW,CAAEC,KAA4B,IAAK;IACxE,MAAMQ,MAAM,GAAGhB,kBAAkB,CAACQ,KAAK,CAAC;IACxC,IAAIQ,MAAM,CAACC,MAAM,KAAK,CAAC,EAAE;MACvBlB,kBAAkB,CAACmB,WAAW,CAAC,CAAC;MAChC;IACF;IACA,KAAK,MAAMC,KAAK,IAAIH,MAAM,EAAE;MAC1BjB,kBAAkB,CAACmB,WAAW,CAACC,KAAK,CAACV,UAAU,CAAC;IAClD;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,oBACEN,IAAA,CAACL,IAAI;IACHsB,KAAK,EAAEC,MAAM,CAACC,IAAK;IACnBC,WAAW,EAAE,KAAM;IACnBjB,YAAY,EAAEA,YAAa;IAC3BO,UAAU,EAAEA,UAAW;IACvBE,aAAa,EAAEA,aAAc;IAC7BS,MAAM,EAAC,8BAA8B;IAAAnB,QAAA,EAEpCA;EAAQ,CACL,CAAC;AAEX;AAEA,MAAMgB,MAAM,GAAGxB,UAAU,CAAC4B,MAAM,CAAC;EAC/BH,IAAI,EAAE;IACJI,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|