@userflow-tech/react-native 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -68
- package/app.plugin.js +13 -0
- package/babel-plugin/index.d.ts +43 -0
- package/babel-plugin/index.d.ts.map +1 -0
- package/babel-plugin/index.js +862 -0
- package/babel-plugin/index.js.map +1 -0
- package/babel-plugin.js +13 -0
- package/docs/anchoring.md +141 -13
- package/docs/deep-linking.md +20 -17
- package/docs/theme-mapping.md +44 -15
- package/docs/troubleshooting.md +37 -30
- package/expo-plugin/withUserflow.d.ts +17 -0
- package/expo-plugin/withUserflow.d.ts.map +1 -0
- package/expo-plugin/withUserflow.js +99 -0
- package/expo-plugin/withUserflow.js.map +1 -0
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +125 -3
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/commonjs/anchors/autoAnchor.js +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
- package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/commonjs/anchors/hintsCodec.js +1 -1
- package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +171 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +285 -0
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +64 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +39 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +110 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +150 -0
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
- package/lib/commonjs/authoring/doubleTap.js +23 -0
- package/lib/commonjs/authoring/doubleTap.js.map +1 -0
- package/lib/commonjs/authoring/elementPickerController.js +102 -0
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js +195 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/commonjs/authoring/hitTest.js +106 -0
- package/lib/commonjs/authoring/hitTest.js.map +1 -0
- package/lib/commonjs/content/RichContentRenderer.js +12 -2
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
- package/lib/commonjs/content/StepButton.js +19 -4
- package/lib/commonjs/content/StepButton.js.map +1 -1
- package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/commonjs/content/themeColor.js +11 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deviceContext.js +158 -0
- package/lib/commonjs/deviceContext.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/commonjs/hostAppVersion.js +242 -0
- package/lib/commonjs/hostAppVersion.js.map +1 -0
- package/lib/commonjs/index.js +118 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lifecycle.js +2 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +17 -8
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
- package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/commonjs/pairing/PairingController.js +29 -2
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/diagnostics.js +11 -2
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
- package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/commonjs/pairing/tokenStorage.js +25 -2
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/runtime/FlowRenderer.js +45 -21
- package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
- package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
- package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/commonjs/runtime/TargetPressBridge.js +13 -44
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowProvider.js +74 -20
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
- package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +3 -1
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
- package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
- package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
- package/lib/commonjs/screenTracker.js +46 -4
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/surfaces/CardFade.js +31 -0
- package/lib/commonjs/surfaces/CardFade.js.map +1 -0
- package/lib/commonjs/surfaces/CloseButton.js +11 -6
- package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +50 -34
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/cardTransition.js +70 -0
- package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
- package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
- package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/commonjs/surfaces/themeChrome.js +4 -1
- package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
- package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +126 -3
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/anchorChangeTicker.js +10 -0
- package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/module/anchors/autoAnchor.js +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +25 -12
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
- package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
- package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/module/anchors/fiber/fiberInternals.js +139 -3
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
- package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/module/anchors/fiber/readHostContent.js +127 -0
- package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/module/anchors/fiberAnchorCache.js +40 -0
- package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/module/anchors/hintsCodec.js +1 -1
- package/lib/module/anchors/resolveAnchorHost.js +15 -21
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +167 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +280 -0
- package/lib/module/anchors/semanticMatcher.js.map +1 -0
- package/lib/module/authoring/ElementPickerOverlay.js +485 -0
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/module/authoring/capturePickerScreenshot.js +68 -0
- package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +59 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeButton.js +89 -0
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
- package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeIcon.js +33 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js +104 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +146 -0
- package/lib/module/authoring/chrome/tokens.js.map +1 -0
- package/lib/module/authoring/doubleTap.js +18 -0
- package/lib/module/authoring/doubleTap.js.map +1 -0
- package/lib/module/authoring/elementPickerController.js +97 -0
- package/lib/module/authoring/elementPickerController.js.map +1 -0
- package/lib/module/authoring/fingerprintFromInstance.js +187 -0
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/module/authoring/hitTest.js +100 -0
- package/lib/module/authoring/hitTest.js.map +1 -0
- package/lib/module/content/RichContentRenderer.js +12 -2
- package/lib/module/content/RichContentRenderer.js.map +1 -1
- package/lib/module/content/StepButton.js +19 -4
- package/lib/module/content/StepButton.js.map +1 -1
- package/lib/module/content/resolveStepButtonChrome.js +8 -6
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/module/content/themeColor.js +10 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deviceContext.js +142 -0
- package/lib/module/deviceContext.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/module/hostAppVersion.js +225 -0
- package/lib/module/hostAppVersion.js.map +1 -0
- package/lib/module/index.js +119 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/lifecycle.js +2 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +18 -9
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/isOverlayPresentation.js +58 -0
- package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/module/pairing/PairingController.js +30 -3
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +212 -85
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/diagnostics.js +10 -2
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/elementPickerRelay.js +87 -0
- package/lib/module/pairing/elementPickerRelay.js.map +1 -0
- package/lib/module/pairing/resolvePreviewChrome.js +48 -0
- package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/module/pairing/tokenStorage.js +24 -2
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/runtime/FlowRenderer.js +45 -21
- package/lib/module/runtime/FlowRenderer.js.map +1 -1
- package/lib/module/runtime/FlowSurfaceFade.js +49 -26
- package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/module/runtime/TargetPressBridge.js +12 -43
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowProvider.js +74 -20
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/changedTouchPoints.js +43 -0
- package/lib/module/runtime/changedTouchPoints.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +3 -1
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/flowSessionViewState.js +32 -7
- package/lib/module/runtime/flowSessionViewState.js.map +1 -1
- package/lib/module/runtime/useFlowSessionState.js +2 -1
- package/lib/module/runtime/useFlowSessionState.js.map +1 -1
- package/lib/module/screenTracker.js +42 -4
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/surfaces/CardFade.js +26 -0
- package/lib/module/surfaces/CardFade.js.map +1 -0
- package/lib/module/surfaces/CloseButton.js +10 -6
- package/lib/module/surfaces/CloseButton.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +52 -36
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +368 -90
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/cardTransition.js +64 -0
- package/lib/module/surfaces/cardTransition.js.map +1 -0
- package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
- package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/module/surfaces/resolveModalLayout.js +7 -3
- package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
- package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
- package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/module/surfaces/themeChrome.js +3 -1
- package/lib/module/surfaces/themeChrome.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
- package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
- package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
- package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/module/surfaces/tooltip/rect.js +11 -0
- package/lib/module/surfaces/tooltip/rect.js.map +1 -1
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +27 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +48 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +59 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
- package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +53 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +2 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/screenTracker.d.ts +21 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +27 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/autoAnchor.d.ts +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/hintsCodec.d.ts +1 -1
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +48 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +59 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/deviceContext.d.ts +66 -0
- package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +53 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +6 -0
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +2 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/module/src/screenTracker.d.ts +21 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +32 -18
- package/src/anchors/AutoAnchorRegistry.ts +140 -3
- package/src/anchors/anchorChangeTicker.ts +10 -0
- package/src/anchors/autoAnchor.ts +1 -1
- package/src/anchors/elementConditionEvaluator.ts +29 -16
- package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
- package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
- package/src/anchors/fiber/fiberInternals.ts +166 -3
- package/src/anchors/fiber/indexHostFibers.ts +136 -0
- package/src/anchors/fiber/readHostContent.ts +146 -0
- package/src/anchors/fiberAnchorCache.ts +45 -0
- package/src/anchors/hintsCodec.ts +1 -1
- package/src/anchors/resolveAnchorHost.ts +23 -23
- package/src/anchors/resolveAutoAnchorHost.ts +180 -0
- package/src/anchors/semanticMatcher.ts +361 -0
- package/src/authoring/ElementPickerOverlay.tsx +553 -0
- package/src/authoring/capturePickerScreenshot.ts +90 -0
- package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
- package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
- package/src/authoring/chrome/ChromeButton.tsx +103 -0
- package/src/authoring/chrome/ChromeDialog.tsx +121 -0
- package/src/authoring/chrome/ChromeIcon.tsx +40 -0
- package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
- package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
- package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
- package/src/authoring/chrome/doubleTapMonitor.ts +80 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/src/authoring/chrome/icons/xmark.png +0 -0
- package/src/authoring/chrome/icons/xmark@2x.png +0 -0
- package/src/authoring/chrome/icons/xmark@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +106 -0
- package/src/authoring/doubleTap.ts +27 -0
- package/src/authoring/elementPickerController.ts +135 -0
- package/src/authoring/fingerprintFromInstance.ts +152 -0
- package/src/authoring/hitTest.ts +133 -0
- package/src/content/RichContentRenderer.tsx +22 -1
- package/src/content/StepButton.tsx +17 -2
- package/src/content/resolveStepButtonChrome.ts +12 -6
- package/src/content/themeColor.ts +10 -0
- package/src/deviceContext.ts +168 -0
- package/src/expo-router/useUserflowExpoRouter.ts +47 -4
- package/src/hostAppVersion.ts +258 -0
- package/src/index.ts +148 -4
- package/src/lifecycle.ts +8 -0
- package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
- package/src/navigation/isOverlayPresentation.ts +76 -0
- package/src/pairing/PairingController.ts +32 -3
- package/src/pairing/PreviewModeBanner.tsx +250 -94
- package/src/pairing/diagnostics.ts +10 -2
- package/src/pairing/elementPickerRelay.ts +100 -0
- package/src/pairing/resolvePreviewChrome.ts +57 -0
- package/src/pairing/tokenStorage.ts +31 -2
- package/src/pairing/usePairingState.ts +2 -0
- package/src/runtime/FlowRenderer.tsx +55 -27
- package/src/runtime/FlowSurfaceFade.tsx +51 -30
- package/src/runtime/TargetPressBridge.tsx +14 -32
- package/src/runtime/UserflowProvider.tsx +76 -13
- package/src/runtime/changedTouchPoints.ts +34 -0
- package/src/runtime/flowEngine.ts +2 -0
- package/src/runtime/flowSessionViewState.ts +42 -4
- package/src/runtime/useFlowSessionState.ts +2 -0
- package/src/screenTracker.ts +46 -4
- package/src/surfaces/CardFade.tsx +18 -0
- package/src/surfaces/CloseButton.tsx +17 -7
- package/src/surfaces/MadeWithUserflow.tsx +1 -1
- package/src/surfaces/ModalSurface.tsx +48 -35
- package/src/surfaces/TooltipSurface.tsx +406 -86
- package/src/surfaces/cardTransition.ts +67 -0
- package/src/surfaces/resolveHighlightChrome.ts +139 -0
- package/src/surfaces/resolveModalLayout.ts +16 -8
- package/src/surfaces/resolveTooltipLayout.ts +1 -14
- package/src/surfaces/surfaceInteractionConfig.ts +25 -0
- package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
- package/src/surfaces/themeChrome.ts +5 -3
- package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
- package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
- package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
- package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
- package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
- package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
- package/src/surfaces/tooltip/rect.ts +11 -0
- package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
- package/src/version.ts +1 -1
- package/vendor/core/LICENSE +76 -0
- package/vendor/core/README.md +9 -0
- package/vendor/core/dist/attributes.d.ts +15 -0
- package/vendor/core/dist/attributes.d.ts.map +1 -0
- package/vendor/core/dist/attributes.js +55 -0
- package/vendor/core/dist/attributes.js.map +1 -0
- package/vendor/core/dist/constants.d.ts +21 -0
- package/vendor/core/dist/constants.d.ts.map +1 -0
- package/vendor/core/dist/constants.js +21 -0
- package/vendor/core/dist/constants.js.map +1 -0
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts +68 -0
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/ClientConditionEngine.js +197 -0
- package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +160 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.js +571 -0
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/PairingEngine.d.ts +135 -0
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/PairingEngine.js +396 -0
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -0
- package/vendor/core/dist/engine/UserflowCore.d.ts +145 -0
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -0
- package/vendor/core/dist/engine/UserflowCore.js +329 -0
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -0
- package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
- package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
- package/vendor/core/dist/engine/conditionOperators.js +168 -0
- package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
- package/vendor/core/dist/engine/handleActions.d.ts +42 -0
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -0
- package/vendor/core/dist/engine/handleActions.js +198 -0
- package/vendor/core/dist/engine/handleActions.js.map +1 -0
- package/vendor/core/dist/engine/interpolateSessionData.d.ts +7 -0
- package/vendor/core/dist/engine/interpolateSessionData.d.ts.map +1 -0
- package/vendor/core/dist/engine/interpolateSessionData.js +29 -0
- package/vendor/core/dist/engine/interpolateSessionData.js.map +1 -0
- package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
- package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
- package/vendor/core/dist/engine/simpleObservable.js +29 -0
- package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
- package/vendor/core/dist/engine/trackCondition.d.ts +25 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackCondition.js +177 -0
- package/vendor/core/dist/engine/trackCondition.js.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
- package/vendor/core/dist/errors.d.ts +9 -0
- package/vendor/core/dist/errors.d.ts.map +1 -0
- package/vendor/core/dist/errors.js +15 -0
- package/vendor/core/dist/errors.js.map +1 -0
- package/vendor/core/dist/eventAttributes.d.ts +7 -0
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -0
- package/vendor/core/dist/eventAttributes.js +31 -0
- package/vendor/core/dist/eventAttributes.js.map +1 -0
- package/vendor/core/dist/index.d.ts +31 -0
- package/vendor/core/dist/index.d.ts.map +1 -0
- package/vendor/core/dist/index.js +22 -0
- package/vendor/core/dist/index.js.map +1 -0
- package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
- package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
- package/vendor/core/dist/normalizeAttributes.js +127 -0
- package/vendor/core/dist/normalizeAttributes.js.map +1 -0
- package/vendor/core/dist/transport/backoff.d.ts +11 -0
- package/vendor/core/dist/transport/backoff.d.ts.map +1 -0
- package/vendor/core/dist/transport/backoff.js +17 -0
- package/vendor/core/dist/transport/backoff.js.map +1 -0
- package/vendor/core/dist/transport/pairing.d.ts +121 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -0
- package/vendor/core/dist/transport/pairing.js +551 -0
- package/vendor/core/dist/transport/pairing.js.map +1 -0
- package/vendor/core/dist/transport/phoenix.d.ts +228 -0
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -0
- package/vendor/core/dist/transport/phoenix.js +811 -0
- package/vendor/core/dist/transport/phoenix.js.map +1 -0
- package/vendor/core/dist/transport/rateLimiter.d.ts +17 -0
- package/vendor/core/dist/transport/rateLimiter.d.ts.map +1 -0
- package/vendor/core/dist/transport/rateLimiter.js +30 -0
- package/vendor/core/dist/transport/rateLimiter.js.map +1 -0
- package/vendor/core/dist/transport/scheduler.d.ts +12 -0
- package/vendor/core/dist/transport/scheduler.d.ts.map +1 -0
- package/vendor/core/dist/transport/scheduler.js +11 -0
- package/vendor/core/dist/transport/scheduler.js.map +1 -0
- package/vendor/core/dist/types.d.ts +60 -0
- package/vendor/core/dist/types.d.ts.map +1 -0
- package/vendor/core/dist/types.js +2 -0
- package/vendor/core/dist/types.js.map +1 -0
- package/vendor/core/dist/version.d.ts +3 -0
- package/vendor/core/dist/version.d.ts.map +1 -0
- package/vendor/core/dist/version.js +3 -0
- package/vendor/core/dist/version.js.map +1 -0
- package/vendor/core/package.json +20 -0
- package/vendor/protocol/LICENSE +76 -0
- package/vendor/protocol/README.md +8 -0
- package/vendor/protocol/dist/attributes.d.ts +43 -0
- package/vendor/protocol/dist/attributes.d.ts.map +1 -0
- package/vendor/protocol/dist/attributes.js +15 -0
- package/vendor/protocol/dist/attributes.js.map +1 -0
- package/vendor/protocol/dist/autoData.d.ts +232 -0
- package/vendor/protocol/dist/autoData.d.ts.map +1 -0
- package/vendor/protocol/dist/autoData.js +78 -0
- package/vendor/protocol/dist/autoData.js.map +1 -0
- package/vendor/protocol/dist/events.d.ts +24 -0
- package/vendor/protocol/dist/events.d.ts.map +1 -0
- package/vendor/protocol/dist/events.js +8 -0
- package/vendor/protocol/dist/events.js.map +1 -0
- package/vendor/protocol/dist/flows.d.ts +360 -0
- package/vendor/protocol/dist/flows.d.ts.map +1 -0
- package/vendor/protocol/dist/flows.js +201 -0
- package/vendor/protocol/dist/flows.js.map +1 -0
- package/vendor/protocol/dist/index.d.ts +25 -0
- package/vendor/protocol/dist/index.d.ts.map +1 -0
- package/vendor/protocol/dist/index.js +17 -0
- package/vendor/protocol/dist/index.js.map +1 -0
- package/vendor/protocol/dist/messages.d.ts +187 -0
- package/vendor/protocol/dist/messages.d.ts.map +1 -0
- package/vendor/protocol/dist/messages.js +61 -0
- package/vendor/protocol/dist/messages.js.map +1 -0
- package/vendor/protocol/dist/pairing.d.ts +82 -0
- package/vendor/protocol/dist/pairing.d.ts.map +1 -0
- package/vendor/protocol/dist/pairing.js +146 -0
- package/vendor/protocol/dist/pairing.js.map +1 -0
- package/vendor/protocol/package.json +17 -0
package/lib/commonjs/index.js
CHANGED
|
@@ -104,8 +104,11 @@ var _autoAnchor = require("./anchors/autoAnchor.js");
|
|
|
104
104
|
var _anchorChangeTicker = require("./anchors/anchorChangeTicker.js");
|
|
105
105
|
var _resolveAnchorHost = require("./anchors/resolveAnchorHost.js");
|
|
106
106
|
var _scrollConfig = require("./anchors/scrollConfig.js");
|
|
107
|
+
var _surfaceInteractionConfig = require("./surfaces/surfaceInteractionConfig.js");
|
|
107
108
|
var _anonymousId = require("./anonymousId.js");
|
|
108
109
|
var _deepLinking = require("./deepLinking.js");
|
|
110
|
+
var _deviceContext = require("./deviceContext.js");
|
|
111
|
+
var _hostAppVersion = require("./hostAppVersion.js");
|
|
109
112
|
var _lifecycle = require("./lifecycle.js");
|
|
110
113
|
var _openFlowNavigateUrl = require("./navigation/openFlowNavigateUrl.js");
|
|
111
114
|
var _network = require("./network.js");
|
|
@@ -147,28 +150,63 @@ const lifecycle = new _lifecycle.LifecycleController({
|
|
|
147
150
|
core.setFlowSessionId(null);
|
|
148
151
|
},
|
|
149
152
|
ensureAlive: () => core.ensureAlive(),
|
|
150
|
-
hasActiveSession: () => (0, _flowEngine.hasActiveFlowSession)()
|
|
153
|
+
hasActiveSession: () => (0, _flowEngine.hasActiveFlowSession)(),
|
|
154
|
+
onScreenResume: () => {
|
|
155
|
+
(0, _screenTracker.reportCurrentScreen)();
|
|
156
|
+
}
|
|
151
157
|
});
|
|
152
158
|
const network = new _network.NetworkController({
|
|
153
159
|
// Probe if still "connected" (half-open) or reconnect eagerly if already dropped.
|
|
154
160
|
ensureAlive: () => core.ensureAlive()
|
|
155
161
|
});
|
|
162
|
+
|
|
163
|
+
/** True when a screen was reported before identify, so first identify should emit `screen_viewed`. */
|
|
164
|
+
let screenViewedAwaitingIdentify = false;
|
|
165
|
+
function armScreenViewedForNextIdentify() {
|
|
166
|
+
if ((0, _screenTracker.getCurrentScreenLocation)() != null) {
|
|
167
|
+
screenViewedAwaitingIdentify = true;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
156
170
|
function wireScreenChangeReporter() {
|
|
157
171
|
(0, _screenTracker.setScreenChangeReporter)(location => {
|
|
158
172
|
lifecycle.reportActivity();
|
|
159
173
|
const screenKey = 'path' in location ? `path:${location.path}` : `screen:${location.screen}`;
|
|
160
174
|
(0, _resolveAnchorHost.notifyAnchorScreenChange)(screenKey);
|
|
161
175
|
_anchorChangeTicker.anchorChangeTicker.notify();
|
|
176
|
+
const identified = core.getUserId() != null;
|
|
162
177
|
if (__DEV__) {
|
|
163
|
-
const identified = core.getUserId() != null;
|
|
164
178
|
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
165
179
|
console.log('[Userflow] updateScreen', location, identified ? '(push UpdateClientContext)' : '(buffered until identify)');
|
|
166
180
|
}
|
|
167
181
|
// Mirrors web: only pushes UpdateClientContext after identify; before that the
|
|
168
182
|
// location is remembered and included on the next end-user channel join.
|
|
169
|
-
void core.updateScreen(location).catch(
|
|
183
|
+
void core.updateScreen(location).catch(error => {
|
|
170
184
|
// Screen updates are best-effort; connection drops / rate limits should not
|
|
171
185
|
// surface to the host app's navigation path.
|
|
186
|
+
if (__DEV__) {
|
|
187
|
+
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
188
|
+
console.warn('[Userflow] updateScreen failed', error);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
const attrs = (0, _screenTracker.screenViewedAttributes)(location);
|
|
192
|
+
if (!attrs) return;
|
|
193
|
+
if (!identified) {
|
|
194
|
+
screenViewedAwaitingIdentify = true;
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
screenViewedAwaitingIdentify = false;
|
|
198
|
+
if (__DEV__) {
|
|
199
|
+
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
200
|
+
console.log('[Userflow] track', _screenTracker.SCREEN_VIEWED_EVENT, attrs);
|
|
201
|
+
}
|
|
202
|
+
void core.track(_screenTracker.SCREEN_VIEWED_EVENT, attrs).catch(error => {
|
|
203
|
+
// Screen views are best-effort; connection drops / rate limits should not
|
|
204
|
+
// surface to the host app's navigation path. Each accepted screen sends
|
|
205
|
+
// UpdateClientContext + TrackEvent (two slots of the 100/min cap).
|
|
206
|
+
if (__DEV__) {
|
|
207
|
+
// eslint-disable-next-line no-console -- intentional development diagnostic
|
|
208
|
+
console.warn('[Userflow] track', _screenTracker.SCREEN_VIEWED_EVENT, 'failed', error);
|
|
209
|
+
}
|
|
172
210
|
});
|
|
173
211
|
});
|
|
174
212
|
}
|
|
@@ -179,11 +217,17 @@ function wireDeepLinking() {
|
|
|
179
217
|
startFlowWithToken: token => core.startFlowWithToken(token)
|
|
180
218
|
});
|
|
181
219
|
}
|
|
220
|
+
function mergeSystemUserAttributes(attributes) {
|
|
221
|
+
return (0, _deviceContext.mergeDeviceContextUserAttributes)((0, _hostAppVersion.mergeHostAppVersionUserAttributes)(attributes));
|
|
222
|
+
}
|
|
182
223
|
async function afterIdentify() {
|
|
183
224
|
(0, _flowEngine.attachFlowSessionEngine)(core);
|
|
184
225
|
(0, _clientConditions.attachClientConditionEngine)(core);
|
|
185
226
|
(0, _pairingRuntime.getPairingController)(core).notifyIdentified();
|
|
186
227
|
lifecycle.reportActivity();
|
|
228
|
+
if (screenViewedAwaitingIdentify) {
|
|
229
|
+
(0, _screenTracker.reportCurrentScreen)();
|
|
230
|
+
}
|
|
187
231
|
try {
|
|
188
232
|
await (0, _deepLinking.flushPendingPreviewToken)();
|
|
189
233
|
} catch {
|
|
@@ -198,6 +242,15 @@ async function afterIdentify() {
|
|
|
198
242
|
const Userflow = exports.Userflow = {
|
|
199
243
|
/** Validate credentials, store configuration, and wire app-lifecycle handling. */
|
|
200
244
|
init(config) {
|
|
245
|
+
(0, _hostAppVersion.cacheHostAppVersionAtInit)({
|
|
246
|
+
...(config.appVersion !== undefined ? {
|
|
247
|
+
appVersion: config.appVersion
|
|
248
|
+
} : {}),
|
|
249
|
+
...(config.appBuild !== undefined ? {
|
|
250
|
+
appBuild: config.appBuild
|
|
251
|
+
} : {})
|
|
252
|
+
});
|
|
253
|
+
(0, _deviceContext.cacheDeviceContextAtInit)();
|
|
201
254
|
(0, _openFlowNavigateUrl.setHostOnNavigate)(config.onNavigate);
|
|
202
255
|
lifecycle.start();
|
|
203
256
|
network.start();
|
|
@@ -257,8 +310,9 @@ const Userflow = exports.Userflow = {
|
|
|
257
310
|
(0, _clientConditions.resetClientConditionEngine)();
|
|
258
311
|
core.setClientConditions([]);
|
|
259
312
|
await (0, _anonymousId.clearAnonymousId)();
|
|
313
|
+
armScreenViewedForNextIdentify();
|
|
260
314
|
}
|
|
261
|
-
await core.identify(userId, attributes, options);
|
|
315
|
+
await core.identify(userId, mergeSystemUserAttributes(attributes), options);
|
|
262
316
|
await afterIdentify();
|
|
263
317
|
},
|
|
264
318
|
/** Identify an anonymous user with a stable auto-generated id stored on device. */
|
|
@@ -268,8 +322,9 @@ const Userflow = exports.Userflow = {
|
|
|
268
322
|
if (previousId != null && previousId !== anonymousId) {
|
|
269
323
|
(0, _clientConditions.resetClientConditionEngine)();
|
|
270
324
|
core.setClientConditions([]);
|
|
325
|
+
armScreenViewedForNextIdentify();
|
|
271
326
|
}
|
|
272
|
-
await core.identify(anonymousId, attributes, options);
|
|
327
|
+
await core.identify(anonymousId, mergeSystemUserAttributes(attributes), options);
|
|
273
328
|
await afterIdentify();
|
|
274
329
|
},
|
|
275
330
|
/**
|
|
@@ -286,6 +341,23 @@ const Userflow = exports.Userflow = {
|
|
|
286
341
|
lifecycle.reportActivity();
|
|
287
342
|
return core.group(groupId, attributes, options);
|
|
288
343
|
},
|
|
344
|
+
/**
|
|
345
|
+
* Upsert attributes for the current user without re-identifying.
|
|
346
|
+
* Requires a prior {@link identify}. Flow button "Set user attribute" actions
|
|
347
|
+
* use this path.
|
|
348
|
+
*/
|
|
349
|
+
updateUser(attributes) {
|
|
350
|
+
lifecycle.reportActivity();
|
|
351
|
+
return core.updateUser(attributes);
|
|
352
|
+
},
|
|
353
|
+
/**
|
|
354
|
+
* Upsert attributes for the current group / membership without re-grouping.
|
|
355
|
+
* Requires a prior {@link group}.
|
|
356
|
+
*/
|
|
357
|
+
updateGroup(attributes, options) {
|
|
358
|
+
lifecycle.reportActivity();
|
|
359
|
+
return core.updateGroup(attributes, options);
|
|
360
|
+
},
|
|
289
361
|
/** Record a custom analytics event for the current user (and group, unless `userOnly`). */
|
|
290
362
|
track(name, attributes, options) {
|
|
291
363
|
lifecycle.reportActivity();
|
|
@@ -299,6 +371,20 @@ const Userflow = exports.Userflow = {
|
|
|
299
371
|
getAttributes() {
|
|
300
372
|
return core.getAttributes();
|
|
301
373
|
},
|
|
374
|
+
/**
|
|
375
|
+
* Host app marketing version cached during {@link init}, or `null` before init
|
|
376
|
+
* or when auto-detection and any init override are unavailable.
|
|
377
|
+
*/
|
|
378
|
+
getHostAppVersion() {
|
|
379
|
+
return (0, _hostAppVersion.getCachedHostAppVersion)();
|
|
380
|
+
},
|
|
381
|
+
/**
|
|
382
|
+
* Platform metadata cached during {@link init} (`sdk`, `deviceOs`, `deviceType`),
|
|
383
|
+
* or `null` before init.
|
|
384
|
+
*/
|
|
385
|
+
getDeviceContext() {
|
|
386
|
+
return (0, _deviceContext.getCachedDeviceContext)();
|
|
387
|
+
},
|
|
302
388
|
/** The flow session engine (created lazily; attach runs after identify). */
|
|
303
389
|
getFlowSessionEngine() {
|
|
304
390
|
return (0, _flowEngine.getFlowSessionEngine)(core);
|
|
@@ -308,6 +394,7 @@ const Userflow = exports.Userflow = {
|
|
|
308
394
|
(0, _clientConditions.resetClientConditionEngine)();
|
|
309
395
|
(0, _flowEngine.resetFlowSessionEngine)();
|
|
310
396
|
core.reset();
|
|
397
|
+
armScreenViewedForNextIdentify();
|
|
311
398
|
await (0, _anonymousId.clearAnonymousId)();
|
|
312
399
|
},
|
|
313
400
|
/** Remove app-lifecycle, network, and deep-link subscriptions (call on unmount / teardown). */
|
|
@@ -316,6 +403,7 @@ const Userflow = exports.Userflow = {
|
|
|
316
403
|
lifecycle.stop();
|
|
317
404
|
network.stop();
|
|
318
405
|
(0, _screenTracker.disableScreenTracking)();
|
|
406
|
+
screenViewedAwaitingIdentify = false;
|
|
319
407
|
(0, _deepLinking.stopDeepLinking)();
|
|
320
408
|
},
|
|
321
409
|
/**
|
|
@@ -351,6 +439,31 @@ const Userflow = exports.Userflow = {
|
|
|
351
439
|
*/
|
|
352
440
|
setCustomScrollIntoView(fn) {
|
|
353
441
|
(0, _scrollConfig.setCustomScrollIntoView)(fn);
|
|
442
|
+
},
|
|
443
|
+
/**
|
|
444
|
+
* When true (default), tooltip cutout bands and step-transition exit block
|
|
445
|
+
* taps on the host app underneath. Pass `false` to restore legacy pass-through
|
|
446
|
+
* tooltip backdrop behavior (dim bands only; `tooltipTargetBlocked` hole seal
|
|
447
|
+
* is unchanged). Modals always block. Takes effect on the next surface re-render.
|
|
448
|
+
*/
|
|
449
|
+
setSurfaceInteractionBlocking(enabled) {
|
|
450
|
+
(0, _surfaceInteractionConfig.setSurfaceInteractionBlocking)(enabled);
|
|
451
|
+
},
|
|
452
|
+
/**
|
|
453
|
+
* Log the host app's native marketing version (store version), not
|
|
454
|
+
* {@link SDK_VERSION}, and the platform OS (`ios` / `android` / …).
|
|
455
|
+
* Prefers `expo-application` / `expo-constants` when present; otherwise reads
|
|
456
|
+
* `NativeModules.RNDeviceInfo` from the bundled device-info native module.
|
|
457
|
+
*/
|
|
458
|
+
logHostAppVersion() {
|
|
459
|
+
(0, _hostAppVersion.logHostAppVersion)();
|
|
460
|
+
},
|
|
461
|
+
/**
|
|
462
|
+
* Log cached user-attribute values (`sdk`, `device_os`, `device_type`).
|
|
463
|
+
* Requires {@link init}; before init, logs that init is required.
|
|
464
|
+
*/
|
|
465
|
+
logDeviceContext() {
|
|
466
|
+
(0, _deviceContext.logDeviceContext)();
|
|
354
467
|
}
|
|
355
468
|
};
|
|
356
469
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_autoAnchor","require","_anchorChangeTicker","_resolveAnchorHost","_scrollConfig","_anonymousId","_deepLinking","_lifecycle","_openFlowNavigateUrl","_network","_pairingRuntime","_clientConditions","_flowEngine","_userflowCore","_screenTracker","_version","_UserflowProvider","_useFlowSessionState","_useUserflowScreen","_useUserflowAnchor","_useUserflowScrollContainer","_index","core","getUserflowCore","lifecycle","LifecycleController","suspend","resume","getFlowSessionEngine","flushPendingSends","clearLocalSession","clearFlowSessionEngineLocalSession","setFlowSessionId","ensureAlive","hasActiveSession","hasActiveFlowSession","network","NetworkController","wireScreenChangeReporter","setScreenChangeReporter","location","reportActivity","screenKey","path","screen","notifyAnchorScreenChange","anchorChangeTicker","notify","__DEV__","identified","getUserId","console","log","updateScreen","catch","wireDeepLinking","startDeepLinking","isIdentified","startFlowWithToken","token","afterIdentify","attachFlowSessionEngine","attachClientConditionEngine","getPairingController","notifyIdentified","flushPendingPreviewToken","Userflow","exports","init","config","setHostOnNavigate","onNavigate","start","pairing","installPairingController","pairingEndpoint","undefined","notifyInitStarted","then","resolved","enableScreenTracking","notifyInitialized","error","notifyInitFailed","handlePairingUrl","url","handleUrl","exitPreview","setOnNavigate","handler","identify","userId","attributes","options","previousId","resetClientConditionEngine","setClientConditions","clearAnonymousId","identifyAnonymous","anonymousId","getOrCreateAnonymousId","didHandleURL","group","groupId","track","name","getAttributes","reset","resetFlowSessionEngine","teardown","stop","disableScreenTracking","stopDeepLinking","screenName","handleScreenChange","setScrollPadding","padding","setScrollPaddingConfig","setCustomScrollIntoView","fn","setCustomScrollIntoViewConfig"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAMA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AAMA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,oBAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA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F;AACA;AACA;AACA;AACA;EACEY,YAAYA,CAAC4D,UAA8B,EAAQ;IACjD,IAAAC,iCAAkB,EAACD,UAAU,GAAG;MAAErE,MAAM,EAAEqE;IAAW,CAAC,GAAGrC,SAAS,CAAC;EACrE,CAAC;EACD;AACF;AACA;AACA;EACEuC,gBAAgBA,CAACC,OAAyC,EAAQ;IAChE,IAAAC,8BAAsB,EAACD,OAAO,CAAC;EACjC,CAAC;EACD;AACF;AACA;AACA;EACEE,uBAAuBA,CAACC,EAA2C,EAAQ;IACzE,IAAAC,qCAA6B,EAACD,EAAE,CAAC;EACnC;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_autoAnchor","require","_anchorChangeTicker","_resolveAnchorHost","_scrollConfig","_surfaceInteractionConfig","_anonymousId","_deepLinking","_deviceContext","_hostAppVersion","_lifecycle","_openFlowNavigateUrl","_network","_pairingRuntime","_clientConditions","_flowEngine","_userflowCore","_screenTracker","_version","_UserflowProvider","_useFlowSessionState","_useUserflowScreen","_useUserflowAnchor","_useUserflowScrollContainer","_index","core","getUserflowCore","lifecycle","LifecycleController","suspend","resume","getFlowSessionEngine","flushPendingSends","clearLocalSession","clearFlowSessionEngineLocalSession","setFlowSessionId","ensureAlive","hasActiveSession","hasActiveFlowSession","onScreenResume","reportCurrentScreen","network","NetworkController","screenViewedAwaitingIdentify","armScreenViewedForNextIdentify","getCurrentScreenLocation","wireScreenChangeReporter","setScreenChangeReporter","location","reportActivity","screenKey","path","screen","notifyAnchorScreenChange","anchorChangeTicker","notify","identified","getUserId","__DEV__","console","log","updateScreen","catch","error","warn","attrs","screenViewedAttributes","SCREEN_VIEWED_EVENT","track","wireDeepLinking","startDeepLinking","isIdentified","startFlowWithToken","token","mergeSystemUserAttributes","attributes","mergeDeviceContextUserAttributes","mergeHostAppVersionUserAttributes","afterIdentify","attachFlowSessionEngine","attachClientConditionEngine","getPairingController","notifyIdentified","flushPendingPreviewToken","Userflow","exports","init","config","cacheHostAppVersionAtInit","appVersion","undefined","appBuild","cacheDeviceContextAtInit","setHostOnNavigate","onNavigate","start","pairing","installPairingController","pairingEndpoint","notifyInitStarted","then","resolved","enableScreenTracking","notifyInitialized","notifyInitFailed","handlePairingUrl","url","handleUrl","exitPreview","setOnNavigate","handler","identify","userId","options","previousId","resetClientConditionEngine","setClientConditions","clearAnonymousId","identifyAnonymous","anonymousId","getOrCreateAnonymousId","didHandleURL","group","groupId","updateUser","updateGroup","name","getAttributes","getHostAppVersion","getCachedHostAppVersion","getDeviceContext","getCachedDeviceContext","reset","resetFlowSessionEngine","teardown","stop","disableScreenTracking","stopDeepLinking","screenName","handleScreenChange","setScrollPadding","padding","setScrollPaddingConfig","setCustomScrollIntoView","fn","setCustomScrollIntoViewConfig","setSurfaceInteractionBlocking","enabled","setSurfaceInteractionBlockingConfig","logHostAppVersion","logHostAppVersionToConsole","logDeviceContext","logDeviceContextToConsole"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AAMA,IAAAI,yBAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAMA,IAAAO,cAAA,GAAAP,OAAA;AAOA,IAAAQ,eAAA,GAAAR,OAAA;AAOA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,oBAAA,GAAAV,OAAA;AACA,IAAAW,QAAA,GAAAX,OAAA;AACA,IAAAY,eAAA,GAAAZ,OAAA;AACA,IAAAa,iBAAA,GAAAb,OAAA;AAIA,IAAAc,WAAA,GAAAd,OAAA;AAOA,IAAAe,aAAA,GAAAf,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;IACvE,IAAAC,uDAAmC,EAACD,OAAO,CAAC;EAC9C,CAAC;EACD;AACF;AACA;AACA;AACA;AACA;EACEE,iBAAiBA,CAAA,EAAS;IACxB,IAAAC,iCAA0B,EAAC,CAAC;EAC9B,CAAC;EACD;AACF;AACA;AACA;EACEC,gBAAgBA,CAAA,EAAS;IACvB,IAAAC,+BAAyB,EAAC,CAAC;EAC7B;AACF,CAAC","ignoreList":[]}
|
|
@@ -63,6 +63,7 @@ class LifecycleController {
|
|
|
63
63
|
this.clearLocalSession = deps.clearLocalSession;
|
|
64
64
|
this.ensureAlive = deps.ensureAlive;
|
|
65
65
|
this.hasActiveSession = deps.hasActiveSession;
|
|
66
|
+
this.onScreenResume = deps.onScreenResume;
|
|
66
67
|
this.scheduler = deps.scheduler ?? defaultScheduler;
|
|
67
68
|
this.now = deps.now ?? (() => Date.now());
|
|
68
69
|
this.suspendGraceMs = deps.suspendGraceMs ?? SUSPEND_GRACE_MS;
|
|
@@ -159,6 +160,7 @@ class LifecycleController {
|
|
|
159
160
|
this.resume();
|
|
160
161
|
this.suspended = false;
|
|
161
162
|
this.scheduleIdleTimer();
|
|
163
|
+
this.onScreenResume?.();
|
|
162
164
|
}
|
|
163
165
|
scheduleGraceTimer() {
|
|
164
166
|
this.clearGraceTimer();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","INACTIVITY_TIMEOUT_MS","exports","SESSION_STALE_AFTER_BACKGROUND_MS","SUSPEND_GRACE_MS","defaultScheduler","setTimeout","handler","ms","clearTimeout","handle","defaultSubscribeAppState","subscription","AppState","addEventListener","remove","LifecycleController","unsubscribeAppState","idleTimer","graceTimer","backgroundedAt","appIsActive","started","suspended","constructor","deps","suspend","resume","clearLocalSession","ensureAlive","hasActiveSession","scheduler","now","Date","suspendGraceMs","getCurrentAppState","currentState","subscribeAppState","start","status","handleAppStateChange","scheduleIdleTimer","stop","clearIdleTimer","clearGraceTimer","reportActivity","onForeground","onBackground","scheduleGraceTimer","awayMs"],"sourceRoot":"../../src","sources":["lifecycle.ts"],"mappings":";;;;;;AAkBA,IAAAA,YAAA,GAAAC,OAAA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACO,MAAMC,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI;;AAElD;AACO,MAAME,iCAAiC,GAAAD,OAAA,CAAAC,iCAAA,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI;;AAE9D;AACA;AACA;AACA;AACO,MAAMC,gBAAgB,GAAAF,OAAA,CAAAE,gBAAA,GAAG,KAAK;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","INACTIVITY_TIMEOUT_MS","exports","SESSION_STALE_AFTER_BACKGROUND_MS","SUSPEND_GRACE_MS","defaultScheduler","setTimeout","handler","ms","clearTimeout","handle","defaultSubscribeAppState","subscription","AppState","addEventListener","remove","LifecycleController","unsubscribeAppState","idleTimer","graceTimer","backgroundedAt","appIsActive","started","suspended","constructor","deps","suspend","resume","clearLocalSession","ensureAlive","hasActiveSession","onScreenResume","scheduler","now","Date","suspendGraceMs","getCurrentAppState","currentState","subscribeAppState","start","status","handleAppStateChange","scheduleIdleTimer","stop","clearIdleTimer","clearGraceTimer","reportActivity","onForeground","onBackground","scheduleGraceTimer","awayMs"],"sourceRoot":"../../src","sources":["lifecycle.ts"],"mappings":";;;;;;AAkBA,IAAAA,YAAA,GAAAC,OAAA;AAlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACO,MAAMC,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI;;AAElD;AACO,MAAME,iCAAiC,GAAAD,OAAA,CAAAC,iCAAA,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI;;AAE9D;A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CAAC,CAAC,EAAE;QAC3B,IAAI,CAACY,iBAAiB,CAAC,CAAC;QACxB;MACF;MACA,IAAI,CAAChB,OAAO,CAAC,CAAC;MACd,IAAI,CAACH,SAAS,GAAG,IAAI;IACvB,CAAC,EAAEtB,qBAAqB,CAAC;EAC3B;EAEQ2C,cAAcA,CAAA,EAAS;IAC7B,IAAI,IAAI,CAAC1B,SAAS,IAAI,IAAI,EAAE;MAC1B,IAAI,CAACc,SAAS,CAACvB,YAAY,CAAC,IAAI,CAACS,SAAS,CAAC;MAC3C,IAAI,CAACA,SAAS,GAAG,IAAI;IACvB;EACF;AACF;AAAChB,OAAA,CAAAc,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -9,6 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
var _screenTracker = require("../screenTracker.js");
|
|
10
10
|
var _chainCallbacks = require("./chainCallbacks.js");
|
|
11
11
|
var _getActiveRouteName = require("./getActiveRouteName.js");
|
|
12
|
+
var _isOverlayPresentation = require("./isOverlayPresentation.js");
|
|
12
13
|
var _openFlowNavigateUrl = require("./openFlowNavigateUrl.js");
|
|
13
14
|
function assignRef(ref, value) {
|
|
14
15
|
if (typeof ref === 'function') {
|
|
@@ -37,25 +38,33 @@ function WithUserflowReactNavigation({
|
|
|
37
38
|
children
|
|
38
39
|
}) {
|
|
39
40
|
const navigationRef = (0, _native.useNavigationContainerRef)();
|
|
41
|
+
const overlayWasFocusedRef = (0, _react.useRef)(false);
|
|
40
42
|
(0, _react.useEffect)(() => {
|
|
41
43
|
(0, _openFlowNavigateUrl.setReactNavigationRef)(navigationRef);
|
|
42
44
|
return () => {
|
|
43
45
|
(0, _openFlowNavigateUrl.setReactNavigationRef)(null);
|
|
44
46
|
};
|
|
45
47
|
}, [navigationRef]);
|
|
46
|
-
const
|
|
47
|
-
(0,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} : undefined);
|
|
52
|
-
}, [navigationRef]);
|
|
53
|
-
const handleStateChange = (0, _react.useCallback)(state => {
|
|
48
|
+
const reportFocusedScreen = (0, _react.useCallback)(state => {
|
|
49
|
+
if ((0, _isOverlayPresentation.isOverlayPresentation)((0, _isOverlayPresentation.readNavigationPresentation)(navigationRef))) {
|
|
50
|
+
overlayWasFocusedRef.current = true;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
54
53
|
const name = (0, _getActiveRouteName.getActiveRouteName)(state ?? navigationRef.getRootState());
|
|
55
54
|
(0, _screenTracker.handleScreenChange)(name ? {
|
|
56
55
|
screen: name
|
|
56
|
+
} : undefined, overlayWasFocusedRef.current ? {
|
|
57
|
+
force: true
|
|
57
58
|
} : undefined);
|
|
59
|
+
overlayWasFocusedRef.current = false;
|
|
58
60
|
}, [navigationRef]);
|
|
61
|
+
const handleReady = (0, _react.useCallback)(() => {
|
|
62
|
+
(0, _openFlowNavigateUrl.setReactNavigationRef)(navigationRef);
|
|
63
|
+
reportFocusedScreen();
|
|
64
|
+
}, [navigationRef, reportFocusedScreen]);
|
|
65
|
+
const handleStateChange = (0, _react.useCallback)(state => {
|
|
66
|
+
reportFocusedScreen(state);
|
|
67
|
+
}, [reportFocusedScreen]);
|
|
59
68
|
if (! /*#__PURE__*/(0, _react.isValidElement)(children)) {
|
|
60
69
|
throw new Error('WithUserflowReactNavigation expects a single React element child.');
|
|
61
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_native","require","_react","_screenTracker","_chainCallbacks","_getActiveRouteName","_openFlowNavigateUrl","assignRef","ref","value","current","mergeRefs","refs","WithUserflowReactNavigation","children","navigationRef","useNavigationContainerRef","useEffect","setReactNavigationRef","
|
|
1
|
+
{"version":3,"names":["_native","require","_react","_screenTracker","_chainCallbacks","_getActiveRouteName","_isOverlayPresentation","_openFlowNavigateUrl","assignRef","ref","value","current","mergeRefs","refs","WithUserflowReactNavigation","children","navigationRef","useNavigationContainerRef","overlayWasFocusedRef","useRef","useEffect","setReactNavigationRef","reportFocusedScreen","useCallback","state","isOverlayPresentation","readNavigationPresentation","name","getActiveRouteName","getRootState","handleScreenChange","screen","undefined","force","handleReady","handleStateChange","isValidElement","Error","childProps","props","cloneElement","onReady","chainCallbacks","onStateChange"],"sourceRoot":"../../../src","sources":["navigation/WithUserflowReactNavigation.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAMA,IAAAC,MAAA,GAAAD,OAAA;AAGA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AAYA,SAASO,SAASA,CAAIC,GAA6B,EAAEC,KAAe,EAAQ;EAC1E,IAAI,OAAOD,GAAG,KAAK,UAAU,EAAE;IAC7BA,GAAG,CAACC,KAAK,CAAC;EACZ,CAAC,MAAM,IAAID,GAAG,IAAI,IAAI,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAI,SAAS,IAAIA,GAAG,EAAE;IACpEA,GAAG,CAAsCE,OAAO,GAAGD,KAAK;EAC3D;AACF;AAEA,SAASE,SAASA,CAAI,GAAGC,IAAqC,EAAwB;EACpF,OAAQH,KAAK,IAAK;IAChB,KAAK,MAAMD,GAAG,IAAII,IAAI,EAAE;MACtBL,SAAS,CAACC,GAAG,EAAEC,KAAK,CAAC;IACvB;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,2BAA2BA,CAAC;EAC1CC;AACgC,CAAC,EAAsB;EACvD,MAAMC,aAAa,GAAG,IAAAC,iCAAyB,EAAgB,CAAC;EAChE,MAAMC,oBAAoB,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EAE1C,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAAC,0CAAqB,EAACL,aAAa,CAAC;IACpC,OAAO,MAAM;MACX,IAAAK,0CAAqB,EAAC,IAAI,CAAC;IAC7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Ac,EAACJ,UAAU,CAACG,OAAO,EAAEP,WAAW,CAAC,IAAIA,WAAW;IACvES,aAAa,EAAE,IAAAD,8BAAc,EAACJ,UAAU,CAACK,aAAa,EAAER,iBAAiB,CAAC,IAAIA;EAChF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isOverlayPresentation = isOverlayPresentation;
|
|
7
|
+
exports.readNavigationPresentation = readNavigationPresentation;
|
|
8
|
+
exports.subscribeNavigationState = subscribeNavigationState;
|
|
9
|
+
/** React Navigation `options.presentation` values that are overlays, not screens. */
|
|
10
|
+
const OVERLAY_PRESENTATIONS = new Set(['modal', 'transparentModal', 'containedModal', 'containedTransparentModal', 'fullScreenModal', 'formSheet', 'pageSheet']);
|
|
11
|
+
|
|
12
|
+
/** True when the focused route is a modal / sheet overlay, not a screen navigation. */
|
|
13
|
+
function isOverlayPresentation(presentation) {
|
|
14
|
+
return typeof presentation === 'string' && OVERLAY_PRESENTATIONS.has(presentation);
|
|
15
|
+
}
|
|
16
|
+
function presentationFromHolder(holder) {
|
|
17
|
+
if (holder == null || typeof holder !== 'object') return undefined;
|
|
18
|
+
const getCurrentOptions = holder.getCurrentOptions;
|
|
19
|
+
if (typeof getCurrentOptions !== 'function') return undefined;
|
|
20
|
+
try {
|
|
21
|
+
return getCurrentOptions()?.presentation;
|
|
22
|
+
} catch {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Reads `presentation` from a React Navigation container ref.
|
|
29
|
+
* Accepts either a `NavigationContainerRef` or a `NavigationContainerRefWithCurrent`
|
|
30
|
+
* (`ref.current` is checked when the wrapper itself has no `getCurrentOptions`).
|
|
31
|
+
*/
|
|
32
|
+
function readNavigationPresentation(ref) {
|
|
33
|
+
const fromRef = presentationFromHolder(ref);
|
|
34
|
+
if (fromRef !== undefined) return fromRef;
|
|
35
|
+
if (ref != null && typeof ref === 'object' && 'current' in ref) {
|
|
36
|
+
return presentationFromHolder(ref.current);
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
function subscribeHolder(holder, listener) {
|
|
41
|
+
if (holder == null || typeof holder !== 'object') return undefined;
|
|
42
|
+
const addListener = holder.addListener;
|
|
43
|
+
if (typeof addListener !== 'function') return undefined;
|
|
44
|
+
try {
|
|
45
|
+
const unsubscribe = addListener.call(holder, 'state', listener);
|
|
46
|
+
return typeof unsubscribe === 'function' ? unsubscribe : undefined;
|
|
47
|
+
} catch {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Subscribes to React Navigation container `state` events.
|
|
54
|
+
* Accepts a `NavigationContainerRef` or `NavigationContainerRefWithCurrent`.
|
|
55
|
+
*/
|
|
56
|
+
function subscribeNavigationState(ref, listener) {
|
|
57
|
+
const fromRef = subscribeHolder(ref, listener);
|
|
58
|
+
if (fromRef) return fromRef;
|
|
59
|
+
if (ref != null && typeof ref === 'object' && 'current' in ref) {
|
|
60
|
+
return subscribeHolder(ref.current, listener);
|
|
61
|
+
}
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=isOverlayPresentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["OVERLAY_PRESENTATIONS","Set","isOverlayPresentation","presentation","has","presentationFromHolder","holder","undefined","getCurrentOptions","readNavigationPresentation","ref","fromRef","current","subscribeHolder","listener","addListener","unsubscribe","call","subscribeNavigationState"],"sourceRoot":"../../../src","sources":["navigation/isOverlayPresentation.ts"],"mappings":";;;;;;;;AAAA;AACA,MAAMA,qBAAqB,GAAG,IAAIC,GAAG,CAAC,CACpC,OAAO,EACP,kBAAk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EAAE,OAAO,EAAEQ,QAAQ,CAAC;IAC/D,OAAO,OAAOE,WAAW,KAAK,UAAU,GAAGA,WAAW,GAAGT,SAAS;EACpE,CAAC,CAAC,MAAM;IACN,OAAOA,SAAS;EAClB;AACF;;AAEA;AACA;AACA;AACA;AACO,SAASW,wBAAwBA,CACtCR,GAAY,EACZI,QAAoB,EACM;EAC1B,MAAMH,OAAO,GAAGE,eAAe,CAACH,GAAG,EAAEI,QAAQ,CAAC;EAC9C,IAAIH,OAAO,EAAE,OAAOA,OAAO;EAC3B,IAAID,GAAG,IAAI,IAAI,IAAI,OAAOA,GAAG,KAAK,QAAQ,IAAI,SAAS,IAAIA,GAAG,EAAE;IAC9D,OAAOG,eAAe,CAAEH,GAAG,CAA0BE,OAAO,EAAEE,QAAQ,CAAC;EACzE;EACA,OAAOP,SAAS;AAClB","ignoreList":[]}
|
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.PairingController = void 0;
|
|
7
7
|
var _core = require("@userflow-tech/core");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _fiberAnchorCache = require("../anchors/fiberAnchorCache.js");
|
|
9
10
|
var _deepLink = require("./deepLink.js");
|
|
10
11
|
var _diagnostics = require("./diagnostics.js");
|
|
12
|
+
var _elementPickerRelay = require("./elementPickerRelay.js");
|
|
11
13
|
var _tokenStorage = require("./tokenStorage.js");
|
|
12
14
|
/**
|
|
13
15
|
* Readiness of the end-user session that a preview attaches to.
|
|
@@ -35,6 +37,7 @@ class PairingController {
|
|
|
35
37
|
deferredPairingToken = null;
|
|
36
38
|
/** Diagnostics already emitted for the current init attempt. */
|
|
37
39
|
loggedOnce = new Set();
|
|
40
|
+
relayUnsub = null;
|
|
38
41
|
constructor(options) {
|
|
39
42
|
this.core = options.core;
|
|
40
43
|
this.pairingEndpoint = options.pairingEndpoint ?? _core.DEFAULT_PAIRING_ENDPOINT;
|
|
@@ -62,7 +65,9 @@ class PairingController {
|
|
|
62
65
|
previewActive: false,
|
|
63
66
|
lastError: null,
|
|
64
67
|
needsRescan: false,
|
|
65
|
-
awaitingStartCondition: false
|
|
68
|
+
awaitingStartCondition: false,
|
|
69
|
+
canRestartPreview: false,
|
|
70
|
+
previewRestartGeneration: 0
|
|
66
71
|
};
|
|
67
72
|
}
|
|
68
73
|
|
|
@@ -79,7 +84,9 @@ class PairingController {
|
|
|
79
84
|
previewActive: false,
|
|
80
85
|
lastError: `Userflow.init() failed, so preview could not start: ${this.initFailureReason ?? 'unknown error'}`,
|
|
81
86
|
needsRescan: true,
|
|
82
|
-
awaitingStartCondition: false
|
|
87
|
+
awaitingStartCondition: false,
|
|
88
|
+
canRestartPreview: false,
|
|
89
|
+
previewRestartGeneration: 0
|
|
83
90
|
};
|
|
84
91
|
}
|
|
85
92
|
onStateChange(listener) {
|
|
@@ -141,6 +148,7 @@ class PairingController {
|
|
|
141
148
|
this.appStateSub?.remove();
|
|
142
149
|
this.appStateSub = null;
|
|
143
150
|
this.started = false;
|
|
151
|
+
this.unbindRelay();
|
|
144
152
|
void this.exitPreview();
|
|
145
153
|
}
|
|
146
154
|
|
|
@@ -246,6 +254,16 @@ class PairingController {
|
|
|
246
254
|
this.emit(this.getState());
|
|
247
255
|
}
|
|
248
256
|
|
|
257
|
+
/**
|
|
258
|
+
* Replay the last previewed flow from step 1. No-ops when nothing has been
|
|
259
|
+
* delivered yet (restart control is hidden in that case).
|
|
260
|
+
*/
|
|
261
|
+
async restartPreview() {
|
|
262
|
+
if (!this.engine) return false;
|
|
263
|
+
(0, _fiberAnchorCache.clearFiberAnchorCache)();
|
|
264
|
+
return this.engine.restartPreview();
|
|
265
|
+
}
|
|
266
|
+
|
|
249
267
|
/** Flush queued startFlowWithToken after identify. */
|
|
250
268
|
notifyIdentified() {
|
|
251
269
|
this.engine?.notifyIdentified();
|
|
@@ -265,12 +283,21 @@ class PairingController {
|
|
|
265
283
|
});
|
|
266
284
|
this.engine.onStateChange(state => {
|
|
267
285
|
this.emit(state);
|
|
286
|
+
if (state.lastError) {
|
|
287
|
+
this.warnOnce((0, _diagnostics.pairingPreviewErrorMessage)(state.lastError));
|
|
288
|
+
}
|
|
268
289
|
if (state.status === 'token_expired' || state.needsRescan) {
|
|
269
290
|
void this.tokenStore.clear();
|
|
270
291
|
}
|
|
271
292
|
});
|
|
293
|
+
this.unbindRelay();
|
|
294
|
+
this.relayUnsub = (0, _elementPickerRelay.bindElementPickerRelay)(this.engine);
|
|
272
295
|
return this.engine;
|
|
273
296
|
}
|
|
297
|
+
unbindRelay() {
|
|
298
|
+
this.relayUnsub?.();
|
|
299
|
+
this.relayUnsub = null;
|
|
300
|
+
}
|
|
274
301
|
emit(state) {
|
|
275
302
|
for (const listener of this.listeners) {
|
|
276
303
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_reactNative","_deepLink","_diagnostics","_tokenStorage","PairingController","engine","started","urlSub","appStateSub","listeners","Set","initPhase","initFailureReason","deferredPairingToken","loggedOnce","constructor","options","core","pairingEndpoint","DEFAULT_PAIRING_ENDPOINT","tokenStore","createPairingTokenStore","LinkingModule","Linking","AppStateModule","AppState","clearLocalSession","undefined","logger","defaultPairingLogger","getEngine","hasStarted","getState","blocked","blockedState","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","onStateChange","listener","add","delete","start","startListening","error","warnOnce","pairingListenerSetupFailedMessage","describeError","clear","pairingTokenStoreClearFailedMessage","ensureEngine","addEventListener","url","handleUrl","catch","pairingConnectFailedMessage","next","ensureAlive","initial","getInitialURL","stop","remove","exitPreview","inspected","inspectPairingDeepLink","ok","isPairingAttempt","reason","pairingAttemptRejectionMessage","link","pairingToken","pairingLinkInitFailedMessage","pairingLinkDeferredMessage","emit","enterPreview","notifyInitStarted","wasBlocked","notifyInitialized","deferred","notifyInitFailed","message","has","set","notifyIdentified","PairingEngine","sendClientMessage","send","onServerMessage","handler","isIdentified","getUserId","pairingOptions","deviceMeta","os","Platform","OS","state","exports","Error","String"],"sourceRoot":"../../../src","sources":["pairing/PairingController.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,
|
|
1
|
+
{"version":3,"names":["_core","require","_reactNative","_fiberAnchorCache","_deepLink","_diagnostics","_elementPickerRelay","_tokenStorage","PairingController","engine","started","urlSub","appStateSub","listeners","Set","initPhase","initFailureReason","deferredPairingToken","loggedOnce","relayUnsub","constructor","options","core","pairingEndpoint","DEFAULT_PAIRING_ENDPOINT","tokenStore","createPairingTokenStore","LinkingModule","Linking","AppStateModule","AppState","clearLocalSession","undefined","logger","defaultPairingLogger","getEngine","hasStarted","getState","blocked","blockedState","status","pairingId","deviceId","previewActive","lastError","needsRescan","awaitingStartCondition","canRestartPreview","previewRestartGeneration","onStateChange","listener","add","delete","start","startListening","error","warnOnce","pairingListenerSetupFailedMessage","describeError","clear","pairingTokenStoreClearFailedMessage","ensureEngine","addEventListener","url","handleUrl","catch","pairingConnectFailedMessage","next","ensureAlive","initial","getInitialURL","stop","remove","unbindRelay","exitPreview","inspected","inspectPairingDeepLink","ok","isPairingAttempt","reason","pairingAttemptRejectionMessage","link","pairingToken","pairingLinkInitFailedMessage","pairingLinkDeferredMessage","emit","enterPreview","notifyInitStarted","wasBlocked","notifyInitialized","deferred","notifyInitFailed","message","has","set","restartPreview","clearFiberAnchorCache","notifyIdentified","PairingEngine","sendClientMessage","send","onServerMessage","handler","isIdentified","getUserId","pairingOptions","deviceMeta","os","Platform","OS","state","pairingPreviewErrorMessage","bindElementPickerRelay","exports","Error","String"],"sourceRoot":"../../../src","sources":["pairing/PairingController.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,iBAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAWA,IA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