@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,57 @@
|
|
|
1
|
+
import type { PairingEngineState } from '@userflow-tech/core';
|
|
2
|
+
|
|
3
|
+
import type { ChromeTopBarTone } from '../authoring/chrome/ChromeTopBar';
|
|
4
|
+
|
|
5
|
+
export type PreviewChrome =
|
|
6
|
+
| { visible: false }
|
|
7
|
+
| { visible: true; tone: ChromeTopBarTone; label: string; numberOfLines: number };
|
|
8
|
+
|
|
9
|
+
function isBannerVisible(state: PairingEngineState): boolean {
|
|
10
|
+
if (!state.previewActive && state.status === 'idle') return false;
|
|
11
|
+
if (
|
|
12
|
+
!state.previewActive &&
|
|
13
|
+
state.status !== 'token_expired' &&
|
|
14
|
+
state.status !== 'device_already_paired' &&
|
|
15
|
+
state.status !== 'error'
|
|
16
|
+
) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function shown(
|
|
23
|
+
tone: ChromeTopBarTone,
|
|
24
|
+
label: string,
|
|
25
|
+
numberOfLines = 1,
|
|
26
|
+
): Extract<PreviewChrome, { visible: true }> {
|
|
27
|
+
return { visible: true, tone, label, numberOfLines };
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Maps pairing-engine state onto the preview top-bar chrome.
|
|
32
|
+
* Pure: no React, so the nine-case table can be asserted without a renderer.
|
|
33
|
+
*/
|
|
34
|
+
export function resolvePreviewChrome(state: PairingEngineState): PreviewChrome {
|
|
35
|
+
if (!isBannerVisible(state)) return { visible: false };
|
|
36
|
+
|
|
37
|
+
switch (state.status) {
|
|
38
|
+
case 'connecting':
|
|
39
|
+
return shown('default', 'Connecting to Builder…');
|
|
40
|
+
case 'reconnecting':
|
|
41
|
+
return shown('default', 'Reconnecting…');
|
|
42
|
+
case 'token_expired':
|
|
43
|
+
return shown('error', 'Pairing ended - rescan to continue', 2);
|
|
44
|
+
case 'device_already_paired':
|
|
45
|
+
return shown('error', 'Another device is already paired', 2);
|
|
46
|
+
case 'error':
|
|
47
|
+
if (state.pairingId === null) {
|
|
48
|
+
return shown('error', 'Preview unavailable');
|
|
49
|
+
}
|
|
50
|
+
return shown('error', 'Pairing ended - rescan to continue', 2);
|
|
51
|
+
default:
|
|
52
|
+
if (state.awaitingStartCondition) {
|
|
53
|
+
return shown('default', 'Waiting for auto-start condition…');
|
|
54
|
+
}
|
|
55
|
+
return shown('default', 'Preview mode');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -17,14 +17,38 @@ type SecureStoreModule = {
|
|
|
17
17
|
deleteItemAsync(key: string): Promise<void>;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
let cachedSecureStore: SecureStoreModule | null | undefined;
|
|
21
|
+
|
|
22
|
+
/** Expo modules must be installed natively — not just the JS package. */
|
|
23
|
+
function isExpoModulesRuntimeAvailable(): boolean {
|
|
24
|
+
const expo = (globalThis as { expo?: { EventEmitter?: unknown } }).expo;
|
|
25
|
+
return typeof expo?.EventEmitter === 'function';
|
|
26
|
+
}
|
|
27
|
+
|
|
20
28
|
function tryLoadExpoSecureStore(): SecureStoreModule | null {
|
|
29
|
+
if (cachedSecureStore !== undefined) return cachedSecureStore;
|
|
30
|
+
|
|
31
|
+
if (typeof require !== 'function' || !isExpoModulesRuntimeAvailable()) {
|
|
32
|
+
cachedSecureStore = null;
|
|
33
|
+
return cachedSecureStore;
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
try {
|
|
22
37
|
// Optional peer — absent in bare RN without expo-secure-store.
|
|
23
38
|
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- optional peer at import time
|
|
24
|
-
|
|
39
|
+
cachedSecureStore = require('expo-secure-store') as SecureStoreModule;
|
|
25
40
|
} catch {
|
|
26
|
-
|
|
41
|
+
cachedSecureStore = null;
|
|
42
|
+
if (__DEV__) {
|
|
43
|
+
// eslint-disable-next-line no-console -- intentional missing-optional-peer diagnostic
|
|
44
|
+
console.warn(
|
|
45
|
+
'[Userflow] Optional peer expo-secure-store is unavailable; ' +
|
|
46
|
+
'pairing JWT persistence falls back to in-memory storage.',
|
|
47
|
+
);
|
|
48
|
+
}
|
|
27
49
|
}
|
|
50
|
+
|
|
51
|
+
return cachedSecureStore;
|
|
28
52
|
}
|
|
29
53
|
|
|
30
54
|
/** In-memory store used when SecureStore is unavailable (and in tests). */
|
|
@@ -74,3 +98,8 @@ export function createPairingTokenStore(): PairingTokenStore {
|
|
|
74
98
|
},
|
|
75
99
|
};
|
|
76
100
|
}
|
|
101
|
+
|
|
102
|
+
/** @internal Resets module cache between tests. */
|
|
103
|
+
export function resetPairingTokenStoreCacheForTests(): void {
|
|
104
|
+
cachedSecureStore = undefined;
|
|
105
|
+
}
|
|
@@ -12,6 +12,8 @@ const IDLE: PairingEngineState = {
|
|
|
12
12
|
lastError: null,
|
|
13
13
|
needsRescan: false,
|
|
14
14
|
awaitingStartCondition: false,
|
|
15
|
+
canRestartPreview: false,
|
|
16
|
+
previewRestartGeneration: 0,
|
|
15
17
|
};
|
|
16
18
|
|
|
17
19
|
/** Subscribe to Builder pairing / preview-mode state (dev builds only). */
|
|
@@ -10,20 +10,42 @@ import { useFlowSessionState } from './useFlowSessionState';
|
|
|
10
10
|
|
|
11
11
|
export interface FlowRendererProps {
|
|
12
12
|
engine: FlowSessionEngine;
|
|
13
|
+
/** Pairing preview restart counter; combined with stepShowNonce as resetNonce. */
|
|
14
|
+
previewRestartGeneration?: number;
|
|
13
15
|
}
|
|
14
16
|
|
|
17
|
+
type SurfaceProps = React.ComponentProps<typeof ModalSurface>;
|
|
18
|
+
|
|
19
|
+
/** Everything a surface needs for one step, so the fade can hold it during an exit. */
|
|
20
|
+
type StepRender = Omit<SurfaceProps, 'engine'> & { appearance: string; resetNonce: number };
|
|
21
|
+
|
|
15
22
|
function appearanceOf(step: { appearance: unknown }): string {
|
|
16
23
|
return String(step.appearance).toUpperCase();
|
|
17
24
|
}
|
|
18
25
|
|
|
26
|
+
function renderSurface(
|
|
27
|
+
engine: FlowSessionEngine,
|
|
28
|
+
{ appearance, resetNonce, ...surfaceProps }: StepRender,
|
|
29
|
+
): React.ReactElement {
|
|
30
|
+
return appearance === 'TOOLTIP' ? (
|
|
31
|
+
<TooltipSurface engine={engine} resetNonce={resetNonce} {...surfaceProps} />
|
|
32
|
+
) : (
|
|
33
|
+
<ModalSurface engine={engine} {...surfaceProps} />
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
19
37
|
/**
|
|
20
38
|
* Renders the active flow step.
|
|
21
39
|
*
|
|
22
|
-
* TOOLTIP → {@link TooltipSurface};
|
|
23
|
-
*
|
|
40
|
+
* TOOLTIP → {@link TooltipSurface}; HIDDEN → nothing (session and triggers
|
|
41
|
+
* stay active); everything else → {@link ModalSurface} (BUBBLE remains a
|
|
42
|
+
* centered-card fallback until a dedicated surface).
|
|
24
43
|
*/
|
|
25
|
-
export function FlowRenderer({
|
|
26
|
-
|
|
44
|
+
export function FlowRenderer({
|
|
45
|
+
engine,
|
|
46
|
+
previewRestartGeneration = 0,
|
|
47
|
+
}: FlowRendererProps): React.ReactElement | null {
|
|
48
|
+
const { session, currentStep, stepShowNonce } = useFlowSessionState(engine);
|
|
27
49
|
const lookupAttribute = React.useMemo(
|
|
28
50
|
() => genSessionDataLookup(session?.data ?? []),
|
|
29
51
|
[session?.data],
|
|
@@ -33,28 +55,34 @@ export function FlowRenderer({ engine }: FlowRendererProps): React.ReactElement
|
|
|
33
55
|
return null;
|
|
34
56
|
}
|
|
35
57
|
|
|
36
|
-
const theme = currentStep.theme ?? session.version.theme;
|
|
37
58
|
const appearance = appearanceOf(currentStep);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
// No chrome, and no FlowSurfaceFade: its exit blocker would intercept the
|
|
60
|
+
// in-app tap a hidden step is waiting for.
|
|
61
|
+
if (appearance === 'HIDDEN') {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
// Step+appearance only: session identity is the React key below so a new
|
|
65
|
+
// flow remounts the fade instead of holding the outgoing flow for CARD_EXIT_MS
|
|
66
|
+
// (that hold is what made a START_FLOW replacement look like two flows).
|
|
67
|
+
// `resetNonce` is frozen with the shown step so an exiting card does not
|
|
68
|
+
// re-resolve; it is not part of animationKey (that would fade the same step).
|
|
69
|
+
const animationKey = `${currentStep.id}:${appearance}`;
|
|
70
|
+
const resetNonce = previewRestartGeneration + stepShowNonce;
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<FlowSurfaceFade
|
|
74
|
+
key={session.id}
|
|
75
|
+
animationKey={animationKey}
|
|
76
|
+
step={{
|
|
77
|
+
appearance,
|
|
78
|
+
session,
|
|
79
|
+
currentStep,
|
|
80
|
+
theme: currentStep.theme ?? session.version.theme,
|
|
81
|
+
lookupAttribute,
|
|
82
|
+
resetNonce,
|
|
83
|
+
}}
|
|
84
|
+
>
|
|
85
|
+
{(shown) => renderSurface(engine, shown)}
|
|
86
|
+
</FlowSurfaceFade>
|
|
87
|
+
);
|
|
60
88
|
}
|
|
@@ -1,50 +1,71 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { ABSOLUTE_FILL } from '../surfaces/absoluteFill';
|
|
5
|
+
import { CARD_EXIT_MS, CardTransitionProvider } from '../surfaces/cardTransition';
|
|
6
|
+
import { getSurfaceInteractionBlocking } from '../surfaces/surfaceInteractionConfig';
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export interface FlowSurfaceFadeProps {
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
/** Bumps when the active step changes so we fade in again. */
|
|
8
|
+
export interface FlowSurfaceFadeProps<TStep> {
|
|
9
|
+
/** Bumps when the active step changes, driving the crossfade. */
|
|
11
10
|
animationKey: string;
|
|
11
|
+
/** Render data for `animationKey`. */
|
|
12
|
+
step: TStep;
|
|
13
|
+
children: (step: TStep) => React.ReactNode;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
17
|
+
* Crossfades flow surfaces on step changes: the outgoing card fades out, then
|
|
18
|
+
* the incoming step mounts and fades in — no cut, no flash at full opacity.
|
|
19
|
+
* Cards animate themselves off the phase published here (see `useCardOpacity`),
|
|
20
|
+
* which keeps backdrops and cutouts steady across the swap.
|
|
21
|
+
*
|
|
22
|
+
* The outgoing step keeps rendering from `step` captured at the last swap, so
|
|
23
|
+
* the surface is not remounted mid-exit (a remount would re-resolve anchors and
|
|
24
|
+
* flash the tooltip's waiting state).
|
|
25
|
+
*
|
|
26
|
+
* A new flow remounts this component (`key={session.id}` in FlowRenderer) so
|
|
27
|
+
* the outgoing flow is not held across a START_FLOW replacement.
|
|
28
|
+
*
|
|
29
|
+
* Exit on flow end unmounts immediately: the surface is gone as soon as the
|
|
30
|
+
* session is cleared.
|
|
18
31
|
*/
|
|
19
|
-
export function FlowSurfaceFade({
|
|
20
|
-
children,
|
|
32
|
+
export function FlowSurfaceFade<TStep>({
|
|
21
33
|
animationKey,
|
|
22
|
-
|
|
23
|
-
|
|
34
|
+
step,
|
|
35
|
+
children,
|
|
36
|
+
}: FlowSurfaceFadeProps<TStep>): React.ReactElement {
|
|
37
|
+
const [shownKey, setShownKey] = React.useState(animationKey);
|
|
38
|
+
const exiting = shownKey !== animationKey;
|
|
39
|
+
const shownStep = React.useRef(step);
|
|
40
|
+
if (!exiting) {
|
|
41
|
+
shownStep.current = step;
|
|
42
|
+
}
|
|
24
43
|
|
|
25
44
|
React.useEffect(() => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
32
|
-
animation.start();
|
|
45
|
+
if (!exiting) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const timer = setTimeout(() => {
|
|
49
|
+
setShownKey(animationKey);
|
|
50
|
+
}, CARD_EXIT_MS);
|
|
33
51
|
return () => {
|
|
34
|
-
|
|
52
|
+
clearTimeout(timer);
|
|
35
53
|
};
|
|
36
|
-
}, [animationKey,
|
|
54
|
+
}, [animationKey, exiting]);
|
|
55
|
+
|
|
56
|
+
const blockInteraction = getSurfaceInteractionBlocking();
|
|
37
57
|
|
|
38
58
|
return (
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
<View testID="userflow-surface-fade" style={styles.fill} pointerEvents="box-none">
|
|
60
|
+
{exiting && blockInteraction ? (
|
|
61
|
+
<View testID="userflow-surface-exit-blocker" style={styles.fill} pointerEvents="auto" />
|
|
62
|
+
) : null}
|
|
63
|
+
<View style={styles.fill} pointerEvents={exiting ? 'none' : 'box-none'}>
|
|
64
|
+
<CardTransitionProvider value={exiting ? 'exiting' : 'entering'}>
|
|
65
|
+
{children(shownStep.current)}
|
|
66
|
+
</CardTransitionProvider>
|
|
46
67
|
</View>
|
|
47
|
-
</
|
|
68
|
+
</View>
|
|
48
69
|
);
|
|
49
70
|
}
|
|
50
71
|
|
|
@@ -1,57 +1,39 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { StyleSheet, View, type GestureResponderEvent
|
|
2
|
+
import { StyleSheet, View, type GestureResponderEvent } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { targetPressMonitor } from '../anchors/targetPressMonitor';
|
|
5
5
|
|
|
6
|
+
import { changedTouchPoints, forEachChangedTouch } from './changedTouchPoints';
|
|
7
|
+
|
|
6
8
|
export interface TargetPressBridgeProps {
|
|
7
9
|
children: React.ReactNode;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
/**
|
|
11
|
-
* Touches that just started/ended/cancelled for this event. Prefer
|
|
12
|
-
* `changedTouches` so multi-touch uses the finger(s) that actually changed —
|
|
13
|
-
* `touches[0]` may be an already-active finger. Each touch carries `identifier`
|
|
14
|
-
* so the monitor can pair start/end per finger.
|
|
15
|
-
*/
|
|
16
|
-
function changedTouchPoints(
|
|
17
|
-
event: GestureResponderEvent,
|
|
18
|
-
): Array<Pick<NativeTouchEvent, 'identifier' | 'pageX' | 'pageY'>> {
|
|
19
|
-
const { changedTouches, touches, identifier, pageX, pageY } = event.nativeEvent;
|
|
20
|
-
if (changedTouches && changedTouches.length > 0) {
|
|
21
|
-
return changedTouches.map((touch) => ({
|
|
22
|
-
identifier: touch.identifier,
|
|
23
|
-
pageX: touch.pageX,
|
|
24
|
-
pageY: touch.pageY,
|
|
25
|
-
}));
|
|
26
|
-
}
|
|
27
|
-
if (touches && touches.length > 0) {
|
|
28
|
-
const touch = touches[touches.length - 1]!;
|
|
29
|
-
return [{ identifier: touch.identifier, pageX: touch.pageX, pageY: touch.pageY }];
|
|
30
|
-
}
|
|
31
|
-
return [{ identifier: identifier ?? 0, pageX, pageY }];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
12
|
/**
|
|
35
13
|
* Wraps app content so tooltip target taps can be observed without stealing
|
|
36
|
-
* them from the underlying control (web parity: click listener, no
|
|
14
|
+
* them from the underlying control (web parity: click listener, no
|
|
15
|
+
* preventDefault).
|
|
37
16
|
*
|
|
38
17
|
* The Userflow overlay is a sibling above the app, so hole Pressables would
|
|
39
18
|
* intercept presses. Instead we hit-test bubbled `onTouchStart` / `onTouchEnd`
|
|
40
19
|
* against the rect registered by {@link TooltipSurface}.
|
|
41
20
|
*
|
|
21
|
+
* Preview-chrome double taps are observed by `DoubleTapBridge` around the
|
|
22
|
+
* whole provider tree — this bridge never sees overlay touches.
|
|
23
|
+
*
|
|
42
24
|
* Does not claim the gesture responder.
|
|
43
25
|
*/
|
|
44
26
|
export function TargetPressBridge({ children }: TargetPressBridgeProps): React.ReactElement {
|
|
45
27
|
const onTouchStart = React.useCallback((event: GestureResponderEvent) => {
|
|
46
|
-
|
|
47
|
-
targetPressMonitor.handleTouchStart(
|
|
48
|
-
}
|
|
28
|
+
forEachChangedTouch(event, (identifier, pageX, pageY) => {
|
|
29
|
+
targetPressMonitor.handleTouchStart(identifier, pageX, pageY);
|
|
30
|
+
});
|
|
49
31
|
}, []);
|
|
50
32
|
|
|
51
33
|
const onTouchEnd = React.useCallback((event: GestureResponderEvent) => {
|
|
52
|
-
|
|
53
|
-
targetPressMonitor.handleTouchEnd(
|
|
54
|
-
}
|
|
34
|
+
forEachChangedTouch(event, (identifier, pageX, pageY) => {
|
|
35
|
+
targetPressMonitor.handleTouchEnd(identifier, pageX, pageY);
|
|
36
|
+
});
|
|
55
37
|
}, []);
|
|
56
38
|
|
|
57
39
|
const onTouchCancel = React.useCallback((event: GestureResponderEvent) => {
|
|
@@ -3,14 +3,19 @@ import * as React from 'react';
|
|
|
3
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
|
|
5
5
|
import { FiberScanRoot } from '../anchors/fiber/FiberScanRoot';
|
|
6
|
+
import { ElementPickerOverlay } from '../authoring/ElementPickerOverlay';
|
|
7
|
+
import { DoubleTapBridge } from '../authoring/chrome/DoubleTapBridge';
|
|
8
|
+
import { elementPickerController } from '../authoring/elementPickerController';
|
|
6
9
|
import { PreviewModeBanner } from '../pairing/PreviewModeBanner';
|
|
7
10
|
import { getPairingController } from '../pairing/pairingRuntime';
|
|
8
11
|
import { usePairingState } from '../pairing/usePairingState';
|
|
9
12
|
import { ABSOLUTE_FILL } from '../surfaces/absoluteFill';
|
|
13
|
+
import { SurfaceLayoutInsetsProvider } from '../surfaces/surfaceLayoutInsets';
|
|
10
14
|
|
|
11
15
|
import { FlowRenderer } from './FlowRenderer';
|
|
12
16
|
import { TargetPressBridge } from './TargetPressBridge';
|
|
13
17
|
import { getFlowSessionEngine } from './flowEngine';
|
|
18
|
+
import { useFlowSessionState } from './useFlowSessionState';
|
|
14
19
|
import { getUserflowCore } from './userflowCore';
|
|
15
20
|
|
|
16
21
|
export interface UserflowContextValue {
|
|
@@ -31,14 +36,16 @@ export interface UserflowProviderProps {
|
|
|
31
36
|
* calling {@link Userflow.init}.
|
|
32
37
|
*
|
|
33
38
|
* Children render normally. An absolute overlay sits above them with
|
|
34
|
-
* `pointerEvents="box-none"` so taps pass through except where flow UI
|
|
39
|
+
* `pointerEvents="box-none"` so taps pass through except where flow UI blocks
|
|
40
|
+
* them (modals always; tooltips when interaction blocking is enabled).
|
|
35
41
|
* We deliberately do not use RN `<Modal>` — it is the wrong primitive for
|
|
36
42
|
* non-modal tooltips (WS6).
|
|
37
43
|
*
|
|
38
44
|
* **Expo Router:** also mount `UserflowExpoRouterScreenTracker` from
|
|
39
|
-
* `@userflow-tech/react-native/expo-router` under this provider so pathname
|
|
40
|
-
* and path-like NAVIGATE actions are wired. The tracker
|
|
41
|
-
* apps without `expo-router` are not forced to install
|
|
45
|
+
* `@userflow-tech/react-native/expo-router` under this provider so pathname and
|
|
46
|
+
* navigation-state changes and path-like NAVIGATE actions are wired. The tracker
|
|
47
|
+
* is a separate entry so apps without `expo-router` are not forced to install
|
|
48
|
+
* that peer.
|
|
42
49
|
*
|
|
43
50
|
* **React Navigation:** wrap `NavigationContainer` with
|
|
44
51
|
* {@link WithUserflowReactNavigation} from `@userflow-tech/react-native/navigation`.
|
|
@@ -50,22 +57,75 @@ export function UserflowProvider({
|
|
|
50
57
|
const engine = engineProp ?? getFlowSessionEngine(getUserflowCore());
|
|
51
58
|
const contextValue = React.useMemo<UserflowContextValue>(() => ({ engine }), [engine]);
|
|
52
59
|
const pairingState = usePairingState();
|
|
60
|
+
const { session, currentStep } = useFlowSessionState(engine);
|
|
61
|
+
const [previewConfirming, setPreviewConfirming] = React.useState(false);
|
|
62
|
+
const [pickerActive, setPickerActive] = React.useState(
|
|
63
|
+
() => elementPickerController.getState().active,
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
React.useEffect(() => {
|
|
67
|
+
return elementPickerController.subscribe((next) => {
|
|
68
|
+
setPickerActive(next.active);
|
|
69
|
+
});
|
|
70
|
+
}, []);
|
|
71
|
+
|
|
72
|
+
const trapHostAccessibility = React.useMemo(() => {
|
|
73
|
+
if (previewConfirming) {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
if (!session || !currentStep) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
const appearance = String(currentStep.appearance).toUpperCase();
|
|
80
|
+
if (appearance === 'HIDDEN') {
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
if (appearance !== 'TOOLTIP') {
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
return currentStep.tooltipTargetBlocked;
|
|
87
|
+
}, [previewConfirming, session, currentStep]);
|
|
53
88
|
|
|
54
89
|
const onExitPreview = React.useCallback(() => {
|
|
55
90
|
void getPairingController(getUserflowCore()).exitPreview();
|
|
56
91
|
}, []);
|
|
57
92
|
|
|
93
|
+
const onRestartPreview = React.useCallback(() => {
|
|
94
|
+
void getPairingController(getUserflowCore()).restartPreview();
|
|
95
|
+
}, []);
|
|
96
|
+
|
|
58
97
|
return (
|
|
59
98
|
<UserflowContext.Provider value={contextValue}>
|
|
60
|
-
<
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
99
|
+
<SurfaceLayoutInsetsProvider>
|
|
100
|
+
<DoubleTapBridge>
|
|
101
|
+
<View style={styles.root} collapsable={false}>
|
|
102
|
+
<View
|
|
103
|
+
style={styles.appContent}
|
|
104
|
+
testID="userflow-app-content"
|
|
105
|
+
importantForAccessibility={trapHostAccessibility ? 'no-hide-descendants' : undefined}
|
|
106
|
+
accessibilityElementsHidden={trapHostAccessibility ? true : undefined}
|
|
107
|
+
>
|
|
108
|
+
<TargetPressBridge>
|
|
109
|
+
<FiberScanRoot>{children}</FiberScanRoot>
|
|
110
|
+
</TargetPressBridge>
|
|
111
|
+
</View>
|
|
112
|
+
<View style={styles.overlay} pointerEvents="box-none">
|
|
113
|
+
<PreviewModeBanner
|
|
114
|
+
onConfirmingChange={setPreviewConfirming}
|
|
115
|
+
onExit={onExitPreview}
|
|
116
|
+
onRestart={onRestartPreview}
|
|
117
|
+
state={pairingState}
|
|
118
|
+
suppressed={pickerActive}
|
|
119
|
+
/>
|
|
120
|
+
<FlowRenderer
|
|
121
|
+
engine={engine}
|
|
122
|
+
previewRestartGeneration={pairingState.previewRestartGeneration}
|
|
123
|
+
/>
|
|
124
|
+
<ElementPickerOverlay />
|
|
125
|
+
</View>
|
|
126
|
+
</View>
|
|
127
|
+
</DoubleTapBridge>
|
|
128
|
+
</SurfaceLayoutInsetsProvider>
|
|
69
129
|
</UserflowContext.Provider>
|
|
70
130
|
);
|
|
71
131
|
}
|
|
@@ -83,6 +143,9 @@ const styles = StyleSheet.create({
|
|
|
83
143
|
root: {
|
|
84
144
|
flex: 1,
|
|
85
145
|
},
|
|
146
|
+
appContent: {
|
|
147
|
+
flex: 1,
|
|
148
|
+
},
|
|
86
149
|
overlay: {
|
|
87
150
|
...ABSOLUTE_FILL,
|
|
88
151
|
},
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { GestureResponderEvent, NativeTouchEvent } from 'react-native';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Touches that just started/ended/cancelled for this event. Prefer
|
|
5
|
+
* `changedTouches` so multi-touch uses the finger(s) that actually changed —
|
|
6
|
+
* `touches[0]` may be an already-active finger. Each touch carries `identifier`
|
|
7
|
+
* so monitors can pair start/end per finger.
|
|
8
|
+
*/
|
|
9
|
+
export function changedTouchPoints(
|
|
10
|
+
event: GestureResponderEvent,
|
|
11
|
+
): Array<Pick<NativeTouchEvent, 'identifier' | 'pageX' | 'pageY'>> {
|
|
12
|
+
const { changedTouches, touches, identifier, pageX, pageY } = event.nativeEvent;
|
|
13
|
+
if (changedTouches && changedTouches.length > 0) {
|
|
14
|
+
return changedTouches.map((touch) => ({
|
|
15
|
+
identifier: touch.identifier,
|
|
16
|
+
pageX: touch.pageX,
|
|
17
|
+
pageY: touch.pageY,
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
if (touches && touches.length > 0) {
|
|
21
|
+
const touch = touches[touches.length - 1]!;
|
|
22
|
+
return [{ identifier: touch.identifier, pageX: touch.pageX, pageY: touch.pageY }];
|
|
23
|
+
}
|
|
24
|
+
return [{ identifier: identifier ?? 0, pageX, pageY }];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function forEachChangedTouch(
|
|
28
|
+
event: GestureResponderEvent,
|
|
29
|
+
fn: (identifier: NativeTouchEvent['identifier'], pageX: number, pageY: number) => void,
|
|
30
|
+
): void {
|
|
31
|
+
for (const touch of changedTouchPoints(event)) {
|
|
32
|
+
fn(touch.identifier, touch.pageX, touch.pageY);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -16,6 +16,8 @@ export function getFlowSessionEngine(core: UserflowCore): FlowSessionEngine {
|
|
|
16
16
|
onOpenExternalUrl: (url) => {
|
|
17
17
|
void openFlowNavigateUrl(url);
|
|
18
18
|
},
|
|
19
|
+
updateUser: (attributes) => core.updateUser(attributes),
|
|
20
|
+
updateGroup: (attributes, options) => core.updateGroup(attributes, options),
|
|
19
21
|
});
|
|
20
22
|
}
|
|
21
23
|
return flowEngine;
|
|
@@ -5,6 +5,12 @@ import type { FlowSessionFragment, FlowStepFragment } from '@userflow-tech/proto
|
|
|
5
5
|
export interface FlowSessionViewState {
|
|
6
6
|
session: FlowSessionFragment | null;
|
|
7
7
|
currentStepId: string | null;
|
|
8
|
+
/**
|
|
9
|
+
* Bumped on every `goToStep`, including a ForceGoToStep back to the current
|
|
10
|
+
* step, so tooltip targeting can re-bootstrap when session/step identity
|
|
11
|
+
* would otherwise be unchanged (draft preview restart).
|
|
12
|
+
*/
|
|
13
|
+
stepShowNonce: number;
|
|
8
14
|
}
|
|
9
15
|
|
|
10
16
|
export function initialFlowSessionViewState(
|
|
@@ -13,15 +19,19 @@ export function initialFlowSessionViewState(
|
|
|
13
19
|
return {
|
|
14
20
|
session,
|
|
15
21
|
currentStepId: session?.currentStep?.id ?? null,
|
|
22
|
+
stepShowNonce: 0,
|
|
16
23
|
};
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
/**
|
|
20
27
|
* Reduces engine events into view state.
|
|
21
28
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* `
|
|
29
|
+
* `goToStep` updates `currentStepId` without a new `sessionChange`. A later
|
|
30
|
+
* same-session SetFlowSession must not snap back to `session.currentStep` —
|
|
31
|
+
* tracking a button event enqueues `check_sessions`, which can push a stale
|
|
32
|
+
* current step. Web `FlowApp` `updateSession` keeps the local step for the
|
|
33
|
+
* same session id (and only falls back if that step was deleted from the
|
|
34
|
+
* version).
|
|
25
35
|
*/
|
|
26
36
|
export function reduceFlowSessionViewState(
|
|
27
37
|
state: FlowSessionViewState,
|
|
@@ -31,21 +41,49 @@ export function reduceFlowSessionViewState(
|
|
|
31
41
|
case 'sessionChange':
|
|
32
42
|
return {
|
|
33
43
|
session: event.session,
|
|
34
|
-
currentStepId: event.session
|
|
44
|
+
currentStepId: resolveSessionChangeStepId(state, event.session),
|
|
45
|
+
stepShowNonce: state.session?.id === event.session?.id ? state.stepShowNonce : 0,
|
|
35
46
|
};
|
|
36
47
|
case 'goToStep':
|
|
37
48
|
return {
|
|
38
49
|
...state,
|
|
39
50
|
currentStepId: event.stepId,
|
|
51
|
+
stepShowNonce: state.stepShowNonce + 1,
|
|
40
52
|
};
|
|
41
53
|
case 'flowEnded':
|
|
42
54
|
return {
|
|
43
55
|
session: null,
|
|
44
56
|
currentStepId: null,
|
|
57
|
+
stepShowNonce: 0,
|
|
45
58
|
};
|
|
46
59
|
}
|
|
47
60
|
}
|
|
48
61
|
|
|
62
|
+
function resolveSessionChangeStepId(
|
|
63
|
+
state: FlowSessionViewState,
|
|
64
|
+
session: FlowSessionFragment | null,
|
|
65
|
+
): string | null {
|
|
66
|
+
if (session == null) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
if (state.session?.id !== session.id || state.currentStepId == null) {
|
|
70
|
+
return session.currentStep?.id ?? null;
|
|
71
|
+
}
|
|
72
|
+
const previousStep = state.session.version.steps.find((step) => step.id === state.currentStepId);
|
|
73
|
+
const byCrossVersionId =
|
|
74
|
+
previousStep == null
|
|
75
|
+
? undefined
|
|
76
|
+
: session.version.steps.find((step) => step.crossVersionId === previousStep.crossVersionId);
|
|
77
|
+
if (byCrossVersionId) {
|
|
78
|
+
return byCrossVersionId.id;
|
|
79
|
+
}
|
|
80
|
+
const byId = session.version.steps.find((step) => step.id === state.currentStepId);
|
|
81
|
+
if (byId) {
|
|
82
|
+
return byId.id;
|
|
83
|
+
}
|
|
84
|
+
return session.currentStep?.id ?? null;
|
|
85
|
+
}
|
|
86
|
+
|
|
49
87
|
export function resolveCurrentStep(
|
|
50
88
|
session: FlowSessionFragment | null,
|
|
51
89
|
currentStepId: string | null,
|