@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
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { StyleSheet, View } from 'react-native';
|
|
5
5
|
import { FiberScanRoot } from "../anchors/fiber/FiberScanRoot.js";
|
|
6
|
+
import { ElementPickerOverlay } from "../authoring/ElementPickerOverlay.js";
|
|
7
|
+
import { DoubleTapBridge } from "../authoring/chrome/DoubleTapBridge.js";
|
|
8
|
+
import { elementPickerController } from "../authoring/elementPickerController.js";
|
|
6
9
|
import { PreviewModeBanner } from "../pairing/PreviewModeBanner.js";
|
|
7
10
|
import { getPairingController } from "../pairing/pairingRuntime.js";
|
|
8
11
|
import { usePairingState } from "../pairing/usePairingState.js";
|
|
9
12
|
import { ABSOLUTE_FILL } from "../surfaces/absoluteFill.js";
|
|
13
|
+
import { SurfaceLayoutInsetsProvider } from "../surfaces/surfaceLayoutInsets.js";
|
|
10
14
|
import { FlowRenderer } from "./FlowRenderer.js";
|
|
11
15
|
import { TargetPressBridge } from "./TargetPressBridge.js";
|
|
12
16
|
import { getFlowSessionEngine } from "./flowEngine.js";
|
|
17
|
+
import { useFlowSessionState } from "./useFlowSessionState.js";
|
|
13
18
|
import { getUserflowCore } from "./userflowCore.js";
|
|
14
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
20
|
const UserflowContext = /*#__PURE__*/React.createContext(null);
|
|
@@ -19,14 +24,16 @@ const UserflowContext = /*#__PURE__*/React.createContext(null);
|
|
|
19
24
|
* calling {@link Userflow.init}.
|
|
20
25
|
*
|
|
21
26
|
* Children render normally. An absolute overlay sits above them with
|
|
22
|
-
* `pointerEvents="box-none"` so taps pass through except where flow UI
|
|
27
|
+
* `pointerEvents="box-none"` so taps pass through except where flow UI blocks
|
|
28
|
+
* them (modals always; tooltips when interaction blocking is enabled).
|
|
23
29
|
* We deliberately do not use RN `<Modal>` — it is the wrong primitive for
|
|
24
30
|
* non-modal tooltips (WS6).
|
|
25
31
|
*
|
|
26
32
|
* **Expo Router:** also mount `UserflowExpoRouterScreenTracker` from
|
|
27
|
-
* `@userflow-tech/react-native/expo-router` under this provider so pathname
|
|
28
|
-
* and path-like NAVIGATE actions are wired. The tracker
|
|
29
|
-
* apps without `expo-router` are not forced to install
|
|
33
|
+
* `@userflow-tech/react-native/expo-router` under this provider so pathname and
|
|
34
|
+
* navigation-state changes and path-like NAVIGATE actions are wired. The tracker
|
|
35
|
+
* is a separate entry so apps without `expo-router` are not forced to install
|
|
36
|
+
* that peer.
|
|
30
37
|
*
|
|
31
38
|
* **React Navigation:** wrap `NavigationContainer` with
|
|
32
39
|
* {@link WithUserflowReactNavigation} from `@userflow-tech/react-native/navigation`.
|
|
@@ -40,28 +47,72 @@ export function UserflowProvider({
|
|
|
40
47
|
engine
|
|
41
48
|
}), [engine]);
|
|
42
49
|
const pairingState = usePairingState();
|
|
50
|
+
const {
|
|
51
|
+
session,
|
|
52
|
+
currentStep
|
|
53
|
+
} = useFlowSessionState(engine);
|
|
54
|
+
const [previewConfirming, setPreviewConfirming] = React.useState(false);
|
|
55
|
+
const [pickerActive, setPickerActive] = React.useState(() => elementPickerController.getState().active);
|
|
56
|
+
React.useEffect(() => {
|
|
57
|
+
return elementPickerController.subscribe(next => {
|
|
58
|
+
setPickerActive(next.active);
|
|
59
|
+
});
|
|
60
|
+
}, []);
|
|
61
|
+
const trapHostAccessibility = React.useMemo(() => {
|
|
62
|
+
if (previewConfirming) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
if (!session || !currentStep) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
const appearance = String(currentStep.appearance).toUpperCase();
|
|
69
|
+
if (appearance === 'HIDDEN') {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
if (appearance !== 'TOOLTIP') {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
return currentStep.tooltipTargetBlocked;
|
|
76
|
+
}, [previewConfirming, session, currentStep]);
|
|
43
77
|
const onExitPreview = React.useCallback(() => {
|
|
44
78
|
void getPairingController(getUserflowCore()).exitPreview();
|
|
45
79
|
}, []);
|
|
80
|
+
const onRestartPreview = React.useCallback(() => {
|
|
81
|
+
void getPairingController(getUserflowCore()).restartPreview();
|
|
82
|
+
}, []);
|
|
46
83
|
return /*#__PURE__*/_jsx(UserflowContext.Provider, {
|
|
47
84
|
value: contextValue,
|
|
48
|
-
children: /*#__PURE__*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
children:
|
|
85
|
+
children: /*#__PURE__*/_jsx(SurfaceLayoutInsetsProvider, {
|
|
86
|
+
children: /*#__PURE__*/_jsx(DoubleTapBridge, {
|
|
87
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
88
|
+
style: styles.root,
|
|
89
|
+
collapsable: false,
|
|
90
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
91
|
+
style: styles.appContent,
|
|
92
|
+
testID: "userflow-app-content",
|
|
93
|
+
importantForAccessibility: trapHostAccessibility ? 'no-hide-descendants' : undefined,
|
|
94
|
+
accessibilityElementsHidden: trapHostAccessibility ? true : undefined,
|
|
95
|
+
children: /*#__PURE__*/_jsx(TargetPressBridge, {
|
|
96
|
+
children: /*#__PURE__*/_jsx(FiberScanRoot, {
|
|
97
|
+
children: children
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
101
|
+
style: styles.overlay,
|
|
102
|
+
pointerEvents: "box-none",
|
|
103
|
+
children: [/*#__PURE__*/_jsx(PreviewModeBanner, {
|
|
104
|
+
onConfirmingChange: setPreviewConfirming,
|
|
105
|
+
onExit: onExitPreview,
|
|
106
|
+
onRestart: onRestartPreview,
|
|
107
|
+
state: pairingState,
|
|
108
|
+
suppressed: pickerActive
|
|
109
|
+
}), /*#__PURE__*/_jsx(FlowRenderer, {
|
|
110
|
+
engine: engine,
|
|
111
|
+
previewRestartGeneration: pairingState.previewRestartGeneration
|
|
112
|
+
}), /*#__PURE__*/_jsx(ElementPickerOverlay, {})]
|
|
113
|
+
})]
|
|
54
114
|
})
|
|
55
|
-
})
|
|
56
|
-
style: styles.overlay,
|
|
57
|
-
pointerEvents: "box-none",
|
|
58
|
-
children: [/*#__PURE__*/_jsx(PreviewModeBanner, {
|
|
59
|
-
state: pairingState,
|
|
60
|
-
onExit: onExitPreview
|
|
61
|
-
}), /*#__PURE__*/_jsx(FlowRenderer, {
|
|
62
|
-
engine: engine
|
|
63
|
-
})]
|
|
64
|
-
})]
|
|
115
|
+
})
|
|
65
116
|
})
|
|
66
117
|
});
|
|
67
118
|
}
|
|
@@ -78,6 +129,9 @@ const styles = StyleSheet.create({
|
|
|
78
129
|
root: {
|
|
79
130
|
flex: 1
|
|
80
131
|
},
|
|
132
|
+
appContent: {
|
|
133
|
+
flex: 1
|
|
134
|
+
},
|
|
81
135
|
overlay: {
|
|
82
136
|
...ABSOLUTE_FILL
|
|
83
137
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","FiberScanRoot","PreviewModeBanner","getPairingController","usePairingState","ABSOLUTE_FILL","FlowRenderer","TargetPressBridge","getFlowSessionEngine","getUserflowCore","jsx","_jsx","jsxs","_jsxs","UserflowContext","createContext","UserflowProvider","children","engine","engineProp","contextValue","useMemo","pairingState","onExitPreview","useCallback","exitPreview","Provider","value","style","styles","root","collapsable","overlay","pointerEvents","
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","FiberScanRoot","ElementPickerOverlay","DoubleTapBridge","elementPickerController","PreviewModeBanner","getPairingController","usePairingState","ABSOLUTE_FILL","SurfaceLayoutInsetsProvider","FlowRenderer","TargetPressBridge","getFlowSessionEngine","useFlowSessionState","getUserflowCore","jsx","_jsx","jsxs","_jsxs","UserflowContext","createContext","UserflowProvider","children","engine","engineProp","contextValue","useMemo","pairingState","session","currentStep","previewConfirming","setPreviewConfirming","useState","pickerActive","setPickerActive","getState","active","useEffect","subscribe","next","trapHostAccessibility","appearance","String","toUpperCase","tooltipTargetBlocked","onExitPreview","useCallback","exitPreview","onRestartPreview","restartPreview","Provider","value","style","styles","root","collapsable","appContent","testID","importantForAccessibility","undefined","accessibilityElementsHidden","overlay","pointerEvents","onConfirmingChange","onExit","onRestart","state","suppressed","previewRestartGeneration","useUserflow","ctx","useContext","Error","create","flex"],"sourceRoot":"../../../src","sources":["runtime/UserflowProvider.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Touches that just started/ended/cancelled for this event. Prefer
|
|
5
|
+
* `changedTouches` so multi-touch uses the finger(s) that actually changed —
|
|
6
|
+
* `touches[0]` may be an already-active finger. Each touch carries `identifier`
|
|
7
|
+
* so monitors can pair start/end per finger.
|
|
8
|
+
*/
|
|
9
|
+
export function changedTouchPoints(event) {
|
|
10
|
+
const {
|
|
11
|
+
changedTouches,
|
|
12
|
+
touches,
|
|
13
|
+
identifier,
|
|
14
|
+
pageX,
|
|
15
|
+
pageY
|
|
16
|
+
} = event.nativeEvent;
|
|
17
|
+
if (changedTouches && changedTouches.length > 0) {
|
|
18
|
+
return changedTouches.map(touch => ({
|
|
19
|
+
identifier: touch.identifier,
|
|
20
|
+
pageX: touch.pageX,
|
|
21
|
+
pageY: touch.pageY
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
24
|
+
if (touches && touches.length > 0) {
|
|
25
|
+
const touch = touches[touches.length - 1];
|
|
26
|
+
return [{
|
|
27
|
+
identifier: touch.identifier,
|
|
28
|
+
pageX: touch.pageX,
|
|
29
|
+
pageY: touch.pageY
|
|
30
|
+
}];
|
|
31
|
+
}
|
|
32
|
+
return [{
|
|
33
|
+
identifier: identifier ?? 0,
|
|
34
|
+
pageX,
|
|
35
|
+
pageY
|
|
36
|
+
}];
|
|
37
|
+
}
|
|
38
|
+
export function forEachChangedTouch(event, fn) {
|
|
39
|
+
for (const touch of changedTouchPoints(event)) {
|
|
40
|
+
fn(touch.identifier, touch.pageX, touch.pageY);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=changedTouchPoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["changedTouchPoints","event","changedTouches","touches","identifier","pageX","pageY","nativeEvent","length","map","touch","forEachChangedTouch","fn"],"sourceRoot":"../../../src","sources":["runtime/changedTouchPoints.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,kBAAkBA,CAChCC,KAA4B,EACqC;EACjE,MAAM;IAAEC,cAAc;IAAEC,OAAO;IAAEC,UAAU;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGL,KAAK,CAACM,WAAW;EAC/E,IAAIL,cAAc,IAAIA,cAAc,CAACM,MAAM,GAAG,CAAC,EAAE;IAC/C,OAAON,cAAc,CAACO,GAAG,CAAEC,KAAK,KAAM;MACpCN,UAAU,EAAEM,KAAK,CAACN,UAAU;MAC5BC,KAAK,EAAEK,KAAK,CAACL,KAAK;MAClBC,KAAK,EAAEI,KAAK,CAACJ;IACf,CAAC,CAAC,CAAC;EACL;EACA,IAAIH,OAAO,IAAIA,OAAO,CAACK,MAAM,GAAG,CAAC,EAAE;IACjC,MAAME,KAAK,GAAGP,OAAO,CAACA,OAAO,CAACK,MAAM,GAAG,CAAC,CAAE;IAC1C,OAAO,CAAC;MAAEJ,UAAU,EAAEM,KAAK,CAACN,UAAU;MAAEC,KAAK,EAAEK,KAAK,CAACL,KAAK;MAAEC,KAAK,EAAEI,KAAK,CAACJ;IAAM,CAAC,CAAC;EACnF;EACA,OAAO,CAAC;IAAEF,UAAU,EAAEA,UAAU,IAAI,CAAC;IAAEC,KAAK;IAAEC;EAAM,CAAC,CAAC;AACxD;AAEA,OAAO,SAASK,mBAAmBA,CACjCV,KAA4B,EAC5BW,EAAsF,EAChF;EACN,KAAK,MAAMF,KAAK,IAAIV,kBAAkB,CAACC,KAAK,CAAC,EAAE;IAC7CW,EAAE,CAACF,KAAK,CAACN,UAAU,EAAEM,KAAK,CAACL,KAAK,EAAEK,KAAK,CAACJ,KAAK,CAAC;EAChD;AACF","ignoreList":[]}
|
|
@@ -15,7 +15,9 @@ export function getFlowSessionEngine(core) {
|
|
|
15
15
|
},
|
|
16
16
|
onOpenExternalUrl: url => {
|
|
17
17
|
void openFlowNavigateUrl(url);
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
|
+
updateUser: attributes => core.updateUser(attributes),
|
|
20
|
+
updateGroup: (attributes, options) => core.updateGroup(attributes, options)
|
|
19
21
|
});
|
|
20
22
|
}
|
|
21
23
|
return flowEngine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FlowSessionEngine","openFlowNavigateUrl","flowEngine","getFlowSessionEngine","core","transport","send","message","onServerMessage","handler","setFlowSessionId","id","onOpenExternalUrl","url","attachFlowSessionEngine","engine","attach","resetFlowSessionEngine","reset","clearFlowSessionEngineLocalSession","clearLocalSession","hasActiveFlowSession","getFlowSession","__resetFlowSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/flowEngine.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAA2B,qBAAqB;AAE1E,SAASC,mBAAmB,QAAQ,sCAAmC;AAEvE,IAAIC,UAAoC,GAAG,IAAI;;AAE/C;AACA,OAAO,SAASC,oBAAoBA,CAACC,IAAkB,EAAqB;EAC1E,IAAI,CAACF,UAAU,EAAE;IACfA,UAAU,GAAG,IAAIF,iBAAiB,CAAC;MACjCK,SAAS,EAAE;QACTC,IAAI,EAAGC,OAAO,IAAKH,IAAI,CAACE,IAAI,CAACC,OAAO,CAAC;QACrCC,eAAe,EAAGC,OAAO,IAAKL,IAAI,CAACI,eAAe,CAACC,OAAO,CAAC;QAC3DC,gBAAgB,EAAGC,EAAE,IAAKP,IAAI,CAACM,gBAAgB,CAACC,EAAE;MACpD,CAAC;MACDC,iBAAiB,EAAGC,GAAG,IAAK;QAC1B,KAAKZ,mBAAmB,CAACY,GAAG,CAAC;MAC/B;
|
|
1
|
+
{"version":3,"names":["FlowSessionEngine","openFlowNavigateUrl","flowEngine","getFlowSessionEngine","core","transport","send","message","onServerMessage","handler","setFlowSessionId","id","onOpenExternalUrl","url","updateUser","attributes","updateGroup","options","attachFlowSessionEngine","engine","attach","resetFlowSessionEngine","reset","clearFlowSessionEngineLocalSession","clearLocalSession","hasActiveFlowSession","getFlowSession","__resetFlowSessionEngineForTests"],"sourceRoot":"../../../src","sources":["runtime/flowEngine.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAA2B,qBAAqB;AAE1E,SAASC,mBAAmB,QAAQ,sCAAmC;AAEvE,IAAIC,UAAoC,GAAG,IAAI;;AAE/C;AACA,OAAO,SAASC,oBAAoBA,CAACC,IAAkB,EAAqB;EAC1E,IAAI,CAACF,UAAU,EAAE;IACfA,UAAU,GAAG,IAAIF,iBAAiB,CAAC;MACjCK,SAAS,EAAE;QACTC,IAAI,EAAGC,OAAO,IAAKH,IAAI,CAACE,IAAI,CAACC,OAAO,CAAC;QACrCC,eAAe,EAAGC,OAAO,IAAKL,IAAI,CAACI,eAAe,CAACC,OAAO,CAAC;QAC3DC,gBAAgB,EAAGC,EAAE,IAAKP,IAAI,CAACM,gBAAgB,CAACC,EAAE;MACpD,CAAC;MACDC,iBAAiB,EAAGC,GAAG,IAAK;QAC1B,KAAKZ,mBAAmB,CAACY,GAAG,CAAC;MAC/B,CAAC;MACDC,UAAU,EAAGC,UAAU,IAAKX,IAAI,CAACU,UAAU,CAACC,UAAU,CAAC;MACvDC,WAAW,EAAEA,CAACD,UAAU,EAAEE,OAAO,KAAKb,IAAI,CAACY,WAAW,CAACD,UAAU,EAAEE,OAAO;IAC5E,CAAC,CAAC;EACJ;EACA,OAAOf,UAAU;AACnB;;AAEA;AACA,OAAO,SAASgB,uBAAuBA,CAACd,IAAkB,EAAqB;EAC7E,MAAMe,MAAM,GAAGhB,oBAAoB,CAACC,IAAI,CAAC;EACzCe,MAAM,CAACC,MAAM,CAAC,CAAC;EACf,OAAOD,MAAM;AACf;;AAEA;AACA,OAAO,SAASE,sBAAsBA,CAAA,EAAS;EAC7CnB,UAAU,EAAEoB,KAAK,CAAC,CAAC;AACrB;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,kCAAkCA,CAAA,EAAS;EACzDrB,UAAU,EAAEsB,iBAAiB,CAAC,CAAC;AACjC;;AAEA;AACA,OAAO,SAASC,oBAAoBA,CAAA,EAAY;EAC9C,OAAOvB,UAAU,EAAEwB,cAAc,CAAC,CAAC,IAAI,IAAI;AAC7C;;AAEA;AACA,OAAO,SAASC,gCAAgCA,CAAA,EAAS;EACvDzB,UAAU,EAAEoB,KAAK,CAAC,CAAC;EACnBpB,UAAU,GAAG,IAAI;AACnB","ignoreList":[]}
|
|
@@ -5,36 +5,61 @@
|
|
|
5
5
|
export function initialFlowSessionViewState(session) {
|
|
6
6
|
return {
|
|
7
7
|
session,
|
|
8
|
-
currentStepId: session?.currentStep?.id ?? null
|
|
8
|
+
currentStepId: session?.currentStep?.id ?? null,
|
|
9
|
+
stepShowNonce: 0
|
|
9
10
|
};
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Reduces engine events into view state.
|
|
14
15
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* `
|
|
16
|
+
* `goToStep` updates `currentStepId` without a new `sessionChange`. A later
|
|
17
|
+
* same-session SetFlowSession must not snap back to `session.currentStep` —
|
|
18
|
+
* tracking a button event enqueues `check_sessions`, which can push a stale
|
|
19
|
+
* current step. Web `FlowApp` `updateSession` keeps the local step for the
|
|
20
|
+
* same session id (and only falls back if that step was deleted from the
|
|
21
|
+
* version).
|
|
18
22
|
*/
|
|
19
23
|
export function reduceFlowSessionViewState(state, event) {
|
|
20
24
|
switch (event.type) {
|
|
21
25
|
case 'sessionChange':
|
|
22
26
|
return {
|
|
23
27
|
session: event.session,
|
|
24
|
-
currentStepId: event.session
|
|
28
|
+
currentStepId: resolveSessionChangeStepId(state, event.session),
|
|
29
|
+
stepShowNonce: state.session?.id === event.session?.id ? state.stepShowNonce : 0
|
|
25
30
|
};
|
|
26
31
|
case 'goToStep':
|
|
27
32
|
return {
|
|
28
33
|
...state,
|
|
29
|
-
currentStepId: event.stepId
|
|
34
|
+
currentStepId: event.stepId,
|
|
35
|
+
stepShowNonce: state.stepShowNonce + 1
|
|
30
36
|
};
|
|
31
37
|
case 'flowEnded':
|
|
32
38
|
return {
|
|
33
39
|
session: null,
|
|
34
|
-
currentStepId: null
|
|
40
|
+
currentStepId: null,
|
|
41
|
+
stepShowNonce: 0
|
|
35
42
|
};
|
|
36
43
|
}
|
|
37
44
|
}
|
|
45
|
+
function resolveSessionChangeStepId(state, session) {
|
|
46
|
+
if (session == null) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
if (state.session?.id !== session.id || state.currentStepId == null) {
|
|
50
|
+
return session.currentStep?.id ?? null;
|
|
51
|
+
}
|
|
52
|
+
const previousStep = state.session.version.steps.find(step => step.id === state.currentStepId);
|
|
53
|
+
const byCrossVersionId = previousStep == null ? undefined : session.version.steps.find(step => step.crossVersionId === previousStep.crossVersionId);
|
|
54
|
+
if (byCrossVersionId) {
|
|
55
|
+
return byCrossVersionId.id;
|
|
56
|
+
}
|
|
57
|
+
const byId = session.version.steps.find(step => step.id === state.currentStepId);
|
|
58
|
+
if (byId) {
|
|
59
|
+
return byId.id;
|
|
60
|
+
}
|
|
61
|
+
return session.currentStep?.id ?? null;
|
|
62
|
+
}
|
|
38
63
|
export function resolveCurrentStep(session, currentStepId) {
|
|
39
64
|
if (!session || !currentStepId) return null;
|
|
40
65
|
return session.version.steps.find(step => step.id === currentStepId) ?? null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["initialFlowSessionViewState","session","currentStepId","currentStep","id","reduceFlowSessionViewState","state","event","type","stepId","
|
|
1
|
+
{"version":3,"names":["initialFlowSessionViewState","session","currentStepId","currentStep","id","stepShowNonce","reduceFlowSessionViewState","state","event","type","resolveSessionChangeStepId","stepId","previousStep","version","steps","find","step","byCrossVersionId","undefined","crossVersionId","byId","resolveCurrentStep"],"sourceRoot":"../../../src","sources":["runtime/flowSessionViewState.ts"],"mappings":";;AAGA;;AAYA,OAAO,SAASA,2BAA2BA,CACzCC,OAAmC,EACb;EACtB,OAAO;IACLA,OAAO;IACPC,aAAa,EAAED,OAAO,EAAEE,WAAW,EAAEC,EAAE,IAAI,IAAI;IAC/CC,aAAa,EAAE;EACjB,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,0BAA0BA,CACxCC,KAA2B,EAC3BC,KAA6B,EACP;EACtB,QAAQA,KAAK,CAACC,IAAI;IAChB,KAAK,eAAe;MAClB,OAAO;QACLR,OAAO,EAAEO,KAAK,CAACP,OAAO;QACtBC,aAAa,EAAEQ,0BAA0B,CAACH,KAAK,EAAEC,KAAK,CAACP,OAAO,CAAC;QAC/DI,aAAa,EAAEE,KAAK,CAACN,OAAO,EAAEG,EAAE,KAAKI,KAAK,CAACP,OAAO,EAAEG,EAAE,GAAGG,KAAK,CAACF,aAAa,GAAG;MACjF,CAAC;IACH,KAAK,UAAU;MACb,OAAO;QACL,GAAGE,KAAK;QACRL,aAAa,EAAEM,KAAK,CAACG,MAAM;QAC3BN,aAAa,EAAEE,KAAK,CAACF,aAAa,GAAG;MACvC,CAAC;IACH,KAAK,WAAW;MACd,OAAO;QACLJ,OAAO,EAAE,IAAI;QACbC,aAAa,EAAE,IAAI;QACnBG,aAAa,EAAE;MACjB,CAAC;EACL;AACF;AAEA,SAASK,0BAA0BA,CACjCH,KAA2B,EAC3BN,OAAmC,EACpB;EACf,IAAIA,OAAO,IAAI,IAAI,EAAE;IACnB,OAAO,IAAI;EACb;EACA,IAAIM,KAAK,CAACN,OAAO,EAAEG,EAAE,KAAKH,OAAO,CAACG,EAAE,IAAIG,KAAK,CAACL,aAAa,IAAI,IAAI,EAAE;IACnE,OAAOD,OAAO,CAACE,WAAW,EAAEC,EAAE,IAAI,IAAI;EACxC;EACA,MAAMQ,YAAY,GAAGL,KAAK,CAACN,OAAO,CAACY,OAAO,CAACC,KAAK,CAACC,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACZ,EAAE,KAAKG,KAAK,CAACL,aAAa,CAAC;EAChG,MAAMe,gBAAgB,GACpBL,YAAY,IAAI,IAAI,GAChBM,SAAS,GACTjB,OAAO,CAACY,OAAO,CAACC,KAAK,CAACC,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACG,cAAc,KAAKP,YAAY,CAACO,cAAc,CAAC;EAC/F,IAAIF,gBAAgB,EAAE;IACpB,OAAOA,gBAAgB,CAACb,EAAE;EAC5B;EACA,MAAMgB,IAAI,GAAGnB,OAAO,CAACY,OAAO,CAACC,KAAK,CAACC,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACZ,EAAE,KAAKG,KAAK,CAACL,aAAa,CAAC;EAClF,IAAIkB,IAAI,EAAE;IACR,OAAOA,IAAI,CAAChB,EAAE;EAChB;EACA,OAAOH,OAAO,CAACE,WAAW,EAAEC,EAAE,IAAI,IAAI;AACxC;AAEA,OAAO,SAASiB,kBAAkBA,CAChCpB,OAAmC,EACnCC,aAA4B,EACH;EACzB,IAAI,CAACD,OAAO,IAAI,CAACC,aAAa,EAAE,OAAO,IAAI;EAC3C,OAAOD,OAAO,CAACY,OAAO,CAACC,KAAK,CAACC,IAAI,CAAEC,IAAI,IAAKA,IAAI,CAACZ,EAAE,KAAKF,aAAa,CAAC,IAAI,IAAI;AAChF","ignoreList":[]}
|
|
@@ -15,7 +15,8 @@ export function useFlowSessionState(engine) {
|
|
|
15
15
|
return {
|
|
16
16
|
session: state.session,
|
|
17
17
|
currentStepId: state.currentStepId,
|
|
18
|
-
currentStep: resolveCurrentStep(state.session, state.currentStepId)
|
|
18
|
+
currentStep: resolveCurrentStep(state.session, state.currentStepId),
|
|
19
|
+
stepShowNonce: state.stepShowNonce
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
//# sourceMappingURL=useFlowSessionState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useReducer","initialFlowSessionViewState","reduceFlowSessionViewState","resolveCurrentStep","useFlowSessionState","engine","state","dispatch","undefined","getFlowSession","type","session","on","currentStepId","currentStep"],"sourceRoot":"../../../src","sources":["runtime/useFlowSessionState.ts"],"mappings":";;AAEA,SAASA,SAAS,EAAEC,UAAU,QAAQ,OAAO;AAE7C,SACEC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,kBAAkB,QACb,2BAAwB;
|
|
1
|
+
{"version":3,"names":["useEffect","useReducer","initialFlowSessionViewState","reduceFlowSessionViewState","resolveCurrentStep","useFlowSessionState","engine","state","dispatch","undefined","getFlowSession","type","session","on","currentStepId","currentStep","stepShowNonce"],"sourceRoot":"../../../src","sources":["runtime/useFlowSessionState.ts"],"mappings":";;AAEA,SAASA,SAAS,EAAEC,UAAU,QAAQ,OAAO;AAE7C,SACEC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,kBAAkB,QACb,2BAAwB;AAS/B;AACA,OAAO,SAASC,mBAAmBA,CAACC,MAAyB,EAAoB;EAC/E,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGP,UAAU,CAACE,0BAA0B,EAAEM,SAAS,EAAE,MAC1EP,2BAA2B,CAACI,MAAM,CAACI,cAAc,CAAC,CAAC,CACrD,CAAC;EAEDV,SAAS,CAAC,MAAM;IACdQ,QAAQ,CAAC;MACPG,IAAI,EAAE,eAAe;MACrBC,OAAO,EAAEN,MAAM,CAACI,cAAc,CAAC;IACjC,CAAC,CAAC;IACF,OAAOJ,MAAM,CAACO,EAAE,CAACL,QAAQ,CAAC;EAC5B,CAAC,EAAE,CAACF,MAAM,CAAC,CAAC;EAEZ,OAAO;IACLM,OAAO,EAAEL,KAAK,CAACK,OAAO;IACtBE,aAAa,EAAEP,KAAK,CAACO,aAAa;IAClCC,WAAW,EAAEX,kBAAkB,CAACG,KAAK,CAACK,OAAO,EAAEL,KAAK,CAACO,aAAa,CAAC;IACnEE,aAAa,EAAET,KAAK,CAACS;EACvB,CAAC;AACH","ignoreList":[]}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/** Predefined mobile screen-view event (web analogue: `page_viewed`). */
|
|
4
|
+
export const SCREEN_VIEWED_EVENT = 'screen_viewed';
|
|
5
|
+
|
|
3
6
|
/** Called when a new location is accepted (after enable + dedupe). */
|
|
4
7
|
|
|
5
8
|
let enabled = false;
|
|
6
9
|
let currentKey = null;
|
|
10
|
+
/** Last accepted (or pending) location — used by the in-app element picker. */
|
|
11
|
+
let currentLocation = null;
|
|
7
12
|
/** Latest location seen while tracking was disabled; flushed on enable. */
|
|
8
13
|
let pendingLocation = null;
|
|
9
14
|
let reporter = null;
|
|
@@ -11,6 +16,20 @@ function locationKey(location) {
|
|
|
11
16
|
return 'path' in location ? `path:${location.path}` : `screen:${location.screen}`;
|
|
12
17
|
}
|
|
13
18
|
|
|
19
|
+
/** Event attributes for `screen_viewed`, or `null` when the location has no identity. */
|
|
20
|
+
export function screenViewedAttributes(location) {
|
|
21
|
+
if ('path' in location) {
|
|
22
|
+
if (!location.path) return null;
|
|
23
|
+
return {
|
|
24
|
+
screen_path: location.path
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if (!location.screen) return null;
|
|
28
|
+
return {
|
|
29
|
+
screen_name: location.screen
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
14
33
|
/**
|
|
15
34
|
* Registers the callback invoked when the active screen/path changes.
|
|
16
35
|
* The React Native facade wires this to `UserflowCore.updateScreen`.
|
|
@@ -20,9 +39,15 @@ export function setScreenChangeReporter(next) {
|
|
|
20
39
|
}
|
|
21
40
|
function report(location) {
|
|
22
41
|
currentKey = locationKey(location);
|
|
42
|
+
currentLocation = location;
|
|
23
43
|
reporter?.(location);
|
|
24
44
|
}
|
|
25
45
|
|
|
46
|
+
/** Latest screen/path the SDK has recorded, or `null` before the first report. */
|
|
47
|
+
export function getCurrentScreenLocation() {
|
|
48
|
+
return currentLocation ?? pendingLocation;
|
|
49
|
+
}
|
|
50
|
+
|
|
26
51
|
/** Activates screen-change tracking after a successful {@link Userflow.init}. */
|
|
27
52
|
export function enableScreenTracking() {
|
|
28
53
|
enabled = true;
|
|
@@ -39,13 +64,16 @@ export function enableScreenTracking() {
|
|
|
39
64
|
export function disableScreenTracking() {
|
|
40
65
|
enabled = false;
|
|
41
66
|
currentKey = null;
|
|
67
|
+
currentLocation = null;
|
|
42
68
|
pendingLocation = null;
|
|
43
69
|
}
|
|
44
70
|
|
|
45
71
|
/**
|
|
46
72
|
* Records a navigation to `location` when tracking is enabled.
|
|
47
|
-
* Duplicate consecutive locations are ignored
|
|
48
|
-
*
|
|
73
|
+
* Duplicate consecutive locations are ignored unless `{ force: true }` (used
|
|
74
|
+
* after overlay dismiss, AppState resume, and first identify). On change,
|
|
75
|
+
* notifies the reporter so the SDK can push `UpdateClientContext` and
|
|
76
|
+
* `screen_viewed`.
|
|
49
77
|
*
|
|
50
78
|
* Locations observed before {@link enableScreenTracking} are remembered and
|
|
51
79
|
* flushed when tracking is enabled (so init-after-mount still picks up the
|
|
@@ -54,7 +82,7 @@ export function disableScreenTracking() {
|
|
|
54
82
|
* - Expo Router: `{ path: "/settings/billing" }` → wire `screenPath`
|
|
55
83
|
* - React Navigation / manual: `{ screen: "BillingSettings" }` → wire `screenName`
|
|
56
84
|
*/
|
|
57
|
-
export function handleScreenChange(location) {
|
|
85
|
+
export function handleScreenChange(location, options) {
|
|
58
86
|
if (!location) return;
|
|
59
87
|
if ('path' in location) {
|
|
60
88
|
if (!location.path) return;
|
|
@@ -65,14 +93,24 @@ export function handleScreenChange(location) {
|
|
|
65
93
|
pendingLocation = location;
|
|
66
94
|
return;
|
|
67
95
|
}
|
|
68
|
-
if (locationKey(location) === currentKey) return;
|
|
96
|
+
if (!options?.force && locationKey(location) === currentKey) return;
|
|
69
97
|
pendingLocation = null;
|
|
70
98
|
report(location);
|
|
71
99
|
}
|
|
72
100
|
|
|
101
|
+
/** Re-report the current screen, bypassing consecutive dedupe (resume / identify). */
|
|
102
|
+
export function reportCurrentScreen() {
|
|
103
|
+
const location = getCurrentScreenLocation();
|
|
104
|
+
if (!location) return;
|
|
105
|
+
handleScreenChange(location, {
|
|
106
|
+
force: true
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
73
110
|
/** @internal Resets tracker state between tests. Does not clear the reporter. */
|
|
74
111
|
export function resetScreenTrackerForTests() {
|
|
75
112
|
enabled = false;
|
|
113
|
+
currentLocation = null;
|
|
76
114
|
currentKey = null;
|
|
77
115
|
pendingLocation = null;
|
|
78
116
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["enabled","currentKey","pendingLocation","reporter","locationKey","location","path","screen","setScreenChangeReporter","next","report","enableScreenTracking","disableScreenTracking","handleScreenChange","resetScreenTrackerForTests"],"sourceRoot":"../../src","sources":["screenTracker.ts"],"mappings":";;AAEA;;
|
|
1
|
+
{"version":3,"names":["SCREEN_VIEWED_EVENT","enabled","currentKey","currentLocation","pendingLocation","reporter","locationKey","location","path","screen","screenViewedAttributes","screen_path","screen_name","setScreenChangeReporter","next","report","getCurrentScreenLocation","enableScreenTracking","disableScreenTracking","handleScreenChange","options","force","reportCurrentScreen","resetScreenTrackerForTests"],"sourceRoot":"../../src","sources":["screenTracker.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Animated } from 'react-native';
|
|
5
|
+
import { useCardOpacity } from "./cardTransition.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Card chrome root that fades itself through step transitions.
|
|
9
|
+
*
|
|
10
|
+
* This has to wrap the card view itself, not sit higher up in a surface: the
|
|
11
|
+
* fade starts from this component's mount, and a tooltip's surface renders long
|
|
12
|
+
* before its card does.
|
|
13
|
+
*/
|
|
14
|
+
export function CardFade({
|
|
15
|
+
style,
|
|
16
|
+
...rest
|
|
17
|
+
}) {
|
|
18
|
+
const opacity = useCardOpacity();
|
|
19
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
20
|
+
...rest,
|
|
21
|
+
style: opacity ? [style, {
|
|
22
|
+
opacity
|
|
23
|
+
}] : style
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=CardFade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Animated","useCardOpacity","jsx","_jsx","CardFade","style","rest","opacity","View"],"sourceRoot":"../../../src","sources":["surfaces/CardFade.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,cAAc,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAAC;EAAEC,KAAK;EAAE,GAAGC;AAAoB,CAAC,EAAsB;EAC9E,MAAMC,OAAO,GAAGN,cAAc,CAAC,CAAC;EAChC,oBAAOE,IAAA,CAACH,QAAQ,CAACQ,IAAI;IAAA,GAAKF,IAAI;IAAED,KAAK,EAAEE,OAAO,GAAG,CAACF,KAAK,EAAE;MAAEE;IAAQ,CAAC,CAAC,GAAGF;EAAM,CAAE,CAAC;AACnF","ignoreList":[]}
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { Pressable, StyleSheet, Text } from 'react-native';
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
export const CLOSE_BUTTON_SIZE = 24;
|
|
7
|
+
export const CLOSE_BUTTON_INSET = 8;
|
|
8
|
+
/** Web close control: 24×24 hit target. Pass muted color from {@link resolveCloseButtonColor}. */
|
|
7
9
|
export function CloseButton({
|
|
8
10
|
onPress,
|
|
9
|
-
color
|
|
11
|
+
color,
|
|
12
|
+
top = CLOSE_BUTTON_INSET,
|
|
13
|
+
right = CLOSE_BUTTON_INSET
|
|
10
14
|
}) {
|
|
11
15
|
return /*#__PURE__*/_jsx(Pressable, {
|
|
12
16
|
testID: "userflow-modal-close",
|
|
@@ -16,6 +20,8 @@ export function CloseButton({
|
|
|
16
20
|
style: ({
|
|
17
21
|
pressed
|
|
18
22
|
}) => [styles.button, {
|
|
23
|
+
top,
|
|
24
|
+
right,
|
|
19
25
|
opacity: pressed ? 0.6 : 1
|
|
20
26
|
}],
|
|
21
27
|
hitSlop: 8,
|
|
@@ -30,11 +36,9 @@ export function CloseButton({
|
|
|
30
36
|
const styles = StyleSheet.create({
|
|
31
37
|
button: {
|
|
32
38
|
position: 'absolute',
|
|
33
|
-
top: 8,
|
|
34
|
-
right: 8,
|
|
35
39
|
zIndex: 2,
|
|
36
|
-
width:
|
|
37
|
-
height:
|
|
40
|
+
width: CLOSE_BUTTON_SIZE,
|
|
41
|
+
height: CLOSE_BUTTON_SIZE,
|
|
38
42
|
alignItems: 'center',
|
|
39
43
|
justifyContent: 'center'
|
|
40
44
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Pressable","StyleSheet","Text","jsx","_jsx","CloseButton","onPress","color","testID","accessibilityRole","accessibilityLabel","style","pressed","styles","button","opacity","hitSlop","children","icon","create","position","
|
|
1
|
+
{"version":3,"names":["React","Pressable","StyleSheet","Text","jsx","_jsx","CLOSE_BUTTON_SIZE","CLOSE_BUTTON_INSET","CloseButton","onPress","color","top","right","testID","accessibilityRole","accessibilityLabel","style","pressed","styles","button","opacity","hitSlop","children","icon","create","position","zIndex","width","height","alignItems","justifyContent","fontSize","fontWeight","lineHeight"],"sourceRoot":"../../../src","sources":["surfaces/CloseButton.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3D,OAAO,MAAMC,iBAAiB,GAAG,EAAE;AACnC,OAAO,MAAMC,kBAAkB,GAAG,CAAC;AAWnC;AACA,OAAO,SAASC,WAAWA,CAAC;EAC1BC,OAAO;EACPC,KAAK;EACLC,GAAG,GAAGJ,kBAAkB;EACxBK,KAAK,GAAGL;AACQ,CAAC,EAAsB;EACvC,oBACEF,IAAA,CAACJ,SAAS;IACRY,MAAM,EAAC,sBAAsB;IAC7BC,iBAAiB,EAAC,QAAQ;IAC1BC,kBAAkB,EAAC,OAAO;IAC1BN,OAAO,EAAEA,OAAQ;IACjBO,KAAK,EAAEA,CAAC;MAAEC;IAAQ,CAAC,KAAK,CAACC,MAAM,CAACC,MAAM,EAAE;MAAER,GAAG;MAAEC,KAAK;MAAEQ,OAAO,EAAEH,OAAO,GAAG,GAAG,GAAG;IAAE,CAAC,CAAE;IACpFI,OAAO,EAAE,CAAE;IAAAC,QAAA,eAEXjB,IAAA,CAACF,IAAI;MAACa,KAAK,EAAE,CAACE,MAAM,CAACK,IAAI,EAAE;QAAEb;MAAM,CAAC,CAAE;MAAAY,QAAA,EAAC;IAAC,CAAM;EAAC,CACtC,CAAC;AAEhB;AAEA,MAAMJ,MAAM,GAAGhB,UAAU,CAACsB,MAAM,CAAC;EAC/BL,MAAM,EAAE;IACNM,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,CAAC;IACTC,KAAK,EAAErB,iBAAiB;IACxBsB,MAAM,EAAEtB,iBAAiB;IACzBuB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDP,IAAI,EAAE;IACJQ,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|